]> git.saurik.com Git - bison.git/blob - ChangeLog
i18n: fix for gnulib.
[bison.git] / ChangeLog
1 2010-07-28 Joel E. Denny <joeldenny@joeldenny.org>
2
3 i18n: fix for gnulib.
4 * po/POTFILES.in: Add remaining gnulib files that have
5 translatable strings.
6
7 2010-07-25 Joel E. Denny <joeldenny@joeldenny.org>
8
9 build: fix our adjustments for gnulib files in lib.
10 * configure.ac: For prepending lib/ to the values of config
11 variables, fix detection of empty values. Also, due to recent
12 gnulib changes, add LIBUNISTRING_UNITYPES_H and
13 LIBUNISTRING_UNIWIDTH_H to the list of those variables.
14
15 2010-07-25 Joel E. Denny <joeldenny@joeldenny.org>
16
17 maint: use announce-gen's new --mail-headers.
18 * HACKING (Announce): Update instructions.
19 * cfg.mk (announcement_Cc_): Define.
20 * configure.ac (AM_GNU_GETTEXT_VERSION): Update to 0.18 as
21 required by latest gnulib.
22 * gnulib: Update to latest.
23
24 2010-07-24 Joel E. Denny <joeldenny@joeldenny.org>
25
26 tests: handle Valgrind that complains about >&-.
27 * tests/output.at (AT_CHECK_OUTPUT): Extend to accept pre-tests.
28 (Output files: -dv >&-): Skip test group if running
29 maintainer-check-valgrind.
30
31 2010-07-23 Paul Hilfinger <hilfingr@EECS.Berkeley.EDU>
32
33 * NEWS: Describe new semantic-predicate feature.
34 * data/c.m4 (b4_predicate_case): New definition.
35 * data/java.m4 (b4_predicate_case): New definition.
36 * data/glr.c (yyimmediate): Add definition.
37 (yydoAction): Remove comment, now obsolete.
38 Do YY_REDUCE_PRINT here.
39 (yyglrReduce): Alter comment to indicate that semantic values
40 need not be deferred.
41 Remove YY_REDUCE_PRINT from here; done in yydoAction.
42 (yyprocessOneStack): Pass immediate flag.
43 Delete stacks rejected by predicates in newly split-off parsers.
44 Change handling of yyerr so that only current stack gets deleted
45 when semantic predicate fails.
46 (yyfillin): Don't crash if a semantic value is unresolved (as may
47 happen in predicate rules).
48 Copy lr state as well in debugging mode.
49 Update comment on setting of yysval to include yyloc as well.
50 (yy_reduce_print): Add yynormal argument. Perform fillin properly.
51 Report unresolved RHS values.
52 (yyimmediate): New table.
53 * src/gram.h (struct rule): Add is_predicate field.
54 * src/output.c (user_actions_output): Use b4_predicate_case for
55 predicates.
56 (prepare_symbols): Output yyimmediate.
57 * src/scan-gram.l: Add %? token, SC_PREDICATE state.
58 * src/scan-code.l (code_props_rule_action_init): Add is_predicate
59 argument.
60 * src/scan-code.h (struct code_props): Add is_predicate field.
61 (code_props_rule_action_init): New interface.
62 * src/parse-gram.y (%?{...}): New token.
63 (rhs): Add %?{...} rule.
64 * src/parse-gram.c: Regenerate.
65 * src/parse-gram.h: Regenerate.
66 * src/reader.c (grammar_current_rule_action_append): Add
67 immediate argument.
68 (grammar_midrule_action): Use new interface for
69 code_props_rule_action_init.
70 (grammar_current_rule_action_append): Ditto.
71 (packgram): Transfer is_predicate value.
72 * src/reader.h (grammar_current_rule_action_append): New interface.
73 * doc/bison.texinfo: Document semantic predicates (%?).
74
75 * data/glr.c (yylhsNonterm, yyisDefaultedState,yyDefaultAction)
76 (yygetLRActions,yynewGLRStackItem,yyaddDeferredAction,yyinitStateSet)
77 (yyinitGLRStack,yyexpandGLRStack,yyupdateSplit,yymarkStackDeleted)
78 (yyundeleteLastStack,yyglrShift,yyglrShiftDefer,yydoAction,yyglrReduce)
79 (yyidenticalOptions,yymergeOptionSets,yyresolveStates,yyresolveAction)
80 (yyresolveLocations,yyresolveValue,yyreducePrint): Update parameter
81 names in comments and mention all parameters.
82 (struct yyGLRState): Fix description of yyposn field.
83 (yyresolveLocations): Correct comment so as not to imply action when
84 yyn1==0.
85
86 2010-06-17 Paul Eggert <eggert@cs.ucla.edu>
87
88 Update from GFDL GFDL 1.2 to 1.3.
89 * doc/bison.texinfo: Update GFDL version number.
90 * doc/fdl.texi: Update to version 1.3, taken from:
91 http://www.gnu.org/licenses/fdl.texi
92
93 Do not use date ranges in copyright notices.
94 See http://www.gnu.org/prep/maintain/maintain.html#Copyright-Notices
95
96 * HACKING, Makefile.am, NEWS, PACKAGING, README, README-alpha:
97 * TODO, bootstrap, bootstrap.conf:
98 * build-aux/update-b4-copyright, cfg.mk, configure.ac:
99 * data/README, data/bison.m4, data/c++-skel.m4, data/c++.m4:
100 * data/c-skel.m4, data/c.m4, data/glr.c, data/glr.cc:
101 * data/java-skel.m4, data/java.m4, data/lalr1.cc:
102 * data/lalr1.java, data/local.mk, data/location.cc:
103 * data/stack.hh, data/variant.hh, data/xslt/bison.xsl:
104 * data/xslt/xml2dot.xsl, data/xslt/xml2text.xsl:
105 * data/xslt/xml2xhtml.xsl, data/yacc.c, djgpp/Makefile.maint:
106 * djgpp/README.in, djgpp/config.bat, djgpp/config.sed:
107 * djgpp/config.site, djgpp/config_h.sed, djgpp/djunpack.bat:
108 * djgpp/local.mk, djgpp/subpipe.c, djgpp/subpipe.h:
109 * djgpp/testsuite.sed, doc/bison.texinfo, doc/local.mk:
110 * doc/refcard.tex, etc/README, etc/bench.pl.in, etc/local.mk:
111 * examples/calc++/Makefile.am, examples/extexi:
112 * examples/local.mk, lib/abitset.c, lib/abitset.h:
113 * lib/bbitset.h, lib/bitset.c, lib/bitset.h:
114 * lib/bitset_stats.c, lib/bitset_stats.h, lib/bitsetv-print.c:
115 * lib/bitsetv-print.h, lib/bitsetv.c, lib/bitsetv.h:
116 * lib/ebitset.c, lib/ebitset.h, lib/get-errno.c:
117 * lib/get-errno.h, lib/lbitset.c, lib/lbitset.h:
118 * lib/libiberty.h, lib/local.mk, lib/main.c, lib/timevar.c:
119 * lib/timevar.def, lib/timevar.h, lib/vbitset.c:
120 * lib/vbitset.h, lib/yyerror.c, m4/bison-i18n.m4:
121 * m4/c-working.m4, m4/cxx.m4, m4/subpipe.m4, m4/timevar.m4:
122 * src/AnnotationList.c, src/AnnotationList.h:
123 * src/InadequacyList.c, src/InadequacyList.h, src/LR0.c:
124 * src/LR0.h, src/Sbitset.c, src/Sbitset.h, src/assoc.c:
125 * src/assoc.h, src/closure.c, src/closure.h, src/complain.c:
126 * src/complain.h, src/conflicts.c, src/conflicts.h:
127 * src/derives.c, src/derives.h, src/files.c, src/files.h:
128 * src/flex-scanner.h, src/getargs.c, src/getargs.h:
129 * src/gram.c, src/gram.h, src/graphviz.c, src/ielr.c:
130 * src/ielr.h, src/lalr.c, src/lalr.h, src/local.mk:
131 * src/location.c, src/location.h, src/main.c:
132 * src/muscle-tab.c, src/muscle-tab.h, src/named-ref.c:
133 * src/named-ref.h, src/nullable.c, src/nullable.h:
134 * src/output.c, src/output.h, src/parse-gram.y:
135 * src/print-xml.c, src/print-xml.h, src/print.c, src/print.h:
136 * src/print_graph.c, src/print_graph.h, src/reader.c:
137 * src/reader.h, src/reduce.c, src/reduce.h, src/relation.c:
138 * src/relation.h, src/scan-code.h, src/scan-code.l:
139 * src/scan-gram.h, src/scan-gram.l, src/scan-skel.h:
140 * src/scan-skel.l, src/state.c, src/state.h, src/symlist.c:
141 * src/symlist.h, src/symtab.c, src/symtab.h, src/system.h:
142 * src/tables.c, src/tables.h, src/uniqstr.c, src/uniqstr.h:
143 * tests/actions.at, tests/atlocal.in, tests/c++.at:
144 * tests/calc.at, tests/conflicts.at, tests/cxx-type.at:
145 * tests/existing.at, tests/glr-regression.at:
146 * tests/headers.at, tests/input.at, tests/java.at:
147 * tests/local.at, tests/local.mk, tests/named-refs.at:
148 * tests/output.at, tests/push.at, tests/reduce.at:
149 * tests/regression.at, tests/sets.at, tests/skeletons.at:
150 * tests/synclines.at, tests/testsuite.at, tests/torture.at:
151 Don't use date ranges in copyright notices.
152
153 2010-05-11 Akim Demaille <demaille@gostai.com>
154
155 lalrl1.cc: give a chance to user defined YYLLOC_DEFAULT.
156 * data/lalr1.cc (YYLLOC_DEFAULT): Move its definition from the
157 header file to the implementation file, after the user %code
158 sections.
159 * NEWS (2.5): Document this.
160
161 2010-05-11 Akim Demaille <demaille@gostai.com>
162
163 doc: please Emacs.
164 * doc/bison.texinfo (Local Variables): Move this after the
165 LocalWords, since the latter are looked for in the whole document,
166 while the former are looked for only at its end.
167 Require american spell checking.
168
169 2010-05-10 Akim Demaille <demaille@gostai.com>
170
171 doc: fix lalr1.cc documentation.
172 * doc/bison.texinfo (C++ Scanner Interface): Fix yylex signature.
173 (C++ Bison Interface): Fix lalr1.cc skeleton name.
174 (C++ Parser Interface): Fix semantic_type and location_type names.
175 Document yy::parser::token.
176 Reported by Jerry Quinn.
177
178 2010-05-10 Akim Demaille <demaille@gostai.com>
179
180 c++: use YYRHSLOC.
181 * data/lalr1.cc (YYRHSLOC): New.
182 (YYLLOC_DEFAULT): Use it.
183 * data/glr.cc: If location_type was user defined, do not include
184 location.hh, and do not produce location.hh and position.hh.
185 * tests/calc.at (YYLLOC_DEFAULT): Use YYRHSLOC.
186 Check that glr.cc supports user defined location_type.
187 * NEWS: Document this.
188
189 2010-05-07 Akim Demaille <demaille@gostai.com>
190
191 doc: fix typo.
192 * tests/synclines.at: here.
193
194 2010-05-04 Akim Demaille <demaille@gostai.com>
195
196 tests: enhance AT_SYNCLINES_COMPILE.
197 * tests/synclines.at (AT_SYNCLINES_COMPILE): More distcc patterns.
198 (AT_TEST_SYNCLINE): Remove GCC 4.5 protection which is already
199 taken care of in AT_SYNCLINES_COMPILE.
200
201 2010-05-04 Akim Demaille <demaille@gostai.com>
202
203 lalr1.cc: don't generate location.hh when location_type is defined
204 * data/bison.m4 (b4_percent_define_get): Accept a default value.
205 * data/c++.m4: Do not provide a default value for the %define
206 variable location_type, rather, use b4_percent_define_get with a
207 default argument where its value is needed.
208 * data/lalr1.cc: Do not load location.cc (which outputs both
209 location.hh and position.hh) if the user defined location_type.
210 Do not include location.hh either.
211
212 2010-05-04 Akim Demaille <demaille@gostai.com>
213
214 lalr1.cc: minor refactoring.
215 * data/lalr1.cc: Don't issue empty namespaces.
216
217 2010-05-04 Akim Demaille <demaille@gostai.com>
218
219 tests: fix %printer.
220 Currently, there is no check that %printer ... <foo> (nor
221 %destructor) is about an existing <foo> type. This C++ test had
222 it wrong (<::std::string> vs. <std::string>).
223
224 * tests/c++.at (AT_CHECK_VARIANTS): In list.yy, redefine the
225 pretty-printing of lists into something better for parser traces.
226 Update the expected output.
227 Fix correspondance between %type/%token and %printer.
228
229 2010-05-04 Akim Demaille <demaille@gostai.com>
230
231 lalr1.cc: location_type: make sure we don't depend on loc.(begin|end).
232 * tests/calc.at (Span): Instead of begin/end, as in the built-in
233 location class, use first and last.
234 Define YYLLOC_DEFAULT to adjust to these changes.
235 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Adjust to the
236 location_type changes.
237
238 2010-05-01 Joel E. Denny <joeldenny@joeldenny.org>
239
240 tests: fix maintainer-xml-check.
241 * data/xslt/xml2dot.xsl (xsl:template match="bison-xml-report"):
242 Update output to include comments now produced by --graph.
243 (xsl:template match="automaton"): As for --graph, name the
244 digraph after the grammar file.
245 * src/print-xml.c (escape_bufs): Enlarge array.
246 (print_xml): Add bug-report and url attributes to
247 bison-xml-report element.
248
249 2010-05-01 Joel E. Denny <joeldenny@joeldenny.org>
250
251 In DOT output, convert from "/*" comments to "//" comments.
252 This handles the possibility that a "*/" might appear in
253 variable portions of those comments at some point in the future.
254 * src/graphviz.c (start_graph): Implement.
255
256 2010-04-30 Joel E. Denny <joeldenny@joeldenny.org>
257
258 Document that undefined %prec identifier warnings will remain.
259 * NEWS (2.4.3): Here.
260 (2.4.2): Here.
261
262 2010-04-30 Joel E. Denny <joeldenny@joeldenny.org>
263
264 Revert 2009-12-30 change for undefined %prec token complaints.
265 That is, keep them as warnings because that should be sufficient
266 to satisfy POSIX without creating backward compatibility issues.
267 Suggested by Richard Stallman at
268 <http://lists.gnu.org/archive/html/bison-patches/2010-03/msg00033.html>.
269 * NEWS (2.5): Remove mention of complaint.
270 * src/reader.c (grammar_rule_check): Convert complaint back to
271 warning.
272 * tests/input.at (%prec's token must be defined): Update.
273
274 2010-04-25 Joel E. Denny <joeldenny@joeldenny.org>
275
276 build: don't require src/bison during bootstrap.
277 Suggested by Eric Blake at
278 <http://lists.gnu.org/archive/html/bug-bison/2010-03/msg00003.html>.
279 * bootstrap.conf (bootstrap_epilogue): New function to make sure
280 src/parse-gram.[ch] are stamped later than src/parse-gram.y.
281
282 2010-04-25 Joel E. Denny <joeldenny@joeldenny.org>
283
284 i18n: fix untranslatable string.
285 Reported by Goran Uddeborg at
286 <http://lists.gnu.org/archive/html/bug-bison/2010-03/msg00000.html>.
287 * src/muscle-tab.c (muscle_percent_define_insert): Here.
288
289 2010-04-13 Akim Demaille <demaille@gostai.com>
290
291 tests: calc: minor refactoring.
292 * tests/calc.at (_AT_DATA_CALC_Y): Simplify yylex.
293
294 2010-04-13 Akim Demaille <demaille@gostai.com>
295
296 tests: calc: simplify location management.
297 * tests/local.at (AT_LOC_PUSHDEF, AT_LOC_POPDEF): New.
298 (_AT_BISON_OPTION_PUSHDEFS, AT_BISON_OPTION_POPDEFS): Use them to
299 define the appropriate AT_LOC accessors.
300 * tests/calc.at: Use AT_LOC accessors.
301
302 2010-04-13 Akim Demaille <demaille@gostai.com>
303
304 test location_type.
305 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS):
306 Define AT_LOCATION_TYPE_IF.
307 (_AT_BISON_OPTION_POPDEFS): Undefine AT_LOCATION_TYPE_IF.
308 * tests/calc.at (_AT_DATA_CALC_Y): When %define location_type is
309 used, provide a user location type and use it.
310 (Simple LALR1 C++ Calculator): Add a test case for location_type.
311
312 2010-04-13 Akim Demaille <demaille@gostai.com>
313
314 tests: check fclose's return value.
315 * tests/calc.at (_AT_DATA_CALC_Y): Check fclose's return status.
316
317 2010-04-13 Akim Demaille <demaille@gostai.com>
318
319 tests: don't depend on the actual location type.
320 * tests/calc.at: Use yy::parser::location_type rather than
321 yy::location, since the former is always right, and might point to
322 another type than the latter.
323
324 2010-04-13 Akim Demaille <demaille@gostai.com>
325
326 formatting changes.
327 * tests/calc.at: Formatting changes.
328
329 2010-04-13 Akim Demaille <demaille@gostai.com>
330
331 lalr1.cc: remove useless forward declaration.
332 * data/lalr1.cc: Include location.hh before stack.hh.
333 Remove the useless forward declarations of position and location.
334 Reported by Chris Morley.
335 * data/glr.cc: Likewise.
336
337 2010-04-11 Joel E. Denny <joeldenny@joeldenny.org>
338
339 * NEWS (2.4.3): Mention fix for Sun Studio C++.
340
341 2010-04-10 Joel E. Denny <joeldenny@joeldenny.org>
342
343 tests: fix for newer Sun Studio C++.
344 Reported by Dagobert Michelsen at
345 <http://lists.gnu.org/archive/html/bug-bison/2010-03/msg00023.html>.
346 * THANKS (Dagobert Michelsen): Add.
347 * configure.ac (AC_PREREQ): Set to 2.64 so we get the latest
348 Autoconf macro for handling the restrict keyword.
349 * gnulib: Update to latest, which no longer overrides that macro
350 from Autoconf.
351
352 2010-04-03 Joel E. Denny <jdenny@ces.clemson.edu>
353
354 portability: fix pointer arithmetic to conform to C standard.
355 Reported by Tys Lefering at
356 <http://lists.gnu.org/archive/html/bug-bison/2010-03/msg00035.html>.
357 This fix is already implemented in glr.c and does not apply to
358 lalr1.java.
359 * data/lalr1.cc (yy::parser::parse): Increase size of
360 yyerror_range and adjust subscripting so you don't have to
361 subtract one from the beginning of the array.
362 * data/yacc.c (b4_declare_parser_state_variables,
363 yyparse, yypush_parse): Likewise.
364
365 2010-04-05 Akim Demaille <demaille@gostai.com>
366
367 remove useless include.
368 * src/graphviz.h: Don't include stdbool.h.
369
370 2010-04-05 Akim Demaille <demaille@gostai.com>
371
372 graph: sign the output file.
373 * src/graphviz.c (start_graph): Issue comments about Bison.
374 Suggested by Tys Lefering.
375
376 2010-03-31 Joel E. Denny <jdenny@ces.clemson.edu>
377
378 portability: fix test suite for GCC 4.5's new #error message.
379 Reported by Tys Lefering at
380 <http://lists.gnu.org/archive/html/bug-bison/2010-03/msg00030.html>.
381 * NEWS (2.4.3): Mention.
382 * tests/synclines.at (AT_TEST_SYNCLINE): Implement.
383
384 2010-03-30 Akim Demaille <demaille@gostai.com>
385
386 fix comments.
387 * src/graphviz.h: Add missing license notice.
388 Document.
389
390 2010-03-25 Akim Demaille <demaille@gostai.com>
391
392 tests: fix 250: parse.error=verbose overflow.
393 * tests/regression.at (parse.error=verbose overflow): Avoid the
394 double inclusion of stdlib.h as it triggers hard errors.
395
396 2010-03-23 Joel E. Denny <jdenny@ces.clemson.edu>
397
398 portability: fix for BSD make.
399 Reported by Johan van Selst at
400 <http://lists.gnu.org/archive/html/bug-bison/2010-03/msg00016.html>.
401 * tests/local.mk ($(TESTSUITE)): Qualify package.m4 in
402 this dependency list as in package.m4's target rule.
403
404 2010-03-23 Joel E. Denny <jdenny@ces.clemson.edu>
405
406 portability: fix spawning on at least FreeBSD 8 and FreeBSD 9.
407 Reported by Johan van Selst at
408 <http://lists.gnu.org/archive/html/bug-bison/2010-03/msg00014.html>.
409 * NEWS (2.4.3): New.
410 * THANKS (Johan van Selst): Add.
411 * etc/prefix-gnulib-mk (prefix): Adjust regex for makefile
412 targets so that gnulib's new c++defs.h is matched.
413 * gnulib: Update to latest.
414
415 2010-03-20 Joel E. Denny <jdenny@ces.clemson.edu>
416
417 maint: update for changes to gnulib's announce-gen.
418 * HACKING (Announce): RELEASE_TYPE=major must now be written
419 RELEASE_TYPE=stable.
420
421 2010-03-20 Joel E. Denny <jdenny@ces.clemson.edu>
422
423 Version 2.4.2.
424 * NEWS (2.4.2): Set version and date. For the recent test suite
425 portability fixes, don't be so optimistic about their success
426 given the lack of feedback on the affected platforms.
427
428 2010-02-22 Joel E. Denny <jdenny@ces.clemson.edu>
429
430 tests: fix maintainer-xml-check for recent changes.
431 * tests/output.at (AT_CHECK_CONFLICTING_OUTPUT): Use
432 AT_BISON_CHECK_NO_XML rather than AT_BISON_CHECK because an
433 output file whose name conflicts with a previous output file
434 is now never generated.
435
436 2010-02-22 Joel E. Denny <jdenny@ces.clemson.edu>
437
438 portability: fix several issues with M4 subprocess.
439
440 M4's output pipe was not being drained upon fatal errors during
441 scan_skel. As a result, broken-pipe messages from M4 were seen
442 on at least AIX, HP-UX, Solaris, and RHEL4, and this caused a
443 failure in the test suite. The problem was that, on platforms
444 where the default disposition for SIGPIPE is ignore instead of
445 terminate, M4 sometimes saw fwrite fail with errno=EPIPE and
446 then reported it. However, there's some sort of race condition,
447 because the new test group occasionally succeeded.
448 Reported by Albert Chin at
449 <http://lists.gnu.org/archive/html/bug-bison/2010-02/msg00004.html>.
450
451 There were also problems with the test suite livelocking on
452 Tru64 5.1b. Reported by Didier Godefroy at
453 <http://lists.gnu.org/archive/html/bug-bison/2009-05/msg00005.html>.
454 Switching to create_pipe_bidi suggested by Akim Demaille.
455
456 To attempt to solve both of these problems, switch to gnulib's
457 create_pipe_bidi and register M4 process as a slave. Along the
458 way, clean up file name conflict handling, which was affected by
459 the broken-pipe problem before the switch.
460 * NEWS (2.4.2): Document.
461 * THANKS (Didier Godefroy): Add.
462 * bootstrap.conf (gnulib_modules): Add pipe.
463 * gnulib: Update to latest to make sure we have all the latest
464 fixes.
465 * lib/local.mk (lib_libbison_a_SOURCES): Remove subpipe.h and
466 subpipe.c.
467 * po/POTFILES.in (lib/subpipe.c): Remove.
468 * src/files.c (compute_output_file_names): Update invocations
469 of output_file_name_check.
470 (output_file_name_check): In the case that the grammar file
471 would be overwritten, use complain instead of fatal, but replace
472 the output file name with /dev/null. Use the /dev/null solution
473 for the case of two conflicting output files as well because it
474 seems safer in case Bison one day tries to open both files at
475 the same time.
476 * src/files.h (output_file_name_check): Update prototype.
477 * src/output.c (output_skeleton): Use create_pipe_bidi and
478 wait_subprocess. Assert that scan_skel completely drains the
479 pipe.
480 * src/scan-skel.l (at_directive_perform): Update
481 output_file_name_check invocation.
482 * tests/output.at (AT_CHECK_CONFLICTING_OUTPUT): Check that the
483 grammar file actually isn't overwritten.
484 (Conflicting output files: -o foo.y): Update expected output.
485 * tests/skeletons.at (Fatal errors but M4 continues producing
486 output): New test group.
487
488 2010-02-04 Joel E. Denny <jdenny@ces.clemson.edu>
489
490 Update POTFILES.
491 * HACKING (Release Procedure): Add reminder about keeping
492 POTFILES files up-to-date.
493 * po/POTFILES.in (src/muscle-tab.c, src/scan-skel.l): Add.
494
495 2010-02-01 Joel E. Denny <jdenny@clemson.edu>
496
497 Code cleanup.
498 * tests/atlocal.in (abs_top_srcdir): Remove shell variable,
499 which is already defined in atconfig.
500
501 2010-01-22 Joel E. Denny <jdenny@clemson.edu>
502
503 tests: fix missing include caught by g++ 4.4.1.
504 Reported by Tys Lefering.
505 * HACKING (Release checks): Add note about trying a recent GCC.
506 * tests/regression.at (_AT_DATA_DANCER_Y): For C++, include
507 cstdlib for abort.
508 (_AT_DATA_EXPECT2_Y): Likewise.
509
510 2010-01-21 Joel E. Denny <jdenny@clemson.edu>
511
512 * cfg.mk (gnulib_dir): Assume gnulib is a subdirectory.
513
514 2010-01-21 Joel E. Denny <jdenny@clemson.edu>
515
516 maint: automate PACKAGE_COPYRIGHT_YEAR update, and update it.
517 * HACKING (Release Procedure): Update notes on copyright years.
518 * Makefile.am (update-package-copyright-year): New target rule.
519 * build-aux/update-package-copyright-year: New file.
520 * cfg.mk (update-copyright): Add update-package-copyright-year
521 as a dependency.
522
523 2010-01-19 Joel E. Denny <jdenny@clemson.edu>
524
525 * bootstrap: Import improvements from latest gnulib.
526
527 2010-01-19 Joel E. Denny <jdenny@clemson.edu>
528
529 build: require Automake 1.11.1 to avoid a security flaw.
530 * HACKING (Release Procedure): Don't document Automake security
531 flaw here.
532 * configure.ac (AM_INIT_AUTOMAKE): Require 1.11.1, and explain
533 why here.
534
535 2010-01-19 Joel E. Denny <jdenny@clemson.edu>
536
537 gnulib: update to latest.
538
539 2010-01-19 Joel E. Denny <jdenny@clemson.edu>
540
541 ChangeLog (2006-09-15): add Odd Arild Olsen's role for push.c.
542
543 2010-01-15 Joel E. Denny <jdenny@clemson.edu>
544
545 Thank the developer of the initial push parser implementation.
546 This unfortunate oversight is several years old.
547 * THANKS (Odd Arild Olsen): Add.
548
549 2010-01-04 Joel E. Denny <jdenny@clemson.edu>
550
551 Fix some comments concerning LR(0) versus LALR(1).
552
553 Stop equating LR(0) with nondeterminism and LALR(1) with
554 determinism. That is, if all states are consistent, then LR(0)
555 tables are deterministic. On the other hand, LALR(1) tables
556 might be nondeterministic before conflict resolution, and GLR
557 permits LALR(1) tables to remain nondeterministic.
558 * src/LR0.c, src/LR0.h: Here.
559 * src/lalr.c, src/lalr.h: Here.
560 * src/main.c (main): Here.
561 * src/state.c, src/state.h: Here.
562
563 * src/ielr.h (ielr): In preconditions, expect LR(0) not LALR(1)
564 parser tables.
565
566 2010-01-04 Joel E. Denny <jdenny@clemson.edu>
567
568 maint: run "make update-copyright"
569
570 2009-12-30 Joel E. Denny <jdenny@clemson.edu>
571
572 POSIX: complain if %prec's token was not defined.
573 * NEWS (2.5): Document.
574 * src/reader.c (grammar_rule_check): Convert warning to
575 complaint.
576 * tests/input.at (%prec's token must be defined): Update.
577
578 2009-12-30 Joel E. Denny <jdenny@clemson.edu>
579
580 POSIX: warn if %prec's token was not defined.
581 Reported by Florian Krohm at
582 <http://lists.gnu.org/archive/html/bug-bison/2009-12/msg00005.html>.
583 * NEWS (2.4.2): Document.
584 * src/reader.c (grammar_rule_check): Implement.
585 (grammar_current_rule_prec_set): Add comments explaining that we
586 here assume a %prec identifier is a token, but we still manage
587 to support POSIX.
588 * tests/input.at (%prec's token must be defined): New test
589 group.
590
591 2009-12-31 Joel E. Denny <jdenny@clemson.edu>
592
593 * HACKING (Release Procedure): Recommend a secure automake.
594
595 2009-12-29 Joel E. Denny <jdenny@clemson.edu>
596
597 portability: `<' and `>' are not always defined on addresses.
598 Specifically, don't sort objects by their memory addresses when
599 they're not allocated in the same array or other object. Though
600 I haven't found a test case where that fails on my platform, C
601 says the behavior is undefined.
602 * src/AnnotationList.c (AnnotationList__insertInto): Remove
603 FIXME. Use new id field of InadequacyList nodes rather than
604 their memory addresses when sorting.
605 (AnnotationList__compute_from_inadequacies): Add
606 inadequacy_list_node_count argument to pass to
607 InadequacyList__new_conflict.
608 * src/AnnotationList.h
609 (AnnotationList__compute_from_inadequacies): Update prototype
610 and documentation for new argument.
611 * src/InadequacyList.c (InadequacyList__new_conflict): Add
612 node_count argument and use it to assign a unique ID.
613 * src/InadequacyList.h (InadequacyListNodeCount): New typedef.
614 (InadequacyList): Add id field.
615 (InadequacyList__new_conflict): Update prototype and
616 documentation for new argument.
617 * src/ielr.c (ielr_compute_annotation_lists): Update
618 AnnotationList__compute_from_inadequacies invocation.
619
620 2009-12-20 Joel E. Denny <jdenny@clemson.edu>
621
622 Fix handling of yychar manipulation in user semantic actions.
623 The problem was that yacc.c didn't always update the yychar
624 translation afterwards. However, other skeletons appear to be
625 fine. glr.c appears to already translate yychar before every
626 use. lalr1.cc does not define yychar and does not document its
627 replacement, yyla, for users. It does provide yyclearin, but
628 that does not manipulate yyla and thus requires no translation
629 update. In lalr1.java, yychar is out of scope during semantic
630 actions.
631 * NEWS (2.5): Document.
632 * data/yacc.c (YYBACKUP): Don't bother translating yychar into
633 yytoken here.
634 (yyparse, yypush_parse): Instead, translate before every use of
635 yytoken, and add comments explaining this approach.
636 * tests/actions.at (Destroying lookahead assigned by semantic
637 action): New test group checking that translation happens before
638 lookahead destructor calls at parser return. Previously,
639 incorrect destructors were called.
640 * tests/conflicts.at (parse.error=verbose and consistent
641 errors): New test group checking that translation happens at
642 syntax error detection before the associated verbose error
643 message and the associated lookahead destructor calls. While
644 the destructor call is fixed by this patch, the verbose error
645 message is currently incorrect due to another bug (see
646 comments in test group), so this is an expected failure for now.
647
648 2009-12-21 Joel E. Denny <jdenny@clemson.edu>
649
650 YYFAIL: warn about uses and remove from lalr1.java.
651 * NEWS (2.5): Document.
652 * data/lalr1.java (parser::YYStack::YYFAIL): Rename to YYERRLAB,
653 and make it private. Update all uses.
654 * src/scan-code.l (SC_RULE_ACTION): Implement warning.
655
656 2009-12-21 Joel E. Denny <jdenny@clemson.edu>
657
658 YYFAIL: deprecate.
659 * NEWS (2.4.2): Document deprecation and the phase-out plan.
660 * data/lalr1.java (parser::YYStack::YYFAIL): Add comment about
661 deprecation.
662 * data/yacc.c (YYFAIL): Likewise, and suppress warnings about
663 YYFAIL from GCC cpp's -Wunused-macros.
664 * doc/bison.texinfo (Java Action Features): Remove YYFAIL
665 documentation.
666 (LocalWords): Remove YYFAIL.
667
668 2009-12-20 Joel E. Denny <jdenny@clemson.edu>
669
670 tests: cleanup.
671 * tests/c++.at (Syntax error discarding no lookahead): Don't
672 ignore stderr. Instead, eliminate remaining warnings.
673
674 2009-12-18 Joel E. Denny <jdenny@clemson.edu>
675
676 lalr1.cc: don't discard non-existent lookahead on syntax error.
677 * data/lalr1.cc (parser::parse): Check yyempty first.
678 * tests/c++.at (Syntax error discarding no lookahead): New test
679 group.
680
681 2009-12-17 Joel E. Denny <jdenny@clemson.edu>
682
683 Code cleanup.
684 * src/symtab.c, src/symtab.h (symbol_class_get_string): Remove
685 function, which is no longer used.
686
687 2009-12-16 Joel E. Denny <jdenny@clemson.edu>
688
689 Add gcc's -Wundef to test suite and fix another warning from it.
690 * NEWS (2.4.2): Update description of -Wundef fix.
691 * configure.ac (WARN_CXXFLAGS_TEST): New substitution.
692 (WARN_CFLAGS_TEST): New substitution.
693 * data/glr.c: Avoid warning about __STRICT_ANSI__.
694 * tests/atlocal.in (CFLAGS): Use WARN_CFLAGS_TEST instead of
695 WARN_CFLAGS.
696 (NO_WERROR_CFLAGS): Likewise.
697 (CXXFLAGS): Use WARN_CXXFLAGS_TEST instead of WARN_CXXFLAGS.
698
699 2009-12-16 Joel E. Denny <jdenny@clemson.edu>
700
701 * data/yacc.c: Reformat m4 a little.
702
703 2009-12-16 Joel E. Denny <jdenny@clemson.edu>
704
705 Document gcc -Wundef fix.
706 * NEWS (2.4.2): Here.
707 * THANKS (Jonathan Nieder): Add.
708
709 2009-12-15 Jonathan Nieder <jrnieder@gmail.com> (tiny change)
710
711 Simplify y.tab.c when location tracking is disabled.
712 * data/yacc.c: Do not check YYLTYPE_IS_TRIVIAL if location
713 tracking is not enabled. Instead, unconditionally define
714 YY_LOCATION_PRINT as a no-op for backward compatibility.
715
716 2009-12-15 Jonathan Nieder <jrnieder@gmail.com> (tiny change)
717
718 Avoid warnings from gcc -Wundef y.tab.c.
719 * data/glr.c: Check if YYENABLE_NLS and YYLTYPE_IS_TRIVIAL are
720 defined before using them.
721 * data/lalr1.cc: Likewise.
722 * data/yacc.c: Likewise.
723
724 2009-12-15 Joel E. Denny <jdenny@clemson.edu>
725
726 autoconf: update to latest for fix of M4 detection.
727 Reported by Eric Blake.
728 * submodules/autoconf: Update.
729
730 2009-12-15 Joel E. Denny <jdenny@clemson.edu>
731
732 portability: use -DGNULIB_POSIXCHECK.
733 Reported by Eric Blake. See discussions at
734 <http://lists.gnu.org/archive/html/bug-bison/2009-09/msg00008.html>
735 and
736 <http://lists.gnu.org/archive/html/bug-gnulib/2009-10/msg00108.html>.
737 * HACKING (Release checks): Suggest -DGNULIB_POSIXCHECK.
738 * bootstrap.conf (gnulib_modules): Add all the printf modules
739 suggested by -DGNULIB_POSIXCHECK. Add realloc-posix as
740 suggested by -DGNULIB_POSIXCHECK for gnulib's own vasnprintf.c.
741 (excluded_files): Remove m4/printf-posix.m4.
742 * tests/atlocal.in (LIBS): As for LDADD in src/local.mk, add
743 lib/libbison.a so gnulib libraries can be linked.
744
745 2009-12-15 Joel E. Denny <jdenny@clemson.edu>
746
747 gnulib: update for fix of fprintf-posix, which we'll use soon.
748 * etc/prefix-gnulib-mk (prefix): Adjust regex for make file
749 targets so that gnulib's new arg-nonnull.h and link-warning.h
750 are matched.
751 * gnulib: Update.
752
753 2009-12-14 Joel E. Denny <jdenny@clemson.edu>
754
755 Enable assertion output and --disable-assert for configure.
756 * bootstrap.conf (gnulib_modules): Add assert module.
757 * src/system.h (aver): Define as assert, and summarize the
758 discussion on this issue.
759
760 2009-12-14 Joel E. Denny <jdenny@clemson.edu>
761
762 Expand GLR acronym in summary of Bison.
763 Based on discussion with Akim Demaille starting at
764 <http://lists.gnu.org/archive/html/bison-patches/2009-04/msg00087.html>.
765 * doc/bison.texinfo (Introduction): Here.
766 * src/getargs.c (usage): Here.
767
768 2009-10-03 Alex Rozenman <rozenman@gmail.com>
769
770 Document named references.
771 * doc/bison.texinfo (Actions): Add new example and xref to
772 Using Named References node.
773 (Using Named References): New node.
774
775 2009-10-16 Joel E. Denny <jdenny@clemson.edu>
776
777 cleanup.
778 * src/Sbitset.c (Sbitset__new_on_obstack): Use Sbitset instead
779 of char*.
780 (Sbitset__isEmpty): Use Sbitset instead of char*.
781 * src/Sbitset.h (Sbitset): Make it a pointer to unsigned char
782 instead of char. This helps to avoid casting errors.
783 (Sbitset__or): Use Sbitset instead of char*.
784
785 2009-10-16 Joel E. Denny <jdenny@clemson.edu>
786
787 portability: don't assume 8-bit bytes.
788 That is, use CHAR_BIT and UCHAR_MAX instead of 8 and 0xff.
789 * src/Sbitset.h (Sbitset__nbytes): Here.
790 (Sbitset__byteAddress): Here.
791 (Sbitset__bit_mask): Here.
792 (Sbitset__last_byte_mask): Here.
793 (Sbitset__ones): Here.
794 (SBITSET__FOR_EACH): Here.
795
796 2009-10-11 Joel E. Denny <jdenny@clemson.edu>
797
798 portability: use va_start and va_end in the same function.
799 * src/complain.c (error_message): Move va_end from here...
800 (ERROR_MESSAGE): ... to here.
801
802 2009-10-08 Joel E. Denny <jdenny@clemson.edu>
803
804 * data/bison.m4: Update comments for rename to muscle-tab.h.
805
806 2009-10-07 Joel E. Denny <jdenny@clemson.edu>
807
808 Minor code cleanup.
809 * src/muscle-tab.c (MUSCLE_USER_NAME_CONVERT): Remove macro and
810 replace all uses with UNIQSTR_CONCAT.
811 * src/uniqstr.c (uniqstr_vsprintf): New function.
812 * src/uniqstr.h (uniqstr_vsprintf): Add prototype.
813 (UNIQSTR_CONCAT, UNIQSTR_GEN_FORMAT, UNIQSTR_GEN_FORMAT_): New
814 macros.
815
816 2009-10-06 Joel E. Denny <jdenny@clemson.edu>
817
818 * TODO (Complaint submessage indentation): New.
819
820 2009-10-04 Joel E. Denny <jdenny@clemson.edu>
821
822 Minor code cleanup.
823 * src/parse-gram.y: Clean up sorting of declarations.
824 Use types to simplify %printer declarations where possible.
825 Provide %printer for BRACKETED_ID and symbol.prec.
826 * src/symtab.c: Whitespace change.
827
828 2009-10-04 Joel E. Denny <jdenny@clemson.edu>
829
830 tests: skip tests of file names that platform does not support.
831 Reported by Michael Raskin at
832 <http://lists.gnu.org/archive/html/bug-bison/2009-09/msg00001.html>.
833 * THANKS (Michael Raskin): Add.
834 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): Fix. Cygwin used
835 to fail at least for file names containing ":" or "\".
836
837 2009-09-23 Joel E. Denny <jdenny@clemson.edu>
838
839 yysyntax_error: avoid duplicate lookahead collection.
840 Except when memory reallocation is required, this change
841 eliminates the need to invoke yysyntax_error twice and thus to
842 repeat the collection of lookaheads. It also prepares for
843 future extensions that will make those repetitions more
844 expensive and that will require additional memory management in
845 yysyntax_error. Finally, it fixes an obscure bug already
846 exercised in the test suite.
847 * data/yacc.c (yysyntax_error): Add arguments for message
848 buffer variables stored in the parser. Instead of size, return
849 status similar to yyparse status but indicating success of
850 message creation. Other than the actual reallocation of the
851 message buffer, import and clean up memory management code
852 from...
853 (yyparse, yypush_parse): ... here.
854 * tests/regression.at (parse.error=verbose overflow): No longer
855 an expected failure.
856
857 2009-09-23 Joel E. Denny <jdenny@clemson.edu>
858
859 yysyntax_error: test memory management more.
860 * tests/atlocal.in (NO_WERROR_CFLAGS): New cpp macro.
861 * tests/regression.at (parse.error=verbose and
862 YYSTACK_USE_ALLOCA): New test group.
863 (parse.error=verbose overflow): New test group that reveals an
864 obscure bug. Expected fail for now.
865
866 2009-10-04 Joel E. Denny <jdenny@clemson.edu>
867
868 benchmarks: use %debug consistently among grammars.
869 * etc/bench.pl.in (generate_grammar_triangular): Do not activate
870 %debug by default. It can affect the timings even if yydebug=0.
871 (generate_grammar_calc): For consistency with other grammars,
872 use YYDEBUG environment variable to set yydebug.
873
874 2009-10-03 Joel E. Denny <jdenny@clemson.edu>
875
876 Remove dead code.
877 * src/symtab.c (symbol_pack): Here because every symbol's number
878 is always defined by this time.
879
880 2009-10-03 Alex Rozenman <rozenman@gmail.com>
881
882 Add additional space after periods in NEWS.
883 * NEWS (2.5): here.
884
885 2009-09-29 Joel E. Denny <jdenny@clemson.edu>
886
887 Use the correct conversion specifier for size_t.
888 Reported by Jim Meyering.
889 * src/Sbitset.h (SBITSET__INDEX__CONVERSION_SPEC): New, "zu"
890 because Sbitset__Index is size_t.
891 * src/Sbitset.c (Sbitset__fprint): Use it instead of %d.
892
893 2009-09-27 Joel E. Denny <jdenny@clemson.edu>
894
895 tests: don't abuse AT_BISON_CHECK.
896 * tests/regression.at (parse-gram.y: LALR = IELR): Move
897 additional shell commands outside of AT_BISON_CHECK.
898
899 2009-09-26 Joel E. Denny <jdenny@clemson.edu>
900
901 tests: check that parse-gram.y's IELR and LALR are identical.
902 * tests/atlocal.in (abs_top_srcdir): New shell variable.
903 * tests/regression.at (parse-gram.y: LALR = IELR): New test
904 group.
905
906 2009-09-19 Alex Rozenman <rozenman@gmail.com>
907
908 Keep sub-messages aligned. Fix strings for translation.
909 * src/location.h (location_print): Add return value.
910 * src/location.c (location_print): Return number of printed
911 characters.
912 * src/complain.h (complain_at_indent, warn_at_indent): Prototype
913 new functions.
914 * src/complain.cpp (indent_ptr): New static variable.
915 (error_message, complain_at_indent, warn_at_indent): Implement
916 the alignment mechanism.
917 * src/scan-code.l (parse_ref, show_sub_messages): Fix strings
918 for translations. Use new alignment mechanism.
919 * tests/named-ref.at: Adjust test-cases.
920 * NEWS (2.5): Add an announcement about named references.
921
922 2009-09-17 Akim Demaille <demaille@gostai.com>
923
924 doc: fixes.
925 * doc/bison.texinfo: here.
926 Reported by Alex Rozenman.
927
928 2009-09-16 Akim Demaille <demaille@gostai.com>
929
930 doc: lalr1.cc and variants.
931 * doc/bison.texinfo (Decl Summary): Document the "lex_symbol" and
932 "variant" %define variables.
933 (C++ Semantic Values): Split into...
934 (C++ Unions, C++ Variants): these.
935 The latter is new.
936 (C++ Parser Interface): Fix type names.
937 Document parser::syntax_error.
938 Document the fact that locations are not mandatory.
939 (C++ Scanner Interface): Split into...
940 (Split Symbols, Complete Symbols): these.
941 The later is new.
942 (Calc++ Parsing Driver): Use variants.
943 Add more comments.
944 Adjust style.
945 (Calc++ Parser): Declare all the tokens, no
946 longer accept raw characters.
947 Remove %union.
948 Adjust types and printers.
949 Remove destructors.
950 (Calc++ Scanner): Use make_<SYMBOL> functions.
951 Use strerror in error message.
952
953 2009-09-16 Akim Demaille <demaille@gostai.com>
954
955 doc: spell checking.
956 * doc/bison.texinfo: here.
957
958 2009-09-16 Akim Demaille <demaille@gostai.com>
959
960 doc: comment changes.
961 * doc/bison.texinfo: Comment changes.
962
963 2009-09-16 Akim Demaille <demaille@gostai.com>
964
965 lalr1.cc: factor the yytranslate_ invocation in make_SYMBOLS.
966 * data/c++.m4, data/lalr1.cc (parser::symbol_type): Change the
967 constructor to take a token_type instead of the (internal) symbol
968 number.
969 Call yytranslate_.
970 * data/variant.hh (b4_symbol_constructor_define_): Therefore,
971 don't call yytranslate_ here.
972
973 2009-09-16 Akim Demaille <demaille@gostai.com>
974
975 TODO: statistics.
976 * TODO (Figures): New.
977
978 2009-09-13 Joel E. Denny <jdenny@clemson.edu>
979
980 tests: clean up push.at test group titles.
981 * tests/push.at: Remove "Push Parsing: " from test group titles
982 because these are already under the banner "Push Parsing Tests".
983
984 2009-09-12 Alex Rozenman <rozenman@gmail.com>
985
986 Provide an additional sub-message for clarity.
987 Add "symbol not found in production" error message when
988 an "invalid reference" is detected in named references
989 resolution.
990 * src/scan-code.l: Update "invalid reference" case.
991 * tests/named-ref.at: Adjust test-cases.
992
993 2009-09-10 Joel E. Denny <jdenny@clemson.edu>
994
995 Clean up yacc.c a little.
996 * data/yacc.c: Clean up M4 for readability, and make output
997 whitespace more consistent. For the main parse function
998 comment, instead of saying "yyparse or yypush_parse", say either
999 "yyparse" or "yypush_parse" depending on which it actually is.
1000
1001 2009-09-10 Joel E. Denny <jdenny@clemson.edu>
1002
1003 Fix --enable-gcc-warnings.
1004 * src/parse-gram.y (%printer <param>): Handle param_none.
1005
1006 2009-09-09 Akim Demaille <demaille@gostai.com>
1007
1008 lalr1.cc: syntax_error as exceptions.
1009 It is common to use sort of factories in the user actions. These
1010 factories may check some "syntactic" constraints that are not
1011 enforced by the grammar itself. This is possible using YYERROR
1012 within the action itself. Provide the user with a means to throw
1013 a syntax_error exception.
1014
1015 * data/c++.m4 (b4_public_types_declare, b4_public_types_define):
1016 Declare and define yy::parser::syntax_error.
1017 * data/lalr1.cc: Include stdexcept.
1018 (yy::parser::parse): Wrap the user action within a try/catch.
1019 * data/glr.cc: Include stdexcept.
1020
1021 2009-09-09 Akim Demaille <demaille@gostai.com>
1022
1023 lalr1.cc: add missing "inline".
1024 * data/c++.m4 (b4_public_types_define): Add missing inline to
1025 implementations provided in headers.
1026
1027 2009-09-09 Akim Demaille <demaille@gostai.com>
1028
1029 %param: documentation.
1030 * NEWS (2.6): Document %param, %lex-param, and %parse-param
1031 changes.
1032 * doc/bison.texinfo: Document that %lex-param and %parse-param
1033 are n-ary.
1034 Changes some examples to demonstrate it.
1035 (Calc++ Parser): Use %param.
1036
1037 2009-09-09 Akim Demaille <demaille@gostai.com>
1038
1039 Regen.
1040
1041 2009-09-09 Akim Demaille <demaille@gostai.com>
1042
1043 style changes.
1044 * src/parse-gram.y (add_param): Scope changes.
1045
1046 2009-09-09 Akim Demaille <demaille@gostai.com>
1047
1048 %parse: support several arguments.
1049 * src/parse-gram.y (current_param): New.
1050 (param_type): Add param_none.
1051 (params): New nonterminal.
1052 Use it.
1053
1054 2009-09-09 Akim Demaille <demaille@gostai.com>
1055
1056 Regen.
1057
1058 2009-09-09 Akim Demaille <demaille@gostai.com>
1059
1060 %param.
1061 Provide a means to factor lex-param and parse-param common
1062 declarations.
1063
1064 * src/parse-gram.y (param_type): New.
1065 Define a %printer for it.
1066 (add_param): Use it.
1067 (%parse-param, %lex-param): Merge into...
1068 (%parse): this new token.
1069 Adjust the grammar to use it.
1070 * src/scan-gram.l (RETURN_VALUE): New.
1071 (RETURN_PERCENT_FLAG): Use it.
1072 (RETURN_PERCENT_PARAM): New.
1073 Use it to support %parse-param, %lex-param and %param.
1074
1075 2009-09-03 Joel E. Denny <jdenny@clemson.edu>
1076
1077 Use aver not assert.
1078 * src/output.c: Don't include assert.h.
1079 (output_skeleton): Use aver not assert.
1080 * src/system.h (aver): In documentation of why, add links to
1081 Paul Eggert's explanations in the mailing lists.
1082
1083 2009-09-05 Alex Rozenman <rozenman@gmail.com>
1084
1085 Use "Unresolved reference" error message when no symbols were found
1086 in a symbolic reference resolution. Remove .expr and -expr from
1087 the shown reference when the reference is unresolved.
1088 * src/scan-code.l: Change the error message, adjust location columns,
1089 rename variable "exact_mode" to "explicit_bracketing".
1090 * tests/named-ref.at: Adjust existing tests and add a new one.
1091
1092 2009-09-04 Akim Demaille <demaille@gostai.com>
1093
1094 Adjust synclines in src/parse-gram.[ch].
1095 * tests/bison.in: Do some magic (including working around issues
1096 with ylwrap) when this wrapper is used to compile
1097 src/parse-gram.y.
1098
1099 2009-09-03 Joel E. Denny <jdenny@clemson.edu>
1100
1101 Complain about unused %define variables and %code qualifiers.
1102 * NEWS (2.5): Document.
1103 * data/bison.m4 (b4_check_user_names): Complain instead of warn.
1104 * doc/bison.texinfo (Decl Summary): Document complaint, and
1105 improve %define documentation a little otherwise.
1106 * tests/input.at (Reject unused %code qualifiers): Update.
1107 (%define errors): Update.
1108 (%define, --define, --force-define): Update.
1109 (%define backward compatibility): Update.
1110 (Unused %define api.pure): Update.
1111 * tests/push.at (Push Parsing: Unsupported Skeletons): Update.
1112
1113 2009-09-03 Joel E. Denny <jdenny@clemson.edu>
1114
1115 Don't suppress warnings about unused parse.error.
1116 * data/bison.m4 (b4_error_verbose_flag): Don't examine value of
1117 %define variable parse.error unless b4_error_verbose_flag is
1118 actually expanded in a skeleton.
1119
1120 2009-09-03 Akim Demaille <demaille@gostai.com>
1121
1122 * NEWS (2.4.2): Add "Internationalization" item.
1123
1124 2009-09-03 Akim Demaille <demaille@gostai.com>
1125
1126 bootstrap: fix/improve find_tool.
1127 * bootstrap (find_tool): Improve error messages.
1128 Fix typo about find_tool_names.
1129
1130 2009-08-29 Joel E. Denny <jdenny@clemson.edu>
1131
1132 Fix gcc 3.4.4 shadowing warning reported by Eric Blake.
1133 See
1134 <http://lists.gnu.org/archive/html/bison-patches/2009-08/msg00093.html>.
1135 * src/scan-code.h (code_props_rule_action_init): Rename
1136 named_ref arg to name so it doesn't shadow named_ref type. This
1137 makes it consistent with the function definition in scan-code.l
1138 anyway.
1139
1140 2009-08-28 Joel E. Denny <jdenny@clemson.edu>
1141
1142 %define: accept unquoted values.
1143 * NEWS (2.5): Group all %define changes together, and document
1144 this one. Remove quotes in IELR and canonical LR entry.
1145 * doc/bison.texinfo: Remove quotes in most examples throughout.
1146 (Decl Summary): Update %define documentation.
1147 (Table of Symbols): Likewise.
1148 * src/ielr.c (LrType): Update documentation.
1149 * src/parse-gram.y (content.opt): Add production for ID.
1150 * tests/actions.at: Remove quotes in most tests.
1151 * tests/calc.at: Likewise.
1152 * tests/existing.at: Likewise.
1153 * tests/input.at: Likewise.
1154 * tests/local.at: Likewise.
1155 * tests/push.at: Likewise.
1156 * tests/reduce.at: Likewise.
1157 * tests/torture.at: Likewise.
1158
1159 2009-08-28 Joel E. Denny <jdenny@clemson.edu>
1160
1161 %define lr.type: make values lowercase IDs.
1162 That is, "LALR" => "lalr", "IELR" => "ielr", and
1163 "canonical LR" => "canonical-lr".
1164 * NEWS (2.5): Update documentation.
1165 * doc/bison.texinfo (Decl Summary): Likewise.
1166 * src/ielr.c (ielr): Use new values.
1167 * src/ielr.h (ielr): Update documentation.
1168 * src/reader.c (prepare_percent_define_front_end_variables): Use
1169 and validate new values.
1170 * tests/existing.at (AT_TEST_EXISTING_GRAMMAR): Update test
1171 grammars.
1172 * tests/reduce.at (AT_TEST_LR_TYPE): Likewise.
1173
1174 2009-08-27 Eric Blake <ebb9@byu.net>
1175
1176 scan-gram: avoid portability trap with ctype usage.
1177 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>):
1178 Avoid compiler warning.
1179
1180 2009-08-27 Joel E. Denny <jdenny@clemson.edu>
1181
1182 tests: use perl for printing special sequences to files.
1183 And skip tests if perl is not available. This is better than
1184 playing tricks with shell portability. Suggested by Akim
1185 Demaille.
1186 * tests/input.at (Bad character literals): Use it here for
1187 omitting final newlines.
1188 (Bad escapes in literals): Use it here for special characters.
1189
1190 2009-08-26 Joel E. Denny <jdenny@clemson.edu>
1191
1192 tests: show a use of %define lr.default-reductions "consistent"
1193 * tests/conflicts.at (%nonassoc and eof): Extend to test that it
1194 prevents the omission of expected tokens for %error-verbose.
1195
1196 2009-08-26 Akim Demaille <demaille@gostai.com>
1197
1198 tests: portability fix.
1199 * tests/input.at (Bad escapes in literals): Don't expect "echo
1200 '\0'" to output \ then 0.
1201
1202 2009-08-26 Joel E. Denny <jdenny@clemson.edu>
1203
1204 Actually handle the yytable zero value correctly this time.
1205 * data/bison.m4 (b4_integral_parser_tables_map): Don't mention
1206 zero values in the YYTABLE comments.
1207 * data/glr.c (yytable_value_is_error): Don't check for zero
1208 value.
1209 * data/lalr1.cc (yy_table_value_is_error_): Likewise.
1210 * data/yacc.c (yytable_value_is_error): Likewise.
1211 * data/lalr1.java (yy_table_value_is_error_): Likewise.
1212 (yysyntax_error): Fix typo in code: use yytable_ not yycheck_.
1213 * src/tables.h: In header comments, explain why it's useless to
1214 check for a zero value in yytable.
1215
1216 2009-08-25 Joel E. Denny <jdenny@clemson.edu>
1217
1218 More fixes related to last two patches.
1219 * data/bison.m4 (b4_integral_parser_tables_map): Fix YYTABLE
1220 comments: zero indicates syntax error not default action.
1221 * data/c.m4 (b4_table_value_equals): Comment that YYID must be
1222 defined.
1223 * data/glr.c (yyis_pact_ninf): Rename to...
1224 (yypact_value_is_default): ... this.
1225 (yyisDefaultedState): Update for rename.
1226 (yyis_table_ninf): Rename to...
1227 (yytable_value_is_error): ... this, and check for value zero
1228 besides just YYTABLE_NINF.
1229 (yygetLRActions): Check for default value from yypact. It
1230 appears that this check is always performed before this function
1231 is invoked, and so adding the check here is probably redundant.
1232 However, the code may evolve after this subtlety is forgotten.
1233 Also, update for rename to yytable_value_is_error. Because that
1234 macro now checks for zero, a different but equivalent branch of
1235 the if-then-else here is evaluated.
1236 (yyreportSyntaxError): Update for rename to
1237 yytable_value_is_error. The zero condition was mishandled
1238 before.
1239 (yyrecoverSyntaxError): Update for renames. No behavioral
1240 changes.
1241 * data/lalr1.cc, data/lalr1.java (yy_pact_value_is_default_):
1242 New function.
1243 (yy_table_value_is_error_): New function.
1244 (parse): Use new functions where possible. No behavioral
1245 changes.
1246 (yysyntax_error_, yysyntax_error): Use yy_table_value_is_error_.
1247 The zero condition was mishandled before.
1248 * data/yacc.c (yyis_pact_ninf): Rename to...
1249 (yypact_value_is_default): ... this.
1250 (yyis_table_ninf): Rename to...
1251 (yytable_value_is_error): ... this, and check for value zero
1252 besides just YYTABLE_NINF.
1253 (yysyntax_error): Update for rename to yytable_value_is_error.
1254 The zero condition was mishandled before.
1255 (yyparse): Update for renames. No behavioral changes.
1256 * src/tables.h: Improve comments about yypact, yytable, etc.
1257 more. Most importantly, say yytable value of zero means syntax
1258 error not default action.
1259
1260 2009-08-25 Joel E. Denny <jdenny@clemson.edu>
1261
1262 Fix %error-verbose for conflicts resolved by %nonassoc.
1263 * NEWS (2.5): Document.
1264 * data/glr.c (yyreportSyntaxError): Fix this by checking
1265 yyis_table_ninf.
1266 * data/yacc.c (yysyntax_error): Likewise.
1267 * data/lalr1.cc (yysyntax_error_): Fix this by checking
1268 yytable_ninf_.
1269 * data/lalr1.java (yysyntax_error): Likewise.
1270 * tests/conflicts.at (%nonassoc and eof): Update expected output
1271 and remove FIXME.
1272
1273 2009-08-25 Joel E. Denny <jdenny@clemson.edu>
1274
1275 Some code and documentation improvements.
1276 * data/c.m4 (b4_table_value_equals): New macro to capture
1277 some repeated code.
1278 * data/glr.c (yyis_pact_ninf): Use it here.
1279 (yyis_table_ninf): Likewise.
1280 (yyreportSyntaxError): Improve internal comments.
1281 * data/yacc.c (yyis_pact_ninf): New macro copied from glr.c.
1282 Use it everywhere possible.
1283 (yyis_table_ninf): Likewise.
1284 (yysyntax_error): Improve internal comments.
1285 * data/lalr1.cc (yysyntax_error_): Likewise.
1286 * data/lalr1.java (yysyntax_error): Likewise.
1287 * src/tables.h: Improve comments about yypact, yytable, etc.
1288
1289 2009-08-21 Joel E. Denny <jdenny@clemson.edu>
1290
1291 Use locale when quoting.
1292 * src/scan-gram.l (SC_ESCAPED_STRING, SC_ESCAPED_CHARACTER): Use
1293 quote rather than implementing quoting here.
1294
1295 2009-08-20 Eric Blake <ebb9@byu.net>
1296
1297 Make previous patch more robust.
1298 * src/output.c (ARRAY_CARDINALITY): New macro, copied from
1299 argmatch.h.
1300 (output_skeleton): Use it.
1301 Suggested by Akim Demaille.
1302
1303 Import latest m4/m4.m4.
1304 * submodules/autoconf: Update to autoconf 2.64.
1305 * configure.ac (M4_GNU_OPTION): New define.
1306 * src/output.c (output_skeleton): Use it to resolve FIXME.
1307 * NEWS: Mention this.
1308
1309 2009-08-19 Joel E. Denny <jdenny@clemson.edu>
1310
1311 Fix complaints about escape sequences.
1312 Discussed starting at
1313 <http://lists.gnu.org/archive/html/bison-patches/2009-08/msg00036.html>.
1314 * src/scan-gram.l (SC_ESCAPED_STRING, SC_ESCAPED_CHARACTER):
1315 For a \0 and similar escape sequences meaning the null
1316 character, report an invalid escape sequence instead of an
1317 invalid null character because the latter does not actually
1318 appear in the user's input.
1319 In all escape sequence complaints, don't escape the initial
1320 backslash, and don't quote when the sequence appears at the end
1321 of the complaint line unless there's whitespace that quotearg
1322 won't escape.
1323 Consistently say "invalid" not "unrecognized".
1324 Consistently prefer "empty character literal" over "extra
1325 characters in character literal" warning for invalid escape
1326 sequences; that is, consistently discard those sequences.
1327 * tests/input.at (Bad escapes in literals): New.
1328
1329 2009-08-19 Akim Demaille <demaille@gostai.com>
1330
1331 doc: fixes.
1332 * doc/bison.texinfo: Fix minor Texinfo errors.
1333
1334 2009-08-19 Akim Demaille <demaille@gostai.com>
1335
1336 tests: distcc compliance.
1337 * tests/synclines.at (AT_SYNCLINES_COMPILE): Discard distcc's
1338 error messages from the output.
1339
1340 2009-08-19 Akim Demaille <demaille@gostai.com>
1341
1342 variables: simplify the upgrade of namespace into api.namespace.
1343
1344 This patch simplifies "variables: rename namespace as
1345 api.namespace", commit 67501061076ba46355cfd9f9361c7eed861b389c.
1346 Suggested by Joel E. Denny in
1347 http://lists.gnu.org/archive/html/bison-patches/2009-07/msg00006.html
1348
1349 * src/muscle-tab.c (muscle_percent_variable_update): New.
1350 (muscle_percent_define_insert): Use it in replacement of the
1351 previous tr invocation.
1352 Remove variable_tr, no longer needed.
1353 * data/bison.m4 (b4_percent_define_copy_, b4_percent_define_copy):
1354 Remove.
1355 * data/c++.m4: No longer handle namespace -> api.namespace.
1356 * tests/input.at (%define backward compatibility): Check that
1357 namespace is treated as api.namespace.
1358
1359 2009-08-19 Akim Demaille <demaille@gostai.com>
1360
1361 doc: %initial-action to initialize yylloc.
1362 Reported by Bill Allombert.
1363 * doc/bison.texinfo: Set fill-column to 76.
1364 (Location Type): Document the use of %initial-action to initialize
1365 yylloc.
1366
1367 2009-08-19 Akim Demaille <demaille@gostai.com>
1368
1369 lalr1.cc: use state_type.
1370 * data/lalr1.cc (yysyntax_error_): Use state_type.
1371 Move argument names into yy*.
1372
1373 2009-08-19 Akim Demaille <demaille@gostai.com>
1374
1375 lalr1.cc: get rid of yyparse's yystate.
1376 yystate and yystack_[0].state are equal, keep only the latter.
1377 The former was also used as a temporary variable to compute the
1378 post-reduction state. Move this computation into an auxiliary
1379 function.
1380
1381 * data/glr.c (yyLRgotoState): Fuse variable definition and first
1382 assignment.
1383 * data/lalr1.cc (yy_lr_goto_state_): New.
1384 (yyparse): Use it.
1385 Replace remaining uses of yystate by yystate_[0].state.
1386 Remove the former.
1387
1388 2009-08-19 Akim Demaille <demaille@gostai.com>
1389
1390 lalr1.cc: destroy $$ when YYERROR is called.
1391 * data/lalr1.cc (yyreduce): Compute the resulting state before
1392 running the user action so that yylhs is a valid symbol.
1393 (yyerrorlab): Since yylhs is complete (it knows its type), we can
1394 simply call yy_destroy_ to destroy $$ on YYERROR invocations.
1395 * tests/c++.at (AT_CHECK_VARIANTS): Test YYERROR with variants.
1396
1397 2009-08-18 Joel E. Denny <jdenny@clemson.edu>
1398
1399 maint: update for gnulib's recent update-copyright changes
1400 * gnulib: Update.
1401 * .x-update-copyright (COPYING): Add as it's no longer implied
1402 when .x-update-copyright is present.
1403 * cfg.mk (update-copyright-local): Remove, now ignored.
1404 (update-copyright): Declare update-b4-copyright as a dependency.
1405
1406 2009-08-17 Akim Demaille <demaille@gostai.com>
1407
1408 build: require gettext 0.17.
1409
1410 Suggested by Bruno Haible.
1411 http://lists.gnu.org/archive/html/bug-bison/2009-08/msg00009.html
1412 * configure.ac: require gettext 0.17 to ensure compatibility with
1413 gnulib.
1414
1415 2009-08-17 Akim Demaille <demaille@gostai.com>
1416
1417 build: lower gettext requirements.
1418
1419 Bison was uselessly requiring the formatstring macros from
1420 gettext, which resulted in mo files not being installed on systems
1421 that perfectly supported Bison mo files. Lower the requirement.
1422 http://lists.gnu.org/archive/html/bug-bison/2009-08/msg00006.html
1423
1424 * configure.ac: Require need-ngettext instead of
1425 need-formatstring-macros.
1426 Reported by Martin Jabocs.
1427 Suggested by Bruno Haible.
1428 * INSTALL: Restructure.
1429 (Internationalization): New.
1430
1431 2009-08-14 Joel E. Denny <jdenny@clemson.edu>
1432
1433 maint: fix use of copyright year intervals.
1434 * gnulib: Update.
1435 * bootstrap.conf (gnulib_modules): Update getopt to getopt-gnu
1436 as now recommended in gnulib/NEWS.
1437 * build-aux/update-b4-copyright: Fix.
1438 * cfg.mk (update-copyright-env): Configure update-copyright.
1439
1440 2009-08-13 Joel E. Denny <jdenny@clemson.edu>
1441
1442 Make it easier to write deterministic tests.
1443 Continues Akim's work from his 2009-06-10 commits.
1444 * src/reader.c (check_and_convert_grammar): Don't add any
1445 symbols after the first symbols_do invocation.
1446 * src/symtab.c (symbols_sorted): New static global.
1447 (user_token_number_redeclaration): Update comments.
1448 (symbol_from_uniqstr): If a new symbol is being created, assert
1449 that symbols_sorted hasn't been allocated yet.
1450 (symbols_free): Free symbols_sorted.
1451 (symbols_cmp, symbols_cmp_qsort): New functions.
1452 (symbols_do): Sort symbol_table into symbols_sorted on first
1453 invocation.
1454 * tests/input.at (Numbered tokens): Recombine tests now that the
1455 output should be deterministic across multiple numbers.
1456
1457 2009-08-12 Akim Demaille <demaille@gostai.com>
1458
1459 tests: GCC 4.5 compliance.
1460 * tests/synclines.at (AT_SYNCLINES_COMPILE): Adjust to GCC 4.5's
1461 messages about #error.
1462
1463 2009-08-12 Akim Demaille <demaille@gostai.com>
1464
1465 build: fix the generation of the documentation.
1466 Some of our targets use "bison --help", but they can't depend on
1467 "bison" itself (to avoid additional requirements on the user), so
1468 they used to call "make src/bison" in the commands. Then
1469 concurrent builds may fail: one make might be aiming one of its
1470 jobs at compiling src/bison, and another job at generating the man
1471 page. If the latter is faster than the former, then we have two
1472 makes that concurrently try to compile src/bison.
1473
1474 This might also be a more convincing explanation for the failure
1475 described in the patch "build: fix paths".
1476
1477 * Makefile.am (SUFFIXES): Initialize.
1478 * build-aux/move-if-change: New, symlink to gnulib's.
1479 * build-aux/local.mk: Ship it.
1480 * doc/common.x: Remove, merged into...
1481 * doc/bison.x: here.
1482 * doc/local.mk (doc/bison.help): New.
1483 ($(CROSS_OPTIONS_TEXI)): Depend on it.
1484 Use src/bison.
1485 (.x.1): Replace with...
1486 (doc/bison.1): this explicit, simpler, target.
1487 (common_dep): Remove, inlined where appropriate.
1488 (SUFFIXES, PREPATH): Remove, unused.
1489
1490 2009-08-12 Akim Demaille <demaille@gostai.com>
1491
1492 gnulib: improve prefixing.
1493 * configure.ac (gl_PREFIXED_LIBOBJS): Don't rename it, rather,
1494 change the value of...
1495 (gl_LIBOBJS): this.
1496 Adjust more variables.
1497 * etc/prefix-gnulib-mk (prefix_assignment): Don't rename
1498 gl_LIBOBJS.
1499 (prefix): Also transform rules whose targets have slashes.
1500 Use $prefix liberally.
1501 Map @MKDIR_P@ to $(MKDIR_P).
1502 Prefix directories that are mkdir'd.
1503
1504 2009-08-12 Akim Demaille <demaille@gostai.com>
1505
1506 build: fix paths.
1507 When using $(top_builddir) inconsistently, Make (including GNU
1508 Make) is sometimes confused. As a result it may want to build
1509 lib/libbison.la and $(top_builddir)/lib/libbison.la (the same
1510 file, different names) concurrently, which, amusingly enough,
1511 might end with:
1512
1513 ranlib lib/libbison.a
1514 ranlib lib/libbison.a
1515 make[2]: *** [lib/libbison.a] Segmentation fault
1516
1517 on OS X.
1518
1519 * doc/local.mk, src/local.mk: Do not use $(top_builddir) when not
1520 needed.
1521
1522 2009-08-12 Akim Demaille <demaille@gostai.com>
1523
1524 distcheck: fix.
1525
1526 * examples/calc++/Makefile.am: (EXTRA_DIST): Ship calc.stamp.
1527
1528 2009-08-10 Joel E. Denny <jdenny@clemson.edu>
1529
1530 * tests/local.mk (TESTSUITE_AT): Add named-refs.at.
1531
1532 2009-08-10 Joel E. Denny <jdenny@clemson.edu>
1533
1534 Miscellaneous code readability improvements.
1535
1536 * src/reader.c (reader): Move %define front-end variable
1537 defaults and checking into...
1538 (prepare_percent_define_front_end_variables): ... this new
1539 function.
1540
1541 * src/scan-gram.l (INITIAL): For consistency with string
1542 literals, don't store open quote on character literal. It's
1543 discarded before returning anyway.
1544 (SC_ESCAPED_CHARACTER): Similarly, don't store close quote.
1545 Make length test more readable, and make the character stored
1546 for an empty literal more obvious while consistent with the
1547 previous behavior.
1548
1549 * src/symtab.c, src/symtab.h: Rename USER_NUMBER_ALIAS to
1550 USER_NUMBER_HAS_STRING_ALIAS throughout.
1551 * src/symtab.c (symbol_make_alias): Remove comment from symtab.c
1552 that is repeated in symtab.h. Improve argument names to make it
1553 clear which side of the symbol-string alias pair is which.
1554 (symbol_check_alias_consistency): Improve local variable names
1555 for the same purpose.
1556 * src/symtab.h (struct symbol): Make comments about aliases
1557 clearer.
1558 (symbol_make_alias): Improve comments and argument name.
1559 * src/output.c (token_definitions_output): Update for rename to
1560 USER_NUMBER_HAS_STRING_ALIAS and improve comments about aliases.
1561
1562 2009-08-08 Alex Rozenman <rozenman@gmail.com>
1563
1564 Convert "misleading reference" messages to warnings.
1565 * src/scan-code.l: New function 'show_sub_messages', more
1566 factoring.
1567 * tests/named-ref.at: Adjust tests.
1568
1569 2009-08-06 Joel E. Denny <jdenny@clemson.edu>
1570
1571 maint: run "make update-copyright"
1572
1573 2009-08-06 Joel E. Denny <jdenny@clemson.edu>
1574
1575 maint: make update-b4-copyright easier to use
1576 * build-aux/update-b4-copyright: In warnings, report line
1577 numbers rather than character positions.
1578 * cfg.mk (update-copyright-local): Set to update-b4-copyright so
1579 that update-copyright runs it.
1580 * gnulib: Update.
1581
1582 2009-08-05 Joel E. Denny <jdenny@clemson.edu>
1583
1584 maint: clean up update-b4-copyright code
1585 * build-aux/update-b4-copyright: Do not accept 2-digit
1586 UPDATE_COPYRIGHT_YEAR, which was not handled correctly.
1587 Don't accept a `[' in a b4_copyright argument.
1588 Format code more consistently.
1589 Don't assume b4*copyright never occurs.
1590
1591 2009-08-04 Joel E. Denny <jdenny@clemson.edu>
1592
1593 maint: automate b4_copyright updates.
1594 * Makefile.am (update-b4-copyright): New target rule.
1595 * build-aux/local.mk (EXTRA_DIST): Add update-b4-copyright.
1596 * build-aux/update-b4-copyright: New.
1597 * data/yacc.c: Remove stray characters around b4_copyright
1598 invocations.
1599
1600 2009-08-04 Joel E. Denny <jdenny@clemson.edu>
1601
1602 maint: automate annual package-wide copyright-year update.
1603 * .x-update-copyright: New.
1604 * Makefile.am (EXTRA_DIST): Remove maint.mk.
1605 * bootstrap.conf (gnulib_modules): Add maintainer-makefile and
1606 update-copyright. Remove gnumakefile, which is implied by
1607 maintainer-makefile.
1608 * cfg.mk (bootstrap-tools): Copy from old maint.mk.
1609 * gnulib: Update.
1610 * maint.mk: Remove, now copied from gnulib.
1611 * examples/extexi: Add missing "(C)" in copyright statement so
1612 update-copyright can recognize it.
1613 * src/LR0.h: Likewise.
1614 * src/print.h: Likewise.
1615 * src/print_graph.h: Likewise.
1616 * src/gram.c: Add missing comma in copyright statement.
1617 * src/gram.h: Likewise.
1618
1619 2009-08-04 Joel E. Denny <jdenny@clemson.edu>
1620
1621 Fix "make distcheck".
1622 * examples/calc++/Makefile.am: Say $(srcdir)/calc.stamp instead
1623 of just calc.stamp.
1624
1625 2009-08-01 Joel E. Denny <jdenny@clemson.edu>
1626
1627 Pacify "gcc -Wunused" for the input function from Flex.
1628 Reported by Alex Rozenman. This warning shows up with gcc-4.3.0
1629 and later.
1630 * src/scan-code.l: Add "%option noinput", which I cannot find in
1631 the Flex manual, but which Flex has supported since at least as
1632 far back as 2.5.4. However, if any of our developers still use
1633 Flex 2.5.4, they'll need to stop configuring with
1634 --enable-gcc-warnings because "%option noinput" didn't work
1635 correctly until Flex 2.5.6.
1636 * src/scan-gram.l: Likewise.
1637 * src/scan-skel.l: Likewise.
1638
1639 2009-07-31 Alex Rozenman <rozenman@gmail.com>
1640
1641 Fix --enable-gcc-warnings problems.
1642 * src/reader.c: Adjust variable names.
1643 * src/scan-code.l: Fix prototypes and adjust names.
1644 * src/named-ref.c: Remove redundant "if".
1645
1646 2009-07-29 Joel E. Denny <jdenny@ces.clemson.edu>
1647
1648 Fix a --enable-gcc-warnings problem.
1649 * src/scan-gram.l (SC_ESCAPED_CHARACTER): Actually use length
1650 variable.
1651
1652 2009-07-24 Joel E. Denny <jdenny@ces.clemson.edu>
1653
1654 Warn about character literals not of length one.
1655 * NEWS (2.5): Document.
1656 * src/scan-gram.l (INITIAL): Remove comment that we don't check
1657 the length.
1658 (SC_ESCAPED_CHARACTER): Warn if length is wrong.
1659 * tests/input.at (Bad character literals): New test group.
1660
1661 2009-07-24 Alex Rozenman <rozenman@gmail.com>
1662
1663 Fix some memory leaks.
1664 * src/named-ref.c: Add a pointer check (named_ref_free).
1665 * src/scan-code.l: New function (variant_table_free). Called in
1666 code_scanner_free.
1667 * src/symlist.c: Call to named_ref_free (symbol_list_free).
1668
1669 2009-07-24 Joel E. Denny <jdenny@ces.clemson.edu>
1670
1671 * src/lalr.c (state_lookahead_tokens_count): Correct comment.
1672
1673 2009-07-22 Joel E. Denny <jdenny@ces.clemson.edu>
1674
1675 Some M4 cleanup in the testsuite.
1676 Suggested by Eric Blake at
1677 <http://lists.gnu.org/archive/html/bison-patches/2009-04/msg00083.html>.
1678 * tests/existing.at (_AT_TEST_EXISTING_GRAMMAR): Do not
1679 complicate the code by distinguishing between a missing value
1680 and an empty string value for an optional argument. This fix is
1681 allowed by the similar fix in AT_TEST_TABLES_AND_PARSE below.
1682 * tests/local.at (_AT_TEST_TABLES_AND_PARSE): Merge into...
1683 (AT_TEST_TABLES_AND_PARSE): ... this now that the special
1684 arguments are not needed because of the following changes.
1685 Fix stale comments.
1686 Bison developers should use GNU M4 and should not use
1687 POSIXLY_CORRECT when building the test suite, so do not
1688 complicate the code by avoiding $10 and above.
1689 Do not quote an empty string value for an optional argument, and
1690 do not distinguish between a missing value and an empty string
1691 value.
1692
1693 2009-07-15 Joel E. Denny <jdenny@ces.clemson.edu>
1694
1695 Revert unnecessary column realignment in --help output.
1696 Reported by Akim Demaille at
1697 <http://lists.gnu.org/archive/html/bison-patches/2009-06/msg00010.html>.
1698 * src/getargs.c (usage): Here.
1699
1700 2009-07-04 Alex Rozenman <rozenman@gmail.com>
1701
1702 Alphabetical order in src/local.mk.
1703 * src/local.mk: Adjust.
1704
1705 2009-07-04 Alex Rozenman <rozenman@gmail.com>
1706
1707 Style changes and factoring.
1708 * src/named-ref.h: Add comments.
1709 * src/parse-gram.y: Readability and style changes.
1710 * src/reader.c: Factoring: assign_named_ref function.
1711 * src/scan-code.l: Factoring and style changes. Rename
1712 parse_named_ref to parse_ref. Use "c-ctype.h" from gnulib.
1713 Use "unsigned" type for variant index. Improve readablity.
1714 * src/scan-gram.l: Change error messages and add comments.
1715 * src/symlist.h: symbol_list_null: New function decl.
1716 * src/symlist.c: symbol_list_null: Implement here.
1717 * tests/named-refs.at: Adjust for new error messages.
1718
1719 2009-06-29 Eric Blake <ebb9@byu.net>
1720
1721 scan-code: avoid compiler warnings
1722 * src/scan-code.l (parse_named_ref): Use correct specifiers.
1723
1724 2009-06-29 Akim Demaille <demaille@gostai.com>
1725
1726 build: avoid concurrent extraction of calc++.
1727 * examples/calc++/Makefile.am (calc.stamp): New.
1728 Depend on it to create the sources of calc++ so that concurrent
1729 builds don't launch several "extexi" in parallel.
1730 Not only this is inefficient, this also builds incorrect sources
1731 with several extractions mixed together.
1732
1733 2009-06-29 Akim Demaille <demaille@gostai.com>
1734
1735 parse.error: fix.
1736 * data/bison.m4: Move code related to specific variables after the
1737 definition of the variable-maintaining macros so that we don't
1738 "invoke" b4_percent_define_check_values before it is defined.
1739
1740 2009-06-29 Akim Demaille <demaille@gostai.com>
1741
1742 variables: parse.error
1743
1744 Implement, document, and test the replacement of %error-verbose
1745 by %define parse.error "verbose".
1746 * data/bison.m4 (b4_error_verbose_if): Reimplement to track the
1747 values of the parse.error variable.
1748 Make "simple" its default value.
1749 Check the valid values.
1750 * src/parse-gram.y: Use %define parse.error.
1751 (PERCENT_ERROR_VERBOSE): New token.
1752 Support it.
1753 * src/scan-gram.l: Support %error-verbose.
1754
1755 * doc/bison.texinfo (Decl Summary): Replace the documentation of
1756 %define error-verbose by that of %define parse.error.
1757 * NEWS: Document it.
1758
1759 * tests/actions.at, tests/calc.at: Use parse.error instead of
1760 %error-verbose.
1761
1762 2009-06-27 Alex Rozenman <rozenman@gmail.com>
1763
1764 Implement support for named symbol references.
1765 * src/parse-gram.y: Add new syntax (named_ref.opt).
1766 * src/reader.c: Store named refs in symbol lists.
1767 * src/reader.h: New argument for symbol_append and
1768 action_append functions.
1769 * src/scan-code.h: Add new field (named_ref) into
1770 code_props data structure. Keeps named ref of midrule
1771 actions.
1772 * src/scan-code.l: Support for named refs in semantic
1773 action code. New function 'parse_named_ref'.
1774 * src/scan-gram.l: Support bracketed id.
1775 * src/symlist.c: Store named refs in symbol lists.
1776 * src/symlist.h: New field in symbol list: named_ref.
1777 * src/named-ref.h: New file, a struct for named_ref.
1778 * src/named-ref.cp: New file, named_ref_new function.
1779 * src/local.mk: Add two new files.
1780 * tests/testsuite.at: Include new test group:
1781 * tests/named-refs.at: this new file.
1782
1783 2009-06-25 Akim Demaille <demaille@gostai.com>
1784
1785 hash: check insertion for memory exhaustion.
1786 * src/uniqstr.c (uniqstr_new): New.
1787
1788 2009-06-24 Akim Demaille <demaille@gostai.com>
1789
1790 variables: rename namespace as api.namespace.
1791 Discussed in
1792 http://lists.gnu.org/archive/html/bison-patches/2009-04/msg00033.html
1793
1794 * data/bison.m4 (b4_percent_define_copy_, b4_percent_define_copy):
1795 New.
1796 (b4_percent_define_use): New.
1797 Use it where applicable.
1798 * data/c++.m4: Replace uses of the variable "namespace" by
1799 "api.namespace".
1800 Default the latter to the former.
1801 * doc/bison.texinfo (Decl Summary): Document "namespace" as
1802 obsolete.
1803 Document api.namespace.
1804 Use @samp to document %define uses, keep @code for identifiers.
1805 * NEWS: Likewise.
1806 * tests/c++.at, tests/input.at: Test api.namespace instead of
1807 namespace. (The tests passed with namespace.)
1808
1809 2009-06-11 Akim Demaille <demaille@gostai.com>
1810
1811 style changes.
1812 * data/xslt/xml2dot.xsl, data/xslt/xml2xhtml.xsl: Space changes.
1813 * src/print-xml.c: Style changes.
1814 * tests/conflicts.at: Comment changes.
1815
1816 2009-06-11 Akim Demaille <demaille@gostai.com>
1817
1818 xml: beware of user strings used to give a %prec to rules.
1819 * tests/conflicts.at (%prec with user strings): New.
1820 * src/gram.c (grammar_rules_print_xml): Escape the precedence for
1821 XML output.
1822
1823 2009-06-11 Akim Demaille <demaille@gostai.com>
1824
1825 hash: check insertion for memory exhaustion.
1826 * src/muscle-tab.c (muscle_insert, muscle_grow)
1827 * src/state.c (state_hash_insert): Check the return value of
1828 hash_insert.
1829
1830 2009-06-11 Akim Demaille <demaille@gostai.com>
1831
1832 tests: honor TESTSUITEFLAGS in every check target.
1833 * tests/local.mk (RUN_TESTSUITE): New.
1834 (check-local, installcheck-local, maintainer-check-g++)
1835 (maintainer-check-posix, maintainer-check-valgrind): Use it.
1836
1837 2009-06-10 Akim Demaille <demaille@gostai.com>
1838
1839 deterministic test suite.
1840 Some consistency checks on symbols are performed after all the
1841 symbols were read, by an iteration over the symbol table. This
1842 traversal is nondeterministic, which can be a problem for test
1843 cases.
1844 Avoid this.
1845 Addresses another form of nondeterminism reported by Joel E. Denny.
1846 http://lists.gnu.org/archive/html/bison-patches/2009-05/msg00023.html
1847
1848 * tests/input.at (Numbered tokens): Split the hexadecimal/decimal
1849 test in two.
1850 Use different file names for the three tests to make the
1851 maintenance easier.
1852
1853 2009-06-10 Akim Demaille <demaille@gostai.com>
1854
1855 gnulib: update.
1856 * gnulib: Update to latest.
1857 * lib/.cvsignore, lib/.gitignore, m4/.cvsignore,
1858 * m4/.gitignore: Regen.
1859 * src/symtab.c (symbol_from_uniqstr, semantic_type_from_uniqstr):
1860 Call xalloc_die on hash_insert failures.
1861 Requested by the new __warn_unused_result__ attribute of
1862 hash_insert.
1863
1864 2009-06-10 Akim Demaille <demaille@gostai.com>
1865
1866 deterministic user-token-number redeclaration errors.
1867 Address nondeterminism reported by Joel E. Denny.
1868 http://lists.gnu.org/archive/html/bison-patches/2009-05/msg00023.html
1869
1870 * src/uniqstr.h: Comment changes.
1871 * src/location.h (boundary_cmp, location_cmp): New.
1872 * src/symtab.c (user_token_number_redeclaration): New.
1873 (symbol_translation): Use it.
1874 * tests/input.at (Numbered tokens): Adjust the expected output.
1875
1876 2009-05-25 Akim Demaille <demaille@gostai.com>
1877
1878 build: avoid ignored errors.
1879 * doc/local.mk ($(CROSS_OPTIONS_TEXI)): Don't generate ignored
1880 errors, they pollute the output.
1881
1882 2009-05-22 Joel E. Denny <jdenny@ces.clemson.edu>
1883
1884 Convert multiple variable definition warnings to complaints.
1885 * NEWS (2.5): Add a new entry for that change.
1886 * doc/bison.texinfo (Decl Summary): Update %define entry.
1887 (Bison Options): Update -D/--define/-F/--force-define entry.
1888 * src/muscle-tab.c (muscle_percent_define_insert): Implement.
1889 * src/muscle-tab.h (muscle_percent_define_insert): Update
1890 comments.
1891 * tests/input.at (`%define errors'): Update.
1892 (`%define, --define, --force-define'): Update.
1893
1894 2009-05-22 Joel E. Denny <jdenny@ces.clemson.edu>
1895
1896 -F/--force-define and relative %define/-D/--define priorities.
1897 * NEWS (2.5): Add documentation to -D/--define entry.
1898 * build-aux/cross-options.pl: Hard-code association of
1899 --force-define with %define.
1900 * doc/bison.texinfo (Decl Summary): In %define entry,
1901 cross-reference command-line options.
1902 (Bison Options): Add documentation to -D/--define entry.
1903 (Option Cross Key): Widen column for --force-define row.
1904 * src/getargs.c (usage): Document -F/--force-define. Realign
1905 options in output.
1906 (short_options, long_options, getargs): Parse -F/--force-define,
1907 and update muscle_percent_define_insert invocations.
1908 * src/muscle-tab.h (muscle_percent_define_how): New enum type.
1909 (muscle_percent_define_insert): Add argument with that type.
1910 * src/muscle-tab.c (muscle_percent_define_insert): Implement
1911 -F/--force-define behavior and priorities.
1912 (muscle_percent_define_ensure): Update
1913 muscle_percent_define_insert invocation.
1914 * src/parse-gram.y (prologue_declaration): Update
1915 muscle_percent_define_insert invocations.
1916 * tests/input.at (`%define, --define'): Rename to...
1917 (`%define, --define, --force-define'): ... this and extend.
1918
1919 2009-05-22 Joel E. Denny <jdenny@ces.clemson.edu>
1920
1921 Update some comments to make sense for -D.
1922 * data/bison.m4 (b4_check_user_names): In header comments, say
1923 "user occurrence" instead of "grammar occurrence".
1924 * src/muscle-tab.h (muscle_percent_define_insert): Likewise.
1925 (muscle_percent_code_grow): Likewise just for consistency.
1926
1927 2009-05-20 Joel E. Denny <jdenny@ces.clemson.edu>
1928
1929 * data/c++.m4 (b4_namespace_close): Simplify slightly.
1930
1931 2009-05-19 Joel E. Denny <jdenny@ces.clemson.edu>
1932
1933 Handle a trailing `:' in a user-supplied C++ namespace better.
1934 * data/c++.m4 (b4_namespace_close): Don't let it be printed
1935 among the closing braces here. This fix might make the
1936 generated code easier to debug, but otherwise it should be
1937 insignificant because a trailing `:' is a C++ error already.
1938
1939 2009-05-19 Akim Demaille <demaille@gostai.com>
1940
1941 remove useless variable.
1942 * src/getargs.c (skeleton_arg): Remove now useless variable.
1943 Should help the compiler see that this printf-like call is sane.
1944
1945 2009-05-15 Akim Demaille <demaille@gostai.com>
1946
1947 Rename token.prefix as api.tokens.prefix.
1948 Discussed here.
1949 http://lists.gnu.org/archive/html/bison-patches/2009-05/msg00024.html.
1950
1951 * NEWS, data/bison.m4, data/c.m4, data/java.m4, doc/bison.texinfo,
1952 * tests/c++.at, tests/calc.at, tests/java.at, tests/local.at
1953 (token.prefix): Rename as...
1954 (api.tokens.prefix): this.
1955
1956 2009-05-11 Akim Demaille <demaille@gostai.com>
1957
1958 doc: use C++ headers.
1959 * doc/bison.texinfo (Calc++ Scanner): Prefer C++ headers to C
1960 headers.
1961
1962 2009-05-11 Akim Demaille <demaille@gostai.com>
1963
1964 doc: token.prefix
1965 * doc/bison.simple (Decl Summary): Document token.prefix.
1966 (Calc++ Parser): Various fixes.
1967 Formatting changes.
1968 Use token.prefix.
1969 Introduce a macro TOKEN to shorten the code and make it more
1970 readable.
1971 (Calc++ Scanner): Adjust.
1972 * NEWS (Variable token.prefix): New.
1973
1974 2009-05-04 Akim Demaille <demaille@gostai.com>
1975
1976 bison: catch bad symbol names.
1977 * src/scan-gram.l({int}{id}): Report as an invalid identifier.
1978 * tests/input.at: Adjust.
1979
1980 2009-05-04 Akim Demaille <demaille@gostai.com>
1981
1982 identifiers: dashes are letters.
1983 Dashes can now start identifiers (symbols and directives).
1984
1985 * src/scan-gram.l ({letter}): Add dash.
1986 ({id}): Remove it.
1987 * tests/input.at (Symbols): Adjust.
1988 Remove stray comment.
1989 * tests/regression.at (Invalid inputs): Adjust error message.
1990 * doc/bison.texinfo (Symbols): Update.
1991
1992 2009-05-01 Joel E. Denny <jdenny@ces.clemson.edu>
1993
1994 Declare %code to be a permanent feature.
1995 * NEWS (2.4.2): Here.
1996 * doc/bison.texinfo (Prologue Alternatives): Don't say it's
1997 experimental.
1998 (Decl Summary): Likewise.
1999
2000 2009-04-30 Joel E. Denny <jdenny@ces.clemson.edu>
2001
2002 Convert underscores to dashes in some %define variable names.
2003 For now, just api.push-pull and lr.keep-unreachable-states.
2004 Maintain old names for backward compatibility.
2005 * NEWS (2.5): Document.
2006 * data/c.m4 (b4_identification): Update comment.
2007 * data/yacc.c: Update access.
2008 * doc/bison.texinfo: Update.
2009 * etc/bench.pl.in (bench_push_parser): Update use.
2010 * src/files.c (tr): Move to...
2011 * src/getargs.c, src/getargs.h (tr): ... here because I can't
2012 think of a better place to expose it. My logic is that, for all
2013 uses of tr so far, command-line arguments can be involved, and
2014 getargs.h is already included.
2015 * src/main.c (main): Update access.
2016 * src/muscle_tab.c (muscle_percent_define_insert): Convert old
2017 variable names to new variable names before assigning value.
2018 * src/reader.c (reader): Update setting default.
2019 * tests/calc.at: Update uses.
2020 * tests/conflicts.at (Unreachable States After Conflict
2021 Resolution): Update use.
2022 * tests/input.at (%define enum variables): Update use.
2023 (%define backward compatibility): New test group.
2024 * tests/push.at: Update uses.
2025 * tests/reduce.at: Update uses.
2026 * tests/torture.at: Update uses.
2027
2028 2009-04-30 Joel E. Denny <jdenny@ces.clemson.edu>
2029
2030 Set all front-end %define defaults in one place.
2031 * src/main.c (main): Move lr.keep_unreachable_states default...
2032 * src/reader.c (reader): ... to here.
2033
2034 2009-04-29 Joel E. Denny <jdenny@ces.clemson.edu>
2035
2036 Rename lr.default_reductions to lr.default-reductions.
2037 * NEWS (2.5): Here.
2038 * doc/bison.texinfo: Here.
2039 * src/lalr.c (initialize_LA): Here.
2040 * src/print.c (print_reductions): Here.
2041 * src/reader.c (reader): Here.
2042 * src/tables.c (action_row): Here.
2043 * tests/input.at (%define enum variables): Here.
2044 * tests/reduce.at (AT_TEST_LR_DEFAULT_REDUCTIONS): Here.
2045
2046 2009-04-29 Joel E. Denny <jdenny@ces.clemson.edu>
2047
2048 Pacify ./configure --enable-gcc-warnings.
2049 * tests/input.at (Symbols): Prototype yyerror and yylex.
2050
2051 2009-04-29 Joel E. Denny <jdenny@ces.clemson.edu>
2052
2053 Document how `%define "var" "value"' is not M4-friendly.
2054 * src/parse-gram.y (variable): In comments here.
2055
2056 2009-04-24 Joel E. Denny <jdenny@ces.clemson.edu>
2057
2058 Clean up recent patches a little.
2059 Reported by Akim Demaille.
2060 * doc/bison.texinfo (Understanding): Fix typos.
2061 * src/print.c (print_reductions): Don't use negated variable.
2062
2063 2009-04-24 Joel E. Denny <jdenny@ces.clemson.edu>
2064
2065 List accepted values for a %define enum variable with an invalid value.
2066 Suggested by Akim Demaille at
2067 <http://lists.gnu.org/archive/html/bison-patches/2009-04/msg00082.html>.
2068 * data/bison.m4 (_b4_percent_define_check_values): Implement.
2069 * src/muscle-tab.c (muscle_percent_define_check_values): Implement.
2070 * tests/input.at (%define lr.default_reductions invalid values): Merge
2071 into...
2072 (%define enum variables): ... here, and update output.
2073
2074 2009-04-23 Joel E. Denny <jdenny@ces.clemson.edu>
2075
2076 Rename "default rule" to "default reduction".
2077 This includes changing variable names in code, changing
2078 comments, and renaming %define lr.default_rules to %define
2079 lr.default_reductions.
2080 * NEWS (2.5): Update IELR documentation.
2081 * data/bison.m4 (b4_integral_parser_tables_map): Adjust YYDEFACT
2082 documentation.
2083 * data/glr.c, data/lalr1.java: Sync copyright dates.
2084 * doc/bison.texinfo (Decl Summary): Adjust lr.default_reductions
2085 and lr.type documentation. Make some other wording
2086 improvements.
2087 (Glossary): Adjust cross-references and Default Reduction
2088 definition.
2089 * src/lalr.c (state_lookahead_tokens_count): Adjust code.
2090 Remove a confusing comment pointed out by Akim Demaille.
2091 (initialize_LA): Adjust code.
2092 * src/print-xml.c (print_reductions): Adjust code.
2093 * src/print.c (print_reductions): Adjust code.
2094 * src/reader.c (reader): Adjust code.
2095 * src/tables.c (action_row): Adjust code.
2096 (token_actions): Adjust code.
2097 * src/tables.h: Adjust YYDEFACT documentation.
2098 * tests/input.at (%define lr.default_rules invalid values):
2099 Rename test group to...
2100 (%define lr.default_reductions invalid values): ... this, and
2101 update grammar file and expected output.
2102 * tests/reduce.at (AT_TEST_LR_DEFAULT_RULES): Rename to...
2103 (AT_TEST_LR_DEFAULT_REDUCTIONS): ... this, and update.
2104
2105 2009-04-21 Akim Demaille <demaille@gostai.com>
2106
2107 tests: check the use of dashes and periods in symbols.
2108 * tests/input.at (Symbol): New test group.
2109
2110 2009-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
2111
2112 Document %define lr.type and lr.default_rules.
2113 * NEWS (2.5): Add an entry.
2114 * src/getargs.c (usage): Mention IELR(1) and canonical LR(1)
2115 besides just LALR(1) and GLR(1).
2116 * doc/bison.texinfo (Introduction): Likewise.
2117 (Language and Grammar): Bison is no longer limited to LALR(1)
2118 restrictions.
2119 (GLR parsing): Say deterministic or LR(1) rather than LALR(1)
2120 when trying to distinguish from GLR. Talk about LR(1) grammars
2121 rather than LALR(1) grammars.
2122 (Decl Summary): In %define api.push_pull entry, say it applies
2123 to deterministic parsers in C rather than LALR(1) parsers in C.
2124 Add lr.default_rules entry.
2125 Add lr.type entry.
2126 (Mystery Conflicts): Bison is no longer limited to LALR(1)
2127 restrictions.
2128 (Generalized LR Parsing): Same changes as for the previous GLR
2129 section.
2130 (Memory Management): Say deterministic rather than LALR(1).
2131 (Understanding): Correct some bison output.
2132 Index discussion of "accepting state".
2133 Say deterministic rather than LALR(1).
2134 (Bison Options): In --yacc entry, say deterministic rather than
2135 LALR(1).
2136 In --report, --graph, and --xml entries, just don't mention
2137 LALR(1).
2138 (C++ Parsers): Say deterministic rather than LALR(1).
2139 (Table of Symbols): Likewise in YYSTACK_USE_ALLOCA entry.
2140 (Glossary): Add Accepting State, Consistent State, Default Rule,
2141 and IELR(1) definitions.
2142 In Generalized LR (GLR) definition, make same changes as in
2143 previous GLR sections.
2144 In LALR(1) definition, say Bison uses LALR(1) by default rather
2145 than implying Bison is limited to LALR(1).
2146 (LocalWords): Add IELR.
2147
2148 2009-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
2149
2150 Finish implementing %define lr.type.
2151 Its value can be "LALR", "IELR", or "canonical LR".
2152 * lib/timevar.def (TV_IELR_PHASE1): New var.
2153 (TV_IELR_PHASE2): New var.
2154 (TV_IELR_PHASE3): New var.
2155 (TV_IELR_PHASE4): New var.
2156 * src/Makefile.am (bison_SOURCES): Add AnnotationList.c,
2157 AnnotationList.h, InadequacyList.c, InadequacyList.h, Sbitset.c,
2158 Sbitset.h, ielr.h, and ielr.c.
2159 * src/getargs.h, src/getargs.c (enum trace, trace_args,
2160 trace_types): Add trace_ielr.
2161 * src/lalr.h, src/lalr.c (ngotos): Export it.
2162 (F): Rename to...
2163 (goto_follows): ... this, update all uses, and export it.
2164 (set_goto_map): Export it.
2165 (map_goto): Export it.
2166 (compute_lookahead_tokens): Don't free goto_follows yet. Now
2167 handled in ielr.
2168 (initialize_LA): Export it. Move lookback allocation to...
2169 (lalr): ... here because, for canonical LR, initialize_LA must
2170 be invoked but lookback and much of the rest of LALR isn't
2171 needed.
2172 * main.c (main): Instead of lalr, invoke ielr, which invokes
2173 lalr.
2174 * src/reader.c (reader): Default lr.type to "LALR".
2175 Default lr.default_rules to "accepting" if lr.type is "canonical
2176 LR". Leave the default as "all" otherwise.
2177 Check for a valid lr.type value.
2178 * src/state.h, src/state.c (struct state_list): Add state_list
2179 member.
2180 (state_new): Initialize state_list member to NULL.
2181 (state_new_isocore): New function, exported.
2182 * tests/existing.at (AT_TEST_EXISTING_GRAMMAR): New macro that
2183 exercises all values of lr.type.
2184 (GNU AWK Grammar): Rename test group to...
2185 (GNU AWK 3.1.0 Grammar): ... this, and extend to use
2186 AT_TEST_EXISTING_GRAMMAR.
2187 (GNU Cim Grammar): Extend to use AT_TEST_EXISTING_GRAMMAR.
2188 (GNU pic Grammar): Rename test group to...
2189 (GNU pic (Groff 1.18.1) Grammar): ... this, and extend to use
2190 AT_TEST_EXISTING_GRAMMAR.
2191 * tests/reduce.at (AT_TEST_LR_TYPE): New macro that exercises
2192 all values of lr.type.
2193 (Single State Split): New test groups using AT_TEST_LR_TYPE.
2194 (Lane Split): Likewise.
2195 (Complex Lane Split): Likewise.
2196 (Split During Added Lookahead Propagation): Likewise.
2197
2198 2009-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
2199
2200 Add new files for IELR and canonical LR implementation.
2201 * src/AnnotationList.c: New.
2202 * src/AnnotationList.h: New.
2203 * src/InadequacyList.c: New.
2204 * src/InadequacyList.h: New.
2205 * src/Sbitset.c: New.
2206 * src/Sbitset.h: New.
2207 * src/ielr.c: New.
2208 * src/ielr.h: New.
2209
2210 2009-04-20 Joel E. Denny <jdenny@ces.clemson.edu>
2211
2212 Implement %define lr.default_rules.
2213 Its value describes the states that are permitted to contain
2214 default rules: "all", "consistent", or "accepting".
2215 * src/reader.c (reader): Default lr.default_rules to "all".
2216 Check for a valid lr.default_rules value.
2217 * src/lalr.c (state_lookahead_tokens_count): If lr.default_rules
2218 is "accepting", then only mark the accepting state as
2219 consistent.
2220 (initialize_LA): Tell state_lookahead_tokens_count whether
2221 lr.default_rules is "accepting".
2222 * src/tables.c (action_row): If lr.default_rules is not "all",
2223 then disable default rules in inconsistent states.
2224 * src/print.c (print_reductions): Use this opportunity to
2225 perform some assertions about whether lr.default_rules was
2226 obeyed correctly.
2227 * tests/local.at (AT_TEST_TABLES_AND_PARSE): New macro that
2228 helps with checking the parser tables for a grammar.
2229 * tests/input.at (%define lr.default_rules invalid values): New
2230 test group.
2231 * tests/reduce.at (AT_TEST_LR_DEFAULT_RULES): New macro using
2232 AT_TEST_TABLES_AND_PARSE.
2233 (`no %define lr.default_rules'): New test group generated by
2234 AT_TEST_LR_DEFAULT_RULES.
2235 (`%define lr.default_rules "all"'): Likewise.
2236 (`%define lr.default_rules "consistent"'): Likewise.
2237 (`%define lr.default_rules "accepting"'): Likewise.
2238
2239 2009-04-20 Akim Demaille <demaille@gostai.com>
2240
2241 Formatting change.
2242
2243 2009-04-20 Akim Demaille <demaille@gostai.com>
2244
2245 bison: factoring.
2246 * src/output.c (token_definitions_output): Use symbol_id_get
2247 instead of duplicating its logic.
2248 * TODO (YYERRCODE): Extend.
2249
2250 2009-04-20 Akim Demaille <demaille@gostai.com>
2251
2252 variables: prefer error-verbose to error_verbose.
2253 * data/bison.m4 (b4_error_verbose_if): Based on error-verbose
2254 instead of error_verbose.
2255 * src/scan-gram.l (%error-verbose): Map to the error-verbose
2256 variable.
2257 * doc/bison.texinfo: Promote %define error-verbose instead of
2258 %error-verbose.
2259 * tests/actions.at: Prefer %define error-verbose to %error-verbose.
2260
2261 2009-04-15 Akim Demaille <demaille@gostai.com>
2262
2263 variables: accept dashes.
2264 * data/bison.m4 (b4_percent_define_if_define_): Also map dashes to
2265 underscores.
2266 * src/scan-gram.l ({id}): Also accept dashes after the initial
2267 letter.
2268 ({directive}): Use {id}.
2269 * src/parse-gram.y: Comment and formatting changes.
2270 * doc/bison.texinfo (Symbols): Adjust the lexical definitions of
2271 symbols.
2272 * src/complain.h, src/complain.c (yacc_at): New.
2273 * src/symtab.c (symbol_new): Use yacc_at to report inappropriate
2274 symbol names.
2275 * src/output.c (token_definitions_output): Do not #define token
2276 names with dashes.
2277
2278 2009-04-20 Akim Demaille <demaille@gostai.com>
2279
2280 Consistently refer to Yacc, not YACC.
2281 * src/getargs.c (usage, warnings_args): s/YACC/Yacc/.
2282
2283 2009-04-17 Joel E. Denny <jdenny@ces.clemson.edu>
2284
2285 Pacify make maintainer-check-posix.
2286 * tests/input.at (%define, --define): Move bison command-line
2287 options before grammar file name.
2288
2289 2009-04-04 Joel E. Denny <jdenny@ces.clemson.edu>
2290
2291 Document semicolon warnings.
2292 * NEWS (2.5): Here.
2293
2294 2009-04-14 Akim Demaille <demaille@gostai.com>
2295
2296 variables: use `parse.assert' instead of `assert'.
2297 * TODO (assert): Remove.
2298 * data/bison.m4 (b4_assert_if): Replace with...
2299 (b4_parse_assert_if): this.
2300 * data/lalr1.cc, data/variant.hh, tests/c++.at: Adjust.
2301 * doc/bison.texinfo (Decl Summary): Document parse.assert.
2302
2303 2009-04-14 Akim Demaille <demaille@gostai.com>
2304
2305 variables: use `parse.trace' instead of `debug'.
2306 * src/getargs.c (getargs): Map -t to %define trace.parse.
2307 * src/scan-gram.l (%debug): Map to %define trace.parse.
2308 * data/bison.m4 (b4_percent_define_if_define): Map `.' in variable
2309 names to `_' in macro names.
2310 (b4_debug_if): Replace with...
2311 (b4_parse_trace_if): this.
2312 * data/glr.c, data/glr.cc, data/lalr1.cc, data/lalr1.java,
2313 * data/yacc.c: Adjust.
2314 * doc/bison.texinfo (Decl Summary): Document %debug as obsoleted.
2315 Use @code to label the variable list.
2316 Document the variable parse.trace.
2317 (Tracing): Promote the parse.trace variable.
2318 * TODO: %printer is not documented.
2319
2320 2009-04-14 Akim Demaille <demaille@gostai.com>
2321
2322 doc: minor fixes.
2323 * doc/bison.texinfo (Decl Summary): Fix entry about %debug.
2324 (Table of Symbols): Remove duplicate entry for %debug.
2325
2326 2009-04-10 Eric Blake <ebb9@byu.net>
2327
2328 submodules: update to latest
2329 * submodules/autoconf: Use latest upstream Autoconf.
2330
2331 2009-04-06 Eric Blake <ebb9@byu.net>
2332
2333 Work around autoconf 2.63b bug in testsuite.
2334 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): Avoid tripping
2335 autoconf bug related to # in test.
2336
2337 2009-04-06 Joel E. Denny <jdenny@ces.clemson.edu>
2338
2339 * NEWS (2.5): New section. Describe new -D/--define feature.
2340
2341 2009-04-06 Akim Demaille <demaille@gostai.com>
2342
2343 Regen.
2344 * src/parse-gram.h, src/parse-gram.c: Regen.
2345
2346 2009-04-06 Akim Demaille <demaille@gostai.com>
2347
2348 rename muscle_tab.* as muscle-tab.* for consistency.
2349 * src/muscle_tab.h, src/muscle_tab.c: Rename as...
2350 * src/muscle-tab.h, src/muscle-tab.c: these.
2351 * src/getargs.c, src/local.mk, src/main.c, src/output.c,
2352 * src/parse-gram.y, src/reader.c, src/scan-code.l: Adjust.
2353
2354 2009-04-06 Akim Demaille <demaille@gostai.com>
2355
2356 Makefile: introduce $(BISON).
2357 * src/local.mk (BISON): New.
2358 (YACC): Use it.
2359
2360 2009-04-06 Akim Demaille <demaille@gostai.com>
2361
2362 parser: handle %locations as %define locations.
2363 * src/getargs.h, src/getargs.c (locations_flag): Remove.
2364 * src/getargs.c, src/scan-code.l: Use muscle_percent_define_ensure
2365 to set "locations" to true.
2366 * src/output.c (prepare): Don't output "locations".
2367 * src/scan-gram.l (%locations): Handle it as a %<flag>.
2368 * src/parse-gram.y: It's no longer a token.
2369 Don't handle it.
2370 * data/bison.m4 (b4_locations_if): Define it with
2371 b4_percent_define_if_define.
2372 * data/c.m4, data/glr.cc: Adjust.
2373
2374 2009-04-06 Akim Demaille <demaille@gostai.com>
2375
2376 Regen.
2377 * src/parse-gram.c: Regen.
2378
2379 2009-04-06 Akim Demaille <demaille@gostai.com>
2380
2381 muscle: factor the handling of obsolete of obsolete directives.
2382 Suggested by Joel E. Denny.
2383
2384 * src/muscle_tab.h, src/muscle_tab.c (muscle_percent_define_ensure):
2385 New, extracted from...
2386 * src/parse-gram.y (prologue_declaration: pure-parser): here.
2387 Remove it.
2388 (prologue_declaration: "%<flag>"): Use
2389 muscle_percent_define_ensure.
2390 (%error-verbose, %pure-parser): No longer tokens.
2391 * src/scan-gram.l (pure-parser): Return as a %<flag>.
2392
2393 2009-04-06 Joel E. Denny <jdenny@ces.clemson.edu>
2394
2395 Fix options documentation.
2396 * build-aux/cross-options.pl: As in --help output, write optional
2397 arguments as [=ARG] not =[ARG].
2398 * doc/bison.texinfo (Bison Options): Add -W/--warnings argument.
2399
2400 2009-04-04 Joel E. Denny <jdenny@ces.clemson.edu>
2401
2402 Replace BISON_PROG_GNU_M4 with Autoconf's AC_PROG_GNU_M4.
2403 If the first m4 in $PATH is wrong, it keeps looking. Moreover, its
2404 requirements for a correct m4 are stricter.
2405 * m4/m4.m4: Make it a symbolic link to submodules/autoconf/m4/m4.m4.
2406 * configure.ac: Update to use AC_PROG_GNU_M4.
2407 Reported by Eric Blake.
2408
2409 2009-04-03 Joel E. Denny <jdenny@ces.clemson.edu>
2410
2411 Help with updating web manual.
2412 * HACKING: Incorporate instructions from gnulib/doc/README.
2413 * bootstrap.conf (gnulib_modules): Add gendocs.
2414
2415 2009-04-03 Akim Demaille <demaille@gostai.com>
2416
2417 Regen.
2418 * src/parse-gram.h, src/parse-gram.c: Regen.
2419
2420 2009-04-03 Akim Demaille <demaille@gostai.com>
2421
2422 Factor %FLAG at scan level.
2423 * src/parse-gram.y (PERCENT_DEBUG, PERCENT_ERROR_VERBOSE): Token
2424 definitions and associated rules, replaced by....
2425 (PERCENT_FLAG): this new token type, and rule.
2426 * src/scan-gram.l (RETURN_PERCENT_FLAG): New.
2427 Use it for %debug and %error-verbose.
2428
2429 2009-04-03 Akim Demaille <demaille@gostai.com>
2430
2431 Regen.
2432 * src/parse-gram.h, src/parse-gram.c: Regen.
2433
2434 2009-04-03 Akim Demaille <demaille@gostai.com>
2435
2436 Treat %debug as %define debug.
2437 * data/bison.m4 (b4_debug_if): New.
2438 * data/glr.c, data/glr.cc, data/lalr1.cc, data/yacc.c,
2439 * data/lalr1.java: Use it instead of b4_debug_flag.
2440 * src/getargs.h, src/getargs.c (debug_flag): Remove.
2441 * src/output.c (prepare): Don't output it.
2442 * src/parse-gram.y: Treat %debug as %define debug.
2443
2444 2009-04-03 Akim Demaille <demaille@gostai.com>
2445
2446 Treat %error-verbose as %define error_verbose.
2447 This allows to pass -Derror_verbose on the command line. Better
2448 yet, it allows to pass -Derror_verbose=$(ERROR_VERBOSE), with
2449 ERROR_VERBOSE being defined as false or true.
2450 * data/bison.m4 (b4_percent_define_if_define): Instead of relying
2451 on b4_percent_define_ifdef, for does not check the defined value,
2452 but only whether the symbol is defined, rely on
2453 b4_percent_define_flag_if, so that a value of "false" is processed
2454 as a false.
2455 If not defined, define the flag to "false".
2456 (b4_error_verbose_if): New.
2457 * data/glr.c, data/lalr1.cc, data/yacc.c: Use it instead of
2458 b4_error_verbose_flag.
2459 * src/getargs.h, src/getargs.c (error_verbose_flag): Remove.
2460 * src/output.c (prepare): Don't output it.
2461 * src/parse-gram.y (%error-verbose): Treat as %define error_verbose.
2462
2463 2009-04-03 Joel E. Denny <jdenny@ces.clemson.edu>
2464
2465 Fix strange %define locations for default values.
2466 Reported by Akim Demaille at
2467 <http://lists.gnu.org/archive/html/bug-bison/2007-12/msg00001.html>
2468 and discussed again starting at
2469 <http://lists.gnu.org/archive/html/bison-patches/2008-11/msg00102.html>.
2470 * data/bison.m4 (b4_percent_define_default): Leave syncline blank
2471 because location information is bogus.
2472 Use angle brackets to delimit fake file name because square brackets
2473 look like underexpanded m4. Choose a better fake file name.
2474 Use negative line numbers.
2475 * src/muscle_tab.c (muscle_percent_define_default): Likewise.
2476 * src/location.c (location_print): If line for a boundary is negative,
2477 only print that boundary's file name.
2478 * src/location.h: Document that.
2479 * tests/skeletons.at (%define Boolean variables: invalid skeleton
2480 defaults): Update output.
2481
2482 2009-04-03 Joel E. Denny <jdenny@ces.clemson.edu>
2483
2484 Pacify ./configure --enable-gcc-warnings.
2485 * Makefile.am (AM_CFLAGS): Remove $(WERROR_CFLAGS) because many files
2486 in lib won't compile with it.
2487 * src/local.mk (src_bison_CFLAGS): Use $(WERROR_CFLAGS) here only.
2488
2489 2009-03-31 Akim Demaille <demaille@gostai.com>
2490
2491 bootstrap: --help to stdout.
2492 * bootstrap (usage): Don't send --help to stderr.
2493 Use a here doc instead of a long string.
2494
2495 2009-03-31 Akim Demaille <demaille@gostai.com>
2496
2497 bootstrap: README-hacking no longer exists
2498 * bootstrap (checkout_only_file): Set to HACKING.
2499
2500 2009-03-26 Akim Demaille <demaille@gostai.com>
2501
2502 doc: merge HACKING and README-hacking.
2503 Two files is confusing.
2504 Reported by Alexandre Duret-Lutz.
2505
2506 * README-hacking: Merge into...
2507 * HACKING (Working from the repository): here.
2508
2509 2009-03-26 Akim Demaille <demaille@gostai.com>
2510
2511 doc: update README-hacking.
2512 * README-hacking: We now use git and git submodules.
2513 Reported by Ralf Wildenhues and Alexandre Duret-Lutz.
2514
2515 2009-03-26 Akim Demaille <demaille@gostai.com>
2516
2517 lalr1.cc: avoid GCC 4.3 warnings.
2518 GCC 4.3 now warns about "a || b && c" and asks for explicit
2519 parentheses.
2520 Reported by Alexandre Duret-Lutz.
2521 * data/location.cc: Update copyright years.
2522 (Position::operator==): Use parens to make precedence explicit.
2523 Compare lines and columns first, as they are more likely to be
2524 different, and they are faster to compare.
2525
2526 2009-03-26 Akim Demaille <demaille@gostai.com>
2527
2528 gnulib: update.
2529 * gnulib: Update to latest.
2530 * src/local.mk (AM_CFLAGS): Move to...
2531 * Makefile.am: here.
2532 * etc/prefix-gnulib-mk (prefix_assignment): Also transform
2533 AM_CFLAGS.
2534
2535 2009-03-02 Akim Demaille <demaille@gostai.com>
2536
2537 Comment changes.
2538
2539 2009-03-02 Akim Demaille <demaille@gostai.com>
2540
2541 Share b4_yytranslate_define.
2542 * data/lalr1.cc (b4_yytranslate_define): Move to...
2543 * data/c++.m4: here.
2544
2545 2009-03-02 Akim Demaille <demaille@gostai.com>
2546
2547 Use locations in the variant example.
2548 Yes, this obfuscates the point of this example, variants only.
2549 But glr.cc cannot work (yet?) without locations. This change
2550 makes it easier to use this example with glr.cc.
2551
2552 * examples/variant.yy (assert): %define it.
2553 (locations): Request them.
2554 (yylex): Bind the location to the stage.
2555
2556 2009-03-02 Akim Demaille <demaille@gostai.com>
2557
2558 Dub make_TOKEN as a public type interface.
2559 * data/c++.m4 (b4_symbol_constructor_declare)
2560 (b4_symbol_constructor_define): New empty stubs.
2561 (b4_public_types_declare, b4_public_types_define): Use them.
2562 * data/lalr1.cc (b4_symbol_constructor_declare)
2563 (b4_symbol_constructor_declare_)
2564 (b4_symbol_constructor_define_, b4_symbol_constructor_define):
2565 Move to...
2566 * data/variant.hh: here.
2567 Remove the "b4_variant_if" parts, as variant.hh is loaded only if
2568 needed.
2569 * data/lalr1.cc: No longer invoke b4_symbol_constructor_define and
2570 b4_symbol_constructor_declare, as it is now done by
2571 b4_public_types_define and b4_public_types_declare.
2572
2573 2009-03-02 Akim Demaille <demaille@gostai.com>
2574
2575 Coding style changes.
2576 * data/lalr1.cc (b4_symbol_constructor_declaration_)
2577 (b4_symbol_constructor_declarations)
2578 (b4_symbol_constructor_definition_)
2579 (b4_symbol_constructor_definitions)
2580 (b4_yytranslate_definition): Rename as...
2581 (b4_symbol_constructor_declare_)
2582 (b4_symbol_constructor_declare)
2583 (b4_symbol_constructor_define_)
2584 (b4_symbol_constructor_define)
2585 (b4_yytranslate_define): these.
2586 * data/variant.hh (b4_variant_definition): Rename as...
2587 (b4_variant_define): this.
2588
2589 2009-03-02 Akim Demaille <demaille@gostai.com>
2590
2591 Factor b4_assert_if, b4_lex_symbol_if, and b4_variant_if.
2592 * data/bison.m4 (b4_percent_define_if_define): New.
2593 * data/c++.m4 (b4_variant_if): Move to...
2594 * data/bison.m4: Here, using b4_percent_define_if_define.
2595 * data/lalr1.cc (b4_assert_if, b4_lex_symbol_if): Move to...
2596 * data/bison.m4: Here, using b4_percent_define_if_define.
2597
2598 2009-03-02 Akim Demaille <demaille@gostai.com>
2599
2600 Dub symbol_type_base as a public type.
2601 * data/c++.m4 (b4_public_types_declare): Now define
2602 symbol_type_base and symbol_type.
2603 (b4_public_types_define): New.
2604 In both cases, the definitions are taken verbatim from lalr1.cc.
2605 * data/lalr1.cc: Adjust.
2606
2607 2009-03-02 Akim Demaille <demaille@gostai.com>
2608
2609 b4_public_types_declare.
2610 * data/c++.m4 (b4_public_types_declare): New.
2611 * data/glr.cc, data/lalr1.cc: Use it.
2612
2613 2009-03-02 Akim Demaille <demaille@gostai.com>
2614
2615 b4_semantic_type_declare.
2616 * data/c++.m4 (b4_semantic_type_declare): New.
2617 Factors and generalizes what was in glr.cc and lalr1.cc.
2618 * data/variant.hh (b4_semantic_type_declare): Redefine it for
2619 variants.
2620 * data/lalr1.cc, data/glr.cc: Use it.
2621
2622 2009-02-26 Akim Demaille <demaille@gostai.com>
2623
2624 Upgrade gnulib.
2625 * gnulib: Upgrade from master.
2626 * lib/.cvsignore, lib/.gitignore, m4/.cvsignore, m4/.gitignore:
2627 Regen.
2628
2629 2009-02-25 Akim Demaille <demaille@gostai.com>
2630
2631 Remove useless arguments.
2632 * data/glr.c (yy_reduce_print): $$ and @$ are not used and not
2633 relevant.
2634
2635 2009-02-25 Akim Demaille <demaille@gostai.com>
2636
2637 Comment changes.
2638 * data/lalr1.cc: here.
2639
2640 2009-02-25 Akim Demaille <demaille@gostai.com>
2641
2642 Fix glr.cc's debug level handling.
2643 * data/glr.cc (yydebug_): Remove, as it is actually yydebug from
2644 glr.c which is used.
2645 (debug_level, set_debug_level): Adjust.
2646
2647 2009-02-25 Akim Demaille <demaille@gostai.com>
2648
2649 Copyright years.
2650 * data/glr.c: Add 2007 and 2008 here, consistenly with the comments.
2651
2652 2009-02-25 Akim Demaille <demaille@gostai.com>
2653
2654 Style changes.
2655 * etc/bench.pl.in (generate_grammar_list): Consitently use
2656 location_type, not yy::location.
2657
2658 2009-02-25 Akim Demaille <demaille@gostai.com>
2659
2660 Comment change.
2661 * data/lalr1.cc: here.
2662
2663 2009-02-19 Akim Demaille <demaille@gostai.com>
2664
2665 Make yyparser::error public.
2666 * data/lalr1.cc: here.
2667 There is no good reason to keep it private (and it is convenient
2668 to use it from the scanner for instance). It is already public in
2669 glr.cc.
2670
2671 2009-02-19 Akim Demaille <demaille@gostai.com>
2672
2673 Comment changes.
2674 * data/glr.cc: here.
2675
2676 2009-02-19 Akim Demaille <demaille@gostai.com>
2677
2678 Remove trailing blanks.
2679 The epilogue has its own ending \n, no need to add another.
2680
2681 * data/glr.c, data/lalr1.java, data/yacc.c: dnl when outputing the
2682 epilogue.
2683 * data/glr.cc: dnl when extending the epilogue.
2684 Remove stray "private:".
2685
2686 2009-02-19 Akim Demaille <demaille@gostai.com>
2687
2688 Use b4_c_modern.
2689 * data/c.m4 (b4_c_function_decl): Here.
2690
2691 2009-02-19 Akim Demaille <demaille@gostai.com>
2692
2693 Comment changes.
2694 * data/lalr1.cc: here.
2695
2696 2009-02-19 Akim Demaille <demaille@gostai.com>
2697
2698 Extract variant.hh
2699 * data/variant.hh: New, extracted from...
2700 * data/lalr1.cc: here.
2701 Adjust.
2702 * data/local.mk: Adjust.
2703
2704 2009-02-19 Akim Demaille <demaille@gostai.com>
2705
2706 Extract stack.hh from lalr1.cc.
2707 * data/stack.hh: New.
2708 * data/lalr1.cc: Extract from here.
2709 * data/local.mk: Adjust.
2710
2711 2009-02-03 Joel E. Denny <jdenny@ces.clemson.edu>
2712
2713 Add reminder about uploading public key to keys.gnupg.net.
2714 * HACKING (Release Procedure): Here.
2715
2716 2009-01-28 Akim Demaille <demaille@gostai.com>
2717
2718 * NEWS: Update information about 2.4.1 and 2.4.2.
2719
2720 2008-11-04 Akim Demaille <demaille@gostai.com>
2721
2722 Reformat NEWS.
2723 * NEWS: Use more outline-mode markup.
2724 Suggested by Jim Meyering.
2725
2726 2009-01-08 Akim Demaille <demaille@gostai.com>
2727
2728 Fix grep portability issues.
2729 Grep on Solaris does not support -q.
2730 Reported by Summum Bonum.
2731
2732 * NEWS: Add a stub for 2.4.2.
2733 * THANKS: Add Summum Bonum.
2734 * tests/atlocal.in (EGREP): New.
2735 (CC, CXX, XSLTPROC): Make it possible to override them via
2736 envvars.
2737 * tests/java.at: Use $EGREP instead of egrep.
2738 Use AT_CHECK's ignore instead of grep's -q.
2739
2740 2008-12-11 Akim Demaille <demaille@gostai.com>
2741
2742 Pass the token type to yysyntax_error.
2743 * data/yacc.c (yysyntax_error): Take the transated token instead
2744 of the raw number.
2745 Adjust callers.
2746 * TODO: Update.
2747
2748 2008-12-11 Akim Demaille <demaille@gostai.com>
2749
2750 Formatting changes.
2751 * data/glr.c: Formatting changes.
2752
2753 2008-12-11 Akim Demaille <demaille@gostai.com>
2754
2755 Propagate i18n changes into glr.c.
2756 * TODO: Update.
2757 * data/glr.c (yyreportSyntaxError): Use "switch" instead of
2758 building the error message format dynamically.
2759 * data/lalr1.java: Formatting changes.
2760
2761 2008-12-11 Akim Demaille <demaille@gostai.com>
2762
2763 Use testsuite -C.
2764 * tests/local.mk: Replace "cd && testsuite" by "testsuite -C".
2765 Solves problems when top_srcdir is an absolute path.
2766 Suggested by Eric Blake.
2767 * configure.ac: Require Autoconf 2.62.
2768
2769 2008-12-11 Akim Demaille <demaille@gostai.com>
2770
2771 Simplify the i18n of the error messages.
2772 * data/lalr1.cc: Comment changes.
2773 * data/yacc.c (yysyntax_error): Rewrite, using a switch as in
2774 lalr1.cc instead of building dynamically the format string.
2775
2776 2008-12-08 Akim Demaille <demaille@gostai.com>
2777
2778 Fix portability issue in the test suite.
2779 * tests/local.at (AT_MATCHES_CHECK): New.
2780 Based on Perl instead of Sed. Sed has too many portability
2781 pitfalls, not ever Sed is GNU Sed.
2782 * tests/actions.at (Fix user actions without a trailing semicolon):
2783 Use it.
2784
2785 2008-12-08 Akim Demaille <demaille@gostai.com>
2786
2787 Update data/README.
2788 * data/README: Document glr.cc, lalr1.java, m4sugar and xslt.
2789
2790 2008-12-08 Akim Demaille <demaille@gostai.com>
2791
2792 Install autoconf as a submodule to get m4sugar.
2793 * .gitmodules: Add submodules/autoconf.
2794 * data/m4sugar/foreach.m4, data/m4sugar/m4sugar.m4: Now links into
2795 submodules/autoconf.
2796
2797 2008-12-08 Akim Demaille <demaille@gostai.com>
2798
2799 Test token.prefix in all the skeletons.
2800 * data/java.m4 (b4_token_enum): Use the token.prefix.
2801 * tests/local.at (AT_BISON_OPTION_PUSHDEFS): Define AT_TOKEN_PREFIX.
2802 * tests/calc.at (_AT_DATA_CALC_Y): Use it.
2803 Add checks for yacc.c, glr.c, lalr1.cc and glr.cc.
2804 * tests/java.at: Comment changes.
2805 (AT_CHECK_JAVA_MINIMAL): Define the END token.
2806 (Java parser class and package names): Add token.prefix check.
2807
2808 2008-12-08 Akim Demaille <demaille@gostai.com>
2809
2810 Fix regeneration of atconfig.
2811 * tests/local.mk (tests/atconfig): The rule was incorrect, but
2812 remove it: now that there is no tests/Makefile.am, the top-level
2813 Makefile properly updates atconfig when needed.
2814
2815 2008-12-07 Di-an Jan <dianj@freeshell.org>
2816
2817 Implement the FIXME that ends an user action with a semicolon
2818 if it seems necessary.
2819 * src/scan-code.l (flex rules section): Flag cpp directive from
2820 any `#' to the first unescaped end-of-line. Semicolon is not
2821 needed after `;', `{', '}', or cpp directives and is needed after
2822 any other token (whitespaces and comments have no effect).
2823 * tests/actions.at (Fix user actions without a trailing semicolon):
2824 New test.
2825 * tests/input.at (AT_CHECK_UNUSED_VALUES): Add semicolons to
2826 to make user actions complete statements.
2827 Adjust column numbers in error messages.
2828 * tests/regression.at (Fix user actions without a trailing semicolon):
2829 Remove. Covered by new test.
2830
2831 2008-12-07 Akim Demaille <demaille@gostai.com>
2832
2833 Update gnulib.
2834 * gnulib: Update from master.
2835
2836 2008-12-05 Eric Blake <ebb9@byu.net>
2837
2838 Avoid compiler warning.
2839 * src/output.c (muscle_insert_item_number_table): Delete unused
2840 function.
2841
2842 2008-12-02 Eric Blake <ebb9@byu.net>
2843
2844 Build testsuite with newer autoconf.
2845 * tests/output.at (m4_expand): Don't override in newer autoconf,
2846 where the underlying implementation changed.
2847 * tests/cxx-type.at (_AT_RESOLVED_GLR_OUTPUT)
2848 (_AT_RESOLVED_GLR_OUTPUT_WITH_LOC, _AT_AMBIG_GLR_OUTPUT)
2849 (_AT_AMBIG_GLR_OUTPUT_WITH_LOC, _AT_GLR_STDERR)
2850 (_AT_VERBOSE_GLR_STDERR): Expand to double-quoted strings,
2851 since some of them contain unbalanced ')'.
2852
2853 2008-12-01 Akim Demaille <demaille@gostai.com>
2854
2855 Use b4_symbol for printers and destructors everywhere.
2856 * data/bison.m4 (b4_symbol_action_location): New.
2857 * data/c.m4 (b4_symbol_actions): Remove.
2858 Adjust all callers to use by b4_symbol_foreach and the corresponding
2859 b4_symbol_printer/destructor macro.
2860 * data/glr.cc: Adjust.
2861 * data/lalr1.java: Adjust the %destructor sanity check.
2862 * src/output.c (symbol_code_props_output): Remove, we no longer
2863 need the b4_symbol_printers/destructors tables.
2864
2865 2008-12-01 Akim Demaille <demaille@gostai.com>
2866
2867 Use b4_symbol_case_.
2868 * data/lalr1.cc, data/bison.m4 (b4_symbol_action): Use
2869 b4_symbol_case_.
2870
2871 2008-12-01 Akim Demaille <demaille@gostai.com>
2872
2873 Move b4_symbol based macro to bison.m4.
2874 * data/lalr1.cc (b4_symbol_, b4_symbol, b4_symbol_if)
2875 (b4_symbol_action, b4_symbol_destructor, b4_symbol_printer)
2876 (b4_symbol_case_, b4_symbol_foreach, b4_type_action_)
2877 (b4_type_foreach): Move to...
2878 * data/bison.m4: Here.
2879 * data/lalr1.cc (b4_symbol_action): Specialize for C++: use
2880 b4_symbol_value_template instead of b4_symbol_value.
2881
2882 2008-12-01 Akim Demaille <demaille@gostai.com>
2883
2884 b4_symbol/type_foreach.
2885 * data/lalr1.cc (b4_symbol_foreach, b4_type_foreach): New.
2886 Use them.
2887
2888 2008-12-01 Akim Demaille <demaille@gostai.com>
2889
2890 Use the symbol properties to output the printer/destructor for lalr1.cc.
2891 Instead of defining complex list of tuples to define various
2892 properties of the symbols, we now prefer to define symbols as
2893 "structs" in m4: using the symbol key (its number), and the
2894 property name, b4_symbol gives it value. Use this to handle
2895 destructors and printers.
2896
2897 * src/output.c (CODE_PROP): New.
2898 (prepare_symbol_definitions): Use it to define the printer and
2899 destructor related attributes of the symbols.
2900 * data/lalr1.cc (b4_symbol_actions): Rename as...
2901 (b4_symbol_action): this.
2902 Use b4_symbol instead of 6 arguments.
2903 (b4_symbol_printer, b4_symbol_destructor): New.
2904 Use them instead of b4_symbol_actions.
2905
2906 2008-12-01 Akim Demaille <demaille@gostai.com>
2907
2908 Avoid capturing variables too easily.
2909 * src/muscle_tab.h (MUSCLE_INSERT_BOOL, MUSCLE_OBSTACK_SGROW): Use
2910 v__ and p__ instead of v and p.
2911
2912 2008-12-01 Akim Demaille <demaille@gostai.com>
2913
2914 Remove spurious empty line before syncline.
2915 * data/bison.m4 (b4_syncline): Don't output an empty line before
2916 the output.
2917
2918 2008-11-26 Akim Demaille <demaille@gostai.com>
2919
2920 Convert lib/Makefile.am into lib/local.mk.
2921 The real problem is rather gnulib.mk, which itself is extracted
2922 from a Makefile.am that gnulib expects to the "recursive". The
2923 tool prefix-gnulib-mk converts such a gnulib.mk to be
2924 non-recursive. Also, some AC_SUBST variables need to be adjusted.
2925
2926 * etc/prefix-gnulib-mk: New.
2927 * bootstrap (slurp): Use it to convert further gnulib.mk.
2928 No longer try to avoid re-creation of lib/gnulib.mk as the changes
2929 are deeper.
2930 * lib/Makefile.am: Rename as...
2931 * lib/local.mk: this.
2932 Adjust to be prefixed.
2933 * Makefile.am, configure.ac: Adjust.
2934 * src/local.mk (AM_CPPFLAGS): Extend it, don't define it.
2935
2936 2008-11-26 Akim Demaille <demaille@gostai.com>
2937
2938 s/_FLAGS/FLAGS/.
2939 * tests/local.mk (TESTSUITE_FLAGS, AUTOTEST_FLAGS): Rename as...
2940 (TESTSUITEFLAGS, AUTOTESTFLAGS): these to compy with the GCS.
2941 Reported by Eric Blake.
2942
2943 2008-11-26 Akim Demaille <demaille@gostai.com>
2944
2945 Use b4_parser_tables_define in glr.cc.
2946 * data/glr.c: Use b4_parser_tables_define instead of defining the
2947 (deterministic integral) tables by hand.
2948
2949 2008-11-26 Akim Demaille <demaille@gostai.com>
2950
2951 Use b4_parser_tables_define in Java.
2952 * data/java.m4 (b4_typed_parser_table): Rename as...
2953 (b4_typed_parser_table_define): this, for consistency.
2954 Accept a comment as $4.
2955 Move $2 into yy*_.
2956 (b4_integral_parser_table): Rename as...
2957 (b4_integral_parser_table_define): this.
2958 * data/lalr1.java: Adjust all uses.
2959 Use b4_parser_tables_define instead of generation by hand.
2960
2961 2008-11-26 Akim Demaille <demaille@gostai.com>
2962
2963 Prepare the convergence bw C style and Java table generation.
2964 * data/bison.m4 (b4_tables_map, b4_tables_declare)
2965 (b4_tables_define): Rename as...
2966 (b4_integral_parser_tables_map, b4_parser_tables_declare)
2967 (b4_parser_tables_define): these.
2968 * data/c.m4 (b4_table_define): Rename as...
2969 (b4_integral_parser_table_define): this.
2970 * data/lalr1.cc: Adjust.
2971 (b4_table_define, b4_table_declare): Rename as...
2972 (b4_integral_parser_table_define)
2973 (b4_integral_parser_table_declare): these.
2974 (yyrline_): Move the comment where it is actually used.
2975 * data/yacc.c: Adjust.
2976 (yyrline): Use b4_integral_parser_table_define.
2977
2978 2008-11-26 Akim Demaille <demaille@gostai.com>
2979
2980 Regen.
2981 * src/parse-gram.h, src/parse-gram.c: Regen.
2982
2983 2008-11-26 Akim Demaille <demaille@gostai.com>
2984
2985 Factor the generation of the (integral) tables bw yacc.c and lalr1.cc.
2986 * data/lalr1.cc (b4_tables_map): Move to...
2987 * data/bison.m4: here.
2988 Update the comment for yytable during the flight.
2989 (b4_tables_declare, b4_tables_define): New.
2990 * data/lalr1.cc: Use them.
2991 * data/c.m4 (b4_table_define): New.
2992 * data/yacc.c: Use b4_tables_define instead of output the tables
2993 by hand.
2994 * tests/regression.at (Web2c Actions): Adjust the expected output,
2995 the order of the tables changed.
2996
2997 2008-11-26 Akim Demaille <demaille@gostai.com>
2998
2999 Get rid of (yy)rhs and (yy)prhs.
3000 These tables are no longer needed in the parsers, and they don't seem to
3001 be useful. They are not documented either.
3002
3003 * src/output.c (prepare_rules): Get rid of rhs and prhs.
3004 Adjust the computation of (yy)r2.
3005
3006 2008-11-26 Akim Demaille <demaille@gostai.com>
3007
3008 Rule length is unsigned.
3009 * src/gram.h, src/gram.c (rule_rhs_length): Return a size_t.
3010
3011 2008-11-26 Akim Demaille <demaille@gostai.com>
3012
3013 Get rid of lalr1-split.cc.
3014 It was no longer maintainer.
3015
3016 * data/lalr1-split.cc: Remove.
3017 * etc/bench.pl.in (bench_fusion_parser): Remove.
3018 Adjust.
3019
3020 2008-11-26 Akim Demaille <demaille@gostai.com>
3021
3022 Use yy* consistently.
3023 * data/glr.c: Now that yyrhs no longer exists as a global
3024 variable, rename local "rhs" variables into "yyrhs" for
3025 consistency.
3026
3027 2008-11-25 Akim Demaille <demaille@gostai.com>
3028
3029 Get rid of yyrhs and yyprhs in glr.c.
3030 * data/glr.c (yyrhs, yyprhs): Remove.
3031 Instead, use the state stack and yystos.
3032
3033 2008-11-25 Akim Demaille <demaille@gostai.com>
3034
3035 Flag glr tests.
3036 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): If glr, declare it
3037 as an Autotest keyword.
3038
3039 2008-11-25 Akim Demaille <demaille@gostai.com>
3040
3041 Prefer TESTSUITE_FLAGS.
3042 TESTSUITEFLAGS is barely readable.
3043
3044 * tests/local.mk (TESTSUITE_FLAGS): Default to $(TESTSUITEFLAGS)
3045 for backward compatibility.
3046 Use the former instead of the latter.
3047
3048 2008-11-25 Akim Demaille <demaille@gostai.com>
3049
3050 Get rid of yyrhs and yyprhs in larl1.java.
3051 * data/lalr1.java (yyrhs_, yyprhs_): Remove.
3052 (yy_reduce_print): Rather, use yystos_ and the state stack.
3053
3054 2008-11-25 Akim Demaille <demaille@gostai.com>
3055
3056 Formatting changes.
3057
3058 2008-11-25 Akim Demaille <demaille@gostai.com>
3059
3060 Get rid of yyrhs and yyprhs in yacc.c.
3061 They were used to get the symbol types, given a rule number, when
3062 displaying the top of the stack before a reduction. But the
3063 symbol type is available from the state stack. This has two be
3064 benefits: two tables less in the parser (making it smaller), and a
3065 more consistent use of the three stacks which will help to fuse
3066 them.
3067
3068 * data/yacc.c (yyprhs, yyrhs): Remove.
3069 (YY_REDUCE_PRINT): Pass yyssp to yy_reduce_print.
3070 (yy_reduce_print): Take yyssp as argument.
3071 Use it, together with yystos, to get the symbol type.
3072 * tests/regression.at (Web2c Report): Remove these tables from the
3073 expected output.
3074
3075 2008-11-25 Akim Demaille <demaille@gostai.com>
3076
3077 b4_tables_map.
3078 The point is to factor the generation of the tables across skeletons.
3079 This is language dependant.
3080
3081 * data/c.m4 (b4_comment_): New.
3082 Should be usable to define how to generate tables independently of
3083 the language.
3084 (b4_c_comment): New.
3085 (b4_comment): Bounce to b4_c_comment.
3086 Now support $2 = [PREFIX] for indentation.
3087 * data/lalr1.cc (b4_table_declare): Don't output a comment if
3088 there is no comment.
3089 Indent it properly when there is one.
3090 Output the ending semicolon.
3091 (b4_table_define): Space changes.
3092 Output the ending semicolon.
3093 (b4_tables_map): New.
3094 Use it twice instead of declaring and defining the (integral)
3095 tables by hand.
3096
3097 2008-11-25 Akim Demaille <demaille@gostai.com>
3098
3099 b4_table_declare.
3100 * data/lalr1.cc (b4_table_declare): New.
3101 Use it to declare the tables defined with b4_table_define.
3102 (b4_table_define): Declare a third arg to match b4_table_declare
3103 signature.
3104 Move all the comments around invocations of b4_table_define into
3105 the invocations itselves.
3106 Move things around to have the order for declarations and
3107 definitions.
3108
3109 2008-11-25 Akim Demaille <demaille@gostai.com>
3110
3111 Formatting changes.
3112 * data/lalr1.java: here.
3113
3114 2008-11-25 Akim Demaille <demaille@gostai.com>
3115
3116 b4_args is more general than only C++.
3117 * data/lalr1.cc (b4_args, _b4_args): Move to...
3118 * data/bison.m4: here.
3119
3120 2008-11-21 Di-an Jan <dianj@freeshell.org>
3121
3122 Implement no-XXX arguments for --warnings, --report, --trace.
3123 * src/getargs.c (flags_argmatch): Handles no-XXX.
3124 Fix typo in doxygen comment.
3125
3126 2008-11-21 Akim Demaille <demaille@gostai.com>
3127
3128 Display the changes in cross-options.texi.
3129 * build-aux/cross-options.pl ($sep): New, to separate items.
3130 * doc/local.mk ($(CROSS_OPTIONS_TEXI)): Use diff to display the
3131 changes.
3132
3133 2008-11-20 Di-an Jan <dianj@freeshell.org>
3134
3135 Improves options in the manual.
3136 * doc/bison.texinfo (-g, -x): Add space before argument.
3137 (Option Cross Key): Implement FIXME: listing directives also.
3138 * build-aux/cross-options.pl: Read from <STDIN> rather than <>.
3139 (Short Option): Special case -d. Put arguments inside @option.
3140 (Bison Directive): Add column, automatically extracted from
3141 src/scan-gram.l (actual name passed as the first argument)
3142 with special case for %define.
3143 * doc/local.mk (doc/cross-options.texi): Pass src/scan-gram.l
3144 to build-aux/cross-options.pl.
3145 * src/getargs.c (usage): Document limitations of cross-options.pl.
3146 * src/scan-gram.l: Likewise.
3147
3148 2008-11-18 Joel E. Denny <jdenny@ces.clemson.edu>
3149
3150 Fix unexpanded macros in GLR defines file.
3151 Reported by Csaba Raduly at
3152 <http://lists.gnu.org/archive/html/bug-bison/2008-11/msg00048.html>.
3153 * THANKS (Csaba Raduly): Add.
3154 * data/glr.c: Fix overquoting on b4_prefix for yylval and yylloc.
3155 * tests/calc.at (_AT_DATA_CALC_Y): If %defines is specified, generate
3156 lexer in a separate module that includes the defines file.
3157 (AT_CHECK_CALC): From AT_FULL_COMPILE, request compilation of lexer
3158 source.
3159 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Push AT_DEFINES_IF.
3160 Adjust AT_LOC and AT_VAL to use AT_NAME_PREFIX.
3161 (AT_BISON_OPTION_POPDEFS): Pop AT_DEFINES_IF.
3162 (AT_DATA_SOURCE_PROLOGUE): New.
3163 (AT_DATA_GRAMMAR_PROLOGUE): Use AT_DATA_SOURCE_PROLOGUE.
3164 (AT_DATA_SOURCE): New.
3165 (AT_FULL_COMPILE): Extend to support an additional source file.
3166
3167 2008-11-18 Akim Demaille <demaille@gostai.com>
3168
3169 More TODO.
3170 * TODO: More short term issues.
3171
3172 2008-11-18 Akim Demaille <demaille@gostai.com>
3173
3174 Regen.
3175 * src/parse-gram.h, src/parse-gram.c: Regen.
3176
3177 2008-11-18 Akim Demaille <demaille@gostai.com>
3178
3179 Use b4_subtract where possible.
3180 * data/lalr1.cc (b4_subtract): Move to...
3181 * data/bison.m4: here.
3182 * data/glr.c (b4_rhs_data): Use it.
3183 * data/yacc.c (b4_rhs_value, b4_rhs_location): Use it.
3184
3185 2008-11-18 Akim Demaille <demaille@gostai.com>
3186
3187 Remove incorrect mode specification.
3188 * data/glr.cc: Don't pretend it's C code.
3189
3190 2008-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
3191
3192 Simplify last patch slightly.
3193 * src/getargs.c (getargs): Here.
3194
3195 2008-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
3196
3197 Fix last warning from --enable-gcc-warnings.
3198 * src/getargs.c (getargs): Don't assign const address to non-const
3199 pointer.
3200
3201 2008-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
3202
3203 Don't let maintainer-*-check targets force a version update.
3204 * cfg.mk (_is-dist-target): Implement. maintainer-check* was already
3205 handled.
3206
3207 2008-11-17 Di-an Jan <dianj@freeshell.org>
3208
3209 * doc/bison.texinfo: Synchronize ``Detail Node Listing''.
3210 Align menus. Adjust word wrapping. Use node names for menu names.
3211 (Examples): Don't abbreviate node names.
3212 (LocalWords): Remove abbreviations.
3213 (Copying): Make description a sentence.
3214 (Java Action Features): Remove period to match the rest of menu.
3215
3216 2008-11-17 Di-an Jan <dianj@freeshell.org>
3217
3218 Handles several --enable-gcc-warnings.
3219 * src/getargs.c (command_line_location): Set parameters to void.
3220 * src/output.c (symbol_type_name_cmp): Make static.
3221 (symbols_by_type_name): Set parameters to void.
3222 (symbol_definitions_output): Remove unused parameter. Rename as...
3223 (prepare_symbol_definitions): this.
3224 (muscles_output): Move symbol_definitions_output to...
3225 (output): here as prepare_symbol_definitions.
3226 * tests/c++.at (AT_CHECK_VARIANTS): Remove unused parameters of main.
3227 (AT_CHECK_NAMESPACE): Make unused parameter lloc unnamed.
3228
3229 2008-11-17 Di-an Jan <dianj@freeshell.org>
3230
3231 * tests/c++.at (AT_CHECK_VARIANTS): Fixes tests 198-202.
3232 Use AT_DATA_GRAMMAR instead of AT_DATA for compiled tests.
3233
3234 2008-11-16 Akim Demaille <demaille@gostai.com>
3235
3236 Add missing $(EXEEXT).
3237 * doc/local.mk ($(CROSS_OPTIONS_TEXI)): The target is
3238 "src/bison$(EXEEXT)".
3239 Reported by Di-an Jan.
3240
3241 2008-11-15 Akim Demaille <demaille@gostai.com>
3242
3243 * TODO: Update.
3244
3245 2008-11-15 Akim Demaille <demaille@gostai.com>
3246
3247 Formatting changes.
3248 * tests/input.at: here.
3249
3250 2008-11-15 Akim Demaille <demaille@gostai.com>
3251
3252 Remove duplicate header inclusion.
3253 * src/LR0.c: here.
3254
3255 2008-11-15 Akim Demaille <demaille@gostai.com>
3256
3257 * src/parse-gram.h, src/parse-gram.c: Regen.
3258
3259 2008-11-15 Akim Demaille <demaille@gostai.com>
3260
3261 Support parametric types.
3262
3263 There are two issues to handle: first scanning nested angle
3264 bracket pairs to support types such as std::pair< std::string,
3265 std::list<std::string> > >.
3266
3267 Another issue is to address idiosyncracies of C++: do not glue two
3268 closing angle brackets together (otherwise it's operator>>), and
3269 avoid sticking blindly a TYPE to the opening <, as it can result
3270 in '<:' which is a digraph for '['.
3271
3272 * src/scan-gram.l (brace_level): Rename as...
3273 (nesting): this.
3274 (SC_TAG): New.
3275 Implement support for complex tags.
3276 (tag): Accept
3277 , but not <.
3278 * data/lalr1.cc (b4_symbol_value, b4_symbol_value_template)
3279 (b4_symbol_variant): Leave space around types as parameters.
3280 * examples/variant.yy: Use nested template types and leading ::.
3281 * src/parse-gram.y (TYPE, TYPE_TAG_ANY, TYPE_TAG_NONE, type.opt):
3282 Rename as...
3283 (TAG, TAG_ANY, TAG_NONE, tag.opt): these.
3284 * tests/c++.at: Test parametric types.
3285
3286 2008-11-15 Akim Demaille <akim@betelgeuse.gostai.ensta.fr>
3287
3288 Test token.prefix.
3289 This is not sufficient, but we test at least that the make_SYMBOL
3290 interface is not affected by token.prefix. A more general test
3291 will be implemented when the support of token.prefix is generalized
3292 to more skeletons.
3293
3294 * tests/c++.at: One more variant test, using token.prefix.
3295
3296 2008-11-15 Akim Demaille <akim@betelgeuse.gostai.ensta.fr>
3297
3298 Test the make_TOKEN interface.
3299 * tests/c++.at (AT_CHECK_VARIANTS): Require and use locations.
3300 Factor the common code in yylex.
3301 Use it to test "%define lex_symbol".
3302
3303 2008-11-15 Akim Demaille <akim@betelgeuse.gostai.ensta.fr>
3304
3305 Formatting change.
3306
3307 2008-11-15 Akim Demaille <akim@betelgeuse.gostai.ensta.fr>
3308
3309 Simplify code for variants bench marks.
3310 * etc/bench.pl.in (&generate_grammar_list): Define and use
3311 location_type.
3312 Factor the common code in yylex.
3313
3314 2008-11-15 Akim Demaille <demaille@gostai.com>
3315
3316 Better error message.
3317 * bootstrap (find_tool): Fix the error message.
3318
3319 2008-11-15 Akim Demaille <demaille@gostai.com>
3320
3321 Update variant.yy to newest interface.
3322 * examples/variant.yy: Define lex_symbol.
3323 Adjust.
3324
3325 2008-11-15 Akim Demaille <demaille@gostai.com>
3326
3327 Don't use locations in variant.yy.
3328 * examples/variant.yy: Adjust to not using locations.
3329
3330 2008-11-15 Akim Demaille <demaille@gostai.com>
3331
3332 Comment changes.
3333 * data/local.mk, etc/local.mk, examples/local.mk: Use Automake
3334 comments for the license.
3335
3336 2008-11-15 Akim Demaille <demaille@gostai.com>
3337
3338 Remove tests/Makefile.am.
3339 * tests/Makefile.am: Rename as...
3340 * tests/local.mk: this.
3341 * Makefile.am, configure.ac: Adjust.
3342 * Makefile.am (DISTCLEANFILES): Define.
3343 (maintainer-check, maintainer-xml-check, maintainer-push-check):
3344 Remove, we no longer need to bounce to the real targets.
3345
3346 2008-11-15 Akim Demaille <demaille@gostai.com>
3347
3348 Comment changes.
3349
3350 2008-11-15 Akim Demaille <demaille@gostai.com>
3351
3352 djgpp/local.mk.
3353 * Makefile.am (EXTRA_DIST): Move djgpp related part to...
3354 * djgpp/local.mk: this new file.
3355
3356 2008-11-15 Akim Demaille <demaille@gostai.com>
3357
3358 Remove doc/Makefile.am.
3359 * doc/Makefile.am: Rename as...
3360 * doc/local.mk: this.
3361 Adjust paths
3362 * Makefile.am, configure.ac: Adjust.
3363 * Makefile.am (MOSTLYCLEANFILES): New.
3364 * src/local.mk: Adjust.
3365
3366 2008-11-15 Akim Demaille <demaille@gostai.com>
3367
3368 Move sc_tight_scope into maint.mk.
3369 It does not work, and I don't know how it was supposed to work: it
3370 seems to be looking for sources in the build tree. I just moved
3371 it at a better place, fixing it is still required.
3372
3373 * src/local.mk (echo): Remove.
3374 (sc_tight_scope): Move to...
3375 * maint.mk: here.
3376
3377 2008-11-15 Akim Demaille <demaille@gostai.com>
3378
3379 Regen.
3380 * src/parse-gram.h, src/parse-gram.h: Regen.
3381
3382 2008-11-15 Akim Demaille <demaille@gostai.com>
3383
3384 Remove src/Makefile.am.
3385 * src/Makefile.am: Rename as...
3386 * src/local.mk: this.
3387 Prefix all the paths with src/.
3388 (AUTOMAKE_OPTIONS): Build object files in the sub dirs.
3389 (AM_CPPFLAGS): Find find in builddir/src.
3390 (YACC): Move the flags into...
3391 (AM_YFLAGS): here.
3392 * maint.mk (sc_tight_scope): Disable.
3393 It used to bounce to the version in src/Makefile.am which is now
3394 part of this very Makefile.
3395 * Makefile.am, configure.ac: Adjust.
3396 * src/scan-code-c.c, src/scan-code.l: We can no longer rely on
3397 include "..." to find files "here": we are no longer in src/, so
3398 qualify the includes with src/.
3399 * doc/Makefile.am (PREPATH): No longer include the top_builddir
3400 prefix.
3401 (.x.1): Adjust to be able to create src/foo from the top level
3402 Makefile, instead of going bounce to src/Makefile the creation of
3403 foo.
3404
3405 2008-11-15 Akim Demaille <demaille@gostai.com>
3406
3407 Remove useless variable.
3408 * doc/Makefile.am (srcsrcdir): Remove.
3409
3410 2008-11-15 Akim Demaille <demaille@gostai.com>
3411
3412 Remove data/Makefile.am.
3413 * data/Makefile.am: Rename as...
3414 * data/local.mk: this.
3415 Adjust paths.
3416 * Makefile.am, configure.ac: Adjust.
3417
3418 2008-11-15 Akim Demaille <demaille@gostai.com>
3419
3420 Remove etc/Makefile.am.
3421 * etc/Makefile.am: Rename as...
3422 * etc/local.mk: this.
3423 Adjust.
3424 * Makefile.am, configure.ac: Adjust.
3425
3426 2008-11-15 Akim Demaille <demaille@gostai.com>
3427
3428 Remove examples/local.mk.
3429 examples/calc++/Makefile.am might be interesting to keep as is, since
3430 it is an example in itself.
3431
3432 * examples/Makefile.am: Rename as...
3433 * examples/local.mk: this.
3434 Adjust.
3435 * Makefile.am, configure.ac: Adjust.
3436
3437 2008-11-15 Akim Demaille <demaille@gostai.com>
3438
3439 Remove build-aux/Makefile.am.
3440 Recursive Makefiles are really way too slow, let's get rid of some of
3441 them.
3442
3443 * build-aux/Makefile.am: Rename as...
3444 * build-aux/local.mk: this.
3445 Adjust paths.
3446 * Makefile.am, configure.ac: Adjust.
3447
3448 2008-11-15 Akim Demaille <demaille@gostai.com>
3449
3450 Provide convenience constructors for locations and positions.
3451 * data/location.cc (position::position): Accept file, line and
3452 column as arguments with default values.
3453 Always qualify initial line and column literals as unsigned.
3454 (location::location): Provide convenience constructors.
3455
3456 2008-11-15 Akim Demaille <demaille@gostai.com>
3457
3458 Instead of using make_symbol<TOK_FOO>, generate make_FOO for each
3459 token type.
3460 Using template buys us nothing, and makes it uselessly complex to
3461 construct a symbol. Besides, it could not be generalized to other
3462 languages, while make_FOO would work in C/Java etc.
3463
3464 * data/lalr1.cc (b4_symbol_): New.
3465 (b4_symbol): Use it.
3466 (b4_symbol_constructor_declaration_)
3467 (b4_symbol_constructor_definition_): Instead of generating
3468 specializations of an overloaded template function, just generate
3469 several functions whose names are forged from the token names
3470 without the token.prefix.
3471 (b4_symbol_constructor_declarations): Generate them for all the
3472 symbols, not just by class of symbol type, now that instead of
3473 specializing a function template by the token, we generate a
3474 function named after the token.
3475 (b4_symbol_constructor_specialization_)
3476 (b4_symbol_constructor_specializations): Remove.
3477 * etc/bench.pl.in: Adjust to this new API.
3478
3479 2008-11-13 Akim Demaille <demaille@gostai.com>
3480
3481 %define token.prefix.
3482 Provide a means to add a prefix to the name of the tokens as
3483 output in the generated files. Because of name clashes, it is
3484 good to have such a prefix such as TOK_ that protects from names
3485 such as EOF, FILE etc. But it clutters the grammar itself.
3486
3487 * data/bison.m4 (token.prefix): Empty by default.
3488 * data/c.m4 (b4_token_enum, b4_token_define): Use it.
3489 * data/lalr1.cc (b4_symbol): Ditto.
3490
3491 2008-11-13 Akim Demaille <demaille@gostai.com>
3492
3493 Compute at M4 time some of the subtractions.
3494 * data/lalr1.cc (b4_subtract): New.
3495 (b4_rhs_data): Use it.
3496
3497 2008-11-13 Akim Demaille <demaille@gostai.com>
3498
3499 symbol::token.
3500 This allows the user to get the type of a token returned by yylex.
3501
3502 * data/lalr1.cc (symbol::token): New.
3503 (yytoknum_): Define when %define lex_symbol, independently of
3504 %debug.
3505 (yytoken_number_): Move into...
3506 (symbol::token): here, since that's the only use.
3507 The other one is YYPRINT which was not officially supported
3508 by lalr1.cc, and anyway it did not work since YYPRINT uses this
3509 array under a different name (yytoknum).
3510
3511 2008-11-13 Akim Demaille <demaille@gostai.com>
3512
3513 YYERRCODE.
3514 * TODO (YYERRCODE): Mention the case of $undef.
3515
3516 2008-11-13 Akim Demaille <demaille@gostai.com>
3517
3518 TODO: YYPRINT.
3519 * TODO (YYPRINT): New.
3520
3521 2008-11-13 Akim Demaille <demaille@gostai.com>
3522
3523 Comment changes.
3524 * data/lalr1.cc, data/yacc.c: Fix the description of the
3525 yytranslate and yytoknum tables.
3526
3527 2008-11-13 Akim Demaille <demaille@gostai.com>
3528
3529 Define make_symbol in the header.
3530 To reach good performances these functions should be inlined (yet
3531 this is to measure precisely). To this end they must be available
3532 to the caller.
3533
3534 * data/lalr1.cc (b4_symbol_constructor_definition_): Qualify
3535 location_type with the class name.
3536 Since will now be output in the header, declare "inline".
3537 No longer use b4_symbol_constructor_specializations, but
3538 b4_symbol_constructor_definitions in the header.
3539 Don't call it in the *.cc file.
3540
3541 2008-11-13 Akim Demaille <demaille@gostai.com>
3542
3543 Define yytranslate in the header for lex_symbol.
3544 * data/lalr1.cc: Move the invocation of b4_yytranslate_definition
3545 into the header file when using %define lex_symbol.
3546 (yytranslate_): Declare inline.
3547
3548 2008-11-13 Akim Demaille <demaille@gostai.com>
3549
3550 Define the constructors of symbol_type in
3551 b4_symbol_constructor_definitions.
3552 The constructors are called by the make_symbol functions, which a
3553 forthcoming patch will move elsewhere. Hence the interest of
3554 putting them together.
3555
3556 The stack_symbol_type does not need to be moved, it is used only
3557 by the parser.
3558
3559 * data/lalr1.cc: Move symbol_type and symbol_base_type
3560 constructors into...
3561 (b4_symbol_constructor_definitions): here.
3562 Adjust.
3563
3564 2008-11-13 Akim Demaille <demaille@gostai.com>
3565
3566 Make it easier to move the definition of yytranslate_.
3567 Forthcoming changes will make it possible to use yytranslate_
3568 from outside the parser implementation file.
3569
3570 * data/lalr1.cc (b4_yytranslate_definition): New.
3571 Use it.
3572
3573 2008-11-13 Akim Demaille <demaille@gostai.com>
3574
3575 Remove useless class specification.
3576 * data/lalr1.cc (b4_symbol_constructor_specialization_): No need
3577 to refer to the class name to use a type defined by the class for
3578 arguments of member functions.
3579
3580 2008-11-13 Akim Demaille <demaille@gostai.com>
3581
3582 Finer input type for yytranslate.
3583 This patch is debatable: the tradition expects yylex to return an int
3584 which happens to correspond to token_number (which is an enum). This
3585 allows for instance to return characters (such as '*' etc.). But this
3586 goes against the stronger typing I am trying to have with the new
3587 lex interface which return a symbol_type. So in this case, feed
3588 yytranslate_ with a token_type.
3589
3590 * data/lalr1.cc (yytranslate_): When in %define lex-symbol,
3591 expect a token_type.
3592
3593 2008-11-13 Akim Demaille <demaille@gostai.com>
3594
3595 Honor lex-params in %define lex_symbol mode.
3596 * data/lalr1.cc: Use b4_lex_param.
3597
3598 2008-11-13 Akim Demaille <demaille@gostai.com>
3599
3600 Simplify names.
3601 * src/output.c (symbol_definitions_output): Rename symbol
3602 attributes type_name and has_type_name as type and has_type.
3603 * data/lalr1.cc: Adjust uses.
3604
3605 2008-11-13 Akim Demaille <demaille@gostai.com>
3606
3607 Use b4_type_names for the union type.
3608 The union used to compute the size of the variant used to iterate
3609 over the type of all the symbols, with a lot of redundancy. Now
3610 iterate over the lists of symbols having the same type-name.
3611
3612 * data/lalr1.cc (b4_char_sizeof_): New.
3613 (b4_char_sizeof): Use it.
3614 Adjust to be called with a list of numbers instead of a single
3615 number.
3616 Adjust its caller for new-line issues.
3617
3618 2008-11-13 Akim Demaille <demaille@gostai.com>
3619
3620 Define the "identifier" of a symbol.
3621 Symbols may have several string representations, for instance if
3622 they have an alias. What I call its "id" is a string that can be
3623 used as an identifier. May not exist.
3624
3625 Currently the symbols which have the "tag_is_id" flag set are
3626 those that don't have an alias. Look harder for the id.
3627
3628 * src/output.c (is_identifier): Move to...
3629 * src/symtab.c (is_identifier): here.
3630 * src/symtab.h, src/symtab.c (symbol_id_get): New.
3631 * src/output.c (symbol_definitions_output): Use it to define "id"
3632 and "has_id".
3633 Remove the definition of "tag_is_id".
3634 * data/lalr1.cc: Use the "id" and "has_id" whereever "tag" and
3635 "tag_is_id" were used to produce code.
3636 We still use "tag" for documentation.
3637
3638 2008-11-11 Akim Demaille <demaille@gostai.com>
3639
3640 Locations are no longer required by lalr1.cc.
3641 * data/lalr1.cc (_b4_args, b4_args): New.
3642 Adjust all uses of locations to make them optional.
3643 * tests/c++.at (AT_CHECK_VARIANTS): No longer use the locations.
3644 (AT_CHECK_NAMESPACE): Check the use of locations.
3645 * tests/calc.at (_AT_DATA_CALC_Y): Adjust to be usable with or
3646 without locations with lalr1.cc.
3647 Test these cases.
3648 * tests/output.at: Check lalr1.cc with and without location
3649 support.
3650 * tests/regression.at (_AT_DATA_EXPECT2_Y, _AT_DATA_DANCER_Y):
3651 Don't use locations.
3652
3653 2008-11-11 Akim Demaille <demaille@gostai.com>
3654
3655 AT_FULL_COMPILE.
3656 * tests/local.at (AT_FULL_COMPILE): New.
3657 * tests/actions.at, tests/calc.at, tests/regression.at: Use it.
3658
3659 2008-11-11 Akim Demaille <demaille@gostai.com>
3660
3661 Support parens in calc++.
3662 * doc/bison.texinfo (Calc++ Scanner, Calc++ Parser): Support parens.
3663 * examples/calc++/test (run): Check the expected output.
3664 Adjust callers.
3665 Check parens too.
3666
3667 2008-11-11 Akim Demaille <demaille@gostai.com>
3668
3669 Simplify lalr1.cc since %defines is mandatory.
3670 * data/lalr1.cc: Remove useless calls to b4_defines_if.
3671
3672 2008-11-11 Akim Demaille <demaille@gostai.com>
3673
3674 TODO: yyfmt.
3675 * TODO (yysyntax_error): New item.
3676
3677 2008-11-11 Akim Demaille <demaille@gostai.com>
3678
3679 Prefer M4 to CPP.
3680 * data/lalr1.cc: Use b4_error_verbose_if instead of #if
3681 YYERROR_VERBOSE.
3682
3683 2008-11-11 Akim Demaille <demaille@gostai.com>
3684
3685 Support i18n of the parse error messages.
3686 * TODO (lalr1.cc/I18n): Remove.
3687 * data/lalr1.cc (yysyntax_error_): Support the translation of the
3688 error messages, as done in yacc.c.
3689 Stay within the yy* pseudo namespace.
3690
3691 2008-11-11 Akim Demaille <demaille@gostai.com>
3692
3693 More TODO.
3694 * TODO (single stack, yysyntax_error): New.
3695
3696 2008-11-11 Akim Demaille <demaille@gostai.com>
3697
3698 Make it possible to return a symbol_type from yylex.
3699 * data/lalr1.cc (b4_lex_symbol_if): New.
3700 (parse): When lex_symbol is defined, expected yylex to return the
3701 complete lookahead.
3702 * etc/bench.pl.in (generate_grammar_list): Extend to support this
3703 yylex interface.
3704 (bench_variant_parser): Exercise it.
3705
3706 2008-11-11 Akim Demaille <demaille@gostai.com>
3707
3708 Remove useless bench case.
3709 * etc/bench.pl.in (bench_variant_parser): VARIANT_DESTROY is
3710 no longer used.
3711
3712 2008-11-11 Akim Demaille <demaille@gostai.com>
3713
3714 Improve display of directives.
3715 * etc/bench.pl.in (parse_term): Don't add useless eol.
3716
3717 2008-11-11 Akim Demaille <demaille@gostai.com>
3718
3719 Use string_cast in the bench.
3720 * etc/bench.pl.in (generate_grammar_list): Define and use
3721 string_cast.
3722
3723 2008-11-11 Akim Demaille <demaille@gostai.com>
3724
3725 Replace yychar with a Boolean.
3726 * data/lalr1.cc (parse::yychar): Replace by...
3727 (parse::yyempty): this.
3728
3729 2008-11-11 Akim Demaille <demaille@gostai.com>
3730
3731 Factor the tables.
3732 * TODO: New item.
3733
3734 2008-11-11 Akim Demaille <demaille@gostai.com>
3735
3736 Let yytranslate handle the eof case.
3737 * data/lalr1.cc (yytranslate_): Handle the EOF case.
3738 Adjust callers.
3739 No longer expect yychar to be equal to yyeof_, rather, test the
3740 lookahead's (translated) kind.
3741
3742 2008-11-11 Akim Demaille <demaille@gostai.com>
3743
3744 yychar cannot be empty in yyerrlab.
3745 * TODO (yychar == yyempty_): New.
3746 * data/lalr1.cc: Remove the handling of this case.
3747 This eases forthcoming changes related to yychar and yytranslate.
3748
3749 2008-11-11 Akim Demaille <demaille@gostai.com>
3750
3751 Bench: syntactic sugar for %define/#define.
3752 * etc/bench.pl.in (parse_dirs): Support %d and #d with arguments.
3753 (&bench_push_parser, bench_variant_parser): Use this feature.
3754 (&eat): New.
3755 Use it.
3756
3757 2008-11-11 Akim Demaille <demaille@gostai.com>
3758
3759 Less memory pressure on the "list" bench.
3760 * etc/bench.pl.in (generate_grammar_list): Do not accumulate all
3761 the values, to limit memory pressure.
3762
3763 2008-11-11 Akim Demaille <demaille@gostai.com>
3764
3765 Introduce make_symbol.
3766 make_symbol provides a means to construct a full symbol (kind,
3767 value, location) in a single shot. It is meant to be a Symbol
3768 constructor, parameterized by the symbol kind so that overloading
3769 would prevent incorrect kind/value pairs. Unfortunately
3770 parameterized constructors do not work well in C++ (unless the
3771 parameter also appears as an argument, which is not acceptable),
3772 hence the use of a function instead of a constructor.
3773
3774 * data/lalr1.cc (b4_symbol_constructor_declaration_)
3775 (b4_symbol_constructor_declarations)
3776 (b4_symbol_constructor_specialization_)
3777 (b4_symbol_constructor_specializations)
3778 (b4_symbol_constructor_definition_)
3779 (b4_symbol_constructor_definitions): New.
3780 Use them where appropriate to generate declaration, declaration of
3781 the specializations, and implementations of the templated
3782 overloaded function "make_symbol".
3783 (variant::variant): Always define a default ctor.
3784 Also provide a copy ctor.
3785 (symbol_base_type, symbol_type): New ctor overloads for value-less
3786 symbols.
3787 (symbol_type): Now public, so that functions such as yylex can use
3788 it.
3789
3790 2008-11-11 Akim Demaille <demaille@gostai.com>
3791
3792 Inform m4 whether a tag is a valid id.
3793 * src/output.c (is_identifier): New.
3794 (symbol_definitions_output): Use it to define tag_is_id.
3795 But maybe this should be done at m4 level?
3796
3797 2008-11-11 Akim Demaille <demaille@gostai.com>
3798
3799 Test 214 was failing: it greps with a pattern containing [ ]*
3800 which obviously meant to catch spaces and tabs, but contained only
3801 spaces. Tabulations in sources are a nuisance, so to simplify the
3802 matter, get rid of all the tabulations in the Java sources. The
3803 other skeletons will be treated equally later.
3804
3805 * data/java.m4, data/lalr1.java: Untabify.
3806 * tests/java.at: Simplify AT_CHECK_JAVA_GREP invocations:
3807 tabulations are no longer generated.
3808
3809 2008-11-11 Paolo Bonzini <bonzini@gnu.org>
3810
3811 * bootstrap.conf: Replace m4/warning.m4 with warnings module.
3812 * configure.ac: Adjust usage.
3813 * lib/Makefile.am: Replace $(WARNING_CFLAGS) with $(WARN_CFLAGS).
3814 * src/Makefile.am: Replace $(WARNING_CFLAGS) with $(WARN_CFLAGS).
3815 * tests/atlocal.in: Replace $(WARNING_*FLAGS) with $(WARN_*FLAGS).
3816
3817 2008-11-10 Di-an Jan <dianj@freeshell.org>
3818
3819 Workaround Java's ``code too large'' problem for parser tables
3820 in most cases, by using one function per initialization.
3821 * data/java.m4 (b4_typed_parser_table, b4_integral_parser_table): New.
3822 * data/lalr1.java (yypact_, yydefact_, yypgoto_, yydefgoto_,
3823 yytable_, yycheck_, yystos_, yytoken_number_, yyr1_, yyr2_, yyrhs_
3824 yyprhs_, yyrline_, yytranslate_table_): Use b4_integral_parser_table.
3825 (yytname_): Use b4_typed_parser_table.
3826 * doc/bison.texinfo (Java Bison Interface): Add note on Java's
3827 ``code too large'' error.
3828
3829 2008-11-10 Di-an Jan <dianj@freeshell.org>
3830
3831 * NEWS: Document them.
3832
3833 General Java skeleton improvements.
3834 * configure.ac (gt_JAVACOMP): Request target of 1.4, which allows
3835 using gcj < 4.3 in the testsuite, according to comments in
3836 gnulib/m4/javacomp.m4.
3837 * data/java.m4 (stype, parser_class_name, lex_throws, throws,
3838 location_type, position_type): Remove extraneous brackets from
3839 b4_percent_define_default.
3840 (b4_lex_param, b4_parse_param): Remove extraneous brackets from
3841 m4_define and m4_define_default.
3842 * data/lalr1.java (b4_pre_prologue): Change to b4_user_post_prologue,
3843 which marks the end of user code with appropriate syncline, like all
3844 the other skeletons.
3845 (b4_user_post_prologue): Add. Don't silently drop.
3846 (yylex): Remove.
3847 (parse): Inline yylex.
3848 * doc/bison.texinfo (bisonVersion, bisonSkeleton): Document.
3849 (%{...%}): Fix typo of %code imports.
3850 * tests/java.at (AT_JAVA_COMPILE): Add "java" keyword.
3851
3852 Support annotations on parser class with %define annotations.
3853 * data/lalr1.java (annotations): Add to parser class modifier.
3854 * doc/bison.texinfo (Java Parser Interface): Document
3855 %define annotations.
3856 (Java Declarations Summary): Document %define annotations.
3857 * tests/java.at (Java parser class modifiers): Test annotations.
3858
3859 Do not generate code for %error-verbose unless requested.
3860 * data/lalr1.java (errorVerbose): Rename to yyErrorVerbose.
3861 Make private. Make conditional on %error-verbose.
3862 (getErrorVerbose, setErrorVerbose): New.
3863 (yytnamerr_): Make conditional on %error-verbose.
3864 (yysyntax_error): Make some code conditional on %error-verbose.
3865 * doc/bison.texinfo (Java Bison Interface): Remove the parts
3866 about %error-verbose having no effect.
3867 (getErrorVerbose, setErrorVerbose): Document.
3868
3869 Move constants for token names to Lexer interface.
3870 * data/lalr1.java (Lexer): Move EOF, b4_token_enums(b4_tokens) here.
3871 * data/java.m4 (b4_token_enum): Indent for move to Lexer interface.
3872 (parse): Qualify EOF to Lexer.EOF.
3873 * doc/bison.texinfo (Java Parser Interface): Move documentation of
3874 EOF and token names to Java Lexer Interface.
3875 * tests/java.at (_AT_DATA_JAVA_CALC_Y): Remove Calc qualifier.
3876
3877 Make yyerror public.
3878 * data/lalr1.java (Lexer.yyerror): Use longer parameter name.
3879 (yyerror): Change to public. Add Javadoc comments. Use longer
3880 parameter names. Make the body rather than the declarator
3881 conditional on %locations.
3882 * doc/bison.texinfo (yyerror): Document. Don't mark as protected.
3883
3884 Allow user to add code to the constructor with %code init.
3885 * data/java.m4 (b4_init_throws): New, for %define init_throws.
3886 * data/lalr1.java (YYParser.YYParser): Add b4_init_throws.
3887 Add %code init to the front of the constructor body.
3888 * doc/bison.texinfo (YYParser.YYParser): Document %code init
3889 and %define init_throws.
3890 (Java Declarations Summary): Document %code init and
3891 %define init_throws.
3892 * tests/java.at (Java %parse-param and %lex-param): Adjust grep.
3893 (Java constructor init and init_throws): Add tests.
3894
3895 2008-11-10 Akim Demaille <demaille@gostai.com>
3896
3897 Update TODO.
3898 * TODO (-D): is implemented.
3899 (associativity): Same precedence must have the same associativity.
3900 For instance, how can a * b / c be parsed if * is %left and / is
3901 %right?
3902 (YYERRORCODE, YYFAIL, YYBACKUP): New.
3903
3904 2008-11-10 Akim Demaille <demaille@gostai.com>
3905
3906 Formatting changes.
3907
3908 2008-11-10 Akim Demaille <demaille@gostai.com>
3909
3910 More information about the symbols.
3911 * src/output.c (type_names_output): Document all the symbols,
3912 including those that don't have a type-name.
3913 (symbol_definitions_output): Define "is_token" and
3914 "has_type_name".
3915 * data/lalr1.cc (b4_type_action_): Skip symbols that have an empty
3916 type-name, now that they are defined too in b4_type_names.
3917
3918 2008-11-10 Akim Demaille <demaille@gostai.com>
3919
3920 Regen.
3921
3922 2008-11-10 Akim Demaille <demaille@gostai.com>
3923
3924 Make parser::yytranslate static.
3925 Small speedup (1%) on the list grammar. And makes yytranslate_
3926 available in non member functions.
3927
3928 * data/lalr1.cc (yytranslate_): Does not need to be a instance
3929 function.
3930
3931 2008-11-10 Akim Demaille <demaille@gostai.com>
3932
3933 Avoid trailing spaces.
3934 * data/c.m4: b4_comment(TEXT): Don't indent empty lines.
3935 * data/lalr1.cc: Don't indent before rule and symbol actions, as
3936 they can be empty, and anyway this incorrectly indents the first
3937 action.
3938
3939 2008-11-10 Akim Demaille <demaille@gostai.com>
3940
3941 Comment changes.
3942
3943 2008-11-10 Akim Demaille <demaille@gostai.com>
3944
3945 Use "enum" for integral constants.
3946 This is just nicer to read, I observed no speedup.
3947
3948 * data/lalr1.cc (yyeof_, yylast_, yynnts_, yyempty_, yyfinal_)
3949 (yterror_, yyerrcode_, yyntokens_): Define as members of an enum.
3950 (yyuser_token_number_max_, yyundef_token_): Move into...
3951 (yytranslate_): here.
3952
3953 2008-11-10 Akim Demaille <demaille@gostai.com>
3954
3955 Shortcuts in bench directives.
3956 * etc/bench.pl.in (parse_dirs): New.
3957 Use it.
3958 (bench_variant_parser, bench_fusion_parser): Use %s and %d.
3959 Create the benches in "benches/".
3960
3961 2008-11-10 Akim Demaille <demaille@gostai.com>
3962
3963 Formatting changes.
3964 * data/lalr1.cc: here.
3965
3966 2008-11-10 Akim Demaille <demaille@gostai.com>
3967
3968 Adjust verbose message to using emacs.
3969 * etc/bench.pl.in: Inform compilation-mode when we change the
3970 directory.
3971 (generate_grammar_list): Recognize %define "variant" in addition
3972 to %define variant.
3973
3974 2008-11-10 Akim Demaille <demaille@gostai.com>
3975
3976 Classify symbols by type-name.
3977 * src/uniqstr.h (UNIQSTR_CMP): New.
3978 * src/output.c (symbol_type_name_cmp, symbols_by_type_name)
3979 (type_names_output): New.
3980 (muscles_output): Use it.
3981 * data/lalr1.cc (b4_symbol_action_): Remove.
3982 (b4_symbol_case_, b4_type_action_): New.
3983 Adjust uses of b4_symbol_action_ to use b4_type_action_.
3984
3985 2008-11-10 Akim Demaille <demaille@gostai.com>
3986
3987 Change the handling of the symbols in the skeletons.
3988 Before we were using tables which lines were the symbols and which
3989 columns were things like number, tag, type-name etc. It is was
3990 difficult to extend: each time a column was added, all the numbers had
3991 to be updated (you asked for colon $2, not for "tag"). Also, it was
3992 hard to filter these tables when only a subset of the symbols (say the
3993 tokens, or the nterms, or the tokens that have and external number
3994 *and* a type-name) was of interest.
3995
3996 Now instead of monolithic tables, we define one macro per cell. For
3997 instance "b4_symbol(0, tag)" is a macro name which contents is
3998 self-decriptive. The macro "b4_symbol" provides easier access to
3999 these cells.
4000
4001 * src/output.c (type_names_output): Remove.
4002 (symbol_numbers_output, symbol_definitions_output): New.
4003 (muscles_output): Call them.
4004 (prepare_symbols): Define b4_symbols_number.
4005
4006 2008-11-10 Akim Demaille <demaille@gostai.com>
4007
4008 --trace=muscles
4009 * src/getargs.h, src/getargs.c (trace_muscle): New.
4010 (trace_types, trace_args): Support it.
4011 * src/output.c (output_skeleton): Use it.
4012
4013 2008-11-10 Akim Demaille <demaille@gostai.com>
4014
4015 muscles_output.
4016 * src/output.c (muscles_output): New, extracted from...
4017 (output_skeleton): here.
4018 Adjust.
4019
4020 2008-11-10 Akim Demaille <demaille@gostai.com>
4021
4022 Formatting changes.
4023
4024 2008-11-10 Akim Demaille <demaille@gostai.com>
4025
4026 Update the variant example.
4027 * examples/variant.yy: Formatting changes.
4028 One stage build.
4029
4030 2008-11-10 Akim Demaille <demaille@gostai.com>
4031
4032 Support constructor with an argument.
4033 This improves the "list" bench by 2%.
4034
4035 * data/lalr1.cc (variant::build): Add an overloaded version with
4036 an argument.
4037 * tests/c++.at (AT_CHECK_VARIANT): Check it.
4038
4039 2008-11-10 Akim Demaille <demaille@gostai.com>
4040
4041 Test variants.
4042 * tests/c++.at (AT_CHECK_VARIANTS): New.
4043 Use it with and without %define assert.
4044
4045 2008-11-10 Akim Demaille <demaille@gostai.com>
4046
4047 Add %precedence support.
4048 Unfortunately it is not possible to reuse the %prec directive. This
4049 is because to please POSIX, we do not require to end the rules with a
4050 semicolon. As a result,
4051
4052 foo: bar %prec baz
4053
4054 is ambiguous: either a rule which precedence is that of baz, or a rule,
4055 and then a declaration of the precedence of the token baz.
4056
4057 * doc/bison.texinfo: Document %precedence.
4058 (Precedence Only): New.
4059 * src/assoc.h, src/assoc.c (precedence_assoc): New.
4060 * src/conflicts.c (resolve_sr_conflict): Support it.
4061 * src/scan-gram.l, src/parse-gram.y (%precedence): New token.
4062 Parse it.
4063 * tests/calc.at: Use %precedence for NEG.
4064 * tests/conflicts.at (%precedence does not suffice)
4065 (%precedence suffices): New tests.
4066
4067 2008-11-09 Akim Demaille <demaille@gostai.com>
4068
4069 Make benches in a sub dirs.
4070 * etc/bench.pl.in ($dir): New.
4071 Use it.
4072 Check the use of constructors with an argument.
4073 (bench_variant_parser): Fix.
4074
4075 2008-11-09 Akim Demaille <demaille@gostai.com>
4076
4077 fix eof condition
4078
4079 2008-11-09 Akim Demaille <demaille@gostai.com>
4080
4081 Fix --help.
4082
4083 2008-11-09 Akim Demaille <demaille@gostai.com>
4084
4085 Require the generation of parse-gram.output.
4086 * src/Makefile.am (YACC): Pass --report=all.
4087
4088 2008-11-09 Akim Demaille <demaille@gostai.com>
4089
4090 Formatting changes.
4091
4092 2008-11-09 Akim Demaille <demaille@gostai.com>
4093
4094 Update TODO.
4095 * TODO: Remove obsolete items.
4096 Update others.
4097
4098 2008-11-09 Akim Demaille <demaille@gostai.com>
4099
4100 Enhance bench.pl.
4101 * etc/bench.pl.in (parse, parse_expr, parse_term, parse_fact)
4102 (@token, $grammar, $bench): New.
4103 (generate_grammar_variant): Rename as...
4104 (generate_grammar_list): this.
4105 (generate_grammar): Adjust.
4106 (bench_grammar): Rename as...
4107 (bench): this.
4108 Use it in the various bench-marking routines.
4109 (-b, -g): New options.
4110
4111 2008-11-09 Akim Demaille <demaille@gostai.com>
4112
4113 Use a static hierarchy for symbols in the C++ parser.
4114 * data/lalr1.cc (symbol_base_type, symbol_type)
4115 (stack_symbol_type): Make it a static hierarchy.
4116 Adjust dependencies.
4117
4118 2008-11-09 Akim Demaille <demaille@gostai.com>
4119
4120 bench.pl -d, --directive.
4121 * etc/bench.pl.in (@directive): New.
4122 (&bench_grammar): Use it.
4123 (&bench_list_grammar): New, to provide access to the "variant"
4124 grammar.
4125 Use it.
4126 (getopts): Support -d, --directive.
4127
4128 2008-11-09 Akim Demaille <demaille@gostai.com>
4129
4130 Use inline for small operations.
4131 * data/lalr1.cc (symbol_base_type, symbol_type)
4132 (stack_symbol_type): Declare constructor and other operations as
4133 inline.
4134 (yy_destroy_): Inline.
4135
4136 2008-11-09 Akim Demaille <demaille@gostai.com>
4137
4138 Introduce a hierarchy for symbols.
4139 * data/lalr1.cc (symbol_base_type, symbol_type): New.
4140 (data_type): Rename as...
4141 (stack_symbol_type): this.
4142 Derive from symbol_base_type.
4143 (yy_symbol_value_print_): Merge into...
4144 (yy_symbol_print_): this.
4145 Rename as...
4146 (yy_print_): this.
4147 (yydestruct_): Rename as...
4148 (yy_destroy_): this.
4149 (b4_symbols_actions, YY_SYMBOL_PRINT): Adjust.
4150 (parser::parse): yyla is now of symbol_type.
4151 Use its type member instead of yytoken.
4152
4153 2008-11-09 Akim Demaille <demaille@gostai.com>
4154
4155 Rename data_type and stack_symbol_type.
4156 * data/lalr1.cc (data_type): Rename as...
4157 (stack_symbol_type): this.
4158
4159 2008-11-09 Akim Demaille <demaille@gostai.com>
4160
4161 Handle semantic value and location together.
4162 * data/lalr1.cc (b4_symbol_actions): Bounce $$ and @$ to
4163 yydata.value and yydata.location.
4164 (yy_symbol_value_print_, yy_symbol_print_, yydestruct_)
4165 (YY_SYMBOL_PRINT): Now take semantic value and location as a
4166 single arg.
4167 Adjust all callers.
4168 (yydestruct_): New overload for a stack symbol.
4169
4170 2008-11-09 Akim Demaille <demaille@gostai.com>
4171
4172 Push a complete symbol, not connected parts.
4173 * data/lalr1.cc (yypush_): Take a data_type&, not disconnected
4174 state, value and location.
4175 Adjust callers.
4176
4177 2008-11-09 Akim Demaille <demaille@gostai.com>
4178
4179 Agregate yylval and yylloc.
4180 * data/lalr1.cc (parser::yylval, parser::yylloc): Replace by...
4181 (parser::yyla): this.
4182
4183 2008-11-09 Akim Demaille <demaille@gostai.com>
4184
4185 Rely on the state stack to display reduction traces.
4186 To display rhs symbols before a reduction, we used information
4187 about the rule reduced, which required the tables yyrhs and
4188 yyprhs. Now use rely only on the state stack to get the same
4189 information.
4190
4191 * data/lalr1.cc (b4_rhs_data, b4_rhs_state): New.
4192 Use them.
4193 (parser::yyrhs_, parser::yyprhs_): Remove.
4194 (parser::yy_reduce_print_): Use the state stack.
4195
4196 2008-11-09 Akim Demaille <demaille@gostai.com>
4197
4198 Fuse yyval and yyloc into yylhs.
4199 * data/lalr1.cc (b4_lhs_value, b4_lhs_location): Adjust to using
4200 yylhs.
4201 (parse): Replace yyval and yyloc with yylhs.value and
4202 yylhs.location.
4203 After a user action, compute yylhs.state earlier.
4204 (yyerrlab1): Do not play tricks with yylhs.location, rather, use a
4205 fresh error_token.
4206
4207 2008-11-09 Di-an Jan <dianj@freeshell.org>
4208
4209 Remove unused variable.
4210 * src/output.c (type_names_output): Remove unused variable sep.
4211
4212 2008-11-09 Paolo Bonzini <bonzini@gnu.org>
4213
4214 Change tests/output.at quoting.
4215 * tests/output.at (AT_CHECK_OUTPUT): Use conventional m4 quoting when
4216 expanding arguments.
4217
4218 2008-11-07 Joel E. Denny <jdenny@ces.clemson.edu>
4219
4220 Don't add a semicolon to actions for %skeleton or %language.
4221 It breaks Java test cases as reported by Akim Demaille.
4222 * src/scan-code.l: Implement.
4223
4224 2008-11-07 Joel E. Denny <jdenny@ces.clemson.edu>
4225
4226 Clean up %skeleton and %language priority implementation.
4227 * src/getargs.c (skeleton_prio): Use default_prio rather than 2, and
4228 remove static qualifier because others will soon need to see it.
4229 (language_prio): Likewise.
4230 (getargs): Use command_line_prio rather than 0.
4231 * src/getargs.h (command_line_prio, grammar_prio, default_prio): New
4232 enum fields.
4233 (skeleton_prio): Extern it.
4234 (language_prio): Extern it.
4235 * src/parse-gram.y: Use grammar_prio rather than 1.
4236
4237 2008-11-07 Akim Demaille <demaille@gostai.com>
4238
4239 Moving push traces into yypush_.
4240 * data/lalr1.cc (yypush_): Now takes a optional trace message.
4241 Adjust all uses.
4242
4243 2008-11-07 Akim Demaille <demaille@gostai.com>
4244
4245 The single-stack C++ parser is now the standard one.
4246 * data/lalr1.cc: Rename as...
4247 * data/lalr1-split.cc: this.
4248 * data/lalr1-fusion.cc: Rename as...
4249 * data/lalr1.cc: this.
4250 * etc/bench.pl.in: Adjust.
4251
4252 2008-11-07 Akim Demaille <demaille@gostai.com>
4253
4254 Avoid empty-if warnings.
4255 Reported by Quentin Hocquet.
4256
4257 * data/lalr1-fusion.cc (YY_SYMBOL_PRINT, YY_REDUCE_PRINT)
4258 (YY_STACK_PRINT): Provide some contents even when !YYDEBUG.
4259
4260 2008-11-07 Akim Demaille <demaille@gostai.com>
4261
4262 Pass command line location to skeleton_arg and language_argmatch.
4263 * src/getargs.h, src/getargs.c (skeleton_arg, language_argmatch):
4264 The location argument is now mandatory.
4265 Adjust all dependencies.
4266 (getargs): Use command_line_location.
4267
4268 2008-11-07 Akim Demaille <demaille@gostai.com>
4269
4270 -D, --define.
4271 * src/getargs.c (usage): Document -D.
4272 Fix help string for --locations.
4273 (command_line_location): New.
4274 (short_options, long_options, getargs): Support -D, --define.
4275 (getargs): Move -d support at the right place.
4276 * doc/bison.texinfo (Bison Options): Update.
4277 * tests/input.at (%define, --define): New.
4278
4279 2008-11-07 Akim Demaille <demaille@gostai.com>
4280
4281 Initialize the muscle table before parsing the command line.
4282 * src/getargs.c (quotearg.h, muscle_tab.h): Include.
4283 (getargs): Define file_name.
4284 * src/main.c (main): Initialize muscle_tab before calling
4285 getargs.
4286 * src/muscle_tab.c (muscle_init): No longer define file_name, as
4287 its value is not available yet.
4288
4289 2008-11-07 Akim Demaille <demaille@gostai.com>
4290
4291 Locations without columns for command line arguments.
4292 * src/location.c (location_print): Don't display negative columns.
4293 * src/location.h: Document this.
4294
4295 2008-11-07 Akim Demaille <demaille@gostai.com>
4296
4297 Fix --help.
4298 * src/getargs.c (usage): Fix help string for -W.
4299
4300 2008-11-07 Akim Demaille <demaille@gostai.com>
4301
4302 Handle more general types of option arguments.
4303 * build-aux/cross-options.pl: The argument ends at the first
4304 space, not the first non-symbol character.
4305 Use @var for each word appearing the argument description.
4306
4307 2008-11-07 Akim Demaille <demaille@gostai.com>
4308
4309 Destroy the variants that remain on the stack in case of error.
4310 * data/lalr1-fusion.cc (yydestruct_): Invoke the variant's
4311 destructor.
4312 Display the value only if yymsg is nonnull.
4313 (yyreduce): Invoke yydestruct_ when popping lhs symbols.
4314
4315 2008-11-07 Akim Demaille <demaille@gostai.com>
4316
4317 Add "%define assert" to variants.
4318 This is used to help the user catch cases where some value gets
4319 ovewritten by a new one. This should not happen, as this will
4320 probably leak.
4321
4322 Unfortunately this uncovered a bug in the C++ parser itself: the
4323 lookahead value was not destroyed between two calls to yylex. For
4324 instance if the previous lookahead was a std::string, and then an int,
4325 then the value of the std::string was correctly taken (i.e., the
4326 lookahead was now an empty string), but std::string structure itself
4327 was not reclaimed.
4328
4329 This is now done in variant::build(other&) (which is used to take the
4330 value of the lookahead): other is not only stolen from its value, it
4331 is also destroyed. This incurs a new performance penalty of a few
4332 percent, and union becomes faster again.
4333
4334 * data/lalr1-fusion.cc (variant::build(other&)): Destroy other.
4335 (b4_variant_if): New.
4336 (variant::built): New.
4337 Use it whereever the status of the variant changes.
4338 * etc/bench.pl.in: Check the penalty of %define assert.
4339
4340 2008-11-07 Akim Demaille <demaille@gostai.com>
4341
4342 Use "%define variant" in bench.pl.
4343 * etc/bench.pl.in: No longer use the pseudo directive %variants,
4344 just use %define variants.
4345
4346 2008-11-07 Akim Demaille <demaille@gostai.com>
4347
4348 Regen.
4349 * src/parse-gram.h, src/parse-gram.c: Regen.
4350
4351 2008-11-04 Joel E. Denny <jdenny@ces.clemson.edu>
4352
4353 Fix user actions without a trailing semicolon.
4354 Reported by Sergei Steshenko at
4355 <http://lists.gnu.org/archive/html/bug-bison/2008-11/msg00001.html>.
4356 * THANKS (Sergei Steshenko): Add.
4357 * src/scan-code.l (SC_RULE_ACTION): Fix it.
4358 * tests/regression.at (Fix user actions without a trailing semicolon):
4359 New test case.
4360
4361 2008-11-04 Akim Demaille <demaille@gostai.com>
4362
4363 Use b4_copyright_years.
4364 * data/yacc.c (b4_copyright_years): New.
4365 Fix its value according to the comments in the file.
4366 Use it and undefine it.
4367
4368 2008-11-04 Akim Demaille <demaille@gostai.com>
4369
4370 Formatting changes.
4371 * data/lalr1-fusion.cc, src/parse-gram.y: here.
4372
4373 2008-11-04 Akim Demaille <demaille@gostai.com>
4374
4375 Formatting changes.
4376 * data/lalr1-fusion.cc: here.
4377
4378 2008-11-04 Akim Demaille <demaille@gostai.com>
4379
4380 Use strict on bench.pl.
4381 * etc/bench.pl.in (&run, &generate_grammar): New.
4382 Rename the grammar generating functions for consistency.
4383 Change the interface so that the list of benches to run is passed
4384 as (optionless) arguments.
4385 (&compile): Use &run.
4386
4387 2008-11-04 Akim Demaille <demaille@gostai.com>
4388
4389 Remove spurious initial empty lines.
4390 * data/glr.c, data/glr.cc, data/lalr1.cc, data/lalr1.java,
4391 * data/yacc.c: End the @output lines with an @.
4392
4393 2008-11-04 Akim Demaille <demaille@gostai.com>
4394
4395 Improve the display of sizes.
4396 * etc/bench.p.in: Higher precision.
4397 Sort by decreasing size.
4398
4399 2008-11-04 Akim Demaille <demaille@gostai.com>
4400
4401 Don't memcpy C++ structures.
4402 * data/lalr1-fusion.cc (b4_symbol_variant): Adjust additional
4403 arguments.
4404 (variant::build): New overload for
4405 copy-construction-that-destroys.
4406 (variant::swap): New.
4407 (parser::yypush_): Use it in variant mode.
4408
4409 2008-11-04 Akim Demaille <demaille@gostai.com>
4410
4411 Better defaults for bench.pl.
4412 * etc/bench.pl.in ($verbose, $cflags, $iterations): Change the
4413 default values.
4414 Adjust &verbose uses.
4415 (-q, --quiet): New.
4416
4417 2008-11-04 Akim Demaille <demaille@gostai.com>
4418
4419 Make variant.yy more complex.
4420 std::list cannot be copied via memcpy, they are more demanding than
4421 std::string. Use one std::list to strengthen the test.
4422
4423 * examples/variant.yy: Use lalr1-fusion.cc, not lalr1.cc.
4424 Adjust.
4425 Create a list of strings, instead of a single large string.
4426
4427 2008-11-04 Akim Demaille <demaille@gostai.com>
4428
4429 bench.pl --bench.
4430 * etc/bench.pl.in (--bench, $bench): New.
4431
4432 2008-11-04 Akim Demaille <demaille@gostai.com>
4433
4434 Sort methods.
4435 * data/lalr1-fusion.cc (destroy): Use as() in its definition.
4436 Define it after as().
4437
4438 2008-11-04 Akim Demaille <demaille@gostai.com>
4439
4440 Useless parens.
4441 * data/lalr1-fusion.cc (b4_rhs_location): Remove useless parens.
4442
4443 2008-11-04 Akim Demaille <demaille@gostai.com>
4444
4445 Issue missing synclines after user actions.
4446 * data/c.m4 (b4_case): Issue synclines on the output file.
4447
4448 2008-11-04 Akim Demaille <demaille@gostai.com>
4449
4450 Remove trailing empty line.
4451 * data/lalr1-fusion.cc: Don't add an empty line after the user's
4452 epilogue.
4453
4454 2008-11-04 Akim Demaille <demaille@gostai.com>
4455
4456 Fix output of copyright years.
4457 * data/bison.m4 (b4_copyright): Fix the indentation of the
4458 copyright year paragraph.
4459 Use b4_copyright_years when no years are given.
4460 * data/lalr1.cc, data/lalr1-fusion.cc, data/location.cc
4461 (b4_copyright_years): New.
4462 Use it.
4463
4464 2008-11-04 Akim Demaille <demaille@gostai.com>
4465
4466 Avoid the spurious initial empty line.
4467 * data/lalr1-fusion.cc, data/location.cc: Put a trailing "@" at
4468 the end of @output request to suppress the empty line that
4469 results.
4470
4471 2008-11-04 Akim Demaille <demaille@gostai.com>
4472
4473 Remove parser::rhs_number_type.
4474 * data/lalr1-fusion.cc (rhs_number_type): No longer define it.
4475 (yyrhs_): Use b4_table_define.
4476
4477 2008-11-04 Akim Demaille <demaille@gostai.com>
4478
4479 Fix iteration type.
4480 * data/lalr1-fusion.cc: Use an int to iterate up to an int.
4481
4482 2008-11-04 Akim Demaille <demaille@gostai.com>
4483
4484 Factor the declaration of the integer tables.
4485 * data/lalr1-fusion.cc (b4_table_define): New.
4486 Use it.
4487
4488 2008-11-03 Akim Demaille <demaille@gostai.com>
4489
4490 Fix indentation of tables in lalr1.cc
4491 * data/lalr1-fusion.cc: Fix the indentation.
4492
4493 2008-11-03 Akim Demaille <demaille@gostai.com>
4494
4495 Destroy the lhs symbols after reduction.
4496 * data/lalr1-fusion.cc (parse): After the user action, when in
4497 variant mode, destroy the lhs symbols.
4498
4499 2008-11-03 Akim Demaille <demaille@gostai.com>
4500
4501 Simplify yysyntax_error_ use.
4502 * data/lalr1-fusion.cc (yysyntax_error_): Always pass it the token
4503 type, but make it unnamed in the declaration when it is not used.
4504
4505 2008-11-03 Akim Demaille <demaille@gostai.com>
4506
4507 Let yy::variant::build return an lvalue.
4508 * data/lalr1-fusion.cc (variant::build): Return a reference to the
4509 object.
4510
4511 2008-11-03 Akim Demaille <demaille@gostai.com>
4512
4513 Define yy::variant only when needed.
4514 * data/lalr1-fusion.cc (yy::variant): Define only if variants are
4515 used.
4516
4517 2008-11-03 Akim Demaille <demaille@gostai.com>
4518
4519 Bench the three-stack lalr1.cc.
4520 * etc/bench.pl.in: Bench the three-stack lalr1.cc vs. the
4521 one-stack one.
4522
4523 2008-11-03 Akim Demaille <demaille@gostai.com>
4524
4525 Fail on parse error in calc++.
4526 * doc/bison.texinfo (calc++.cc): Propagate failures to the exit
4527 status.
4528 * examples/calc++/test ($me, $number, $exit, run): New.
4529 Use them to propagate errors to the exit status.
4530
4531 2008-11-03 Akim Demaille <demaille@gostai.com>
4532
4533 Don't specify the skeleton twice in the example.
4534 * examples/calc++/Makefile.am: Don't pass -S to Bison, the grammar
4535 file does what is needed.
4536
4537 2008-11-03 Akim Demaille <demaille@gostai.com>
4538
4539 bench: Improve output.
4540 * etc/bench.pl.in (bench_grammar): Tune the printf format.
4541
4542 2008-11-03 Akim Demaille <demaille@gostai.com>
4543
4544 bench: check impact of %debug on variants.
4545 * etc/bench.pl.in (variant_grammar): Fix the computation of
4546 $variant.
4547 Generate a grammar file that can work with or without %debug.
4548 Do use the @directive.
4549 (bench_variant_parser): Check impact of %debug.
4550 (@directives): Rename all the occurrences to...
4551 (@directive): this, for consistency.
4552
4553 2008-11-03 Akim Demaille <demaille@gostai.com>
4554
4555 bench: report the size too.
4556 * etc/bench.pl.in ($iterations): Defaults to -3.
4557 (&bench_grammar): Require hireswallclock.
4558 Compute and display the size of the result.
4559 More comments.
4560
4561 2008-11-03 Akim Demaille <demaille@gostai.com>
4562
4563 bench: More use of the verbosity level.
4564 * etc/bench.pl.in ($verbose, &verbose): New.
4565 Use them.
4566 More POD documentation.
4567
4568 2008-11-03 Akim Demaille <demaille@gostai.com>
4569
4570 bench.pl: a command line interface
4571 * etc/bench.pl.in: More doc.
4572 Some fixes in the documentation.
4573 ($cflags, $iterations, &help, &getopt): New.
4574 Use them.
4575 (&variant_grammar): Let the number of stages be 10 times what is
4576 specified.
4577
4578 2008-11-03 Akim Demaille <demaille@gostai.com>
4579
4580 Bench the use of Boost.Variants.
4581 * etc/bench.pl.in ($cxx, &variant_grammar, &bench_variant_parser):
4582 New.
4583 (&compile): Be ready to compile C++ parsers.
4584 (&bench_push_parser): Move debug information to the outermost
4585 level.
4586 * THANKS: Add Michiel De Wilde.
4587
4588 2008-11-03 Akim Demaille <demaille@gostai.com>
4589
4590 bench.pl: Pass directives as a list instead of as a string.
4591 * etc/bench.pl.in (&directives): New.
4592 (&triangular_grammar, &calc_grammar): Use it to format the Bison
4593 directives.
4594 (&triangular_grammar): Do use the directives (were ignored).
4595 (&bench_grammar, &bench_push_parser): Adjust to pass lists of
4596 directives.
4597
4598 2008-11-03 Akim Demaille <demaille@gostai.com>
4599
4600 Improve genericity of bench.pl.
4601 * etc/bench.pl.in (&bench_grammar): Take the set of benches as
4602 argument.
4603 (&bench_push_parser): New.
4604 Call it.
4605
4606 2008-11-03 Akim Demaille <demaille@gostai.com>
4607
4608 Add documentation to bench.pl.
4609 * etc/bench.pl.in: Comment changes.
4610
4611 2008-11-03 Akim Demaille <demaille@gostai.com>
4612
4613 Fuse the three stacks into a single one.
4614
4615 In order to make it easy to perform benchmarks to ensure that
4616 there are no performance loss, lalr1.cc is forked into
4617 lalr1-fusion.cc. Eventually, lalr1-fusion.cc will replace
4618 lalr1.cc.
4619
4620 Meanwhile, to make sure that lalr1-fusion.cc is correctly
4621 exercized by the test suite, the user must install a symbolic link
4622 from lalr1.cc to it.
4623
4624 Instead of having three stacks (state, value, location), use a
4625 stack of triples. This considerably simplifies the code (and it
4626 will be easier not to require locations as currently does the C++
4627 parser), and also gives a 10% speedup according to
4628 etc/bench (probably mainly since memory allocation is done once
4629 instead of three times).
4630
4631 Another motivation is to make it easier to destruct properly
4632 semantic values: now that they are bound to their state (hence
4633 symbol type) it will be easier to call the appropriate destructor.
4634
4635 These changes should probably benefit the C parser too.
4636
4637 * data/lalr1.cc: Copy as...
4638 * data/lalr1-fusion.cc: this new file.
4639 (b4_rhs_value, b4_rhs_location): New definitions overriding those
4640 from c++.m4.
4641 (state_stack_type, semantic_stack_type, location_stack_type)
4642 (yystate_stack_, yysemantic_stack_, yylocation_stack_): Remove.
4643 (data_type, stack_type, yystack_): New.
4644 (YYLLOC_DEFAULT, yypush_): Adjust.
4645 (yyerror_range): Now based on data_type, not location_type.
4646
4647 2008-11-03 Akim Demaille <demaille@gostai.com>
4648
4649 Push the state, value, and location at the same time.
4650 This is needed to prepare a forthcoming patch that fuses the three
4651 stacks into one.
4652
4653 * data/lalr1.cc (parser::yypush_): New.
4654 (parser::yynewstate): Change the semantics: instead of arriving to
4655 this label when value and location have been pushed, but yystate
4656 is to be pushed on the state stack, now the three of them must
4657 have been pushed before. yystate still must be the new state.
4658 This allows to use yypush_ everywhere instead of individual
4659 handling of the stacks.
4660
4661 2008-11-03 Akim Demaille <demaille@gostai.com>
4662
4663 Prefer references to pointers.
4664 * data/lalr1.cc (b4_symbol_actions): New, overrides the default C
4665 definition to use references instead of pointers.
4666 (yy_symbol_value_print_, yy_symbol_print_, yydestruct_):
4667 Take the value and location as references.
4668 Adjust callers.
4669
4670 2008-11-03 Akim Demaille <demaille@gostai.com>
4671
4672 stack::size instead of stack::height.
4673 * data/lalr1.cc (stack::height): Rename as...
4674 (stack::size): this.
4675 Fix the output type.
4676 Comment changes.
4677
4678 2008-11-03 Akim Demaille <demaille@gostai.com>
4679
4680 Use variants to support objects as semantic values.
4681 This patch was inspired by work by Michiel De Wilde. But he used
4682 Boost variants which (i) requires Boost on the user side, (ii) is
4683 slow, and (iii) has useless overhead (the parser knows the type of
4684 the semantic value there is no reason to duplicate this
4685 information as Boost.Variants do).
4686
4687 This implementation reserves a buffer large enough to store the
4688 largest objects. yy::variant implements this buffer. It was
4689 implemented with Quentin Hocquet.
4690
4691 * src/output.c (type_names_output): New.
4692 (output_skeleton): Invoke it.
4693 * data/c++.m4 (b4_variant_if): New.
4694 (b4_symbol_value): If needed, provide a definition for variants.
4695 * data/lalr1.cc (b4_symbol_value, b4_symbol_action_)
4696 (b4_symbol_variant, _b4_char_sizeof_counter, _b4_char_sizeof_dummy)
4697 (b4_char_sizeof, yy::variant): New.
4698 (parser::parse): If variants are requested, define
4699 parser::union_type, parser::variant, change the definition of
4700 semantic_type, construct $$ before running the user action instead
4701 of performing a default $$ = $1.
4702 * examples/variant.yy: New.
4703 Based on an example by Michiel De Wilde.
4704
4705 2008-11-03 Akim Demaille <demaille@gostai.com>
4706
4707 Parameterize the extraction of semantic values.
4708 To make future changes easier, no longer rely on ".TYPE" being the
4709 way to get a semantic value.
4710
4711 * data/c.m4 (b4_symbol_value): New.
4712 Use it.
4713 * data/c++.m4, data/yacc.c: Use it.
4714 * data/glr.c: Use b4_symbol_value.
4715 (b4_rhs_data): New.
4716 Use it.
4717
4718 2008-11-03 Akim Demaille <demaille@gostai.com>
4719
4720 Prepare easier M4 changes.
4721 * data/lalr1.cc: Use escaped [] instead of literals to prepare
4722 future changes.
4723
4724 2008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
4725
4726 Initiate further development.
4727 * NEWS: Create an empty section for new entries.
4728 * gnulib: Update submodule to HEAD.
4729
4730 2008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
4731
4732 * NEWS: Version 2.4.
4733
4734 2008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
4735
4736 Prepare for next release.
4737 * NEWS: Briefly mention changes since 2.3b.
4738 * README: Say GNU m4 1.4.6, which we've been requiring in release
4739 announcements already, not 1.4.3, which breaks the build.
4740
4741 2008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
4742
4743 Say %language is experimental.
4744 We're thinking of extending it's effect on output file naming. See the
4745 thread at
4746 <http://lists.gnu.org/archive/html/bison-patches/2008-10/msg00003.html>.
4747 * NEWS: Say it's experimental.
4748 * doc/bison.texinfo (Decl Summary): Say it's experimental, and so don't
4749 recommend it over %skeleton for now.
4750 (Bison Options): Likewise.
4751 (C++ Bison Interface): Use %skeleton not %language.
4752 (Calc++ Parser): Use %skeleton not %language.
4753 * src/getargs.c (usage): Say it's experimental.
4754
4755 2008-11-01 Di-an Jan <dianj@freeshell.org>
4756 Paolo Bonzini <bonzini@gnu.org>
4757
4758 Support all Java parser class modifiers.
4759 * data/java.m4 (b4_percent_define_get3): New.
4760 (b4_final_if, b4_strictfp_if): New.
4761 * data/lalr1.java (final, strictfp, extends, implements): Support.
4762 * doc/bison.texinfo (final, strictfp, extends, implements): Add
4763 documentation.
4764 * tests/java.at (AT_CHECK_JAVA_MINIMAL): New.
4765 (AT_CHECK_JAVA_MINIMAL_W_LEXER): New.
4766 (AT_CHECK_JAVA_GREP): New.
4767 (Java parser class modifiers): New test.
4768 (Java parser class extends and implements): New test.
4769
4770 Model exception propagation better with throws and lex_throws.
4771 * data/java.m4 (b4_list2): New.
4772 (throws): Change default.
4773 * data/lalr1.java (yyaction): Add throws.
4774 (parse): Add lex_throws in addition to throws.
4775 * doc/bison.texinfo (throws, lex_throws): Add documentation.
4776 * tests/java.at (Java throws specifications): New test.
4777
4778 Improve documentation for Java parsers.
4779 * doc/bison.texinfo (Java Parsers): Add subsections.
4780 Don't quote first argument of %define.
4781 (Java Bison Interface): Document output files. Move documentation
4782 of parser class and merge into Java Parser Interface. Document
4783 features that error out. Document directives with no effect.
4784 Move note about Javadoc higher.
4785 (Java Semantic Values): Explicitly mention stype.
4786 Document that generic types cannot be used.
4787 (Java Location Values): Use @deftypeivar. Document constructors.
4788 Correct return value for toString.
4789 (Java Parser Interface): List undocumented constants/fields.
4790 Move documentation of fields added by %parse-param closer to list
4791 of members. Document that token names are added as fields.
4792 Document constructors accurately. Remove error method.
4793 (Java Scanner Interface): Move note on %pure-parser to Java Bison
4794 Interface. Describe %code lexer and yylex accutately.
4795 Remove documentation that does not match the code.
4796 (Java Action Features): New.
4797 (Java Differences): Add reference. Add item on semantic values.
4798 Add note about @{ ... @}. Clarify %% epilogue placement.
4799 (Java Declarations Summary): New.
4800
4801 Fix Java skeleton.
4802 * data/java.m4 (b4_prefix): Correct quoting for m4_define_default.
4803 (b4_remove_comma): Quote test argument.
4804 (b4_identification): Remove "bison" field.
4805 * tests/java.at (Java parser class and package names): New test.
4806 (Java %parse-param and %lex-param): New test.
4807 (Java stype, position_class and location_class): New test.
4808
4809 2008-10-31 Di-an Jan <dianj@freeshell.org>
4810
4811 * data/lalr1.jave: Update copyright years.
4812 (YYParser): Correct name of "generated from" file in Javadoc:
4813 use b4_file_name instead of @ofile@.
4814 (Location constructor): Correct Javadoc parameter name.
4815 (yylloc): Add missing opening m4 quote after b4_location_if.
4816 This removes a stray [ in the Javadoc of Lexer.getStartPos.
4817 (Lexer.yyerror): Fix incorrect m4 and Javadoc.
4818 (YYParser constructor): Correct Javadoc parameter name.
4819
4820 2008-10-30 Joel E. Denny <jdenny@ces.clemson.edu>
4821
4822 Always put auxiliary code files in the same dir as other output files.
4823 * src/files.c (compute_file_name_parts): When the user specifies
4824 --output but not --file-prefix, extract the directory prefix from the
4825 file prefix not from the grammar file name. This affects the location
4826 of files like location.hh generated by the C++ skeleton. The includes
4827 in the other output files require this fix.
4828 * tests/output.at (AT_CHECK_OUTPUT): Automatically create directories
4829 for expected output files.
4830 (Output files): Add a test for the above.
4831
4832 2008-10-29 Joel E. Denny <jdenny@ces.clemson.edu>
4833
4834 * gnulib: Update submodule to HEAD.
4835
4836 2008-10-28 Joel E. Denny <jdenny@ces.clemson.edu>
4837
4838 Update copyright year.
4839 * src/files.c: Here.
4840
4841 2008-10-28 Di-an Jan <dianj@freeshell.org> (tiny change)
4842
4843 Don't overwrite the input file.
4844 * src/files.c (output_file_name_check): Fatal error if using input file
4845 for output.
4846 * tests/output.at: (AT_CHECK_CONFLICTING_OUTPUT): Add return status
4847 argument.
4848 (Conflicting output files): Add test.
4849
4850 2008-10-28 Akim Demaille <demaille@gostai.com>
4851
4852 Space changes.
4853 * data/lalr1.cc: Formatting changes.
4854
4855 2008-10-28 Akim Demaille <demaille@gostai.com>
4856
4857 Don't define debugging functions when !YYDEBUG.
4858 * data/lalr1.cc (debug_stream, set_debug_stream)
4859 (debug_level_type, debug_level, set_debug_level): Don't
4860 declare them when YYDEBUG is not defined.
4861 The implementation are already YYDEBUG-aware.
4862
4863 2008-10-28 Akim Demaille <demaille@gostai.com>
4864
4865 Prefer "continue" for empty loop bodies.
4866 * etc/bench.pl.in: Use "continue" instead of {}.
4867
4868 2008-10-28 Akim Demaille <demaille@gostai.com>
4869
4870 Space and comments changes.
4871 * data/c++.m4, data/glr.c, data/lalr1.cc: Copyright year changes.
4872 * data/c.m4, data/lalr1.cc: Space changes.
4873
4874 2008-10-28 Akim Demaille <demaille@gostai.com>
4875
4876 Make gnulib a submodule.
4877 * gnulib: New.
4878 * .gitmodules (gnulib): New.
4879
4880 2008-10-18 Joel E. Denny <jdenny@ces.clemson.edu>
4881
4882 Fix yyerror_range for user-defined location type in C++. Reported by
4883 Georg Sauthoff at
4884 <http://lists.gnu.org/archive/html/bug-bison/2008-08/msg00008.html>.
4885 * data/lalr1.cc (parse): Change type of yyerror_range to location_type.
4886 * THANKS (Georg Sauthoff): Add.
4887
4888 2008-10-18 Joel E. Denny <jdenny@ces.clemson.edu>
4889
4890 Update several administrative files mainly to facilitate releasing.
4891 * HACKING (Administrivia): Make the git-merge-changelog notes more
4892 helpful.
4893 (Test suite): Don't say lalr1.cc is not exercised in the test suite.
4894 (Release Procedure): Update for git and add numerous details that were
4895 previously missing.
4896 * Makefile.am (EXTRA_DIST): Remove Makefile.cfg and Makefile.maint.
4897 * maint.mk (announcement): Don't list bison as a bootstrap tool so
4898 that announcements don't claim we bootstrapped with whatever bison
4899 happened to be in PATH. Add flex as a bootstrap tool.
4900 * Makefile.maint: Remove, previously replaced by maint.mk.
4901 * Makefile.cfg: Remove, and migrate settings to...
4902 * cfg.mk: ... here for the sake of `make announcement'.
4903 * bootstrap.conf (gnulib_modules): Add announce-gen.
4904 * README: Say GNU Bison instead of just Bison. Suggested by Karl
4905 Berry.
4906
4907 2008-10-08 Di-an Jan <dianj@freeshell.org> (tiny change)
4908
4909 Small but important bugfixes for the Java skeleton.
4910 * data/lalr1.java (yyerror): Change Location to b4_location_type.
4911 (yy_symbol_print): Call toString on yyvaluep.
4912
4913 2008-08-29 Akim Demaille <demaille@gostai.com>
4914
4915 Clarify UPDATED use.
4916 * doc/bison.texinfo: It refers to the last edition of this file,
4917 not to the release date of Bison.
4918 Reported by Joel E. Denny.
4919
4920 2008-08-29 Akim Demaille <demaille@gostai.com>
4921
4922 * README: Update FAQ pointer.
4923 Reported by Joel E. Denny.
4924
4925 2008-08-27 Eric Blake <ebb9@byu.net>
4926
4927 Resync m4sugar from autoconf.
4928 * data/m4sugar/m4sugar.m4 (m4_defn, m4_popdef, m4_undefine)
4929 (m4_init): Adjust to latest m4.git changes.
4930 (m4_mapall_sep, _m4_list_cmp, m4_version_compare): Reduce side
4931 effects.
4932 * data/m4sugar/foreach.m4 (_m4_shiftn): Fix off-by-one bug.
4933 (_m4_list_cmp): Reduce side effects.
4934
4935 2008-08-27 Akim Demaille <demaille@gostai.com>
4936
4937 Check yyerrok in calc.at.
4938 * tests/calc.at (calc.y): Use yyerrok on "( error )".
4939 (AT_CHECK_CALC): Add a check that ensures that yyerrok works as
4940 expected.
4941
4942 2008-08-27 Akim Demaille <demaille@gostai.com>
4943
4944 Support yyerrok in lalr1.cc.
4945 YYBACKUP is still to import back into lalr1.cc.
4946 * data/lalr1.cc (yyerrork, yyclearin, YYRECOVERING): Define.
4947
4948 2008-08-26 Joel E. Denny <jdenny@ces.clemson.edu>
4949
4950 For maintainer-check*, don't recompile for a $(VERSION) update.
4951 * cfg.mk: New file.
4952 (_is-dist-target): Override the one in GNUmakefile.
4953 * Makefile.am (EXTRA_DIST): Add cfg.mk.
4954
4955 2008-08-26 Joel E. Denny <jdenny@ces.clemson.edu>
4956
4957 Update for recent change to gnulib.
4958 * src/parse-gram.y: Don't include strverscmp.h. It comes from
4959 string.h now.
4960
4961 2008-08-15 Eric Blake <ebb9@byu.net>
4962
4963 Remaining m4sugar merge from autoconf.
4964 * data/m4sugar/m4sugar.m4: Copy entire file from autoconf.
4965 * data/m4sugar/foreach.m4: New file, copied from autoconf.
4966 * data/Makefile.am (dist_m4sugar_DATA): Distribute it.
4967 * src/output.c (output_skeleton): Tell m4 how to find it.
4968
4969 Partial m4sugar merge from autoconf: m4_map.
4970 * data/m4sugar/m4sugar.m4 (m4_fst): Delete.
4971 (m4_map, m4_map_sep, _m4_map): Rewrite more efficiently.
4972 (m4_apply, _m4_apply, m4_mapall, m4_mapall_sep): New macros.
4973 * data/java.m4 (b4_token_enums): Use more efficient short-circuit
4974 for empty list.
4975 * data/c.m4 (b4_token_defines, b4_token_enums, b4_c_ansi_formals):
4976 Likewise.
4977 (b4_parse_param_for): Avoid m4_fst, now that autoconf no longer
4978 declares it.
4979
4980 2008-08-07 Joel E. Denny <jdenny@ces.clemson.edu>
4981
4982 Keep .version and PACKAGE_VERSION in sync.
4983 * Makefile.am ($(top_srcdir)/.version): Declare configure as a
4984 dependency, and add comments justifying this in more detail. Discussed
4985 starting at
4986 <http://lists.gnu.org/archive/html/bison-patches/2008-07/msg00022.html>.
4987
4988 2008-08-06 Eric Blake <ebb9@byu.net>
4989
4990 Partial m4sugar merge from autoconf: m4_shiftn.
4991 * data/m4sugar/m4sugar.m4 (m4_shiftn): Faster implementation.
4992 (m4_shift2, m4_shift3): New macros.
4993 (m4_case, m4_bmatch, m4_bpatsubsts, m4_join): Adjust clients.
4994 * data/c.m4 (b4_c_function_def, b4_c_ansi_function_def)
4995 (b4_c_ansi_function_decl, b4_c_function_call): Likewise.
4996 * data/java.m4 (b4_remove_comma): Likewise.
4997
4998 Partial m4sugar merge from autoconf: m4_wrap vs. m4 1.6.
4999 * data/m4sugar/m4sugar.m4 (m4_unquote, m4_wrap_lifo): New macros.
5000 (m4_wrap): Guarantee FIFO order, in spite of m4 1.6.
5001 (m4_init): Consolidate wrapped text into single m4_wrap.
5002 * data/bison.m4 (b4_check_user_names_wrap): Stick with LIFO order
5003 in wrapped text.
5004
5005 2008-08-05 Eric Blake <ebb9@byu.net>
5006
5007 Partial m4sugar merge from autoconf: builtins, version.m4.
5008 * data/m4sugar/m4sugar.m4 (changeword): Nuke.
5009 (m4_prepend): Remove, as it is unused and inherently quadratic,
5010 whereas m4_append is linear in newer m4.
5011 (m4_mkstemp): New builtin.
5012 (m4_symbols): Make rename conditional.
5013 (m4_version_prereq): Ensure fatal error if used in bison, which
5014 intentionally lacks version.m4.
5015
5016 Fix comments in m4sugar.
5017 * data/m4sugar/m4sugar.m4: Comment changes, borrowed from autoconf.
5018
5019 2008-08-02 Joel E. Denny <jdenny@ces.clemson.edu>
5020
5021 Update for recent .gitignore fix in Gnulib.
5022 * bootstrap: Back out 2008-07-18 hack now that gnulib-tool creates
5023 anchored .gitignore entries.
5024
5025 2008-08-02 Joel E. Denny <jdenny@ces.clemson.edu>
5026
5027 Set gnu or gnits strictness.
5028 * configure.ac (AM_INIT_AUTOMAKE): Set gnu strictness during
5029 development and gnits strictness for releases. Based on Eric Blake's
5030 suggestion at
5031 <http://lists.gnu.org/archive/html/bug-bison/2008-07/msg00019.html>.
5032
5033 2008-07-31 Paolo Bonzini <bonzini@gnu.org>
5034
5035 * NEWS: Clarify documentation of %language.
5036
5037 2008-07-31 Paolo Bonzini <bonzini@gnu.org>
5038
5039 Support usage of git-merge-changelog.
5040 * .gitattributes: New.
5041 * HACKING: Document usage of git-merge-changelog.
5042 * bootstrap: Install git-merge-changelog entries in .git/config
5043 if appropriate.
5044
5045 2008-07-27 Joel E. Denny <jdenny@ces.clemson.edu>
5046
5047 Remove remaining dependence on CVS Id keyword.
5048 * ChangeLog: For the sake of people still using CVS, don't use dollars
5049 when mentioning Id.
5050 * data/xslt/bison.xsl: Remove Id from header comments, where it was
5051 unusual anyway.
5052 * data/xslt/xml2dot.xsl: Likewise.
5053 * data/xslt/xml2text.xsl: Likewise.
5054 * data/xslt/xml2xhtml.xsl: Likewise.
5055 * doc/Doxyfile.in (PROJECT_NUMBER): Don't use ID.
5056 * doc/Makefile.am (neutralize): Remove, no longer needed.
5057 (.x.1): Don't use neutralize.
5058 (edit): Don't substitute for ID.
5059 (Doxyfile): Don't define Id, and thus don't depend on ChangeLog.
5060
5061 2008-07-27 Joel E. Denny <jdenny@ces.clemson.edu>
5062
5063 Fix dependence on computed configure variables.
5064 * doc/Makefile.am (common_dep): Depend on $(top_srcdir)/configure not
5065 $(top_srcdir)/configure.ac so that changes to computed variables, such
5066 as PACKAGE_VERSION, are seen.
5067 * tests/Makefile.am ($(srcdir)/package.m4): Likewise.
5068
5069 2008-07-20 Joel E. Denny <jdenny@ces.clemson.edu>
5070
5071 Update copyright dates for recent changes.
5072 * Makefile.am: Here.
5073 * src/Makefile.am: Here.
5074 * src/reduce.c: Here.
5075 * tests/reduce.at: Here.
5076
5077 2008-07-18 Joel E. Denny <jdenny@ces.clemson.edu>
5078
5079 Use git-version-gen for version names between releases.
5080 * .cvsignore (.tarball-version, GNUmakefile, *~): Add.
5081 * .gitignore (/.tarball-version, /GNUmakefile, /*~): Add.
5082 * .prev-version: New.
5083 * .version.in: Remove.
5084 * ChangeLog: Remove the Id previously used for capturing the CVS
5085 revision.
5086 * GNUmakefile: Remove, now copied from Gnulib.
5087 * Makefile.am: Add code suggested by comments in
5088 build-aux/git-version-gen.
5089 (EXTRA_DIST): Remove GNUmakefile, handled by Gnulib. Add maint.mk,
5090 .prev-version, and .version.
5091 * NEWS (2.3b+): Rename to...
5092 (?.?): ... this because we're dropping the "+" version naming scheme,
5093 but, in general, we still can't be sure of our next release name.
5094 * bootstrap: Add a quick hack to remove from .gitignore the
5095 GNUmakefile entry that gnulib adds. We already have a /GNUmakefile
5096 entry. This should really be fixed in gnulib instead.
5097 * bootstrap.conf (gnulib_modules): Add gnumakefile.
5098 * configure.ac (AC_INIT): Set version name by invoking
5099 build-aux/git-version-gen.
5100 (AC_CONFIG_FILES): Remove .version, now generated by
5101 build-aux/git-version-gen.
5102 * maint.mk: New, copied from coreutils.
5103 * doc/.cvsignore (bison.1): Add.
5104 * doc/.gitignore (/bison.1): Add.
5105 * doc/bison.1: Remove, generated.
5106 * src/.cvsignore (revision.c): Remove.
5107 * src/.gitignore (/revision.c): Remove.
5108 * src/Makefile.am (bison_SOURCES): Remove revision.c and revision.h.
5109 (BUILT_SOURCES): Remove revision.c.
5110 (revision.c): Remove.
5111 * src/getargs.c (version): Don't print revision after the VERSION.
5112 * src/revision.h: Remove.
5113
5114 2008-07-16 Joel E. Denny <jdenny@ces.clemson.edu>
5115
5116 Fix untranslatable composition of sentences. Reported by Goran
5117 Uddeborg at
5118 <http://lists.gnu.org/archive/html/bug-bison/2008-06/msg00000.html>.
5119 * THANKS (Goran Uddeborg): Add.
5120 * src/reduce.c (reduce_print): Report the number of nonterminals and
5121 rules useless in the grammar in separate sentences.
5122 * tests/reduce.at (Useless Rules): Update output.
5123 (Reduced Automaton): Likewise.
5124 (Underivable Rules): Likewise.
5125 (Empty Language): Likewise.
5126
5127 2008-07-15 Joel E. Denny <jdenny@ces.clemson.edu>
5128
5129 Fix some .gitignore and .cvsignore problems.
5130 * bootstrap (insert_sorted_if_absent): Replace all uses with...
5131 (insert_vc_ignore): ... this new function, which prepends `/' to all
5132 .gitignore entries before passing them to insert_sorted_if_absent.
5133 * bootstrap.conf (vc_ignore): Set to '.cvsignore .gitignore' so that
5134 .cvsignore files are maintained even though Bison developers run
5135 bootstrap while using Git.
5136 * .cvsignore (*.patch *.log log patches applied): Remove, apparently
5137 unneeded by Bison.
5138 (gnulib): Add.
5139 * .gitignore (/*.patch *.log log patches applied): Remove, broken and
5140 unneeded. Reported by Eric Blake.
5141 * lib/.gitignore (/*~): Add.
5142 * po/.cvsignore, runtime-po/.cvsignore: Sync with .gitignore.
5143 * examples/calc++/.gitignore (/calc++.exe): Add. Reported by Eric
5144 Blake.
5145 * src/.gitignore (/bison.exe): Add. Reported by Eric Blake.
5146
5147 2008-07-15 Joel E. Denny <jdenny@ces.clemson.edu>
5148
5149 Improve forward-compatibility with GNU M4. Reported by Eric Blake at
5150 <http://lists.gnu.org/archive/html/bug-bison/2008-07/msg00000.html>.
5151 * bootstrap.conf (gnulib_modules): Add unsetenv.
5152 * lib/.gitignore, lib/.cvsignore (/unsetenv.c): Add.
5153 * m4/.gitignore, m4/.cvsignore (/environ.m4): Add.
5154 (/setenv.m4): Add.
5155 * src/output.c (output_skeleton): For the m4 invocation, pass -dV as
5156 the first argument because it may become position-dependent, and unset
5157 POSIXLY_CORRECT so Bison's skeletons have access to GNU M4 extensions.
5158 Add comments explaining these issues in more detail.
5159
5160 2008-07-14 Joel E. Denny <jdenny@ces.clemson.edu>
5161
5162 Add .gitignore everywhere based on .cvsignore.
5163 * .gitignore: New.
5164 * build-aux/.gitignore: New.
5165 * data/.gitignore: New.
5166 * doc/.gitignore: New.
5167 * etc/.gitignore: New.
5168 * examples/.gitignore: New.
5169 * examples/calc++/.gitignore: New.
5170 * lib/.gitignore: New.
5171 * m4/.gitignore: New.
5172 * po/.gitignore: New.
5173 * runtime-po/.gitignore: New.
5174 * src/.gitignore: New.
5175 * tests/.gitignore: New.
5176
5177 2008-05-27 Joel E. Denny <jdenny@ces.clemson.edu>
5178
5179 * NEWS (2.3b+): New section, empty for now.
5180 * configure.ac (AC_INIT): 2.3b -> 2.3b+.
5181
5182 2008-05-27 Joel E. Denny <jdenny@ces.clemson.edu>
5183
5184 * NEWS (2.3b): Update release date since there has been a delay in
5185 getting the announcements and tarballs out.
5186
5187 2008-05-23 Joel E. Denny <jdenny@ces.clemson.edu>
5188
5189 * NEWS: Version 2.3b.
5190 * configure.ac (AC_INIT): Likewise.
5191 (PACKAGE_COPYRIGHT_YEAR): Update to 2008.
5192
5193 2008-05-23 Joel E. Denny <jdenny@ces.clemson.edu>
5194
5195 * HACKING: Don't say don't mention HACKING in the ChangeLog. We've
5196 been doing it for years.
5197 (Test suite): Mention maintainer-push-check and maintainer-xml-check.
5198 (Release Procedure): Add FIXME about make alpha being unmaintained.
5199
5200 2008-05-13 Joel E. Denny <jdenny@ces.clemson.edu>
5201
5202 * data/yacc.c: Reformat m4 a little for readability.
5203 * src/lalr.c (build_relations): Correct comment.
5204
5205 2008-05-12 Juan Manuel Guerrero <juan.guerrero@gmx.de>
5206
5207 DJGPP specific issue.
5208 * djgpp/config.sed: Fixes required to run configure scripts generated
5209 by autoconf 2.62.
5210
5211 2008-05-07 Joel E. Denny <jdenny@ces.clemson.edu>
5212
5213 * HACKING (Release Procedure): translation@iro.umontreal.ca is now
5214 coordinator@translationproject.org.
5215
5216 2008-05-06 Joel E. Denny <jdenny@ces.clemson.edu>
5217
5218 * THANKS: Add Eric Blake.
5219
5220 2008-04-23 Eric Blake <ebb9@byu.net>
5221
5222 Revert prior patch, by working around autoconf regression.
5223 * tests/output.at (m4_expand): Add workaround for autoconf 2.62.
5224 ("Output file name: ("): Uncomment test.
5225 ("Output file name: )"): Likewise.
5226 Based on an idea from Noah Misch.
5227
5228 2008-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
5229
5230 Work-around an Autoconf 2.62 AT_SETUP bug that was not present in
5231 2.61. Reported by Juan Manuel Guerrero at
5232 <http://lists.gnu.org/archive/html/bug-bison/2008-04/msg00011.html>.
5233 * tests/output.at ("Output file name: ("): Comment out test case for
5234 now.
5235 ("Output file name: )"): Likewise.
5236
5237 2008-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
5238
5239 * GNUmakefile: Update git-version-gen invocation so make dist
5240 succeeds.
5241
5242 2008-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
5243
5244 Update to the current gnulib CVS repository, and fix trigraph handling
5245 in Bison.
5246 * bootstrap: Update gnulib CVS repository URL.
5247 (symlink_to_dir): Encapsulate the code that guarantees the destination
5248 directory exists into...
5249 (check_dst_dir): ... this new function, and...
5250 (cp_mark_as_generated): ... reuse it here so that bootstrap doesn't
5251 fail when copying files into lib/uniwidth/.
5252 * src/output.c (prepare_symbols): When writing yytname muscles, where
5253 symbol names will be encoded in C-string literals, tell quotearg to
5254 escape trigraphs. This used to be the default in gnulib.
5255 * tests/regression.at (Token definitions): Because of the change in
5256 gnulib's quotearg behavior, string_as_id in parse-gram.y no longer
5257 escapes trigraphs in symbol names. Thus, yytname no longer has
5258 trigraphs unnecessarily doubly escaped. Update test case output.
5259 Extend test case to be sure Bison's own error messages will no longer
5260 have trigraphs in symbol names unnecessarily escaped once.
5261
5262 2008-04-20 Joel E. Denny <jdenny@ces.clemson.edu>
5263
5264 Fix make dist infinite loop reported by Juan Manuel Guerrero at
5265 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00009.html>.
5266 * .cvsignore: Add .version.
5267 * .version.in: New.
5268 * bootstrap.conf (gnulib_modules): Add git-version-gen.
5269 * configure.ac (AC_CONFIG_FILES): Add .version.
5270 * build-aux/.cvsignore: Add git-version-gen.
5271
5272 2008-03-08 Joel E. Denny <jdenny@ces.clemson.edu>
5273
5274 * NEWS (2.3a+): Mention that -g now takes an argument.
5275 * doc/bison.texinfo (Bison Options): Reword -W entry a little for
5276 consistency. Update the -g and -x entries now that they take
5277 arguments. Use brackets to indicate optional arguments.
5278 * src/getargs.c (usage): Explain the relationship between arguments of
5279 long and short options more completely. Document --defines and -d
5280 separately since the former takes an argument but, for POSIX Yacc, the
5281 latter does not.
5282 (short_options): Let -W take an optional argument like --warnings.
5283 (getargs): Sort cases.
5284
5285 2008-02-28 Akim Demaille <demaille@gostai.com>
5286
5287 * doc/bison.texinfo: Fix a few typos.
5288
5289 2008-02-28 Akim Demaille <akim@epita.fr>
5290
5291 * doc/bison.texinfo (Bison Options): Document -W.
5292 Based on Joel E. Denny's NEWS entry, and Automake's documentation.
5293
5294 2008-02-28 Akim Demaille <akim@epita.fr>
5295
5296 * src/getargs.c (short_options): Split and sort for readability.
5297 -g and -x take optional arguments, just like their long options.
5298 * build-aux/cross-options.pl: Use /x to make the regexp easier to
5299 understand.
5300 Fix the handling of $opt which resulted in all the argument to be
5301 considered as optional.
5302
5303 2008-02-22 Joel E. Denny <jdenny@ces.clemson.edu>
5304
5305 * NEWS (2.3a+): Don't say %language is experimental. Mention Java and
5306 say its interface is experimental.
5307 * doc/bison.texinfo (Decl Summary): In the %language entry, mention
5308 Java.
5309 (Bison Options): In the -L and --language entry, mention Java.
5310 (Java Bison Interface): Say the interface is experimental.
5311 * src/getargs.c (usage): Mention -L and --language.
5312
5313 * NEWS (2.3a+): Say the push parsing interface is experimental.
5314 * doc/bison.texinfo (Push Decl): Likewise.
5315 (Decl Summary): Likewise in the "%define api.push_pull" entry.
5316 (Push Parser Function): Likewise.
5317 (Pull Parser Function): Likewise.
5318 (Parser Create Function): Likewise.
5319 (Parser Delete Function): Likewise.
5320 (Table of Symbols): Likewise in the yypstate_delete, yypstate_new,
5321 yypull_parse, and yypush_parse entries.
5322
5323 * NEWS (2.3a+): Mention XML support, and say the schema is
5324 experimental.
5325 * doc/bison.texinfo (Bison Options): Mention -x and --xml.
5326 * src/getargs.c (usage): Say the XML schema is experimental.
5327
5328 * NEWS (2.3a+): Say option instead of flag.
5329
5330 2008-02-21 Wojciech Polak <polak@gnu.org>
5331
5332 * data/xslt/xml2xhtml.xsl (xsl:template match="/"): Change footer
5333 text.
5334
5335 2008-02-20 Joel E. Denny <jdenny@ces.clemson.edu>
5336
5337 Fix impure push parser compile error reported by Bob Rossi at
5338 <http://lists.gnu.org/archive/html/help-bison/2008-02/msg00023.html>.
5339 * data/yacc.c: Clean up whitespace in the output a little.
5340 (yypstate_allocated): Define for impure push parsers regardless of
5341 whether the pull interface is also requested.
5342 * tests/push.at (Push Parsing: Multiple impure instances): Extend to
5343 check impure push parsers without the pull interface.
5344
5345 * data/yacc.c (yypstate_new): Don't try to invoke yyerror since
5346 yyerror takes arguments specified by %parse-param while yypstate_new
5347 does not.
5348 * doc/bison.texinfo (Parser Create Function): Document that
5349 yypstate_new returns 0 for multiple impure parser instances.
5350 * tests/push.at (Push Parsing: Multiple impure instances): Update
5351 expected stderr output.
5352
5353 2008-02-19 Joel E. Denny <jdenny@ces.clemson.edu>
5354
5355 * runtime-po/POTFILES.in (push.c): Remove.
5356
5357 2008-02-17 Joel E. Denny <jdenny@ces.clemson.edu>
5358
5359 * data/Makefile.am (dist_pkgdata_DATA): Remove push.c.
5360 * data/push.c: Rename to...
5361 * data/yacc.c: ... this, overwriting it.
5362 * etc/bench.pl.in (bench_grammar): `%pure-parser'-> `%define api.pure'.
5363 `%push-pull-parser' -> `%define api.push_pull "both"'.
5364 Remove old yacc.c tests, and update push.c tests to yacc.c.
5365
5366 2008-02-17 Joel E. Denny <jdenny@ces.clemson.edu>
5367
5368 * data/bison.m4 (b4_percent_code_get): Output %code block comments like
5369 `"%code top" blocks' instead of `%code "top" blocks'.
5370 * data/push.c: Import yacc.c changes from 2008-01-09 and 2007-08-03.
5371 Clean up whitespace in the output a little.
5372
5373 2008-02-16 Joel E. Denny <jdenny@ces.clemson.edu>
5374
5375 Fix documentation problems reported by Tim Josling at
5376 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00013.html>.
5377 * NEWS (2.3a+): Mention removal of --no-parser, -n, and %no-parser.
5378 * doc/bison.texinfo (Token Decl): Token numbers are *nonnegative*
5379 integers. Explain the effect of literal string aliases on error
5380 messages. Copy token 0 documentation from the C++ skeleton
5381 documentation.
5382
5383 2008-02-16 Joel E. Denny <jdenny@ces.clemson.edu>
5384
5385 Accept a token number in a %left, %right, or %nonassoc for POSIX
5386 conformance. Reported by Tim Josling at
5387 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00010.html>.
5388 * NEWS (2.3a+): Mention.
5389 * doc/bison.texinfo (Precedence Decl): Describe how literal strings
5390 and code numbers are treated by precedence declarations.
5391 * src/parse-gram.y (precedence_declaration): Use symbols.prec instead
5392 of symbols.1.
5393 (symbols.prec): New, just like symbols.1 but uses symbol.prec instead
5394 of symbol.
5395 (symbol.prec): New, just like symbol but allows INT.
5396 * src/symtab.c (symbol_user_token_number_set): Remove an aver that no
5397 longer holds.
5398 * tests/regression.at (Token number in precedence declaration): New
5399 test case.
5400
5401 2008-02-06 Juan Manuel Guerrero <juan.guerrero@gmx.de>
5402
5403 DJGPP specific issues.
5404 * djgpp/config.bat: Add filenames that are not 8.3 clean and that must
5405 be changed. Copyright timestamp adjusted.
5406 * djgpp/config.sed: Add filenames that are not 8.3 clean and that must
5407 be changed. Copyright timestamp adjusted.
5408 * djgpp/config.site: Copyright timestamp adjusted.
5409 * djgpp/config_h.sed: Copyright timestamp adjusted.
5410 * djgpp/djunpack.bat: Copyright timestamp adjusted.
5411 * djgpp/fnchnage.lst: Add filenames that are not 8.3 clean to the
5412 filename translation list.
5413 * djgpp/subpipe.c (init_subpipe): Check the environment variables
5414 TMPDIR, TMP and TEMP, in that order, to determinate where the temp
5415 files shall be created. Before trying to use the temp dir where the
5416 environment variable points to check that the dir really exists. If
5417 not default to the cwd as temp dir. Copyright timestamp adjusted.
5418 * djgpp/subpipe.h: Copyright timestamp adjusted.
5419 * djgpp/testsuite.sed: Copyright timestamp adjusted.
5420
5421 2008-01-30 Paul Eggert <eggert@cs.ucla.edu>
5422
5423 * doc/bison.texinfo: Update Back-Cover text to reflect new GNU wording.
5424
5425 2008-01-09 Paul Eggert <eggert@cs.ucla.edu>
5426
5427 * data/yacc.c (yyparse): Correct the comment when locations aren't used.
5428 Problem reported by Claudio Saavedra in
5429 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00003.html>.
5430
5431 2008-01-05 Wojciech Polak <polak@gnu.org>
5432
5433 * data/xslt/xml2xhtml.xsl (xsl:template match="/"): Precede an XHTML
5434 document's title with the input grammar file name.
5435
5436 2007-12-22 Joel E. Denny <jdenny@ces.clemson.edu>
5437
5438 Automate regression testing of the XML/XSLT implementation. Discussed
5439 starting at
5440 <http://lists.gnu.org/archive/html/bison-patches/2007-11/msg00021.html>.
5441 * configure.ac (XSLTPROC): New substitution.
5442 * Makefile.am (maintainer-xml-check): New phony target invoking...
5443 * tests/Makefile.am (maintainer-xml-check): ... this new phony target
5444 invoking make maintainer-check with BISON_TEST_XML=1.
5445 * tests/atlocal.in (XSLTPROC): New.
5446 * tests/local.at (AT_BISON_CHECK): New macro to (1) instruct Valgrind
5447 not to report reachable memory when Bison is expected to have a
5448 non-zero exit status and (2) to compare XML/XSLT output with --graph
5449 and --report=all output for every working grammar when
5450 BISON_TEST_XML=1.
5451 (AT_BISON_CHECK_NO_XML): Likewise, but skip XML checks.
5452 (AT_BISON_CHECK_XML): New.
5453 (AT_QUELL_VALGRIND): New.
5454 * tests/testsuite.at (ORIGINAL_AT_CHECK): Remove this and...
5455 (AT_CHECK): ... don't redefine this since this was the old way to
5456 quell Valgrind.
5457 * tests/actions.at: Rewrite all AT_CHECK invocations for bison as
5458 AT_BISON_CHECK invocations.
5459 * tests/c++.at: Likewise.
5460 * tests/calc.at: Likewise.
5461 * tests/conflicts.at: Likewise.
5462 * tests/cxx-type.at: Likewise.
5463 * tests/existing.at: Likewise.
5464 * tests/glr-regression.at: Likewise.
5465 * tests/headers.at: Likewise.
5466 * tests/input.at: Likewise.
5467 * tests/java.at: Likewise.
5468 * tests/output.at: Likewise.
5469 * tests/push.at: Likewise.
5470 * tests/reduce.at: Likewise.
5471 * tests/regression.at: Likewise.
5472 * tests/sets.at: Likewise.
5473 * tests/skeletons.at: Likewise.
5474 * tests/synclines.at: Likewise.
5475 * tests/torture.at: Likewise.
5476 (Big triangle): Use AT_BISON_CHECK_NO_XML instead since this grammar
5477 tends to hang xsltproc.
5478 (Big horizontal): Likewise.
5479
5480 2007-12-08 Joel E. Denny <jdenny@ces.clemson.edu>
5481
5482 In XML output, remove redundant class attribute on symbol element.
5483 * data/xslt/bison.xsl (xsl:key name="bison:symbolByName"): New.
5484 * data/xslt/xml2xhtml.xsl (xsl:template match="symbol"): Use it to
5485 look up a symbol to determine whether it's a nonterminal or terminal.
5486 * src/gram.c (rule_rhs_print_xml): Remove class attribute.
5487 * src/state.c (state_rule_lookahead_tokens_print_xml): Likewise.
5488
5489 Add prec/assoc information to XML output.
5490 * src/gram.c (grammar_rules_print_xml): For each rule that has a
5491 %prec, add a percent_prec attribute.
5492 * src/print-xml.c (print_grammar): For each terminal that has a
5493 precedence or associativity, add a prec or assoc attribute.
5494 (xml_indent): New.
5495 (xml_puts): Use xml_indent.
5496 (xml_printf): Use xml_indent.
5497 * src/print-xml.h (xml_indent): Prototype.
5498
5499 * tests/existing.at (GNU pic Grammar): Fix a rule miscopied from
5500 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00026.html>.
5501
5502 2007-12-08 Joel E. Denny <jdenny@ces.clemson.edu>
5503
5504 * data/xslt/bison.xsl (bison:ruleNumber): Rename to...
5505 (bison:ruleByNumber): ... this for clarity.
5506 * data/xslt/xml2dot.xsl (xsl:template match="item"): Update.
5507 * data/xslt/xml2text.xsl (xsl:template match="item"): Update.
5508 (xsl:template match="reduction"): Update.
5509 (xsl:template match="item"): Update.
5510 (xsl:template match="reduction"): Update.
5511
5512 In the XML output, don't print the list of rules where symbols appear.
5513 Compute it in XSLT instead. Discussed at
5514 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00024.html>.
5515 * data/xslt/bison.xsl (bison:ruleByLhs): New.
5516 (bison:ruleByRhs): New.
5517 * data/xslt/xml2text.xsl (xsl:template match="terminal"): Use
5518 bison:ruleByRhs.
5519 (xsl:template match="terminal/rule"): Remove.
5520 (xsl:template match="nonterminal"): Use bison:ruleByLhs and
5521 bison:ruleByRhs.
5522 (xsl:template match="nonterminal/left/rule|nonterminal/right/rule"):
5523 Remove.
5524 * data/xslt/xml2xhtml.xsl (xsl:template match="terminal"): Use
5525 bison:ruleByRhs and mode="number-link" for rule template.
5526 (xsl:template match="terminal/rule"): Remove.
5527 (xsl:template match="nonterminal"): Use bison:ruleByLhs and
5528 bison:ruleByRhs and mode="number-link" for rule template.
5529 (xsl:template match="nonterminal/left/rule|nonterminal/right/rule"):
5530 Rewrite as...
5531 (xsl:template match="rule" mode="number-link"): ... this.
5532 * src/print-xml.c (print_grammar): Don't print the list of rules.
5533
5534 2007-12-01 Joel E. Denny <jdenny@ces.clemson.edu>
5535
5536 Don't let --report affect XML output; always print all information.
5537 Discussed at
5538 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00020.html>.
5539 * src/conflicts.c (log_resolution): Implement.
5540 * src/print-xml.c (print_core): Implement.
5541 (print_state): Implement.
5542 (print_xml): Implement.
5543
5544 * NEWS (2.3a+): Fix quotes.
5545 * src/parse-gram.y (prologue_declaration): For consistency with -v,
5546 don't let %verbose clear the list specified by --report.
5547
5548 2007-11-26 Akim Demaille <akim@epita.fr>
5549
5550 * data/Makefile.am (dist_pkgdata_DATA): Ship and install bison.xsl.
5551
5552 2007-11-24 Joel E. Denny <jdenny@ces.clemson.edu>
5553
5554 In the XML output, list useless and unused symbols and rules with the
5555 useful ones and add a "usefulness" attribute. Discussed starting at
5556 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00017.html>.
5557 * src/gram.c (grammar_rules_partial_print_xml): Remove.
5558 (grammar_rules_print_xml): Print all rules instead of just those
5559 useful in the grammar, and add a "usefulness" attribute.
5560 * src/gram.h (grammar_rules_partial_print_xml): Remove prototype.
5561 * src/print-xml.c (print_rules_useless_in_parser): Remove.
5562 (print_grammar): Print all nonterminals instead of just useful ones,
5563 and add a "usefulness" attribute to nonterminals and terminals.
5564 (print_xml): Don't print a separate "reductions" or
5565 "rules-useless-in-parser" element.
5566 * src/reduce.c (reduce_output): Use reduce_token_unused_in_grammar.
5567 (reduce_xml): Remove.
5568 (reduce_token_unused_in_grammar): New.
5569 (reduce_nonterminal_useless_in_grammar): New.
5570 * src/reduce.h (reduce_xml): Remove prototype.
5571 (reduce_token_unused_in_grammar): Add prototype.
5572 (reduce_nonterminal_useless_in_grammar): Add prototype.
5573 * data/xslt/xml2text.xsl: Update for XML changes.
5574 * data/xslt/xml2xhtml.xsl: Update for XML changes.
5575 * tests/reduce.at (Useless Terminals): Update output.
5576 (Useless Rules): Update output.
5577 (Reduced Automaton): Update output.
5578
5579 Say "Terminals unused in grammar" instead of "Unused terminals".
5580 * NEWS (2.3a+): Update.
5581 * doc/bison.texinfo (Understanding): Update example output.
5582 * src/reduce.c (reduce_output): Implement.
5583 * data/xslt/xml2text.xsl: Implement.
5584 * data/xslt/xml2xhtml.xsl: Implement.
5585
5586 2007-11-18 Joel E. Denny <jdenny@ces.clemson.edu>
5587
5588 Accept --report-file=FILE to override the default `.output' filename.
5589 * NEWS (2.3a+): Mention.
5590 * doc/bison.texinfo (Bison Options): Add an entry.
5591 * src/files.c (compute_output_file_names): Don't override
5592 spec_verbose_file if already set.
5593 * src/getargs.c (usage): Document --report-file.
5594 (REPORT_FILE_OPTION): New anonymous enum member.
5595 (long_options): Add entry for it.
5596 (getargs): Add case for it setting spec_verbose_file.
5597
5598 * build-aux/cross-options.pl: Don't record a short option just because
5599 there's an arg.
5600 * doc/.cvsignore: Add yacc.1.
5601
5602 2007-11-14 Akim Demaille <akim@epita.fr>
5603
5604 * doc/yacc.1.in: New.
5605 * configure.ac, doc/Makefile.am: Adjust.
5606 * configure.ac (PACKAGE_COPYRIGHT_YEAR): New substitution, and new
5607 config.h symbol.
5608 Use AC_SUBST for assignments too.
5609 * src/getargs.c (version): Use PACKAGE_COPYRIGHT_YEAR.
5610
5611 2007-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
5612
5613 * src/gram.c: Remove comments that duplicate comments in gram.h.
5614
5615 When reporting useless rules and nonterminals, say "useless in grammar"
5616 instead of "useless", and say "useless in parser" instead of "never
5617 reduced". Discussed starting at
5618 <http://lists.gnu.org/archive/html/bison-patches/2007-10/msg00033.html>.
5619 * NEWS (2.3a+): Mention this change.
5620 * data/xslt/xml2text.xsl: Update output text and expected input XML
5621 element names to match changes below.
5622 * data/xslt/xml2xhtml.xsl: Likewise.
5623 (xsl:template match="bison-xml-report"): Add missing entry in Table of
5624 Contents: "Rules useless in parser due to conflicts".
5625 * doc/bison.texinfo (Decl Summary): Reword a little.
5626 (Understanding): Update example output for changes below.
5627 * src/gram.c: (rule_useful_p): Rename to...
5628 (rule_useful_in_grammar_p): ... this.
5629 (rule_useless_p): Rename to...
5630 (rule_useless_in_grammar_p): ... this.
5631 (rule_never_reduced_p): Rename to...
5632 (rule_useless_in_parser_p): ... this.
5633 (grammar_rules_print): Update for renames.
5634 (grammar_rules_print_xml): Update for renames.
5635 (grammar_rules_never_reduced_report): Rename to...
5636 (grammar_rules_useless_report): ... this since it is used for either
5637 kind of useless rule.
5638 * src/gram.h: Reword comments and update function names in prototypes.
5639 * src/main.c (main): Say "rule useless in parser due to conflicts".
5640 * src/print-xml.c (print_rules_never_reduced): Rename to...
5641 (print_rules_useless_in_parser): ... this, and rename output XML
5642 element "rules-never-reduced" to "rules-useless-in-parser".
5643 (print_xml): Update for rename.
5644 * src/print.c (print_results): Say "Rules useless in parser due to
5645 conflicts".
5646 * src/reduce.c (reduce_grammar_tables): Say "rule useless in grammar".
5647 (nonterminals_reduce): Say "nonterminal useless in grammar".
5648 (reduce_output): Say "Nonterminals useless in grammar".
5649 Say "Rules useless in grammar".
5650 (reduce_xml): Rename output XML element "useless" to
5651 "useless-in-grammar".
5652 (reduce_print): Don't report the count of grammatically useless rules
5653 as "rules never reduced" just because %yacc is specified.
5654 In the correct report of this count, say nonterminal(s) and rule(s)
5655 "useless in grammar".
5656 * tests/conflicts.at (S/R in initial): Update expected output.
5657 (Defaulted Conflicted Reduction): Likewise.
5658 (Unreachable States After Conflict Resolution): Likewise.
5659 * tests/existing.at (GNU pic Grammar): Likewise.
5660 * tests/reduce.at (Useless Nonterminals): Likewise.
5661 (Useless Rules): Likewise.
5662 (Reduced Automaton): Likewise.
5663 (Underivable Rules): Likewise.
5664 (Empty Language): Likewise.
5665
5666 2007-11-09 Joel E. Denny <jdenny@ces.clemson.edu>
5667
5668 * data/bison.m4 (b4_cat): Put a newline after the end delimiter of the
5669 here document and before the EOF so that BSD's implementation of Bourne
5670 shell doesn't parse the delimiter as part of the here document.
5671 * doc/.cvsignore: Add cross-options.texi.
5672 * src/getargs.c (usage): Add a blank line after the warning categories.
5673
5674 2007-11-08 Paolo Bonzini <bonzini@gnu.org>
5675
5676 * data/lalr1.java (Lexer): Remove usage of b4_pure_if.
5677
5678 2007-11-05 Akim Demaille <akim@epita.fr>
5679
5680 Remove Id: from bison.1.
5681 * doc/Makefile.am (remove_time_stamp): Include the sed invocation.
5682 (perl -0777 -pi -e 's/\.PP\nId): New.
5683 (.x.1): Use it to ignore the version control revision.
5684
5685 2007-11-05 Akim Demaille <demaille@gostai.com>
5686
5687 * build-aux/Makefile.am: Ship cross-options.pl.
5688 * doc/Makefile.am: Always refer to cross-options.texi with
5689 $(srcdir).
5690 (MAINTAINERCLEANFILES): Add it.
5691
5692 2007-11-04 Akim Demaille <demaille@gostai.com>
5693
5694 Generate the long/short option cross-table.
5695 * build-aux/cross-options.pl: New.
5696 * doc/Makefile.am (cross-options.texi): New.
5697 * doc/bison.texinfo: Use it.
5698
5699 2007-11-04 Akim Demaille <demaille@gostai.com>
5700
5701 Generate bison.1 using help2man.
5702 * doc/common.x, doc/bison.x: New.
5703 * doc/Makefile.am (bison.1, .x.1): New.
5704 The code is taken from autoconf-2.61/man/Makefile.am.
5705 * configure.ac: Look for help2man.
5706
5707 2007-11-04 Akim Demaille <demaille@gostai.com>
5708
5709 Complete --help.
5710 * src/getargs.c (usage): Document -W, make it clear that -d,
5711 -g and -x have optional arguments.
5712
5713 2007-11-04 Akim Demaille <demaille@gostai.com>
5714
5715 Find sha1sum when named gsha1sum.
5716 * bootstrap (find_tool): New.
5717 ($SHA1SUM): New.
5718
5719 2007-10-28 Joel E. Denny <jdenny@ces.clemson.edu>
5720
5721 Deprecate %pure-parser and add `%define api.pure'. Discussed starting
5722 at
5723 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00006.html>.
5724 * NEWS (2.3a+): Mention.
5725 * data/bison.m4 (b4_pure_if): Don't define it here.
5726 * data/c.m4 (b4_identification): Depend on individual skeletons to
5727 define b4_pure_flag, b4_push_flag, or b4_pull_flag if they use the
5728 values of the %define variables api.pure or api.push_pull. Define
5729 YYPURE, YYPUSH, and YYPULL accordingly.
5730 * data/glr.c: Define b4_pure_if based on `%define api.pure' unless
5731 glr.cc has already defined b4_pure_flag.
5732 * data/push.c: Define b4_pure_if based on `%define api.pure'.
5733 Remove YYPUSH and YYPULL since they're back in b4_identification again.
5734 * data/yacc.c: Define b4_pure_if based on `%define api.pure'.
5735 * doc/bison.texinfo (Pure Decl): Update.
5736 (Push Decl): Update.
5737 (Decl Summary): Add api.pure to %define entry.
5738 In %pure-parser entry, say it's deprecated and reference %define.
5739 (Pure Calling): Update.
5740 (Error Reporting): Update.
5741 (C++ Scanner Interface): Update.
5742 (How Can I Reset the Parser): Update.
5743 (Table of Symbols): In %pure-parser entry, say it's deprecated and
5744 reference %define.
5745 * src/getargs.c (pure_parser): Remove global variable.
5746 * src/getargs.h (pure_parser): Remove extern.
5747 * src/output.c (prepare): Don't define pure_flag muscle.
5748 * src/parse-gram.y (prologue_declaration): Implement %pure-parser as a
5749 wrapper around `%define api.pure'.
5750 * tests/calc.at (Simple LALR Calculator): Update.
5751 (Simple GLR Calculator): Update.
5752 * tests/cxx-type.at (GLR: Resolve ambiguity, pure, no locations):
5753 Update.
5754 (GLR: Resolve ambiguity, pure, locations): Update.
5755 (GLR: Merge conflicting parses, pure, no locations): Update.
5756 (GLR: Merge conflicting parses, pure, locations): Update.
5757 * tests/glr-regression.at (Uninitialized location when reporting
5758 ambiguity): Update
5759 * tests/input.at (Unused %define api.pure): New test case.
5760 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Update definition for
5761 AT_PURE_IF and AT_PURE_AND_LOC_IF.
5762 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Update.
5763
5764 2007-10-28 Joel E. Denny <jdenny@ces.clemson.edu>
5765
5766 %define push_pull -> %define api.push_pull. Discussed starting at
5767 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00005.html>.
5768 * data/push.c: Expect the new name.
5769 * data/yacc.c: Likewise.
5770 * doc/bison.texinfo (Push Decl): Update.
5771 (Decl Summary): Update %define entry.
5772 (Push Parser Function): Update.
5773 (Pull Parser Function): Update.
5774 (Parser Create Function): Update.
5775 (Parser Delete Function): Update.
5776 * tests/calc.at (Simple LALR Calculator): Update.
5777 * tests/input.at (%define enum variables): Update.
5778 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Update.
5779 (Push Parsing: Multiple impure instances): Update.
5780 (Push Parsing: Unsupported Skeletons): Update.
5781 * tests/torture.at (Exploding the Stack Size with Alloca): Update.
5782 (Exploding the Stack Size with Malloc): Update.
5783
5784 * NEWS (2.3a+): Add an entry for the push parser, and clean up the
5785 other entries some.
5786
5787 2007-10-27 Joel E. Denny <jdenny@ces.clemson.edu>
5788
5789 For the XML output's terminal element, rename @number to @token-number,
5790 and add @symbol-number. In the nonterminal element, rename @number to
5791 @symbol-number. Discussed starting at
5792 <http://lists.gnu.org/archive/html/bison-patches/2007-10/msg00040.html>.
5793 * data/xslt/xml2text.xsl (xsl:template match="terminal"): Update for
5794 renames.
5795 (xsl:template match="nonterminal"): Likewise.
5796 * data/xslt/xml2xhtml.xsl (xsl:template match="terminal"): Likewise.
5797 (xsl:template match="nonterminal"): Likewise.
5798 * src/print-xml.c (print_grammar): Implement.
5799
5800 2007-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
5801
5802 * data/xslt/xml2dot.xsl (xsl:template match="automaton/state"): After
5803 2007-10-11 change, the child elements here are items not rules.
5804 (xsl:template match="item"): New.
5805 (xsl:template match="rule"): Update for new reduced itemset.
5806 (xsl:template match="point"): Remove.
5807 (xsl:template match="empty"): For consistency with --graph, don't
5808 output "/* empty */".
5809 * data/xslt/xml2text.xsl (xsl:template match="terminal"): When invoking
5810 line-wrap, don't pass a negative value as first-line-length since this
5811 won't work with the following changes.
5812 (xsl:template name="line-wrap"): Simplify slightly.
5813 (xsl:template name="ws-search"): Eliminate recursion.
5814 * src/print_graph.c (print_core): Don't print a reduction's lookahead
5815 set next to an item whose dot is not at the end of the RHS even if it
5816 happens to be associated with the same rule.
5817
5818 2007-10-19 Joel E. Denny <jdenny@ces.clemson.edu>
5819
5820 Add %define lr.keep_unreachable_states.
5821 * NEWS (2.3a+): Mention it in the entry for unreachable state removal.
5822 * doc/bison.texinfo (Decl Summary): Mention it in the %define entry.
5823 * src/main.c (main): Implement it.
5824 * tests/conflicts.at (Unreachable States After Conflict Resolution):
5825 Extend to test it, and fix a typo.
5826
5827 2007-10-19 Joel E. Denny <jdenny@ces.clemson.edu>
5828
5829 * NEWS (2.3a+): Add entry for recent .output file lookahead set fix.
5830 * doc/bison.texinfo (Understanding): Remove a bogus lookahead set in
5831 the example .output text.
5832 * tests/regression.at (Extra lookahead sets in report): Improve wording
5833 of comments.
5834
5835 2007-10-17 Wojciech Polak <polak@gnu.org>
5836
5837 * src/print-xml.c (print_grammar): Renamed
5838 <terminal> and <nonterminal> attributes:
5839 "type" to "number" and "symbol" to "name".
5840 * data/xslt/xml2text.xsl (xsl:template match="terminal"):
5841 Use new attribute names.
5842 (xsl:template match="nonterminal"): Likewise.
5843 * data/xslt/xml2xhtml.xsl: Likewise.
5844
5845 2007-10-17 Joel E. Denny <jdenny@ces.clemson.edu>
5846
5847 * doc/bison.texinfo (Bison Options): Add entry for --print-datadir.
5848 (Option Cross Key): Likewise.
5849
5850 * src/print-xml.c (print_core): Don't print a reduction's lookahead set
5851 next to an item whose dot is not at the end of the RHS even if it
5852 happens to be associated with the same rule.
5853 * src/print.c (print_core): Likewise.
5854 * tests/conflicts.at (Unresolved SR Conflicts): Update output.
5855 (Resolved SR Conflicts): Update output.
5856 * tests/regression.at (Extra lookahead sets in report): New test case.
5857
5858 2007-10-11 Wojciech Polak <polak@gnu.org>
5859
5860 * src/print-xml.c (print_core): Remove item set
5861 redundancy.
5862 * data/xslt/bison.xsl (bison:ruleNumber): New key.
5863 Improve processing time. Suggested by Joel E. Denny.
5864 * data/xslt/xml2dot.xsl (xsl:template name="escape"):
5865 Write xsl:param "required" attribute as comment.
5866 * data/xslt/xml2text.xsl (xsl:template match="item"): New.
5867 (xsl:template match="rule"): Support new reduced itemset.
5868 (xsl:template match="point"): Remove.
5869 * data/xslt/xml2xhtml.xsl: Likewise.
5870
5871 2007-10-09 Joel E. Denny <jdenny@ces.clemson.edu>
5872
5873 * src/getargs.c (version): Update copyright year.
5874
5875 2007-10-09 Joel E. Denny <jdenny@ces.clemson.edu>
5876
5877 Make xml2dot.xsl and --graph produce the same output.
5878 * data/xslt/xml2dot.xsl (xsl:template match="rule"): Use a `&#10;'
5879 instead of a `\n'. That is, don't add escapes yet or they'll be doubly
5880 escaped later.
5881 (xsl:template name="output-node"): Use the new escape template instead
5882 of the string-replace template directly.
5883 (xsl:template name="output-edge"): Likewise.
5884 (xsl:template name="escape"): New, escapes backslashes and newlines in
5885 addition to quotation marks.
5886 * src/graphviz.c (start_graph, output_node, output_edge): Add
5887 whitespace to output for legibility.
5888
5889 Make xml2text.xsl and --report produce the same output, and remove the
5890 XML "conflicts" element since a conflict summary is easily extracted
5891 from the automaton.
5892 * data/xslt/bison.xsl: New.
5893 (xsl:template match="state" mode="bison:count-conflicts): New.
5894 * data/xslt/xml2text.xsl: Import bison.xsl.
5895 (xsl:template match="bison-xml-report"): Instead of styling the
5896 "conflicts" element, style the "automaton" element with mode
5897 "conflicts". Unlike the former, the latter lists S/R and R/R
5898 conflicts for a state on the same line.
5899 (xsl:template match="conflicts"): Remove.
5900 (xsl:template match="conflict"): Remove.
5901 (xsl:template match="terminal"): Line-wrap the list of rules in which
5902 the terminal is used.
5903 (xsl:template match="nonterminal"): Likewise for nonterminals.
5904 (xsl:template match="automaton" mode="conflicts"): New.
5905 (xsl:template match="state" mode="conflicts"): New.
5906 (xsl:template name="line-wrap"): New.
5907 (xsl:template name="ws-search"): New.
5908 * data/xslt/xml2xhtml.xsl: Import bison.xsl.
5909 (xsl:template match="bison-xml-report"): Instead of styling the
5910 "conflicts" element, style the "automaton" element with mode
5911 "conflicts."
5912 (xsl:template match="conflicts"): Remove.
5913 (xsl:template match="conflict"): Remove.
5914 (xsl:template match="automaton" mode="conflicts"): New.
5915 (xsl:template match="state" mode="conflicts): New.
5916 * src/conflicts.c (conflicts_output_xml): Remove.
5917 * src/conflicts.h (conflicts_output_xml): Remove prototype.
5918 * src/print-xml.c (print_xml): Don't invoke conflicts_output_xml.
5919 * src/print.c (print_grammar): Consistently wrap at the 66th column so
5920 the corresponding XSLT is easier. Also, never wrap between a word and
5921 the comma that follows it.
5922
5923 2007-10-08 Joel E. Denny <jdenny@ces.clemson.edu>
5924
5925 Improve C++ namespace support. Discussed starting at
5926 <http://lists.gnu.org/archive/html/help-bison/2007-09/msg00016.html>.
5927 * data/c++.m4: (b4_namespace_ref, b4_namespace_open,
5928 b4_namespace_close): New macros that interpret the %define variable
5929 "namespace" so its value can contain "::" to indicate nested
5930 namespaces.
5931 * data/glr.cc (b4_namespace): Don't define, and replace all uses with
5932 the above macros.
5933 * data/lalr1.cc (b4_namespace): Likewise.
5934 * data/location.cc (b4_namespace): Likewise.
5935 * doc/bison.texinfo (Decl Summary): Move `%define push_pull' entry
5936 inside a new table in the general %define entry. Document `%define
5937 namespace' there as well. Point the %name-prefix entry to it since it
5938 explains it more completely in the case of C++.
5939 (C++ Bison Interface): Mention `%define namespace' instead of
5940 %name-prefix.
5941 (Table of Symbols): Remove the `%define push_pull' entry. The %define
5942 entry suffices.
5943 * tests/c++.at (Relative namespace references): New test case.
5944 (Absolute namespace references): New test case.
5945 (Syntactically invalid namespace references): New test case.
5946 * tests/input.at (C++ namespace reference errors): New test case.
5947
5948 2007-10-08 Joel E. Denny <jdenny@ces.clemson.edu>
5949
5950 Add syncline support and location accessor to internal %define
5951 interfaces.
5952 * data/bison.m4 (b4_percent_define_get_loc): New.
5953 (b4_percent_define_get_syncline): New.
5954 (b4_percent_define_flag_if): Use b4_percent_define_get_loc.
5955 (b4_percent_define_default): Record defining location as line 1 rather
5956 than 0 for the sake of synchronizing #line's, and define
5957 b4_percent_define_syncline(VARIABLE).
5958 (b4_percent_define_check_values): Use b4_percent_define_get_loc.
5959 * src/muscle_tab.c (muscle_syncline_grow): New.
5960 (muscle_code_grow): Use muscle_syncline_grow.
5961 (muscle_percent_define_insert): Use muscle_percent_define_get_loc, and
5962 define b4_percent_define_syncline(VARIABLE).
5963 (muscle_percent_define_get_loc): New.
5964 (muscle_percent_define_get_syncline): New.
5965 (muscle_percent_define_flag_if): Use muscle_percent_define_get_loc, and
5966 remove some unused variables.
5967 (muscle_percent_define_default): Record defining location as line 1
5968 rather than 0 for the sake of synchronizing #line's, and define
5969 b4_percent_define_syncline(VARIABLE).
5970 (muscle_percent_define_check_values): Use
5971 muscle_percent_define_get_loc.
5972 * src/muscle_tab.h (muscle_percent_define_get_loc): Prototype.
5973 (muscle_percent_define_get_syncline): Prototype.
5974 * tests/skeletons.at (%define Boolean variables: invalid skeleton
5975 defaults): Update output for location change.
5976 (Complaining during macro argument expansion): Extend to test
5977 b4_percent_define_get_loc and b4_percent_define_get_syncline errors.
5978
5979 2007-10-07 Joel E. Denny <jdenny@ces.clemson.edu>
5980
5981 Fix some error-reporting macro bugs.
5982 * data/bison.m4 (b4_cat): New.
5983 (b4_error, b4_error_at): Use b4_cat to send error directives directly
5984 to stdout so they don't become arguments to other macros. Update
5985 comments and add examples.
5986 (b4_warn, b4_warn_at, b4_complain, b4_complain_at): Update comments and
5987 add examples.
5988 (b4_fatal, b4_fatal_at): Likewise, and invoke m4_exit(1) immediately
5989 after printing the error directive so that M4 doesn't report subsequent
5990 problems that are induced by this problem.
5991 * src/scan-skel.l: Recognize @` digraph outside of directive arguments
5992 instead of just in them. Recognize @\n in both places. Both expand to
5993 the empty string. Needed by b4_cat.
5994 * tests/skeletons.at (Complaining during macro argument expansion):
5995 New test case.
5996 (Fatal errors make M4 exit immediately): New test case.
5997
5998 2007-10-04 Joel E. Denny <jdenny@ces.clemson.edu>
5999
6000 Implement --print-datadir.
6001 * src/getargs.c (usage): Mention.
6002 (PRINT_DATADIR_OPTION): New anonymous enum member.
6003 (long_options): Add entry for it.
6004 (getargs): Add case for it calling compute_pkgdatadir.
6005 * src/output.c (output_skeleton): Encapsulate data directory
6006 computation from here...
6007 (prepare): ... and from here...
6008 (compute_pkgdatadir): ... into this new function.
6009 * src/output.h (compute_pkgdatadir): Prototype.
6010
6011 2007-09-29 Joel E. Denny <jdenny@ces.clemson.edu>
6012
6013 * src/print-xml.c (escape_bufs): New static global variable
6014 replacing...
6015 (xml_escape_n): ... the static local variable buf here.
6016 (print_xml): Free memory for escape_bufs.
6017 * src/reduce.c (reduce_xml): XML-escape terminal symbol tags.
6018
6019 2007-09-25 Joel E. Denny <jdenny@ces.clemson.edu>
6020
6021 Replace `%push-parser' and `%push-pull-parser' with
6022 `%define push_pull "push"' and `%define push_pull "both"'.
6023 `%define push_pull "pull"' is the default.
6024 * doc/bison.texinfo (Push Decl, Push Parser Function,
6025 Pull Parser Function, Parser Create Function, Parser Delete Function):
6026 Update declarations.
6027 (Decl Summary, Table of Symbols): Replace %push-parser and
6028 %push-pull-parser entries with a %define push_pull entry.
6029 * data/bison.m4 (b4_percent_define_check_values): New macro.
6030 (b4_pull_if, b4_push_if, b4_use_push_for_pull_if): Move these
6031 definitions...
6032 * data/c.m4 (b4_identification): ... and the YYPUSH and YYPULL cpp
6033 definitions...
6034 * data/push.c: ... to here and compute them from the value of the
6035 %define variable push_pull.
6036 * data/c-skel.m4: Instead of choosing the push.c skeleton for push
6037 parsing requests here...
6038 * data/yacc.c: ... hack this to switch to push.c any time
6039 b4_use_push_pull_flag or the %define variable push_pull is set. This
6040 will go away when we mv push.c yacc.c.
6041 * data/c++-skel.m4, data/glr.c, data/java-skel.m4: Don't report that
6042 push parsing is not supported since unused %define variables are
6043 reported anyway.
6044 * src/getargs.c, src/getargs.h (pull_parser, push_parser): Remove.
6045 * src/muscle_tab.h (muscle_percent_define_check_values): Update
6046 comments for consistency with b4_percent_define_check_values.
6047 * src/output.c (prepare): Don't insert b4_pull_flag and b4_push_flag
6048 muscles.
6049 * src/parse-gram.y (PERCENT_PUSH_PARSER, PERCENT_PUSH_PULL_PARSER):
6050 Remove.
6051 (prologue_declaration): Remove %push-parser and %push-pull-parser
6052 rules.
6053 * src/scan-gram.l (%push-parser, %push-pull-parser): Remove rules.
6054 * tests/calc.at: Update declarations.
6055 * tests/input.at (%define enum variables): New test case.
6056 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Update
6057 declaration.
6058 (Push Parsing: Multiple impure instances): Update declaration.
6059 (Push Parsing: Unsupported Skeletons): New test case.
6060 * tests/torture.at (Exploding the Stack Size with Alloca): Update
6061 declaration.
6062 (Exploding the Stack Size with Malloc): Update declaration.
6063
6064 2007-09-24 Wojciech Polak <polak@gnu.org>
6065
6066 Add XSLT transformations.
6067
6068 * data/xslt/xml2dot.xsl: Transform XML into DOT.
6069 * data/xslt/xml2text.xsl: Transform XML into plain text.
6070 * data/xslt/xml2xhtml.xsl: Transform XML into XHTML.
6071 * data/Makefile.am (xsltdir): New variable.
6072 (dist_xslt_DATA): Add xslt/*.xsl files.
6073
6074 2007-09-23 Paul Eggert <eggert@cs.ucla.edu>
6075
6076 * src/conflicts.c (log_resolution): Fix indenting bugs I introduced.
6077 Problem reported by Wojciech Polak.
6078 * src/print-xml.c (xml_puts): Work even if LEVEL exceeds INT_MAX/2.
6079 (xml_printf): Undo change I made on 21 September; that is,
6080 indent 2 spaces, not 1.
6081
6082 2007-09-23 Joel E. Denny <jdenny@ces.clemson.edu>
6083
6084 Pacify ./configure --enable-gcc-warnings.
6085 * src/print-xml.c, src/print-xml.h (xml_puts): Make third argument
6086 `char const *' instead of `char *'.
6087 * src/state.c (state_rule_lookahead_tokens_print_xml): Remove unused
6088 local variable `sep'.
6089
6090 2007-09-21 Paul Eggert <eggert@cs.ucla.edu>
6091
6092 * src/gram.c (rule_rhs_print_xml): Now static, since it isn't used
6093 elsewhere.
6094 * src/print-xml.c: Prefer "const" after types; that's more consistent.
6095 (xml_printf): Indent just 1 space for level.
6096 (e_char, xlate_char): Remove.
6097 (xml_escape_string): Rewrite to avoid undefined behavior (used
6098 storage that was freed from the stack).
6099 (xml_escape_n): Don't bother checking for subscript error.
6100
6101 2007-09-21 Wojciech Polak <polak@gnu.org>
6102
6103 Add Bison XML Automaton Report.
6104
6105 Add support for an -x option to generate an XML report.
6106 It is not documented yet.
6107 * src/print-xml.c: New file.
6108 * src/print-xml.h: Likewise.
6109 * lib/timevar.def (TV_XML): New var.
6110 * src/Makefile.am (bison_SOURCES): Add print-xml.c, print-xml.h.
6111 * src/conflicts.c: Include print-xml.h.
6112 (solved_conflicts_xml_obstack): New var.
6113 (log_resolution, conflicts_solve, conflicts_free):
6114 Add support for XML report.
6115 (conflicts_output_val): New function.
6116 * src/conflicts.h (conflicts_output_val): New decl.
6117 * src/files.c (spec_xml_file): New var.
6118 (compute_output_file_names, output_file_names_free): Add XML support.
6119 * src/files.h (spec_xml_file): New decl.
6120 * src/getargs.c (xml_flag): New var.
6121 (usage, short_options, long_options, getargs): Add XML support.
6122 * src/getargs.h (xml_flag): New decl.
6123 * src/gram.c: Include print-xml.h.
6124 (rule_lhs_print_xml, rule_rhs_print_xml):
6125 (grammar_rules_partial_print_xml, grammar_rules_print_xml):
6126 New functions.
6127 * src/gram.h: Declare external ones.
6128 * src/main.c: Include print-xml.h.
6129 (main): Add XML support.
6130 * src/reduce.c: Include print-xml.h.
6131 (reduce_xml): New function.
6132 * src/reduce.h: Declare it.
6133 * src/state.c: Include print-xml.h.
6134 (state_new): Add XML support.
6135 (state_rule_lookahead_tokens_print_xml): New function.
6136 * src/state.h: Declare it.
6137 (struct state): New member solved_conflicts_xml.
6138 * src/symtab.c (symbol_class_get_string): New function.
6139 * src/symtab.h: Declare it.
6140
6141 2007-09-21 Paul Eggert <eggert@cs.ucla.edu>
6142
6143 * GNUmakefile: Switch to coreutils's version.
6144 * bootstrap: Likewise.
6145 * Makefile.cfg: Adjust to new GNUmakefile.
6146 * README-hacking: Likewise.
6147
6148 Import from gnulib:
6149
6150 2006-08-18 Paul Eggert <eggert@cs.ucla.edu>
6151 Bruno Haible <bruno@clisp.org>
6152
6153 * m4/bison-i18n.m4 (BISON_I18N): Also handle the case where yacc exists
6154 and is a script that invokes bison. Tighten the code. Add comments.
6155
6156 2007-08-28 Joel E. Denny <jdenny@ces.clemson.edu>
6157
6158 Spell "boolean" as "Boolean". Reported by Akim Demaille.
6159 * data/bison.m4 (b4_percent_define_flag_if): Fix complaint.
6160 * doc/bison.texinfo (Decl Summary): Fix.
6161 * src/muscle_tab.c (muscle_percent_define_flag_if): Fix complaint.
6162 * tests/input.at (Boolean %define variables): Update output.
6163 * tests/skeletons.at (%define boolean variables: invalid skeleton
6164 defaults): Rename to...
6165 (%define Boolean variables: invalid skeleton defaults): ... this and
6166 update output.
6167
6168 2007-08-17 Joel E. Denny <jdenny@ces.clemson.edu>
6169
6170 In impure push mode, don't allow more than one yypstate to be allocated
6171 since multiple impure parsers would corrupt yynerrs.
6172 * data/push.c (yypstate_allocated): New static global variable
6173 initialized to 0.
6174 (yypull_parse): If yypstate_new returns 0, don't report it as memory
6175 exhaustion if yypstate_allocated is 1, but still return 2.
6176 (yypstate_new): Invoke yyerror and return 0 if yypstate_allocated is
6177 already 1. Otherwise, set it to 1.
6178 (yypstate_delete): Set it to 0.
6179 * tests/push.at (Push Parsing: Multiple impure instances): New test
6180 case.
6181
6182 2007-08-17 Bob Rossi <bob@brasko.net>
6183
6184 * doc/bison.texinfo (Push Decl): Document the push parser.
6185 (Table of Symbols): Ditto.
6186 (Pure Decl): Ditto.
6187 (Decl Summary): Ditto.
6188 (Multiple Parsers, Push Parser Function, Pull Parser Function,
6189 Parser Create Function, Parser Delete Function):
6190 Add new push parser symbols.
6191 (Table of Symbols): Document push-parser, push-pull-parser,
6192 yypush_parse, yypull_parse, yypstate_new and yypstate_delete.
6193
6194 2007-08-15 Paul Eggert <eggert@cs.ucla.edu>
6195
6196 Update to GPLv3.
6197 * doc/gpl-3.0.texi: New file.
6198 * doc/gpl.texi: Remove.
6199 * COPYING, GNUmakefile, HACKING, Makefile.am, Makefile.cfg:
6200 * Makefile.maint, NEWS, PACKAGING, README, README-alpha:
6201 * README-hacking, TODO, bootstrap, bootstrap.conf:
6202 * configure.ac, data/Makefile.am, data/README, data/bison.m4:
6203 * data/c++-skel.m4, data/c++.m4, data/c-skel.m4, data/c.m4:
6204 * data/glr.c, data/glr.cc, data/java-skel.m4, data/java.m4:
6205 * data/lalr1.cc, data/lalr1.java, data/location.cc:
6206 * data/push.c, data/yacc.c, data/m4sugar/m4sugar.m4:
6207 * djgpp/Makefile.maint, djgpp/README.in, djgpp/config.bat:
6208 * djgpp/config.sed, djgpp/config.site, djgpp/config_h.sed:
6209 * djgpp/djunpack.bat, djgpp/subpipe.c, djgpp/subpipe.h:
6210 * djgpp/testsuite.sed, doc/Makefile.am, doc/bison.texinfo:
6211 * doc/fdl.texi, doc/refcard.tex, etc/Makefile.am, etc/README:
6212 * etc/bench.pl.in, examples/Makefile.am, examples/extexi:
6213 * examples/calc++/Makefile.am, lib/Makefile.am, lib/abitset.c:
6214 * lib/abitset.h, lib/bbitset.h, lib/bitset.c, lib/bitset.h:
6215 * lib/bitset_stats.c, lib/bitset_stats.h, lib/bitsetv-print.c:
6216 * lib/bitsetv-print.h, lib/bitsetv.c, lib/bitsetv.h:
6217 * lib/ebitset.c, lib/ebitset.h, lib/get-errno.c:
6218 * lib/get-errno.h, lib/lbitset.c, lib/lbitset.h:
6219 * lib/libiberty.h, lib/main.c, lib/subpipe.c, lib/subpipe.h:
6220 * lib/timevar.c, lib/timevar.def, lib/timevar.h:
6221 * lib/vbitset.c, lib/vbitset.h, lib/yyerror.c:
6222 * m4/c-working.m4, m4/cxx.m4, m4/m4.m4, m4/subpipe.m4:
6223 * m4/timevar.m4, src/LR0.c, src/LR0.h, src/Makefile.am:
6224 * src/assoc.c, src/assoc.h, src/closure.c, src/closure.h:
6225 * src/complain.c, src/complain.h, src/conflicts.c:
6226 * src/conflicts.h, src/derives.c, src/derives.h, src/files.c:
6227 * src/files.h, src/flex-scanner.h, src/getargs.c:
6228 * src/getargs.h, src/gram.c, src/gram.h, src/graphviz.c:
6229 * src/lalr.c, src/lalr.h, src/location.c, src/location.h:
6230 * src/main.c, src/muscle_tab.c, src/muscle_tab.h:
6231 * src/nullable.c, src/nullable.h, src/output.c, src/output.h:
6232 * src/parse-gram.c, src/parse-gram.h, src/parse-gram.y:
6233 * src/print.c, src/print.h, src/print_graph.c:
6234 * src/print_graph.h, src/reader.c, src/reader.h, src/reduce.c:
6235 * src/reduce.h, src/relation.c, src/relation.h:
6236 * src/revision.h, src/scan-code.h, src/scan-code.l:
6237 * src/scan-gram.h, src/scan-gram.l, src/scan-skel.h:
6238 * src/scan-skel.l, src/state.c, src/state.h, src/symlist.c:
6239 * src/symlist.h, src/symtab.c, src/symtab.h, src/system.h:
6240 * src/tables.c, src/tables.h, src/uniqstr.c, src/uniqstr.h:
6241 * tests/Makefile.am, tests/actions.at, tests/c++.at:
6242 * tests/calc.at, tests/conflicts.at, tests/cxx-type.at:
6243 * tests/existing.at, tests/glr-regression.at:
6244 * tests/headers.at, tests/input.at, tests/java.at:
6245 * tests/local.at, tests/output.at, tests/push.at:
6246 * tests/reduce.at, tests/regression.at, tests/sets.at:
6247 * tests/skeletons.at, tests/synclines.at, tests/testsuite.at:
6248 * tests/torture.at:
6249 Update to GPLv3.
6250
6251 2007-08-11 Joel E. Denny <jdenny@ces.clemson.edu>
6252
6253 Get rid of broken %no-parser, -n, and --no-parser implementation and
6254 documentation.
6255 * TODO: Don't mention them.
6256 * doc/bison.1: Likewise.
6257 * doc/bison.texinfo (Decl Summary): Likewise.
6258 (Bison Options): Likewise.
6259 (Option Cross Key): Likewise.
6260 * src/getargs.c (no_parser_flag): Remove global variable.
6261 (usage): Don't print description of -n and --no-parser.
6262 (long_options): Remove --no-parser entry here.
6263 (getargs): Remove -n case in the switch here.
6264 * src/getargs.h (no_parser_flag): Remove extern.
6265 * tests/regression.at (Web2c Actions): Remove comment that mentions
6266 --no-parser.
6267
6268 2007-08-11 Joel E. Denny <jdenny@ces.clemson.edu>
6269
6270 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Do not
6271 name user variables starting with `yy'. Just pass NULL instead of a
6272 dummy local &yylval to yypush_parse.
6273 * tests/torture.at (AT_DATA_STACK_TORTURE): Do not name user variables
6274 starting with `yy'.
6275
6276 2007-08-03 Joel E. Denny <jdenny@ces.clemson.edu>
6277
6278 * data/yacc.c (yyexhaustedlab): Define it when YYERROR_VERBOSE is
6279 true since it's then always used regardless of whether yyoverflow is
6280 defined. Reported by Christian Burger at
6281 <http://lists.gnu.org/archive/html/bug-bison/2007-07/msg00031.html>.
6282 * THANKS: Add Christian Burger.
6283
6284 * ChangeLog: For changes in doc/bison.texinfo, consistently reference
6285 node names: say "Decl Summary" not "Bison Declaration Summary".
6286
6287 2007-07-28 Joel E. Denny <jdenny@ces.clemson.edu>
6288
6289 * src/muscle_tab.c (muscle_percent_define_flag_if): In order to
6290 determine whether this function has already complained about an invalid
6291 value for a %define boolean variable, don't check whether Bison has
6292 ever examined the value. As written, the check was a tautology.
6293 Instead, record and check for this complaint using a separate muscle.
6294
6295 2007-07-27 Joel E. Denny <jdenny@ces.clemson.edu>
6296
6297 Fix push parsing memory leak reported by Brandon Lucia at
6298 <http://lists.gnu.org/archive/html/bug-bison/2007-07/msg00032.html>.
6299 * THANKS: Add Brandon Lucia.
6300 * data/push.c (yypstate_delete): Free the stack if it was reallocated
6301 but the parse never completed and thus freed it.
6302 * tests/Makefile.am (TESTSUITE_AT): Add push.at.
6303 * tests/testsuite.at: Include push.at.
6304 * test/push.at: New.
6305 (Push Parsing: Memory Leak for Early Deletion): New test case.
6306
6307 2007-07-17 Joel E. Denny <jdenny@ces.clemson.edu>
6308
6309 Improve handling of multiple S/R conflicts in the same state and of S/R
6310 conflicts involving multiple reductions.
6311 * src/conflicts.c (resolve_sr_conflict): Don't assign the error action
6312 set for a state here or Bison will abort if it is reassigned on a
6313 later conflicted reduction in the same state.
6314 Similarly, don't finalize and assign the solved conflicts report here
6315 or it will be lost if it is reassigned on a later conflicted reduction
6316 in the same state.
6317 (set_conflicts): Instead, assign them both here after all S/R conflicts
6318 in the state have been fully examined.
6319 * src/print.c (shift_set): Rename to...
6320 (no_reduce_set): ... this.
6321 (print_reductions): Update for rename, and add %nonassoc error action
6322 tokens to no_reduce_set so that, when printing the first remaining
6323 reduction on an error action token, the reduction is enclosed in
6324 brackets.
6325 (print_results): Update for rename.
6326 * tests/conflicts.at (Solved conflicts report for multiple reductions
6327 in a state): New test case.
6328 (%nonassoc error actions for multiple reductions in a state): New test
6329 case.
6330
6331 * src/main.c (main): Don't depend on C99 features.
6332
6333 2007-07-16 Joel E. Denny <jdenny@ces.clemson.edu>
6334
6335 * build-aux/.cvsignore: Add compile.
6336 * lib/.cvsignore: Add charset.alias, ref-add.sed, ref-del.sed, and
6337 uniwidth.
6338
6339 2007-07-10 Joel E. Denny <jdenny@ces.clemson.edu>
6340
6341 * bootstrap (slurp): Create target directories that don't exist.
6342 Specifically, we need lib/uniwidth/ because of recent Gnulib changes.
6343
6344 2007-07-09 Joel E. Denny <jdenny@ces.clemson.edu>
6345
6346 * LR0.c (new_itemsets): Fix wording in comments: say item index rather
6347 than item number.
6348 * closure.c (closure): Likewise.
6349 * state.h (reductions): Comment sorting of rules.
6350 (state): Comment sorting of items.
6351
6352 2007-07-02 Joel E. Denny <jdenny@ces.clemson.edu>
6353
6354 Fix C++ test cases after recent Gnulib changes. Discussed starting at
6355 <http://lists.gnu.org/archive/html/bug-bison/2007-07/msg00000.html>.
6356 * examples/calc++/Makefile.am (DEFAULT_INCLUDES): Override Automake's
6357 definition in order to avoid Gnulib headers since we don't use config.h
6358 here.
6359 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): Use AT_DATA_GRAMMAR
6360 rather than AT_DATA so that config.h is included.
6361
6362 2007-07-01 Joel E. Denny <jdenny@ces.clemson.edu>
6363
6364 * data/glr.c (yy_yypstack, yypstates, yypdumpstack): Use YYFPRINTF
6365 instead of fprintf. Guard these functions with #if YYDEBUG instead of
6366 #ifdef YYDEBUG for consistency with all other uses of YYDEBUG in Bison
6367 and so that YYFPRINTF is guaranteed to be defined here.
6368
6369 2007-05-29 Joel E. Denny <jdenny@ces.clemson.edu>
6370
6371 * src/muscle_tab.c (muscle_percent_define_invalid_value): Replace
6372 with...
6373 (muscle_percent_define_check_values): ... this more helpful function.
6374 Again, it's not used yet, but it will be.
6375 * src/muscle_tab.h: Likewise.
6376
6377 Improve some comments in parser table construction.
6378 * src/LR0.c (new_itemsets): Explain sorting of itemset and kernel_base.
6379 (generate_states): Don't mention ruleset, which is internal to closure.
6380 * src/closure.c (closure): Explain sorting of core and itemset, which
6381 is required for this function to behave correctly.
6382 * src/closure.h (closure): Mention sorting.
6383
6384 2007-05-28 Joel E. Denny <jdenny@ces.clemson.edu>
6385
6386 * src/lalr.c (state_lookahead_tokens_count): For code readability,
6387 move the check for disabled transitions to an aver since conflict
6388 resolution hasn't happened yet.
6389
6390 * src/lalr.c (state_lookahead_tokens_count): Remove the check that
6391 labels a state as inconsistent just because it has error transitions.
6392 The original form of this check appeared in revision 1.1 of lalr.c,
6393 which was committed on 1991-12-21. Now (at least), changing the
6394 consistency label on such a state appears to have no useful effect in
6395 any of the places it is examined, which I enumerate below. The key
6396 point to understanding each item in this enumeration is that a state
6397 with an error transition is labelled consistent in the first place only
6398 if it has no rules, so the check cannot matter for states that have
6399 rules. (1) Labelling a state as inconsistent will cause set_conflicts
6400 to try to identify its conflicts, and a state must have *rules* to have
6401 conflicts. (2) Labelling a state as inconsistent will affect how
6402 action_row sets the default *rule* for the state. (3) Labelling a
6403 state as inconsistent will cause build_relations to add lookback edges
6404 to *rules* in that state.
6405 * src/state.h (struct state): Word the comment for member consistent
6406 more carefully.
6407
6408 2007-05-27 Joel E. Denny <jdenny@ces.clemson.edu>
6409
6410 Don't depend on C99 features.
6411 * src/conflicts.c (conflicts_update_state_numbers): Fix for-loop.
6412 * src/lalr.c (lalr_update_state_numbers): Fix for-loop.
6413 * src/reader.c (check_and_convert_grammar): Fix for-loop.
6414 * src/state.c (state_mark_reachable_states): Fix for-loop.
6415 (state_remove_unreachable_states): Fix for-loop.
6416
6417 Don't widen struct state with member reachable just to temporarily
6418 record reachability. Instead, use a local bitset.
6419 * src/state.h (struct state): Remove member.
6420 * src/state.c (state_new): Don't initialize it.
6421 (state_mark_reachable_states): Rename to...
6422 (state_record_reachable_states): ... this, and use bitset.
6423 (state_remove_unreachable_states): Use bitset.
6424
6425 2007-05-26 Joel E. Denny <jdenny@ces.clemson.edu>
6426
6427 * src/Makefile.am (yacc): Quote target action commands properly so
6428 that the yacc script isn't corrupt. Reported by Hans Aberg at
6429 <http://lists.gnu.org/archive/html/bug-bison/2007-05/msg00003.html>.
6430
6431 * data/glr.c (yylval): As in yacc.c, don't extern in the header for
6432 the case of pure parsers. Reported by Frans Englich at
6433 <http://lists.gnu.org/archive/html/help-bison/2007-05/msg00018.html>.
6434 * THANKS: Add Frans Englich.
6435
6436 * NEWS (2.3a+): In the %code entry, reference section `Bison
6437 Declaration Summary' from the manual now since the %code summary has
6438 moved there.
6439 * doc/bison.texinfo (Prologue Alternatives): Mention that directives
6440 in the rules section must be terminated by semicolons.
6441
6442 2007-05-20 Joel E. Denny <jdenny@ces.clemson.edu>
6443
6444 Extend the front-end API for %define variables to more completely
6445 mirror the back-end. This will be useful in the future.
6446 * data/bison.m4 (b4_percent_define_get, b4_percent_define_ifdef):
6447 Update comments to mention the new front-end counterparts of these
6448 macros.
6449 * src/muscle_tab.c (MUSCLE_COMMON_DECODE): New macro with common code
6450 for muscle_string_decode and muscle_location_decode.
6451 (muscle_string_decode): New static function.
6452 (muscle_location_decode): Use MUSCLE_COMMON_DECODE.
6453 (muscle_percent_define_get, muscle_percent_define_ifdef): New
6454 functions.
6455 (muscle_percent_define_flag_if): Use muscle_percent_define_ifdef and
6456 muscle_percent_define_get to mimic the b4_percent_define_flag_if
6457 implementation more closely.
6458 (muscle_percent_define_invalid_value): New function.
6459 * src/muscle_tab.h (muscle_percent_define_get,
6460 muscle_percent_define_ifdef, muscle_percent_define_invalid_value):
6461 Prototype.
6462
6463 2007-05-07 Joel E. Denny <jdenny@ces.clemson.edu>
6464
6465 * NEWS (2.3a+): Mention yesterday's state-removal change.
6466 (2.3a): Remove the %language entry, which was added after 2.3a.
6467 * src/LR0.c, src/closure.c, src/closure.h, src/conflicts.c,
6468 src/conflicts.h, src/lalr.c, src/lalr.h, src/print.c,
6469 src/print_graph.c, src/state.c, src/state.h, tests/conflicts.at,
6470 tests/existing.at: Update copyright date.
6471
6472 2007-05-06 Joel E. Denny <jdenny@ces.clemson.edu>
6473
6474 If conflict resolution makes states unreachable, remove those states,
6475 report rules that are then unused, and don't report conflicts in those
6476 states.
6477 * src/conflicts.c, src/conflicts.h (conflicts_update_state_numbers):
6478 New global function.
6479 * src/lalr.c, src/lalr.h (lalr_update_state_numbers): New global
6480 function.
6481 * src/main.c (main): After conflict resolution, remove the unreachable
6482 states and update all data structures that reference states by number.
6483 * src/state.c (state_new): Initialize each state's reachable member to
6484 false.
6485 (state_mark_reachable_states): New static function.
6486 (state_remove_unreachable_states): New global function.
6487 * src/state.h (struct state): Add member bool reachable.
6488 (state_remove_unreachable_states): Prototype.
6489 * tests/conflicts.at (Unreachable States After Conflict Resolution):
6490 New test case.
6491 * tests/existing.at (GNU pic Grammar): Update test case output now that
6492 an unused rule is discovered.
6493
6494 2007-05-06 Joel E. Denny <jdenny@ces.clemson.edu>
6495
6496 Minor code cleanup in parser table construction.
6497 * src/LR0.c (new_itemsets): Use item_number_is_symbol_number.
6498 (new_itemsets, save_reductions): Update for rename to nitemset.
6499 * src/closure.c (nritemset): Rename to...
6500 (nitemset): ... this since the "r" appears to meaningless and isn't
6501 used in the comments.
6502 (closure): Update for rename.
6503 * src/closure.h (nritemset): Update extern to...
6504 (nitemset): ... this.
6505 * src/lalr.c (LA): Fix a typo in comments.
6506 * src/print.c (print_core): Update for rename to nitemset.
6507 * src/print_graph.c (print_graph): Likewise.
6508 * src/state.h: Fix some typos in header comments.
6509
6510 2007-04-04 Paul Eggert <eggert@cs.ucla.edu>
6511
6512 * THANKS: Use ASCII for Sebastien Fricker's name. Bison source
6513 still sticks to ASCII. Sorry!
6514
6515 * README-hacking: New file, taken mostly from coreutils, with changes
6516 for Bison. Contains much of the contents of:
6517 * README-cvs: Remove.
6518 * bootstrap: Sync from gnulib.
6519 * build-aux/.cvsignore: Remove *.t, mkinstalldirs.
6520 * lib/.cvsignore: Add wchar.h, wctype.h. Remove exit.h.
6521
6522 2007-03-10 Joel E. Denny <jdenny@ces.clemson.edu>
6523
6524 * doc/bison.texinfo (Destructor Decl): Fix typo reported by Sebastian
6525 Setzer.
6526 (Java Differences): Fix some typos.
6527 * THANKS: Add Sebastian Setzer.
6528
6529 2007-03-07 Paolo Bonzini <bonzini@gnu.org>
6530
6531 * data/java.m4 (b4_single_class_if): Remove.
6532 (b4_abstract_if): Look at "%define abstract".
6533 (b4_lexer_if): New.
6534 (b4_union_name): Rename...
6535 (b4_yystype): ... to this. Map to "%define stype".
6536 (b4_rhs_value, b4_parse_param_decl, b4_lex_param_decl,
6537 b4_maybe_throws): Fix quoting.
6538 (b4_lex_param_call): Move below to keep b4_*_param_decl close.
6539 * data/lalr1.java (Lexer interface): Always define.
6540 (Lexer interface within parser class): Remove.
6541 (YYLexer class): New, used when "%code lexer" is present.
6542 (constructor): When "%code lexer" is used, pass %lex-param
6543 to the lexer constructor.
6544 (yylex, yyparse): Remove %lex-param from method invocations
6545 (YYStack, yyaction, yyparse): Rename b4_union_name to b4_yystype.
6546
6547 * doc/bison.texinfo (Java Bison Interface): Mention "%define
6548 abstract". Rename "%define union_name" to "%define stype".
6549 Rename method names according to previous patch.
6550 (Java Scanner Interface): Describe "%code lexer" instead of
6551 "%pure-parser" and "%define single_class".
6552 (Java Differences): Mention "%code lexer".
6553
6554 * tests/java.at (_AT_DATA_JAVA_CALC_Y): Remove final argument.
6555 Include scanner here, using macros from tests/local.at.
6556 (AT_DATA_CALC_Y): Remove final argument.
6557 (_AT_CHECK_JAVA_CALC): Likewise.
6558 (AT_CHECK_JAVA_CALC): Likewise. Test all four combinations
6559 of %locations and %error-verbose.
6560 (main): Test with and without %lex-param.
6561 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Push AT_LEXPARAM_IF.
6562 (AT_BISON_OPTION_POPDEFS): Pop it.
6563
6564 2007-03-07 Juan Manuel Guerrero <juan.guerrero@gmx.de>
6565
6566 DJGPP spefic issue. Inhibit the use of disallowed characters for
6567 file name genertion on Win98, WinXP, etc. These are |<>":?*\
6568 and concern testsuite case 46.
6569 * Makefile.am: djgpp/testsuite.sed added to EXTRA_DIST
6570 * djgpp/testsuite.sed: Inhibit the use of disallowed characters.
6571 * djgpp/config.bat: Inhibit the use of disallowed characters.
6572
6573 2007-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
6574
6575 Miscellaneous %define and %code cleanup.
6576 * data/bison.m4 (b4_percent_define_flag_if): Correct comments on how
6577 values are interpreted.
6578 * doc/bison.texinfo (Decl Summary): Clean up and extend %define
6579 documentation a little more.
6580 * src/muscle_tab.c (MUSCLE_USER_NAME_CONVERT,
6581 muscle_percent_define_insert, muscle_percent_code_grow): New
6582 functions/macros.
6583 * src/muscle_tab.h (muscle_percent_define_insert,
6584 muscle_percent_code_grow): Prototype.
6585 * src/parse-gram.y (prologue_declaration): Use
6586 muscle_percent_define_insert and muscle_percent_code_grow when parsing
6587 %define and %code directives.
6588
6589 Make it easy to share %define boolean variables between the front-end
6590 and back-end. Though not used yet, this will be useful in the future.
6591 * data/bison.m4 (b4_check_user_names): Rewrite comments to talk about
6592 Bison uses of names rather than just skeleton uses of names.
6593 (b4_percent_define_get, b4_percent_define_ifdef): Rename
6594 b4_percent_define_skeleton_variables(VARIABLE) to
6595 b4_percent_define_bison_variables(VARIABLE).
6596 (b4_percent_code_get, b4_percent_code_ifdef): Rename
6597 b4_percent_code_skeleton_qualifiers(QUALIFIER) to
6598 b4_percent_code_bison_qualifiers(QUALIFIER).
6599 (b4_check_user_names_wrap): Update for renames.
6600 * src/muscle_tab.c, src/muscle_tab.h (muscle_percent_define_flag_if,
6601 muscle_percent_define_default): New functions mimicking
6602 b4_percent_define_flag_if and b4_percent_define_default.
6603
6604 For %define variables, report locations for invalid values and
6605 redefinitions.
6606 * data/bison.m4 (b4_percent_define_flag_if): Read
6607 b4_percent_define_loc(VARIABLE) to report the location of an invalid
6608 value for VARIABLE.
6609 (b4_percent_define_default): Save a special location in
6610 b4_percent_define_loc(VARIABLE) in case the default value for VARIABLE
6611 must later be reported as invalid.
6612 * src/muscle_tab.c (muscle_location_grow, muscle_location_decode): New
6613 functions.
6614 (muscle_percent_define_insert): Record the location of VARIABLE in
6615 muscle percent_define_loc(VARIABLE), and use it to report the previous
6616 location for a redefinition.
6617 (muscle_percent_define_flag_if): Update like b4_percent_define_flag_if.
6618 (muscle_percent_define_default): Update like b4_percent_define_default.
6619 (muscle_grow_user_name_list): Rename to...
6620 (muscle_user_name_list_grow): ... this for consistency and use
6621 muscle_location_grow.
6622 * src/muscle_tab.h (muscle_location_grow): Prototype.
6623 * tests/input.at (%define errors): Update expected output.
6624 * tests/skeletons.at (%define boolean variables: invalid skeleton
6625 defaults): New test case.
6626
6627 2007-02-28 Joel E. Denny <jdenny@ces.clemson.edu>
6628
6629 * src/print.c (lookahead_set, state_default_rule): Remove.
6630 (print_reductions): Replace state_default_rule invocation with
6631 equivalent use of yydefact, which was computed in token_actions in
6632 tables.c.
6633 (print_results): Don't allocate lookahead_set.
6634
6635 2007-02-27 Paolo Bonzini <bonzini@gnu.org>
6636
6637 * data/lalr1.java: Prefix all private members with yy.
6638
6639 2007-02-24 Joel E. Denny <jdenny@ces.clemson.edu>
6640
6641 Use YYFPRINTF instead of fprintf where appropriate. Reported by
6642 Sebastien Fricker at
6643 <http://lists.gnu.org/archive/html/bug-bison/2007-02/msg00035.html>.
6644 * THANKS: Add Sebastien Fricker.
6645 * data/glr.c, data/push.c, data/yacc.c (yy_reduce_print): Implement.
6646 * doc/bison.texinfo (Tracing): Make it clearer that YYFPRINTF must
6647 accept a variable number of arguments.
6648
6649 2007-02-19 Joel E. Denny <jdenny@ces.clemson.edu>
6650
6651 * bootstrap: Remove occurrences of .#bootmp from lib/Makefile.
6652
6653 2007-02-13 Juan Manuel Guerrero <juan.guerrero@gmx.de>
6654
6655 * djgpp/config.bat: Adjustments concerning the use of autoconf 2.61.
6656 * djgpp/config.sed: Adjustments concerning the use of autoconf 2.61.
6657 * djgpp/config.site: Adjustments concerning the use of autoconf 2.61.
6658
6659 2007-02-11 Paul Eggert <eggert@cs.ucla.edu>
6660
6661 Undo my 2007-02-07 change, switching back to the c-strcase module
6662 introduced in the 2007-02-03 change. Bruno Haible reported that
6663 the 2007-02-07 change would be dangerous in Turkish if we add a
6664 language whose name contains "i", since "i" is not lowercase "I"
6665 in Turkish.
6666 * bootstrap.conf (gnulib_modules): Add c-strcase. Remove strcase.
6667 * lib/.cvsignore: Add c-ctype.c, c-ctype.h, c-strcase.h,
6668 c-strcasecomp.c, c-strncasecmp.c. Remove strcasecmp.c, strncasecmp.c.
6669 * m4/.cvsignore: Remove strcase.m4.
6670 * src/getargs.c: Revert 2007-02-07 change, as follows.
6671 Include c-strcase.h.
6672 (language_argmatch): Use c_strcasecmp rather than strcasecmp.
6673
6674 2007-02-11 Bruno Haible <bruno@clisp.org>
6675
6676 Enable the Java related testsuite tests when the only Java compiler
6677 found is a gcj < 4.3. Discussed at
6678 <http://lists.gnu.org/archive/html/bug-bison/2007-02/msg00016.html>.
6679 * configure.ac (gt_JAVACOMP): Don't specify a target_version.
6680
6681 2007-02-11 Joel E. Denny <jdenny@ces.clemson.edu>
6682
6683 * data/Makefile.am: Update copyright date.
6684 * data/push.c (yypull_parse): Report memory exhaustion and return 2 if
6685 yypstate_new returns NULL.
6686 (yypstate_new): Return NULL if malloc does.
6687 * src/reader.c (packgram): Move translation of rule actions from the
6688 beginning of packgram to...
6689 (check_and_convert_grammar): ... here right before packgram is invoked
6690 so it's easier to write more complete comments, and remove redundant
6691 code.
6692
6693 2007-02-10 Joel E. Denny <jdenny@ces.clemson.edu>
6694
6695 As in semantic actions, make @$ in %initial-action, %destructor, and
6696 %printer imply %locations.
6697 * src/scan-code.l (SC_SYMBOL_ACTION): Set locations_flag = true when
6698 scanning @$.
6699 * tests/actions.at (AT_CHECK_ACTION_LOCATIONS): New macro supporting...
6700 (@$ in %initial-action implies %locations,
6701 @$ in %destructor implies %locations,
6702 @$ in %printer implies %locations): ... these new test cases.
6703
6704 2007-02-07 Paul Eggert <eggert@cs.ucla.edu>
6705
6706 Undo most of the 2007-02-03 change, switching to the strcase module
6707 now that gnulib strcase has been fixed.
6708 * bootstrap.conf (gnulib_modules): Remove c-strcase. Add strcase.
6709 * lib/.cvsignore: Remove c-ctype.c, c-ctype.h, c-strcase.h,
6710 c-strcasecomp.c, c-strncasecmp.c. Add strcasecmp.c, strncasecmp.c
6711 * m4/.cvsignore: Add strcase.m4.
6712 * src/getargs.c: Revert 2007-02-03 change, as follows.
6713 Don't include c-strcase.h.
6714 (language_argmatch): Use strcasecmp rather than c_strcasecmp.
6715 strcasecmp has "unspecified behavior" outside the POSIX locale,
6716 but it works fine in practice if at least one argument is ASCII,
6717 as is the case in Bison.
6718
6719 2007-02-07 Paolo Bonzini <bonzini@gnu.org>
6720
6721 * tests/java.at: Skip tests if only one of javac/java is present.
6722 Reported by Joel E. Denny.
6723 * tests/atlocal.in: Adjust copyright years.
6724
6725 2007-02-05 Paolo Bonzini <bonzini@gnu.org>
6726
6727 * data/lalr1.java (Stack): Work around old verifiers that disallow
6728 access to the private fields of an inner class, from the outer class.
6729 We can make Stack's fields public because user code doesn't have access
6730 to the instance of Stack used by parse(). Reported by Paul Eggert.
6731
6732 2007-02-03 Paul Eggert <eggert@cs.ucla.edu>
6733
6734 * .cvsignore: Add javacomp.sh, javaexec.sh. Is this really
6735 the right spot for these files?
6736 * bootstrap.conf (gnulib_modules): Add c-strcase.
6737 * lib/.cvsignore: Add c-ctype.c c-ctype.h, c-strcasecomp.c,
6738 c-strncasecmp.c.
6739 * src/getargs.c: Include c-strcase.h.
6740 (language_argmatch): Use c_strcasecmp rather than strcasecmp,
6741 to avoid unspecified behavior.
6742
6743 2007-02-01 Joel E. Denny <jdenny@ces.clemson.edu>
6744
6745 * doc/bison.texinfo (Decl Summary): Correct typo.
6746
6747 2007-01-30 Paolo Bonzini <bonzini@gnu.org>
6748
6749 * data/bison.m4 (b4_percent_define_flag_if): Don't treat 0 as false.
6750 Complain if the value does not match empty, "true" or "false".
6751 * data/c++.m4: Adjust default definitions of %define variables.
6752 * data/java.m4: Adjust default definitions of %define variables.
6753 * doc/bison.texinfo (Decl Summary): Adjust the %define entry according
6754 to above behavior.
6755 * tests/input.at (Boolean %define variables): Test new behavior.
6756
6757 2007-01-29 Paolo Bonzini <bonzini@gnu.org>
6758
6759 * NEWS: Mention java.
6760 * TODO: Remove things that are done.
6761 * bootstrap.conf: Add javacomp-script and javaexec-script.
6762 * configure.ac: Invoke gt_JAVACOMP and gt_JAVAEXEC.
6763
6764 * data/Makefile.am: Add new files.
6765 * data/java-skel.m4: New.
6766 * data/java.m4: New.
6767 * data/lalr1.java: New.
6768
6769 * doc/bison.texinfo: Put "A Complete C++ Example" under
6770 C++ Parsers. Add Java Parsers. Put C++ Parsers and Java Parsers
6771 under Other Languages.
6772
6773 * src/getargs.c (valid_languages): Add Java.
6774 * src/getargs.h (struct bison_language): Update size of string fields.
6775
6776 * tests/Makefile.am: Add java.at.
6777 * tests/atlocal.in: Add CONF_JAVA and CONF_JAVAC.
6778 * tests/java.at: New.
6779 * tests/testsuite.at: Include it.
6780
6781 2007-01-28 Joel E. Denny <jdenny@ces.clemson.edu>
6782
6783 Clean up.
6784 * src/scan-skel.l (at_directive_perform): Add at_directive_argc and
6785 at_directive_argv arguments so these no longer have to be global
6786 variables. Also, update the implementation for the following changes.
6787 (fail_for_at_directive_too_many_args,
6788 fail_for_at_directive_too_few_args): Add at_directive_name argument.
6789 (at_directive_name): Remove as at_directive_argv[0] will be used for
6790 this now.
6791 (AT_DIRECTIVE_ARGC_MAX): Increment to make space in at_directive_argv
6792 for the directive name.
6793 (at_directive_argc, at_directive_argv): Make these local within
6794 skel_lex instead of global.
6795 (INITIAL): Update directive start action for above changes.
6796 (SC_AT_DIRECTIVE_ARG): Rename to...
6797 (SC_AT_DIRECTIVE_ARGS): ... this, and update for above changes.
6798 (SC_AT_DIRECTIVE_SKIP_WS): Update.
6799 (scan_skel): Move yylex_destroy to...
6800 (skel_scanner_free): ... here.
6801 * tests/skeletons.at (installed skeleton file name): Rename to...
6802 (installed skeleton file names): ... this.
6803
6804 2007-01-27 Joel E. Denny <jdenny@ces.clemson.edu>
6805
6806 * ChangeLog: For changes in doc/bison.texinfo, consistently reference
6807 node names: say "Table of Symbols" not "Bison Symbols", and say "Decl
6808 Summary" not "Directives".
6809 * doc/bison.texinfo (Decl Summary, Calc++ Parser): Cross-reference the
6810 %code entry in "Decl Summary" rather than the one in "Table of Symbols"
6811 since the former is now the more complete one.
6812 (Prologue Alternatives): Likewise and do the same for %defines.
6813 (Table of Symbols): Add summary of %code, add summary of %define, and
6814 move full %code documentation to...
6815 (Decl Summary): ... here for consistency with other entries in these
6816 sections.
6817 Move %define entry in order to keep this list alphabetized.
6818 Reword %define entry a little to put less emphasis on the skeleton
6819 concept, which most users shouldn't have to think about.
6820
6821 2007-01-26 Paul Eggert <eggert@cs.ucla.edu>
6822
6823 Adjust to recent gnulib changes.
6824 * lib/.cvsignore: Remove stpcpy.h, strndup.h, strnlen.h.
6825 Add string.h, string_.h, unistd_.h, wchar_.h.
6826 * m4/.cvsignore: Add gnulib-common.m4, string_h.m4, wchar.m4.
6827 * src/system.h: Don't include <stpcpy.h>; this is now done by
6828 <string.h>.
6829
6830 2007-01-23 Paolo Bonzini <bonzini@gnu.org>
6831
6832 Simplify implementation of unqualified %code, implement macros for
6833 uniform treatment of boolean %define flags. Document %define.
6834 * data/bison.m4 (b4_percent_define_ifdef, b4_percent_define_flag_if,
6835 b4_percent_code_ifdef): New.
6836 (b4_percent_code_get): Map unqualified %code to b4_percent_code().
6837 * data/c++.m4: Define default value for global_tokens_and_yystype.
6838 * data/glr.cc: Likewise.
6839 * data/location.cc: Use b4_percent_define_flag_if.
6840
6841 * doc/bison.texinfo (Decl Summary): Document %define.
6842
6843 * src/parse-gram.y (Unqualified %code): Change muscle name to
6844 b4_percent_code().
6845 (content.opt): Default to empty.
6846
6847 2007-01-17 Joel E. Denny <jdenny@ces.clemson.edu>
6848
6849 Implement support for relative and absolute skeleton file names.
6850 Discussed starting at
6851 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00071.html>.
6852 * doc/bison.texinfo (Decl Summary): Document in %skeleton entry.
6853 (Bison Options): Document in --skeleton entry.
6854 * src/output.c (output_skeleton): Use strncpy rather than strcpy since
6855 full_skeleton can't necessarily hold all of pkgdatadir.
6856 If the specified skeleton file name contains a `/', don't prepend
6857 pkgdatadir.
6858 * src/parse-gram.y (prologue_declaration): If the specified skeleton
6859 file name contains a `/', prepend the grammar file directory.
6860 * tests/Makefile.am (TESTSUITE_AT): Add skeletons.at.
6861 * skeletons.at: New file.
6862 (relative skeleton file names): New test case.
6863 (installed skeleton file names): New test case.
6864 * tests/testsuite.at: Include skeletons.at.
6865
6866 * bootstrap: Update copyright to 2007.
6867
6868 2007-01-17 Paolo Bonzini <bonzini@gnu.org>
6869
6870 * bootstrap: Remove occurrences of .#bootmp from the files.
6871
6872 2007-01-17 Akim Demaille <akim@epita.fr>
6873
6874 * doc/bison.texinfo (Calc++ Parser): Don't try to alias
6875 nonterminals.
6876 Use per-type %printer.
6877
6878 2007-01-17 Joel E. Denny <jdenny@ces.clemson.edu>
6879
6880 * NEWS, data/c++-skel.m4, data/c++.m4, data/c-skel.m4, data/c.m4,
6881 data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
6882 djgpp/config.site, src/files.c, src/files.h, src/main.c,
6883 src/muscle_tab.c, src/muscle_tab.h, src/parse-gram.y, src/reader.h,
6884 src/scan-skel.h, src/scan-skel.l, tests/actions.at, tests/calc.at,
6885 tests/glr-regression.at, tests/input.at, tests/local.at,
6886 tests/output.at, tests/torture.at: Update copyright to 2007.
6887
6888 2007-01-16 Akim Demaille <akim@epita.fr>
6889
6890 * doc/bison.texinfo (Calc++ Parsing Driver): Let "parse" return an
6891 error code.
6892 (Calc++ Scanner): Exit with failure if we can't open the input
6893 file.
6894 Accept "-" standing for stdin.
6895 (Calc++ Top Level): Print the result only if the parsing was
6896 successful.
6897
6898 2007-01-16 Akim Demaille <akim@epita.fr>
6899
6900 * data/lalr1.cc (yy_reduce_print_): Add a missing end-of-line.
6901
6902 2007-01-15 Paolo Bonzini <bonzini@gnu.org>
6903 and Joel E. Denny <jdenny@ces.clemson.edu>
6904
6905 Clean up %define and %code implementation in M4 some. Most
6906 importantly, rename all related macros to be in the b4_percent_define
6907 and b4_percent_code namespaces. Also, complete support for `.' in
6908 %define variable names and %code qualifiers.
6909 * data/bison.m4 (b4_check_user_names): Check for special
6910 "SKELETON-NAMESPACE(name)" macros instead of using two nested
6911 m4_foreach loops.
6912 (b4_get_percent_define, b4_get_percent_code): Rename to...
6913 (b4_percent_define_get, b4_percent_code_get): ... these.
6914 Extend documentation with examples.
6915 For SKELETON-NAMESPACE (as documented for b4_check_user_names), use
6916 b4_percent_define_skeleton_variables and
6917 b4_percent_code_skeleton_qualifiers.
6918 Expect any value for the %define variable `foo' to be stored in the
6919 macro named `b4_percent_define(foo)'; expect any %code blocks for the
6920 qualifier `foo' to be stored in a macro named `b4_percent_code(foo)';
6921 expect any unqualified %code blocks to be stored in a macro named
6922 `b4_percent_code_unqualified'.
6923 Use m4_indir so that %define variable names and %code qualifiers can
6924 contain `.', which is allowed by the grammar parser.
6925 (b4_percent_define_default): New macro to set a default value for a
6926 %define variable.
6927 (m4_wrap): Update wrapped code, and fix some underquoting.
6928 (b4_check_user_names_wrap): Update and define outside the m4_wrap.
6929 Expect grammar uses of %define variables and %code qualifiers to be
6930 defined in b4_percent_define_user_variables and
6931 b4_percent_code_user_qualifiers.
6932 * data/c++.m4: Use b4_percent_define_default rather than
6933 m4_define_default. Fix some underquoting. Skeleton usage of %define
6934 variable define_location_comparison now implies skeleton usage of
6935 %define variable filename_type.
6936 * data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
6937 data/push.c, data/yacc.c: Update macro names.
6938 * src/parse-gram.y (prologue_declaration, grammar_declaration): Update
6939 muscle names.
6940
6941 2007-01-14 Juan Manuel Guerrero <juan.guerrero@gmx.de>
6942
6943 DJGPP specific issues.
6944
6945 * djgpp/config.site: Set ac_cv_path_mkdir to a sane DJGPP specific
6946 default. Set gl_cv_absolute_wctype_h to a sane DJGPP specific default.
6947
6948 2007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
6949
6950 * tests/glr-regression.at: Use AT_PARSER_CHECK rather than AT_CHECK to
6951 run parsers in all tests so that Valgrind is invoked during
6952 maintainer-check-valgrind.
6953 (Duplicate representation of merged trees): Free all semantic values.
6954 (Duplicated user destructor for lookahead): Likewise.
6955
6956 2007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
6957
6958 * tests/local.at (AT_PARSER_CHECK): Add a PRE argument to specify a
6959 command-line prefix.
6960 * tests/torture.at (Exploding the Stack Size with Alloca): Stderr is
6961 ignored, so use that PRE to set --log-fd=1 in VALGRIND_OPTS so we don't
6962 miss Valgrind messages.
6963 (Exploding the Stack Size with Malloc): Likewise.
6964
6965 2007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
6966
6967 Ignore YYSTACK_USE_ALLOCA for push parsers since the stacks can't be
6968 locals. Reported by Juan Manuel Guerrero at
6969 <http://lists.gnu.org/archive/html/bug-bison/2007-01/msg00000.html>.
6970 * data/push.c: Enclose the #ifdef YYSTACK_USE_ALLOCA in b4_push_if.
6971 Fix some indentation also.
6972 * tests/torture.at (Exploding the Stack Size with Alloca): Add comment
6973 explaining this issue.
6974
6975 2007-01-09 Paolo Bonzini <bonzini@gnu.org>
6976 and Joel E. Denny <jdenny@ces.clemson.edu>
6977
6978 Simplify union and prologue handling, and escape union and lex/parse
6979 params with digraphs.
6980 * data/bison.m4 (b4_pre_prologue, b4_post_prologue): Set their default
6981 values to the empty string since these are no longer guaranteed
6982 initialized by the front-end.
6983 * data/glr.c, data/glr.cc, data/lalr1.cc, data/push.c, data/yacc.c: Add
6984 braces around b4_user_stype since this is no longer done by the
6985 front-end.
6986 * src/files.c, src/files.h (pre_prologue_obstack,
6987 post_prologue_obstack): Remove.
6988 * src/muscle_tab.c (muscle_pair_list_grow): Don't duplicate header
6989 comments here. Use MUSCLE_OBSTACK_SGROW so that values are escaped
6990 with digraphs. This fixes lex params and parse params.
6991 * src/muscle_tab.h (muscle_pair_list_grow): Update comments.
6992 * src/output.c (prepare): Remove muscle insertion of the prologues.
6993 (output): Remove freeing of pre_prologue_obstack and
6994 post_prologue_obstack.
6995 * src/parse-gram.y (prologue_declaration): Use muscle_code_grow rather
6996 than prologue_augment for prologue parsing so you don't need prologue
6997 obstacks.
6998 (grammar_declaration): For %union RHS, use `braceless' instead of
6999 "{...}" so that braces are already stripped and code is escaped with
7000 digraphs.
7001 * src/reader.c (prologue_augment): Remove.
7002 (reader): Remove initialization of pre_prologue_obstack and
7003 post_prologue_obstack.
7004 * src/reader.h (prologue_augment): Remove.
7005
7006 * data/c.m4: Remove stray parenthesis.
7007
7008 2007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
7009
7010 Remove quotes from variables names in %define directives and from
7011 qualifiers in %code directives, and restrict the characters that are
7012 allowed in them to M4-friendly ones. For %define, continue to support
7013 the quoted form as a deprecated feature. Discussed starting at
7014 <http://lists.gnu.org/archive/html/bison-patches/2007-01/msg00023.html>.
7015 * NEWS (2.3a+): Add entry for the change to %define. Update entry for
7016 %code.
7017 * doc/bison.texinfo (Prologue Alternatives): Update.
7018 (Decl Summary): In %defines entry, update mention of `%code requires'
7019 and `%code provides'.
7020 (C++ Location Values): Update %define uses.
7021 (Calc++ Parser Interface): Likewise.
7022 (Calc++ Parser): Likewise, and update `%code requires' uses.
7023 (Table of Symbols): Update %code documentation.
7024 * src/parse-gram.y (prologue_declaration): For %define variables, use
7025 `variable' instead of `STRING'.
7026 (grammar_declaration): For %code qualifiers, use `ID' instead of
7027 `STRING'.
7028 (variable): New nonterminal that takes an `ID' or a `STRING'.
7029 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Update %code
7030 and %define uses.
7031 * tests/calc.at (_AT_DATA_CALC_Y): Update %define use.
7032 * tests/input.at (Reject unused %code qualifiers): Update %code uses.
7033 (%define errors): Update %define uses.
7034
7035 2007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
7036
7037 * src/parse-gram.y (prologue_declaration): Use MUSCLE_INSERT_STRING
7038 instead of muscle_insert for %define values so that M4-special
7039 characters are replaced with digraphs.
7040 * tests/input.at (%define errors): Extend to check weird values.
7041
7042 2007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
7043
7044 Instead of having skeletons declare all valid %define variables and
7045 %code qualifiers, provide macros that retrieve the associated values
7046 and build these lists automatically. Thus Bison will now warn when a
7047 variable or qualifier is not used by the skeleton in the current
7048 invocation regardless of whether it might sometimes be used by that
7049 skeleton in other invocations. Also, move all %define value macros to
7050 the b4_percent_define_ namespace, and remove the %define "NAME" {CODE}
7051 form, which is replaced by %code.
7052 * data/bison.m4 (b4_check_for_unrecognized_names): Rename to...
7053 (b4_check_user_names): ... this, and change the series of valid name
7054 arguments to a single list argument for names used in the skeleton
7055 similar to the existing list argument for names used in the grammar.
7056 Warn instead of complaining.
7057 (b4_get_percent_define, b4_get_percent_code): New to retrieve %define
7058 values and %code code, to format %code code properly, and to build
7059 lists of all %define variables and %code qualifiers used in the
7060 skeleton: b4_skeleton_percent_define_variables and
7061 b4_skeleton_percent_code_qualifiers.
7062 (b4_check_percent_define_variables, b4_check_percent_code_qualifiers):
7063 Remove, and...
7064 (m4_wrap): ... m4_wrap b4_check_user_names invocations instead so that
7065 the skeleton names lists can finish building first. In place of
7066 b4_used_percent_define_variables and b4_used_percent_code_qualifiers,
7067 expect the lists b4_user_percent_define_variables and
7068 b4_user_percent_code_qualifiers.
7069 * data/c++.m4: Where setting default values for b4_parser_class_name,
7070 b4_location_type, b4_filename_type, b4_namespace, and
7071 b4_define_location_comparison, update their names to the
7072 b4_percent_define_ namespace.
7073 * data/glr.c: Don't use b4_check_percent_define_variables and
7074 b4_check_percent_code_qualifiers. Use b4_get_percent_code.
7075 * data/glr.cc, data/lalr1.cc: Likewise, and use b4_get_percent_define.
7076 (b4_parser_class_name, b4_namespace): Define these using
7077 b4_get_percent_define for parser_class_name and namespace.
7078 * data/location.cc: Use b4_get_percent_define.
7079 * data/push.c: Don't use b4_check_percent_define_variables and
7080 b4_check_percent_code_qualifiers. Use b4_get_percent_code.
7081 * data/yacc.c: Likewise, and don't call m4_exit in
7082 b4_use_push_for_pull_if or m4_wrap code will never execute.
7083 * src/muscle_tab.c, src/muscle_tab.h (muscle_grow_used_name_list):
7084 Rename to...
7085 (muscle_grow_user_name_list): ... this for consistency with the
7086 terminology used in bison.m4.
7087 * src/parse-gram.y (prologue_declaration): Prepend "percent_define_" to
7088 %define variable names, and rename muscle used_percent_define_variables
7089 to user_percent_define_variables.
7090 (grammar_declaration): Rename muscle used_percent_code_qualifiers to
7091 user_percent_code_qualifiers.
7092 (content): Remove.
7093 (content.opt): Replace content RHS with STRING RHS so %define "NAME"
7094 {CODE} form is no longer accepted.
7095 * tests/input.at (Reject bad %code qualifiers): Rename to...
7096 (Reject unused %code qualifiers): ... this, and update test output.
7097 (%define error): Update test output.
7098
7099 2007-01-07 Joel E. Denny <jdenny@ces.clemson.edu>
7100
7101 Check for unrecognized %define variables similar to checking for
7102 unrecognized %code qualifiers. Check for redefined %define variables.
7103 * data/bison.m4 (b4_check_for_unrecognized_names): New macro that
7104 generalizes...
7105 (b4_check_percent_code_qualifiers): ... this, which now wraps it.
7106 (b4_check_percent_define_variables): New, also wraps it.
7107 * data/glr.c: Unless glr.cc is wrapping glr.c, declare no valid %define
7108 variables using b4_check_percent_define_variables.
7109 * data/glr.cc, data/lalr1.cc: Declare the valid %define variables as
7110 all those exercised in the test suite and all those listed in the
7111 `Default values' section of c++.m4. Are there others?
7112 * data/push.c, data/yacc.c: Declare no valid %define variables.
7113 * src/muscle_tab.c, src/muscle_tab.h (muscle_find_const): New function,
7114 similar to muscle_find, but it works even when the muscle stores a
7115 const value.
7116 (muscle_grow_used_name_list): New function for constructing the used
7117 name list muscles that b4_check_for_unrecognized_names requires.
7118 * src/parse-gram.y (prologue_declaration): Warn if a variable is
7119 %define'd more than once. Define the b4_used_percent_define_variables
7120 muscle with muscle_grow_used_name_list.
7121 (grammar_declaration): Abbreviate %code code with
7122 muscle_grow_used_name_list.
7123 * tests/input.at (%define errors): New.
7124
7125 2007-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
7126
7127 Provide warn_at, complain_at, and fatal_at function callbacks to the
7128 skeletons, and use this for %code qualifier complaints.
7129 * data/bison.m4 (b4_error_at): New, invoked by...
7130 (b4_warn_at, b4_complain_at, b4_fatal_at): ... these new macros to wrap
7131 the skeleton scanner's new @warn_at(...@), @complain_at(...@), and
7132 @fatal_at(...@) directives.
7133 (b4_check_percent_code_qualifiers): Rewrite to expect locations for
7134 qualifiers in b4_used_percent_code_qualifiers and to use
7135 b4_complain_at.
7136 * src/location.c, src/location.h (boundary_set_from_string): New global
7137 function.
7138 * src/muscle_tab.c, src/muscle_tab.h (muscle_boundary_grow): New global
7139 function.
7140 * src/parse-gram.y (grammar_declaration): Add locations for qualifiers
7141 to b4_used_percent_code_qualifiers.
7142 * src/scan-skel.l (fail_for_at_directive_too_few_args): New static
7143 function.
7144 (AT_DIRECTIVE_ARGC_MAX): Increase for boundary arguments.
7145 (lineno): Rename to...
7146 (out_lineno): ... this so I don't misunderstand it again.
7147 (SC_AT_DIRECTIVE_SKIP_WS): Don't increment out_lineno for newlines
7148 here; these newlines are in the input but not the output file.
7149 (SC_AT_DIRECTIVE_ARG): Likewise. Extract directive execution to...
7150 (at_directive_perform): ... this new static function, and add handling
7151 of new @warn_at(...@), @complain_at(...@), and @fatal_at(...@)
7152 directives.
7153 * tests/input.at (Reject bad %code qualifiers): Update test output with
7154 locations and extend.
7155
7156 * tests/output.at (Output file name: [, Output file name: ]): Remove
7157 bogus comment about these tests failing.
7158
7159 2007-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
7160
7161 Clean up b4_check_percent_code_qualifiers a little.
7162 * data/bison.m4 (b4_check_percent_code_qualifiers): Expect qualifiers
7163 in b4_used_percent_code_qualifiers to be double-M4-quoted. Rewrite
7164 documentation and add examples.
7165 * src/parse-gram.y (grammar_declaration): Double-M4-quote those
7166 qualifiers here.
7167
7168 2007-01-05 Joel E. Denny <jdenny@ces.clemson.edu>
7169
7170 Don't use m4_divert since it makes m4_divert_push and m4_divert_pop
7171 unreliable -- especially when they're hidden inside another macro.
7172 * data/bison.m4, data/c++-skel.m4, data/c++.m4, data/c-skel.m4,
7173 data/c.m4: Remove m4_divert(-1).
7174 * data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
7175 data/push.c, data/yacc.c: Likewise, and replace m4_divert(0) with
7176 m4_divert_push(0) and m4_divert_pop(0).
7177 * src/output.c (output_skeleton): Don't add an m4_divert_push(0) and
7178 an m4_wrap([m4_divert_pop(0)]) to the M4. Diversion -1, which is
7179 pushed and popped by m4sugar, should be first on the stack.
7180
7181 Provide warn, complain, and fatal function callbacks to the skeletons.
7182 This provides more flexibility than m4_fatal, improves the error
7183 message format, and captures messages for translation. Discussed
7184 starting at
7185 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00063.html>.
7186 * data/bison.m4 (b4_error): New, invoked by...
7187 (b4_warn, b4_complain, b4_fatal): ... these new macros to wrap the
7188 skeleton scanner's new @warn(...@), @complain(...@), and @fatal(...@)
7189 directives. Because these M4 macros might be called when the current
7190 diversion is -1 or 0, m4_divert_push and m4_divert_pop is used; thus
7191 the previous removal of uses of m4_divert, which caused trouble.
7192 (b4_check_percent_code_qualifiers): Use b4_complain instead of
7193 m4_fatal to report unrecognized %code qualifiers.
7194 * data/c++-skel.m4: Use b4_complain instead of m4_fatal to report C++
7195 push parser requests.
7196 * data/glr.c: Use b4_complain instead of m4_fatal to report
7197 non-deterministic push parser requests.
7198 Update @output usage to @output(...@) form.
7199 * data/glr.cc, data/lalr1.cc: Use b4_fatal instead of m4_fatal to
7200 report missing %defines. Update @output usage to @output(...@) form.
7201 * data/location.cc, data/push.c, data/yacc.c: Update @output usage to
7202 @output(...@) form.
7203 * src/main.c (main): Invoke skel_scanner_free.
7204 * src/scan-skel.h (skel_scanner_free): Prototype new function.
7205 * src/scan-skel.l (FLEX_NO_OBSTACK): Don't define; we now need the
7206 obstack_for_string from flex-scanner.h.
7207 (YY_DECL): Use to declare skel_lex static.
7208 (decode_at_digraphs): Remove; now handled in the new
7209 SC_AT_DIRECTIVE_ARG start condition.
7210 (fail_for_at_directive_too_many_args, fail_for_invalid_at): New static
7211 functions.
7212 (at_directive_name, AT_DIRECTIVE_ARGC_MAX, at_directive_argc,
7213 at_directive_argv): New static globals.
7214 (INITIAL): Use fail_for_invalid_at.
7215 Don't parse `@output file_name\n' or `@basename(...@)'. Instead,
7216 recognize the start of a generalized `@directive(...@)' form and
7217 start...
7218 (SC_AT_DIRECTIVE_ARG): ... this new start condition to parse the
7219 directive args (using the new obstack_for_string), to decode the
7220 contained @ diagraphs, and to perform the directive. It recognizes
7221 @basename(...@), @warn(...@), @complain(...@), @fatal(...@), and
7222 @output(...@).
7223 (SC_AT_DIRECTIVE_SKIP_WS): New start condition started by
7224 SC_AT_DIRECTIVE_ARG to skip whitespace after the argument delimiter,
7225 `@,'.
7226 (scan_skel): Initialize obstack_for_string on the first call.
7227 (skel_scanner_free): New function to free obstack_for_string.
7228 * tests/input.at (Reject bad %code qualifiers): Update test output.
7229
7230 2007-01-04 Joel E. Denny <jdenny@ces.clemson.edu>
7231
7232 Consolidate the 4 prologue alternative directives (%code, %requires,
7233 %provides, and %code-top) into a single %code directive with an
7234 optional qualifier field. Discussed at
7235 <http://lists.gnu.org/archive/html/bison-patches/2007-01/msg00012.html>.
7236 * NEWS (2.3a+): Rewrite the existing entry for the prologue
7237 alternatives.
7238 * doc/bison.texinfo (Prologue Alternatives): Update.
7239 (Decl Summary): Update to %code "requires" and %code "provides".
7240 (Calc++ Parser): Update to %code "requires".
7241 (Table of Symbols): Remove entries for %requires, %provides, and
7242 %code-top. Rewrite %code entry, and add a %code "QUALIFIER" entry.
7243 * data/bison.m4 (b4_user_provides, b4_user_requires): Remove as these
7244 are replaced by b4_percent_code_provides and b4_percent_code_requires,
7245 which are skeleton-specific.
7246 (b4_check_percent_code_qualifiers): New. A skeleton can use this to
7247 declare what %code qualifiers it supports and to complain if any other
7248 qualifiers were used in the grammar.
7249 * data/glr.cc: Update to use b4_user_code([b4_percent_code_requires])
7250 and b4_user_code([b4_percent_code_provides]) in place of
7251 b4_user_requires and b4_user_provides.
7252 * data/glr.c, data/lalr1.cc, data/push.c, data/yacc.c: Likewise.
7253 Add b4_user_code([b4_percent_code_top]) and
7254 b4_user_code([b4_percent_code]).
7255 Invoke b4_check_percent_code_qualifiers.
7256 * src/parse-gram.y (PERCENT_CODE_TOP, PERCENT_PROVIDES,
7257 PERCENT_REQUIRES): Remove.
7258 (grammar_declaration): Remove RHS's for %code-top, %provides, and
7259 %requires. Rewrite the %code RHS as the unqualified form defining the
7260 muscle b4_percent_code. Add another RHS for the qualified %code form,
7261 which defines muscles of the form b4_percent_code_QUALIFIER and the
7262 b4_used_percent_code_qualifiers muscle.
7263 * src/scan-gram.l (PERCENT_CODE_TOP, PERCENT_PROVIDES,
7264 PERCENT_REQUIRES): Remove.
7265 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Update to use
7266 %code "requires" and %code "provides".
7267 * tests/input.at (Reject bad %code qualifiers): New.
7268
7269 2007-01-03 Joel E. Denny <jdenny@ces.clemson.edu>
7270
7271 Use the new code_props interface for destructors and printers.
7272 * src/symtab.h (symbol, semantic_type): Remove destructor_location and
7273 printer_location members, and change the type of the destructor and
7274 printer members to code_props.
7275 (symbol_destructor_set, symbol_destructor_get, symbol_printer_set,
7276 symbol_printer_get, semantic_type_destructor_set,
7277 semantic_type_printer_set, default_tagged_destructor_set,
7278 default_tagless_destructor_set, default_tagged_printer_set,
7279 default_tagless_printer_set): Use code_props in arguments and return
7280 types in place of char const * and location.
7281 (symbol_destructor_location_get, symbol_printer_location_get): Remove
7282 since the locations are now contained in the return of
7283 symbol_destructor_get and symbol_printer_get.
7284 * src/output.c (symbol_destructors_output, symbol_printers_output):
7285 Replace with...
7286 (symbol_code_props_output): ... this to eliminate duplicate code.
7287 (output_skeleton): Update to use symbol_code_props_output.
7288 * src/reader.c (symbol_should_be_used): Update use of
7289 symbol_destructor_get.
7290 * src/symlist.c (symbol_list_destructor_set, symbol_list_printer_set):
7291 Update uses of the various _destructor_set and _printer_set functions.
7292 * src/symtab.c: (default_tagged_destructor_location,
7293 default_tagless_destructor_location, default_tagged_printer_location,
7294 default_tagless_printer_location): Remove since we...
7295 (default_tagged_destructor, default_tagless_destructor,
7296 default_tagged_printer, default_tagless_printer): ... change the type
7297 of these to code_props.
7298 (symbol_new, semantic_type_new, symbol_destructor_set,
7299 semantic_type_destructor_set, symbol_destructor_get,
7300 symbol_printer_set, semantic_type_printer_set, symbol_printer_get,
7301 symbol_check_alias_consistency, default_tagged_destructor_set,
7302 default_tagless_destructor_set, default_tagged_printer_set,
7303 default_tagless_printer_set): Update.
7304 (symbol_destructor_location_get, symbol_printer_location_get): Remove.
7305 (SYMBOL_CODE_PRINT): New similar to SYMBOL_ATTR_PRINT but for
7306 code_props members.
7307 (symbol_print): Use SYMBOL_CODE_PRINT.
7308
7309 2007-01-03 Joel E. Denny <jdenny@ces.clemson.edu>
7310
7311 Use the new code_props interface for rule actions.
7312 * src/symlist.h (symbol_list): Replace action, action_location, and
7313 used members with a code_props action_props member.
7314 * src/reader.c (symbol_should_be_used, grammar_rule_check,
7315 grammar_midrule_action, grammar_current_rule_merge_set,
7316 grammar_current_rule_symbol_append, packgram): Update.
7317 * src/scan-code.h (translate_rule_action): Remove, no longer used.
7318 * src/scan-code.l (handle_action_dollar): Update.
7319 (translate_rule_action): Remove, no longer used.
7320 * src/symlist.c (symbol_list_sym_new, symbol_list_syms_print): Update.
7321
7322 2007-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
7323
7324 Use the new code_props interface in parse-gram.y.
7325 * src/parse-gram.y (prologue_declaration, braceless, epilogue.opt):
7326 Update all uses of translate_* functions to use the new code_props
7327 interface and to use gram_scanner_last_string_free and
7328 code_scanner_last_string_free where possible.
7329 (grammar_declaration): symbol_list_destructor_set and
7330 symbol_list_printer_set now perform the translation, so don't do it
7331 here. Use gram_scanner_last_string_free where possible.
7332 * src/scan-code.h, src/scan-code.l (translate_symbol_action,
7333 translate_code): Remove, no longer used.
7334 * src/symlist.h, src/symlist.c (symbol_list_destructor_set,
7335 symbol_list_printer_set): Perform code translation here rather than
7336 depending on the caller to do so.
7337
7338 * src/symlist.h (struct symbol_list): Correct some documentation typos.
7339 * src/scan-gram.h (gram_last_string): Remove declaration.
7340 * src/scan-gram.l (last_string): Declare it static.
7341
7342 2007-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
7343
7344 Encapsulate code properties and related functionality for the various
7345 destructors, printers, and actions into a code_props structure and
7346 interface. This patch merely implements code_props in scan-code.h and
7347 scan-code.l. Future patches will rewrite other modules to use it.
7348 Discussed starting at
7349 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00020.html>.
7350 * src/location.h (EMPTY_LOCATION_INIT): Define so that it's easier to
7351 consistently initialize const structs that have an empty location
7352 field.
7353 * src/location.c (empty_location): Initialize with EMPTY_LOCATION_INIT
7354 to ensure consistency.
7355 * src/scan-code.h (code_props): New structure.
7356 (code_props_none_init, CODE_PROPS_NONE_INIT, code_props_none): New
7357 function, macro, and const global variable for initializing a
7358 code_props with no code.
7359 (code_props_plain_init, code_props_symbol_action_init,
7360 code_props_rule_action_init, code_props_translate_code): The rest of
7361 the new code_props functional interface. Among other things, the init
7362 functions set the code_props kind field so that
7363 code_props_translate_code will know whether to behave like
7364 translate_symbol_action, translate_rule_action, or translate_code.
7365 These old translate functions must remain until all other modules are
7366 updated to use the new code_props interface.
7367 (code_scanner_last_string_free): New function similar to
7368 gram_scanner_last_string_free.
7369 (code_scanner_free): Add documentation.
7370 * src/scan-code.l: Implement the new interface.
7371 (code_lex): Make it static, add a code_props* argument, and remove the
7372 rule argument.
7373 (last_string): New static global similar to the one in scan-gram.l.
7374 (SC_RULE_ACTION): Update to use the code_props* argument to code_lex
7375 instead of rule.
7376 (SC_SYMBOL_ACTION): For $$, set the is_value_used member of the
7377 code_props since Bison may one day use this information for destructors
7378 and printers.
7379 (<*><<EOF>>): Use STRING_FINISH so that last_string is set.
7380 (handle_action_dollar): Use symbol_list_n_get and set used flag
7381 directly since symbol_list_n_used_set is removed.
7382 (translate_action): Add a code_props* argument and remove the rule,
7383 action, and location arguments. Pass the code_props* on to code_lex.
7384 (translate_rule_action, translate_symbol_action, translate_code):
7385 Rewrite as wrappers around the new code_props interface.
7386 * src/symlist.h, src/symlist.c (symbol_list_n_used_set): Remove since
7387 it would eventually need to break the encapsulation of code_props.
7388
7389 2007-01-01 Joel E. Denny <jdenny@ces.clemson.edu>
7390
7391 * etc/.cvsignore: New.
7392
7393 2007-01-01 Joel E. Denny <jdenny@ces.clemson.edu>
7394
7395 Add maintainer-push-check to run maintainer-check using push parsing in
7396 place of pull parsing where available.
7397 * Makefile.am (maintainer-push-check): New.
7398 * data/bison.m4 (b4_use_push_for_pull_if): New.
7399 * data/push.c: Redefine b4_push_if and b4_use_push_for_pull_if
7400 appropriately based on their existing values.
7401 (yypush_parse): Don't print push-parser-specific diagnostics if push
7402 parsing is being used in place of pull parsing.
7403 * data/yacc.c: If push parsing should replace pull parsing, redirect to
7404 push.c.
7405 * src/output.c (prepare): Check BISON_USE_PUSH_FOR_PULL environment
7406 variable, and insert b4_use_push_for_pull_flag into muscles.
7407 * tests/Makefile.am (maintainer-push-check): New.
7408
7409 2006-12-31 Joel E. Denny <jdenny@ces.clemson.edu>
7410
7411 * data/push.c (yypush_parse): Set yynew = 1 at the end of a parse
7412 (whether successful or failed) so that yypush_parse can be invoked
7413 again to start a new parse using the same yypstate.
7414 * tests/torture.at (AT_DATA_STACK_TORTURE): For push mode, extend to
7415 check multiple yypull_parse invocations on the same yypstate. For pull
7416 mode, extend to check multiple yyparse invocations.
7417 (Exploding the Stack Size with Alloca): Extend to try with
7418 %push-pull-parser.
7419 (Exploding the Stack Size with Malloc): Likewise.
7420
7421 * tests/calc.at (Simple LALR Calculator): Don't specify
7422 %skeleton "push.c" since %push-pull-parser implies that now.
7423 * tests/headers.at (export YYLTYPE): Don't check for the push
7424 declarations. Otherwise, this test case can't be used to see if push
7425 mode can truly emulate pull mode.
7426 * tests/input.at (Torturing the Scanner): Likewise.
7427 * tests/local.at (AT_YACC_OR_PUSH_IF, AT_PUSH_IF): Remove.
7428 (AT_YYERROR_SEES_LOC_IF): Rather than AT_YACC_OR_PUSH_IF, use
7429 AT_YACC_IF, which now includes the case of push mode since %skeleton
7430 need not be used for push mode. This will be more intuitive once
7431 push.c is renamed to yacc.c.
7432
7433 2006-12-31 Joel E. Denny <jdenny@ces.clemson.edu>
7434
7435 For push mode, convert yyparse from a macro to a function, invoke yylex
7436 instead of passing a yylexp argument to yypull_parse, and don't
7437 generate yypull_parse or yyparse unless %push-pull-parser is declared.
7438 Discussed starting at
7439 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00163.html>.
7440 * data/bison.m4 (b4_pull_if): New.
7441 * data/c.m4 (b4_identification): Define YYPULL similar to YYPUSH.
7442 * data/push.c: Improve M4 quoting a little.
7443 (b4_generate_macro_args, b4_parenthesize): Remove.
7444 (yyparse): If there's a b4_prefix, #define this to b4_prefix[parse]
7445 any time a pull parser is requested.
7446 Don't #define this as a wrapper around yypull_parse. Instead, when
7447 both push and pull are requested, make it a function that does that
7448 same thing.
7449 (yypull_parse): If there's a b4_prefix, #define this to
7450 b4_prefix[pull_parse] when both push and pull are requested.
7451 Don't define this as a function unless both push and pull are
7452 requested.
7453 Remove the yylexp argument and hard-code yylex invocation instead.
7454 * etc/bench.pl.in (bench_grammar): Use %push-pull-parser instead of
7455 %push-parser.
7456 * src/getargs.c (pull_parser): New global initialized to true.
7457 * getargs.h (pull_parser): extern it.
7458 * src/output.c (prepare): Insert pull_flag muscle.
7459 * src/parse-gram.y (PERCENT_PUSH_PULL_PARSER): New token.
7460 (prologue_declaration): Set both push_parser and pull_parser = true for
7461 %push-pull-parser. Set push_parser = true and pull_parser = false for
7462 %push-parser.
7463 * src/scan-gram.l: Don't accept %push_parser as an alternative to
7464 %push-parser since there's no backward-compatibility concern here.
7465 Scan %push-pull-parser.
7466 * tests/calc.at (Simple LALR(1) Calculator): Use %push-pull-parser
7467 instead of %push-parser.
7468 * tests/headers.at (export YYLTYPE): Make yylex static, and don't
7469 prototype it in the module that calls yyparse.
7470 * tests/input.at (Torturing the Scanner): Likewise.
7471 * tests/local.at (AT_PUSH_IF): Check for %push-pull-parser as well.
7472
7473 2006-12-26 Joel E. Denny <jdenny@ces.clemson.edu>
7474
7475 Update etc/bench.pl. Optimize push mode a little (the yyn change
7476 deserves most of the credit).
7477 * Makefile.am (SUBDIRS): Add etc subdirectory.
7478 * configure.ac (AC_CONFIG_FILES): Add etc/bench.pl and etc/Makefile.
7479 * data/push.c (b4_declare_parser_state_variables): Move yyn, yyresult,
7480 yytoken, yyval, and yyloc declarations to...
7481 (yyparse or yypush_parse): ... here to improve performance. For
7482 yypush_parse invocations after the first, be sure to assign yyn its old
7483 value again.
7484 (yypstate_new): Don't bother initializing the yyresult field since the
7485 initial value isn't used.
7486 (yyn, yyresult, yytoken, yyval, yyloc): For each NAME in this list,
7487 remove the #define that, in push mode, set it to yyps->NAME.
7488 * etc/Makefile.am: New.
7489 * etc/bench.pl: Remove and build it instead from...
7490 * etc/bench.pl.in: ... this new file. Use @abs_top_builddir@ to invoke
7491 "tests/bison" from the build directory by default rather than just
7492 invoking "bison" from $PATH.
7493 (calc_grammar): Update push parser code: don't declare yylval globally,
7494 don't define yyparse_wrapper, and don't #define yyparse.
7495 (bench_grammar): Update to check all working combinations of yacc.c,
7496 push.c, impure, pure, pull, and push.
7497
7498 2006-12-25 Joel E. Denny <jdenny@ces.clemson.edu>
7499
7500 For push mode, add pull wrappers around yypush_parse.
7501 * data/push.c: (b4_generate_macro_args, b4_parenthesize): New macros.
7502 (yypull_parse): New function wrapping yypush_parse.
7503 (yyparse): New #define wrapping yypull_parse.
7504 * tests/calc.at (_AT_DATA_CALC_Y): Call yyparse even when %push-parser
7505 is declared.
7506 * tests/headers.at (export YYLTYPE): Make yylex global. For push mode,
7507 prototype yylex in the module that calls yyparse, and don't prototype
7508 yyparse there. Otherwise, the yyparse expansion won't compile.
7509 * tests/input.at (Torturing the Scanner): Likewise.
7510
7511 2006-12-25 Joel E. Denny <jdenny@ces.clemson.edu>
7512
7513 Enable push parsers to operate in impure mode. Thus, %push-parser no
7514 longer implies %pure-parser. The point of this change is to move
7515 towards being able to test the push parser code by running the entire
7516 test suite as if %push-parser had been declared.
7517 * data/push.c (yypush_parse): For impure mode, remove the
7518 yypushed_char, yypushed_val, and yypushed_loc arguments.
7519 Instead, declare these as local variables initialized to the global
7520 yychar, yylval, and yylloc.
7521 For the first yypush_parse invocation only, restore the initial values
7522 of these global variables when it's time to read a token since they
7523 have been overwritten.
7524 * src/parse-gram.y (prologue_declaration): Don't set pure_parser for
7525 %push-parser.
7526 * tests/calc.at (Simple LALR(1) Calculator): Always declare
7527 %pure-parser along with %push-parser since this test case was designed
7528 for pure push parsers.
7529 * tests/local.at (AT_PURE_OR_PUSH_IF): Remove unused.
7530 (AT_YACC_OR_PUSH_IF): New.
7531 (AT_YYERROR_SEES_LOC_IF): Fix enough that the test suite passes, but
7532 add a note that it's still wrong for some cases (as it has been for a
7533 while).
7534 (AT_PURE_LEX_IF): Use AT_PURE_IF instead of AT_PURE_OR_PUSH_IF since
7535 %push-parser no longer implies %pure-parser.
7536
7537 2006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
7538
7539 Remove some unnecessary differences between the pull parser code and
7540 the push parser code. This patch enables yynerrs in push mode.
7541 * data/push.c: Reformat M4 a little.
7542 (b4_yyerror_range): Remove and convert all uses to just yyerror_range.
7543 (b4_declare_scanner_communication_variables): Don't omit yynerrs just
7544 because push mode is on. Instead, if pure mode is on, move yynerrs
7545 to...
7546 (b4_declare_parser_state_variables): ... here.
7547 (yynerrs, yyerror_range): For push mode, #define each NAME in this list
7548 to yyps->NAME so it can be used in yypush_parse.
7549 (yypush_parse): Don't omit uses of yynerrs in push mode.
7550
7551 2006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
7552
7553 Fix bug such that the first pushed token's value and location are
7554 sometimes overwritten (sometimes by %initial-action) before being used.
7555 * data/push.c (yypush_parse): Rename arguments yynchar, yynlval, and
7556 yynlloc to yypushed_char, yypushed_val, and yypushed_loc for clarity.
7557 For the first yypush_parse invocation, initialize yychar to YYEMPTY to
7558 more closely mimic the pull parser logic.
7559 Don't copy the pushed token to yychar, yylval, and yylloc until it's
7560 time to read a token, which is after any initialization of yylval and
7561 yylloc.
7562 (gottoken): Rename label to...
7563 (yyread_pushed_token): ... for clarity and to avoid infringing on the
7564 user namespace.
7565
7566 2006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
7567
7568 Rearrange initialization of the parser state variables so that the
7569 skeleton doesn't have to have a copy for pull mode and another for push
7570 mode. This patch also fixes at least a bug such that yylloc was not
7571 initialized (with b4_location_initial_line and
7572 b4_location_initial_column) upon calling yypush_parse. However, that
7573 initialization now overwrites the first token's location;
7574 %initial-action assigning @$ already did the same thing, and both bugs
7575 will be fixed in a later patch.
7576 * data/push.c (b4_yyssa): Remove and convert all uses to just yyssa.
7577 (b4_declare_parser_state_variables): Remove initialization of yytoken,
7578 yyss, yyvs, yyls, and yystacksize.
7579 (yypstate_new): Remove initialization of some yypstate fields: yystate,
7580 yyerrstatus, yytoken, yyss, yyvs, yyls, yystacksize, yyssp, yyvsp, and
7581 yylsp.
7582 (yyssa, yyvsa, yylsa): For push mode, #define each NAME in this list to
7583 yyps->NAME so it can be used in yypush_parse.
7584 (yyparse or yypush_parse): For yypush_parse, don't print the
7585 "Starting parse" diagnostic for invocations after the first.
7586 Add initialization of yytoken, yyss, yyvs, yyls, and yystacksize; for
7587 yypush_parse, only do it for the first invocation.
7588 Allow yystate, yyerrstatus, yyssp, yyvsp, yylsp, and yylloc
7589 initialization to occur in yypush_parse but only on the first
7590 invocation.
7591
7592 2006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
7593
7594 * data/push.c: Add CPP guards around push parser declarations in both
7595 the header and the code file.
7596 In the code file, move the push parser declarations to the same place
7597 they appear in the header file.
7598 Clean up the M4 some, especially the inconsistent underquoting in
7599 some b4_c_function_def and b4_c_function_decl uses.
7600
7601 2006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
7602
7603 Encapsulate the push parser state variables into an M4 macro so the
7604 push skeleton doesn't have to list them again for pull mode's yyparse.
7605 For push mode, remove yypush_parse's local equivalents of these
7606 variables to eliminate unnecessary copying between the two sets at
7607 run-time. This patch also fixes at least a bug related to multiple
7608 %initial-action invocations in push mode.
7609 * data/push.c (b4_declare_parser_variables): Rename to...
7610 (b4_declare_scanner_communication_variables): ... this for clarity and
7611 update both uses.
7612 (b4_declare_yyparse_variables): Remove and move its contents to the one
7613 spot where it was invoked.
7614 (b4_declare_parser_state_variables): New macro containing the parser
7615 state variables required by push mode.
7616 (struct yypstate): Replace all fields but yynew with
7617 b4_declare_parser_state_variables.
7618 (yystate, yyn, yyresult, yyerrstatus, yytoken, yyss, yyssp, yyvs,
7619 yyvsp, yyls, yylsp, yystacksize, yyval, yyloc): For push mode, #define
7620 each NAME in this list to yyps->NAME so it can be used in yypush_parse.
7621 (yyparse or yypush_parse): For yyparse in pull mode, replace local
7622 parser state variable declarations with
7623 b4_declare_parser_state_variables.
7624 Don't initialize parser state variables when calling yypush_parse since
7625 yypstate_new already does that.
7626 Invoke the user's initial action only upon the first yypush_parse
7627 invocation.
7628 Remove all code that copies between the local parser state variables
7629 and the yypstate.
7630
7631 2006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
7632
7633 * data/push.c (union yyalloc): Rename yyss, yyvs, and yyls fields to
7634 prevent a name collision in a future patch where these names will
7635 sometimes be #define'd.
7636 (YYSTACK_RELOCATE): Add an argument to select a union yyalloc field
7637 since it no longer has the same name as the existing argument.
7638 (yyparse or yypush_parse): Update all uses of YYSTACK_RELOCATE.
7639
7640 2006-12-19 Paolo Bonzini <bonzini@gnu.org>
7641 and Joel E. Denny <jdenny@ces.clemson.edu>
7642
7643 * doc/bison.texinfo (Decl Summary): In the %language entry, mention
7644 that the argument is case-insensitive, and there's no `=' here.
7645 For the %skeleton entry, mention that %language is better.
7646 (Bison Options): Likewise for --language and --skeleton. Move the
7647 --skeleton entry so that the `Tuning the parser' section is sorted
7648 alphabetically on long options.
7649 (C++ Bison Interface): Don't use the word skeleton. Don't explain the
7650 %language directive in detail here; cross-reference the %language
7651 documentation instead.
7652 (Calc++ Parser): Use `%require "@value{VERSION}"' rather than
7653 `%require "2.3b"' so that the example is always up-to-date.
7654 (Table of Symbols): Add entries for %language and %skeleton.
7655 * examples/extexi (normalize): Instead of replacing every %require
7656 argument with the current Bison version, just substitute for
7657 `@value{VERSION}'. This guarantees that we're testing what actually
7658 appears in the documentation.
7659 * examples/calc++/Makefile.am ($(calc_extracted)): Use `$(VERSION)'
7660 rather than `@VERSION@'.
7661
7662 2006-12-18 Paul Eggert <eggert@cs.ucla.edu>
7663
7664 * NEWS: Reword the %language news a bit, and put it earlier.
7665
7666 * src/getargs.c (skeleton_arg): Last arg is now location const *.
7667 Rewrite to simplify the logic.
7668 (language_argmatch): Likewise.
7669 (program_name): We now own this var.
7670 * src/getargs.h (struct bison_language): Use char[] rather than
7671 const char *.
7672
7673 * doc/bison.texinfo (Decl Summary, Bison Options): Don't claim
7674 Java is supported.
7675 * src/complain.c (program_name): Remove decl; no longer needed.
7676 * src/main.c (program_name): Remove; now belongs to getargs.
7677
7678 2006-12-18 Paolo Bonzini <bonzini@gnu.org>
7679
7680 * NEWS: Document %language.
7681
7682 * data/Makefile.am (dist_pkgdata_DATA): Add c-skel.m4, c++-skel.m4.
7683
7684 * data/c-skel.m4, data/c++-skel.m4: New files.
7685 * data/glr.c: Complain on push parsers.
7686
7687 * doc/bison.texinfo (C++ Parser Interface): Prefer %language
7688 over %skeleton.
7689 (Decl Summary): Document %language and %skeleton.
7690 (Command line): Document -L.
7691
7692 * examples/extexi: Rewrite %require directive.
7693 * examples/calc++/Makefile.am: Pass VERSION to extexi.
7694
7695 * src/files.c (compute_exts_from_gc): Look in language structure
7696 for .y extension.
7697 (compute_file_name_parts): Check whether .tab should be added.
7698 * src/getargs.c (valid_languages, skeleton_prio, language_prio):
7699 (language, skeleton_arg, language_argmatch): New.
7700 (long_options): Add --language.
7701 (getargs): Use skeleton_arg, add -L/--language.
7702 * src/getargs.h: Include location.h.
7703 (struct bison_language, language, skeleton_arg, language_argmatch): New.
7704 * src/output.c (prepare): Pick default skeleton from struct language.
7705 Don't dispatch C skeletons here.
7706 * src/parse-gram.y (PERCENT_LANGUAGE): New.
7707 (prologue_declaration): Add "%language" rule, use skeleton_arg.
7708 * src/scan-gram.l ("%language"): New rule.
7709
7710 * tests/calc.at: Test %skeleton and %language.
7711 * tests/local.at (AT_SKEL_CC_IF): Look for %language.
7712 (AT_GLR_IF): Look for %skeleton "glr.cc".
7713 (AT_LALR1_CC_IF, AT_GLR_CC_IF): Rewrite.
7714 (AT_YACC_IF): Reject %language.
7715
7716 2006-12-18 Paul Eggert <eggert@cs.ucla.edu>
7717
7718 * src/symtab.h (struct semantic_type): Remove the tag 'semantic_type',
7719 since it wasn't used; only the typedef name 'semantic_type' is needed.
7720 Also, omit trailing white space.
7721
7722 * bootstrap: Sync from coreutils.
7723 (gnulib_extra_files): Add build-aux/announce.gen.
7724 (slurp): Adjust .gitignore files like .cvsignore files.
7725 * build-aux/announce-gen: Remove from CVS, since bootstrap
7726 now creates this.
7727
7728 2006-12-16 Joel E. Denny <jdenny@ces.clemson.edu>
7729
7730 Make %push-parser imply %pure-parser. This fixes several bugs; see
7731 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00148.html>.
7732 * src/parse-gram.y (prologue_declaration): For %push-parser, also set
7733 pure_parser = true.
7734 * data/push.c: Don't bother testing b4_push_if when deciding whether
7735 to expand b4_declare_parser_variables globally.
7736 (yypush_parse): Likewise in here.
7737
7738 * data/push.c (yypush_parse): Add b4_parse_param to arguments.
7739 (yy_reduce_print): Reformat M4 for readability.
7740
7741 2006-12-15 Bob Rossi <bob@brasko.net>
7742 and Joel Denny <jdenny@ces.clemson.edu>
7743
7744 * data/push.c (yypstate): Add typedef, and update all uses of
7745 struct yypstate to just yypstate.
7746 * tests/calc.at (_AT_DATA_CALC_Y): Update here as well.
7747
7748 2006-12-14 Bob Rossi <bob@brasko.net>
7749
7750 * data/push.c (yypush_parse): Declare prototype regardless of
7751 %locations option.
7752
7753 2006-12-14 Bob Rossi <bob@brasko.net>
7754
7755 * data/push.c (yyparse): Remove the prototype and the #define when in
7756 push-parser mode.
7757
7758 2006-12-13 Bob Rossi <bob@brasko.net>
7759
7760 * data/push.c (yypstate_init): Rename to...
7761 (yypstate_new): ... this and use b4_c_function_def.
7762 (yypstate_delete): New.
7763 (yypush_parse): Change parameters yynval and yynlloc to be const.
7764 * tests/calc.at (_AT_DATA_CALC_Y): Use new yypstate_new and
7765 yypstate_delete functions.
7766
7767 2006-12-13 Joel E. Denny <jdenny@ces.clemson.edu>
7768
7769 * configure.ac (AC_PREREQ): Require Autoconf 2.61 because of our
7770 strange test case titles. Reported by Bob Rossi.
7771
7772 2006-12-13 Paul Eggert <eggert@cs.ucla.edu>
7773
7774 * TODO: Add pointer to Sylvain Schmitz's work on static detection
7775 of potential ambiguities in GLR grammers.
7776
7777 2006-12-12 Joel E. Denny <jdenny@ces.clemson.edu>
7778
7779 * tests/testsuite.at (AT_CHECK): When checking if $1 starts with
7780 `bison ', use m4_index instead of m4_substr since chopping up a string
7781 containing M4-special characters causes problems here.
7782
7783 Fix a couple of bugs related to special characters in user-specified
7784 file names, and make it easier for skeletons to compute output file
7785 names with the same file name prefix as Bison-computed output file
7786 names.
7787 * data/glr.cc, data/push.c, data/yacc.c: In @output, use
7788 b4_parser_file_name and b4_spec_defines_file instead of
7789 @output_parser_name@ and @output_header_name@, which are now redundant.
7790 * data/glr.c, data/lalr1.cc: Likewise. Also, in header #include's, use
7791 b4_parser_file_name, b4_spec_defines_file, and the new
7792 @basename(FILENAME@) instead of @output_parser_name@ and
7793 @output_header_name@, which inappropriately escaped the file names as
7794 C string literals.
7795 * src/files.c (all_but_ext): Remove static qualifier.
7796 (compute_output_file_names): Move `free (all_but_ext)' to...
7797 (output_file_names_free): ... here since all_but_ext is needed later.
7798 * src/files.h (all_but_ext): Extern.
7799 * src/muscle_tab.h (MUSCLE_INSERT_STRING_RAW): New macro that does
7800 exactly what MUSCLE_INSERT_STRING used to do.
7801 (MUSCLE_INSERT_STRING): Use MUSCLE_OBSTACK_SGROW so that M4-special
7802 characters are escaped properly.
7803 * src/output.c (prepare): Define muscle file_name_all_but_ext as
7804 all_but_ext.
7805 For pkgdatadir muscle, maintain previous functionality by using
7806 MUSCLE_INSERT_STRING_RAW instead of MUSCLE_INSERT_STRING. The problem
7807 is that b4_pkgdatadir is used inside m4_include in the skeletons, so
7808 digraphs would never be expanded. Hopefully no one has M4-special
7809 characters in his Bison installation path.
7810 * src/scan-skel.l: Don't parse @output_header_name@ and
7811 @output_parser_name@ anymore since they're now redundant.
7812 In @output, use decode_at_digraphs.
7813 Parse a new @basename command that invokes last_component.
7814 (decode_at_digraphs): New.
7815 (BASE_QPUTS): Remove unused.
7816 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): New macro.
7817 (Output file name): New tests.
7818
7819 2006-12-09 Joel E. Denny <jdenny@ces.clemson.edu>
7820
7821 Warn about output files that are generated by the skeletons and that
7822 conflict with other output files.
7823 * data/glr.c: Don't generate the header file here when glr.cc does.
7824 * src/files.c (file_names, file_names_count): New static globals.
7825 (compute_output_file_names): Invoke output_file_name_check for files
7826 not generated by the skeletons and remove existing checks.
7827 (output_file_name_check): New function that warns about conflicting
7828 output file names.
7829 (output_file_names_free): Free file_names.
7830 * src/files.h (output_file_name_check): Declare.
7831 * src/scan-skel.l: Invoke output_file_name_check for files generated by
7832 the skeletons.
7833 * tests/output.at (AT_CHECK_CONFLICTING_OUTPUT): New.
7834 (Conflicting output files): New tests.
7835
7836 2006-12-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
7837
7838 * doc/bison.texinfo: Fix a couple of typos.
7839
7840 2006-12-08 Bob Rossi <bob@brasko.net>
7841
7842 * data/push.c: (yypvarsinit, yypvars, struct yypvars, yypushparse):
7843 Rename to...
7844 (yypstate_init, yypstate, struct yypstate, yypush_parse): ... these and
7845 update all uses.
7846 (b4_yyssa, b4_yyerror_range, yypstate_init): Rename pv to yyps.
7847 (yypush_parse): Rename yypvars argument to yyps and remove redundant
7848 local pv.
7849 (yypstate_init, yypush_parse): Declare in Bison-generated header file.
7850 * tests/calc.at (_AT_DATA_CALC_Y): Use newly named functions.
7851
7852 2006-12-07 Bob Rossi <bob@brasko.net>
7853 and Joel Denny <jdenny@ces.clemson.edu>
7854
7855 * data/push.c (yypvarsinit): Change return type from void* to struct
7856 yypvars*. No longer cast to void* on return.
7857 (struct yypvars): Remove yylen since it need not be remembered between
7858 yypushparse invocations.
7859 (yypushparse): Don't copy between yylen and pv->yylen.
7860
7861 2006-12-05 Bob Rossi <bob@brasko.net>
7862
7863 * data/push.c (yychar_set, yylval_set, yylloc_set): Delete.
7864 (yypushparse): Add yynchar, yynlval, yynlloc parameters.
7865 (b4_declare_parser_variables): Do not declare yynerrs for push mode.
7866 (struct yypvars): Remove b4_declare_parser_variables.
7867 (yypvarsinit): Remove init code for removed variables.
7868 (global scope): Do not declare b4_declare_parser_variables if
7869 push or pure mode.
7870 (yypushparse): Add b4_declare_parser_variables.
7871 Init new local variables, and remove init code for removed
7872 yypvars variables.
7873 (yyparse): Delete.
7874 * tests/calc.at (_AT_DATA_CALC_Y): Call yypushparse for push mode
7875 and yyparse for other modes.
7876 (AT_CHECK_CALC_LALR): Added '%skeleton "push.c"' for push tests.
7877 * tests/local.at (AT_PUSH_IF, AT_PURE_OR_PUSH_IF): Added.
7878 (AT_YYERROR_SEES_LOC_IF): push-parser makes this false.
7879 (AT_PURE_LEX_IF): True if pure or push parser.
7880
7881 2006-12-05 Joel E. Denny <jdenny@ces.clemson.edu>
7882
7883 Document Yacc prologue alternatives and default %destructor's and
7884 %printer's as experimental. Don't mention Java yet. Discussed at
7885 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00002.html>.
7886 * NEWS (2.3a+): Say they're experimental. Remove any mention of Java.
7887 (2.3a): Annotate this entry to say the old forms of these features were
7888 also experimental.
7889 * doc/bison.texinfo (Prologue Alternatives, Freeing Discarded Symbols,
7890 Table of Symbols): Say they're experimental. Comment out any mention
7891 of Java (we'll want this back eventually).
7892
7893 2006-12-01 Joel E. Denny <jdenny@ces.clemson.edu>
7894
7895 Support a file name argument to %defines. Deprecate `=' in
7896 %file-prefix, %name-prefix, and %output. Discussed at
7897 <http://lists.gnu.org/archive/html/help-bison/2006-09/msg00001.html>.
7898 * NEWS (2.3a+): Mention.
7899 * doc/bison.texinfo (Decl Summary, Table of Symbols): Add entry for new
7900 form of %defines, and remove `=' from entries for %file-prefix,
7901 %name-prefix, and %output.
7902 * src/parse-gram.y (prologue_declaration): Implement.
7903 * tests/calc.at (Simple LALR Calculator, Simple GLR Calculator, Simple
7904 LALR1 C++ Calculator, Simple GLR C++ Calculator): Remove the `=' from
7905 all but one occurrence of %name-prefix.
7906 * tests/headers.at (export YYLTYPE): Remove the `=' from %name-prefix.
7907 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Likewise.
7908 * tests/output.at (AT_CHECK_OUTPUT): Remove the `=' from all but one
7909 occurrence of each of %file-prefix and %output. Add check for %defines
7910 with argument.
7911 * tests/reduce.at (Useless Terminals, Useless Nonterminals,
7912 Useless Rules, Reduced Automaton, Underivable Rules, Empty Language):
7913 Remove the `=' from %output.
7914
7915 2006-11-21 Joel E. Denny <jdenny@ces.clemson.edu>
7916
7917 Don't escape $ in test case titles since Autoconf 2.61 now does that
7918 correctly.
7919 * tests/actions.at (Default %printer and %destructor are not for error
7920 or $undefined): Here.
7921 (Default %printer and %destructor are not for $accept): Here.
7922 * tests/input.at (Invalid $n and @n): Here.
7923
7924 2006-11-20 Joel E. Denny <jdenny@ces.clemson.edu>
7925
7926 Rename <!> to <>. Discussed starting at
7927 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00039.html>.
7928 * NEWS (2.3a+): Update.
7929 * doc/bison.texinfo (Freeing Discarded Symbols, Table of Symbols):
7930 Update.
7931 * src/parse-gram.y (TYPE_TAG_NONE, generic_symlist_item): Implement.
7932 * src/scan-gram.l (INITIAL): Implement.
7933 * src/symlist.c (symbol_list_default_tagless_new): Update comment.
7934 * src/symlist.h (symbol_list, symbol_list_default_tagless_new): Update
7935 comment.
7936 * tests/actions.at (Default tagless %printer and %destructor,
7937 Default tagged and per-type %printer and %destructor,
7938 Default %printer and %destructor are not for error or $undefined,
7939 Default %printer and %destructor are not for $accept,
7940 Default %printer and %destructor for mid-rule values): Update.
7941 * tests/input.at (Default %printer and %destructor redeclared,
7942 Unused values with default %destructor): Update.
7943
7944 2006-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
7945
7946 Don't let %prec take a nonterminal.
7947 * src/reader.c (grammar_current_rule_prec_set): Make the %prec symbol a
7948 token.
7949 * tests/input.at (%prec takes a token): New test checking that %prec
7950 won't take a nonterminal.
7951
7952 2006-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
7953
7954 * tests/testsuite.at (AT_CHECK): Don't miss an exit value of 0 because
7955 it was double-quoted.
7956 * src/Makefile.am (YACC): Use --warnings=all,error so that Bison's own
7957 grammar is maintained with Bison's highest standards.
7958 * src/getargs.c: Fix some typos in Doxygen comments.
7959
7960 2006-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
7961
7962 Fix memory leaks in scanners generated by at least Flex 2.5.9 and
7963 later. Reported by Paul Eggert in
7964 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00014.html>.
7965 * src/flex-scanner.h (yylex_destroy): Define for Flex before 2.5.9.
7966 * src/scan-code.l (translate_action): Don't bother invoking
7967 yy_delete_buffer (YY_CURRENT_BUFFER) before creating the first buffer.
7968 (code_scanner_free): Instead of invoking
7969 yy_delete_buffer (YY_CURRENT_BUFFER) directly, invoke yylex_destroy,
7970 which frees more.
7971 * src/scan-gram.l (gram_scanner_free): Likewise.
7972 * src/scan-skel.l (scan_skel): Likewise.
7973
7974 2006-11-09 Joel E. Denny <jdenny@ces.clemson.edu>
7975
7976 * src/files.c (tr): Change return type to void.
7977 * src/muscle_tab.c (muscle_insert): Free storage in case muscle_grow
7978 has been called previously for the same key.
7979 (muscle_find): Return storage instead of value so that
7980 --enable-gcc-warnings doesn't produce warnings that the return discards
7981 const. aver that the value and storage are the same since storage
7982 could potentially be NULL when value is not.
7983 * tests/testsuite.at (AT_CHECK): Treat an unspecified exit value the
7984 same as 0.
7985
7986 2006-11-08 Paul Eggert <eggert@cs.ucla.edu>
7987
7988 * bootstrap.conf (excluded_files): Exclude m4/codeset.m4 (undoing
7989 the earlier change today), m4/intl.m4, m4/intldir.m4. This gives
7990 us a slightly cleaner distribution, and also works.
7991 * m4/.cvsignore: Add inline.m4, wint_t.m4 to accommodate recent
7992 gnulib changes.
7993
7994 2006-11-08 Joel E. Denny <jdenny@ces.clemson.edu>
7995 and Paul Eggert <eggert@cs.ucla.edu>
7996
7997 Don't let Bison leak memory except when it complains.
7998 * src/files.h (parser_file_name, spec_verbose_file, spec_graph_file):
7999 (spec_defines_file, dir_prefix): Now char *, not const char *,
8000 since they are freed.
8001 * src/files.c: Likewise.
8002 (all_but_ext, all_but_tab_ext, src_extension, header_extension):
8003 Likewise.
8004 (tr): Now operates in-place. All uses changed.
8005 (compute_exts_from_gf, compute_exts_from_src): Don't leak temporary
8006 values.
8007 (compute_file_name_parts, compute_output_file_names): Don't store
8008 read-only data in variables that will be freed.
8009 (compute_output_file_names): Free all_but_ext, all_but_tab_ext,
8010 src_extension, and header_extension.
8011 (output_file_names_free): New public function to free
8012 spec_verbose_file, spec_graph_file, spec_defines_file,
8013 parser_file_name, and dir_prefix.
8014 * src/getargs.c (getargs): Don't store read-only data in variables that
8015 will be freed.
8016 * src/main.c (main): Invoke output_file_names_free, code_scanner_free
8017 (which previously existed but was unused), and quotearg_free.
8018 * src/muscle_tab.h (muscle_insert): value arg is now a `char const *'.
8019 * src/muscle_tab.c: Likewise.
8020 (muscle_entry): Make the value char const *,
8021 and add a new storage member that is char * and can be freed.
8022 (muscle_entry_free): New private function.
8023 (muscle_init): Use it instead of free.
8024 (muscle_insert, muscle_grow): Update and use new storage member.
8025 (muscle_code_grow): Free the string passed to muscle_grow
8026 since it's not needed anymore.
8027 * src/parse-gram.y (%union): Make `chars' member a `char const *', and
8028 add a new `char *code' member.
8029 ("{...}"): Declare semantic type as code.
8030 * src/scan-code.h (translate_rule_action):
8031 (translate_symbol_action, translate_code, translate_action): Return
8032 `char const *' rather than `char *' since external code should not free
8033 these strings.
8034 * src/scan-code.l: Likewise.
8035 * src/scan-gram.l (<SC_BRACED_CODE>): Use val->code for BRACED_CODE,
8036 which is "{...}" in the parser.
8037 * tests/Makefile.am (maintainer-check-valgrind): Set
8038 VALGRIND_OPTS='--leak-check=full --show-reacheable=yes' before invoking
8039 Valgrind.
8040 * tests/calc.at (_AT_DATA_CALC_Y): fclose the FILE* so Valgrind doesn't
8041 complain.
8042 * tests/testsuite.at (AT_CHECK): Redefine so that running Bison and
8043 expecting a non-zero exit status sets --leak-check=summary and
8044 --show-reachable=no for Valgrind. Bison unabashedly leaks memory in
8045 this case, and we don't want to hear about it.
8046
8047 2006-11-08 Paul Eggert <eggert@cs.ucla.edu>
8048
8049 * bootstrap (runtime-po/Makevars): Derive from po/Makevars
8050 instead of from the template, to simplify configuration a bit.
8051 * bootstrap.conf (excluded_files): Don't exclude m4/codeset.m4
8052 and m4/wint_t.m4, as they are needed with the latest gnulib.
8053
8054 2006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
8055
8056 Disable unset/unused mid-rule value warnings by default, and recognize
8057 --warnings=midrule-values to enable them. Discussed starting at
8058 <http://lists.gnu.org/archive/html/help-bison/2006-10/msg00030.html>.
8059 * NEWS (2.3a+): Mention.
8060 * src/getargs.c, src/getargs.h (warnings_args, warnings_types, enum
8061 warnings): Add entry for midrule-values subargument.
8062 * src/reader.c (symbol_should_be_used): Don't return true just because
8063 the value is a set/used mid-rule value unless
8064 --warnings=midrule-values was specified.
8065 * tests/input.at (Unused values, Unused values before symbol
8066 declarations): Run tests with and without --warnings=midrule-values.
8067
8068 * src/reader.c (check_and_convert_grammar): Use symbol_list_free rather
8069 than LIST_FREE directly.
8070
8071 2006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
8072
8073 Finish implementing --warnings=error, which should not be implied by
8074 --warnings=all (or by its synonyms -W and --warnings without
8075 subarguments).
8076 * src/complain.c (set_warning_issued): New function to report that
8077 warnings are being treated as errors and to record an error if so.
8078 Invoke...
8079 (warn_at, warn): ... here.
8080 * src/getargs.c (warnings_args, warnings_types): Reorder so that
8081 "error - warnings are errors" does not appear above "all - all of the
8082 above".
8083 (getargs): For -W and --warnings without subarguments, don't let
8084 FLAGS_ARGMATCH set warnings_error in warnings_flag.
8085 * src/getargs.h (enum warnings): Unset warnings_error in warnings_all.
8086
8087 2006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
8088
8089 * src/getargs.c (flags_argmatch): Don't cause segmentation fault for
8090 empty subargument list. For example: `bison --warnings= parser.y'.
8091
8092 2006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
8093
8094 * data/push.c, data/yacc.c: Make sure there's a newline at the end of
8095 the parser header file so that gcc doesn't warn.
8096
8097 2006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
8098
8099 Split the default %destructor/%printer into two kinds: <*> and <!>.
8100 Discussed starting at
8101 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00060.html>.
8102 * NEWS (2.3a+): Mention.
8103 * doc/bison.texinfo (Freeing Discarded Symbols): Document this and the
8104 previous change today related to mid-rules.
8105 (Table of Symbols): Remove %symbol-default and add <*> and <!>.
8106 * src/parse-gram.y (PERCENT_SYMBOL_DEFAULT): Remove.
8107 (TYPE_TAG_ANY): Add as <*>.
8108 (TYPE_TAG_NONE): Add as <!>.
8109 (generic_symlist_item): Remove RHS for %symbol-default and add RHS's
8110 for <*> and <!>.
8111 * src/scan-gram.l (PERCENT_SYMBOL_DEFAULT): Remove.
8112 (TYPE_TAG_ANY, TYPE_TAG_NONE): Add.
8113 * src/symlist.c (symbol_list_default_new): Split into tagged and
8114 tagless versions.
8115 (symbol_list_destructor_set, symbol_list_printer_set): Split
8116 SYMLIST_DEFAULT case into SYMLIST_DEFAULT_TAGGED and
8117 SYMLIST_DEFAULT_TAGLESS.
8118 * src/symlist.h: Update symbol_list_default*_new prototypes.
8119 (symbol_list.content_type): Split enum value SYMLIST_DEFAULT into
8120 SYMLIST_DEFAULT_TAGGED and SYMLIST_DEFAULT_TAGLESS.
8121 * src/symtab.c (default_destructor, default_destructor_location,
8122 default_printer, default_printer_location): Split each into tagged and
8123 tagless versions.
8124 (symbol_destructor_get, symbol_destructor_location_get,
8125 symbol_printer_get, symbol_printer_location_get): Implement tagged
8126 default and tagless default cases.
8127 (default_destructor_set, default_printer_set): Split each into tagged
8128 and tagless versions.
8129 * src/symtab.h: Update prototypes.
8130 * tests/actions.at (Default %printer and %destructor): Rename to...
8131 (Default tagless %printer and %destructor): ... this, and extend.
8132 (Per-type %printer and %destructor): Rename to...
8133 (Default tagged and per-type %printer and %destructor): ... this, and
8134 extend.
8135 (Default %printer and %destructor for user-defined end token): Extend.
8136 (Default %printer and %destructor are not for error or $undefined):
8137 Update.
8138 (Default %printer and %destructor are not for $accept): Update.
8139 (Default %printer and %destructor for mid-rule values): Extend.
8140 * tests/input.at (Default %printer and %destructor redeclared): Extend.
8141 (Unused values with default %destructor): Extend.
8142
8143 2006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
8144
8145 Don't apply the default %destructor/%printer to an unreferenced midrule
8146 value. Mentioned at
8147 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00104.html>.
8148 * src/symtab.c (dummy_symbol_get): Name all dummy symbols initially
8149 like $@n instead of just @n so that the default %destructor/%printer
8150 logic doesn't see them as user-defined symbols.
8151 (symbol_is_dummy): Check for both forms of the name.
8152 * src/reader.c (packgram): Remove the `$' from each midrule symbol
8153 name for which the midrule value is referenced in any action.
8154 * tests/actions.at (Default %printer and %destructor for mid-rule
8155 values): New test.
8156 * tests/regression.at (Rule Line Numbers, Web2c Report): Update output
8157 for change to dummy symbol names.
8158
8159 2006-10-20 Joel E. Denny <jdenny@ces.clemson.edu>
8160
8161 Warn about unset midrule $$ if the corresponding $n is used.
8162 * src/reader.c (symbol_should_be_used): Check midrule parent rule for
8163 $n usage.
8164 (packgram): Before invoking grammar_rule_check on any rule, make sure
8165 all actions have already been scanned in order to set `used' flags.
8166 Otherwise, checking that a midrule's $$ is set will not always work
8167 properly because the midrule check must forward-reference the midrule's
8168 parent rule.
8169 * tests/input.at (AT_CHECK_UNUSED_VALUES): Extend to check the new
8170 warning.
8171
8172 2006-10-20 Joel E. Denny <jdenny@ces.clemson.edu>
8173
8174 More improvements to the documentation of the prologue alternatives:
8175 * NEWS (2.3a+): Mention the new `Prologue Alternatives' section in the
8176 Bison manual.
8177 * doc/bison.texinfo (Prologue Alternatives): Correct some errors. Add
8178 some text to clarify the relative importance of the new directives and
8179 to show how these directives may be viewed as code labels.
8180
8181 2006-10-16 Joel E. Denny <jdenny@ces.clemson.edu>
8182
8183 Similar to the recently removed %before-header, add %code-top as the
8184 alternative to the pre-prologue. Mentioned at
8185 <http://lists.gnu.org/archive/html/bison-patches/2006-10/msg00063.html>.
8186 Also, let the prologue alternatives appear in the grammar section.
8187 * src/parse-gram.y (PERCENT_CODE_TOP): New token.
8188 (prologue_declaration): Move the existing prologue alternatives to...
8189 (grammar_declaration): ... here and add %code-top.
8190 * src/scan-gram.l (PERCENT_CODE_TOP): New token.
8191
8192 Clean up and extend documentation for the prologue alternatives.
8193 * NEWS (2.3a+): Describe prologue alternatives.
8194 * doc/bison.texinfo (Prologue): Move discussion of prologue
8195 alternatives to...
8196 (Prologue Alternatives): ... this new section, and extend it to discuss
8197 all 4 directives in detail.
8198 (Table of Symbols): Clean up discussion of prologue alternatives and
8199 add %code-top.
8200
8201 2006-10-16 Juan Manuel Guerrero <juan.guerrero@gmx.de>
8202
8203 DJGPP specific issues.
8204
8205 * djgpp/config.bat: config.hin has been moved to lib. Adjust
8206 config.bat accordingly.
8207 * djgpp/config.sed: Adjust config.sed for the use of autoconf 2.60.
8208 * djgpp/config.site: Likewise.
8209
8210 2006-10-16 Paolo Bonzini <bonzini@gnu.org>
8211
8212 Replace %*-header with %provides, %requires, %code. See discussion at
8213 http://lists.gnu.org/archive/html/bison-patches/2006-10/msg00002.html
8214
8215 * data/bison.m4 (b4_user_requires, b4_user_provides): New.
8216 (b4_user_start_header): Remove.
8217 * data/glr.c: Use new macros instead of b4_*start_header
8218 and b4_*end_header.
8219 * data/glr.cc: Likewise.
8220 * data/lalr1.cc: Likewise.
8221 * data/push.c: Likewise.
8222 * data/yacc.c: Likewise.
8223
8224 * doc/bison.texinfo: Remove %before-header, rename
8225 %{start,end,after}-header to %requires, %provides, %code.
8226
8227 * src/parse-gram.y: Likewise (also rename token names accordingly).
8228 * src/scan-gram.l: Likewise.
8229 * tests/actions.at: Likewise.
8230
8231 2006-10-14 Paul Eggert <eggert@cs.ucla.edu>
8232
8233 * lib/Makefile.am (AM_CFLAGS): Remove $(WERROR_CFLAGS).
8234 Problem reported by Joel E. Denny.
8235
8236 2006-10-14 Jim Meyering <jim@meyering.net>
8237
8238 (Sync from coreutils.)
8239 Work also when the working directory (with e.g. coreutils sources)
8240 is version controlled with git, rather than CVS.
8241 * bootstrap (CVS_only_file): Test for the existence of README-cvs,
8242 rather than CVS.
8243 In messages and comments, say e.g., "checked-out sources",
8244 rather than "CVS sources".
8245 (version_controlled_file): New function. Work for git as well as
8246 for CVS. Don't use grep's -q option.
8247 (slurp): Call it here, in place of CVS-specific code.
8248
8249 2006-10-14 Joel E. Denny <jdenny@ces.clemson.edu>
8250
8251 Fix testsuite for ./configure --enable-gcc-warnings:
8252 * configure.ac (gcc-warnings): Move -Wall before -Wno-sign-compare.
8253 Otherwise, gcc 4.1.0 (at least) warns about sign comparisons in
8254 __AT_CHECK_PRINTER_AND_DESTRUCTOR in tests/actions.at.
8255 * test/input.at (Torturing the Scanner): #include <stdlib.h> for abort.
8256 * test/regression.at (Diagnostic that expects two alternatives):
8257 Likewise.
8258
8259 2006-10-12 Paul Eggert <eggert@cs.ucla.edu>
8260
8261 * bootstrap.conf (gnulib_modules): Add config-h.
8262 * djgpp/subpipe.c: Include <config.h> unconditionally; don't
8263 worry about HAVE_CONFIG_H.
8264 * lib/abitset.c: Likewise.
8265 * lib/bitset.c: Likewise.
8266 * lib/bitset_stats.c: Likewise.
8267 * lib/bitsetv-print.c: Likewise.
8268 * lib/bitsetv.c: Likewise.
8269 * lib/ebitset.c: Likewise.
8270 * lib/get-errno.c: Likewise.
8271 * lib/lbitset.c: Likewise.
8272 * lib/subpipe.c: Likewise.
8273 * lib/timevar.c: Likewise.
8274 * lib/vbitset.c: Likewise.
8275 * lib/bitset.c: Include "bitset.h" first, to test interface.
8276 * lib/bitset_stats.c: Include "bitset_stats.h" first.
8277 * lib/bitsetv-print.c: Include "bitsetv-print.h" first.
8278 * lib/bitsetv.c: Include "bitsetv.h" first.
8279 * lib/get-errno.c: Include "get-errno.h" first.
8280 * m4/.cvsignore: Add config-h.m4.
8281 * tests/actions.at (Default %printer and %destructor for ...):
8282 Adjust expected line numbers in output to reflect removal of #if
8283 HAVE_CONFIG_H lines.
8284 * tests/glr-regression.at (Missed %merge type warnings when ...):
8285 Likewise.
8286 * tests/regression.at (Braced code in declaration in rules section):
8287 Likewise.
8288 * tests/atlocal.in (CPPFLAGS): Don't define HAVE_CONFIG_H.
8289 * tests/local.at (AT_DATA_GRAMMAR_PROLOGUE):
8290 Include <config.h> unconditionally.
8291
8292 * bootstrap: Sync from coreutils, as follows:
8293
8294 2006-10-11 Paul Eggert <eggert@cs.ucla.edu>
8295
8296 * bootstrap (symlink_to_gnulib): Fix bug: the dot_dots shell
8297 variable was sometimes used without being initialized. This
8298 messed up the installation of the INSTALL file in some cases.
8299
8300 2006-10-09 Paul Eggert <eggert@cs.ucla.edu>
8301
8302 * bootstrap (usage, main program, symlink_to_gnulib): Add option
8303 --copy. Inspired by a suggestion from Bruno Haible.
8304
8305 2006-10-03 Jim Meyering <jim@meyering.net>
8306
8307 * bootstrap: Undo last change to this file, since now gnulib-tool
8308 sticks with the automake default in generating dependencies.
8309
8310 2006-10-12 Paul Eggert <eggert@cs.ucla.edu>
8311
8312 * configure.ac: Use AC_PROG_CC_STDC; this is more modern than
8313 the old AC_PROG_CC / AM_PROG_CC_STDC combination.
8314
8315 * doc/bison.1: Add copyright notice.
8316
8317 * data/glr.c: Don't include <stdarg.h>; not used.
8318
8319 * NEWS: The -g and --graph options now output graphs in Graphviz
8320 DOT format, not VCG format.
8321 * doc/bison.1: Likewise.
8322 * doc/bison.texinfo (Understanding, Bison Options): Likewise.
8323 * THANKS: Add Satya Kiran Popuri, who proposed the initial version
8324 of this change in
8325 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00158.html>.
8326 * TODO: Remove Graphviz entry.
8327 * src/Makefile.am (bison_SOURCES): Add graphviz.c and graphviz.h;
8328 remove vcg.c, vcg.h, vcg_defaults.h.
8329 * src/vcg.c, src/vcg.h, src/vcg_defaults.h: Remove.
8330 * src/graphviz.c, src/graphviz.h: New files.
8331 * src/files.c (compute_output_file_names): Output .dot, not .vcg.
8332 * src/files.h: Make comment more generic.
8333 * src/main.c (main): Likewise.
8334 * src/print_graph.h: Likewise.
8335 * src/getargs.c (usage): Make usage description more generic.
8336 * src/print_graph.c: Include graphviz.h rather than vcg.h.
8337 (static_graph, fgraph): Remove. All uses changed to pass
8338 arguments instead of sharing a static var.
8339 (print_core, print_actions, print_state, print_graph):
8340 Output graphviz format rather than VCG format.
8341 * tests/.cvsignore: Remove *.vcg; add *.dot.
8342 * tests/output.at: Expect *.dot files, not *.vcg files.
8343
8344 * data/Makefile.am (dist_pkgdata_DATA): Add bison.m4; this
8345 accommodates the 2006-10-08 change.
8346
8347 2006-10-11 Bob Rossi <bob@brasko.net>
8348
8349 * data/push.c (yypushparse, yypvarsinit, yypvars): Wrap in b4_push_if.
8350 (b4_yyssa, b4_yyerror_range): New macros.
8351 (struct yypvars): Remove yyssa_ptr and yyerror_range_ptr fields.
8352 (yypvarsinit): Remove init of removed fields.
8353 (yypushparse): Remove use of removed fields; use new macros instead.
8354
8355 2006-10-11 Paul Eggert <eggert@cs.ucla.edu>
8356
8357 * data/push.c (yypushparse): Fix memory leak if yymsg is malloced
8358 in a push parser. Reindent slightly to match yacc.c better.
8359
8360 2006-10-11 Bob Rossi <bob@brasko.net>
8361
8362 * data/push.c (struct yypvars): Remove yymsgbuf, yymsgbuf_ptr, yymsg,
8363 yymsg_alloc fields.
8364 (yypvarsinit, yypushparse): Remove init of removed fields.
8365 (yypushparse): Use yymsgbuf instead of yymsgbuf_ptr.
8366
8367 2006-10-09 Paul Eggert <eggert@cs.ucla.edu>
8368
8369 * THANKS: Add Paolo Bonzini and Bob Rossi.
8370
8371 2006-10-08 Paolo Bonzini <bonzini@gnu.org>
8372
8373 * data/c.m4 (b4_copyright, b4_epilogue, b4_location_initial_column,
8374 b4_location_initial_line, p4_parse_param, b4_ints_in, b4_flag_if,
8375 b4_define_flag_if and uses, b4_basename, b4_syncline, b4_user_code,
8376 b4_define_user_cde and uses): Remove.
8377 (b4_comment, b4_prefix, b4_sync_start): New.
8378 * data/bison.m4: New file, with most of the content removed from c.m4.
8379 * src/muscle_tab.h: Use "do {...} while(0)" throughout.
8380 * src/output.c (output_skeleton): Pass bison.m4.
8381 (prepare): Pass glr_flag and nondeterministic_flag. Pass prefix
8382 only if specified.
8383
8384 2006-10-05 Paul Eggert <eggert@cs.ucla.edu>
8385
8386 Fix test failure reported by Tom Lane in
8387 <http://lists.gnu.org/archive/html/bug-bison/2006-10/msg00000.html>
8388 and try to make such failures easier to catch in the future.
8389 * data/glr.c (YYTRANSLATE): Don't check for nonpositive arg;
8390 that's now the caller's responsibility.
8391 (yyprocessOneStack, yyrecoverSyntaxError, yyparse):
8392 Set yychar = YYEOF if it's negative.
8393 * tests/actions.at (yylex): Abort if asked to read past EOF.
8394 * tests/conflicts.at (yylex): Likewise.
8395 * tests/cxx-type.at (yylex): Likewise.
8396 * tests/glr-regression.at (yylex): Likewise.
8397 * tests/input.at (yylex): Likewise.
8398 * tests/regression.at (yylex): Likewise.
8399 * tests/torture.at (yylex): Likewise.
8400
8401 2006-10-01 Paul Eggert <eggert@cs.ucla.edu>
8402
8403 Fix problems with translating English-language diagnostics.
8404 * bootstrap: Fix bug introduced in recent bootstrap changes, with
8405 respect to bison-runtime pot generation. The YY_ stuff
8406 wasn't being captured.
8407 * bootstrap.conf (XGETTEXT_OPTIONS_RUNTIME): New var.
8408 * po/POTFILES.in: Add src/location.c, src/scan-code.l.
8409 * runtime-po/POTFILES.in: Add data/push.c.
8410
8411 2006-09-29 Paul Eggert <eggert@cs.ucla.edu>
8412
8413 Merge bootstrap changes from coreutils.
8414
8415 2006-09-28 Jim Meyering <jim@meyering.net>
8416
8417 Automatically generated dependencies are important even
8418 when all of the sources in a directory come from gnulib.
8419 * bootstrap (gnulib_tool): Remove the "no-dependencies" automake
8420 option that gnulib-tool adds to what becomes our lib/gnulib.mk.
8421
8422 2006-09-23 Jim Meyering <jim@meyering.net>
8423
8424 * bootstrap (gnulib_tool_options): Add "--local-dir gl".
8425
8426 2006-09-20 Paul Eggert <eggert@cs.ucla.edu>
8427
8428 * bootstrap: Add support for --force.
8429 (usage): New function. Describe usage less tersely.
8430 (CVS_only_file): New var.
8431
8432 2006-09-21 Paul Eggert <eggert@cs.ucla.edu>
8433
8434 * data/push.c (YYPUSH_MORE): Make it an enum instead.
8435 (yypushparse): Use YYPUSH_MORE instead of the mystery constant.
8436 Adjust white space and comments to match GNU style better.
8437
8438 2006-09-20 Bob Rossi <bob@brasko.net>
8439
8440 * data/push.c (yyresult_get): Remove function.
8441 (YYPUSH_MORE): Add #define.
8442 (yypushparse): Modify return value.
8443
8444 2006-09-20 Paul Eggert <eggert@cs.ucla.edu>
8445
8446 * stamp-h.in: Remove; no longer needed.
8447 * .cvsignore: Replace autom4te.cache and config.cache with *.cache.
8448 Remove config.h, config.hin, intl (no longer created).
8449 * lib/.cvsignore: Add config.h, config.hin, configmake.h, inttypes.h,
8450 stamp-h1.
8451
8452 Sync bootstrap from coreutils, as follows:
8453
8454 2006-09-18 Paul Eggert <eggert@cs.ucla.edu>
8455
8456 * bootstrap (symlink_to_gnulib): New function.
8457 (cp_mark_as_generated): Use it, to prefer symlinks-to-gnulib
8458 to copies-of-gnulib.
8459 (cp_mark_as_generated, slurp, gnulib_files):
8460 Avoid making a copy if it's the same as the old version.
8461 (gnulib_files): Add support for this variable (used by Bison).
8462
8463 2006-09-20 Paul Eggert <eggert@cs.ucla.edu>
8464
8465 * src/getargs.c (usage): Rework to use conventions similar to
8466 coreutils, to make translation a bit easier and the code a bit
8467 smaller. Problem reported by Tim Van Holder.
8468
8469 2006-09-15 Paul Eggert <eggert@cs.ucla.edu>
8470
8471 Use some of gnulib's new modules, taken from coreutils.
8472
8473 * bootstrap: Sync from coreutils, except add support for gnulib_files.
8474 * bootstrap.conf: New file.
8475 (gnulib_modules): Add configmake, inttypes, unistd.
8476 (XGETTEXT_OPTIONS): Add complain, complain_at,
8477 fatal, fatal_at, warn, warn_at, unexpected_end.
8478 * configure.ac (AC_CONFIG_HEADERS): config.h is now in lib, not here.
8479 (gl_USE_SYSTEM_EXTENSIONS): Remove; gl_EARLY now does this.
8480 (gl_EARLY): Add.
8481 (AM_STDBOOL_H): Remove; gl_INIT now dows this.
8482 (gl_INIT): Add
8483 (GNULIB_AUTOCONF_SNIPPET): Remove.
8484 (AM_GNU_GETTEXT): Add; require formatstring macros since that's
8485 the pickiest.
8486 * lib/.cvsignore: Add inttypes_.h.
8487 * lib/Makefile.am: Include gnulib.mk first so we can append to it.
8488 (AM_CFLAGS): Add WERROR_CFLAGS, to be more like coreutils.
8489 (BUILT_SOURCES, EXTRA_DIST, MOSTLYCLEANFILES): Remove
8490 no-longer-necessary initializations.
8491 (lib_SOURCES): Remove, replacing by libbison_a_SOURCES.
8492 * lib/subpipe.c: Include <unistd.h> unconditionally, now that we
8493 use the unistd module.
8494 * src/system.h: Likewise.
8495 * m4/.cvsignore: Remove *_gl.m4, gnulib.m4, inttypes_h.m4, uintmax_t.m4,
8496 ulonglong.m4. Add gettext.m4, gnulib-cache.m4, gnulib-comp.m4,
8497 gnulib-tool.m4, inttypes-h.m4, inttypes-pri.m4, inttypes.m4.
8498 * src/Makefile.am (DEFS): Remove, since configmake does this for us.
8499 (AM_CPPFLAGS): Remove -I../lib, since Automake does that for us.
8500 * src/system.h: Include inttypes.h unconditionally, now that we
8501 use the inttypes module. Don't bother to include stdint.h, since
8502 inttypes.h now does that for us.
8503 (LOCALEDIR): Remove, now that we use the configmake module.
8504 * src/getargs.c: Include configmake.h.
8505 * src/main.c: Likewise.
8506 * src/output.c: Likewise.
8507 * tests/atlocal.in (CPPFLAGS): Include from $abs_top_builddir/lib,
8508 not from $abs_top_builddir, since config.h moved.
8509
8510
8511 Port to GCC 2.95. First two problems reported by Michael Deutschmann in
8512 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00018.html>.
8513
8514 * src/parse-gram.y (symbol_declaration): Don't put statements
8515 before declarations; it's not portable to C89.
8516 * src/scan-code.l (handle_action_at): Likewise.
8517
8518 * src/scan-code.l: Always initialize braces_level; the old code
8519 left it uninitialized and therefore had undefined behavior.
8520
8521 Don't attempt to redefine 'assert', since it runs afoul of
8522 systems where standard headers (mistakenly) include <assert.h>.
8523 Instead, define and use our own alternative, called 'aver'.
8524 * src/reader.c: Don't include assert.h, since we no longer
8525 use assert.
8526 * src/scan-code.l: Likewise.
8527 * src/system.h (assert): Remove, replacing with....
8528 (aver): New function, taking a bool arg. All uses changed.
8529 * src/tables.c (pack_vector): Ensure that aver arg is bool,
8530 not merely an integer.
8531
8532 2006-09-15 Bob Rossi <bob@brasko.net>
8533
8534 Add support for push parsing. Based on the original work of
8535 Odd Arild Olsen <oao@fibula.no>.
8536 * data/Makefile.am (dist_pkgdata_DATA): Add push.c.
8537 * data/c.m4 (YYPUSH): New.
8538 (b4_push_if): New macro. Use it instead of #ifdef YYPUSH.
8539 * data/push.c: New file.
8540 * src/getargs.c (push_parser): New var.
8541 * src/getargs.h (push_parser): New declaration.
8542 * src/output.c (prepare): Add macro insertion of `push_flag'.
8543 * src/parse-gram.y (PERCENT_PUSH_PARSER): New token.
8544 (prologue_declaration): Parse %push-parser.
8545 * src/scan-gram.l: Scan new PERCENT_PUSH_PARSER token.
8546 * tests/calc.at (_AT_CHECK_CALC_ERROR): Add "Return" and "Now" to
8547 list of removed lines from the traces observed.
8548 (AT_CHECK_CALC_LALR): Added push parser tests.
8549
8550 2006-09-13 Paul Eggert <eggert@cs.ucla.edu>
8551
8552 * NEWS: Version 2.3a.
8553 * configure.ac (AC_INIT): Likewise.
8554
8555 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Remove
8556 "#define YYSTYPE int" that caused "make maintainer-check" to fail
8557 due to header ordering dependencies. I don't know why the #define
8558 was there.
8559
8560 Fix glr.cc and lalr1.cc's use of YYDEBUG so that there's zero
8561 runtime cost when YYDEBUG is not defined, and so that some tests
8562 that used to fail now work. Problem and initial suggestion by
8563 Paolo Bonzini.
8564 * data/c++.m4 (b4_parse_param_cons): Omit leading ','.
8565 * data/glr.cc (b4_parser_class_name):
8566 Initialize yycdebug_ only if YYDEBUG. Also, initialize yydebug_.
8567 (debug_level, set_debug_level): Affect yydebug_, not ::yydebug.
8568 (yydebug_) [YYDEBUG]: New member.
8569 (yycdebug_): Now defined only if YYDEBUG.
8570 * data/lalr1.cc (yydebug_, yycdebug_): Now defined only if YYDEBUG.
8571 (YYCDEBUG) [!YYDEBUG]: Don't use yydebug_ and yycdebug_.
8572 (b4_parser_class_name): Initialize yydebug_ and yycdebug_ only
8573 if YYYDEBUG.
8574 (debug_stream, set_debug_stream, debug_level, set_debug_level):
8575 Define only if YYDEBUG.
8576 * tests/calc.at (_AT_DATA_CALC_Y) [!YYDEBUG]: Omit call to
8577 set_debug_level.
8578 * tests/regression.at (_AT_DATA_DANCER_Y) [!YYDEBUG]: Likewise.
8579 * tests/calc.at (AT_CHECK_CALC_GLR_CC): Uncomment calls to
8580 AT_CHECK_CALC_GLR_CC that are working now.
8581
8582 2006-09-12 Paul Eggert <eggert@cs.ucla.edu>
8583
8584 * data/glr.cc (YYERROR_VERBOSE, YYTOKEN_TABLE): Remove.
8585 We don't need them in glr.cc, and glr.c defines them.
8586 Defining YYERROR_VERBOSE to 0 here breaks glr.c, since glr.c
8587 assumes that defining it to anything is the same as defining
8588 it to 1. Problem reported by Paolo Bonzini.
8589
8590 2006-09-12 Paolo Bonzini <bonzini@gnu.org> (tiny change)
8591
8592 * data/c.m4 (b4_null, b4_case): Define.
8593 * src/output.c (prepare_symbols): Use b4_null.
8594 (user_actions_output): Use b4_case.
8595
8596 2006-09-11 Paul Eggert <eggert@cs.ucla.edu>
8597
8598 * data/glr.c (b4_shared_declarations): Put start-header first,
8599 before any #includes that we generate, so that feature-test
8600 macros work. Problem reported by Michael Deutschmann in
8601 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00004.html>.
8602 * data/lalr1.cc: Likewise.
8603 * doc/bison.texinfo (Prologue): Document that feature-test macros
8604 should be defined before any Bison declarations.
8605 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Put defns
8606 that depend on location.hh after, not before, Bison decls, since
8607 we now include location.hh after the first user prologue.
8608
8609 * doc/bison.texinfo (Calc++ Parser): Fix memory leak reported by
8610 Sander Brandenburg in
8611 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00002.html>.
8612 Also, fix minor white space and comment issues.
8613 (Prologue): Mention that it's better to define feature-test macros
8614 before Bison declarations. Problem reported by Michael Deutschmann.
8615
8616 * README-cvs: Fix typo: "&" should be "&&". Problem reported
8617 by Jim Meyering.
8618 * m4/.cvsignore: Add argmatch.m4. Remove obstack.m4, strerror_r.m4.
8619 This adjusts to recent gnulib changes.
8620
8621 2006-09-04 Joel E. Denny <jdenny@ces.clemson.edu>
8622
8623 Finish implementation of per-type %destructor/%printer. Discussed
8624 starting at
8625 <http://lists.gnu.org/archive/html/bison-patches/2006-02/msg00064.html>
8626 and
8627 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00091.html>.
8628 * NEWS (2.3+): Add a description of this feature to the default
8629 %destructor/%printer description.
8630 * doc/bison.texinfo (Freeing Discarded Symbols): Likewise.
8631 * src/symlist.c (symbol_list_destructor_set, symbol_list_printer_set):
8632 Invoke semantic_type_destructor_set or semantic_type_printer_set when a
8633 list node contains a semantic type.
8634 * src/symtab.c, src/symtab.h: Extend with a table that associates
8635 semantic types with their %destructor's and %printer's.
8636 (semantic_type_from_uniqstr, semantic_type_get,
8637 semantic_type_destructor_set, semantic_type_printer_set): New functions
8638 composing the public interface of that table.
8639 (symbol_destructor_get, symbol_destructor_location_get,
8640 symbol_printer_get, symbol_printer_location_get): If there's no
8641 per-symbol %destructor/%printer, look up the per-type before trying
8642 the default.
8643 * tests/actions.at (Per-type %printer and %destructor): New test case.
8644 * tests/input.at (Default %printer and %destructor redeclared):
8645 Extend to check that multiple occurrences of %symbol-default in a
8646 single %destructor/%printer declaration is an error.
8647 (Per-type %printer and %destructor redeclared, Unused values with
8648 per-type %destructor): New test cases.
8649
8650 2006-09-04 Joel E. Denny <jdenny@ces.clemson.edu>
8651
8652 Require default %destructor/%printer to be declared using
8653 %symbol-default instead of an empty symbol list, and start working on
8654 new per-type %destructor/%printer. Discussed at
8655 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00007.html>.
8656 * NEWS (2.3+): Add %symbol-default to example.
8657 * bison.texinfo (Freeing Discarded Symbols): Likewise.
8658 (Table of Symbols): Add entry for %symbol-default.
8659 * src/parse-gram.y (PERCENT_SYMBOL_DEFAULT): New token.
8660 (generic_symlist, generic_symlist_item): New nonterminals for creating
8661 a list in which each item is a symbol, semantic type, or
8662 %symbol-default.
8663 (grammar_declaration): Use generic_symlist in %destructor and %printer
8664 declarations instead of symbols.1 or an empty list.
8665 (symbol_declaration, precedence_declaration, symbols.1): Update actions
8666 for changes to symbol_list.
8667 * src/reader.c: Update for changes to symbol_list.
8668 * src/scan-code.l: Likewise.
8669 * src/scan-gram.l: Scan new PERCENT_SYMBOL_DEFAULT token.
8670 * src/symlist.c, src/symlist.h: Extend such that a list node may
8671 represent a semantic type or a %symbol-default in addition to just an
8672 ordinary symbol. Add switched functions for setting %destructor's and
8673 %printer's.
8674 * tests/actions.at, tests/input.at: Add %symbol-default to all default
8675 %destructor/%printer declarations.
8676
8677 2006-08-23 Joel E. Denny <jdenny@ces.clemson.edu>
8678
8679 Whether the default %destructor/%printer applies to a particular symbol
8680 isn't a question of whether the user *declares* that symbol (in %token,
8681 for example). It's a question of whether the user by any means
8682 *defines* the symbol at all (by simply using a char token, for
8683 example). $end is defined by Bison whereas any other token with token
8684 number 0 is defined by the user. The error token is always defined by
8685 Bison regardless of whether the user declares it with %token, but we
8686 may one day let the user define error as a nonterminal instead.
8687 * NEWS (2.3+): Say "user-defined" instead of "user-declared".
8688 * doc/bison.texinfo (Freeing Discarded Symbols): Likewise, and document
8689 the meaning of "user-defined".
8690 * tests/actions.at (Default %printer and %destructor for user-declared
8691 end token): Rename to...
8692 (Default %printer and %destructor for user-defined end token): ...
8693 this.
8694
8695 * src/symtab.c (symbol_destructor_get, symbol_printer_get): In the
8696 computation of whether to apply the default, don't maintain a list of
8697 every Bison-defined symbol. Instead, just check for a first character
8698 of '$', which a user symbol cannot have, and check for the error token.
8699
8700 2006-08-21 Joel E. Denny <jdenny@ces.clemson.edu>
8701
8702 Don't apply the default %destructor or %printer to the error token,
8703 $undefined, or $accept. This change fits the general rule that the
8704 default %destructor and %printer are only for user-declared symbols,
8705 and it solves several difficulties that are described in the new test
8706 cases listed below.
8707 * src/symtab.c (symbol_destructor_get, symbol_printer_get): Implement.
8708 * tests/actions.at (Default %printer and %destructor are not for error
8709 or $undefined, Default %printer and %destructor are not for $accept):
8710 New test cases.
8711
8712 2006-08-19 Joel E. Denny <jdenny@ces.clemson.edu>
8713
8714 Allow %start after the first rule.
8715 * src/reader.c (grammar_current_rule_begin): Don't set the start symbol
8716 when parsing the first rule.
8717 (check_and_convert_grammar): Search for it here after all grammar
8718 declarations have been parsed. Skip midrules, which have dummy LHS
8719 nonterminals.
8720 * src/symtab.c (symbol_is_dummy): New function.
8721 * src/symtab.h (symbol_is_dummy): Declare it.
8722 * tests/input.at (%start after first rule): New test.
8723
8724 2006-08-18 Joel E. Denny <jdenny@ces.clemson.edu>
8725
8726 Redo some of the previous commit: add back the ability to use
8727 non-aliased/undeclared string literals since it might be useful to
8728 those declaring %token-table.
8729 * src/reader.c (check_and_convert_grammar): Undo changes in previous
8730 commit: don't worry about complaints from symbols_pack.
8731 * src/symtab.c (symbol_new, symbol_class_set,
8732 symbol_check_alias_consistency): Undo changes in previous commit: count
8733 each string literal as a new symbol and token, assign it a symbol
8734 number, and don't complain about non-aliased string literals.
8735 (symbols_pack): Since symbol_make_alias still does not decrement symbol
8736 and token counts but does still set aliased tokens to the same number,
8737 symbol_pack_processor now leaves empty slots in the symbols array.
8738 Remove those slots.
8739 * tests/regression.at (Undeclared string literal): Remove test case
8740 added in previous commit since non-aliased string literals are allowed
8741 again.
8742 (Characters Escapes, Web2c Actions): Undo changes in previous commit:
8743 remove unnecessary string literal declarations.
8744 * tests/sets.at (Firsts): Likewise.
8745
8746 2006-08-18 Joel E. Denny <jdenny@ces.clemson.edu>
8747
8748 Don't allow an undeclared string literal, but allow a string literal to
8749 be used before its declaration.
8750 * src/reader.c (check_and_convert_grammar): Don't invoke packgram if
8751 symbols_pack complained.
8752 * src/symtab.c (symbol_new): Don't count a string literal as a new
8753 symbol.
8754 (symbol_class_set): Don't count a string literal as a new token, and
8755 don't assign it a symbol number since symbol_make_alias does that.
8756 (symbol_make_alias): It's not necessary to decrement the symbol and
8757 token counts anymore. Don't assume that an alias declaration occurs
8758 before any uses of the identifier or string, and thus don't assert that
8759 one of them has the highest symbol number so far.
8760 (symbol_check_alias_consistency): Complain if there's a string literal
8761 that wasn't declared as an alias.
8762 (symbols_pack): Bail if symbol_check_alias_consistency failed since
8763 symbol_pack asserts that every token has been assigned a symbol number
8764 although undeclared string literals have not.
8765 * tests/regression.at (String alias declared after use, Undeclared
8766 string literal): New test cases.
8767 (Characters Escapes, Web2c Actions): Declare string literals as
8768 aliases.
8769 * tests/sets.at (Firsts): Likewise.
8770
8771 2006-08-14 Joel E. Denny <jdenny@ces.clemson.edu>
8772
8773 In the grammar scanner, STRING_FINISH unclosed constructs and return
8774 them to the parser in order to improve error messages.
8775 * src/scan-gram.l (SC_ESCAPED_STRING, SC_ESCAPED_CHARACTER,
8776 SC_BRACED_CODE, SC_PROLOGUE): Implement.
8777 * tests/input.at (Unclosed constructs): New test case.
8778 * tests/regression.at (Invalid inputs): Update now that unclosed %{ is
8779 seen.
8780
8781 * src/scan-gram.h, src/scan-gram.l (gram_last_braced_code_loc): Remove
8782 unused global.
8783
8784 2006-08-13 Joel E. Denny <jdenny@ces.clemson.edu>
8785
8786 Handle string aliases for character tokens correctly.
8787 * src/symtab.c (symbol_user_token_number_set): If the token has an
8788 alias, check and set its alias's user token number instead of its own,
8789 which is set to indicate the alias. Previously, every occurrence of
8790 the character token in the grammar overwrote that alias indicator with
8791 the character code.
8792 * tests/input.at (String aliases for character tokens): New test.
8793
8794 2006-08-12 Joel E. Denny <jdenny@ces.clemson.edu>
8795
8796 * src/parse-gram.y: Add `%expect 0' so we don't overlook conflicts.
8797
8798 2006-08-11 Paul Eggert <eggert@cs.ucla.edu>
8799
8800 * bootstrap: Put in need-ngettext argument to AM_GNU_GETTEXT,
8801 to prevent failures when building on older platforms.
8802 Check for autopoint failure.
8803 Set XGETTEXT_OPTIONS to values that check for C format strings,
8804 so that translators are warned about them (this also helps
8805 prevent core dumps).
8806
8807 * lib/subpipe.c (create_subpipe): Use new gnulib pipe_safer
8808 function, since it simplifies our code a bit.
8809
8810 * configure.ac (AC_ARG_ENABLE): Use -Wextra -Wno-sign-compare
8811 rather than -W, so we don't get bogus warnings about sign comparisons.
8812 Add -Wpointer-arith, since that warning is useful (it reports code
8813 that does not conform to C89 and that some compilers reject).
8814 * data/c.m4, data/glr.c, data/lalr1.cc, data/yacc.c: Undo latest change,
8815 since it's no longer needed.
8816
8817 2006-08-10 Joel E. Denny <jdenny@ces.clemson.edu>
8818
8819 Clean up scanners a bit.
8820 * src/flex-scanner.h (FLEX_NO_OBSTACK): New macro that blocks obstack
8821 definitions so gcc won't warn when obstack_for_string is unused.
8822 * src/scan-code.l: config.h and system.h are already #include'd by
8823 scan-code-c.c, so get rid of them here.
8824 * src/scan-gram.l: Likewise.
8825 * src/scan-skel.l: Likewise, and use flex-scanner.h without obstack
8826 definitions rather than duplicating the rest of it.
8827 * src/scan-gram-c.c, scan-skel-c.c: #include "system.h".
8828
8829 2006-08-09 Joel E. Denny <jdenny@ces.clemson.edu>
8830
8831 Suppress signed/unsigned comparison warnings for yycheck.
8832 * data/c.m4 (b4_safest_int_type): New macro.
8833 * data/glr.c, data/lalr1.cc: Wherever you compare yycheck[i] against
8834 a signed int type, cast it to b4_safest_int_type first.
8835 * data/yacc.c: Likewise.
8836 (b4_safest_int_type): Overwrite the one from c.m4 since b4_int_type is
8837 also overwritten.
8838
8839 2006-08-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de> (tiny change)
8840
8841 * doc/bison.texinfo: Fix some typos.
8842
8843 2006-08-02 Paul Eggert <eggert@cs.ucla.edu>
8844
8845 * m4/.cvsignore: Add inttypes_h.m4,lib-ld.m4, lib-prefix.m4,
8846 po.m4, stdint_h.m4, uintmax_t.m4, ulonglong.m4, warning.m4.
8847
8848 * bootstrap (gnulib_tool): Stop using --assume-autoconf;
8849 the latest gnulib does this a different way.
8850 (get_translations): Sharuzzaman Ahmat Raslan reported that the ms
8851 translation was patched, so stop omitting it.
8852
8853 2006-07-29 Joel E. Denny <jdenny@ces.clemson.edu>
8854
8855 Enable declaration of default %printer/%destructor. Make the parser
8856 use these for all user-declared grammar symbols for which the user does
8857 not declare a specific %printer/%destructor. Thus, the parser uses it
8858 for token 0 if the user declares it but not if Bison generates it as
8859 $end. Discussed starting at
8860 <http://lists.gnu.org/archive/html/bison-patches/2006-02/msg00064.html>,
8861 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00091.html>,
8862 and
8863 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00019.html>.
8864 * NEWS (2.3+): Mention.
8865 * doc/bison.texinfo (Actions in Mid-Rule): It's no longer impossible to
8866 declare a %destructor for a mid-rule's semantic value. It's just
8867 impossible to declare one specific to it.
8868 (Freeing Discarded Symbols): Mention that @$ can be used in %destructor
8869 code. Describe default %destructor form.
8870 * src/parse-gram.y (grammar_declaration): Parse default
8871 %printer/%destructor declarations.
8872 * src/output.c (symbol_destructors_output): Use symbol_destructor_get
8873 and symbol_destructor_location_get rather than accessing the destructor
8874 and destructor_location members of struct symbol.
8875 (symbol_printers_output): Likewise but for %printer's.
8876 * src/reader.c (symbol_should_be_used): Likewise but for %destructor's
8877 again.
8878 * src/symtab.c (default_destructor, default_destructor_location,
8879 default_printer, default_printer_location): New static global
8880 variables to record the default %destructor and %printer.
8881 (symbol_destructor_get, symbol_destructor_location_get,
8882 symbol_printer_get, symbol_printer_location_get): New functions to
8883 compute the appropriate %destructor and %printer for a symbol.
8884 (default_destructor_set, default_printer_set): New functions to set the
8885 default %destructor and %printer.
8886 * src/symtab.h: Prototype all those new functions.
8887 * tests/actions.at (Default %printer and %destructor): New test to
8888 check that the right %printer and %destructor are called, that they're
8889 not called for $end, and that $$ and @$ work correctly.
8890 (Default %printer and %destructor for user-declared end token): New
8891 test to check that the default %printer and %destructor are called for
8892 a user-declared end token.
8893 * tests/input.at (Default %printer and %destructor redeclared, Unused
8894 values with default %destructor): New tests to check related grammar
8895 warnings and errors.
8896
8897 2006-07-29 Joel E. Denny <jdenny@ces.clemson.edu>
8898
8899 Clean up handling of %destructor for the end token (token 0).
8900 Discussed starting at
8901 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00019.html>
8902 and
8903 <http://lists.gnu.org/archive/html/help-bison/2006-07/msg00013.html>.
8904
8905 Make the skeletons consistent in how they pop the end token and invoke
8906 its %destructor.
8907 * data/glr.c (yyrecoverSyntaxError, yyparse): Don't pop the start
8908 state, which has token number 0, since this would invoke the
8909 %destructor for the end token.
8910 * data/lalr1.cc (yy::parser::parse): Don't check for the final state
8911 until after shifting the end token, or else it won't be popped.
8912 * data/yacc.c (yyparse): Likewise.
8913
8914 * data/glr.c (yyparse): Clear the lookahead after shifting it even when
8915 it's the end token. Upon termination, destroy an unshifted lookahead
8916 even when it's the end token.
8917 * data/lalr1.cc (yy::parser::parse): Likewise.
8918 * data/yacc.c (yyparse): Likewise.
8919
8920 * src/reader.c (packgram): Don't check rule 0. This suppresses unused
8921 value warnings for the end token when the user gives the end token a
8922 %destructor.
8923
8924 * tests/actions.at (Printers and Destructors): Test all the above.
8925
8926 2006-07-24 Paul Eggert <eggert@cs.ucla.edu>
8927
8928 Update to latest gnulib and gettext versions.
8929 * bootstrap (gnulib-modules): Remove hard-locale, stdio-safer.
8930 Add fopen-safer.
8931 (gnulib_files): Add m4/warning.m4. Don't worry about files
8932 overwritten by autopoint.
8933 Replace gt_INTL_SUBDIR_CORE with an empty body in m4/gettext_gl.m4.
8934 Suppress "id", "ms", "tr" translations for now, since gettext 0.15
8935 rejects them.
8936 Don't use autoreconf; instead, invoke autopoint etc. by hand,
8937 so that we can remove the intl files at a better time.
8938 (intl_files_to_remove): Remove aclocal.m4, since it gets
8939 rebuilt anyway. Remove m4/inttypes_h.m4, m4/inttypes.m4,
8940 m4/isc-posix.m4, m4/lib-ld.m4, m4/lib-prefix.m4, m4/po.m4,
8941 m4/stdint_h.m4, m4/uintmax_t.m4, m4/ulonglong.m4.
8942 Add m4/inttypes-h.m4, m4/lock.m4, m4/visibility.m4.
8943 Remove datarootdir hack; no longer needed.
8944 * configure.ac: Use gl_WARNING_CFLAGS rather than BISON_WARNING.
8945 (AM_GNU_GETTEXT_VERSION): Bump from 0.12 to 0.15.
8946 * lib/.cvsignore: Remove hard-locale.c, hard-locale.h, strdup.c,
8947 strdup.h.
8948 * m4/.cvsignore: Remove hard-locale.m4, strdup.m4.
8949 * m4/warning.m4: Remove from CVS, since we now use gnulib's version.
8950
8951 2006-07-20 Paul Eggert <eggert@cs.ucla.edu>
8952
8953 * bootstrap: Adjust to today's change to gnulib-tool by invoking
8954 it with --assume-autoconf='latest-stable'.
8955
8956 2006-07-13 Joel E. Denny <jdenny@ces.clemson.edu>
8957
8958 * src/parse-gram.y (grammar_declaration): Don't confuse Doxygen (at
8959 least 1.4.7 and 1.4.4) by putting a #line between `typedef union
8960 YYSTYPE' and `{'.
8961 * src/muscle_tab.h (muscle_grow): Replace the header comments with
8962 those from muscle_tab.c since the old ones are misleading.
8963
8964 2006-07-13 Akim Demaille <akim@epita.fr>
8965
8966 Support %define "KEY" {VALUE}.
8967 * src/scan-code.h, src/scan-code.l (translate_action)
8968 (translate_rule_action, translate_symbol_action, translate_code):
8969 Return char *, not const char *.
8970 * src/parse-gram.y (declaration): Rename as...
8971 (prologue_declaration): this.
8972 (string_content): Remove this nonterminal, use STRING.
8973 (braceless, content, content.opt): New nonterminal.
8974 Use them.
8975 (%define): Now accept content.opt, i.e., accept also BRACED_CODE
8976 as value.
8977 * src/scan-gram.l (getargs.h): Don't include it.
8978
8979 2006-07-12 Paul Eggert <eggert@cs.ucla.edu>
8980
8981 * data/lalr1.cc (YYCDEBUG): Use 'if (yydebug_) (*yycdebug_)'
8982 rather than a for-loop that declares a local bool variable. This
8983 should work around a compatibility problem with a Cray x1e C++
8984 compiler reported by Hung Nguyen in
8985 <http://lists.gnu.org/archive/html/help-bison/2006-07/msg00022.html>.
8986 The for-loop was introduced in the 2004-11-17 change but I don't
8987 know why it was needed.
8988
8989 2006-07-12 Akim Demaille <akim@epita.fr>
8990
8991 * data/c.m4: Comment changes.
8992
8993 2006-07-10 Akim Demaille <akim@lrde.epita.fr>
8994
8995 * src/complain.c (error_message, ERROR_MESSAGE): New.
8996 To factor...
8997 (fatal_at, fatal, warn_at, warn, complain_at, complain): these.
8998 * src/complain.h, src/complain.c (warning_issued): Remove, unused.
8999
9000 2006-07-09 Paul Eggert <eggert@cs.ucla.edu>
9001
9002 * NEWS: Instead of %union, you can define and use your own union type
9003 YYSTYPE if your grammar contains at least one <type> tag.
9004 Your YYSTYPE need not be a macro; it can be a typedef.
9005 * doc/bison.texinfo (Value Type, Multiple Types, Location Type):
9006 (Union Decl, Decl Summary): Document this.
9007 * data/glr.c (YYSTYPE): Implement this.
9008 * data/glr.cc (YYSTYPE): Likewise.
9009 * data/lalr1.cc (YYSTYPE): Likewise.
9010 * data/yacc.c (YYSTYPE): Likewise.
9011 * src/output.c (prepare): Output tag_seen_flag.
9012 * src/parse-gram.y (declaration, grammar_declaration):
9013 Use 'union_seen' rather than 'typed' to determine whether
9014 %union has been seen, since grammars can now be typed without
9015 %union.
9016 (symbol_declaration, type.opt, symbol_def):
9017 Keep track of whether a tag has been seen.
9018 * src/reader.c (union_seen, tag_seen): New vars.
9019 (typed): remove.
9020 * src/reader.h (union_seen, tag_seen, typed): Likewise.
9021 * src/scan-code.l (untyped_var_seen): New variable.
9022 (handle_action_dollar): Adjust to above changes.
9023 (handle_action_dollar, handle_action_at):
9024 Improve overflow checking for outlandish numbers.
9025 * tests/input.at (AT_CHECK_UNUSED_VALUES): Redo test to
9026 avoid new diagnostics generated by above changes.
9027 * tests/regression.at (YYSTYPE typedef): Add test to check
9028 for type tags without %union.
9029
9030 * src/symlist.c (symbol_list_length): Return int, not unsigned
9031 int, since callers expect int. This may need to get revisited
9032 once we have proper integer overflow checking.
9033
9034 * src/scan-gram.h (gram_scanner_cursor): Remove decl, since this
9035 object is now static.
9036
9037 * src/getargs.c (flags_argmatch): Return void, not int,
9038 to pacify ./configure --enable-gcc-warnings.
9039
9040 * src/flex-scanner.h (STRING_FREE): Don't use FLEX_PREFIX (last_string)
9041 since last_string is already defined to FLEX_PREFIX (last_string).
9042
9043 2006-07-09 Akim Demaille <akim@lrde.epita.fr>
9044
9045 Implement --warnings/-W.
9046 * src/getargs.c (report_argmatch, trace_argmatch): Remove,
9047 replaced by...
9048 (flags_argmatch, FLAGS_ARGMATCH): this new function and macro.
9049 Adjust callers.
9050 * src/getargs.h, src/getargs.c (warnings, warnings_flags)
9051 (warnings_args, warnings_types): New.
9052 (getargs, short_options, long_options): Accept -W/--warnings.
9053 Sort the options by alphabetical order, upper case letter right
9054 before its lower case.
9055
9056 2006-07-09 Joel E. Denny <jdenny@ces.clemson.edu>
9057
9058 Change %merge result type clash warnings to errors. Discussed at
9059 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00026.html>.
9060 * src/reader.c (record_merge_function_type): Use complain_at.
9061 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
9062 declared later): Update test case results.
9063
9064 2006-07-09 Akim Demaille <akim@lrde.epita.fr>
9065
9066 * src/getargs.h, src/getargs.c: Swap --report and --trace handling
9067 to be in alphabetical order.
9068 (trace_args): Spelling fixes.
9069
9070 2006-07-09 Paul Eggert <eggert@cs.ucla.edu>
9071
9072 * data/yacc.c (YYID, yy_stack_print): Prefix local vars with "yy"
9073 so they don't collide with user-defined macros.
9074 (yy_stack_print): Don't assume that yytype_int16 promotes to int;
9075 this was never guaranteed, and now that we're using gnulib stdint,
9076 which defines int_fast16_t to long int, the problem is exposed.
9077
9078 2006-07-08 Paul Eggert <eggert@cs.ucla.edu>
9079
9080 * data/c.m4 (b4_basename): Simplify a bit, since we don't
9081 need the full POSIX semantics (and weren't implementing them
9082 anyway).
9083
9084 Adjust to Autoconf 2.60 and today's gnulib.
9085 * bootstrap (gnulib_modules): Add stdint.
9086 Remove special case for m4/onceonly_2_57.m4, since gnulib-tool
9087 no longer copies it.
9088 (intl_files_to_remove): Remove m4/longlong.m4 and m4/wchar_t.m4,
9089 since stdint needs the former and wcwidth (which is now required
9090 by mbswidth) needs the latter.
9091 Append 'datarootdir = @datarootdir@' to po/Makefile.in.in, to
9092 work around a compatibility glitch between gettext 0.14.6 and
9093 Autoconf 2.60.
9094 * configure.ac (AC_PREREQ): Require Autoconf 2.60.
9095 Do not check for uintptr_t, since new stdint module does the right
9096 thing.
9097 * lib/.cvsignore: Remove alloca.c, alloca.h, alloca_.h.
9098 Add stdint.h, stdint_.h, wcwidth.h.
9099 * m4/.cvsignore: Remove alloca.m4, onceonly.m4.
9100 Add absolute-header.m4, double-slash-root.m4, longlong.m4,
9101 stdint.m4, wchar_t.m4, wcwidth.m4.
9102 * src/files.c: Include <dirname.h> and <stdio-safer.h> in the
9103 usual order for ../lib/*.h files.
9104 (file_name_split): Use last_component, not base_name, to adjust
9105 to gnulib changes.
9106 * src/parse-gram.h: Include <strverscmp.h> in the usual order
9107 for ../lib/*.h files.
9108 (YYTYPE_INT16, YYTYPE_INT8, YYTYPE_UINT16, YYTYPE_UINT8):
9109 Define unconditionally, since we now assume the stdint module.
9110 * src/scan-skel.l: Include <dirname.h>.
9111 (BASE_QPUTS): Use last_component, not base_name.
9112 * src/system.h: Include <unlocked-io.h> in the usual order
9113 for ../lib/*.h files. Include <stdint.h> unconditionally,
9114 since we now use the stdint module.
9115 (uintptr_t): Declare if UINTPTR_MAX is not defined, not
9116 HAVE_UINTPTR_T, since we now use the stdint module.
9117 (base_name): Remove decl, since files now include <dirname.h>
9118 to get the decl.
9119
9120 2006-07-08 Akim Demaille <akim@lrde.epita.fr>
9121
9122 * data/c.m4 (b4_location_initial_column, b4_location_initial_line):
9123 New, default to 1.
9124 * data/yacc.c, data/glr.c, data/location.cc: Use them.
9125 * NEWS, doc/bison.texinfo: The initial column and line are 1 by
9126 default.
9127 * tests/calc.at: Adjust.
9128
9129 2006-07-08 Akim Demaille <akim@lrde.epita.fr>
9130
9131 * data/c.m4 (b4_basename): New.
9132 (b4_syncline): Also output the location of its invocation (from
9133 the skeleton).
9134 (b4_user_action, b4_define_user_action, b4_user_actions)
9135 (b4_user_initial_action, b4_user_post_prologue, b4_user_start_header)
9136 (b4_user_stype): New.
9137 * data/yacc.c, data/glr.c, data/lalr1.cc, data/glr.cc: Use them.
9138
9139 2006-07-07 Joel E. Denny <jdenny@ces.clemson.edu>
9140
9141 In the grammar file, the first column is 1 not 0 on the first line as
9142 on every other line.
9143 * src/parse-gram.y (%initial-action): Initialize @$ correctly.
9144 * tests/input.at (Torturing the Scanner): Update output.
9145
9146 * src/scan-gram.l (scanner_cursor): Declare it static.
9147
9148 2006-07-07 Joel E. Denny <jdenny@ces.clemson.edu>
9149
9150 In warnings, say "previous declaration" rather than "first
9151 declaration".
9152 * src/symtab.c (redeclaration): Do that here.
9153 * src/reader.c (record_merge_function_type): In the case of a result
9154 type clash, report the previous declaration rather than the very first
9155 one in the grammar file.
9156 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
9157 declared later): Add a third declaration to check this behavior.
9158 * tests/input.at (Incompatible Aliases): Update output.
9159
9160 2006-06-27 Akim Demaille <akim@epita.fr>
9161
9162 * doc/Doxyfile.in: New.
9163 * doc/Makefile.am: Use it.
9164 * src/lalr.h, src/symtab.h: Initial doxygenation.
9165
9166 2006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
9167
9168 Don't miss %merge result type warnings just because the LHS types are
9169 declared after the %merge. This continues the effort of the previous
9170 patch.
9171 * src/reader.c (get_merge_function): Don't set the merger type yet.
9172 (record_merge_function_type): New function for setting the merger type
9173 and checking for clashes.
9174 (grammar_current_rule_merge_set): Set the location of the %merge for
9175 the current rule.
9176 (packgram): Invoke record_merge_function_type for each rule now that
9177 all symbol type declarations have been parsed.
9178 * src/reader.h (merger_list.type_declaration_location): New member
9179 storing the location of the first %merge from which the type for this
9180 merging function was derived.
9181 * src/symlist.h (symbol_list.merger_declaration_location): New member
9182 storing the location of a rule's %merge, if any.
9183 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
9184 declared later): New test to catch the error fixed by the above patch.
9185
9186 2006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
9187
9188 Get action warnings (grammar_rule_check) right even when symbol
9189 declarations appear after the rules. Discussed at
9190 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00108.html>
9191 and
9192 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00151.html>.
9193 Don't mistake the type of $$ in a midrule to be that of its parent
9194 rule's $$.
9195 * src/reader.c (grammar_current_rule_end): Don't invoke
9196 grammar_rule_check yet since not all symbol declarations may have been
9197 parsed yet.
9198 (grammar_midrule_action): Likewise.
9199 Don't record whether the midrule's $$ has been used yet since actions
9200 haven't been translated yet.
9201 Record the midrule's parent rule and its RHS index within the parent
9202 rule.
9203 (grammar_current_rule_action_append): Don't translate the action yet
9204 since not all symbol declarations may have been parsed yet and, thus,
9205 warnings about types for $$, $n, @$, and @n can't be reported yet.
9206 (packgram): Translate the action and invoke grammar_rule_check now that
9207 all symbol declarations have been parsed.
9208 * src/scan-code.l (handle_action_dollar): Now that this is invoked
9209 after parsing the entire grammar file, the symbol list here in the case
9210 of a midrule is actually the midrule's empty RHS, so reference its
9211 parent rule's RHS where necessary.
9212 On the other hand, now that you can already know it's a midrule, you
9213 aren't forced to think $$ has the same type as its parent rule's $$.
9214 (handle_action_at): In the case of a midrule, reference the parent rule
9215 where necessary.
9216 * src/symlist.c (symbol_list_new): Initialize new midrule-related
9217 members.
9218 (symbol_list_length): Now that this is invoked after all rules have
9219 been parsed, a NULL symbol (rather than a NULL symbol list node)
9220 terminates a rule. symbol_list_print already does this correctly.
9221 * src/symlist.h (symbol_list.midrule_parent_rule,
9222 symbol_list.midrule_parent_rhs_index): New members so that midrules can
9223 remember their relationships with their parents.
9224 * tests/input.at (Type Clashes): Extend to catch the midrule $$ error
9225 fixed by the above patch.
9226 (_AT_UNUSED_VALUES_DECLARATIONS, AT_CHECK_UNUSED_VALUES): New m4 macros
9227 implementing...
9228 (Unused values): ... this old test case and...
9229 (Unused values before symbol declarations): ... this new test case.
9230 This one is the same as `Unused values' except that all symbol
9231 declarations appear after the rules in order to catch the rest of the
9232 errors fixed by the above patch.
9233
9234 2006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
9235
9236 More cleanup.
9237 * src/reader.c (current_rule): Declare it static since it's no longer
9238 used outside this file.
9239 (grammar_current_rule_action_append): Remove redundant arguments from
9240 translate_rule_action invocation.
9241 * src/reader.h (current_rule): Remove this unused extern.
9242 * src/scan-code.h (translate_rule_action): Remove redundant arguments.
9243 * src/scan-code.l (translate_rule_action): Likewise.
9244
9245 2006-06-25 Joel E. Denny <jdenny@ces.clemson.edu>
9246
9247 Clean up yesterday's patch.
9248 * parse-gram.y (rhs): Move grammar_midrule_action invocation from here
9249 to...
9250 * src/reader.c (grammar_current_rule_action_append): ... here for
9251 consistency with grammar_current_rule_symbol_append.
9252 * tests/regression.at (Braced code in declaration in rules section):
9253 Make yyerror and yylex static as usual.
9254
9255 2006-06-24 Joel E. Denny <jdenny@ces.clemson.edu>
9256
9257 Fix bug that mistakes braced code in a declaration in the rules section
9258 to be a rule action. Mentioned at
9259 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00105.html>.
9260 * src/scan-gram.l: Move midrule action detection from the start of the
9261 scanning of any braced code to...
9262 * src/parse-gram.y (rhs): ... the parsing of braced code as a rule
9263 action. For readability, use $2 and @2 rather than the equivalent
9264 global variables.
9265 * tests/regression.at (Braced code in declaration in rules section):
9266 New test to catch the error fixed by the above patch.
9267
9268 Work on code readability some.
9269 * src/scan-code.l (current_rule): Get rid of this misleading and
9270 redundant declaration: it's actually extern'ed in reader.h.
9271 (YY_DECL, code_lex, handle_action_dollar, handle_action_at,
9272 translate_action): Add a rule argument and use it instead of the global
9273 current_rule.
9274 (translate_rule_action): This already receives current_rule through an
9275 argument, so pass it on to translate_action instead of assigning
9276 current_rule to current_rule.
9277 (translate_symbol_action, translate_code): Pass rule = NULL to
9278 translate_action.
9279
9280 2006-06-23 Joel E. Denny <jdenny@ces.clemson.edu>
9281
9282 Rename %before-definitions to %start-header and %after-definitions to
9283 %end-header. Don't use these declarations to separate pre-prologue
9284 blocks from post-prologue blocks. Add new order-independent
9285 declarations %before-header and %after-header as alternatives to the
9286 traditional Yacc pre-prologue and post-prologue blocks. Discussed at
9287 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00110.html>.
9288 * NEWS (2.3+): Update for these changes.
9289 * data/glr.c (b4_before_definitions): Update to...
9290 (b4_start_header): ... this.
9291 (b4_after_definitions): Update to...
9292 (b4_end_header): ... this.
9293 * data/glr.cc: Likewise.
9294 * data/lalr1.cc: Likewise.
9295 * data/yacc.c: Likewise.
9296 * doc/bison.texinfo (The prologue): Update names, and replace remaining
9297 prologue blocks with %*-header declarations.
9298 (Calc++ Parser): Likewise.
9299 (Decl Summary): Update names.
9300 (Table of Symbols): Update description.
9301 * src/parse-gram.y (PERCENT_AFTER_DEFINITIONS): Update to...
9302 (PERCENT_END_HEADER): ... this.
9303 (PERCENT_BEFORE_DEFINITIONS): Update to...
9304 (PERCENT_START_HEADER): ... this.
9305 (PERCENT_AFTER_HEADER, PERCENT_BEFORE_HEADER): New tokens.
9306 (declaration): Update token names and m4 macro names.
9307 When parsing %end-header and %start-header, invoke translate_code
9308 before muscle_code_grow, and no longer set global booleans to remember
9309 whether these declarations have been seen.
9310 Parse new %after-header and %before-header.
9311 * src/reader.c (before_definitions, after_definitions): Remove.
9312 (prologue_augment): Accept a new bool argument to specify whether to
9313 augment the pre-prologue or post-prologue.
9314 * src/reader.h (before_definitions, after_definitions): Remove these
9315 extern's.
9316 (prologue_augment): Add new bool argument.
9317 * src/scan-gram.l (PERCENT_AFTER_DEFINITIONS): Update to...
9318 (PERCENT_END_HEADER): ... this.
9319 (PERCENT_BEFORE_DEFINITIONS): Update to...
9320 (PERCENT_START_HEADER): ... this.
9321 (PERCENT_AFTER_HEADER, PERCENT_BEFORE_HEADER): New tokens.
9322 * tests/actions.at (Printers and Destructors): Update names.
9323
9324 2006-06-22 Joel E. Denny <jdenny@ces.clemson.edu>
9325
9326 Add comparison operators for C++ location classes. Discussed at
9327 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00092.html>.
9328 * data/c++.m4 (b4_define_location_comparison): New boolean %define
9329 declaration indicating whether filename_type has an operator==. If
9330 filename_type is `std::string', it defaults to `1', `0' otherwise.
9331 * data/location.cc: Iff b4_define_location_comparison is `1', add
9332 operator== and operator!= for class position and for class location.
9333
9334 Some minor fixes.
9335 * src/scan-action.l: Remove unused file.
9336 * src/symtab.c (symbol_printer_set): Use printer_location not
9337 destructor_location.
9338 * src/symtab.h (struct symbol): Replace incorrect source comment for
9339 printer members.
9340 * tests/input.at (Incompatible Aliases): Update output with correct
9341 printer location.
9342
9343 2006-06-20 Joel E. Denny <jdenny@ces.clemson.edu>
9344
9345 Don't put the pre-prologue in the header file. For the yacc.c code
9346 file and the glr.c header and code files, move the pre-prologue before
9347 the token definitions. Add new %before-definitions and
9348 %after-definitions to declare code that will go in both the header file
9349 and code file. Discussed at
9350 <http://lists.gnu.org/archive/html/bison-patches/2005-12/msg00000.html>,
9351 <http://lists.gnu.org/archive/html/bison-patches/2006-01/msg00016.html>,
9352 and
9353 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00055.html>.
9354 * NEWS (2.3+): Describe these changes.
9355 * data/glr.c (b4_pre_prologue): Move from within to before...
9356 (b4_shared_declarations): ... this.
9357 Add new b4_before_definitions before b4_token_enums.
9358 Add new b4_after_definitions at the end.
9359 * data/glr.cc (b4_pre_prologue): Replace with...
9360 (b4_before_definitions): ... this in the header file.
9361 (b4_after_definitions): New near the end of the header file.
9362 * data/lalr1.cc (b4_pre_prologue): Move from the header file to the
9363 code file right before including the header file.
9364 (b4_before_definitions): New in the previous position of
9365 b4_pre_prologue in the header file.
9366 (b4_after_definitions): New near the end of the header file.
9367 * data/yacc.c: Clean up some m4 quoting especially in the header file.
9368 (b4_token_enums_defines): In the code file, move to right before
9369 YYSTYPE for consistency with the header file.
9370 (b4_before_definitions): New right before b4_token_enums_defines in
9371 both the header and code file.
9372 (b4_after_definitions): New right after YYLTYPE and yylloc in both the
9373 header and code file.
9374 * doc/bison.texinfo (Prologue): Show use of %before-definitions instead
9375 of prologues for %union dependencies.
9376 (Decl Summary): In %defines description, mention the effect of
9377 %before-definitions and %after-definitions on the header file.
9378 (Calc++ Parser): Forward declare driver in a %before-definitions rather
9379 than in the pre-prologue so that make check succeeds.
9380 (Table of Symbols): Add entries for %before-definitions and
9381 %after-definitions.
9382 * src/parse-gram.y (PERCENT_BEFORE_DEFINITIONS): New token for
9383 %before-definitions.
9384 (PERCENT_AFTER_DEFINITIONS): New token for %after-definitions.
9385 (declaration): Parse those declarations and append to
9386 b4_before_definitions and b4_after_definitions, respectively.
9387 * src/reader.c (before_definitions, after_definitions): New bools to
9388 track whether those declarations have been seen.
9389 (prologue_augment): Add to the post-prologue if %union,
9390 %before-definitions, or %after-definitions has been seen.
9391 * src/reader.h (before_definitions, after_definitions): New extern's.
9392 * src/scan-gram.l: Scan the new declarations.
9393 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Place the second
9394 prologue block in a %before-definitions or a %after-definitions based
9395 on whether the %union is declared.
9396 * tests/regression.at (Early token definitions with --yacc, Early token
9397 definitions without --yacc): Move tests for token definitions into the
9398 post-prologue since token names are no longer defined in the
9399 pre-prologue.
9400
9401 2006-06-20 Akim Demaille <akim@epita.fr>
9402
9403 * src/symtab.h, src/symtab.c (symbol_from_uniqstr): New.
9404 (symbol_get): Use it.
9405 * src/parse-gram.y: Use it.
9406
9407 2006-06-19 Joel E. Denny <jdenny@ces.clemson.edu>
9408
9409 * src/scan-gram.l: Remove unused declaration of last_string_1 so the
9410 build succeeds when configured with --enable-gcc-warnings.
9411
9412 2006-06-19 Paul Eggert <eggert@cs.ucla.edu>
9413
9414 * src/parse-gram.y (char_name): New function.
9415 (CHAR, STRING, string_content): For %printer, properly escape.
9416 (ID): Prefer fputs to fprintf.
9417 (id): Reindent to be consistent with other rules.
9418 Properly quote char.
9419
9420 The Translation Project changed its way of publishing translations
9421 to maintainers. I haven't received any responses to my request
9422 for supporting the old way, or for documenting the new way. I
9423 have modified 'bootstrap' to use screen scraping
9424 (in this case, HTML scraping). This is unreliable and inelegant,
9425 but I don't see any better way. Yuck.
9426 * bootstrap (TP_URL, WGET_COMMAND): New vars.
9427 (get_translations): New function, which uses HTML scraping to
9428 deduce locations of latest translations.
9429 Use this function to grab both bison and bison-runtime .po files.
9430 Don't bother priming the pump for the runtime-po domain any more,
9431 as it's now translated better than bison is.
9432
9433 2006-06-19 Akim Demaille <akim@epita.fr>
9434
9435 * src/scan-gram.l: No longer "parse" things after `%union' until
9436 `{'. Rather, return a single "%union" token.
9437 No longer make symbols: return strings, and leave the conversion
9438 to symbols to the parser.
9439 (SC_PRE_CODE, token_type): Remove.
9440 * src/parse-gram.y (%union): New field `character'.
9441 Sort tokens.
9442 (CHAR): New token.
9443 (ID, ID_COLON): Now that the scanner no longer makes them
9444 identifiers, adjust all uses to invoke symbol_get.
9445 (id_colon): New, wraps the conversion from string to symbol.
9446 (%union): Accept a possible union_name.
9447 (symbol): Now can be a char.
9448 * data/c.m4 (b4_union_name): Leave a default value.
9449 * data/glr.c, data/yacc.c: Use it.
9450
9451 2006-06-11 Joel E. Denny <jdenny@ces.clemson.edu>
9452
9453 For associating token numbers with token names for "yacc.c", don't use
9454 #define statements unless `--yacc' is specified; always use enum
9455 yytokentype. Most important discussions start at:
9456 <http://lists.gnu.org/archive/html/bison-patches/2005-09/msg00053.html>,
9457 <http://lists.gnu.org/archive/html/bison-patches/2005-12/msg00052.html>,
9458 and
9459 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00043.html>.
9460 * NEWS (2.3+): Mention.
9461 * data/c.m4 (b4_yacc_if): New.
9462 (b4_token_enums_defines): Use b4_yacc_if to decide whether to add the
9463 token #define's.
9464 * doc/bison.texinfo (Bison Options): Describe the effect of `--yacc'
9465 on token name definitions.
9466 * src/getargs.c (usage): Capitalize `Yacc' in English.
9467 * src/output.c (prepare): Define b4_yacc_flag.
9468 * tests/regression.at (Early token definitions): Test that tokens names
9469 are defined before the pre-prologue not just before the post-prologue.
9470 Remove this test case and copy to...
9471 (Early token definitions with --yacc): ... this to test #define's.
9472 (Early token definitions without --yacc): ... and this to test enums.
9473
9474 2006-06-11 Paul Eggert <eggert@cs.ucla.edu>
9475
9476 * NEWS: Reword the post-2.3 change to not be so optimistic about
9477 removing the old "look-ahead" spelling.
9478 Update previous look-ahead/lookahead change reports.
9479 * REFERENCES: look-ahead -> lookahead (since that's
9480 what he actually wrote).
9481 * doc/refcard.tex: look ahead -> lookahead,
9482 look-ahead -> lookahead
9483
9484 2006-06-09 Joel E. Denny <jdenny@ces.clemson.edu>
9485
9486 For consistency, use `lookahead' instead of `look-ahead' or
9487 `look_ahead'. Discussed starting at
9488 <http://lists.gnu.org/archive/html/bison-patches/2006-01/msg00049.html>
9489 and then at
9490 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00017.html>.
9491 * NEWS: For the next release, note the change to `--report'.
9492 * TODO, doc/bison.1: Update English.
9493 * doc/bison.texinfo: Update English.
9494 (Understanding Your Parser, Bison Options): Document as
9495 `--report=lookahead' rather than `--report=look-ahead'.
9496 * src/conflicts.c: Update English in comments.
9497 (lookahead_set): Rename from look_ahead_set.
9498 (flush_reduce): Rename argument look_ahead_tokens to lookahead_tokens.
9499 (resolve_sr_conflict): Rename local look_ahead_tokens to
9500 lookahead_tokens, and update other uses.
9501 (flush_shift, set_conflicts, conflicts_solve, count_sr_conflicts,
9502 count_rr_conflicts, conflicts_free): Update uses.
9503 * src/getargs.c (report_args): Move "lookahead" before alternate
9504 spellings.
9505 (report_types): Update uses.
9506 (usage): For `--report' usage description, state `lookahead' spelling
9507 rather than `look-ahead'.
9508 * src/getargs.h (report.report_lookahead_tokens): Rename from
9509 report_look_ahead_tokens.
9510 * src/lalr.c: Update English in comments.
9511 (compute_lookahead_tokens): Rename from compute_look_ahead_tokens.
9512 (state_lookahead_tokens_count): Rename from
9513 state_look_ahead_tokens_count.
9514 Rename local n_look_ahead_tokens to n_lookahead_tokens.
9515 (lookahead_tokens_print): Rename from look_ahead_tokens_print.
9516 Rename local n_look_ahead_tokens to n_lookahead_tokens.
9517 Update other uses.
9518 Update English in output.
9519 (add_lookback_edge, initialize_LA, lalr, lalr_free): Update uses.
9520 * src/print.c: Update English in comments.
9521 (lookahead_set): Rename from look_ahead_set.
9522 (print_reduction): Rename argument lookahead_token from
9523 look_ahead_token.
9524 (print_core, state_default_rule, print_reductions, print_results):
9525 Update uses.
9526 * src/print_graph.c: Update English in comments.
9527 (print_core): Update uses.
9528 * src/state.c: Update English in comments.
9529 (reductions_new): Update uses.
9530 (state_rule_lookahead_tokens_print): Rename from
9531 state_rule_look_ahead_tokens_print, and update other uses.
9532 * src/state.h: Update English in comments.
9533 (reductions.lookahead_tokens): Rename from look_ahead_tokens.
9534 (state_rule_lookahead_tokens_print): Rename from
9535 state_rule_look_ahead_tokens_print.
9536 * src/tables.c: Update English in comments.
9537 (conflict_row, action_row): Update uses.
9538 * tests/glr-regression.at
9539 (Incorrect lookahead during deterministic GLR,
9540 Incorrect lookahead during nondeterministic GLR): Rename
9541 print_look_ahead to print_lookahead.
9542 * tests/torture.at: Update English in comments.
9543 (AT_DATA_LOOKAHEAD_TOKENS_GRAMMAR): Rename from
9544 AT_DATA_LOOK_AHEAD_TOKENS_GRAMMAR.
9545 (Many lookahead tokens): Update uses.
9546 * data/glr.c: Update English in comments.
9547 * lalr1.cc: Likewise.
9548 * yacc.c: Likewise.
9549 * src/conflicts.h: Likewise.
9550 * src/lalr.h: Likewise.
9551 * src/main.c: Likewise.
9552 * src/output.c: Likewise.
9553 * src/parse-gram.c: Likewise.
9554 * src/tables.h: Likewise.
9555 * tests/calc.at: Likewise.
9556
9557 2006-06-08 Joel E. Denny <jdenny@ces.clemson.edu>
9558
9559 * src/flex-scanner.h (yytext): Remove stray `*/' in #define.
9560
9561 2006-06-07 Paul Eggert <eggert@cs.ucla.edu>
9562
9563 * TODO: Add request from Nelson H. F. Beebe to be able to install
9564 Bison without installing the yacc script.
9565
9566 2006-06-07 Joel E. Denny <jdenny@ces.clemson.edu>
9567
9568 * src/flex-scanner.h: For the sake of Flex 2.5.4, don't #define yyleng
9569 and yytext if they're already #define'd.
9570 * src/flex-scanner.h, src/location.h: Move #include "system.h" to...
9571 * src/scan-code-c.c: ... here.
9572 * src/scan-code.l, src/scan-gram.l: ... and here. Also #include
9573 <config.h>.
9574
9575 2006-06-07 Joel E. Denny <jdenny@ces.clemson.edu>
9576
9577 Get Bison to build again when configured with --enable-gcc-warnings.
9578 * src/location.c, src/location.h, src/main.c, src/scan-code.l: Add some
9579 missing #include's.
9580 * src/scan-code.l (handle_action_dollar, handle_action_at): Rename
9581 loc argument as it shadows a global.
9582 * src/scan-gram.l: Remove stray comma that prevents boundary_set
9583 invocation.
9584
9585 * src/.cvsignore: Add scan-code.c.
9586
9587 2006-06-07 Akim Demaille <akim@epita.fr>
9588
9589 * src/scan-gram.l: Move the "add a trailing ; to actions" code
9590 to...
9591 * src/scan-code.l: here.
9592 * tests/input.at (Torturing the Scanner): Fix another location
9593 error.
9594
9595 2006-06-07 Akim Demaille <akim@epita.fr>
9596
9597 * src/Makefile.am (BUILT_SOURCES): Fix the trailing backslash.
9598
9599 2006-06-06 Akim Demaille <akim@epita.fr>
9600
9601 Extract the parsing of user actions from the grammar scanner.
9602 As a consequence, the relation between the grammar scanner and
9603 parser is much simpler. We can also split "composite tokens" back
9604 into simple tokens.
9605 * src/gram.h (ITEM_NUMBER_MAX, RULE_NUMBER_MAX): New.
9606 * src/scan-gram.l (add_column_width, adjust_location): Move to and
9607 rename as...
9608 * src/location.h, src/location.c (add_column_width)
9609 (location_compute): these.
9610 Fix the column count: the initial column is 0.
9611 (location_print): Be robust to ending column being 0.
9612 * src/location.h (boundary_set): New.
9613 * src/main.c: Adjust to scanner_free being renamed as
9614 gram_scanner_free.
9615 * src/output.c: Include scan-code.h.
9616 * src/parse-gram.y: Include scan-gram.h and scan-code.h.
9617 Use boundary_set.
9618 (PERCENT_DESTRUCTOR, PERCENT_PRINTER, PERCENT_INITIAL_ACTION)
9619 (PERCENT_LEX_PARAM, PERCENT_PARSE_PARAM): Remove the {...} part,
9620 which is now, again, a separate token.
9621 Adjust all dependencies.
9622 Whereever actions with $ and @ are used, use translate_code.
9623 (action): Remove this nonterminal which is now useless.
9624 * src/reader.c: Include assert.h, scan-gram.h and scan-code.h.
9625 (grammar_current_rule_action_append): Use translate_code.
9626 (packgram): Bound check ruleno, itemno, and rule_length.
9627 * src/reader.h (gram_in, gram__flex_debug, scanner_cursor)
9628 (last_string, last_braced_code_loc, max_left_semantic_context)
9629 (scanner_initialize, scanner_free, scanner_last_string_free)
9630 (gram_out, gram_lineno, YY_DECL_): Move to...
9631 * src/scan-gram.h: this new file.
9632 (YY_DECL): Rename as...
9633 (GRAM_DECL): this.
9634 * src/scan-code.h, src/scan-code.l, src/scan-code-c.c: New.
9635 * src/scan-gram.l (gram_get_lineno, gram_get_in, gram_get_out):
9636 (gram_get_leng, gram_get_text, gram_set_lineno, gram_set_in):
9637 (gram_set_out, gram_get_debug, gram_set_debug, gram_lex_destroy):
9638 Move these declarations, and...
9639 (obstack_for_string, STRING_GROW, STRING_FINISH, STRING_FREE):
9640 these to...
9641 * src/flex-scanner.h: this new file.
9642 * src/scan-gram.l (rule_length, rule_length_overflow)
9643 (increment_rule_length): Remove.
9644 (last_braced_code_loc): Rename as...
9645 (gram_last_braced_code_loc): this.
9646 Adjust to the changes of the parser.
9647 Move all the handling of $ and @ into...
9648 * src/scan-code.l: here.
9649 * src/scan-gram.l (handle_dollar, handle_at): Remove.
9650 (handle_action_dollar, handle_action_at): Move to...
9651 * src/scan-code.l: here.
9652 * src/Makefile.am (bison_SOURCES): Add flex-scanner.h,
9653 scan-code.h, scan-code-c.c, scan-gram.h.
9654 (EXTRA_bison_SOURCES): Add scan-code.l.
9655 (BUILT_SOURCES): Add scan-code.c.
9656 (yacc): Be robust to white spaces.
9657
9658 * tests/conflicts.at, tests/input.at, tests/reduce.at,
9659 * tests/regression.at: Adjust the column numbers.
9660 * tests/regression.at: Adjust the error message.
9661
9662 2006-06-06 Joel E. Denny <jdenny@ces.clemson.edu>
9663
9664 * src/getargs.c (usage): Mention GLR not just LALR(1) in --help output.
9665 Use Akim's wording from
9666 <http://lists.gnu.org/archive/html/bison-patches/2006-05/msg00056.html>.
9667
9668 2006-06-06 Joel E. Denny <jdenny@ces.clemson.edu>
9669
9670 Between Bison releases, manually append `+' to the previous Bison
9671 release number, and use that as a signal to automatically print the
9672 ChangeLog's CVS Id keyword from --version. Discussed starting at
9673 <http://lists.gnu.org/archive/html/bison-patches/2006-05/msg00028.html>.
9674 * ChangeLog: Add Id header.
9675 * configure.ac (AC_INIT): Append `+' to `2.3'.
9676 * src/.cvsignore: Add revision.c.
9677 * src/Makefile.am (bison_SOURCES): Add revision.c and revision.h.
9678 (BUILT_SOURCES): Add revision.c.
9679 (revision.c): New target rule. This file defines a new global variable
9680 named revision. It initializes it with either the Id from ChangeLog
9681 or, if VERSION doesn't contain `+', with the empty string.
9682 * src/getargs.c (version): Print the value of revision.
9683 * src/revision.h: Extern revision.
9684
9685 2006-06-05 Paul Eggert <eggert@cs.ucla.edu>
9686
9687 * NEWS: Version 2.3.
9688 * configure.ac (AC_INIT): Likewise.
9689
9690 2006-05-30 Paul Eggert <eggert@cs.ucla.edu>
9691
9692 * data/glr.c (YYRECOVERING): Define to be a function-like macro
9693 with no arguments, not as an object-like macro. This is for
9694 compatibility with data/yacc.c. Problem reported by John P. Hartmann in
9695 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00059.html>.
9696 * doc/bison.texinfo (Action Features, Error Recovery, Table of Symbols):
9697 Document this.
9698
9699 2006-05-30 Joel E. Denny <jdenny@ces.clemson.edu>
9700
9701 * src/getargs.c (usage): Back out yesterday's modification of the
9702 --help output so that we don't have to wait for translation before
9703 releasing 2.3.
9704
9705 2006-05-29 Paul Eggert <eggert@cs.ucla.edu>
9706
9707 * doc/bison.texinfo (Introduction): Don't say "GLR grammar".
9708 Problem reported by Akim Demaille.
9709
9710 2006-05-29 Joel E. Denny <jdenny@ces.clemson.edu>
9711
9712 * src/getargs.c (usage): Mention GLR not just LALR(1) in --help output.
9713
9714 2006-05-26 Paul Eggert <eggert@cs.ucla.edu>
9715
9716 * data/yacc.c (yy_reduce_print): Omit trailing white space in
9717 generated source code. Problem reported by Frans Englich in
9718 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00049.html>.
9719
9720 2006-05-22 Paul Eggert <eggert@cs.ucla.edu>
9721
9722 * Makefile.maint (gzip_rsyncable, GZIP_ENV): Compute within the
9723 shell, not within 'make', so that 'make' by an ordinary builder
9724 (using GNU make) does not worry about configuring gzip. This also
9725 works around a bug reported independently by Keith Thompson and by
9726 Georg Schwarz, whereby gzip 1.2.4 --help would output usage on
9727 stderr rather than stdout, messing up the build logs.
9728
9729 2006-05-21 Joel E. Denny <jdenny@ces.clemson.edu>
9730
9731 * data/yacc.c (yyparse): Wrap the final return from yyparse inside YYID
9732 to make sure that YYID will never be unused. This fixes a 'make
9733 maintainer-check' failure caused by the recent changes to the 'Trivial
9734 grammars' test case, which caused g++ 4.1.0 to complain that YYID was
9735 not used.
9736 * data/glr.c (yyparse): Wrap yyparse's return inside YYID just in case.
9737
9738 2006-05-21 Joel E. Denny <jdenny@ces.clemson.edu>
9739
9740 * data/glr.c (yyresolveLocations): Remove bogus YYASSERT that the
9741 state before an empty RHS is always resolved here. Only the location
9742 of that state is guaranteed to be resolved, and that's enough. This
9743 fixes the remaining bug reported by Derek M. Jones in
9744 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00027.html>.
9745 * tests/glr-regression.at (Uninitialized location when reporting
9746 ambiguity): Test the above case.
9747 Also, the embedded comments in this test case claim it checks the case
9748 of an empty RHS that has inherited the initial location. However, the
9749 corresponding LHS was already resolved, so yyresolveLocations didn't
9750 actually have reason to modify it. Fix this by forcing
9751 nondeterministic operation at the beginning of the parse.
9752
9753 2006-05-20 Paul Eggert <eggert@cs.ucla.edu>
9754
9755 * data/c.m4 (b4_yy_symbol_print_generate):
9756 (b4_yy_symbol_print_generate): Use 'YYSTYPE const' rather than
9757 'const YYSTYPE', and similarly for YYLTYPE. This fixes one
9758 of the bugs reported today by Derek M Jones in
9759 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00027.html>.
9760 * doc/bison.texinfo (Value Type): Document that YYSTYPE must be
9761 defined to be a type name without parens or brackets.
9762 (Location Type): Similarly for YYLTYPE.
9763 * tests/regression.at (Trivial grammars): Put in a test for this
9764 bug that will be caught by 'make maintainer-check' (though not,
9765 alas, by 'make check' unless your compiler is picky).
9766
9767 2006-05-19 Paul Eggert <eggert@cs.ucla.edu>
9768
9769 * NEWS: Version 2.2.
9770 * configure.ac (AC_INIT): Likewise.
9771
9772 2006-05-17 Joel E. Denny <jdenny@ces.clemson.edu>
9773
9774 * data/glr.c (yyreportTree): Make room in yystates for the state
9775 preceding the RHS. This fixes the segmentation fault reported by Derek
9776 M. Jones in
9777 <http://lists.gnu.org/archive/html/help-bison/2006-05/msg00035.html>.
9778 (yyreportTree, yypdumpstack): Subtract 1 from yyrule before printing
9779 to the user. Reported for yyreportTree by Derek M. Jones later in the
9780 same thread.
9781 * THANKS: Add Derek M. Jones.
9782 Update my email address.
9783 Fix typo in Steve Murphy's name.
9784
9785 2006-05-14 Paul Eggert <eggert@cs.ucla.edu>
9786
9787 * data/glr.c (yyreportSyntaxError): Fix off-by-one error in
9788 checking against YYLAST that caused the parser to miss a potential
9789 alternative in its diagnostic.
9790 Problem reported by Maria Jose Moron Fernandez in
9791 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00024.html>.
9792 * data/lalr1.cc (yysyntax_error_): Likewise.
9793 * data/yacc.c (yysyntax_error): Likewise.
9794 * tests/regression.at (_AT_DATA_DANCER_Y): Use static array for
9795 tokens, in case we run into an older C compiler.
9796 (_AT_DATA_EXPECT2_Y, AT_CHECK_EXPECT2): New macros.
9797 Use them to check for the off-by-one error fixed above.
9798
9799 * data/yacc.c (yytnamerr): Fix typo: local var should be of type
9800 YYSIZE_T, not size_t.
9801 * tests/regression.at (Trivial grammars): New test, to catch
9802 the error fixed by the above patch.
9803
9804 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
9805
9806 * doc/bison.texinfo (C++ Bison Interface): Clarify the naming
9807 scheme.
9808 Reported by Steve Murphy.
9809
9810 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
9811
9812 * data/glr.cc, data/lalr1.cc: Using %defines is mandatory.
9813 * data/glr.cc: b4_location_flag is now b4_locations_flag.
9814
9815 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
9816
9817 Implement --trace=m4.
9818 * src/getargs.c (trace_types, trace_args): Accept trace_m4.
9819 * src/output.c (output_skeleton): When set, pass -dV to m4.
9820
9821 Factor the handling of flags in m4.
9822 * src/output.c (prepare): Rename the muscle names debug, defines,
9823 error_verbose to debug_flag, defines_flag, error_verbose_flag.
9824 * data/c.m4: Adjust.
9825 (_b4_define_flag_if, b4_define_flag_if, b4_defines_if): New.
9826 Use b4_define_flag_if to define other b4_FLAG_if macros.
9827 (b4_location_if): As a consequence, rename as...
9828 (b4_locations_if): this, for consistency.
9829 Adjust all the skeletons.
9830
9831 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
9832
9833 * etc/bench.pm: Shorten bench names.
9834
9835 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
9836
9837 * src/output.h, src/output.c (error_verbose): Move to...
9838 * src/getargs.h, src/getargs.c: here.
9839 Sort the flags.
9840 Adjust dependencies.
9841
9842 2006-05-13 Paul Eggert <eggert@cs.ucla.edu>
9843
9844 * data/c.m4 (b4_copyright): Put the special exception for Bison
9845 skeletons here, so we don't have to put it in each skeleton. All
9846 uses changed. Suggested by Akim Demaille. Also, wrap the
9847 copyright notice, in case it is longer than 80 columns. Replace
9848 comma by newline after title.
9849
9850 2006-05-11 Paul Eggert <eggert@cs.ucla.edu>
9851
9852 * doc/bison.texinfo (Calc++ Scanner): The flex behavior is an
9853 incompatibility, not a bug. Mention that it wasn't fixed as of
9854 flex 2.5.33.
9855
9856 2006-05-11 Akim Demaille <akim@lrde.epita.fr>
9857
9858 * examples/extexi: Enforce the precedence of concatenation over
9859 >>.
9860 Reported by Tommy Nordgren.
9861
9862 2006-05-11 Akim Demaille <akim@lrde.epita.fr>
9863
9864 * data/lalr1.cc (yytranslate_): Rename token as t to avoid clashes
9865 with the member "token".
9866 Reported by Martin Nylin.
9867
9868 2006-05-08 Paul Eggert <eggert@cs.ucla.edu>
9869
9870 * data/glr.c: Switch to Bison 2.2 special-exception language in
9871 the copyright notice. Use more-regular format for titles and
9872 copyright notices.
9873 * data/glr.cc: Likewise.
9874 * data/location.cc: Likewise.
9875 * data/yacc.cc: Likewise.
9876 * doc/bison.texinfo (Conditions): Document this.
9877 * NEWS: likewise. Upgrade version to 2.2.
9878
9879 2006-04-27 Akim Demaille <akim@lrde.epita.fr>
9880
9881 * data/glr.cc: Remove dead code.
9882
9883 2006-04-25 Paul Eggert <eggert@cs.ucla.edu>
9884
9885 * bootstrap: Comment out the AM_CPPFLAGS line, since we don't use
9886 that variable and the line breaks the bootstrap. Problem reported
9887 by Juan M. Guerrero.
9888
9889 2006-04-24 Akim Demaille <akim@lrde.epita.fr>
9890
9891 * doc/bison.texinfo (Multiple start-symbols): New.
9892
9893 2006-04-24 Akim Demaille <akim@lrde.epita.fr>
9894
9895 * etc/README, etc/bench.pl: New.
9896
9897 2006-04-03 Akim Demaille <akim@lrde.epita.fr>
9898
9899 * src/scan-gram.l: Be robust to BRACED_CODE appearing before any
9900 rule.
9901 Reported by Mickael Labau.
9902 * tests/input.at (Torturing the Scanner): Test it.
9903
9904 2006-03-16 Paul Eggert <eggert@cs.ucla.edu>
9905
9906 * doc/bison.texinfo (Decl Summary): Don't mention yylloc twice.
9907 Problem reported by Bob Rossi.
9908
9909 2006-03-13 Paul Eggert <eggert@cs.ucla.edu>
9910
9911 * doc/bison.texinfo: Remove @shorttitlepage stuff; it wasn't used
9912 and didn't really work.
9913 For the index, use @ifnotinfo, not @iftex.
9914 Minor cleanups of spacing and terminology.
9915
9916 2006-03-12 Akim Demaille <akim@lrde.epita.fr>
9917
9918 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Fix the definition
9919 of AT_NAME_PREFIX when %name-prefix is not used.
9920
9921 2006-03-12 Akim Demaille <akim@lrde.epita.fr>
9922
9923 Apply --prefix to C++ skeletons too: they change the namespace.
9924 The test suite already exercize these cases.
9925 * data/c++.m4 (b4_namespace): New.
9926 * data/lalr1.cc, data/glr.cc, data/location.cc: Use it instead of `yy'.
9927 * data/lalr1.cc (yytnameerr_): Move its definition into the namespace.
9928 * data/yacc.c, data/glr.c: Remove a useless `[]'.
9929 * doc/bison.texinfo: Document it.
9930 (Option Cross Key): Use @multitable in all formats. It looks
9931 nicer, even in TeX outputs.
9932 (Rules): Use the same code whatever the output type is.
9933 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS)
9934 (_AT_BISON_OPTION_POPDEFS): Support AT_NAME_PREFIX.
9935 * tests/calc.at: Use it, instead of hard coding `yy'.
9936
9937 2006-03-10 Akim Demaille <akim@lrde.epita.fr>
9938
9939 * TODO: Remove dead items.
9940
9941 2006-03-10 Akim Demaille <akim@lrde.epita.fr>
9942
9943 * doc/FAQ: Remove, merged into...
9944 * doc/bison.texinfo (FAQ): this.
9945 * doc/Makefile.am (EXTRA_DIST): Adjust.
9946
9947 2006-03-10 Akim Demaille <akim@lrde.epita.fr>
9948
9949 * data/c.m4 (b4_token_enum): Always define the enum of tokens,
9950 even if empty.
9951 * data/lalrl1.cc, data/glr.cc (parser::token_type): New.
9952 * doc/bison.texinfo (Calc++ Scanner): Use it.
9953
9954 2006-03-09 Paul Eggert <eggert@cs.ucla.edu>
9955
9956 Fix two nits reported by twlevo, plus one more that I discovered.
9957
9958 * src/assoc.h (assoc_to_string): Give a name to the arg, as
9959 this is the usual Bison style.
9960 * src/location.h (location_print): Likewise.
9961
9962 * src/reader.h (token_name): Likewise.
9963
9964 2006-03-08 Paul Eggert <eggert@cs.ucla.edu>
9965
9966 Fix some nits reported by twlevo.
9967 * doc/FAQ: Remove ancient Y2K FAQ, replacing it with "secure"
9968 and "POSIX". Use more-modern syntax for URLs. Mention C++
9969 and ask for Java. Don't hardwire OS version numbers. Add
9970 copyright notice.
9971 * m4/.cvsignore: Add unistd_h.m4, for latest gnulib.
9972 * src/conflicts.c (solved_conflicts_obstack): Now static.
9973
9974 2006-03-08 Joel E. Denny <jdenny@ces.clemson.edu>
9975
9976 * doc/bison.texinfo (Introduction): Mention GLR and C++ as on the web
9977 page. Say "you can use it" not "you may use it" as on the web page;
9978 we're describing capabilities not granting permission.
9979
9980 2006-03-06 Paul Eggert <eggert@cs.ucla.edu>
9981
9982 * data/glr.c (yyresolveLocations): Rename local variables to avoid
9983 shadowing warnings. Use usual patter for iterating through RHS.
9984 * tests/glr-regression.at
9985 (Uninitialized location when reporting ambiguity):
9986 Modify yylex so that it uses its argument, rather than trying
9987 to rely on ARGSUSED (which doesn't work for gcc with warnings).
9988 const char -> char const.
9989
9990 * tests/Makefile.am ($(srcdir)/package.m4, maintainer-check-valgrind):
9991 Don't use tabs inside commands; it messes up 'ps'.
9992 Problem reported by twlevo.
9993
9994 2006-03-06 Joel E. Denny <jdenny@ces.clemson.edu>
9995
9996 * tests/glr-regression.at (Uninitialized location when reporting
9997 ambiguity): New test case.
9998 * data/glr.c (yyresolveLocations): New function, which uses
9999 YYLLOC_DEFAULT.
10000 (yyresolveValue): Invoke yyresolveLocations before reporting an
10001 ambiguity.
10002 * doc/bison.texinfo (Default Action for Locations): Note
10003 YYLLOC_DEFAULT's usage for ambiguity locations.
10004 (GLR Semantic Actions): Cross-reference those notes.
10005
10006 2006-03-04 Joel E. Denny <jdenny@ces.clemson.edu>
10007
10008 * tests/glr-regression.at (Leaked semantic values when reporting
10009 ambiguity): Remove unnecessary union and type declarations.
10010 (Leaked lookahead after nondeterministic parse syntax error): New test
10011 case.
10012 * data/glr.c (yyparse): Check for zero stacks remaining before
10013 attempting to shift the lookahead so that you don't lose it.
10014
10015 2006-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
10016
10017 Avoid memory leaks by not invoking longjmp in yyreportAmbiguity.
10018 * tests/glr-regression.at (Leaked semantic values when reporting
10019 ambiguity): New test case.
10020 * data/glr.c (yyreportAmbiguity): Invoke yyyerror directly and return
10021 yyabort rather than invoking yyFail, which invokes longjmp. Remove the
10022 now unnecessary yystackp parameter.
10023 (yyresolveValue): Return yyreportAmbiguity's result. Now the necessary
10024 destructors can be called.
10025
10026 * tests/glr-regression.at: Don't invoke bison with `-t' unnecessarily
10027 in existing testcases.
10028
10029 2006-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
10030
10031 Don't leak semantic values for parent RHS when a user action cuts the
10032 parser, and clean up related code a bit.
10033 * tests/glr-regression.at (Leaked merged semantic value if user action
10034 cuts parse): Rename to...
10035 (Leaked semantic values if user action cuts parse): ... this. Add check
10036 for leaked parent RHS values.
10037 * data/glr.c (yydestroyGLRState): In debugging output, distinguish
10038 between an unresolved state (non-empty chain of semantic options) and
10039 an incomplete one (signaled by an empty chain).
10040 (yyresolveStates): Document the interface. Move all manipulation of a
10041 successfully or unsuccessfully resolved yyGLRState to...
10042 (yyresolveValue): ... here so that yyresolveValue always leaves a
10043 yyGLRState with consistent data and thus is easier to understand.
10044 Remove the yyvalp and yylocp parameters since they are always just
10045 taken from the yys parameter. When reporting a discarded merged value
10046 in debugging output, note that it is incompletely merged. Document the
10047 interface.
10048 (yyresolveAction): If resolving any of the RHS states fails, destroy
10049 them all rather than leaking them. Thus, as long as user actions are
10050 written to clean up the RHS correctly, yyresolveAction always cleans up
10051 the RHS of a semantic option. Document the interface.
10052
10053 2006-02-27 Paul Eggert <eggert@cs.ucla.edu>
10054
10055 * data/glr.c (yyexpandGLRStack): Catch an off-by-one error that
10056 led to a segmentation fault in GNU Pascal. Problem reported
10057 by Waldek Hebisch.
10058
10059 2006-02-21 Joel E. Denny <jdenny@ces.clemson.edu>
10060
10061 * doc/bison.texinfo (Mid-Rule Actions): Explain how to bury a
10062 mid-rule action inside a nonterminal symbol in order to declare a
10063 destructor for its semantic value.
10064
10065 2006-02-16 Paul Eggert <eggert@cs.ucla.edu>
10066
10067 * data/yacc.c [(! defined yyoverflow || YYERROR_VERBOSE) && !
10068 YYSTACK_USE_ALLOCA && ! defined YYSTACK_ALLOC && defined
10069 __cplusplus && ! defined _STDLIB_H && !
10070 ((defined YYMALLOC || defined malloc) && (defined YYFREE ||
10071 defined free))]: Include <stdlib.h> rather than rolling our own
10072 declarations of malloc and free, to avoid problems with
10073 incompatible declarations (using 'throw') C++'s stdlib.h. This
10074 should fix Debian bug 340012
10075 <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=340012>,
10076 reported by Guillaume Melquiond.
10077
10078 2006-02-13 Paul Eggert <eggert@cs.ucla.edu>
10079
10080 * NEWS: Clarify symbols versus types in unused-value warnings.
10081
10082 * configure.ac (AC_INIT): Bump version number.
10083
10084 2006-02-13 Paul Eggert <eggert@cs.ucla.edu>
10085
10086 * NEWS: Version 2.1a.
10087 * tests/headers.at (AT_TEST_CPP_GUARD_H): Declare yyerror and yylex,
10088 since C99 requires this.
10089
10090 2006-02-11 Paul Eggert <eggert@cs.ucla.edu>
10091
10092 * m4/c-working.m4: New file.
10093 * configure.ac (BISON_TEST_FOR_WORKING_C_COMPILER): Use it.
10094
10095 2006-02-10 Paul Eggert <eggert@cs.ucla.edu>
10096
10097 * Makefile.maint: Merge from coreutils.
10098
10099 2006-02-09 Paul Eggert <eggert@cs.ucla.edu>
10100
10101 More portability fixes for problems summarized by Nelson H. F. Beebe.
10102
10103 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Catch a
10104 configuration screwup "./configure CC=/opt/SUNWspro/bin/c89
10105 CFLAGS="-xarch=generic64" CXX=/opt/SUNWspro/bin/CC
10106 LDFLAGS="-xarch=generic64" with Sun C 5.7 on Solaris 10; this
10107 messes up because C++ code is compiled in 32-bit mode but linked
10108 in 64-bit mode.
10109
10110 2006-02-08 Paul Eggert <eggert@cs.ucla.edu>
10111
10112 More portability fixes for problems summarized by Nelson H. F. Beebe.
10113
10114 * doc/bison.texinfo (Calc++ Scanner): Work around a bug in flex
10115 2.5.31. This resembles the 2005-10-10 patch to src/scan-skel.l.
10116
10117 * examples/calc++/Makefile.am (check_PROGRAMS): Renamed from
10118 nodist_PROGRAMS, since we don't need to actually compile the
10119 example if we're just doing a plain 'make'. This avoids bothering
10120 the installer unnecessarily about problems due to weird C++
10121 compilers.
10122
10123 2006-02-06 Paul Eggert <eggert@cs.ucla.edu>
10124
10125 More portability fixes for problems summarized by Nelson H. F. Beebe.
10126
10127 * tests/headers.at (AT_TEST_CPP_GUARD_H): Use #include <...> rather
10128 than #include "...", and compile with -I'.'. The old method was
10129 not portable, according to Posix and the C standard, and it does
10130 not work with Sun C 5.7, where previous #line directives affect
10131 the working directory used in later #include "..." directives.
10132
10133 2006-02-06 Juan Manuel Guerrero <juan.guerrero@gmx.de>
10134
10135 Various DJGGP specific issues in /djgpp
10136
10137 2006-02-02 Paul Eggert <eggert@cs.ucla.edu>
10138
10139 More portability fixes for problems summarized by Nelson H. F. Beebe.
10140
10141 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check that
10142 '#include <map>' works and that you can apply ++ to iterators.
10143
10144 2006-02-01 Paul Eggert <eggert@cs.ucla.edu>
10145
10146 Work around portability problems summarized by Nelson H. F. Beebe in
10147 <http://lists.gnu.org/archive/html/bug-bison/2005-09/msg00021.html>.
10148
10149 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check
10150 that '#include <string>' works.
10151
10152 * data/lalr1.cc (yytranslate_): No longer inline, to work around a
10153 porting problem to g++ 3.4.3 on Darwin 7.9.0, where g++ complained
10154 "warning: sorry: semantics of inline function static data `const
10155 unsigned char translate_table[262]' are wrong (you'll wind up with
10156 multiple copies)".
10157
10158 * lib/bbitset.h (struct bitset_vtable): Rename members not, and,
10159 or, xor to not_, and_, or_, and xor_, respectively. This works
10160 around a bug in GCC 3.4.3 on Irix 6.5, which apparently has a
10161 random system header somewhere that includes the equivalent of
10162 <iso646.h>.
10163
10164 * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that "$CC
10165 -E" works; it apparently doesn't work with PathScale EKO Compiler
10166 Suite Version 2.0.
10167
10168 2006-01-30 Joel E. Denny <jdenny@ces.clemson.edu>
10169
10170 During deterministic GLR operation, user actions should be able to
10171 influence the parse by changing yychar. To make this easier to fix and
10172 to make glr.c easier to evolve in general, don't maintain yytoken in
10173 parallel with yychar; just compute yytoken when needed.
10174 * tests/glr-regression.at (Incorrect lookahead during deterministic
10175 GLR): Check that setting yychar in a user action has the intended
10176 effect.
10177 * data/glr.c (yyGLRStack): Remove yytokenp member.
10178 (yyclearin): Don't set *yytokenp.
10179 (yyprocessOneStack, yyreportSyntaxError, yyrecoverSyntaxError): Examine
10180 yychar rather than *yytokenp to determine the current lookahead.
10181 Compute yytoken locally when needed.
10182 (yyparse): Likewise. Remove the local yytoken that yytokenp used to
10183 point to.
10184
10185 * doc/bison.texinfo (Bison Options): Remove stray sentence fragment
10186 after `--report' documentation.
10187
10188 2006-01-30 Paul Eggert <eggert@cs.ucla.edu>
10189
10190 * src/parse-gram.y (grammar_declaration): Location of printer
10191 symbol is @1, not list->location. Bug reported by twlevo.
10192 * tests/input.at (Incompatible Aliases): Adjust to above change.
10193
10194 2006-01-29 Paul Eggert <eggert@cs.ucla.edu>
10195
10196 * tests/input.at (AT_CHECK_UNUSED_VALUES): Remove. Instead, do
10197 all the test at once. This makes the output easier to read in the
10198 normal case.
10199
10200 Fix a longstanding bug uncovered by bro-0.9a9/src/parse.y, which I
10201 got from <http://bro-ids.org/download.html>. The bug is that
10202 when two actions appeared in succession, the second one was
10203 scanned before the first one was added to the grammar rule
10204 as a midrule action. Bison then output the incorrect warning
10205 "parse.y:905.17-906.36: warning: unused value: $3".
10206 * src/parse-gram.y (BRACED_CODE, action): These are no longer
10207 associated with a value.
10208 (rhs): Don't invoke grammar_current_rule_action_append.
10209 (action): Invoke it here instead.
10210 * src/reader.c (grammar_midrule_action): Now extern.
10211 (grammar_current_rule_action_append): Don't invoke
10212 grammar_midrule_action; that is now the scanner's job.
10213 * src/reader.h (last_string, last_braced_code_loc):
10214 (grammar_midrule_action): New decls.
10215 * src/scan-gram.l (last_string): Now extern, sigh.
10216 (last_braced_code_loc): New extern variable.
10217 (<INITIAL>"{"): Invoke grammar_midrule_action if the current
10218 rule already has an action.
10219 (<SC_BRACED_CODE>"}"): Set last_braced_code_loc before returning.
10220 * tests/input.at (AT_CHECK_UNUSED_VALUES):
10221 Add some tests to check that the above changes fixed the bug.
10222
10223 2006-01-27 Paul Eggert <eggert@cs.ucla.edu>
10224
10225 * src/reader.c (symbol_should_be_used): Renamed from symbol_typed_p.
10226 All used changed. Check whether the symbol has a destructor,
10227 not whether it is typed.
10228 * tests/input.at (AT_CHECK_UNUSED_VALUES): Add a destructor, so
10229 that the values are still reported as unused. All line numbers
10230 adjusted.
10231
10232 2006-01-23 Paul Eggert <eggert@cs.ucla.edu>
10233
10234 Work around a bug in bro 0.8, which underparenthesizes its
10235 definition of YYLLOC_DEFAULT.
10236 * data/glr.c: Change all uses of YYLLOC_DEFAULT to parenthesize
10237 their arguments.
10238 * data/lalr1.cc: Likewise.
10239 * data/yacc.cc: Likewise.
10240
10241 2006-01-22 Paul Eggert <eggert@cs.ucla.edu>
10242
10243 Work around a bug in Pike 7.0, and give the Pike folks a
10244 better way to override the usual int widths.
10245 * data/yacc.c (b4_int_type): Use yytype_uint8, etc., so that the
10246 user can override the types.
10247 (short): #undef, to work around a bug in Pike 7.0.
10248 (yytype_uint8, yytype_int8, yytype_uint16, yytype_int16): New types.
10249 (union yyalloc.yyss): Use yytype_int16 rather than short.
10250 All uses changed.
10251 (yysigned_char): Remove.
10252 * src/parse-gram.y (YYTYPE_UINT8, YYTYPE_INT8, YYTYPE_UINT16):
10253 (YYTYPE_INT16): New macros, to test the new facility in yacc.c.
10254 * tests/regression.at (Web2c Actions): Adjust to above changes.
10255
10256 * src/reader.c (check_and_convert_grammar): New function.
10257 (reader): Close the input file even if something went wrong during
10258 parsing. Minor file descriptor leak reported by twlevo.
10259
10260 * src/assoc.c (assoc_to_string): Use a default: abort (); case
10261 to pacify gcc -Wswitch-default.
10262 * src/scan-gram.l (adjust_location): Use a default: break; case
10263 to pacify gcc -Wswitch-default.
10264 * src/scan-skel.h (skel_get_lineno, skel_get_in, skel_get_out):
10265 (skel_get_leng, skel_get_text, skel_set_lineno, skel_set_in):
10266 (skel_set_out, skel_get_debug, skel_set_debug, skel_lex_destroy):
10267 Move these decls to scan-skel.l, since they don't need to be
10268 visible elsewhere.
10269 * src/scan-skel.l: Accept the above decls.
10270 (skel_lex): New decl, to pacify GCC when unpatched flex 2.5.31
10271 is used.
10272
10273 2006-01-21 Paul Eggert <eggert@cs.ucla.edu>
10274
10275 * Makefile.cfg (local-checks-to-skip): Add changelog-check,
10276 since we don't want to insist on a version number at the start
10277 of the changelog every time.
10278 * Makefile.maint: Sync from coreutils a bit better.
10279 (sc_trailing_blank): Renamed from sc_trailing_space.
10280 All uses changed.
10281 (sc_no_if_have_config_h, sc_require_config_h):
10282 (sc_prohibit_assert_without_use): New rules.
10283 (sc_obsolete_symbols): Don't catch Makefile.maint itself.
10284 (sc_dd_max_sym_length): Fix leading spaces in rule.
10285 (sc_system_h_headers): Prefix with @.
10286 (sc_useless_cpp_parens, m4-check): Output line numbers.
10287 (changelog-check): Allow version only in head.
10288 * data/c.m4: Use "defined FOO" instead of "defined (FOO)", to
10289 satisfy new Makefile.maint rule.
10290 * data/glr.c: Likewise.
10291 * data/glr.cc: Likewise.
10292 * data/lalr1.cc: Likewise.
10293 * data/yacc.c: Likewise.
10294 * lib/ebitsetv.c: Likewise.
10295 * lib/lbitset.c: Likewise.
10296 * lib/subpipe.c: Likewise.
10297 * lib/timevar.c: Likewise.
10298 * src/system.h: Likewise.
10299 * data/yacc.c (YYSTYPE): Don't generate trailing spaces in output.
10300 * djgpp/Makefile.maint: Add copyright notice.
10301 * djgpp/README.in: Likewise.
10302 * djgpp/config.bat: Likewise.
10303 * djgpp/config.site: Likewise.
10304 * djgpp/config_h.sed: Likewise.
10305 * djgpp/djunpack.bat: Likewise.
10306 * djgpp/config.sed: Fix copyright notice to match standard format.
10307 * djgpp/subpipe.h: Likewise.
10308 * lib/bitsetv-print.c: Likewise.
10309 * lib/bitsetv.c: Likewise.
10310 * lib/subpipe.h: Likewise.
10311 * lib/timevar.c: Likewise.
10312 * lib/timevar.h: Likewise.
10313 * djgpp/subpipe.c: Use standard recipe for config.h.
10314 * lib/abitset.c: Likewise.
10315 * lib/bitset.c: Likewise.
10316 * lib/bitset_stats.c: Likewise.
10317 * lib/bitsetv-print.c: Likewise.
10318 * lib/bitsetv.c: Likewise.
10319 * lib/ebitsetv.c: Likewise.
10320 * lib/get-errno.c: Likewise.
10321 * lib/lbitset.c: Likewise.
10322 * lib/subpipe.c: Likewise.
10323 * lib/timevar.c: Likewise.
10324 * lib/vbitset.c: Likewise.
10325 * tests/local.at: Likewise.
10326 * src/scan-gram.l: Don't include verify.h, since system.h does
10327 that for us.
10328 * .x-sc_require_config_h: New file.
10329 * .x-sc_unmarked_diagnostics: New file.
10330
10331 2006-01-20 Paul Eggert <eggert@cs.ucla.edu>
10332
10333 Be a bit more systematic about using 'abort'.
10334 * lib/abitset.c (abitset_test): Remove ATTRIBUTE_UNUSED; not needed.
10335 * lib/bitset.c (bitset_bytes, bitset_init, bitset_op4_cmp):
10336 Put 'default: abort ();' before some other case, to satisfy older
10337 pedantic compilers.
10338 * lib/bitset_stats.c (bitset_stats_init): Likewise.
10339 * lib/ebitset.c (ebitset_elt_find, ebitset_op3_cmp): Likewise.
10340 * lib/lbitset.c (lbitset_elt_find, lbitset_op3_cmp): Likewise.
10341 * src/conflicts.c (resolve_sr_conflict): Likewise.
10342 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str):
10343 (get_decision_str, get_orientation_str, get_node_alignment_str):
10344 (get_arrow_mode_str, get_crossing_type_str, get_view_str):
10345 (get_linestyle_str, get_arrowstyle_str): Likewise.
10346 * src/conflicts.c (resolve_sr_conflict):
10347 Use a default case rather than one for the one remaining enum
10348 value, to catch invalid enum values as well.
10349 * src/lalr.c (set_goto_map, map_goto):
10350 Prefer "assert (FOO);" to "if (!FOO) abort ();".
10351 * src/nullable.c (nullable_compute, token_definitions_output):
10352 Likewise.
10353 * src/reader.c (packgram, reader): Likewise.
10354 * src/state.c (transitions_to, state_new, state_reduction_find):
10355 Likewise.
10356 * src/symtab.c (symbol_user_token_number_set, symbol_make_alias):
10357 (symbol_pack): Likewise.
10358 * src/tables.c (conflict_row, pack_vector): Likewise.
10359 * src/scan-skel.l (QPUTS): Remove unnecessary parens.
10360 (BASE_QPUTS, "@output ".*\n): Remove unnecessary asserts.
10361 * src/system.h: Don't include <assert.h>.
10362 (assert): New macro.
10363
10364 * doc/bison.texinfo (Prologue, Rules, Actions, Union Decl, Action Decl):
10365 (Destructor Decl, Parser Function, Pure Calling):
10366 Describe rules for braces inside C code more carefully.
10367
10368 2006-01-19 Paul Eggert <eggert@cs.ucla.edu>
10369
10370 Fix some porting glitches found by Nelson H. F. Beebe.
10371 * lib/abitset.c (abitset_resize): Rewrite to avoid warnings from
10372 compilers that don't understand that abort () does not return.
10373 * src/state.c (transitions_to): Likewise.
10374 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check
10375 that '#include <cstdlib>' works.
10376 * src/system.h (INT8_MIN, INT16_MIN, INT32_MIN, INT8_MAX):
10377 (INT16_MAX, UINT8_MAX, INT32_MAX, UINT16_MAX, UINT32_MAX):
10378 #undef if ! defined __STDC_VERSION__ || __STDC_VERSION__ < 199901,
10379 for the benefit of some pre-C99 compilers.
10380
10381 * bootstrap: Undo changes to gnulib files that autoreconf made.
10382
10383 Minor fixups to get 'make maintainer-check' to work.
10384 * configure.ac: Don't use -Wnested-externs, as it's incompatible
10385 with the new verify.h implementation.
10386 * data/c.m4 (b4_yy_symbol_print_generate): YYUSE (yyoutput).
10387 * data/glr.c (YYUSE): Depend on __GNUC__ as well.
10388 * data/yacc.c (YYUSE): Likewise.
10389 * data/lalr1.cc (yysyntax_error_): YYUSE (yystate).
10390 * lib/subpipe.c (end_of_output_subpipe): The args are unused.
10391 * src/parse-gram.y (declaration): Don't pass a string constant
10392 to a function that expects char *, since GCC might complain
10393 about the constant value.
10394 * src/reader.c (symbol_typed_p): Add parens to pacify GCC.
10395 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): #undef yylloc and yylval
10396 before #defining them.
10397 * tests/glr-regression.at
10398 (Incorrectly initialized location for empty right-hand side in GLR):
10399 In yyerror, use the msg arg.
10400 (Corrupted semantic options if user action cuts parse):
10401 (Incorrect lookahead during deterministic GLR):
10402 (Incorrect lookahead during nondeterministic GLR):
10403 Don't name a local var 'index'; it shadows string.h's 'index'.
10404
10405 2006-01-19 Akim Demaille <akim@epita.fr>
10406
10407 * tests/calc.at (_AT_DATA_CALC_Y): Initialize the whole initial
10408 location, not just parts of it.
10409
10410 2006-01-18 Paul Eggert <eggert@cs.ucla.edu>
10411
10412 * NEWS: Document the fact that multiple %unions are now allowed.
10413 * doc/bison.texinfo (Union Decl): Likewise.
10414 * TODO: This feature is now implemented, so remove it from
10415 the wishlist.
10416
10417 * Makefile.maint: Merge with coreutils Makefile.maint.
10418 (CVS_LIST): Use build-aux version if available.
10419 (VERSION_REGEXP): New macro.
10420 (syntax-check-rules): Add sc_no_if_have_config_h,
10421 sc_prohibit_assert_without_use, sc_require_config_h,
10422 sc_useless_cpp_parens.
10423 (sc_obsolete_symbols): Check for O_NDELAY.
10424 (sc_dd_max_sym_length): Track coreutils.
10425 (sc_unmarked_diagnostics): Look in all files, not just *.c.
10426 (sc_useless_cpp_parens): New rule.
10427 (news-date-check): Look for version or today's date.
10428 (changelog-check): Don't require version number near head.
10429 (copyright-check): Use current year instead of hardwiring 2005.
10430 (my-distcheck): Depend on $(release_archive_dir)/$(prev-tgz).
10431 (announcement): Add --gpg-key-ID.
10432
10433 * djgpp/config.sed: Add copyright notice, and replace "filesystem"
10434 with "file system".
10435
10436 Avoid undefined behavior that addressed just before the start of an
10437 array. Problem reported by twlevo.
10438 * src/reader.c (packgram): Prepend a new sentinel before ritem.
10439 * src/lalr.c (build_relations): Rely on new sentinel.
10440 * src/gram.c (gram_free): Adjust to new sentinel.
10441
10442 2006-01-12 Joel E. Denny <jdenny@ces.clemson.edu>
10443
10444 * data/glr.c (yyGLRStateSet): Rename yylookaheadStatuses to
10445 yylookaheadNeeds. All uses updated.
10446 (yysplitStack): Rename local yynewLookaheadStatuses to
10447 yynewLookaheadNeeds.
10448 * data/glr-regression.at (Incorrect lookahead during nondeterministic
10449 GLR): In comments, change `lookahead status' to `lookahead need'.
10450
10451 2006-01-11 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
10452
10453 * data/glr.c (yysplitStack): A little stylistic rewrite.
10454
10455 2006-01-11 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
10456
10457 * data/glr.c (yyaddDeferredAction): Flesh out the comment.
10458
10459 2006-01-11 Joel E. Denny <jdenny@ces.clemson.edu>
10460
10461 * doc/bison.texinfo: Fix some typos.
10462 (GLR Semantic Actions): New subsection discussing special
10463 considerations because GLR semantic actions might be deferred.
10464 (Actions): Mention look-ahead usage of yylval.
10465 (Actions and Locations): Mention look-ahead usage of yylloc.
10466 (Special Features for Use in Actions): Add YYEOF entry and mention it
10467 in the yychar entry.
10468 In the yychar entry, remove mention of the local yychar case (pure
10469 parser) since this is irrelevant information when writing semantic
10470 actions and since it's already discussed in `Table of Symbols' where
10471 yychar is otherwise described as an external variable.
10472 In the yychar entry, don't call it the `current' look-ahead since it
10473 isn't when semantic actions are deferred.
10474 In the yychar and yyclearin entries, add note about deferred semantic
10475 actions.
10476 Add yylloc and yylval entries discussing look-ahead usage.
10477 (Look-Ahead Tokens): When discussing yychar, don't call it the
10478 `current' look-ahead, and do mention yylval and yylloc.
10479 (Error Recovery): Cross-reference `Action Features' when mentioning
10480 yyclearin.
10481 (Table of Symbols): In the yychar entry, don't call it the `current'
10482 look-ahead.
10483 In the yylloc and yylval entries, mention look-ahead usage.
10484
10485 2006-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
10486
10487 * tests/glr-regression.at: Update copyright year to 2006.
10488
10489 2006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
10490
10491 * data/glr.c (yyGLRStateSet): Add yybool* yylookaheadStatuses member to
10492 use during nondeterministic operation to track which stacks have
10493 actually needed the current lookahead.
10494 (yyinitStateSet, yyfreeStateSet, yyremoveDeletes, yysplitStack):
10495 Allocate, deallocate, resize, and otherwise shuffle space for
10496 yylookaheadStatuses in parallel with yystates member of yyGLRStateSet.
10497 (yysplitStack, yyprocessOneStack, yyparse): Set lookahead status
10498 appropriately during nondeterministic operation.
10499 (yySemanticOption): Add int yyrawchar, YYSTYPE yyval, and YYLTYPE yyloc
10500 members to store the current lookahead to be used by the deferred
10501 user action.
10502 (yyaddDeferredAction): Add size_t yyk parameter specifying the stack
10503 from which the RHS is taken. Set the lookahead members of the new
10504 yySemanticOption according to the lookahead status for stack yyk.
10505 (yyglrShiftDefer, yyglrReduce): Pass yyk parameter on to
10506 yyaddDeferredAction.
10507 (yyresolveAction): Set yychar, yylval, and yylloc to the lookahead
10508 members of yySemanticOption before invoking yyuserAction, and then set
10509 them back to their current values afterward.
10510 (yyparse): Set yychar = YYEMPTY where yytoken = YYEMPTY.
10511 (yyreportAmbiguity): Add /*ARGSUSED*/ to pacify lint.
10512 * tests/glr-regression.at: Remove `.' from the ends of recent test case
10513 titles for consistency.
10514 (Leaked merged semantic value if user action cuts parse): In order to
10515 suppress lint warnings, use arguments in merge function, and assign
10516 char value < 128 in main.
10517 (Incorrect lookahead during deterministic GLR): New test case.
10518 (Incorrect lookahead during nondeterministic GLR): New test case.
10519
10520 2006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
10521
10522 * data/c.m4 (b4_yy_symbol_print_generate): In yy_symbol_print, accept
10523 !yyvaluep as signal that no semantic value is available to print.
10524 * data/glr.c (yydestroyGLRState): If state is not resolved, don't try
10525 to print a semantic value.
10526
10527 2006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
10528
10529 * tests/glr-regression.at: For consistency with my newer test cases,
10530 don't thank myself.
10531
10532 2006-01-05 Joel E. Denny <jdenny@ces.clemson.edu>
10533
10534 * data/glr.c (yyresolveValue): When merging semantic options, if at
10535 least one user action succeeds but a later one cuts the parse, then
10536 destroy the semantic value before returning rather than leaking it.
10537 (yyresolveStates): If a user action cuts the parse and thus
10538 yyresolveValue fails, ignore the (unset) semantic value rather than
10539 corrupting the yyGLRState, and empty the semantic options list since
10540 the user actions should have called all necessary destructors.
10541 Simplify code with YYCHK.
10542 * tests/glr-regression.at (Corrupted semantic options if user action
10543 cuts parse): New test case.
10544 (Undesirable destructors if user action cuts parse): New test case.
10545 Before applying any of this patch, this test case never actually failed
10546 for me... but only because the corrupted semantic options usually
10547 masked this bug.
10548 (Leaked merged semantic value if user action cuts parse): New test
10549 case.
10550
10551 2006-01-05 Akim Demaille <akim@epita.fr>
10552
10553 * src/reader.c, src/symlist.h, src/symlist.c: s/mid_rule/midrule/.
10554
10555 2006-01-04 Paul Eggert <eggert@cs.ucla.edu>
10556
10557 * data/c.m4 (b4_c_modern): New macro, with a new provision for
10558 _MSC_VER. Problem reported by Cenzato Marco.
10559 (b4_c_function_def): Use it.
10560 * data/yacc.c (YYMODERN_C): Remove. All uses replaced by
10561 b4_c_modern.
10562 (yystrlen, yystpcpy, yyparse): Use b4_c_function... macros rather
10563 than rolling our own.
10564
10565 2006-01-04 Akim Demaille <akim@epita.fr>
10566
10567 Also warn about non-used mid-rule values.
10568 * src/symlist.h, src/symlist.c (symbol_list): Add a mid_rule
10569 member.
10570 (symbol_list_new): Adjust.
10571 * src/reader.c (symbol_typed_p): New.
10572 (grammar_rule_check): Use it.
10573 (grammar_midrule_action): Bind a mid-rule LHS to its rule.
10574 Check its rule.
10575 * tests/input.at (AT_CHECK_UNUSED_VALUES): New.
10576 Use it.
10577 * tests/actions.at (Exotic Dollars): Adjust.
10578
10579 2006-01-04 Akim Demaille <akim@epita.fr>
10580
10581 * src/reader.c (grammar_midrule_action): If $$ is set in a
10582 mid-rule, move the `used' bit to its lhs.
10583 * tests/input.at (Unused values): New.
10584 * tests/actions.at (Exotic Dollars): Adjust: exp is not typed.
10585
10586 2006-01-03 Paul Eggert <eggert@cs.ucla.edu>
10587
10588 * doc/bison.texinfo (Bison Options): Say more accurately what
10589 --yacc does.
10590 * src/parse-gram.y (rules_or_grammar_declaration): Don't complain
10591 about declarations in the grammar when in Yacc mode, as POSIX does
10592 not require a diagnostic when the grammar uses extensions.
10593
10594 * src/reduce.c (reduce_grammar): Remove unnecessary cast to bool.
10595
10596 Warn about dubious constructions like "%token T T".
10597 Reported by twlevo.
10598 * src/symtab.h (struct symbol.declared): New member.
10599 * src/symtab.c (symbol_new): Initialize it to false.
10600 (symbol_class_set): New arg DECLARING, specifying whether
10601 this is a declaration that we want to warn about, if there
10602 is more than one of them. All uses changed.
10603
10604 * data/glr.c, data/glr.cc, data/lalr1.cc, data/yacc.c:
10605 Allow multiple %union directives, whose contents concatenate.
10606 * src/parse-gram.y (grammar_declaration): Likewise.
10607 Use muscle_code_grow, so that we don't need stype_line any more.
10608 All uses changed.
10609
10610 * src/muscle_tab.c (muscle_grow): Fix comment.
10611
10612 * ChangeLog, data/c.m4, data/glr.c, data/glr.cc, data/location.cc:
10613 * data/yacc.c, src/getargs.c, src/output.c, tests/cxx-type.at:
10614 Update copyright year to 2006.
10615
10616 2006-01-03 Akim Demaille <akim@epita.fr>
10617
10618 Have glr.cc pass (some of) the calc.at tests.
10619 * data/glr.cc (b4_parse_param_orig): New.
10620 (b4_parse_param): Improve its definition, and bound it more
10621 clearly in the skeleton.
10622 (b4_epilogue): Append, instead of prepending, in order to keep
10623 #line consistency.
10624 Simplify the generation of auxiliary functions: locations and
10625 purity are mandated.
10626 (b4_global_tokens_and_yystype): Honor it.
10627 * data/location.cc (c++.m4): Don't include it.
10628 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Define AT_GLR_CC_IF
10629 and AT_SKEL_CC_IF.
10630 * tests/calc.at (AT_CHECK_CALC): Rely on AT_SKEL_CC_IF instead of
10631 AT_LALR1_CC_IF.
10632 Be sure to initialize the first position's filename.
10633 (AT_CHECK_CALC_LALR1_CC): Add %location and %defines, they are
10634 mandated anyway.
10635 (AT_CHECK_CALC_GLR_CC): New.
10636 Use it to exercise glr.cc as a lalr1.cc drop-in replacement.
10637
10638 2006-01-02 Akim Demaille <akim@epita.fr>
10639
10640 * src/output.c (output_skeleton): Don't hard wire the inclusion of
10641 c.m4.
10642 * data/c++.m4, data/glr.c, data/yacc.c: Include c.m4.
10643 * data/glr.cc: Do not include stack.hh.
10644
10645 2006-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
10646
10647 * data/glr.c: Reformat whitespace with tabs.
10648 (b4_lpure_formals): Remove this unused m4 macro.
10649 * tests/cxx-type.at: Reformat whitespace with tabs.
10650 (_AT_TEST_GLR_CXXTYPES): In union Node, rename node_info to nodeInfo
10651 since it's a member. Rename type to isNterm for clarity.
10652
10653 2005-12-29 Akim <akim@sulaco.local>
10654
10655 Let glr.cc catch up with symbol_value_print.
10656 * data/glr.cc (b4_yysymprint_generate): Replace by...
10657 (b4_yy_symbol_print_generate): this.
10658 (yy_symbol_print, yy_symbol_value_print): Declare them.
10659
10660 2005-12-28 Paul Eggert <eggert@cs.ucla.edu>
10661
10662 * src/location.h (boundary): Note that a line or column equal
10663 to INT_MAX indicates an overflow.
10664 * src/scan-gram.l: Include verify.h. Don't include get-errno.h.
10665 (rule_length_overflow, increment_rule_length, add_column_width):
10666 New functions.
10667 (<INITIAL>{id}, <SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'"):
10668 (<SC_BRACED_CODE>"}"):
10669 Use increment_rule_length rather than incrementing it by hand.
10670 (adjust_location, handle_syncline): Diagnose overflow.
10671 (handle_action_dollar, handle_action_at):
10672 Fix bug with monstrosities like $-2147483648.
10673 Remove now-unnecessary checks.
10674 (scan_integer): Verify assumptions and remove now-unnecessary checks.
10675 (convert_ucn_to_byte): Verify assumptions.
10676 (handle_syncline): New arg LOC. All callers changed.
10677 Don't store through a value derived from char const * pointer.
10678
10679 * src/reader.c (grammar_rule_check): Rewrite slightly to avoid
10680 GCC warnings.
10681
10682 2005-12-27 Paul Eggert <eggert@cs.ucla.edu>
10683
10684 * src/reader.c (grammar_midrule_action, grammar_symbol_append):
10685 Remove unnecessary forward static decls.
10686
10687 2005-12-27 Akim Demaille <akim@epita.fr>
10688
10689 * src/reader.c (grammar_current_rule_check): Also check that $$
10690 is used.
10691 Take the rule to check as argument, hence rename as...
10692 (grammar_rule_check): this.
10693 * src/reader.h, src/reader.c (grammar_rule_begin, grammar_rule_end):
10694 Rename as...
10695 (grammar_rule_begin, grammar_rule_end): these, for consistency.
10696 (grammar_midrule_action, grammar_symbol_append): Now static.
10697 * tests/torture.at (input): Don't rely on the default action
10698 being always performed.
10699 * tests/calc.at: "Set" $$ even when the action is "cut" with
10700 YYERROR or other.
10701 * tests/actions.at (Exotic Dollars): Instead of using unused
10702 values, check that the warning is issued.
10703
10704 2005-12-22 Paul Eggert <eggert@cs.ucla.edu>
10705
10706 * NEWS: Improve wording for unused-value warnings.
10707
10708 2005-12-22 Akim Demaille <akim@epita.fr>
10709
10710 * data/lalr1.cc, data/yacc.c, data/glr.c, data/c.m4
10711 (b4_yysymprint_generate): Rename as...
10712 (b4_yy_symbol_print_generate): this.
10713 Generate yy_symbol_print instead of yysymprint.
10714 Generate also yy_symbol_value_print, and use it.
10715
10716 2005-12-22 Akim Demaille <akim@epita.fr>
10717
10718 * NEWS: Warn about unused values.
10719 * src/symlist.h, src/symlist.c (symbol_list, symbol_list_new): Add
10720 a `used' member.
10721 (symbol_list_n_get, symbol_list_n_used_set): New.
10722 (symbol_list_n_type_name_get): Use symbol_list_n_get.
10723 * src/scan-gram.l (handle_action_dollar): Flag used symbols.
10724 * src/reader.c (grammar_current_rule_check): Check that values are
10725 used.
10726 * src/symtab.c (symbol_print): Accept 0.
10727 * tests/existing.at: Remove the type information.
10728 Empty the actions.
10729 Remove useless actions (beware of mid-rule actions: perl -000
10730 -pi -e 's/\s*\{\}(?=[\n\s]*[|;])//g').
10731 * tests/actions.at (Exotic Dollars): Use unused values.
10732 * tests/calc.at: Likewise.
10733 * tests/glr-regression.at (No users destructors if stack 0 deleted):
10734 Likewise.
10735
10736 * src/gram.c (rule_useful_p, rule_never_reduced_p): Use
10737 rule_useful_p.
10738
10739 2005-12-21 Paul Eggert <eggert@cs.ucla.edu>
10740
10741 Undo 2005-12-01 tentative license wording change. The wording is
10742 still being reviewed by the lawyers, and we don't want to wait for
10743 them before publishing a test release. For now, revert to the
10744 previous wording.
10745 * NEWS: Undo 2005-12-01 change.
10746 * data/glr.c: Revert to previous license wording.
10747 * data/glr.cc: Likewise.
10748 * data/lalr1.cc: Likewise.
10749 * data/location.cc: Likewise.
10750 * data/yacc.c: Likewise.
10751
10752 * NEWS: Reword %destructor vs YYABORT etc.
10753 * data/glr.c: Use American spacing, for consistency.
10754 * data/glr.cc: Likewise.
10755 * data/lalr1.cc: Likewise.
10756 * data/yacc.c: Likewise.
10757 * data/yacc.c: Reformat comments slightly.
10758 * doc/bison.texinfo: Replace "non-" with "non" when that makes sense,
10759 for consistency. Fix some spelling errors and reword recently-included
10760 text slightly.
10761 * tests/cxx-type.at: Cast results of malloc, for C++.
10762
10763 2005-12-21 Joel E. Denny <address@hidden>
10764
10765 * tests/cxx-type.at: Construct a tree, count the parents of shared
10766 nodes, and free each node once and only once. Previously, the memory
10767 for semantic values was leaked instead.
10768
10769 2005-12-21 Joel E. Denny <address@hidden>
10770
10771 * data/glr.c (struct yyGLRStack): If pure, add yyval and yyloc members.
10772 (yylval, yylloc): If pure, #define to yystackp->yyval and
10773 yystackp->yyloc similar to yychar and yynerrs.
10774 (yyparse): If pure, remove local yylval and yylloc. Add local
10775 yystackp to accommodate pure definitions of yylval and yylloc.
10776 (b4_lex_param, b4_lyyerror_args, b4_lpure_args): If pure, change
10777 yylvalp and yyllocp to &yylval and &yylloc.
10778 (nerrs, char, lval, lloc): If pure, add #define's for b4_prefix[]
10779 namespace. Previously, nerrs and char were missing, but lval and lloc
10780 weren't necessary.
10781 (yyprocessOneStack, yyreportSyntaxError, yyrecoverSyntaxError): Remove
10782 yylvalp and yyllocp parameters since, if pure, these are now always
10783 accessible through yystackp. If not pure, they are still accessible
10784 globally.
10785 * data/glr.c, data/yacc.c (YYLLOC_DEFAULT): Change `if (N)' to
10786 `if (YYID (N))' to pacify lint.
10787
10788 2005-12-21 Akim Demaille <akim@epita.fr>
10789
10790 YYACCEPT, YYERROR, and YYABORT, as user actions, should not
10791 destroy the RHS symbols of a rule.
10792 * data/yacc.c (yylen): Initialize to 0.
10793 Keep its value to the number of items to possibly shift.
10794 In particular, a regular successful parse that ends on YYFINAL by
10795 a (internal) YYACCEPT must not have yylen != 0.
10796 (yyerrorlab, yyreturn): Pop the RHS.
10797 Reorder a bit to emphasize the `shifting' bits of code.
10798 (YYPOPSTACK): Now accept a number of items to pop.
10799 * data/lalr1.cc: Likewise.
10800 * data/glr.c: Formatting changes.
10801 Use goto instead of fall through.
10802 * doc/bison.texinfo (Destructor Decl): Complete.
10803
10804 2005-12-20 Juan Manuel Guerrero <juan.guerrero@gmx.de>
10805
10806 * Makefile.am: DJGPP specific files added to EXTRA_DIST.
10807 * djgpp/Makefile.maint: Fix PACKAGE variable computation.
10808 * djgpp/config.bat: Replace every occurence of the file name
10809 scan-gram-c.c with c-scan-gram.c. The same for scan-skel-c.c with
10810 c-scan-skel.c to conform with the 8.3 file name restriction on MSDOS.
10811 * djgpp/config.sed: Replace every occurence of the file name
10812 scan-gram-c.c with c-scan-gram.c. The same for scan-skel-c.c with
10813 c-scan-skel.c to conform with the 8.3 file name restriction on MSDOS.
10814 * djgpp/djunpack.bat: DJGPP specific file.
10815 * djgpp/fnchange.lst: DJGPP specific file.
10816 * djgpp/README.in: Add new information about how to unpack the bison
10817 source on MSDOS and other systems which have 8.3 file name restrictions
10818 using djunpack.bat and fnchange.lst.
10819
10820 2005-12-12 Paul Eggert <eggert@cs.ucla.edu>
10821
10822 * bootstrap (build_cvs_prefix): Remove; unused.
10823 (CVS_PREFIX): Adjust to yesterday's Savannah reorganization
10824 when getting gnulib.
10825
10826 2005-12-12 "Joel E. Denny" <jdenny@ces.clemson.edu>
10827
10828 * data/glr.c: Reorder typedef declarations for structs to match order
10829 of struct declarations.
10830 Rename yystack everywhere to yystackp except in yyparse where it's not
10831 a pointer.
10832 (yyglrShift): Change parameter YYSTYPE yysval to YYSTYPE* yyvalp for
10833 consistency.
10834 (yyis_table_ninf): Change 0 to YYID (0) to pacify lint.
10835 (yyreportSyntaxError): Add /*ARGSUSED*/ to pacify lint.
10836 (yyparse): Change while (yytrue) to while ( YYID (yytrue)) to pacify
10837 lint.
10838
10839 2005-12-09 Paul Eggert <eggert@cs.ucla.edu>
10840
10841 * tests/sets.at (Accept): Fix typos in regular expression used to
10842 sed out the final state number.
10843
10844 Work around portability problem on Solaris 10: flex-generated
10845 files include <stdio.h> before <config.h>, which messes up
10846 because the latter defines __EXTENSIONS__. Address the problem
10847 by creating two new little files that include <config.h> first,
10848 then include the flex-generated files. Rewrite everyone else
10849 to include <config.h> first, as well.
10850 * lib/timevar.c: Always include "config.h".
10851 * src/Makefile.am (bison_SOURCES): Replace scan-gram.l with
10852 scan-gram-c.c, and scan-skel.l with scan-skel-c.c.
10853 (EXTRA_bison_SOURCES): New macro.
10854 * src/scan-gram-c.c, src/scan-skel-c.c: New files.
10855 * src/system.h: Don't include config.h.
10856 * src/LR0.c: Include <config.h> first.
10857 * src/assoc.c: Likewise.
10858 * src/closure.c: Likewise.
10859 * src/complain.c: Likewise.
10860 * src/conflicts.c: Likewise.
10861 * src/derives.c: Likewise.
10862 * src/files.c: Likewise.
10863 * src/getargs.c: Likewise.
10864 * src/gram.c: Likewise.
10865 * src/lalr.c: Likewise.
10866 * src/location.c: Likewise.
10867 * src/main.c: Likewise.
10868 * src/muscle_tab.c: Likewise.
10869 * src/nullable.c: Likewise.
10870 * src/output.c: Likewise.
10871 * src/parse-gram.y: Likewise.
10872 * src/print.c: Likewise.
10873 * src/print_graph.c: Likewise.
10874 * src/reader.c: Likewise.
10875 * src/reduce.c: Likewise.
10876 * src/relation.c: Likewise.
10877 * src/state.c: Likewise.
10878 * src/symlist.c: Likewise.
10879 * src/symtab.c: Likewise.
10880 * src/tables.c: Likewise.
10881 * src/uniqstr.c: Likewise.
10882 * src/vcg.c: Likewise.
10883
10884 * src/parse-gram.y: Fix minor problems uncovered by lint.
10885 (current_lhs, current_lhs_location): Now static.
10886 (current_assoc): Remove unused variable.
10887
10888 Cleanups so that Bison-generated parsers have less lint.
10889 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate):
10890 Prepend /*ARGSUSED*/, for lint's sake.
10891 * data/glr.c (YYUSE): Properly parenthesize, and use an alternate
10892 definition if 'lint' is defined.
10893 (YYID): New macro (or function, if lint).
10894 All uses of /*CONSTCOND*/0 replaced by YYID(0).
10895 * data/yacc.c: Likewise.
10896 * data/glr.c (yyuserAction, yyuserMerge, yy_reduce_print):
10897 (yyrecoverSyntaxError): Prepend /*ARGSUSED*/.
10898 * data/glr.cc (YYLLOC_DEFAULT): Omit /*CONSTCOND*/ since this code
10899 is C++ only.
10900 * data/lalr1.cc (YYUSE): Just use a cast, since this code is C++ only.
10901 * data/yacc.c (YYSTACK_FREE) [defined YYSTACK_ALLOC]:
10902 Use YYID(0) rather than 0, for lint.
10903 (yystrlen): Rewrite to avoid lint warning about ptrdiff_t overflow.
10904 (yysyntax_error): Rewrite to avoid lint warnings about parenthesization.
10905
10906 2005-12-07 Paul Eggert <eggert@cs.ucla.edu>
10907
10908 * tests/glr-regression.at
10909 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
10910 Close memory leak reported by twlevo.
10911
10912 2005-12-06 "Joel E. Denny" <jdenny@ces.clemson.edu>
10913
10914 * data/glr.c (yyprocessOneStack, yyparse): Synchronize the shift for
10915 all stacks.
10916 (yyparse): Iterate another stack in order to call user destructors.
10917 * tests/glr-regression.at (No users destructors if stack 0 deleted):
10918 New test case.
10919 (Duplicated user destructor for lookahead): This test now is expected
10920 to succeed.
10921
10922 2005-12-01 Paul Eggert <eggert@cs.ucla.edu>
10923
10924 * NEWS: Document the following change.
10925 * data/yacc.c: Say "parser skeleton" rather than "file", since
10926 it's no longer just a file.
10927 * data/glr.c: Grant a special exception for C GLR parsers, that
10928 reads like the already-existing exception for C LALR(1) parsers.
10929 * data/glr.cc: Likewise.
10930 * data/lalr1.cc: Likewise.
10931 * data/location.cc: Likewise.
10932 * data/yacc.c: Reword the "written by" statement to clarify that
10933 it was the parser skeleton, not the entire output file.
10934 * data/glr.c: Written by Paul Hilfinger.
10935 * data/glr.cc: Written by Akim Demaille.
10936 * data/lalr1.cc: Likewise.
10937
10938 2005-11-18 Paul Eggert <eggert@cs.ucla.edu>
10939
10940 * data/yacc.c (yy_reduce_print, YY_REDUCE_PRINT):
10941 Fix typos in previous change that broke 'make check'.
10942 YY_REDUCE_PRINT cannot be a pseudo-varargs macro; that isn't
10943 supported in C.
10944 * tests/calc.at (_AT_CHECK_CALC,_AT_CHECK_CALC_ERROR):
10945 Don't check NUM-STDERR-LINES, since the output format is fluctuating.
10946 We can revert this once things settle down.
10947
10948 * src/conflicts.c (conflicts_print): Don't print file name twice
10949 when %expect fails because there were no conflicts.
10950 * doc/bison.texinfo (Expect Decl): Tighten up wording in previous
10951 change.
10952 * tests/conflicts.at (%expect not enough, %expect too much):
10953 (%expect with reduce conflicts): Adjust to new behavior.
10954
10955 2005-11-18 Akim Demaille <akim@epita.fr>
10956
10957 * src/conflicts.c (conflicts_print): Unsatisfied %expectation are
10958 errors.
10959 * NEWS: Document this.
10960 * doc/bison.texinfo (Expect Decl): Likewise.
10961
10962 2005-11-16 Akim Demaille <akim@epita.fr>
10963
10964 Generalize the display of semantic values and locations in traces.
10965 * data/glr.c (yy_reduce_print): Fix indices (again).
10966 * data/c++.m4 (b4_rhs_value, b4_rhs_location): Don't expect
10967 literal integers.
10968 * data/lalr1.cc (yyreduce_print): Rename as...
10969 (yy_reduce_print): this.
10970 Display values and locations.
10971 * data/yacc.c (yy_reduce_print): Likewise.
10972 (YY_REDUCE_PRINT): Adjust to pass the required arguments.
10973 (yysymprint): Move higher to be visible from yy_reduce_print).
10974 (yyparse): Adjust.
10975 * tests/calc.at: Adjust the expected length of the traces.
10976
10977 2005-11-14 Akim Demaille <akim@epita.fr>
10978
10979 * data/glr.c (yy_reduce_print): The loop was quite wrong: type are
10980 from 1 to N, while values and location start at 0.
10981 (b4_rhs_location, b4_rhs_value): Add parens around $1 and $2.
10982
10983 2005-11-14 Akim Demaille <akim@epita.fr>
10984
10985 * data/glr.c (yy_reduce_print): Fix the $ number.
10986
10987 2005-11-14 Akim Demaille <akim@epita.fr>
10988
10989 "Use" parse parameters.
10990 * data/c.m4 (b4_parse_param_for, b4_parse_param_use): New.
10991 * data/glr.c, data/glr.cc: Use them.
10992 * data/glr.c (YYUSE): Have a C++ definition that supports
10993 non-pointer types.
10994
10995 2005-11-14 Akim Demaille <akim@epita.fr>
10996
10997 * data/glr.c (yyexpandGLRStack): Declare only if defined.
10998
10999 2005-11-14 Akim Demaille <akim@epita.fr>
11000
11001 * data/glr.cc: New.
11002 * data/m4sugar/m4sugar.m4 (m4_prepend): New.
11003
11004 2005-11-12 Akim Demaille <akim@epita.fr>
11005
11006 Let position and location be PODs.
11007 * data/location.cc (position::initialize, location::initialize): New.
11008 (position::position, location::location): Define only if
11009 b4_location_constructors is defined.
11010 * data/lalr1.cc (b4_location_constructors): Define it for backward
11011 compatibility.
11012 * doc/bison.texinfo (Initial Action Decl): Use initialize.
11013
11014 2005-11-12 Akim Demaille <akim@epita.fr>
11015
11016 * data/lalr1.cc: Move the body of the ctor and dtor into the
11017 parser file (instead of the header).
11018 Wrap the implementations in a "namespace yy".
11019
11020 2005-11-12 Akim Demaille <akim@epita.fr>
11021
11022 Have glr.c include its header file when created.
11023 * data/glr.c (b4_shared_declarations): New.
11024 Output them verbatim in the parser if !%defines, otherwise
11025 output then in the header file, and include it instead.
11026
11027 2005-11-11 Akim Demaille <akim@epita.fr>
11028
11029 * data/glr.c: Comment changes.
11030
11031 2005-11-11 Akim Demaille <akim@epita.fr>
11032
11033 When yydebug, report semantic and location values for reductions.
11034 * data/glr.c (yy_reduce_print): Report the semantic values and the
11035 locations.
11036 (YY_REDUCE_PRINT): Adjust.
11037 (yyglrReduce): Use them.
11038 (b4_rhs_value, b4_rhs_location): Remove m4_eval invocations.
11039 * data/c.m4 (b4_yysymprint_generate): Specify the const arguments.
11040 * tests/calc.at (_AT_CHECK_CALC_ERROR): Remove the reduction
11041 traces.
11042
11043 2005-11-10 Akim Demaille <akim@epita.fr>
11044
11045 * data/glr.c (yynewGLRStackItem, YY_RESERVE_GLRSTACK): New.
11046 (yyaddDeferredAction, yyglrShift, yyglrShiftDefer): Use them.
11047 (yyexpandGLRStack, YYRELOC): Define only when YYSTACKEXPANDABLE.
11048
11049 2005-11-09 Albert Chin-A-Young <china@thewrittenword.com>
11050
11051 * m4/cxx.m4, examples/Makefile.am: Don't build
11052 examples/calc++ if no C++ compiler is available. (trivial change)
11053
11054 2005-11-09 Akim Demaille <akim@epita.fr>
11055
11056 * src/scan-skel.l: Use a couple of asserts.
11057
11058 2005-11-03 Akim Demaille <akim@epita.fr>
11059
11060 In some (weird) cases, the final state number is incorrect.
11061 Reported by Alexandre Duret-Lutz.
11062 * src/LR0.c (state_list_append): Remove the computation of
11063 final_state.
11064 (save_reductions): Do it here.
11065 (get_state): Alpha conversion.
11066 (generate_states): Use a for loop.
11067 * src/gram.h (item_number_is_rule_number)
11068 (item_number_is_symbol_number): New.
11069 * src/state.c: Use assert.
11070 * src/system.h: Include assert.h.
11071 * tests/sets.at (Accept): New.
11072
11073 2005-10-30 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
11074
11075 * data/glr.c (yyfill): Adjust comment.
11076 (yyresolveAction): Initialize default location properly
11077 for empty right-hand sides.
11078 (yydoAction): Ditto.
11079 Add comment explaining apparently dead code.
11080 * tests/glr-regression.at
11081 (Incorrectly initialized location for empty right-hand side in GLR):
11082 New test.
11083
11084 2005-10-30 Paul Eggert <eggert@cs.ucla.edu>
11085
11086 * bootstrap (cleanup_gnulib): New function. Use it to clean up
11087 gnulib when interrupted. This fixes some race conditions and
11088 works around some portability problems (one noted by Paul
11089 Hilfinger).
11090
11091 2005-10-22 Akim <akim@epita.fr>
11092
11093 * Makefile.cfg: Adjust to config -> build-aux.
11094 Reported by twledo.
11095
11096 2005-10-21 Akim Demaille <akim@epita.fr>
11097
11098 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate): Pass
11099 the %parse-params.
11100 * data/glr.c (YY_SYMBOL_PRINT, yydestroyGLRState): Adjust.
11101 * data/yacc.c (b4_Pure_if): Rename as...
11102 (b4_yacc_pure_if): this.
11103 (YY_SYMBOL_PRINT, yyparse): Adjust.
11104 * doc/bison.texinfo: Formatting changes.
11105
11106 2005-10-21 Akim Demaille <akim@epita.fr>
11107
11108 Finish the transition config -> build-aux.
11109 * configure.ac, Makefile.am: Use build-aux.
11110 * config/prev-version, config/announce-gen, config/Makefile.am:
11111 Move to...
11112 * build-aux/prev-version, build-aux/announce-gen,
11113 * build-aux/Makefile.am: here.
11114
11115 2005-10-14 Akim Demaille <akim@epita.fr>
11116
11117 * examples/calc++/test: Use set -x only when VERBOSE.
11118
11119 2005-10-13 Paul Eggert <eggert@cs.ucla.edu>
11120
11121 * NEWS: Bison now warns if it finds a stray `$' or `@' in an action.
11122 * src/scan-gram.l (<SC_BRACED_CODE>[$@]): Implement this.
11123
11124 2005-10-13 Akim Demaille <akim@epita.fr>
11125
11126 * src/scan-skel.l: Output the base name parts of the parser and
11127 header file names.
11128 * tests/output.at (AT_CHECK_OUTPUT): Support subdirectories, and
11129 additional checks.
11130 Use this to exercise C++ outputs in subdirs.
11131 Reported by Oleg Smolsky.
11132
11133 2005-10-12 Paul Eggert <eggert@cs.ucla.edu>
11134
11135 * data/c.m4 (b4_c_function_def): Look at __C99_FUNC__, not at
11136 __STDC_VERSION__, as IBM cc 7.0 doesn't define the latter either.
11137 Problem reported by John P. Hartmann.
11138 * data/yacc.c (YYMODERN_C): Likewise. Don't define if the user has
11139 already defined it.
11140
11141 2005-10-12 Akim Demaille <akim@epita.fr>
11142
11143 * src/parse-gram.y (version_check): Exit 63 to please missing
11144 (stands for "version mismatch).
11145 * tests/input.at, doc/bison.texinfo: Adjust.
11146
11147 2005-10-10 Paul Eggert <eggert@cs.ucla.edu>
11148
11149 Work around portability problems with Visual Age C compiler
11150 (xlc and xlC_r) reported by John P. Hartmann.
11151 * data/location.cc (initial_column, initial_line): Remove.
11152 All uses replaced by 0 and 1.
11153 * src/scan-gram.l (gram_wrap): Redefine to avoid bug in flex 2.5.31
11154 that xlc complains about.
11155 * src/scan-skel.l (skel_wrap): Likewise.
11156 * data/c.m4 (b4_c_function_def): Look at __STDC_VERSION__ as well
11157 as __STDC__.
11158 * data/yacc.c (YYMODERN_C): New macro, which also looks at
11159 __STDC_VERSION__. Use it everywhere instead of looking at
11160 __STDC__ and __cplusplus.
11161
11162 2005-10-10 Akim Demaille <akim@epita.fr>
11163
11164 * examples/calc++/test: Be quiet unless VERBOSE.
11165
11166 2005-10-05 Paul Eggert <eggert@cs.ucla.edu>
11167
11168 * data/c.m4 (yydestruct, yysymprint):
11169 Use YYUSE instead of casting to void.
11170 * data/glr.c (YYUSE): New macro.
11171 (yyuserMerge, yyreportAmbiguity, yyreportSyntaxError):
11172 Use it instead of rolling our own.
11173 (YYLLOC_DEFAULT, YYCHK, YYDPRINTF, YY_SYMBOL_PRINT, YY_REDUCE_PRINT):
11174 (YYCHK1):
11175 Use /*CONSTCOND*/ to suppress lint warnings.
11176 * data/lalr1.cc (YYLLOC_DEFAULT, YY_SYMBOL_PRINT, YY_REDUCE_PRINT):
11177 (YY_STACK_PRINT): Use 'false' not '0'.
11178 (YYUSE): New macro.
11179 (yysymprint_, yydestruct_): Use it instead of rolling our own.
11180 * data/yacc.c (YYUSE): New macro.
11181 (YYCOPY, YYSTACK_RELOCATE, YYBACKUP, YYLLOC_DEFAULT):
11182 (YYDPRINTF, YY_SYMBOL_PRINT, YY_STACK_PRINT, YY_REDUCE_PRINT):
11183 (yyerrorlab): Use /*CONSTCOND*/ to suppress lint warnings.
11184
11185
11186 * data/m4sugar/m4sugar.m4 (_m4_map): New macro.
11187 (m4_map, m4_map_sep): Use it. Handle the empty list correctly.
11188
11189 2005-10-04 Paul Eggert <eggert@cs.ucla.edu>
11190
11191 Undo the parts of the unlocked-I/O change that substituted
11192 putc or puts for printf. This might hurt performance a bit,
11193 but some people prefer the printf style.
11194 * data/c.m4 (yysymprint): Prefer printf to puts and putc.
11195 * data/glr.c (YYFPUTC, YYFPUTS, YYDPUTS): Remove.
11196 All uses replaced by YYFPRINTF and YYDPRINTF.
11197 * data/yacc.c: Likewise.
11198 * lib/bitset.c (bitset_print): Likewise.
11199 * lib/bitsetv.c (bitsetv_dump, debug-bitsetv): Prefer printf to
11200 putc and puts.
11201 * lib/lbitset.c (debug_lbitset): Likewise.
11202 * src/closure.c (print_firsts, print_fderives): Likewise.
11203 * src/gram.c (grammar_dump): Likewise.
11204 * src/lalr.c (look_ahead_tokens_print): Likewise.
11205 * src/output.c (escaped_output): Likewise.
11206 (user_actions_output): Break apart two printfs.
11207 * src/parse-gram.y (%printer): Prefer printf to putc and puts.
11208 * src/reduce.c (reduce_print): Likewise.
11209 * src/state.c (state_rule_look_ahead_tokens_print): Likewise.
11210 * src/system.h: Include unlocked-io.h rathe than stdio.h.
11211
11212 * data/glr.c (yyuserMerge, yyreportAmbiguity, yyreportSyntaxError):
11213 Use assignments rather than casts-to-void to suppress
11214 unused-variable warnings. This pacifies 'lint'.
11215 * data/lalr1.cc (yysymprint_, yydestruct_): Use a call to suppress
11216 unused-variable warnings.
11217
11218 2005-10-03 Juan Manuel Guerrero <juan.guerrero@gmx.de>
11219
11220 * Makefile.am: DJGPP specific files added to EXTRA_DIST.
11221
11222 2005-10-02 Paul Eggert <eggert@cs.ucla.edu>
11223
11224 Use unlocked I/O for a minor performance improvement on hosts like
11225 GNU/Linux and Solaris that support unlocked I/O. The basic idea
11226 is to use the gnlib unlocked-io module, and to prefer putc and
11227 puts to printf when either will work (since the latter doesn't
11228 come in an unlocked flavor).
11229 * bootstrap (gnulib_modules): Add unlocked-io.
11230 * data/c.m4 (yysymprint): Prefer puts and putc to printf.
11231 * data/glr.c (YYFPUTC, YYFPUTS, YYDPUTS): New macros.
11232 Prefer them to YYFPRINTF and YYDPRINTF if either will do,
11233 and similarly for puts and putc and printf.
11234 * data/yacc.c: Likewise.
11235 * lib/bitset.c (bitset_print): Likewise.
11236 * lib/bitset.h [USE_UNLOCKED_IO]: Include unlocked-io.h.
11237 * lib/bitsetv.c (bitsetv_dump, debug-bitsetv): Prefer putc and puts
11238 to printf.
11239 * lib/lbitset.c (debug_lbitset): Likewise.
11240 * src/closure.c (print_firsts, print_fderives): Likewise.
11241 * src/gram.c (grammar_dump): Likewise.
11242 * src/lalr.c (look_ahead_tokens_print): Likewise.
11243 * src/output.c (escaped_output): Likewise.
11244 (user_actions_output): Coalesce two printfs.
11245 * src/parse-gram.y (%printer): Prefer putc and puts to printf.
11246 * src/reduce.c (reduce_print): Likewise.
11247 * src/state.c (state_rule_look_ahead_tokens_print): Likewise.
11248 * src/system.h: Include unlocked-io.h rather than stdio.h.
11249
11250 * data/lalr1.cc: Don't put an unmatched ' in a dnl comment, as
11251 this confuses xgettext.
11252
11253 2005-10-02 Akim Demaille <akim@epita.fr>
11254
11255 * bootstrap (gnulib_modules): Add strverscmp.
11256 * lib/.cvsignore: Add strverscmp.c, strverscmp.h.
11257 * m4/.cvsignore: Add strverscmp.m4.
11258 * src/parse-gram.y (%require): New token, new rule.
11259 (version_check): New.
11260 * src/scan-gram.l (%require): Adjust.
11261 * tests/input.at (AT_REQUIRE): New.
11262 Use it.
11263 * doc/bison.texinfo (Require Decl): New.
11264 (Calc++ Parser): Use %require.
11265
11266 2005-10-02 Akim Demaille <akim@epita.fr>
11267
11268 * data/location.cc: New.
11269
11270 2005-10-02 Paul Eggert <eggert@cs.ucla.edu>,
11271 Akim Demaille <akim@epita.fr>
11272
11273 Make sure -odir/foo.cc creates dir/location.hh etc.
11274 * src/files.h (spec_outfile, parser_file_name, spec_name_prefix)
11275 (spec_file_prefix, spec_verbose_file, spec_graph_file)
11276 (spec_defines_file): Now const.
11277 (dir_prefix): New.
11278 (short_base_name): Remove.
11279 * src/files.c: Adjust.
11280 (dirname.h): Include.
11281 (base_name): Don't prototype it.
11282 (finput): Remove, duplicates gram_in.
11283 (full_base_name, short_base_name): Replace by...
11284 (all_but_ext, all_but_tab_ext): these.
11285 (compute_base_names): Rename as...
11286 (compute_file_name_parts): this.
11287 Update to compute the new variables, including dir_prefix.
11288 Adjust dependencies.
11289 * src/output.c (prepare): Output them.
11290 * src/reader.c: Adjust to use gram_in, not finput.
11291 * src/scan-skel.l (@dir_prefix@): New.
11292
11293 2005-10-02 Juan Manuel Guerrero <juan.guerrero@gmx.de>
11294
11295 * lib/subpipe.c: New function end_of_output_subpipe() added
11296 to allow support for non-posix systems. This is a no-op function
11297 for posix systems.
11298
11299 * lib/subpipe.h: New function end_of_output_subpipe() added
11300 to allow support for non-posix systems. This is a no-op function
11301 for posix systems.
11302
11303 * src/output.c (output_skeleton): Use end_of_output_subpipe() to
11304 handle the lack of pipe/fork functionality on non-posix systems.
11305
11306 * djgpp/Makefile.maint: DJGPP specific file.
11307
11308 * djgpp/README.in: DJGPP specific file.
11309
11310 * djgpp/config.bat: DJGPP specific configuration file.
11311
11312 * djgpp/config.sed: DJGPP specific configuration file.
11313
11314 * djgpp/config.site: DJGPP specific configuration file.
11315
11316 * djgpp/config_h.sed: DJGPP specific configuration file.
11317
11318 * djgpp/subpipe.c: DJGPP specific replacement file for lib/subpipe.c.
11319
11320 * djgpp/subpipe.h: DJGPP specific replacement file for lib/subpipe.h.
11321
11322 2005-10-02 Akim Demaille <akim@epita.fr>
11323
11324 * data/location.cc: New, extract from...
11325 * data/lalr1.cc: here.
11326 (location.hh): Include it after the user prologue, in case the
11327 filename type is defined by the user.
11328 Forward declation location and position before the pre-prologue.
11329 (yyresult_): Rename as...
11330 (yyresult): this, it's a local variable, not an attribute.
11331 * data/Makefile.am (dist_pkgdata_DATA): Adjust.
11332
11333 2005-10-01 Akim Demaille <akim@epita.fr>
11334
11335 * examples/extexi: Restore the #line generation.
11336
11337 2005-09-30 Akim Demaille <akim@epita.fr>,
11338 Alexandre Duret-Lutz <adl@gnu.org>
11339
11340 Move the token type and YYSTYPE in the parser class.
11341 * data/lalr1.cc (stack.hh, location.hh): Include earlier.
11342 (parser::token): New, from the moved free definition of tokens.
11343 (parser::semantic_value): Now a full definition instead of an
11344 indirection to YYSTYPE.
11345 (b4_post_prologue): No longer included in the header file, but
11346 in the implementation file.
11347 * doc/bison.texi (C+ Language Interface): Update.
11348 * src/parse-gram.y: Support unary %define.
11349 * tests/actions.at: Define global_tokens_and_yystype for backward
11350 compatibility until we update the tests.
11351 * tests/calc.at: Idem.
11352 (first_line, first_column, last_line, last_column): Define for lalr1.cc
11353 to simplify the code.
11354
11355 2005-09-29 Paul Eggert <eggert@cs.ucla.edu>
11356
11357 Port to SunOS 4.1.4, which lacks strtoul and strerror.
11358 Ah, the good old days! Problem reported by Peter Klein.
11359 * bootstrap (gnulib_modules): Add strerror, strtoul.
11360 * lib/.cvsignore: Add strerror.c, strtol.c, strtoul.c
11361 * m4/.cvsignore: Add strerror.m4, strtol.m4, strtoul.m4.
11362
11363 2005-09-29 Akim Demaille <akim@epita.fr>
11364
11365 * data/c.m4 (b4_error_verbose_if): New.
11366 * data/lalr1.cc: Use it.
11367 (YYERROR_VERBOSE_IF): Remove.
11368 (yyn_, yylen_, yystate_, yynerrs_, yyerrstatus_): Remove as
11369 parser members, replaced by...
11370 (yyn, yylen, yystate, yynerss, yyerrstatus): these parser::parse
11371 local variables.
11372 (yysyntax_error_): Takes the state number as argument.
11373 (yyreduce_print_): Use the argument yyrule, not the former
11374 attribute yyn_.
11375
11376 2005-09-26 Paul Eggert <eggert@cs.ucla.edu>
11377
11378 * bootstrap (gnulib_modules): Add verify.
11379 * lib/.cvsignore: Add verify.h.
11380 * src/getargs.c: Use ARGMATCH_VERIFY rather than verify.
11381 * src/system.h (verify): Remove.
11382 Include verify.h instead.
11383 * src/tables.c (tables_generate): Use new API for 'verify'.
11384
11385 2005-09-21 Paul Eggert <eggert@cs.ucla.edu>
11386
11387 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Do not use
11388 local variables whose names begin with 'yy'.
11389 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
11390 Trivial changes from Joel E. Denny.
11391
11392 * bootstrap (gnulib_modules): Remove alloca. Bison doesn't need
11393 it itself.
11394 * src/main.c (main) [C_ALLOCA]: Don't flush alloca'ed memory; we
11395 don't use alloca any more.
11396
11397 * data/yacc.c [YYSTACK_USE_ALLOCA && !defined __GNUC__ && ! defined
11398 __BUILTIN_VA_ARG_INCR && ! defined _AIX && ! defined _MSC_VER &&
11399 defined _ALLOCA_H]: Don't include <stdlib.h>; not needed in this case.
11400 * tests/torture.at (Exploding the Stack Size with Alloca): Adjust
11401 to match yacc.c, to test more hosts.
11402
11403 2005-09-20 Paul Eggert <eggert@cs.ucla.edu>
11404
11405 * data/yacc.c (YYSIZE_T): Reindent to make it clearer. This
11406 doesn't affect behavior.
11407 (YYSTACK_ALLOC) [YYSTACK_USE_ALLOCA]: Improve support for
11408 Solaris, AIX, MSC.
11409 (_STDLIB_H): Renamed from YYINCLUDED_STDLIB_H. All uses changed.
11410 This works a bit better with glibc, if user code has already included
11411 stdlib.h.
11412 * doc/bison.texinfo (Bison Parser): Document that users can't
11413 arbitrarily use malloc and free for other purposes. Document
11414 that <alloca.h> and <malloc.h> might be included.
11415 (Table of Symbols): Under YYSTACK_USE_ALLOCA, Don't claim that the
11416 user must declare alloca.
11417
11418 * HACKING (release): Forwarn the Translation Project about
11419 stable releses.
11420
11421 2005-09-20 Akim Demaille <akim@epita.fr>
11422
11423 * data/glr.c: Use b4_token_enums, not b4_token_enums_defines.
11424
11425 2005-09-19 Paul Eggert <eggert@cs.ucla.edu>
11426
11427 * data/yacc.c (YYSIZE_MAXIMUM): New macro.
11428 (YYSTACK_ALLOC_MAXIMUM): Use it.
11429 (yysyntax_error): New function.
11430 (yyparse) [YYERROR_VERBOSE]: Don't leak memory indefinitely if
11431 multiple syntax errors are reported, and alloca is being used.
11432 Instead, reallocate buffers twice as big each time, so that
11433 we waste at most half the allocated memory. Start with a small
11434 (128-byte) buffer that will suffice in most cases anyway.
11435 Use yysyntax_error to do most of the work.
11436
11437 * doc/bison.texinfo (Error Reporting, Table of Symbols):
11438 yynerrs is the number of errors reported, not the number of
11439 errors encountered.
11440
11441 * tests/glr-regression.at (Duplicated user destructor for lookahead):
11442 Mark it as expected to fail.
11443 Cast result of malloc; problem reported by twlevo@xs4all.nl.
11444 * tests/actions.at, tests/calc.at, tests/glr-regression.at:
11445 Don't start user-code symbols with "yy", to avoid name space problems.
11446
11447 2005-09-19 Akim Demaille <akim@epita.fr>
11448
11449 Remove the traits, failed experiment.
11450 It never proved useful, and anyway because of the current
11451 definition, it was not possible to have several specialization of
11452 this traits, making it useless.
11453 * data/lalr1.cc (yy:traits): Remove.
11454 Inline its definitions in the parser class.
11455
11456 2005-09-19 Akim Demaille <akim@epita.fr>
11457
11458 * tests/atlocal.in (LIBS): Pass INTLLIBS to address failures on at
11459 least Mac OSX with a /usr/local install of gettext.
11460
11461 2005-09-19 Akim Demaille <akim@epita.fr>
11462
11463 * data/lalr1.cc (yyparse): Rename yylooka and yyilooka as yychar
11464 and yytoken for similarity with the other skeletons.
11465
11466 2005-09-19 Akim Demaille <akim@epita.fr>
11467
11468 * NEWS, configure.ac: update version number to 2.1a.
11469
11470 2005-09-16 Paul Eggert <eggert@cs.ucla.edu>
11471
11472 * NEWS: Version 2.1.
11473
11474 * NEWS: Remove notice of yytname change, since it was never in an
11475 official release.
11476 * data/glr.c (yydestroyGLRState): Rename local var to avoid shadowing
11477 diagnostic.
11478 * src/output.c (prepare): Likewise.
11479 * data/lalr1.cc (YYERROR_VERBOSE_IF): New macro.
11480 (yysyntax_error_): Use it to avoid GCC warning when YYERROR_VERBOSE
11481 is not defined. This is an awful hack, but it's enough for now.
11482 All callers changed.
11483 * tests/glr-regression-at (make_value): Args are const pointers now,
11484 to avoid GCC warning.
11485 (Duplicated user destructor for lookahead): New test. Currently
11486 skipped. It fails on my host but I'm not sure it'll always fail.
11487
11488 2005-09-16 Akim Demaille <akim@epita.fr>
11489
11490 * src/symtab.h (struct symbol): Declare the printer and destructor
11491 as const, to avoid accidental calls to free.
11492 (symbol_destructor_set, symbol_printer_set): Adjust.
11493 * src/symtab.c: Adjust.
11494
11495 2005-09-16 Akim Demaille <akim@epita.fr>
11496
11497 * data/c.m4 (b4_token_enums): New.
11498 (b4_token_defines): Rename as...
11499 (b4_token_enums_defines): this.
11500 (b4_token_defines): New, output only the #defines.
11501 * data/yacc.c, data/glr.c: Adjust.
11502 * data/lalr1.cc: Use b4_token_enums instead of b4_token_enums_defines.
11503 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate): Define
11504 as default values.
11505
11506 2005-09-16 Akim Demaille <akim@epita.fr>
11507
11508 * data/lalr1.cc (yylex_): Remove, inline its code.
11509 (yyreport_syntax_error_): Remove, replaced by...
11510 (yysyntax_error_): this which returns a string and leaves to the
11511 caller the call to the users' error function.
11512 (yylooka_, yyilooka_, yylval, yylloc, yyerror_range_, yyval, yyloc):
11513 Move from members of the parser object...
11514 (yylooka, yyilooka, yylval, yylloc, yyerror_range, yyval, yyloc):
11515 to local variables of the parse function.
11516
11517 2005-09-16 Akim Demaille <akim@epita.fr>
11518
11519 * doc/bison.texinfo (Calc++ Parser): Don't promote defining YYEOF
11520 since it's in Bison's name space.
11521
11522 2005-09-15 Paul Eggert <eggert@cs.ucla.edu>
11523
11524 * data/glr.c (yyresolveValue): Add default case to pacify
11525 gcc -Wswitch-default. Problem reported by twlevo@xs4all.nl.
11526
11527 * NEWS: Document when yyparse started to return 2.
11528 * doc/bison.texinfo (Parser Function): Document when yyparse
11529 returns 2.
11530
11531 * data/lalr1.cc: Revert part of previous change, as it's incompatible.
11532 (b4_filename_type): Renamed back from b4_file_name_type. All uses
11533 changed.
11534 (class position): file_name -> filename (reverting). All uses changed.
11535
11536 2005-09-14 Paul Eggert <eggert@cs.ucla.edu>
11537
11538 * examples/calc++/Makefile.am ($(calc_sources_generated)): Don't
11539 do anything if $@ exists. This reverts part of the 2005-07-07
11540 patch.
11541
11542 2005-09-11 Paul Eggert <eggert@cs.ucla.edu>
11543
11544 * Makefile.am (EXTRA_DIST): Do not distribute REFERENCES; it
11545 contains obsolete information and isn't worth distributing as a
11546 separate file anyway.
11547 * data/glr.c [defined YYSETJMP]: Don't include <setjmp.h>.
11548 (YYJMP_BUF, YYSETJMP, YYLONGJMP) [!defined YYSETJMP]: New macros.
11549 All uses of jmp_buf, setjmp, longjmp changed to use these instead.
11550 (yyparse): Abort if user code uses longjmp to throw an unexpected
11551 value.
11552
11553 2005-09-09 Paul Eggert <eggert@cs.ucla.edu>
11554
11555 * data/c.m4 (b4_identification): Define YYBISON_VERSION.
11556 Suggested by twlevo@xs4all.nl.
11557
11558 * data/glr.c (YYCHK1): Do not assume YYE is in range.
11559 This avoids a diagnostic from gcc -Wswitch-enum.
11560 Problem reported by twlevo@xs4all.nl.
11561
11562 * doc/bison.texinfo: Don't use "filename", as per GNU coding
11563 standards. Use "file name" or "file" or "name", depending on
11564 the context.
11565 (Invocation): The output of "bison hack/foo.y" goes to foo.tab.c,
11566 not to hack/foo.tab.c.
11567 (Calc++ Top Level): 2nd arg of main is not const.
11568 * data/glr.c: b4_filename -> b4_file_name.
11569 * data/lalr1.cc: Likewise. Also, b4_filename_type -> b4_file_name_type.
11570 All uses changed.
11571 (class position): filename -> file_name. All uses changed.
11572 * data/yacc.c: b4_filename -> b4_file_name.
11573 * lib/bitset.h: filename -> file_name in local vars.
11574 * lib/bitset_stats.c: Likewise.
11575 * src/files.c: Likewise.
11576 * src/scan-skel.l ("@output ".*\n): Likewise.
11577 * src/files.c (file_name_split): Renamed from filename_split.
11578 * src/muscle_tab.c (muscle_init): Output b4_file_name, not b4_filename.
11579
11580 2005-09-08 Paul Eggert <eggert@cs.ucla.edu>
11581
11582 * lib/.cvsignore: Add pipe-safer.c, stdio--.h, unistd--.h,
11583 to accommodate latest gnulib.
11584
11585 * tests/glr-regression.at (Duplicate representation of merged trees):
11586 Add casts to pacify g++. Problem reported by twlevo@xs4all.nl.
11587
11588 * bootstrap: Add comment as to why the AM_LANGINFO_CODESET hack is
11589 needed.
11590
11591 2005-08-26 Paul Eggert <eggert@cs.ucla.edu>
11592
11593 * data/glr.c (yydestroyGLRState): Renamed from yydestroyStackItem.
11594 All uses changed. Invoke user destructor after an error during a
11595 split parse (trivial change from Joel E. Denny).
11596
11597 * tests/glr-regression.at
11598 (User destructor after an error during a split parse): New test case.
11599 Problem reported by Joel E. Denny in:
11600 http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00029.html
11601
11602 2005-08-25 Paul Eggert <eggert@cs.ucla.edu>
11603
11604 * README-cvs: Give URLs for recommended tools.
11605 Mention Gzip version problem, and bootstrapping issues.
11606 Remove troubleshooting section, as it's somewhat obsolete.
11607
11608 * bootstrap (no_cache): New var, to accommodate different wget
11609 variants. Use it instead of '-C off'. Problem reported by
11610 twlevo@xs4all.nl.
11611
11612 * data/glr.c (yydestroyStackItem): New function.
11613 (yyrecoverSyntaxError, yyreturn): Use it to improve quality of
11614 debugging information. Problem reported by Joel E. Denny.
11615
11616 2005-08-25 Akim Demaille <akim@epita.fr>
11617
11618 * tests/local.at (AT_COMPILE_CXX): Pass $LINKS too.
11619
11620 2005-08-24 Paul Eggert <eggert@cs.ucla.edu>
11621
11622 * data/glr.c (yyrecoverSyntaxError, yyreturn):
11623 Don't invoke destructor on unresolved entries.
11624 * tests/glr-regression.at
11625 (User destructor for unresolved GLR semantic value): New test case.
11626 Problem reported by Joel E. Denny in:
11627 http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00016.html
11628
11629 2005-08-21 Paul Eggert <eggert@cs.ucla.edu>
11630
11631 * lib/.cvsignore: Remove realloc.c, strncasecmp.c, xstrdup.c.
11632 Add strnlen.c.
11633 * m4/.cvsignore: Remove codeset.m4, gettext.m4, lib-ld.m4,
11634 lib-prefix.m4, po.m4.
11635
11636 * data/glr.c (yyreturn): Use "Cleanup:" rather than "Error:"
11637 in yydestruct diagnostic, since it might not be an error.
11638 Problem reported by Joel Denny near end of
11639 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00040.html>.
11640 * data/lalr1.cc (yyerturn): Likewise.
11641 * data/yacc.c (yyreturn): Likewise.
11642 * tests/calc.at (_AT_CHECK_CALC_ERROR): Adjust to the above change.
11643
11644 * src/files.c: Remove obsolete FIXME comment.
11645
11646 * data/glr.c (YY_SYMBOL_PRINT): Append a newline, for consistency
11647 with the other templates, and to fix bogus run-on messages such
11648 as the one reported at the end of
11649 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00040.html>.
11650 All callers changed to avoid the newline.
11651 (yyprocessOneStack): Output two lines rather than one, to accommodate
11652 the above change. This changes the debug output format slightly.
11653
11654 * data/glr.c (yyresolveValue): Fix redundant parse tree problem
11655 reported by Joel E. Denny in
11656 <http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00004.html>
11657 (trivial change).
11658 * tests/glr-regression.at (Duplicate representation of merged trees):
11659 New test, from Joel E. Denny in:
11660 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00013.html>.
11661 * THANKS: Add Joel E. Denny.
11662
11663 * configure.ac (AC_INIT): Bump to 2.0c.
11664
11665 2005-07-24 Paul Eggert <eggert@cs.ucla.edu>
11666
11667 * NEWS: Version 2.0b.
11668
11669 * Makefile.am (SUBDIRS): Put examples before tests, so that
11670 "make check" doesn't finish with "All 1 tests passed".
11671
11672 * tests/regression.at (Token definitions): Don't rely on
11673 AT_PARSER_CHECK for data that contains backslashes. It currently
11674 uses 'echo', and 'echo' isn't portable if its argument contains
11675 backslashes. Problem found on OpenBSD 3.4. Also, do not assume
11676 that the byte '\0xff' is not printable in the C locale; it is,
11677 under OpenBSD 3.4 (!). Luckily, '\0x80' through '\0x9e' are
11678 not printable, so use '\0x81' to test.
11679
11680 * data/glr.c (YYOPTIONAL_LOC): Define even if it's not a recent
11681 version of GCC, since the macro is used with non-GCC compilers.
11682
11683 Fix core dump reported by Pablo De Napoli in
11684 <http://lists.gnu.org/archive/html/bug-bison/2005-07/msg00053.html>.
11685 * tests/regression.at (Invalid inputs with {}): New test.
11686 * src/parse-gram.y (token_name): Translate type before using
11687 it as an index.
11688
11689 * data/glr.c (ATTRIBUTE_UNUSED): Remove, since it infringes on
11690 the user's name space. All uses changed to __attribute__
11691 ((__unused__)).
11692 (yyFail, yyMemoryExhausted, yyreportAmbiguity):
11693 Add __attribute__ ((__noreturn__)).
11694
11695 * etc/clcommit: Remove. We weren't using it, and it failed
11696 "make maintainer-distcheck".
11697 * Makefile.maint: Merge from coreutils.
11698 (CVS_LIST, CVS_LIST_EXCEPT): New macros.
11699 (syntax-check-rules): Change list of rules as described below.
11700 (sc_cast_of_alloca_return_value, sc_dd_max_sym_length):
11701 (sc_file_system, sc_obsolete_symbols, sc_prohibit_atoi_atof):
11702 (sc_prohibit_jm_in_m4, sc_root_tests, sc_tight_scope):
11703 (sc_trailing_space): New rules.
11704 (sc_xalloc_h_in_src): Remove.
11705 (sc_cast_of_argument_to_free, sc_cast_of_x_alloc_return_value):
11706 (sc_space_tab, sc_error_exit_success, sc_changelog):
11707 (sc_system_h_headers, sc_sun_os_names, sc_unmarked_diagnostics):
11708 (makefile-check, po-check, author_mark_check):
11709 (makefile_path_separator_check, copyright-check):
11710 Use grep -n, to make it easier to find violations.
11711 Use CVS_LIST and CVS_LIST_EXCEPT.
11712 (header_regexp, h_re): Remove.
11713 (dd_c): New macro.
11714 (sc_dd_max_sym_length, .re-list, news-date-check): New rules.
11715 (my-distcheck): Use more-modern GCC flags.
11716 (signatures, %.asc): Remove.
11717 (rel-files, announcement): Remove signatures.
11718 Restore old updating code, even though we don't use it, so
11719 that we're the same as coreutils.
11720 (alpha, beta, major): Depend on news-date-check.
11721 Make the upload commands.
11722
11723 * data/c.m4, data/lalr1.cc, data/yacc.c: Normalize white space.
11724 * lib/abitset.h, lib/bbitset.h, lib/bitset.h: Likewise.
11725 * lib/bitset_stats.c, lib/ebitset.h, lib/lbitset.c: Likewise.
11726 * lib/libitset.h, lib/timevar.c, lib/vbitset.h: Likewise.
11727 * src/Makefile.am, src/gram.c, src/muscle_tab.h: Likewise.
11728 * src/parse-gram.y, src/system.h, src/tables.c, src/vcg.c: Likewise.
11729 * src/vcg_defaults.h, tests/cxx-type.at, tests/existing.at: Likewise.
11730 * tests/sets.at: Likewise.
11731
11732 * data/m4sugar/m4sugar.m4: Sync from Autoconf, except that
11733 we comment out the Autoconf version number.
11734 * doc/bison.texinfo (Calc++ Scanner): Don't use atoi, as
11735 it's error-prone and "make maintainer-distcheck" rejects it.
11736
11737 * lib/subpipe.c: Include <fcntl.h> without checking for HAVE_FCNTL_H.
11738 Indent calls to "error" to pacify "make maintainer-distcheck",
11739 when the calls are not intended to be translated.
11740 * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't check for fcntl.h.
11741
11742 * src/Makefile.am (DEFS): Use +=, to pacify
11743 "make maintainer-distcheck".
11744 (bison_SOURCES): Add scan-skel.h.
11745 (sc_tight_scope): New rule, from coreutils.
11746
11747 * src/files.c (src_extension, header_extension):
11748 Now static, not extern.
11749 * src/getargs.c (short_options): Likewise.
11750 * src/muscle_tab.c (muscle_table): Likewise.
11751 * src/parse-gram.y (current_class, current_type, current_prec):
11752 Likewise.
11753 * src/reader.c (grammar_end, previous_rule_end): Likewise.
11754 * src/getargs.h: Redo comments to pacify "make maintainer-distcheck".
11755 * src/main.c (main): Cast bindtextdomain and textdomain calls to
11756 void, to avoid warning when NLS is disabled.
11757 * src/output.c: Include scan-skel.h.
11758 (scan_skel): Remove decl, since scan-skel.h does this.
11759 (output_skeleton):
11760 Indent calls to "error" to pacify "make maintainer-distcheck".
11761 * src/print_graph.c: Don't include <obstack.h>, as system.h does this.
11762 * src/reader.h (gram_end, gram_lineno): New decls to pacify
11763 "make maintainer-distcheck".
11764 * src/scan-skel.l (skel_lex, skel_get_lineno, skel_get_in):
11765 (skel_get_out, skel_get_leng, skel_get_text, skel_set_lineno):
11766 (skel_set_in, skel_set_out, skel_get_debug, skel_set_debug):
11767 (skel_lex_destroy, scan_skel): Move these decls to...
11768 * src/scan-skel.h: New file.
11769 * src/uniqstr.c (uniqstr_assert):
11770 Indent calls to "error" to pacify "make maintainer-distcheck".
11771
11772 * tests/Makefile.am ($(srcdir)/package.m4): Use $(VAR),
11773 not @VAR@.
11774
11775 * tests/torture.at: Revamp to avoid misuse of atoi that
11776 "make maintainer-distcheck" complained about.
11777
11778 * examples/extexi (message): Don't print a message more than once,
11779 and omit line-number decoration that makes Emacs compile think
11780 that informative messages are worth worrying about.
11781
11782 2005-07-22 Paul Eggert <eggert@cs.ucla.edu>
11783
11784 * configure.ac: Update version number.
11785
11786 * Makefile.am (SUBDIRS): Add examples; somehow this got removed
11787 accidentally.
11788 * examples/calc++/calc++-parser.yy: Remove from CVS, as it's
11789 autogenerated by the maintainer.
11790 * examples/calc++/.cvsignore: Add *.yy.
11791
11792 * lib/bitset.c (bitset_alloc): Don't cast xcalloc result.
11793 * lib/bitset_stats.c (bitset_stats_init): Likewise.
11794 * lib/bitsetv.c (bitsetv_alloc): Likewise.
11795
11796 * po/POTFILES.in: Add lib/xalloc-die.c; remove lib/xmalloc.c.
11797
11798 * src/relation.c (relation_transpose): Rewrite to avoid bogus complaint
11799 from maintainer-distcheck about casting the argument of 'free'.
11800
11801 * NEWS: Mention recent yytname changes.
11802 * THANKS: Add Anthony Heading, twlevo@xs4all.nl.
11803
11804 * bootstrap: For translations that have not yet been upgraded to
11805 the new runtime-po domain, prime the pump by extracting the
11806 relevant strings from the obsolete translations. This code can be
11807 removed once the bison-runtime domain has been translated by each
11808 team.
11809
11810 * src/scan-gram.l (<SC_PRE_CODE>.): Don't double-quote token names,
11811 now that token names are already quoted.
11812
11813 Fix problem reported by Anthony Heading.
11814 * data/glr.c (YYTOKEN_TABLE): New macro.
11815 (yytname): Define if YYTOKEN_TABLE.
11816 * data/yacc.c (YYTOKEN_TABLE, yytname): Likewise.
11817 * data/lalr1.cc (YYTOKEN_TABLE, yytname_): Likewise.
11818 (YYERROR_VERBOSE): Define the same way the other skeletons do.
11819 * src/output.c (prepare_symbols): Output token_table_flag.
11820
11821 2005-07-21 Paul Eggert <eggert@cs.ucla.edu>
11822
11823 * data/glr.c (yyinitGLRStack, yyreturn): Don't call malloc
11824 again if the first call fails.
11825
11826 * data/glr.c (yytnamerr): New function.
11827 (yyreportSyntaxError): Use it to dequote most string literals.
11828 * data/lalr1.c (yytname_): Renamed from yyname_, for compatibility
11829 with other skeletons. All uses changed.
11830 (yytnameerr_): New function.
11831 (yyreport_syntax_error): Use it to dequote most string literals.
11832 * data/yacc.c (yytnamerr): New function.
11833 (yyerrlab): Use it to decode most string literals.
11834 * doc/bison.texinfo (Decl Summary, Calling Convention):
11835 Clarify quoting convention of yytname.
11836 * src/output.c (prepare_symbols): Quote all names. This undoes
11837 the 2005-04-17 change, which is now accomplished (mostly) via
11838 changes in the parsers as described above.
11839 * tests/regression.at (Token definitions, Web2c Actions):
11840 Undo most 2005-04-17 change here, too.
11841
11842 2005-07-20 Paul Eggert <eggert@cs.ucla.edu>
11843
11844 Fix more problems reported by twlevo@xs4all.nl.
11845 * tests/cxx-type.at: Don't pipe output of ./types through sed to
11846 remove trailing spaces. This loses the exit status of ./types,
11847 and isn't needed since ./types shouldn't be emitting trailing
11848 spaces.
11849 * data/glr.c (yyreturn): Don't pop stack if yyinitStateSet failed,
11850 as the stack isn't valid in that case.
11851
11852 * src/scan-gram.l (gram_get_lineno, gram_get_in, gram_get_out):
11853 (gram_get_leng, gram_get_text, gram_set_lineno, gram_set_in):
11854 (gram_set_out, gram_get_debug, gram_set_debug, gram_lex_destroy):
11855 Add declarations to pacify "gcc -Wmissing-prototypes" when flex 2.5.31
11856 is used.
11857 * src/scan-skel.l (skel_get_lineno, skel_get_in, skel_get_out):
11858 (skel_get_leng, skel_get_text, skel_set_lineno, skel_set_in):
11859 (skel_set_out, skel_get_debug, skel_set_debug, skel_lex_destroy):
11860 Likewise.
11861
11862 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Work even with
11863 overly-picky compilers that reject 'char *foo = "bar";'.
11864
11865 * src/symtab.c (SYMBOL_ATTR_PRINT, symbol_print): Direct output
11866 to FILE * parameter, not to stderr. This fixes a typo introduced
11867 in the 2005-07-12 change.
11868
11869 * lib/subpipe.c (create_subpipe): Rewrite slightly to avoid
11870 warnings from GCC 4.
11871
11872 * data/glr.c (yyexpandGLRStack, yyaddDeferredAction, yyexpandGLRStack):
11873 (yyglrShiftDefer, yysplitStack):
11874 Remove unused parameters b4_pure_formals. All uses changed.
11875 (yyglrShift): Remove unused parameters b4_user_formals.
11876 All uses changed.
11877 (yyglrReduce): Removed unused parameter yylocp. All uses changed.
11878
11879 2005-07-18 Paul Eggert <eggert@cs.ucla.edu>
11880
11881 Destructor cleanups and regularization among the three skeletons.
11882 * NEWS: Document the behavior changes.
11883 * data/glr.c (yyrecoverSyntaxError): Don't bother to pop the
11884 stack before failing, as the cleanup code will do it for us now.
11885 * data/lalr1.cc (yyerrlab): Likewise.
11886 * data/glr.c (yyparse): Pop everything off the stack before
11887 freeing it, so that destructors get called properly.
11888 * data/lalr1.cc (yyreturn): Likewise.
11889 * data/yacc.c (yyreturn): Pop and destroy the start symbol, too.
11890 This is more consistent.
11891 * doc/bison.texinfo (Destructor Decl): Mention more reasons
11892 why destructors might be called. 1.875 -> 2.1.
11893 (Destructor Decl, Decl Summary, Table of Symbols):
11894 Some English-language cleanups for %destructor.
11895 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
11896 Add output line for destructor of start symbol.
11897 * tests/calc.at (AT_CHECK_CALC): Add one to line counts,
11898 because of that same extra output line.
11899
11900 * NEWS: Document minor wording changes in diagnostics of
11901 Bison-generated parsers.
11902 * data/glr.c (yyMemoryExhausted): Renamed from yyStackOverflow.
11903 Remove unused formals. All uses changed.
11904 (yyreportAmbiguity): "ambiguity detected" -> "syntax is ambiguous".
11905 (yyparse): Rename yyoverflowlab to yyexhaustedlab.
11906 * data/yacc.c (yyparse): "parser stack overflow" -> "memory exhausted".
11907 Rename yyoverflowab to yyexhaustedlab.
11908 When memory exhaustion occurs during syntax-error reporting,
11909 report it separately rather than in a single diagnostic; this
11910 eases translation.
11911 * doc/bison.texinfo (Memory Management): Renamed from Stack Overflow.
11912 (Memory Exhausted): Renamed from Parser Stack Overflow.
11913 Revamp wording slightly to prefer "memory exhaustion".
11914 * tests/actions.at: "parser stack overflow" -> "memory exhausted".
11915
11916 * data/c.m4 (b4_yysymprint_generate): Use YYFPRINTF, not fprintf.
11917
11918 Add i18n support to the GLR skeleton. Partially fix the C++
11919 skeleton; a C++ expert needs to finish this. Remove debugging
11920 msgids; there's little point to having them translated, since they
11921 can be understood only by someone who can read the
11922 (English-language) source code.
11923
11924 Generate runtime-po/bison-runtime.pot automatically, so that we
11925 don't have to worry about garbage getting in that file. We'll
11926 make sure after the next official release that old msgids don't
11927 get lost. See
11928 <http://lists.gnu.org/archive/html/bison-patches/2005-07/msg00119.html>.
11929
11930 * runtime-po/Makefile.in.in, runtime-po/bison-runtime.pot: Remove.
11931 Now auto-generated.
11932 * PACKAGING: Don't claim that Gawk, GCC, Perl use this method yet.
11933 Fix typos in explanations of the runtime file.
11934 * bootstrap: Change gettext keyword from YYI18N to YY_.
11935 Use standard Makefile.in.in in runtime-po, since we'll arrange
11936 for backward-compatible bison-runtime.po files in a different way.
11937 * data/glr.c (YY_): New macro, from yacc.c.
11938 (yyuserAction, yyreportAmbiguity, yyreportSyntaxError, yyparse):
11939 Translate messages intended for users.
11940 (yyreportSyntaxError): Change "virtual memory" to "memory" to match
11941 the wording in the other skeletons. We don't know that the memory
11942 is virtual.
11943 * data/lalr1.cc (YY_): Renamed from _. All uses changed.
11944 Use same method that yacc.c uses.
11945 Don't translate debugging messages.
11946 (yy::yyreport_syntax_error): Put in a FIXME for the i18n stuff;
11947 it doesn't work (yet), and requires C++ expertise to fix.
11948 * data/yacc.c (YY_): Renamed from YY18N. All uses changed.
11949 Move defn to a more logical place, to be consistent with other
11950 skeletons.
11951 Don't translate debugging messages.
11952 Don't assume line numbers fit in unsigned int; use unsigned long fmts.
11953 * doc/bison.texinfo: Mention <libintl.h>. Change glibc cross reference
11954 to gettext cross reference. Add indexing terms. Mention YYENABLE_NLS.
11955 * runtime-po/POTFILES.in: Add data/glr.c, data/lalr1.cc.
11956
11957 Fix yyerror / yylex test glitches noted by twlevo@xs4all.nl.
11958 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Have yyerror return
11959 void, not int.
11960 * tests/glr-regression.at (Badly Collapsed GLR States):
11961 Likewise.
11962 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
11963 yylex should return 0 at EOF rather than aborting.
11964
11965 Improve tests for stack overflow in GLR parser.
11966 Problem reported by twlevo@xs4all.nl.
11967 * data/glr.c (struct yyGLRStack): Remove yyerrflag member.
11968 All uses removed.
11969 (yyStackOverflow): Just longjmp, but with value 2 so that caller
11970 can handle the problem.
11971 (YYCHK1): Use goto (a la yacc.c) rather than setting a flag.
11972 (yyparse): New local variable yyresult to record the result.
11973 Use result of setjmp to set it, rather than storing itinto
11974 struct.
11975 (yyDone): Remove label.
11976 (yyacceptlab, yyabortlab, yyoverflowlab, yyreturn): New labels,
11977 to mimic yacc.c. Do not discard lookahead if it's EOF (possible
11978 if YYABORT is used).
11979 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Exit with
11980 yyparse status; put status > 1 into diagnostic.
11981 Check that status==2 works.
11982 * tests/calc.at, tests/cxx-type.at, tests/glr-regression.at:
11983 Use exit status 3 for failure to open (which shouldn't happen).
11984
11985 2005-07-17 Paul Eggert <eggert@cs.ucla.edu>
11986
11987 * tests/conflicts.at (%nonassoc and eof): Don't exit with status
11988 1 on syntax error; just let yyparse do its thing.
11989 * tests/glr-regression.at (Badly Collapsed GLR States): Likewise.
11990 * tests/torture.at (AT_DATA_STACK_TORTURE): Likewise.
11991 (Exploding the Stack Size with Alloca):
11992 (Exploding the Stack Size with Malloc):
11993 Expect exit status 2, not 1, since the parser is supposed to blow
11994 its stack. Problem reported by twlevo@xs4all.nl.
11995
11996 * data/glr.c (yyparse): Don't assume that the initial calls
11997 to YYMALLOC succeed; in that case, yyparse incorrectly returned 0.
11998 Print a stack-overflow message and fail instead.
11999 Initialize the line-number information before creating the stack,
12000 so that the stack-overflow message can report line zero safely.
12001
12002 2005-07-14 Paul Eggert <eggert@cs.ucla.edu>
12003
12004 Fix problems reported by twlevo@xs4all.nl.
12005 * data/glr.c (YYSTACKEXPANDABLE): Don't define if already defined.
12006 (yyuserMerge): Provide a default case if b4_mergers is empty.
12007 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Define YYSTACKEXPANDABLE.
12008 * tests/glr-regression.at
12009 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
12010 Add casts to pacify C++ compilers.
12011 * tests/glr-regression.at (Improper merging of GLR delayed action
12012 sets): Declare yylex before using it.
12013 * tests/Makefile.am (maintainer-check-g++): Fix a stray
12014 $(GXX) that escaped the renaming of GXX to CXX. Remove bogus
12015 test for valgrind; valgrind is independent of g++.
12016 (maintainer-check-posix): Add _POSIX2_VERSION=200112, to check
12017 for compatibility with POSIX 1003.1-2001 (if running coreutils).
12018 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Port to stricter C++.
12019 Use a destructor, so that we can expand the stack. Change
12020 YYSTYPE to char * so that we can free it. Cast result of malloc.
12021
12022 2005-07-13 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
12023
12024 * data/glr.c (yyuserAction): Fix uninitialized variable that caused
12025 a valgrind failure. Problem reported by twlevo@xs4all.nl.
12026
12027 2005-07-13 Paul Eggert <eggert@cs.ucla.edu>
12028
12029 * PACKAGING: New file, suggested by Bruno Haible and taken from
12030 similar wording in gettext's PACKAGING file.
12031 * NEWS: Mention PACKAGING.
12032 * Makefile.am (EXTRA_DIST): Add PACKAGING.
12033
12034 2005-07-12 Paul Eggert <eggert@cs.ucla.edu>
12035
12036 * NEWS: Document recent i18n improvements.
12037 * bootstrap: Get runtime translations into runtime-po.
12038 Create runtime-po files automatically, if possible.
12039 * configure.ac: Invoke BISON_I18N, so that we eat our own dog food.
12040 * data/yacc.c: Rewrite inclusion of <libintl.h> so that ENABLE_NLS
12041 does not infringe on the user's name space.
12042 (YYENABLE_NLS): Renamed from ENABLE_BISON_NLS.
12043 * doc/bison.texinfo (Internationalization): Revamp the English
12044 and Texinfo syntax a bit, to try to make it clearer.
12045 (Bison Options, Option Cross Key): Mention --print-localedir.
12046 * m4/bison-i18n.m4 (BISON_I18N): Rename ENABLE_BISON_NLS to
12047 YYENABLE_NLS. Quote a bit more.
12048 * runtime-po/.cvsignore: New file.
12049 * runtime-po/Makefile.in.in (mostlyclean): Remove *.old.pot.
12050 * runtime-po/Rules-quot: Remove; now created by bootstrap.
12051 * runtime-po/quot.sed: Likewise.
12052 * runtime-po/boldquot.sed: Likewise.
12053 * runtime-po/en@quot.header: Likewise.
12054 * runtime-po/en@boldquot.header: Likewise.
12055 * runtime-po/insert-header.sin: Likewise.
12056 * runtime-po/remove-potcdate.sin: Likewise.
12057 * runtime-po/Makevars: Likewise.
12058 * runtime-po/LINGUAS: Likewise.
12059 * runtime-po/de.po: Likewise; we will rely on the translation project
12060 to maintain this, so "bootstrap" should get it.
12061 * src/getarg.c (PRINT_LOCALEDIR_OPTION): Let the C compiler determine
12062 its value.
12063 * src/main.c (main): Bind the bison-runtime domain, too.
12064
12065 2005-07-12 Bruno Haible <bruno@clisp.org>
12066
12067 * data/yacc.c: Include <libintl.h> when NLS is enabled.
12068 (YYI18N): Renamed from _. Use dgettext when NLS is enabled.
12069 * po/POTFILES.in: Remove autogenerated file src/parse-gram.c.
12070 * runtime-po: New directory.
12071 * runtime-po/Makefile.in.in: New file, copied from po/, with modified
12072 $(DOMAIN).pot-update rule, so that old messages are never dropped.
12073 * runtime-po/Rules-quot: New file, copied from po/.
12074 * runtime-po/quot.sed: Likewise.
12075 * runtime-po/boldquot.sed: Likewise.
12076 * runtime-po/en@quot.header: Likewise.
12077 * runtime-po/en@boldquot.header: Likewise.
12078 * runtime-po/insert-header.sin: Likewise.
12079 * runtime-po/remove-potcdate.sin: Likewise.
12080 * runtime-po/Makevars: New file.
12081 * runtime-po/POTFILES.in: New file.
12082 * runtime-po/LINGUAS: New file.
12083 * runtime-po/bison-runtime.pot: New file.
12084 * runtime-po/de.po: New file.
12085 * m4/bison.m4: New file.
12086 * Makefile.am (SUBDIRS): Add runtime-po.
12087 (aclocaldir, aclocal_DATA): New variables.
12088 * configure.ac: Add AC_CONFIG_FILES of runtime-po/Makefile.in.
12089 Define aclocaldir.
12090 * src/getargs.c (usage): Document --print-localedir option.
12091 (PRINT_LOCALEDIR_OPTION): New enum item.
12092 (long_options): Add --print-localedir option.
12093 (getargs): Handle --print-localedir option.
12094 * doc/bison.texinfo (Bison Parser): Remove paragraph about _().
12095 (Internationalization): New section.
12096
12097 2005-07-12 Akim Demaille <akim@epita.fr>
12098
12099 * src/symtab.h, src/symtab.c (symbol_print): Swap the arguments,
12100 for consistency with the rest of the code.
12101 * src/symlist.h, src/symlist.c (symbol_list_print): Ditto.
12102 Add separators.
12103
12104 2005-07-12 Akim Demaille <akim@epita.fr>
12105
12106 * src/parse-gram.y: Use %printer instead of YYPRINT.
12107
12108 2005-07-12 Akim Demaille <akim@epita.fr>
12109
12110 * src/symtab.h, src/symtab.c (symbol_print): New.
12111 * src/symlist.h, src/symlist.c (symbol_list_print): New.
12112 * src/symlist.c (symbol_list_n_type_name_get): Report the culprit.
12113
12114 2005-07-12 Akim Demaille <akim@epita.fr>
12115
12116 * data/glr.c (b4_syncline): Fix (swap) the definitions of
12117 b4_at_dollar and b4_dollar_dollar.
12118
12119 2005-07-11 Paul Eggert <eggert@cs.ucla.edu>
12120
12121 * doc/bison.texinfo (Mystery Conflicts): Add reference to DeRemer
12122 and Pennello's paper.
12123
12124 2005-07-09 Paul Eggert <eggert@cs.ucla.edu>
12125
12126 * data/yacc.c (yyparse): Undo previous patch. Instead,
12127 set yylsp[0] and yyvsp[0] only if the initial action
12128 sets yylloc and yylval, respectively.
12129
12130 * data/yacc.c (yyparse): In the initial action, set
12131 yylsp[0] and yyvsp[0] rather than yylloc and yylval.
12132 This avoids the use of undefined variables if the initial
12133 action does not set yylloc and/or yylval.
12134
12135 2005-07-07 Paul Eggert <eggert@cs.ucla.edu>
12136
12137 * examples/calc++/calc++-driver.cc, examples/calc++/calc++-driver.hh:
12138 * examples/calc++/calc++-scanner.ll, examples/calc++/calc++.cc:
12139 Remove from CVS. These files are automatically generated.
12140 * examples/extexi: Clarify that this file is now part of Bison,
12141 not GNU M4, and that it works with any POSIX-compatible Awk.
12142 * examples/calc++/Makefile.am (run_extexi): Remove; not used.
12143 ($(calc_extracted)): Renamed from $(calc_sources_extracted),
12144 so that we also get calc++-parser.yy. Geneate it.
12145 Use $(AWK), not gawk, since any conforming Awk will do.
12146 Put comment before action, since older 'make' can't handle comment
12147 in action.
12148 $(BUILT_SOURCES): List all built sources, not just some of them.
12149 $(MAINTAINERCLEANFILES): Remove *.stamp, and all built sources.
12150 $($(srcdir)/calc++-parser.stamp): Work even if POSIXLY_CORRECT.
12151 $($(calc_sources_generated)): Remove unnecessary test for existence
12152 of target. (This had a shell syntax error anyway; a stray "x".)
12153 (calc_extracted): List $(srcdir)/calc++-parser.yy, not
12154 calc++-parser.yy.
12155 * examples/.cvsignore, examples/calc++/.cvsignore: New files.
12156
12157 * bootstrap (gnulib_modules): Add gettext, now that it's no longer
12158 implied by the other modules.
12159
12160 2005-07-06 Akim Demaille <akim@epita.fr>
12161
12162 Bind examples/calc++ to the package.
12163 * examples/calc++/Makefile: Remove, replaced by...
12164 * examples/calc++/Makefile.am: ... this new file.
12165 * examples/calc++/test: Remove input.
12166 * examples/calc++/compile: Remove.
12167 * examples/Makefile.am: New.
12168 * configure.ac, Makefile.am: Adjust.
12169 * doc/Makefile.am (clean-local): New, for more recent texi2dvis.
12170
12171 2005-07-05 Paul Eggert <eggert@cs.ucla.edu>
12172
12173 * data/glr.c (yyFail): Drastically simplify; since the format argument
12174 never had any % directives, we can simply pass it to yyerror.
12175 (yyparse): Use "t a; a=b;" rather than "t a = b;" when a will
12176 be modified later, as that is the usual style in glr.c.
12177 Problems reported by Paul Hilfinger.
12178
12179 Rewrite GLR parser to catch more buffer overrun, storage exhaustion,
12180 and size overflow errors.
12181 * data/glr.c: Include <stdio.h> etc. after user prolog, not before,
12182 in case the user prolog sets feature-test macros like _GNU_SOURCE.
12183 (YYSIZEMAX): New macro.
12184 (yystpcpy): New function, taken from yacc.c.
12185 (struct yyGLRStack.yyspaceLeft): Now size_t, not int.
12186 (yyinitGLRStack, yyfreeGLRstack): Remove unnecessary forward decls,
12187 so that we don't have to maintain their signatures.
12188 (yyFail): Check for buffer overflow, by using vsnprintf rather
12189 than vsprintf. Allocate a bigger buffer if possible.
12190 Report an error if buffer allocation fails.
12191 (yyStackOverflow): New function.
12192 (yyinitStateSet, yyinitGLRStack): Return a boolean indicating whether
12193 the initialization was successful. It might fail if storage was
12194 exhausted.
12195 (yyexpandGLRStack): Add more checks for storage allocation failure.
12196 Use yyStackOverflow to report failures.
12197 (yymarkStackDeleted, yyglrShift, yyglrShiftDefer, yydoAction):
12198 (yysplitStack, yyprocessOneStack, yyparse, yypstack):
12199 Don't assume stack number fits in int.
12200 (yysplitStack): Check for storage allocation failure.
12201 (yysplitStack, yyprocessOneStack): Add pure_formals, so that we
12202 can print diagnostics on storage allocation failure. All callers
12203 changed.
12204 (yyresolveValue): Use yybool for boolean.
12205 (yyreportSyntaxError): Check for size-calculation overflow.
12206 This code is taken from yacc.c.
12207 (yyparse): Check for storage allocation errors when allocating
12208 the initial stack.
12209
12210 2005-07-05 Akim Demaille <akim@epita.fr>
12211
12212 Extract calc++ from the documentation.
12213 * doc/bison.texinfo (Calc++): Add the extraction marks.
12214 * examples/extexi: New, from the aborted GNU Programming 2E.
12215 Separate the different paragraph of a file with empty lines.
12216 * examples/Makefile: Use it to extract the whole calc++ example.
12217
12218 2005-06-24 Akim Demaille <akim@epita.fr>
12219
12220 * doc/bison.texinfo (C++ Parser Interface): Use defcv to define
12221 class typedefs.
12222
12223 2005-06-22 Akim Demaille <akim@epita.fr>
12224
12225 * doc/bison.texinfo (C++ Language Interface): First stab.
12226 (C++ Parsers): Remove.
12227
12228 2005-06-22 Akim Demaille <akim@epita.fr>
12229
12230 * data/lalr1.cc (yylex_): Honor %lex-param.
12231
12232 2005-06-22 Akim Demaille <akim@epita.fr>
12233
12234 Start a set of simple examples.
12235 * examples/calc++/Makefile, examples/calc++/calc++-driver.cc,
12236 * examples/calc++/calc++-driver.hh,
12237 * examples/calc++/calc++-parser.yy,
12238 * examples/calc++/calc++-scanner.ll, examples/calc++/calc++.cc,
12239 * examples/calc++/compile, examples/calc++/test: New.
12240
12241 2005-06-09 Paul Eggert <eggert@cs.ucla.edu>
12242
12243 * data/yacc.c (malloc, free) [defined __cplusplus]: Wrap inside
12244 extern "C" {}. This fixes a problem reported by Paul Hilfinger,
12245 which stems from the 2005-05-27 patch.
12246
12247 2005-06-06 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
12248
12249 * data/glr.c: Modify treatment of unused parameters to permit use
12250 of g++ (which doesn't allow __attribute__ ((unused)) for parameters).
12251
12252 2005-05-30 Paul Eggert <eggert@cs.ucla.edu>
12253
12254 Fix infringement on user name space reported by Janos Zoltan Szabo.
12255 * data/yacc.c (yyparse): strlen -> yystrlen.
12256
12257 2005-05-30 Akim Demaille <akim@epita.fr>
12258
12259 * data/lalr1.cc (_): New.
12260 Translate the various messages.
12261
12262 2005-05-27 Paul Eggert <eggert@cs.ucla.edu>
12263
12264 Fix infringement on user name space reported by Bruno Haible.
12265 * data/yacc.c (YYSIZE_T): Define first, so that later decls can use it.
12266 Prefer GCC's __SIZE_TYPE__ if available, so that we don't infringe on
12267 the user's name space.
12268 (alloca): Include <stdlib.h> to get it, if it's not built in.
12269 (YYMALLOC, YYFREE): Define only if needed.
12270 (malloc, free): Declare, but only if needed, as this infringes on
12271 the user name space.
12272
12273 2005-05-25 Paul Eggert <eggert@cs.ucla.edu>
12274
12275 Fix BeOS, FreeBSD, MacOS porting problems reported by Bruno Haible.
12276 * lib/bitset.c (bitset_print): Don't assume size_t can be printed
12277 with %d format.
12278 * lib/ebitset.c (min, max): Undef before defining.
12279 * lib/vbitset.c (min, max): Likewise.
12280 * lib/subpipe.c (create_subpipe): Save local variables in case
12281 vfork clobbers them.
12282
12283 2005-05-24 Bruno Haible <bruno@clisp.org>
12284
12285 * tests/synclines.at (AT_SYNCLINES_COMPILE): Add support for the
12286 error message syntax used by gcc-4.0.
12287
12288 2005-05-23 Paul Eggert <eggert@cs.ucla.edu>
12289
12290 * README: Mention m4 1.4.3. Remove obsolete advice about
12291 Sun Forte Developer 6 update 2, VMS, and MS-DOS.
12292
12293 * bootstrap: Remove workaround for problem I encountered with
12294 gettext 0.14.1; it seems to be fixed now.
12295
12296 2005-05-22 Paul Eggert <eggert@cs.ucla.edu>
12297
12298 * NEWS: Version 2.0a.
12299
12300 * src/files.c: Include "stdio-safer.h"; this fixes a typo in
12301 the previous change.
12302
12303 Various maintainer cleanups.
12304 * .cvsignore: Add a.exe, a.out, b.out,, conf[0-9]*, confdefs*,
12305 conftest*, for benefit of CVS commands run at the same time as
12306 "configure". Add build-aux, since "bootstrap" now creates it and
12307 its subfiles.
12308 * Makefile.cfg (move_if_change): Remove.
12309 * Makefile.maint: Remove the update stuff; we now use "bootstrap".
12310 (ftp-gnu, www-gnu, move_if_change, local_updates, update):
12311 (po_repo, do-po-update, po-update, wget_files, get-targets):
12312 (config.guess-url_prefix, config.sub-url_prefix):
12313 (ansi2knr.c-url_prefix, texinfo.tex-url_prefix):
12314 (standards.texi-url_prefix, make-stds.texi-url_prefix, taget, url):
12315 ($(get-targets), cvs-files, automake_repo, wget-update, cvs-update):
12316 Remove.
12317 * configure.ac (AC_CONFIG_AUX_DIR): Change from config to build-aux;
12318 this is now the recommended name.
12319 * config/.cvsignore: Remove config.guess, config.rpath, config.sub,
12320 depcomp, install-sh, mdate-sh, missing, mkinstalldirs, texinfo.tex,
12321 ylwrap. These files now go into build-aux.
12322 * config/move-if-change: Remove.
12323 * config/prev-version.txt: Bump from 1.75 to 2.0.
12324
12325 * bootstrap: Add stdio-safer, unistd-safer modules.
12326 Remove m4/glibc2.m4 (introduced by latest gnulib, but
12327 we don't need it).
12328 * lib/.cvsignore: Add dup-safer.c, fd-safer.c,
12329 fopen-safer.c, stdio-safer.h, unistd-safer.h.
12330 * lib/subpipe.c: Include "unistd-safer.h".
12331 (create_subpipe): Make sure all the newly-created
12332 file descriptors are > 2, so that diagnostics don't
12333 get sent down them (which might cause Bison to hang, in theory).
12334 * m4/.cvsignore: Add stdio-safer.m4, unistd-safer.m4.
12335 * src/files.c (xfopen): Use fopen_safer, not fopen.
12336
12337 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Port
12338 yesterday's yacc.c fix.
12339
12340 2005-05-21 Paul Eggert <eggert@cs.ucla.edu>
12341
12342 * data/glr.c, data/lalr1.cc: Update copyright date.
12343
12344 Fix a destructor bug reported by Wolfgang Spraul in
12345 <http://lists.gnu.org/archive/html/bug-bison/2005-05/msg00042.html>.
12346 * data/yacc.c (yyabortlab): Don't call destructor, and
12347 don't set yychar to EMPTY.
12348 (yyoverflowlab): Don't call destructor.
12349 (yyreturn): Call destructor, if yychar is neither YYEOF nor YYEMPTY.
12350 * tests/calc.at (AT_CHECK_CALC): Expect one fewer output lines,
12351 since we no longer output the message "discarding lookahead token
12352 end of input ()".
12353
12354 2005-05-20 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
12355
12356 * data/glr.c (YY_SYMBOL_PRINT): Don't print newline at end to
12357 fix a small glitch in debugging output.
12358 (yyprocessOneStack, yyrecoverSyntaxError, yyparse): Print newline
12359 after YY_SYMBOL_PRINT where needed.
12360
12361 (struct yyGLRState): Add some comments.
12362 (struct yySemanticOption): Add some comments.
12363 (union yyGLRStackItem): Add comment.
12364
12365 (yymergeOptionSets): Correct this to properly perform the union,
12366 avoiding infinite reported by Michael Rosien.
12367 Update comment.
12368
12369 * tests/glr-regression.at: Add test for GLR merging error reported
12370 by M. Rosien.
12371
12372 2005-05-13 Paul Eggert <eggert@cs.ucla.edu>
12373
12374 * COPYING, ChangeLog, GNUmakefile, HACKING, Makefile.am,
12375 Makefile.cfg, Makefile.maint, NEWS, README, README-alpha,
12376 README-cvs, TODO, bootstrap, configure.ac, data/Makefile.am,
12377 data/README, data/c.m4, data/glr.c, data/lalr1.cc, data/yacc.c,
12378 data/m4sugar/m4sugar.m4, doc/Makefile.am, doc/bison.texinfo,
12379 doc/fdl.texi, doc/gpl.texi, doc/refcard.tex, lib/Makefile.am,
12380 lib/abitset.c, lib/abitset.h, lib/bbitset.h, lib/bitset.c,
12381 lib/bitset.h, lib/bitset_stats.c, lib/bitset_stats.h,
12382 lib/bitsetv-print.c, lib/bitsetv-print.h, lib/bitsetv.c,
12383 lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/get-errno.c,
12384 lib/get-errno.h, lib/lbitset.c, lib/lbitset.h, lib/libiberty.h,
12385 lib/main.c, lib/subpipe.c, lib/subpipe.h, lib/timevar.c,
12386 lib/timevar.def, lib/timevar.h, lib/vbitset.c, lib/vbitset.h,
12387 lib/yyerror.c, m4/cxx.m4, m4/m4.m4, m4/subpipe.m4, m4/timevar.m4,
12388 m4/warning.m4, src/LR0.c, src/LR0.h, src/Makefile.am, src/assoc.c,
12389 src/assoc.h, src/closure.c, src/closure.h, src/complain.c,
12390 src/complain.h, src/conflicts.c, src/conflicts.h, src/derives.c,
12391 src/derives.h, src/files.c, src/files.h, src/getargs.c,
12392 src/getargs.h, src/gram.c, src/gram.h, src/lalr.c, src/lalr.h,
12393 src/location.c, src/location.h, src/main.c, src/muscle_tab.c,
12394 src/muscle_tab.h, src/nullable.c, src/nullable.h, src/output.c,
12395 src/output.h, src/parse-gram.c, src/parse-gram.h,
12396 src/parse-gram.y, src/print.c, src/print.h, src/print_graph.c,
12397 src/print_graph.h, src/reader.c, src/reader.h, src/reduce.c,
12398 src/reduce.h, src/relation.c, src/relation.h, src/scan-gram.l,
12399 src/scan-skel.l, src/state.c, src/state.h, src/symlist.c,
12400 src/symlist.h, src/symtab.c, src/symtab.h, src/system.h,
12401 src/tables.c, src/tables.h, src/uniqstr.c, src/uniqstr.h,
12402 src/vcg.c, src/vcg.h, src/vcg_defaults.h, tests/Makefile.am,
12403 tests/actions.at, tests/c++.at, tests/calc.at, tests/conflicts.at,
12404 tests/cxx-type.at, tests/existing.at, tests/glr-regression.at,
12405 tests/headers.at, tests/input.at, tests/local.at, tests/output.at,
12406 tests/reduce.at, tests/regression.at, tests/sets.at,
12407 tests/synclines.at, tests/testsuite.at, tests/torture.at:
12408 Update FSF postal mail address.
12409
12410 2005-05-11 Paul Eggert <eggert@cs.ucla.edu>
12411
12412 * tests/local.at (AT_COMPILE_CXX): Treat LDFLAGS like AT_COMPILE does.
12413 Problem reported by Ralf Menzel.
12414
12415 2005-05-01 Paul Eggert <eggert@cs.ucla.edu>
12416
12417 * tests/actions.at: Test that stack overflow invokes destructors.
12418 From Marcus Holland-Moritz.
12419 * data/yacc.c (yyerrlab): Move the code that destroys the stack
12420 from here....
12421 (yyreturn): to here. That way, destructors are called properly
12422 even if the stack overflows, or the user calls YYACCEPT or
12423 YYABORT. Stack-overflow problem reported by Marcus Holland-Moritz.
12424 (yyoverflowlab): Destroy the lookahead.
12425
12426 2005-04-24 Paul Eggert <eggert@cs.ucla.edu>
12427
12428 * data/yacc.c (YYSTACK_ALLOC_MAXIMUM): Add more-descriptive comment.
12429
12430 2005-04-17 Paul Eggert <eggert@cs.ucla.edu>
12431
12432 * NEWS: Bison-generated C parsers no longer quote literal strings
12433 associated with tokens.
12434 * src/output.c (prepare_symbols): Don't escape strings,
12435 since users don't want to see C escapes.
12436 * tests/calc.at (AT_CHECK_CALC): Adjust to lack of quotes
12437 in diagnostics.
12438 * tests/input.at (Torturing the Scanner): Likewise.
12439 * tests/regression.at (Token definitions, Web2c Actions): Likewise.
12440
12441 2005-04-16 Paul Eggert <eggert@cs.ucla.edu>
12442
12443 * tests/torture.at (AT_INCREASE_DATA_SIZE): Skip the test if
12444 the data size is known to be too small and we can't increase it.
12445 This works around an HP-UX 11.00 glitch reported by Andrew Benham.
12446
12447 2005-04-15 Paul Eggert <eggert@cs.ucla.edu>
12448
12449 * src/parse-gram.y: Include quotearg.h.
12450 (string_as_id): Quote $1 before using it as a key, since the
12451 lexer no longer quotes it for us.
12452 (string_content): Don't strip quotes, since lexer no longer
12453 quotes it for us.
12454 * src/scan-gram.l: Include quotearg.h.
12455 ("\""): Omit quote.
12456 ("'"<SC_ESCAPED_CHARACTER>): Quote symbol before using it as
12457 a key, since the rest of the lexer doesn't quote it.
12458 * src/symtab.c (symbol_get): Don't quote symbol; caller does it now.
12459 * tests/regression.at (Token definitions): Check for backslashes
12460 in token strings.
12461
12462 * data/yacc.c (YYSTACK_ALLOC_MAXIMUM): New macro.
12463 (YYSIZE_T): Define to unsigned long int when using an older compiler.
12464 (yyparse): Revamp code to generate long syntax error message, to
12465 make it easier to translate, and to avoid problems with arithmetic
12466 overflow. Change "virtual memory" to "memory" in diagnostic, since
12467 we don't know whether the memory is virtual.
12468
12469 2005-04-13 Paul Eggert <eggert@cs.ucla.edu>
12470
12471 * NEWS: Bison-generated C parsers now use the _ macro to
12472 translate strings.
12473 * data/yacc.c (_) [!defined _]: New macro.
12474 All English strings wrapped inside this macro.
12475 * doc/bison.texinfo (Bison Parser): Document _.
12476 * po/POTFILES.in: Include src/parse-gram.c, since it now
12477 includes translateable strings that parse-gram.y doesn't.
12478
12479 2005-04-12 Paul Eggert <eggert@cs.ucla.edu>
12480
12481 * src/symtab.c (symbol_make_alias): Call symbol_type_set,
12482 reverting the 2004-10-11 change to this function.
12483 (symbol_check_alias_consistency): Don't call symbol_type_set
12484 if the type name is already correct.
12485 * tests/input.at (Typed symbol aliases): New test, from Tim Van Holder.
12486
12487 2005-03-25 Paul Eggert <eggert@cs.ucla.edu>
12488
12489 * tests/regression.at (Token definitions): Don't use a token named
12490 c, as that generates a "#define c ..." that runs afoul of buggy
12491 stdlib.h that uses the identifier c as a member of struct
12492 drand48_data. Problem reported by Horst Wente.
12493
12494 2005-03-21 Paul Eggert <eggert@cs.ucla.edu>
12495
12496 * bootstrap: Change translation URL from
12497 http://www2.iro.umontreal.ca/~gnutra/po/maint/bison/ to
12498 http://www.iro.umontreal.ca/translation/maint/bison/ to avoid
12499 redirection glitches. Problem reported by twlevo@xs4all.nl.
12500
12501 2005-03-20 Paul Eggert <eggert@cs.ucla.edu>
12502
12503 * tests/local.at (AT_COMPILE, AT_COMPILE_CXX): Don't put options
12504 after operands; POSIX says this isn't portable for the c99 command.
12505
12506 2005-03-18 Paul Eggert <eggert@cs.ucla.edu>
12507
12508 * tests/glr-regression.at (glr-regr2a.y): Try to dump core
12509 immediately if a data overrun has occurred; this may help us track
12510 down what may be a spurious failure on MacOS.
12511
12512 2005-03-17 Paul Eggert <eggert@cs.ucla.edu>
12513
12514 Respond to problems reported by twlevo@xs4all.nl.
12515
12516 * bootstrap: Use "trap - 0" rather than the unportable "trap 0".
12517
12518 * src/vcg.h: Comment fix.
12519 * src/vcg_defaults.h: Parenthesize macro bodies to make them safe.
12520 (G_CMAX): Change to -1 instead of INT_MAX.
12521
12522 * data/yacc.c (yyparse): Omit spaces before #line.
12523
12524 2005-03-15 Paul Eggert <eggert@cs.ucla.edu>
12525
12526 * src/tables.c (state_number_to_vector_number): Put it inside an
12527 "#if 0", since it's not currently used. Problem reported by
12528 Roland McGrath.
12529
12530 2005-03-06 Paul Eggert <eggert@cs.ucla.edu>
12531
12532 * src/output.c (escaped_output): Renamed from
12533 escaped_file_name_output, since we now use it for symbol tags as
12534 well. All uses changed.
12535 (symbol_destructors_output, symbol_printers_output):
12536 Escape symbol tags too.
12537 Problem reported by Matyas Forstner in
12538 <http://lists.gnu.org/archive/html/bug-bison/2005-03/msg00009.html>.
12539
12540 * src/muscle_tab.c (muscle_code_grow): Don't quote numbers; it's
12541 not needed.
12542 * src/output.c (user_actions_output, token_definitions_output,
12543 symbol_destructors_output, symbol_printers_output): Likewise.
12544 * src/reader.c (prologue_augment): Likewise.
12545 * src/scan-gram.l (handle_action_dollar, handle_action_at): Likewise.
12546
12547 * src/vcg.c (output_edge): Don't quote linestyle arg.
12548 Problem reported by twlevo@xs4all.nl.
12549
12550 2005-02-28 Paul Eggert <eggert@cs.ucla.edu>
12551
12552 * doc/bison.texinfo (Semantic Tokens): Fix scoping problem in
12553 example, reported by Derek M Jones. Also, make the example even
12554 more outrageous, to better illustrate how bad the problem is.
12555
12556 2005-02-24 Paul Eggert <eggert@cs.ucla.edu>
12557
12558 * doc/bison.texinfo (Mfcalc Symtab): Correct the prototype for
12559 putsym. Typo reported by Sebastian Piping.
12560
12561 2005-02-23 Paul Eggert <eggert@cs.ucla.edu>
12562
12563 * doc/bison.texinfo (Language and Grammar): some -> same
12564 (Epilogue): int he -> in the
12565 Typos reported by Sebastian Piping via Justin Pence.
12566
12567 2005-02-07 Paul Eggert <eggert@cs.ucla.edu>
12568
12569 * tests/glr-regression.at (Improper handling of embedded actions
12570 and dollar(-N) in GLR parsers): Renamed from "Improper handling of
12571 embedded actions and $-N in GLR parsers", work around an Autoconf bug
12572 with dollar signs in test names.
12573 * tests/input.at (Invalid dollar-n): Renamed from "Invalid \$n",
12574 for a similar reason.
12575
12576 2005-01-28 Paul Eggert <eggert@cs.ucla.edu>
12577
12578 * src/vcg.c (output_graph): G_VIEW -> normal_view in case someone
12579 wants to redefine G_VIEW.
12580
12581 2005-01-27 Paul Eggert <eggert@cs.ucla.edu>
12582
12583 * src/vcg.c (get_view_str): Remove case for normal_view.
12584 Problem reported by twlevo@xs4all.nl.
12585
12586 2005-01-24 Paul Eggert <eggert@cs.ucla.edu>
12587
12588 * configure.ac (O0CFLAGS, O0CXXFLAGS): Fix quoting bug.
12589 Problem reported by twlevo@xs4all.nl.
12590
12591 * doc/bison.texinfo: Change @dircategory from "GNU programming
12592 tools" to "Software development". Requested by Richard Stallman
12593 via Karl Berry.
12594
12595 2005-01-23 Paul Eggert <eggert@cs.ucla.edu>
12596
12597 * tests/c++.at (AT_CHECK_DOXYGEN): Don't use options after operands.
12598 Problem reported by twlevo@xs4all.nl.
12599
12600 2005-01-21 Paul Eggert <eggert@cs.ucla.edu>
12601
12602 * data/yacc.c (YYCOPY, yystpcpy, yyparse): Remove "register"
12603 keyword; it's not needed with modern compilers, and it doesn't
12604 affect correctness with older compilers. Suggested by
12605 twlevo@xs4all.nl.
12606
12607 2005-01-17 Paul Eggert <eggert@cs.ucla.edu>
12608
12609 * data/glr.c (yyuserAction): Add "default: break;" case to pacify
12610 gcc -Wswitch-default.
12611 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
12612 * data/yacc.c (yyparse): Likewise.
12613
12614 2005-01-12 Paul Eggert <eggert@cs.ucla.edu>
12615
12616 * src/system.h (OUTPUT_EXT, TAB_EXT): Define only if not defined
12617 already. Let config.h define any nonstandard values.
12618
12619 2005-01-10 Paul Eggert <eggert@cs.ucla.edu>
12620
12621 * tests/calc.at (_AT_DATA_CALC_Y): Use alarm (100), not alarm (10),
12622 for the benefit of slower hosts. Problem reported by
12623 Nelson H. F. Beebe.
12624
12625 2005-01-07 Paul Eggert <eggert@cs.ucla.edu>
12626
12627 * data/yacc.c (yyparse): Pacify non-GCC compilers about yyerrorlab
12628 being defined and not used.
12629 * data/lalr1.cc (yyparse): Likewise.
12630 Use "if (false)" rather than "if (0)".
12631
12632 2005-01-05 Paul Eggert <eggert@cs.ucla.edu>
12633
12634 * TODO: Mention that we should allow NUL bytes in tokens.
12635
12636 2005-01-02 Paul Eggert <eggert@cs.ucla.edu>
12637
12638 * src/scan-skel.l (<<EOF>>): Don't close standard output.
12639 Problem reported by Hans Aberg.
12640
12641 2005-01-01 Paul Eggert <eggert@cs.ucla.edu>
12642
12643 * src/getargs.c (version): Happy new year; update overall
12644 program copyright date from 2004 to 2005.
12645
12646 * src/scan-skel.l ("@output ".*\n): Don't close standard output.
12647 Problem reported by Hans Aberg.
12648 * tests/output.at (AT_CHECK_OUTPUT): New arg SHELLIO.
12649 (Output file names.): Add a test for the case when standard output
12650 is closed.
12651
12652 2004-12-26 Paul Eggert <eggert@cs.ucla.edu>
12653
12654 * doc/bison.texinfo (@copying): Update FDL version number to 1.2,
12655 to fix an oversight in the Bison 2.0 manual.
12656
12657 2004-12-25 Paul Eggert <eggert@cs.ucla.edu>
12658
12659 * NEWS: Version 2.0. Reformat the existing news items since
12660 1.875, so that related items are grouped together.
12661 * configure.ac (AC_INIT): Bump version to 2.0.
12662 * src/parse-gram.c, src/parse-gram.h: Regenerate with 2.0.
12663
12664 * tests/torture.at (Exploding the Stack Size with Alloca): Set
12665 YYSTACK_USE_ALLOCA to 1 if __GNUC__ or alloca are defined;
12666 otherwise, we're not testing alloca. Unfortunately there's no
12667 simple way to consult HAVE_ALLOCA here.
12668
12669 * data/lalr1.cc (yydestruct_): Pacify unused variable warning
12670 for yymsg, too.
12671
12672 * src/LR0.c (new_itemsets): Use memset rather than zeroing by
12673 hand. This avoids a warning about comparing int to size_t when
12674 GCC warnings are enabled.
12675
12676 2004-12-22 Paul Eggert <eggert@cs.ucla.edu>
12677
12678 * NEWS: Bison-generated parsers no longer default to using the
12679 alloca function (when available) to extend the parser stack, due
12680 to widespread problems in unchecked stack-overflow detection.
12681 * data/glr.c (YYMAXDEPTH): Remove undef when zero. It's the user's
12682 responsibility to set it to a positive value. This lets the user
12683 specify a value that is not a preprocessor constant.
12684 * data/yacc.c (YYMAXDEPTH): Likewise.
12685 (YYSTACK_ALLOC): Define only if YYSTACK_USE_ALLOCA is nonzero.
12686 * doc/bison.texinfo (Stack Overflow): YYMAXDEPTH no longer needs
12687 to be a compile-time constant. However, explain the constraints on it.
12688 Also, explain the constraints on YYINITDEPTH.
12689 (Table of Symbols): Explain that alloca is no longer the default.
12690 Explain the user's responsibility if they define YYSTACK_USE_ALLOCA
12691 to 1.
12692
12693 * doc/bison.texinfo (Location Default Action): Mention that n must
12694 be zero when k is zero. Suggested by Frank Heckenbach.
12695
12696 2004-12-22 Akim Demaille <akim@epita.fr>
12697
12698 * data/lalr1.cc (parser::token_number_type, parser::rhs_number_type)
12699 (parser::state_type, parser::semantic_type, parser::location_type):
12700 Private, not public.
12701 (parser::parse): Return ints, not bool.
12702 Returning a bool introduces a problem: 0 corresponds to false, and
12703 it seems weird to return false on success. Returning true changes
12704 the conventions for yyparse.
12705 Alternatively we could return void and send an exception.
12706 There is no clear consensus (yet?).
12707 (state_stack, semantic_stack, location_stack): Rename as...
12708 (state_stack_type, semantic_stack_type, location_stack_type): these.
12709 Private, not public.
12710 * tests/c++.at: New.
12711 * tests/testsuite.at, tests/Makefile.am: Adjust.
12712
12713 2004-12-21 Akim Demaille <akim@epita.fr>
12714
12715 * data/lalr1.cc (parser::parse): Return a bool instead of an int.
12716
12717 2004-12-21 Akim Demaille <akim@epita.fr>
12718
12719 Don't impose std::string for filenames.
12720
12721 * data/lalr1.cc (b4_filename_type): New.
12722 (position::filename): Use it.
12723 (parser.hh): Move the inclusion of stack.hh and location.hh below
12724 the user code, so that needed headers for the filename type can be
12725 included first.
12726 Forward declare them before the user code.
12727 * tests/Makefile.am (check-local, installcheck-local): Pass
12728 TESTSUITEFLAGS to the TESTSUITE.
12729
12730 2004-12-20 Akim Demaille <akim@epita.fr>
12731
12732 Use more STL like names: my_class instead of MyClass.
12733
12734 * data/lalr1.cc (LocationStack, LocationType, RhsNumberType)
12735 (SemanticStack, SemanticType, StateStack, StateType)
12736 (TokenNumberType, Stack, Slice, Traits, Parser::location)
12737 (Parser::value): Rename as...
12738 (location_stack, location_type, rhs_number_type, semantic_stack)
12739 (semantic_type, state_stack, state_type, token_number_type, stack)
12740 (slice, traits, parser::yylloc, parser::yylval): these.
12741
12742 * tests/calc.at, tests/regression.at, tests/actions.at: Adjust.
12743
12744 2004-12-19 Paul Eggert <eggert@cs.ucla.edu>
12745
12746 * data/glr.c (YYLLOC_DEFAULT): Use GNU spacing conventions.
12747 * data/yacc.c (YYLLOC_DEFAULT): Likewise.
12748
12749 2004-12-17 Paul Eggert <eggert@cs.ucla.edu>
12750
12751 Remove uses of 'short int' and 'unsigned short int'. This raises
12752 some arbitrary limits. It uses more memory but nowadays that's
12753 not much of an issue.
12754
12755 This change does not affect the generated parsers; that's a different
12756 task, as some users will want to conserve memory there.
12757
12758 Ideally we should use size_t to represent all object counts, and
12759 something like ptrdiff_t to represent signed differences of object
12760 counts; but that will require more code-cleanup than I have the
12761 time to do right now.
12762
12763 * src/LR0.c (allocate_itemsets, new_itemsets, save_reductions):
12764 Use size_t, not int or short int, to count objects.
12765 * src/closure.c (nritemset, closure): Likewise.
12766 * src/closure.h (nritemset, closure): Likewise.
12767 * src/nullable.c (nullable_compute): Likewise.
12768 * src/print.c (print_core): Likewise.
12769 * src/print_graph.c (print_core): Likewise.
12770 * src/state.c (state_compare, state_hash): Likewise.
12771 * src/state.h (struct state): Likewise.
12772 * src/tables.c (default_goto, goto_actions): Likewise.
12773
12774 * src/gram.h (rule_number, rule): Use int, not short int.
12775 * src/output.c (prepare_rules): Likewise.
12776 * src/state.h (state_number, STATE_NUMBER_MAXIMUM, transitions,
12777 errs, reductions): Likewise.
12778 * src/symtab.h (symbol_number, SYMBOL_NUMBER_MAXIMUM, struct symbol):
12779 Likewise.
12780 * src/tables.c (vector_number, tally, action_number,
12781 ACTION_NUMBER_MINIMUM): Likewise.
12782 * src/output.c (muscle_insert_short_int_table): Remove.
12783
12784 2004-12-17 Akim Demaille <akim@epita.fr>
12785
12786 * data/lalr1.cc: Extensive Doxygenation.
12787 (error_): Rename as...
12788 (error): this, since it is visible to the user.
12789 Adjust callers.
12790 (Parser::message): Now an automatic variable from...
12791 (Parser::yyreport_syntax_error_): here.
12792 * tests/actions.at, tests/calc.at, tests/regression.at: Adjust to
12793 Parser::error.
12794 * tests/input.at: Escape $.
12795
12796 2004-12-16 Paul Eggert <eggert@cs.ucla.edu>
12797
12798 * data/glr.c (b4_lhs_value, b4_rhs_value, b4_rhs-location):
12799 Parenthesize rhs to avoid obscure problems with mistakes like
12800 "foo$$bar = foo$1bar;". Problem reported by twlevo at xs4all.
12801 * data/lalr1.cc (b4_lhs_value, b4_rhs_value, b4_lhs_location,
12802 b4_rhs_location): Likewise.
12803 * data/yacc.c (b4_lhs_value, b4_rhs_value, b4_lhs_location,
12804 b4_rhs_location): Likewise.
12805
12806 2004-12-16 Akim Demaille <akim@epita.fr>
12807
12808 * data/lalr1.cc (yyreport_syntax_error_): Catch up with glr.c and
12809 yacc.c: be sure to stay within yycheck_.
12810 * tests/actions.at: Re-enable C++ tests.
12811
12812 2004-12-16 Akim Demaille <akim@epita.fr>
12813
12814 * src/print_graph.c (print_graph): Remove layoutalgorithm uses for
12815 real.
12816
12817 2004-12-16 Akim Demaille <akim@epita.fr>
12818
12819 Use #define to handle the %name-prefix.
12820
12821 * data/glr.c, data/yacc.c: Comment changes.
12822 * data/lalr1.cc (yylex): Use #define to select the name of yylex,
12823 so that one can refer to yylex in the parser file, and have it
12824 renamed, as is the case with other skeletons.
12825
12826 2004-12-16 Akim Demaille <akim@epita.fr>
12827
12828 Move lalr1.cc internals into yy*.
12829
12830 * data/lalr1.cc (semantic_stack_, location_stack_, state_stack_)
12831 (semantic_stack_, location_stack_, pact_, pact_ninf_, defact_)
12832 (pgoto_, defgoto_, table_, table_ninf_, check_, stos_, r1_, r2_)
12833 (name_, rhs_, prhs_, rline_, token_number_, eof_, last_, nnts_)
12834 (empty_, final_, terror_, errcode_, ntokens_)
12835 (user_token_number_max_, undef_token_, n_, len_, state_, nerrs_)
12836 (looka_, ilooka_, error_range_, nerrs_):
12837 Rename as...
12838 (yysemantic_stack_, yylocation_stack_, yystate_stack_)
12839 (yysemantic_stack_, yylocation_stack_, yypact_, yypact_ninf_)
12840 (yydefact_, yypgoto_, yydefgoto_, yytable_, yytable_ninf_)
12841 (yycheck_, yystos_, yyr1_, yyr2_, yyname_, yyrhs_, yyprhs_)
12842 (yyrline_, yytoken_number_, yyeof_, yylast_, yynnts_, yyempty_)
12843 (yyfinal_, yyterror_, yyerrcode_, yyntokens_)
12844 (yyuser_token_number_max_, yyundef_token_, yyn_, yylen_, yystate_)
12845 (yynerrs_, yylooka_, yyilooka_, yyerror_range_, yynerrs_):
12846 these.
12847
12848 2004-12-15 Paul Eggert <eggert@cs.ucla.edu>
12849
12850 Fix some problems reported by twlevo at xs4all.
12851 * src/symtab.c (symbol_new): Report an error if the input grammar
12852 contains too many symbols. This is better than calling abort() later.
12853 * src/vcg.h (enum layoutalgorithm): Remove. All uses removed.
12854 (struct node, struct graph):
12855 Rename member expand to stretch. All uses changed.
12856 (struct graph): Remove member layoutalgorithm. All uses removed.
12857 * src/vcg.c (get_layoutalgorithm_str): Remove. All uses removed.
12858 * src/vcg_defaults.h (G_STRETCH): Renamed from G_EXPAND.
12859 All uses changed.
12860 (N_STRETCH): Rename from N_EXPAND. All uses changed.
12861
12862 2004-12-15 Akim Demaille <akim@epita.fr>
12863
12864 * data/lalr1.cc: Normalize /** \brief ... */ to ///.
12865 Add more Doxygen comments.
12866 (symprint_, stack_print_, reduce_print_, destruct_, pop)
12867 (report_syntax_error_, translate_): Rename as...
12868 (yysymprint_, yystack_print_, yyreduce_print_, yydestruct_)
12869 (yypop_, yyreport_syntax_error_, yytranslate_): this.
12870
12871 2004-12-15 Akim Demaille <akim@epita.fr>
12872
12873 * data/lalr1.cc (lex_): Rename as...
12874 (yylex_): this.
12875 Move the trace here.
12876 Take the %name-prefix into account.
12877 Reported by Alexandre Duret-Lutz.
12878
12879 2004-12-15 Akim Demaille <akim@epita.fr>
12880
12881 Simplify the C++ parser constructor.
12882
12883 * data/lalr1.cc (debug_): Rename as...
12884 (yydebug_): so that the parser's internals are always in the yy*
12885 pseudo namespace.
12886 Adjust uses.
12887 (b4_parse_param_decl): Remove the leading comma as it is now only
12888 called as unique argument list.
12889 (Parser::Parser): Remove the constructor accepting a location and
12890 an initial debugging level.
12891 Remove from the other ctor the argument for the debugging level.
12892 (debug_level_type, debug_level, set_debug_level): New.
12893
12894 * tests/actions.at, tests/calc.at, tests/regression.at: Adjust
12895 constructor calls.
12896
12897 2004-12-15 Akim Demaille <akim@epita.fr>
12898
12899 Remove b4_root related material: failure experiment
12900 (which goal was to allow to derive from a class).
12901
12902 * data/lalr1.cc (b4_root, b4_param, b4_constructor): Remove
12903 definitions and uses.
12904
12905 2004-12-14 Paul Eggert <eggert@cs.ucla.edu>
12906
12907 * data/glr.c (struct yyGLRStack): yyerror_range now has 3 items,
12908 not 2, since it's not portable to subtract 1 from the start of an
12909 array. The new item 0 is never set or used. All uses changed.
12910
12911 (yyrecoverSyntaxError): Use YYLLOC_DEFAULT instead of assuming
12912 the default definition of YYLLOC_DEFAULT. Problem reported
12913 by Frank Heckenbach.
12914
12915 2004-12-12 Paul Eggert <eggert@cs.ucla.edu>
12916
12917 * data/glr.c (YYRHSLOC): Don't have two definitions, one for
12918 the normal case and one for the error case. Just use the
12919 first one uniformly. Problem reported by Frank Heckenbach.
12920 (YYLLOC_DEFAULT): Use the conventions of yacc.c, so we can
12921 use exactly the same macro in both places.
12922 (yyerror_range): Now of type yyGLRStackItem, not YYLTYPE,
12923 so that the normal-case YYRHSLOC works for the error case too.
12924 All uses changed.
12925 * data/yacc.c (YYRHSLOC): New macro, taken from glr.c.
12926 (YYLLOC_DEFAULT): Use the same macro as glr.c.
12927 * doc/bison.texinfo (Location Default Action): Don't claim that
12928 we have an array of locations. Use the same macro for both glr
12929 and lalr parsers. Mention YYRHSLOC. Mention what happens when
12930 the index is 0.
12931
12932 2004-12-10 Paul Eggert <eggert@cs.ucla.edu>
12933
12934 * HACKING: Update email addresses to send announcements to.
12935
12936 * configure.ac (AC_INIT): Bump version to 1.875f.
12937
12938 2004-12-10 Paul Eggert <eggert@cs.ucla.edu>
12939
12940 * NEWS: Version 1.875e.
12941 * src/parse-gram.c, src/parse-gram.h: Regenerate with 1.875e.
12942
12943 * src/scan-skel.l: Include "complain.h", for "fatal".
12944
12945 * src/relation.h (relation_print, relation_digraph):
12946 Relation sizes are of type relation_node, not size_t (this is
12947 merely a doc fix, since the two types are equivalent).
12948 (relation_transpose): Relation sizes are of type relation_node,
12949 not int.
12950 * src/relation.c: Likewise.
12951 (top, infinity): Now of type relation_node, not int.
12952 (traverse, relation_transpose): Use relation_node, not int.
12953
12954 * data/glr.c (yyuserAction, yyrecoverSyntaxError): Mark args
12955 with ATTRIBUTE_UNUSED if they're not used, to avoid GCC warning.
12956 (yyparse): Remove unused local introduced in 2004-10-25 patch.
12957
12958 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): New arg
12959 specifying whether the test should be skipped. Use it tp
12960 specify that the [%defines %skeleton "lalr1.cc"] tests currently
12961 fail on some hosts, and should be skipped.
12962
12963 2004-12-08 Paul Eggert <eggert@cs.ucla.edu>
12964
12965 * src/system.h (CALLOC, MALLOC, REALLOC): Remove. All callers
12966 changed to use xcalloc, xnmalloc, xnrealloc, respectively,
12967 unless otherwise specified below.
12968
12969 * src/LR0.c (allocate_itemsets): Use xnmalloc, not xcalloc,
12970 to allocate kernel_base, kernel_items, kernel_size, since
12971 they needn't be initialized to 0.
12972 (allocate_storgae): Likewise, for shiftset, redset, shift_symbol.
12973 * src/closure.c (new_closure): Likewise, for itemset.
12974 * src/derives.c (derives_compute): Likewise, for delts, derives, q.
12975 * src/lalr.c (set_goto_map): Likewise, for temp_map.
12976 (initialize_F): Likewise, for reads, edge, reads[i], includes[i].
12977 (build_relations): Likewise for edge, states1, includes.
12978 * src/nullable.c (nullable_compute): Likewise, for squeue, relts.
12979 * src/reader.c (packgram): Likewise, for ritem, rules.
12980 * src/reduce.c (nonterminals_reduce): Likewise for nontermmap.
12981 * src/relation.c (relation_digraph): Likewise for VERTICES.
12982 (relation_transpose): Likewise for new_R, end_R.
12983 * src/symtab.c (symbols_token_translations_init): Likewise for
12984 token_translations.
12985 * src/tables.c (save_row): Likewise for froms, tos, conflict_tos.
12986 (token_actions): Likewise for yydefact, actrow, conflrow,
12987 conflict_list.
12988 (save_column): Likewise for froms[symno], tos[symno].
12989 (goto_actions): Likewise for state_count.
12990 (pack_table): Likewise for base, pos, check.
12991 (tables_generate): Likewise for width.
12992
12993 * src/LR0.c (set_states): Don't reuse kernel_size and kernel_base
12994 for initial core. Just have a separate core, so we needn't worry
12995 about whether kernel_size and kernel_base are initialized.
12996
12997 * src/LR0.c (shift_symbol, redset, shiftset, kernel_base,
12998 kernel_size, kernel_items): Remove unnecessary initialization.
12999 * src/conflicts.c (conflicts): Likewise.
13000 * src/derives.c (derives): Likewise.
13001 * src/muscle_tablc (muscle_insert): Likewise.
13002 * src/relation.c (relation_digraph): Likewise.
13003 * src/tables.c (froms, tos, conflict_tos, tally, width, actrow, order,
13004 conflrow, conflict_table, conflict_list, table, check):
13005 Likewise.
13006
13007 * src/closure.c (new_closure): Arg is of type unsigned int, not int.
13008 This is because all callers pass unsigned int.
13009 * src/closure.h (new_closure): Likewise.
13010
13011 * src/lalr.c (initialize_F): Initialize reads[i] in all cases.
13012 (build_relations): Initialize includes[i] in all cases.
13013 * src/reader.c (packgram): Always initialize rules[ruleno].prec
13014 and rules[ruleno].precsym. Initialize members in order.
13015 * src/relation.c (relation_transpose): Always initialize new_R[i]
13016 and end_R[i].
13017 * src/table.c (conflict_row): Initialize 0 at end of conflict_list.
13018
13019 * src/output.c (prepare_actions): Pass 0 instead of conflict_list[0];
13020 conflict_list[0] was always 0, but now it isn't initialized.
13021
13022 * src/table.c (table_grow): When conflict_table grew, the grown
13023 area wasn't cleared. Fix this.
13024
13025 * lib/.cvsignore: Add strdup.c, strdup.h.
13026 * m4/.cvsignore: Add strdup.m4.
13027
13028 2004-12-07 Paul Eggert <eggert@cs.ucla.edu>
13029
13030 * src/lalr.h (GOTO_NUMBER_MAXIMUM): New macro.
13031 * src/lalr.c (set_goto_map): Don't allow ngotos to equal
13032 GOTO_NUMBER_MAXIMUM, since we occasionally compute
13033 ngotos + 1 without checking for overflow.
13034 (build_relations): Use END_NODE, not -1, to denote end of edges.
13035 * src/lalr.c (set_goto_map, map_goto, initialize_F, add_loopback_edge,
13036 build_relations): Use goto_number, not int, for goto numbers.
13037 * src/tables.c (save_column, default_goto): Likewise.
13038
13039 2004-11-23 Akim Demaille <akim@epita.fr>
13040
13041 * data/lalr1.cc (YYSTYPE): Define it as is done for C, instead
13042 of #defining from yystype.
13043 Don't typedef yystype, C++ does not need it.
13044 This lets it possible to forward declare it as union.
13045
13046 2004-11-23 Paul Eggert <eggert@cs.ucla.edu>
13047
13048 * bootstrap (gnulib_modules): Add extensions.
13049 Problem reported by Jim Meyering.
13050
13051 2004-11-22 Paul Eggert <eggert@cs.ucla.edu>
13052
13053 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c,
13054 src/lalr.c, src/nullable.c, src/relation.c, src/scan-skel.l,
13055 src/system.h, src/tables.c: XFREE -> free, to accommodate
13056 recent change to gnulib xalloc.h.
13057 Problem reported by Jim Meyering.
13058
13059 2004-11-17 Akim Demaille <akim@epita.fr>
13060
13061 * data/lalr1.cc (symprint_): Use cdebug_ to avoid warnings.
13062
13063 2004-11-17 Akim Demaille <akim@epita.fr>,
13064 Alexandre Duret-Lutz <adl@gnu.org>
13065
13066 * data/lalr1.cc (Parser::yycdebug_): New, a pointer, to allow
13067 changes.
13068 (YYCDEBUG): Adjust.
13069 Use it instead of cdebug_.
13070 (Parser::debug_stream, Parser::set_debug_stream): New.
13071 (Parser::symprint_): Define cdebug_ for temporary backward
13072 compatibility.
13073 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use
13074 debug_stream ().
13075
13076 2004-11-17 Akim Demaille <akim@epita.fr>
13077
13078 * data/lalr1.cc (Parser:print_): Remove, use %printer instead.
13079 * tests/regression.at (_AT_DATA_DANCER_Y): Adjust.
13080 * tests/calc.at (_AT_DATA_CALC_Y): Ditto.
13081 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
13082
13083 2004-10-27 Paul Eggert <eggert@cs.ucla.edu>
13084
13085 * data/glr.c (yyloc_default): Remove; not used.
13086 Problem reported by Frank Heckenbach.
13087
13088 2004-10-25 Akim Demaille <akim@epita.fr>
13089
13090 * data/glr.c (YYRHSLOC): Move its definition next to its uses.
13091 Introduce another definition to address simple location arrays.
13092 (yyGLRStack): New member: yyerror_range.
13093 (yyrecoverSyntaxError, yyparse): Update it.
13094 (yyrecoverSyntaxError): Use it when shifting the error token to
13095 have an accurate range, equivalent to the one computed by both
13096 yacc.c and lalr1.cc.
13097 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Change its yylex so
13098 that column numbers start at column 0, as per GNU Coding
13099 Standards, the others tests, and the doc.
13100 (_AT_RESOLVED_GLR_OUTPUT_WITH_LOC, _AT_AMBIG_GLR_OUTPUT_WITH_LOC):
13101 Adjust to the above change (first column is 0).
13102 And adjust the location of the "<error>", now covering the whole
13103 line.
13104
13105 2004-10-22 Akim Demaille <akim@epita.fr>
13106 and Paul Eggert <eggert@cs.ucla.edu>
13107
13108 Remove some arbitrary limits on goto numbers and relations.
13109 * src/lalr.c (goto_map, ngotos, from_state, to_state): Omit
13110 initial values, since they're never used.
13111 (set_goto_map): ngotos is now unsigned, so test for overflow
13112 by seeing whether it wraps around to zero.
13113 * src/lalr.h (goto_number): Now size_t, not short int.
13114 (GOTO_NUMBER_MAXIMUM): Remove.
13115 * src/relation.c (relation_print, traverse, relation_transpose):
13116 Check for END_NODE rather than looking at sign.
13117 * src/relation.h (END_NODE): New macro.
13118 (relation_node): Now size_t, not short int.
13119
13120 2004-10-22 Paul Eggert <eggert@cs.ucla.edu>
13121
13122 * doc/bison.texinfo (Language and Grammar): In example, "int" is a
13123 keyword, not an identifier. Problem reported by Baron Schwartz in
13124 <http://lists.gnu.org/archive/html/bug-bison/2004-10/msg00017.html>.
13125
13126 2004-10-11 Akim Demaille <akim@epita.fr>
13127
13128 * src/symtab.c (symbol_check_alias_consistency): Also check
13129 type names, destructors, and printers.
13130 Reported by Alexandre Duret-Lutz.
13131 Recode the handling of associativity and precedence in terms
13132 of symbol_precedence_set.
13133 Accept no redeclaration at all, not even equal to the previous
13134 value.
13135 (redeclaration): New.
13136 Use it to factor redeclaration complaints.
13137 (symbol_make_alias): Don't set the type of the alias, let
13138 symbol_check_alias_consistency do it as for other features.
13139 * src/symtab.h (symbol): Add new member prec_location, and
13140 type_location.
13141 * src/symtab.c (symbol_precedence_set, symbol_type_set): Set them.
13142 * tests/input.at (Incompatible Aliases): New.
13143
13144 2004-10-09 Paul Eggert <eggert@cs.ucla.edu>
13145
13146 .cvsignore fixes to accommodate gnulib changes,
13147 and the practice of naming build directories "_build".
13148 * .cvsignore: Add "_*". Sort.
13149 * lib/.cvsignore: Add getopt_.h, xalloc-die.c.
13150 * m4/.cvsignore: Add "*_gl.m4".
13151
13152 2004-10-06 Akim Demaille <akim@epita.fr>
13153
13154 * src/parse-gram.y (add_param): Fix the truncation of trailing
13155 spaces.
13156
13157 2004-10-05 Akim Demaille <akim@epita.fr>
13158
13159 In Bison 1.875's yacc.c, YYLLOC_DEFAULT was called regardless
13160 whether the reducion was empty or not. This leaves room to
13161 improve the use of YYLLOC_DEFAULT in such a case.
13162 lalr1.cc is still experimental, so changing this is acceptable.
13163 And finally, there are probably not many users who changed the
13164 handling of locations in GLR, so changing is admissible too.
13165
13166 * data/glr.c, data/lalr1.cc, data/yacc.c (YYLLOC_DEFAULT): On an
13167 empty reduction, set @$ to an empty location ending the previously
13168 stacked symbol.
13169 Adjust uses to make sure the code is triggered on empty
13170 reductions.
13171 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust the
13172 expected output: empty reductions have empty locations.
13173
13174 2004-09-29 Akim Demaille <akim@epita.fr>
13175
13176 * data/lalr1.cc: Move towards a more standard C++ coding style
13177 for templates: Class < T > -> Class<T>.
13178
13179 2004-09-29 Akim Demaille <akim@epita.fr>
13180
13181 * data/lalr1.cc: Reinstall the former ctor, for sake of
13182 compatibility, but warn it will be removed.
13183 Move towards a more standard C++ coding style (i.e., type *var ->
13184 type* var).
13185
13186 2004-09-27 Paul Eggert <eggert@cs.ucla.edu>
13187
13188 * src/parse-gram.y (add_param): Rewrite to avoid strchr,
13189 since it's less likely to work if NULs are involved in the future.
13190
13191 2004-09-27 Akim Demaille <akim@epita.fr>
13192
13193 * data/yacc.c (YY_LOCATION_PRINT): Fix its default declaration.
13194
13195 2004-09-27 Akim Demaille <akim@epita.fr>
13196
13197 * data/lalr1.cc (b4_parse_param_decl_1): New.
13198 (b4_parse_param_decl): Use it to have different names between attribute
13199 and argument names.
13200 (b4_cc_constructor_call): Likewise.
13201
13202 2004-09-24 Akim Demaille <akim@epita.fr>
13203
13204 * src/parse-gram.y (add_param): Strip the leading and trailing
13205 blanks from a formal argument declaration.
13206 (YY_LOCATION_PRINT): New.
13207
13208 2004-09-24 Akim Demaille <akim@epita.fr>
13209
13210 * data/c.m4 (b4_yysymprint_generate): Move the YYINPUT invocation
13211 after the location.
13212
13213 2004-09-24 Akim Demaille <akim@epita.fr>
13214
13215 * doc/bison.texinfo (Table of Symbols): Sort.
13216
13217 2004-09-21 Akim Demaille <akim@epita.fr>
13218
13219 * data/yacc.c, data/glr.c (b4_at_dollar, b4_dollar_dollar): Remove
13220 the useless parentheses.
13221 Suggested by Paul Eggert.
13222
13223 2004-09-20 Akim Demaille <akim@epita.fr>
13224
13225 Let the initial-action act on the look-ahead, and use it for the
13226 "initial push" (corresponding to an hypothetical beginning-of-file).
13227 And let lalr1.cc honor %initial-action.
13228
13229 * doc/bison.texinfo (Initial Action Decl): Clarify, and add an
13230 example.
13231 * data/lalr1.cc (Parser::initlocation_): Remove, bad experiment.
13232 (Parser::Parser): Remove the ctor that used to initialize it.
13233 (Parser::parse): Like in the other skeletons, issue the "starting
13234 parse" message before any action.
13235 Honor %initial-action.
13236 Initialize the stacks with the lookahead.
13237 * data/yacc.c: Let $$ and @$ in %initial-action designate the
13238 look-ahead.
13239 Push them in the stacks.
13240 * tests/actions.at, tests/calc.at: Adjust the C++ ctor invocations.
13241
13242 2004-09-20 Akim Demaille <akim@epita.fr>
13243
13244 * doc/bison.texinfo (Initial Action Decl): New.
13245
13246 2004-09-20 Akim Demaille <akim@epita.fr>
13247
13248 * data/yacc.c (YY_LOCATION_PRINT): Use YYLTYPE_IS_TRIVIAL as a
13249 clearer criterion to define it.
13250 (parse): Initialize the initial location when YYLTYPE_IS_TRIVIAL.
13251 When reducing on an empty RHS, use the latest stacked location as
13252 location.
13253 yylloc is not always available.
13254 * data/glr.c: Likewise.
13255 Also, honor initial-actions.
13256
13257 2004-09-20 Akim Demaille <akim@epita.fr>
13258
13259 * data/yacc.c (YY_LOCATION_PRINT): New.
13260 Define when we know YYLTYPE's structure, i.e., when the default
13261 YYLLOC_DEFAULT is used.
13262 * data/c.m4 (b4_yysymprint_generate): Use it.
13263 * data/lalr1.cc (YYLLOC_DEFAULT): Stop relying on the initial
13264 value of the result.
13265 (error_start_): Replace with...
13266 (error_range_): this location array.
13267 This allows to replace code relying on the implementation of
13268 locations by portable code.
13269 * data/yacc.c (yylerrsp): Replace with...
13270 (yyerror_range): this.
13271 Every time a token is popped, update yyerror_range[0], to have an
13272 accurate location for the error token.
13273 * data/glr.c (YY_LOCATION_PRINT): New.
13274 (yyprocessOneStack): Fix an invocation of YY_SYMBOL_PRINT:
13275 deference a pointer.
13276 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): No longer
13277 report the location in %printers.
13278
13279 * src/scan-skel.l: Instead of abort, report error messages to ease
13280 understanding skeleton scanning failures.
13281
13282 2004-09-16 Akim Demaille <akim@epita.fr>
13283
13284 * data/lalr1.cc (Stack::Iterator, Stack::ConstIterator): Rename as...
13285 (iterator, const_iterator): these, to be more in the C++ spirit.
13286 Also, return reverse iterators so that when displaying the stack
13287 we display its bottom first.
13288 (Parser::stack_print_, Parser::reduce_print_): Match the messages
13289 from yacc.c.
13290 We should probably use vector here though.
13291
13292 2004-09-16 Akim Demaille <akim@epita.fr>
13293
13294 Have more complete shift traces.
13295
13296 * data/yacc.c, data/lalr1.c, data/glr.c: Use YY_SYMBOL_PRINT
13297 to report Shifts instead of ad hoc YYDPRINTF invocations,
13298 including for the error token.
13299 * data/lalr1.cc (symprint_): Output the location.
13300 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): In C++, don't
13301 output the location within the %printer.
13302 Activate GLR tests, at least to make sure they compile properly.
13303 They still don't pass though.
13304 * tests/calc.at: Adjust expect verbose output, since now "Entering
13305 state..." is on a different line than the "Shifting" message.
13306
13307 2004-09-08 Akim Demaille <akim@epita.fr>
13308
13309 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Move the
13310 Bison directive from the Bison file to the invocation of this
13311 macro, so that these directives are passed to
13312 AT_BISON_OPTION_PUSHDEFS to get correct help macros.
13313 Use these helping macros (e.g., AT_LOC, AT_VAL and so forth).
13314 Move the AT_SETUP/AT_CLEANUP outside, to report as test title
13315 the extra Bison directives instead of the whole series.
13316 Change the grammar so that there are recoverable errors, and
13317 unrecoverable errors. Now we can have the parser give up before
13318 consuming the whole input. As a result we now can observe that
13319 the lookahead is freed when needed.
13320 Change the parser source to parse argv[1] instead of a hard coded
13321 string.
13322 Simplify yylex, and give a value and location to EOF.
13323 Simplify some invocations of AT_CHECK_PRINTER_AND_DESTRUCTOR that
13324 passed directives already coded in the file.
13325 Add some tests to check the location of "error".
13326 For some tests, the C++ parser is correct, and not yacc.c.
13327 For other tests, they provide different, but unsatisfying, values,
13328 so keep the C++ value so that at least one parser is "correct"
13329 according to the test suite.
13330 (Actions after errors): Remove, this is subsumed by the
13331 AT_CHECK_PRINTER_AND_DESTRUCTOR series.
13332
13333 2004-09-06 Akim Demaille <akim@epita.fr>
13334
13335 * data/lalr1.cc: Adjust the indentation of the labels.
13336 (Parser::pop): New.
13337 Use it.
13338
13339 2004-09-06 Akim Demaille <akim@epita.fr>
13340
13341 * data/yacc.cc, data/glr.cc (yydestruct): Accept an additional
13342 argument, an informative message.
13343 Call YY_SYMBOL_PRINT.
13344 Adjust all callers: integrate the associated YY_SYMBOL_PRINT.
13345 * data/lalr1.cc (destruct_): Likewise.
13346 In addition, no longer depend on b4_yysymprint_generate and
13347 b4_yydestruct_generate to generate these functions, do it "by
13348 hand".
13349
13350 2004-09-03 Akim Demaille <akim@epita.fr>
13351
13352 * data/glr.c, data/lalr1.cc, data/yacc.c: When YYABORT was
13353 invoked, yydestruct the lookahead.
13354 * tests/calc.at (Calculator $1): Update the expected lengths of
13355 traces: there is an added line for the discarded lookahead.
13356 * doc/bison.texinfo (Destructor Decl): Some rewording.
13357 Define "discarded" symbols.
13358
13359 2004-09-02 Akim Demaille <akim@epita.fr>
13360
13361 * data/lalr1.cc (translate_, destruct_): No reason to be static.
13362
13363 2004-09-02 Akim Demaille <akim@epita.fr>
13364
13365 * data/glr.c, yacc.c (YYDSYMPRINT): Remove, not used.
13366 (YYDSYMPRINTF): Rename as...
13367 (YY_SYMBOL_PRINT): this.
13368 * data/lalr1.cc (YY_SYMBOL_PRINT): New, modeled after the previous
13369 two.
13370 Use it instead of direct symprint_ calls.
13371 (yybackup): Tweak the "Now at end of input" case to match yacc.c's
13372 one.
13373
13374 2004-09-02 Akim Demaille <akim@epita.fr>
13375
13376 * data/lalr1.cc (b4_yysymprint_generate): New.
13377 (symprint_): New member function, defined when YYDEBUG.
13378 Use it consistently instead of token/nterm debugging output by
13379 hand.
13380 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust
13381 %printer calls to use cdebug_ when using lalr1.cc.
13382
13383 2004-08-30 Florian Krohm <florian@edamail.fishkill.ibm.com>
13384
13385 * data/glr.c: Guard the declarations of yypstack and yypdumpstack
13386 with #ifdef YYDEBUG.
13387
13388 2004-08-26 Akim Demaille <akim@epita.fr>
13389
13390 * doc/bison.texinfo (Implementing Loops): Rename as...
13391 (Implementing Gotos/Loops): this.
13392
13393 2004-08-13 Paul Eggert <eggert@cs.ucla.edu>
13394
13395 Adjust to latest gnulib.
13396 * bootstrap (gnulib_modules): Add xalloc-die.
13397 Set LC_ALL=C so that file names sort consistently.
13398 Prefer the gnulib copies of gettext.m4, glibc21.m4,
13399 inttypes_h.m4, lib-ld.m4, lib-prefix.m4, po.m4, stdint_h.m4,
13400 uintmax_t.m4, ulonglong.m4.
13401 (intl_files_to_remove): Add gettext.m4, lib-ld.m4, lib-prefix.m4,
13402 po.m4 since we are now using _gl.m4 instead.
13403
13404 2004-08-10 Florian Krohm <florian@edamail.fishkill.ibm.com>
13405
13406 * src/scan-action.l: Remove. Scanning of semantic actions is
13407 handled in scan-gram.l.
13408
13409 2004-08-07 Florian Krohm <florian@edamail.fishkill.ibm.com>
13410
13411 * src/scan-gram.l (handle_syncline): Use uniqstr_new not xstrdup.
13412
13413 * src/location.h (struct): The file member is a uniqstr.
13414 (equal_boundaries): Use UNIQSTR_EQ for comparison.
13415
13416 2004-07-22 Paul Eggert <eggert@cs.ucla.edu>
13417
13418 Fix bug with non-%union parsers that have printers or destructors,
13419 which led to a Bison core dump. Reported by Peter Fales in
13420 <http://lists.gnu.org/archive/html/bug-bison/2004-07/msg00014.html>.
13421
13422 * data/c.m4 (b4_symbol_actions): Don't assume %union was used.
13423 * data/lalr1.cc (yystype) [defined YYSTYPE]: Define to YYSTYPE,
13424 not to our own type.
13425 * src/output.c (symbol_destructors_output, symbol_printers_output):
13426 Don't assume %union.
13427 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR,
13428 AT_CHECK_PRINTER_AND_DESTRUCTOR): New argument
13429 UNION-FLAG. All callers changed.
13430 (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Don't assume %union.
13431 Use type char, not unsigned int, when declaring an array of char;
13432 this lets us remove a cast.
13433 (Printers and Destructors): Add non-%union test cases.
13434
13435 2004-06-21 Paul Eggert <eggert@cs.ucla.edu>
13436
13437 * doc/bison.texinfo: Minor editorial changes, mostly to the new
13438 GLR writeups. E.g., avoid frenchspacing and the future tense,
13439 change "lookahead" to "look-ahead", and change "wrt" to "with
13440 respect to".
13441
13442 2004-06-21 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
13443
13444 * doc/bison.texinfo (Merging GLR Parses, Compiler Requirements):
13445 New sections, split off from the GLR Parsers section. Put the new
13446 Simple GLR Parser near the start of the GLR section, for clarity.
13447 Rewrite connective text.
13448
13449 2004-06-21 Frank Heckenbach <frank@g-n-u.de>
13450
13451 * doc/bison.texinfo (Simple GLR Parsers): New section.
13452
13453 2004-06-21 Paul Eggert <eggert@cs.ucla.edu>
13454
13455 * NEWS, TODO, doc/bison.texinfo:
13456 Use "look-ahead" instead of "lookahead", to be consistent.
13457 * REFERENCES: Fix incorrect reference to DeRemer and Pennello,
13458 while we're fixing "look-ahead".
13459 * src/conflicts.c (shift_set): Renamed from shiftset.
13460 (look_ahead_set): Renamed from lookaheadset.
13461 * src/print.c: Likewise.
13462 * src/getargs.c (report_args): Add "look-ahead" as the new canonical
13463 name for "lookahead".
13464 (report_types, usage): Likewise.
13465 * src/getargs.h (report_look_ahead_tokens): Renamed from
13466 report_lookaheads.
13467 * src/lalr.c (compute_look_ahead_tokens): Renamed from
13468 compute_lookaheads.
13469 (state_look_ahead_tokens_count): Renamed from state_lookaheads_count.
13470 (look_ahead_tokens_print): Renamed from lookaheads_print.
13471 * src/state.c (state_rule_look_ahead_tokens_print): Renamed from
13472 state_rule_lookaheads_print.
13473 * src/state.h: Likewise.
13474 (reductions.look_ahead_tokens): Renamed from lookaheads.
13475 * tests/torture.at (AT_DATA_LOOK_AHEAD_TOKENS_GRAMMAR): Renamed from
13476 AT_DATA_LOOKAHEADS_GRAMMAR.
13477
13478 2004-06-03 Paul Eggert <eggert@cs.ucla.edu>
13479
13480 * README: Update location of patched M4 distribution.
13481
13482 2004-05-30 Albert Chin-A-Young <china@thewrittenword.com>
13483
13484 Don't assume the C++ compiler takes the same arguments as the C compiler
13485 (trivial change).
13486 * configure.ac (O0CXXFLAGS): New var.
13487 * tests/atlocal.in (CXXFLAGS): Use it.
13488
13489 2004-05-29 Paul Eggert <eggert@cs.ucla.edu>
13490
13491 Fix some "make check" problems with C++ reported by
13492 Albert Chin-A-Young for Tru64 C++ in this thread:
13493 http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00049.html
13494
13495 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check for std::cerr.
13496 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
13497 Output to a .cc file for C++, not to a .c file.
13498 * tests/calc.at (AT_CHECK_CALC): Likewise.
13499 * tests/regression.at (AT_CHECK_DANCER): Likewise.
13500 * tests/local.at (AT_COMPILE_CXX): Default to OUTPUT.cc, not OUTPUT.c.
13501
13502 2004-05-28 Albert Chin-A-Young <china@thewrittenword.com>
13503
13504 * tests/calc.at, tests/actions.at: Workaround for SGI
13505 C++ compiler. (trivial change)
13506
13507 2004-05-27 Paul Eggert <eggert@cs.ucla.edu>
13508
13509 Spent a few hours checking out which prerequisite versions the
13510 current sources actually require. I went all the way back to
13511 Gettext 0.10.40, Automake 1.4, and Autoconf 2.57 and investigated
13512 a seemingly endless set of combinations of versions more recent
13513 than that. The bottom line is that the current sources require
13514 fairly recent versions of the build tools, and it'll be some work
13515 to change this.
13516 * configure.ac (AC_PREREQ): Increase from 2.58 to 2.59.
13517 (AM_INIT_AUTOMAKE): Increase from 1.7 to 1.8.
13518 (AM_GNU_GETTEXT_VERSION): Increase from 0.11.5 to 0.12.
13519 Add comments explaining why those particular versions are
13520 currently needed.
13521
13522 * src/parse-gram.y (lloc_default): Rewrite to avoid compiler bug
13523 in SGI MIPSpro 7.4.1m. Problem reported by Albert Chin-A-Young in
13524 <http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00037.html>.
13525
13526 * configure.ac (AC_PREREQ): Bump to 2.58, since 2.57 doesn't work
13527 (it fails with a Autoconf-without-aclocal-m4 diagnostic).
13528
13529 2004-05-26 Paul Eggert <eggert@cs.ucla.edu>
13530
13531 * configure.ac (AM_GNU_GETTEXT_VERSION): Lower it from 0.14.1 to
13532 0.11.5. Suggested by Bruno Haible.
13533 * bootstrap: Remove gettext version checking.
13534
13535 * doc/bison.texinfo (Decl Summary): Also mention that %union
13536 can depend on prerequisite types. Problem reported by Tim
13537 Van Holder.
13538
13539 2004-05-25 Paul Eggert <eggert@cs.ucla.edu>
13540
13541 * README: Mention GNU m4 1.4 bugs and Akim's patched version.
13542 * README-alpha: Don't tell people not to package this.
13543
13544 * bootstrap: Don't assume $(...) works; use `...` instead.
13545 Problem reported by Paul Hilfinger. Also, diagnose non-GNU
13546 gettext better.
13547
13548 * doc/bison.texinfo (Decl Summary, Bison Options): Clarify what's
13549 put into the -d output file, and mention what to do if YYSTYPE is
13550 defined as a macro.
13551
13552 2004-05-24 Paul Eggert <eggert@cs.ucla.edu>
13553
13554 Undo change made earlier today: it caused autopoint to not bring
13555 in ABOUT-NLS. Ouch. Instead, substitute our own diagnostic for
13556 autopoint's.
13557
13558 * bootstrap: Check that gettext version matches what's in
13559 configure.ac. Warn users to ignore robots.txt ERROR 404.
13560 * bootstrap: Undo today's earlier change (logged below).
13561 * configure.ac (AM_GNU_GETTEXT_VERSION): Likewise.
13562
13563 The gettext version checking is causing more trouble than it's
13564 curing; remove it. Problem reported by Paul Hilfinger.
13565
13566 * bootstrap: Issue a warning that one can expect a message
13567 'AM_GNU_GETTEXT is used, but not AM_GNU_GETTEXT_VERSION'.
13568 * configure.ac (AM_GNU_GETTEXT_VERSION): Remove.
13569
13570 2004-05-23 Paul Eggert <eggert@cs.ucla.edu>
13571
13572 Ensure that the C++ compiler used for testing actually works on a
13573 simple test program; if not, skip the C++-related tests. Problem
13574 reported by Vin Shelton in:
13575 http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00026.html
13576
13577 * m4/cxx.m4: New file.
13578 * configure.ac (BISON_TEST_FOR_WORKING_CXX_COMPILER): Add.
13579 * tests/atlocal.in (BISON_CXX_WORKS): Add.
13580 * tests/local.at (AT_COMPILE_CXX): Use it.
13581
13582 2004-05-21 Paul Eggert <eggert@cs.ucla.edu>
13583
13584 * data/glr.c (yylloc): Output this macro even if locations are not
13585 being generated, as the GLR parser needs it even in that case.
13586 Problem reported by Troy A. Johnson
13587 <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=195946>.
13588
13589 * configure.ac (AC_INIT): Update to 1.875e.
13590
13591 2004-05-21 Paul Eggert <eggert@cs.ucla.edu>
13592
13593 * NEWS: Version 1.875d.
13594 * configure.ac (AC_INIT): Likewise.
13595 * src/parse-gram.c, src/parse-gram.h: Regenerate with 1.875d.
13596
13597 * configure.ac (--enable-gcc-warnings): Do not enable -Wshadow,
13598 -Wmissing-prototypes, or -Wstrict-prototypes for C++. The current
13599 lalr1.cc runs afoul of the first, and the last two are no longer
13600 supported by GCC 3.4.0.
13601 * README: Mention GNU m4 1.4 or later; mention m4 patches.
13602 * HACKING: Use ./bootstrap, not "make update" to import foreign files.
13603
13604 2004-05-06 Paul Eggert <eggert@cs.ucla.edu>
13605
13606 * src/muscle_tab.c (hash_muscle): Accept and return size_t, not
13607 unsigned int, for compatibility with latest gnulib hash module.
13608 * src/state.c (state_hash, state_hasher): Likewise.
13609 * src/symtab.c (hash_symbol, hash_symbol_hasher): Likewise.
13610 * src/uniqstr.c (hash_uniqstr): Likewise.
13611
13612 2004-05-03 Paul Eggert <eggert@cs.ucla.edu>
13613
13614 * NEWS: Unescaped newlines are no longer allowed in char & strings.
13615
13616 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER,
13617 SC_CHARACTER,SC_STRING>): Reject unescaped newlines in
13618 character and string literals.
13619 (unexpected_end): New function.
13620 (unexpected_eof): Use it.
13621 (unexpected_newline): New function.
13622 (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>): Coalesce duplicate
13623 actions.
13624
13625 * NEWS: Document %expect-rr.
13626
13627 * bootstrap (--gnulib-srcdir=*, --cvs-user=*):
13628 Fix typo by replacing $1 with $option.
13629 Remove more 'intl'-related files.
13630 Don't DEFUN AM_INTL_SUBDIR twice.
13631
13632 * lib/.cvsignore: Add strndup.h. Remove memchr.c, memcmp.c,
13633 memrchr.c, strcasecmp.c, strchr.c, strrchr.c, strspn.c, strtol.c,
13634 strtoul.c.
13635 * m4/.cvsignore: Add exitfail.m4, extensions.m4, gnulib.m4,
13636 hard-locale.m4, mbstate_t.m4, strerror_r.m4, strndup.m4,
13637 xstrndup.m4. Remove glibc21.m4, intdiv0.m4, inttypes-pri.m4,
13638 inttypes.m4, inttypes_h.m4, isc-posix.m4, lcmessage.m4,
13639 stdint_h.m4, uintmax_t.m4, ulonglong.m4.
13640 * src/.cvsignore: Add *.output.
13641
13642 * src/parse-gram.y: Put copyright notice inside %{ %} so it
13643 gets copied to the output file.
13644
13645 2004-04-28 Paul Eggert <eggert@twinsun.com>
13646
13647 Get files from the gnulib and po repositories, instead of relying
13648 on them being in our CVS. Upgrade to latest versions of gnulib
13649 and Automake.
13650
13651 * Makefile.am (SUBDIRS): Remove m4; Automake now does m4.
13652 * bootstrap: Bootstrap from gnulib and po repositories.
13653 Much of this code was stolen from GNU diff and GNU tar's bootstrap.
13654 * README-cvs: Document these changes. Remove version numbers from
13655 mentions of build tools, since they change so often. Mention Flex.
13656
13657 * configure.ac (AC_CONFIG_MACRO_DIR): Add, with m4 as arg.
13658 (gl_USE_SYSTEM_EXTENSIONS): Add.
13659 (AC_GNU_SOURCE, AC_AIX, AC_MINIX):
13660 Remove; no longer needed, as gl_USE_SYSTEM_EXTENSIONS
13661 does this for us.
13662 (AC_ISC_POSIX): Remove; we no longer support this
13663 ancient OS, as it gets in the way of latest Autoconf & gnulib.
13664 (AC_HEADER_STDC): Remove: we now assume C89 or better.
13665 (AC_CHECK_HEADERS_ONCE): Use instead of AC_CHECK_HEADERS.
13666 Do not check for C89 headers, except for locale.h which is used
13667 by the Yacc library and must port to K&R hosts.
13668 (AC_CHECK_FUNCS_ONCE): Use instead of AC_CHECK_FUNCS.
13669 Do not check for C89 functions, except for setlocale which is
13670 used by the Yacc library.
13671 (AC_CHECK_DECLS, AC_REPLACE_FUNCS): Remove; no longer needed.
13672 (gl_DIRNAME, gl_ERROR, gl_FUNC_ALLOCA, gl_FUNC_MEMCHR,
13673 gl_FUNC_MEMRCHR, gl_FUNC_STPCPY, gl_FUNC_STRNLEN, gl_FUNC_STRTOL,
13674 gl_GETOPT, gl_HASH, gl_MBSWIDTH, gl_OBSTACK, gl_QUOTE,
13675 gl_QUOTEARG, gl_XALLOC, jm_FUNC_GLIBC_UNLOCKED_IO, jm_FUNC_MALLOC,
13676 AM_GNU_GETTEXT): Remove; now done by:
13677 (GNULIB_AUTOCONF_SNIPPET): Add. "bootstrap" builds this for us.
13678 (AC_CONFIG_FILES): Remove m4/Makefile, as Automake now does this
13679 for us.
13680
13681 * lib/Makefile.am: Include gnulib.mk, built for us by "bootstrap".
13682 (BUILT_SOURCES, EXTRA_DIST, MOSTLYCLEANFILES):
13683 Define to empty, as gnulib.mk will do the rest for us.
13684 ($(libbison_a_OBJECTS), stdbool.h): Remove, as gnulib.mk does this
13685 for us.
13686 (libbison_a_SOURCES): Define to $(lib_SOURCES) now.
13687 (lib_SOURCES): New symbol, containing only the non-gnulib libs.
13688
13689 * src/files.c: Include gnulib's xstrndup.h.
13690
13691 * src/system.h (MALLOC): Use xnmalloc, for better overflow checking.
13692 (REALLOC): Use xnrealloc, for likewise.
13693 (xstrndup, stpcpy): Remove decls, as gnulib does this for us now.
13694 (strnlen, memrchr): Remove decls; functions no longer used.
13695 Include <stpcpy.h>.
13696
13697 * config/depcomp, config/install-sh, lib/alloca.c, lib/argmatch.c,
13698 lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
13699 lib/error.c, lib/error.h, lib/getopt.c, lib/getopt.h,
13700 lib/getopt1.c, lib/gettext.h, lib/hash.c, lib/hash.h,
13701 lib/malloc.c, lib/mbswidth.c, lib/mbswidth.h, lib/memchr.c,
13702 lib/memcmp.c, lib/memrchr.c, lib/obstack.c, lib/obstack.h,
13703 lib/quote.c, lib/quote.h, lib/quotearg.c, lib/quotearg.h,
13704 lib/realloc.c, lib/stdbool_.h, lib/stpcpy.c, lib/strcasecmp.c,
13705 lib/strchr.c, lib/strncasecmp.c, lib/strnlen.c, lib/strrchr.c,
13706 lib/strspn.c, lib/strtol.c, lib/strtoul.c, lib/unlocked-io.h,
13707 lib/xalloc.h, lib/xmalloc.c, lib/xstrdup.c, lib/xstrndup.c,
13708 m4/Makefile.am, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
13709 m4/error.m4, m4/getopt.m4, m4/hash.m4, m4/malloc.m4,
13710 m4/mbrtowc.m4, m4/mbswidth.m4, m4/memchr.m4, m4/memcmp.m4,
13711 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/prereq.m4,
13712 m4/quote.m4, m4/quotearg.m4, m4/realloc.m4, m4/stdbool.m4,
13713 m4/stpcpy.m4, m4/strnlen.m4, m4/strtol.m4, m4/strtoul.m4,
13714 m4/unlocked-io.m4, m4/xalloc.m4, po/LINGUAS, po/Makefile.in.in,
13715 po/Makevars, po/da.po, po/de.po, po/es.po, po/et.po, po/fr.po,
13716 po/hr.po, po/id.po, po/it.po, po/ja.po, po/ms.po, po/nl.po,
13717 po/pt_BR.po, po/ro.po, po/ru.po, po/sv.po, po/tr.po:
13718 Remove, as these files are now generated automatically
13719 by bootstrap or automake.
13720
13721 * po/ChangeLog: Remove: all but one entry was a duplicate
13722 of this file, and I moved that 2000-11-02 entry here.
13723
13724 * config/.cvsignore: Add Makefile, depcomp, install-sh.
13725 * lib/.cvsignore: Add alloca.c, alloca.h, alloca_.h, argmatch.c,
13726 argmatch.h, basename.c, dirname.c, dirname.h, error.c, error.h,
13727 exit.h, exitfail.c, exitfail.h, getopt.c, getopt.h, getopt1.c,
13728 getopt_int.h, gettext.h, gnulib.mk, hard-locale.c, hard-locale.h,
13729 hash.c, hash.h, malloc.c, mbswidth.c, mbswidth.h, memchr.c,
13730 memcmp.c, memrchr.c, obstack.c, obstack.h, quote.c, quote.h,
13731 quotearg.c, quotearg.h, realloc.c, stdbool_.h, stpcpy.c, stpcpy.h,
13732 strcasecmp.c, strchr.c, stripslash.c, strncasecmp.c, strndup.c,
13733 strnlen.c, strrchr.c, strspn.c, strtol.c, strtoul.c,
13734 unlocked-io.h, xalloc.h, xmalloc.c, xstrdup.c, xstrndup.c,
13735 xstrndup.h.
13736 * m4/.cvsignore: Remove Makefile, Makefile.in. Add alloca.m4,
13737 dirname.m4, dos.m4, error.m4, getopt.m4, hash.m4, mbrtowc.m4,
13738 mbswidth.m4, obstack.m4, onceonly.m4, quote.m4, quotearg.m4,
13739 stdbool.m4, stpcpy.m4, strnlen.m4, unlocked-io.m4, xalloc.m4.
13740 * po/.cvsignore: Add *.po, LINGUAS, Makefile.in.in, Makevars.
13741 * src/.cvsignore: Remove *_.c.
13742
13743
13744 * Makefile.maint (GZIP_ENV): Don't use --rsyncable if gzip doesn't
13745 support it. (The latest stable gzip doesn't.)
13746
13747 2004-04-27 Paul Eggert <eggert@twinsun.com>
13748
13749 * data/lalr1.cc (Parser::stos_) [! YYDEBUG]: Define even in this
13750 case, as stos_ is now used by destructors due to the 2004-02-09
13751 change.
13752
13753 Remove more K&R C support.
13754 * lib/libiberty.y (PARAMS): Remove. All uses removed.
13755 * lib/subpipe.c (errno): Remove decl.
13756 Include <stdlib.h> unconditionally.
13757 (EXIT_FAILURE): Remove macro.
13758 * src/complain.c (vfprintf, strerror): Remove.
13759 * src/system.h: Include limits.h, stdlib.h, string.h, locale.h
13760 unconditionally.
13761 (EXIT_FAILURE, EXIT_SUCCESS, setlocale): Remove defns.
13762 Use latest Autoconf recommendations for including inttypes.h, stdint.h.
13763 (strchr, strspn, memchr): Remove decls.
13764 * tests/calc.at (_AT_DATA_CALC_Y): Include stdlib.h, string.h
13765 unconditionally. Do not declare perror.
13766 * tests/conflicts.at (%nonassoc and eof): Include stdlib.h
13767 unconditionally.
13768
13769 * src/complain.c (_): Remove useless defn, as system.h defines this.
13770
13771 * lib/bitset.h (__INT_TO_PTR): Remove; workaround no longer needed
13772 with latest obstack.h.
13773 * lib/ebitset.c (ebitset_elt_alloc): Don't bother to cast args
13774 to procedure types, as obstack.h now does that for us.
13775 * lib/lbitset.c (lbitset_elt_alloc): Likewise.
13776
13777 * lib/subpipe.h [HAVE_SYS_TYPES_H]: Include <sys/types.h>,
13778 so that this include file can stand alone.
13779 * lib/subpipe.c: Do not include <sys/types.h>, as subpipe.h
13780 does this now. Include subpipe.h first after config.h, to
13781 test whether it can stand alone.
13782
13783 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Don't
13784 declare yyerror when using lalr.cc, as GCC 3.4.0 warns about the
13785 unused declaration.
13786
13787 * tests/synclines.at (%union synch line): Put a dummy member in
13788 the union, because empty unions aren't allowed in C. Caught
13789 by GCC 3.4.0.
13790
13791 2004-04-13 Jim Meyering <jim@meyering.net>
13792
13793 * src/conflicts.c (conflicts_print): Correct format string typo:
13794 use `%%' to produce literal `%'. (trivial change)
13795
13796 2004-03-30 Paul Eggert <eggert@twinsun.com>
13797
13798 * src/getargs.c (version): Update copyright year to 2004.
13799
13800 * data/c.m4 (b4_int_type): Use 'short int' rather than
13801 'short', and similarly for 'long', 'unsigned', etc.
13802 * data/glr.c (YYTRANSLATE, yyconfl, yySymbol, yyItemNum,
13803 yygetLRActions, yyprocessOneStack, yyrecoverSyntaxError,
13804 yy_yypstack, yydumpstack): Likewise.
13805 * data/lalr1.cc (user_token_number_max_, user_token_number_max_,
13806 translate_, seq_, [], pop, Slice, range_, operator+, operator+=):
13807 Likewise.
13808 * data/yacc.c (b4_int_type, yyss, YYSTACK_BYTES, yysigned_char,
13809 yy_stack_print, yyparse): Likewise.
13810 * doc/bison.texinfo (Prologue, Multiple Types): Likewise.
13811 * lib/bbitset.h (bitset_word, BITSET_WORD_BITS): Likewise.
13812 * lib/bitset.c (bitset_print): Likewise.
13813 * lib/bitset_stats.c (bitste_log_histogram_print): Likewise.
13814 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
13815 * lib/bitsetv.c (bitsetv_dump): Likewise.
13816 * lib/ebitset.c (EBITSET_ELT_BITS, ebitset_elt_alloc): Likewise.
13817 * lib/lbitset.c (LBITSET_ELT_BITS, lbitset_elt_alloc, debug_lbitset):
13818 Likewise.
13819 * src/LR0.c (allocate_itemsets): Likewise.
13820 * src/gram.h (rule_number, rule): Likewise.
13821 * src/lalr.h (goto_number): Likewise.
13822 * src/nullable.c (nullable_compute): Likewise.
13823 * src/output.c (prepare_rules): Likewise.
13824 * src/relation.c (relation_print, relation_digraph): Likewise.
13825 * src/relation.h (relation_node): Likewise.
13826 * src/state.h (state_number, transitions, errs, reductions,
13827 struct state): Likewise.
13828 * src/symtab.h (symbol_number, struct symbol): Likewise.
13829 * src/tables.c (vector_number, tally, action_number,
13830 default_goto, goto_actions): Likewise.
13831 * tests/existing.at (GNU Cim Grammar): Likewise.
13832 * tests/regression.at (Web2c Actions): Likewise.
13833
13834 * src/output.c (muscle_insert_short_int_table): Renamed from
13835 muscle_insert_short_table. All uses changed.
13836
13837 2004-03-25 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
13838
13839 * src/parse-gram.y: Define PERCENT_EXPECT_RR.
13840 (declaration): Replace expected_conflicts with expected_sr_conflicts.
13841 Add %expect-rr rule.
13842
13843 * src/scan-gram.l: Recognize %expect-rr.
13844
13845 * src/conflicts.h (expected_sr_conflicts): Rename from
13846 expected_conflicts.
13847 (expected_rr_conflicts): Declare.
13848
13849 * src/conflicts.c (expected_sr_conflicts): Rename from
13850 expected_conflicts.
13851 (expected_rr_conflicts): Define.
13852 (conflicts_print): Check r/r conflicts against expected_rr_conflicts
13853 for GLR parsers.
13854 Use expected_sr_conflicts in place of expected_conflicts.
13855 Warn if expected_rr_conflicts used in non-GLR parser.
13856
13857 * doc/bison.texinfo: Add documentation for %expect-rr.
13858
13859 2004-03-08 Paul Eggert <eggert@gnu.org>
13860
13861 Add support for hex token numbers. Suggested by Odd Arild Olsen in
13862 <http://lists.gnu.org/archive/html/bison-patches/2004-03/msg00000.html>.
13863
13864 * NEWS: Document hexadecimal tokens, no NUL bytes, %destructor
13865 in lalr1.cc.
13866 * doc/bison.texinfo (Token Decl): Add hexadecimal token numbers.
13867 * src/scan-gram.l (scan_integer): New function.
13868 ({int}): Use it.
13869 (0[xX][0-9abcdefABCDEF]+): New pattern, to support hex numbers.
13870 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>, \\x[0-9abcdefABCDEF]+,
13871 handle_action_dollar, handle_action_at, convert_ucn_to_byte):
13872 Say "long int", not "long", for uniformity with GNU style.
13873
13874 2004-02-25 Paul Eggert <eggert@twinsun.com>
13875
13876 * tests/local.at (AT_COMPILE, AT_COMPILE_CXX): Ignore stdout from
13877 compilers. This fixes a problem with Intel's C++ compiler being
13878 chatty, reported by Guido Trentalancia in
13879 <http://lists.gnu.org/archive/html/bug-bison/2004-02/msg00030.html>.
13880
13881 2004-02-09 Alexandre Duret-Lutz <adl@gnu.org>
13882
13883 Support %destructor and merge error locations in lalr1.cc.
13884
13885 * data/lalr1.cc (b4_cxx_destruct_def): New macro.
13886 (Parser::stos_): Define unconditionally.
13887 (Parser::destruct_): New method. Generate its body with
13888 b4_yydestruct_generate.
13889 (Parser::error_start_): New attribute.
13890 (Parser::parse) <yyerrlab, yyerrlab1>: Call destruct_ on erroneous
13891 token which are discarded.
13892 (Parser::parse) <yyerrlab, yyerrorlab, yyerrlab1>: Update
13893 error_start_ when erroneous token are discarded.
13894 (Parser::parse) <yyerrlab1>: Compute the location of the error
13895 token so that it covers all the discarded tokens.
13896 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust so
13897 it can be called with `%skeleton "lalr1.cc"', and do that.
13898
13899 2004-02-02 Paul Eggert <eggert@twinsun.com>
13900
13901 * src/Makefile.am (AM_CPPFLAGS): New macro. It mentions
13902 $(top_srcdir)/lib and ../lib. This fixes a bug reported
13903 by Paul Hilfinger; the old INCLUDES value didn't mention ../lib.
13904 There's no need to mention top_builddir since Automake does that
13905 for us.
13906 (INCLUDES): Remove, as Automake says it's obsolescent.
13907 Contents migrated into AM_CPPFLAGS as described above.
13908 * lib/Makefile.am (INCLUDES): Remove; obsolescent.
13909
13910 2004-01-14 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
13911
13912 * data/glr.c (yytokenName): Bullet-proof against YYEMPTY token.
13913 (yyreportSyntaxError): Handle case where lookahead token is
13914 YYEMPTY.
13915
13916 2004-01-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
13917
13918 * data/glr.c: Put casts on uses of YYREALLOC and YYMALLOC so that
13919 resulting parsers are compilable with C++.
13920
13921 2003-12-23 Paul Eggert <eggert@twinsun.com>
13922
13923 * config/depcomp, config/install-sh: Sync with Automake 1.8.
13924 * src/output.c (output_skeleton): Rename local var.
13925 * tests/input.at (Torturing the Scanner): Don't use \x0 or \0 in
13926 Bison tokens, as this runs afoul of the 2003-10-07 change that
13927 disallowed NUL bytes in character constants or string literals.
13928
13929 * tests/local.at: Require Autoconf 2.59's Autotest.
13930 * tests/testsuite.at: Don't include local.at, since we now assume
13931 Autoconf 2.59 or later. Autoconf 2.59 had some problems with
13932 including it.
13933 * tests/Makefile.am ($(TESTSUITE)): Remove warning about ignoring
13934 multiple inclusion warnings.
13935
13936 2003-12-02 Akim Demaille <akim@epita.fr>
13937
13938 * doc/bison.texinfo (How Can I Reset the Parser): More about start
13939 conditions.
13940 From Bruno Haible.
13941
13942 2003-11-18 Alexandre Duret-Lutz <adl@gnu.org>
13943
13944 * doc/bison.texinfo (Bison Options): Escape `@' in `$@'.
13945
13946 2003-10-07 Paul Eggert <eggert@twinsun.com>
13947
13948 * tests/Makefile.am (clean-local): Don't run 'testsuite --clean'
13949 if testsuite doesn't exist.
13950
13951 * doc/bison.texinfo (Symbols): NUL bytes are not allowed in string
13952 literals, unfortunately.
13953 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>):
13954 Complain about NUL bytes in character constants or string literals.
13955
13956 2003-10-05 Paul Eggert <eggert@twinsun.com>
13957
13958 * NEWS: Don't document %no-default-prec, as it's still
13959 too experimental.
13960 * doc/bison.texinfo: Document %no-default-prec only if
13961 the defaultprec flag is set. Normally it's not.
13962
13963 2003-10-04 Paul Eggert <eggert@twinsun.com>
13964
13965 * data/glr.c (b4_rhs_value, b4_rhs_location): Yield a
13966 non-modifiable lvalue, instead of a modifiable one.
13967 * doc/bison.texinfo (Actions): Document that $$ can
13968 be assigned to. Do not claim that $$ and $N are
13969 array element references: user code should not rely on this.
13970
13971 2003-10-01 Paul Eggert <eggert@twinsun.com>
13972
13973 * src/parse-gram.h (PERCENT_NO_DEFAULT_PREC): New token.
13974 (grammar_declaration): Use it.
13975 * src/scan-gram.l: New token %no-default-prec.
13976 * tests/conflicts.at: Revamp tests to use %no-default-prec.
13977 * NEWS, doc/bison.texinfo: Document the above.
13978
13979 2003-10-01 Akim Demaille <akim@epita.fr>
13980
13981 VCG no longer supports long_straight_phase.
13982
13983 * src/vcg.c, src/vcg.h: Remove the handling of long_straight_phase.
13984 * src/print_graph.c (print_graph): Adjust.
13985
13986 2003-09-30 Frank Heckenbach <frank@g-n-u.de>
13987 and Paul Eggert <eggert@twinsun.com>
13988
13989 * doc/bison.texinfo (Decl Summary, Contextual Precedence,
13990 Table of Symbols): Document %default-prec.
13991 * src/parse-gram.y (PERCENT_DEFAULT_PREC): New token.
13992 (grammar_declaration): Set default_prec on %default-prec.
13993 * src/scan-gram.l (%default-prec): New token.
13994 * src/reader.h (default_prec): New flag.
13995 * src/reader.c: Likewise.
13996 (packgram): Handle it.
13997 * tests/conflicts.at (%default-prec without %prec,
13998 %default-prec with %prec, %default-prec 1): New tests.
13999
14000 2003-09-30 Paul Eggert <eggert@twinsun.com>
14001
14002 * tests/testsuite.at: Include local.at, not input.at, fixing
14003 a typo in the 2003-08-25 patch.
14004
14005 2003-08-27 Akim Demaille <akim@epita.fr>
14006
14007 * data/lalr1.cc (yyparse) [__GNUC__]: "Use" yyerrorlab to pacify
14008 GCC warnings.
14009
14010 2003-08-26 Akim Demaille <akim@epita.fr>
14011
14012 * config/announce-gen (print_changelog_deltas): Neutralize "<#" as
14013 "<\#" to avoid magic from Gnus when posting parts of this script.
14014
14015 2003-08-26 Akim Demaille <akim@epita.fr>
14016
14017 * data/lalr1.cc (Parser::report_syntax_error_): New, extracted from
14018 (Parser::parse): here.
14019 Adjust: nerrs and errstatus is now replaced by...
14020 (Parser::nerrs_, Parser::errstatus_): New.
14021
14022 2003-08-25 Akim Demaille <akim@epita.fr>
14023
14024 * config/announce-gen, Makefile.cfg: New.
14025 * Makefile.am: Adjust.
14026 * GNUmakefile, Makefile.maint: Update from CVS Autoconf, but
14027 keeping local WGET and WGETFLAGS modifications from Paul Eggert.
14028
14029 2003-08-25 Akim Demaille <akim@epita.fr>
14030
14031 When reducing initial empty rules, Bison parser read an initial
14032 location that is not defined. This results in garbage, and that
14033 affects Bison's own parser. Therefore we need (i) to extend Bison
14034 to support a means to initialize this location, and (ii) to use
14035 this CVS Bison to fix CVS Bison's parser.
14036
14037 * src/reader.h, reader.c (epilogue_augment): Remove, replace
14038 with...
14039 * src/muscle_tab.h, src/muscle_tab.c (muscle_code_grow): this.
14040 * src/parse-gram.y: Adjust.
14041 (%initial-action): New.
14042 (%error-verbose): Since we require CVS Bison, there is no reason
14043 not to use it.
14044 * src/scan-gram.l: Adjust.
14045 * src/Makefile.am (YACC): New, to make sure we use our own parser.
14046 * data/yacc.c (yyparse): Use b4_initial_action.
14047
14048 2003-08-25 Akim Demaille <akim@epita.fr>
14049
14050 * doc/bison.texinfo: Don't promote stdout for error messages.
14051
14052 2003-08-25 Akim Demaille <akim@epita.fr>
14053
14054 * data/lalr1.cc (Parser::reduce_print_): Remove unused yyi.
14055 From Alexandre Duret-Lutz.
14056
14057 2003-08-25 Akim Demaille <akim@epita.fr>
14058
14059 Version 1.875c.
14060
14061 2003-08-25 Akim Demaille <akim@epita.fr>
14062
14063 * data/lalr1.cc (Parser::stack_print_, YY_STACK_PRINT): New.
14064 Use them.
14065
14066 2003-08-25 Akim Demaille <akim@epita.fr>
14067
14068 * data/lalr1.cc (Parser::reduce_print_): New.
14069 Use it.
14070
14071 2003-08-25 Akim Demaille <akim@epita.fr>
14072
14073 Have lalr1.cc catch with Paul Eggert's patch to fix the infinite
14074 error recovery loops. This patch is based on
14075 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00000.html>.
14076 Also, augment the similarity between lalr1.cc and yacc.c.
14077 Note: the locations of error recovery rules are not correct yet.
14078
14079 * data/lalr1.cc: Comment changes to augment the similarity between
14080 lalr1.cc and yacc.c.
14081 (YYERROR): Goto to yyerrorlab, not yyerrlab1.
14082 (yyerrlab1): Remove, but where it used to be (now the bottom part of
14083 yyerrlab), when hitting EOF, pop the whole stack here instead of
14084 merely falling thru the default error handling mechanism.
14085 (yyerrorlab): New label, with the old contents of YYERROR,
14086 plus the following change: pop the stack of rhs corresponding
14087 to the production that invoked YYERROR. That is how Yacc
14088 behaves (required by POSIX).
14089 * tests/calc.at (AT_CHECK_CALC_LALR1_CC): No longer expected to
14090 fail.
14091
14092 2003-08-25 Akim Demaille <akim@epita.fr>
14093
14094 Tune local.at so that people can "autom4te -l autotest calc.at -o
14095 calc" for instance, to extract a sub test suite.
14096
14097 * tests/testsuite.at: Move the initialization, Autotest version
14098 requirement, and AT_TESTED invocation into...
14099 * tests/local.at: here.
14100 * tests/testsuite.at: Include it for compatibility with Autoconf
14101 2.57.
14102 * tests/Makefile.am ($(TESTSUITE)): Report that the warning should
14103 be ignore.
14104
14105 2003-08-04 Paul Eggert <eggert@twinsun.com>
14106
14107 Rework code slightly to avoid gcc -Wtraditional warnings.
14108 * data/glr.c (yyuserMerge): Return void, not YYSTYPE.
14109 The returned value is now stored in *YY0. All callers changed.
14110 * src/output.c (merge_output): Adjust to the above change.
14111
14112 2003-07-26 Paul Eggert <eggert@twinsun.com>
14113
14114 * data/glr.c (YYASSERT): New macro.
14115 (yyfillin, yydoAction, yyglrReduce, yysplitStack,
14116 yyresolveStates, yyprocessOneStack):
14117 Use `YYASSERT (FOO);' rather than `if (! (FOO)) abort ();'.
14118 Derived from a suggestion by Frank Heckenbach.
14119
14120 2003-07-25 Paul Eggert <eggert@twinsun.com>
14121
14122 * data/glr.c (yyglrReduce): Don't use C89 string concatenation,
14123 for portability to K&R C (after ansi2knr, presumably). See
14124 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>
14125 by Frank Heckenbach, though I have omitted the structure-initialization
14126 part of his glr-knr.diff patch since I recall that the Portable
14127 C Compiler didn't require that change.
14128
14129 Let the user specify how to allocate and free memory.
14130 Derived from a suggestion by Frank Heckenbach in
14131 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>.
14132 * data/glr.c (YYFREE, YYMALLOC, YYREALLOC): New macros.
14133 All uses of free, malloc, realloc changed to use these macros,
14134 and unnecessary casts removed.
14135 * data/yacc.c (YYFREE, YYMALLOC): Likewise.
14136
14137 2003-07-06 Matthias Mann <MatthiasMann@gmx.de>
14138
14139 * data/lalr1.cc (operator<<(std::ostream&, const Position&)):
14140 use s.empty() rather than s == "" to test for empty string; see
14141 <http://lists.gnu.org/archive/html/bison-patches/2003-07/msg00003.html>
14142 (trivial change)
14143
14144 2003-06-25 Akim Demaille <akim@epita.fr>
14145
14146 * config/depcomp, config/install-sh: Update from masters.
14147
14148 2003-06-20 Paul Eggert <eggert@twinsun.com>
14149
14150 * data/glr.c (YYLLOC_DEFAULT): Parenthesize arguments as needed,
14151 and return properly parenthesized result.
14152 * data/lalar1.cc (YYLLOC_DEFAULT): Likewise.
14153 * data/yacc.c (YYLLOC_DEFAULT): Likewise.
14154 Remove unnecessary parentheses from uses.
14155 * doc/bison.texinfo (Location Default Action): Describe the
14156 conventions for parentheses.
14157
14158 2003-06-19 Paul Eggert <eggert@twinsun.com>
14159
14160 * data/glr.c (yyremoveDeletes, yy_reduce_print, yyglrReduce,
14161 yyreportTree): Do not assume that size_t is the same width as int,
14162 when printing sizes. Print sizes using an unsigned format.
14163 Problem reported by Frank Heckenbach in
14164 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00035.html>.
14165
14166 Port to Forte Developer 7 C compiler.
14167 * data/glr.c (struct YYLTYPE): If locations are not being used,
14168 declare a single dummy member, as empty structs do not conform
14169 to the C standard.
14170 (YYERROR, YYBACKUP): Do not use "do { ...; return foo; } while (0)";
14171 the Forte Developer 7 C compiler complains that end-of-loop
14172 code is not reached.
14173
14174 2003-06-17 Paul Eggert <eggert@twinsun.com>
14175
14176 * lib/libiberty.h (PARAMS): Spell argument as Args, not as X, to
14177 avoid warnings from picky compilers about redefinition of PARAMS.
14178
14179 2003-06-17 Paul Eggert <eggert@twinsun.com>
14180
14181 Version 1.875b.
14182
14183 * NEWS: Document 1.875b.
14184
14185 * lib/bbitset.h: Do not include config.h; that's the includer's job.
14186 Do not include <sys/types.h>; shouldn't be needed on a C89 host.
14187 * lib/bitset.h (bitset_compatible_p): Indent as per GNU standard.
14188 Don't use 'index' in comments, as it's a builtin fn on some hosts.
14189 * lib/bitset_stats.c: Include gettext.h unconditionally, as
14190 per recent gettext manual's suggestion.
14191 * lib/ebitset.c (ebitset_resize, ebitset_unused_clear):
14192 Use prototypes, not old-style definitions.
14193 * lib/lbitset.c (lbitset_unused_clear): Likewise.
14194 * lib/vbitset.c (vbitset_resize, vbitset_ones, vbitset_zero,
14195 vbitset_empty_p, vbitset_copy1, vbitset_not, vbitset_equal_p,
14196 vbitset_subset_p, vbitset_disjoint_p, vbitset_and, vbitset_and_cmp,
14197 vbitset_andn, vbitset_andn_cmp, vbitset_or, vbitset_or_cmp,
14198 vbitset_xor, vbitset_xor_cmp, vbitset_and_or, vbitset_and_or_cmp,
14199 vbitset_andn_or, vbitset_andn_or_cmp, vbitset_or_and,
14200 vbitset_or_and_cmp, vbitset_copy): Likewise.
14201
14202 * lib/libiberty.h: Do not include config.h; that's the includer's job.
14203 Do not include <stdlib.h>.
14204 (PARAMS): Define unconditionally for C89.
14205 (ATTRIBUTE_NORETURN): Remove.
14206 (ATTRIBUTE_UNUSED): Define unconditionally.
14207
14208 Upgrade to 2003-06-08 libbitset, submitted by Michael Hayes in:
14209 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00005.html>
14210 * lib/Makefile.am (bitsets_sources): Add vbitset.c, vbitset.h.
14211 * lib/vbitset.c, lib/vbitset.h: New files.
14212 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
14213 lib/bitset_stats.c, lib/ebitset.c, lib/lbitset.c: Import
14214 from libbitset.
14215
14216 * doc/bison.texinfo (How Can I Reset the Parser): Renamed from
14217 `How Can I Reset @code{yyparse}', since texinfo does not allow
14218 arbitrary @ in node names.
14219
14220 * m4/Makefile.am (EXTRA_DIST): Add the following files, which
14221 shouldn't be needed according to the gettext 0.12.1 documentation
14222 but which seem to be needed anyway: codeset.m4 glibc21.m4
14223 intdiv0.m4 inttypes-pri.m4 inttypes.m4 inttypes_h.m4 isc-posix.m4
14224 lcmessage.m4 nls.m4 po.m4 stdint_h.m4 uintmax_t.m4 ulonglong.m4.
14225 * po/Makefile.in.in: Upgrade to gettext 0.12.1 version.
14226
14227 * lib/.cvsignore: Add stdbool.h.
14228 * m4/.cvsignore: Add nls.m4, po.m4.
14229
14230 Upgrade to CVS gnulib.
14231 * stdbool_.h: File renamed from stdbool.h.in.
14232 * configure.ac (AM_STDBOOL_H): Invoke this instead of
14233 AC_HEADER_STDBOOL.
14234 (AM_GNU_GETTEXT): Put brackets around args, as latest manual suggests.
14235 (AM_GNU_GETTEXT_VERSION): Update to 0.12.1.
14236 * lib/Makefile.am (EXTRA_DIST): Add stdbool_.h.
14237 (MOSTLYCLEANFILES): New var.
14238 ($(libbison_a_OBJECTS)): Depend on $(STDBOOL_H).
14239 (stdbool.h): New rule.
14240 * lib/dirname.c, lib/dirname.h, lib/hash.c, lib/hash.h,
14241 lib/malloc.c, lib/obstack.h, lib/quote.c, lib/realloc.c,
14242 lib/strcasecmp.c, lib/xalloc.h, m4/alloca.m4, m4/onceonly.m4,
14243 m4/quote.m4: Upgrade to today's gnulib.
14244
14245 * tests/calc.at (AT_CHECK_CALC): New option EXPECTED-TO-FAIL.
14246 (AT_CHECK_CALC_LALR1_CC): Use it, since the C++ LALR parser fails
14247 the tests right now.
14248 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Ensure yylex and
14249 yyerror are declared before use; C99 requires this.
14250
14251 2003-06-09 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
14252
14253 * data/glr.c (YYERROR): Update definition to reset yyerrState to 0
14254 first.
14255 (yyrecoverSyntaxError): Correct the logic for setting and testing
14256 yyerrState.
14257 Correct comment on handling EOF.
14258 Allow states with only a default reduction, rather than failing
14259 (I can't quite reconstruct why these were not allowed before).
14260
14261 Fixes to avoid problem that $-N rules in GLR parsers can cause
14262 buffer overruns, corrupting state.
14263
14264 * src/output.c (prepare_rules): Output max_left_semantic_context
14265 definition.
14266 * src/reader.h (max_left_semantic_context): New variable declaration.
14267 * src/scan-gram.l (max_left_semantic_context): Define.
14268 (handle_action_dollar): Update max_left_semantic_context.
14269 * data/glr.c (YYMAXLEFT): New definition.
14270 (yydoAction): Increase size of yyrhsVals by YYMAXLEFT.
14271 (yyresolveAction): Ditto.
14272
14273 Fixes to problems with location handling in GLR parsers reported by
14274 Frank Heckenbach (2003/06/05).
14275
14276 * data/glr.c (YYLTYPE): Make trivial if locations not used.
14277 (YYRHSLOC): Add parentheses, and define only if locations used.
14278 (YYLLOC_DEFAULT): Add parentheses, and give trivial definition if
14279 locations not used.
14280 (yyuserAction): Use YYLLOC_DEFAULT to set *yylocp.
14281 (yydoAction): Remove redundant initialization of *yyvalp and *yylocp.
14282
14283 * tests/cxx-type.at: Exercise location information; update tests
14284 to differentiate output with and without locations.
14285 Remove forward declarations of yylex and yyerror---caused errors
14286 because default YYLTYPE not yet defined.
14287 Change semantic actions to compute strings, rather than printing
14288 them directly (to test proper passing of semantics values). Change
14289 output to prefix notation and update test data and expected results.
14290 (yylex): Track locations.
14291 (stmtMerge): Return value rather than printing, and include arguments
14292 in value.
14293
14294 2003-06-03 Paul Eggert <eggert@twinsun.com>
14295
14296 Avoid warnings generated by GCC 2.95.4 when Bison is
14297 configured with --enable-gcc-warnings.
14298 * data/lalr1.cc (yy::]b4_parser_class_name[::parse,
14299 yy::]b4_parser_class_name[::translate_,
14300 yy::Stack::operator[] (unsigned),
14301 yy::Stack::operator[] (unsigned) const,
14302 yy::Slice::operator[] (unsigned),
14303 yy::Slice::operator[] (unsigned) const):
14304 Rename local vars to avoid warnings.
14305 * tests/glr-regression.at (Improper handling of embedded actions
14306 and $-N in GLR parsers): Remove unused local variable from yylex.
14307 * tests/regression.at (_AT_DATA_DANCER_Y): Declare yylex to take
14308 (void) as arg when not pure, since we now assume C89 when building
14309 Bison. Pacify GCC by using parameter.
14310
14311 2003-06-02 Paul Eggert <eggert@twinsun.com>
14312
14313 * data/lalr1.cc (yy::Position::lines, yy::Position::columns,
14314 yy::Location::lines, yy::Location::columns): Rename arguments
14315 to avoid shadowing; this removes a warning generated by GCC 3.3.
14316
14317 2003-06-01 Paul Eggert <eggert@twinsun.com>
14318
14319 Don't pass C-only warning optins (e.g., -Wmissing-declarations)
14320 to g++, as GCC 3.3 complains if you do it.
14321 * configure.ac (WARNING_CXXFLAGS): New subst. Set it to
14322 everything that WARNING_CFLAGS has, except omit warnings
14323 not suitable for C++.
14324 (AC_PROG_CXX): Use this instead of AC_CHECK_PROGS([CXX], [g++]).
14325 * tests/atlocal.in (CXXFLAGS): New var.
14326 * tests/local.at (AT_COMPILE_CXX): Use it instead of CFLAGS.
14327
14328 Fix a GLR parser bug I reported in February; see
14329 <http://lists.gnu.org/archive/html/bison-patches/2003-02/msg00008.html>.
14330 The problem was that GLR parsers did not conform to the C standard,
14331 because actions like { $1 = $2 + $3; } expanded to expressions
14332 that invoked YYFILL in separate subexpressions, and YYFILL assigned
14333 to a local variable. The C standard says that expressions
14334 like (var = f ()) + (var = f ()) have undefined behavior.
14335 Another problem was that GCC sometimes issues warnings that
14336 yyfill and its parameters are unused.
14337
14338 * data/glr.c (yyfillin): Renamed from the old yyfill. Mark
14339 as possibly unused.
14340 (yyfill): New function.
14341 (YYFILL): Use it.
14342 (yyuserAction): Change type of yynormal to bool, so that it matches
14343 the new yyfill signature. Mark it as possibly unused.
14344
14345
14346 Follow up on a bug I reported in February, where a Bison-generated
14347 parser can loop. Provide a test case and a fix for yacc.c. I
14348 don't have a fix for lalr1.cc or for glr.c, unfortunately.
14349 The original bug report is in:
14350 <http://lists.gnu.org/archive/html/bison-patches/2003-02/msg00044.html>
14351
14352 * data/yacc.c (YYERROR): Now just 'goto yyerrorlab', since the
14353 macro's size was becoming unwieldy.
14354 (yyerrlab): Do not discard an empty lookahead symbol, as this
14355 might destroy garbage.
14356 (yyerrorlab): New label, with the old contents of YYERROR,
14357 plus the following change: pop the stack of rhs corresponding
14358 to the production that invoked YYERROR. That is how Yacc
14359 behaves, and POSIX requires this behavior.
14360 (yyerrlab1): Use YYPOPSTACK instead of its definiens.
14361 * tests/calc.at (_AT_DATA_CALC_Y): Include unistd.h if available.
14362 Define 'alarm' to do nothing if unistd.h is not available.
14363 Add a new rule "exp: '-' error;" to test the above change to
14364 data/yacc.c. Use 'alarm' to abort any test taking longer than
14365 10 seconds, as it's probably looping.
14366 (AT_CHECK_CALC): Test recovery from error in new grammar rule.
14367 Also, the new yacc.c generates two fewer diagnostics for an
14368 existing test.
14369
14370 2003-05-24 Paul Eggert <eggert@twinsun.com>
14371
14372 * data/glr.c (YYSTACKEXPANDABLE): Do not evaluate
14373 YYSTYPE_IS_TRIVIAL or YYSTYPE_IS_TRIVIAL unless they are defined.
14374 This fixes a problem reported by John Bowman when the Compaq/HP
14375 Alpha cxx compiler happy (e.g. using cxx -D__USE_STD_IOSTREAM
14376 -ansi -Wall -gall).
14377 * data/yacc.c (union yyalloc): Likewise.
14378 (YYCOPY): Do not evaluate __GNUC__ unless it is defined.
14379
14380 Switch from 'int' to 'bool' where that makes sense.
14381
14382 * lib/abitset.c (abitset_test, abitset_empty_p, abitset_equal_p,
14383 abitset_subset_p, abitset_disjoint_p, abitset_and_cmp,
14384 abitset_andn_cmp, abitset_or_cmp, abitset_xor_cmp, abitset_and_or,
14385 abitset_and_or_cmp, abitset_andn_or_cmp, abitset_or_and_cmp):
14386 Return or accept bool, not int. All callers changed.
14387 * lib/bbitset.h: (bitset_toggle_, bitset_copy_, bitset_and_or_cmp_,
14388 bitset_andn_or_cmp_, bitset_or_and_cmp_): Likewise.
14389 * lib/bitset.c (bitset_only_set_p, bitset_print, bitset_toggle_,
14390 bitset_copy_, bitset_op4_cmp, bitset_and_or_cmp_, bitset_andn_or_cmp_,
14391 bitset_or_and_cmp_): Likewise.
14392 * lib/bitset.h (bitset_test, bitset_only_set_p): Likewise.
14393 * lib/bitset_stats.c (bitset_stats_print, bitset_stats_toggle,
14394 bitset_stats_test, bitset_stats_empty_p, bitset_stats_disjoint_p,
14395 bitset_stats_equal_p, bitset_stats_subset_p, bitset_stats_and_cmp,
14396 bitset_stats_andn_cmp, bitset_stats_or_cmp, bitset_stats_xor_cmp,
14397 bitset_stats_and_or_cmp, bitset_stats_andn_or_cmp,
14398 bitset_stats_or_and_cmp): Likewise.
14399 * lib/ebitset.c (ebitset_elt_zero_p, ebitset_equal_p, ebitset_copy_cmp,
14400 ebitset_test, ebitset_empty_p, ebitset_subset_p, ebitset_disjoint_p,
14401 ebitset_op3_cmp, ebitset_and_cmp, ebitset_andn_cmp, ebitset_or_cmp,
14402 ebitset_xor_cmp): Likewise.
14403 * lib/lbitset.c (lbitset_elt_zero_p, lbitset_equal_p, lbitset_copy_cmp,
14404 lbitset_test, lbitset_empty_p, lbitset_subset_p, lbitset_disjoint_p,
14405 lbitset_op3_cmp, lbitset_and_cmp, lbitset_andn_cmp, lbitset_or_cmp,
14406 lbitset_xor_cmp): Likewise.
14407 * lib/bbitset.h: Include <stdbool.h>.
14408 (struct bitset_vtable): The following members now return bool, not
14409 int: toggle, test, empty_p, disjoint_p, equal_p, subset_p,
14410 and_cmp, andn_cmp, or_cmp, xor_cmp, and_or_cmp, andn_or_cmp,
14411 or_and_cmp).
14412 * src/conflicts.c (count_rr_conflicts): Likewise.
14413 * lib/bitset_stats.h (bitset_stats_enabled): Now bool, not int.
14414 All uses changed.
14415 * lib/ebitset.c (ebitset_obstack_init): Likewise.
14416 * lib/lbitset.c (lbitset_obstack_init): Likewise.
14417 * src/getargs.c (debug_flag, defines_flag, locations_flag,
14418 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
14419 graph_flag): Likewise.
14420 * src/getargs.h (debug_flag, defines_flag, locations_flag,
14421 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
14422 graph_flag): Likewise.
14423 * src/output.c (error_verbose): Likewise.
14424 * src/output.h (error_verbose): Likewise.
14425 * src/reader.c (start_flag, typed): Likewise.
14426 * src/reader.h (typed): Likewise.
14427 * src/getargs.c (LOCATIONS_OPTION): New constant.
14428 (long_options, getargs): Use it.
14429 * src/lalr.c (build_relations): Use bool, not int.
14430 * src/nullable.c (nullable_compute): Likewise.
14431 * src/print.c (print_reductions): Likewise.
14432 * src/tables.c (action_row, pack_vector): Likewise.
14433 * src/muscle_tab.h (MUSCLE_INSERT_BOOL): New macro.
14434 * src/output.c (prepare): Use it.
14435 * src/output.c (token_definitions_output,
14436 symbol_destructors_output, symbol_destructors_output): Use string,
14437 not boolean integer, to keep track of whether to output separator.
14438 * src/print_graph.c (print_core): Likewise.
14439 * src/state.c (state_rule_lookaheads_print): Likewise.
14440
14441 * config/install-sh: Sync from automake 1.7.5.
14442
14443 2003-05-14 Paul Eggert <eggert@twinsun.com>
14444
14445 * src/parse-gram.y (rules_or_grammar_declaration): Require a
14446 semicolon after a grammar declaration, in the interest of possible
14447 future changes to the Bison input language.
14448 Do not allow a stray semicolon at the start of the grammar.
14449 (rhses.1): Allow one or more semicolons after any rule, including
14450 just before "|" as required by POSIX.
14451 * tests/input.at (Torturing the Scanner): Add tests for ";|" in a
14452 grammar.
14453
14454 2003-05-14 Alexandre Duret-Lutz <adl@gnu.org>
14455
14456 %parse-param support for lalr1.cc.
14457
14458 * data/lalr1.cc (b4_parse_param_decl, b4_parse_param_cons,
14459 b4_cc_constructor_calls, b4_cc_constructor_call,
14460 b4_parse_param_vars, b4_cc_var_decls, b4_cc_var_decl): New m4
14461 definitions.
14462 (yy::b4_parser_class_name::b4_parser_class_name): Take extra
14463 parse-param arguments.
14464 (yy::b4_parser_class_name): Declare instance variables to
14465 hold parse-param arguments.
14466 * tests/calc.at: s/value/semantic_value/ because value clashes
14467 with a member of yy::b4_parser_class_name. Adjust C++ code
14468 to handle %parse-param. Enable %parse-param test in C++.
14469
14470 2003-05-12 Paul Eggert <eggert@twinsun.com>
14471
14472 * doc/bison.texinfo (How Can I Reset @code{yyparse}): Reword the
14473 English a bit. Fix fclose typo. Change "const char" to "char
14474 const", and use ANSI C rather than K&R for "main". Suggest
14475 YY_FLUSH_BUFFER over yyrestart (as that is what Flex recommends)
14476 and suggest yy_switch_to_buffer.
14477
14478 2003-05-05 Paul Eggert <eggert@twinsun.com>
14479
14480 * lib/bitset.h (__INT_TO_PTR): Define to a value that presumes
14481 C89. This avoids a diagnostic on compilers that define __STDC__
14482 to 0, fixing a problem with Tru64 cc reported by Martin Mokrejs in
14483 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
14484
14485 2003-05-03 Paul Eggert <eggert@twinsun.com>
14486
14487 * lib/bitset.h (BITSET_FOR_EACH, BITSET_FOR_EACH_REVERSE):
14488 Do not overrun array bounds.
14489 This should fix a bug reported today by Olatunji Oluwabukunmi in
14490 <http://lists.gnu.org/archive/html/bug-bison/2003-05/msg00004.html>.
14491
14492 2003-04-29 Akim Demaille <akim@epita.fr>
14493
14494 * src/gram.h, src/gram.c (pure_parser, glr_parser): Move to...
14495 * src/getargs.c, src/getargs.h: here, as bool, not int.
14496 (nondeterministic_parser): New.
14497 * src/parse-gram.y, src/scan-gram.l: Support
14498 %nondeterministic-parser.
14499 * src/output.c (prepare): Use nondeterministic_parser instead
14500 of glr_parser where appropriate.
14501 * src/tables.c (conflict_row, action_row, save_row)
14502 (token_actions, token_actions, pack_vector): Ditto.
14503
14504 2003-04-29 Akim Demaille <akim@epita.fr>
14505
14506 * doc/bison.texinfo (C++ Parsers, Implementing Loops): New.
14507
14508 2003-04-29 Akim Demaille <akim@epita.fr>
14509
14510 * tests/calc.at: Also test yacc.c and glr.c (but not lalr1.cc yet)
14511 with %pure-parser and %locations to exercise the patch from Yakov
14512 Markovitch below.
14513
14514 2003-04-28 Tim Van Holder <tim.van.holder@pandora.be>
14515
14516 * data/yacc.c: (b4_lex_param): Corrected for the case where
14517 %lex-param is provided and %pure-parser isn't.
14518
14519 2003-04-27 Paul Eggert <eggert@twinsun.com>
14520
14521 Avoid gcc -Wundef warnings reported by Gerald Pfeifer in
14522 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00044.html>.
14523 * data/yacc.c (YYSTACK_ALLOC): Don't evaluate YYSTACK_USE_ALLOCA
14524 if it is not defined.
14525 (YYMAXDEPTH): Don't evaluate YYMAXDEPTH if it is not defined.
14526
14527 2003-04-26 Paul Eggert <eggert@twinsun.com>
14528
14529 * data/lalr1.cc (yy::Parser::pact_ninf_, yy::Parser::table_ninf_):
14530 Declare to be of type suitable for the ninf value itself, not of
14531 type suitable for the corresponding table, since the latter might
14532 be unsigned but the ninf value might be negative. This fixes a
14533 bug reported by Alexandre Duret-Lutz in
14534 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00017.html>.
14535
14536 * configure.ac (AC_FUNC_ERROR_AT_LINE): Remove, since gl_ERROR
14537 invokes it. We shouldn't invoke it twice because it will attempt
14538 to put error.o in the archive twice. This fixes a glitch reported
14539 by Martin Mokrejs in
14540 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
14541
14542 2003-04-21 Paul Eggert <eggert@twinsun.com>
14543
14544 * m4/error.m4: Update from Bruno Haible's 2003-04-14 patch
14545 to gnulib.
14546
14547 2003-04-21 Yakov Markovitch <Markovitch@iso.ru>
14548
14549 * data/glr.c (yyexpandGLRStack) [!YYSTACKEXPANDABLE]:
14550 Fix obvious typo that results in uncompilable GLR parsers
14551 when both %pure-parser and %locations are used. (trivial change)
14552
14553 2003-04-17 Paul Eggert <eggert@twinsun.com>
14554
14555 * src/scan-gram.l: Add %option nounput, since we no longer use unput.
14556 (unexpected_eof): Renamed from unexpected_end_of_file, for brevity.
14557 Do not insert the expected token via unput, as this runs afoul
14558 of a POSIX-compatibility bug in flex 2.5.31.
14559 All uses changed to BEGIN the parent state,
14560 since we no longer insert the expected token via unput.
14561 * tests/regression.at (Invalid inputs): Remove cascaded diagnostic
14562 that is no longer emitted after the above change.
14563
14564 * src/conflicts.c (set_conflicts): Resolve all conflicts, not just
14565 the first one. This change is from Paul Hilfinger, and it fixes
14566 regression reported by Werner Lemberg in
14567 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00026.html>.
14568
14569 (resolve_sr_conflict): Don't invoke state_errs_set
14570 unless one or more tokens have been explicitly made errors.
14571 Otherwise, the above change causes Bison to abort.
14572
14573 * tests/existing.at (GNU pic Grammar): New test case, taken from
14574 Lemberg's email.
14575
14576 2003-03-31 Akim Demaille <akim@epita.fr>
14577
14578 * doc/Makefile.am (AM_MAKEINFOFLAGS): Don't split the info file.
14579
14580 2003-03-31 Akim Demaille <akim@epita.fr>
14581
14582 * src/output.c (prepare_symbols): Avoid trailing spaces in the
14583 output.
14584
14585 2003-03-31 Akim Demaille <akim@epita.fr>
14586
14587 * doc/bison.texinfo (Strings are Destroyed): s/losses/loses/.
14588 From Paul Hilfinger.
14589
14590 2003-03-29 Akim Demaille <akim@epita.fr>
14591
14592 * m4/error.m4: Do not put under dynamic conditions some code which
14593 expansion is under static control.
14594
14595 2003-03-29 Akim Demaille <akim@epita.fr>
14596
14597 * doc/bison.texinfo (How Can I Reset @code{yyparse}): New.
14598
14599 2003-03-29 Akim Demaille <akim@epita.fr>
14600
14601 * doc/bison.texinfo (Strings are Destroyed): New.
14602
14603 2003-03-13 Paul Eggert <eggert@twinsun.com>
14604
14605 * .cvsignore: Add configure.lineno.
14606 * src/.cvsignore: Add yacc.
14607 * tests/.cvsignore: Add testsuite.log.
14608 * doc/fdl.texi: Sync with latest FSF version.
14609
14610 2003-03-12 Paul Eggert <eggert@twinsun.com>
14611
14612 * scan-gram.l (YY_USER_INIT): Initialize code_start, too.
14613 (<INITIAL><<EOF>>, <SC_PRE_CODE><<EOF>>): Set *loc to the scanner
14614 cursor, instead of leaving it undefined. This fixes a bug
14615 reported by Tim Van Holder in
14616 <http://lists.gnu.org/archive/html/bug-bison/2003-03/msg00023.html>.
14617 * tests/input.at (Torturing the Scanner): Test the scanner on
14618 an empty input file, which was Tim Van Holder's test case.
14619
14620 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): When checking whether
14621 <sys/resource.h> can be included, include sys/time.h and
14622 sys/times.h first, if available. This works around the SunOS
14623 4.1.4 porting bug reported by Bruce Becker in
14624 <http://lists.gnu.org/archive/html/bug-bison/2003-03/msg00018.html>.
14625
14626 * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't
14627 AC_CHECK_HEADERS([sys/wait.h]), as this interferes with
14628 AC_HEADER_SYS_WAIT.
14629
14630 Merge changes from gnulib. This was prompted because the CVS
14631 snapshot didn't build on Solaris 7 due to strnlen problems.
14632
14633 These changes need to be merged back into gnulib:
14634 * lib/hash.c: Include <stdbool.h> unconditionally.
14635 * m4/onceonly.m4 (m4_quote): New macro.
14636 (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE, AC_CHECK_DECLS_ONCE):
14637 Quote AC_FOREACH variable-expansions properly.
14638 The 2003-01-03 obstack.h change also needs merging.
14639 {end of changes requiring merging}
14640
14641 * lib/stdbool.h.in, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
14642 m4/getopt.m4, m4/hash.m4, m4/malloc.m4, m4/memchr.m4,
14643 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/quote.m4,
14644 m4/quotearg.m4, m4/realloc.m4, m4/stpcpy.m4, m4/strnlen.m4,
14645 m4/strtol.m4, m4/strtoul.m4, m4/unlocked-io.m4, m4/xalloc.m4:
14646 New files, imported from gnulib.
14647 * m4/Makefile.am (EXTRA_DIST): Add the new m4/*.m4 files mentioned
14648 above.
14649
14650 * lib/mbswidth.c, m4/error.m4, m4/mbrtowc.m4, m4/mbswidth.m4,
14651 m4/memcmp.m4, m4/prereq.m4, m4/stdbool.m4: Update to current
14652 gnulib sources.
14653
14654 * configure.ac (gl_DIRNAME, gl_GETOPT, gl_HASH, gl_QUOTE, gl_XALLOC):
14655 Add.
14656 (gl_ERROR): New, replacing jm_PREREQ_ERROR.
14657 (gl_FUNC_ALLOCA): New, replacing AC_FUNC_ALLOCA.
14658 (gl_FUNC_STPCPY): New, replacing AC_REPLACE_FUNCS(stpcpy).
14659 (gl_FUNC_STRNLEN): New, replacing AC_FUNC_STRNLEN.
14660 (gl_MBSWIDTH): New, replacing jm_PREREQ_MBSWIDTH.
14661 (gl_OBSTACK): New, replacing AC_FUNC_OBSTACK.
14662 (gl_QUOTEARG): New, replacing jm_PREREQ_QUOTEARG.
14663 (jm_FUNC_GLIBC_UNLOCKED_IO, gl_FUNC_STPCPY, gl_FUNC_STRTOL): New.
14664 (jm_FUNC_MALLOC): New, replacing AC_FUNC_MALLOC.
14665 (jm_FUNC_REALLOC): New, replacing AC_FUNC_REALLOC.
14666 (jm_PREREQ_ARGMATCH): Remove.
14667 (AC_REPLACE_FUNCS): Remove memchr, memrchr, stpcpy, strtol, strtoul.
14668 * lib/Makefile.am (libbison_a_SOURCES): Add argmatch.c, argmatch.h.
14669
14670 * src/system.h: Include <stdbool.h> unconditionally.
14671
14672 * lib/bbitset.h: Include <limits.h> unconditionally. We have been
14673 assuming at least C89 in the bitset code for some time now.
14674
14675 2003-03-03 Akim Demaille <akim@epita.fr>
14676
14677 * ro.po: New.
14678
14679 2003-03-02 Akim Demaille <akim@epita.fr>
14680
14681 * doc/bison.texinfo (Table of Symbols): Reactivate the
14682 documentation for %lex-param, and %parse-param.
14683
14684 2003-03-02 Akim Demaille <akim@epita.fr>
14685
14686 * data/yacc.c, data/glr.c, data/lal1.cc: Use similar code to
14687 generate verbose error messages.
14688 Use the number of tokens as an upper bound in yytname, as it
14689 cannot be a non terminal.
14690
14691 2003-03-02 Akim Demaille <akim@epita.fr>
14692
14693 * tests/regression.at (_AT_DATA_DANCER_Y): Fix the expected error
14694 message.
14695
14696 2003-03-02 Akim Demaille <akim@epita.fr>
14697
14698 * tests/regression.at (_AT_DATA_DANCER_Y, AT_CHECK_DANCER): New.
14699 Use them to exercise yycheck overrun.
14700 Based on Andrew Suffield's grammar.
14701
14702 2003-03-02 Akim Demaille <akim@epita.fr>
14703
14704 Create tests/local.at for Bison generic testing macros.
14705
14706 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Move to...
14707 * tests/local.at (AT_BISON_OPTION_PUSHDEFS, AT_BISON_OPTION_POPDEFS):
14708 This new file.
14709 * tests/calc.at (AT_CHECK_CALC): Adjust.
14710 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR)
14711 (AT_COMPILE, AT_COMPILE_CXX, AT_PARSER_CHECK): Move to...
14712 * tests/local.at: here.
14713 (AT_COMPILE_CXX): Tags the tests using it as c++.
14714 Ignore the test if CXX is not functional.
14715
14716 2003-03-01 Paul Eggert <eggert@twinsun.com>
14717
14718 * src/scan-gram.l (code_start): Initialize it to scanner_cursor,
14719 not loc->end, since loc->end might contain garbage and this leads
14720 to undefined behavior on some platforms.
14721 (id_loc, token_start): Use (IF_LINTed) initial values that do not
14722 depend on *loc, so that the reader doesn't give the the false
14723 impression that *loc is initialized.
14724 (<INITIAL>"%%"): Do not bother setting code_start, since its value
14725 does not survive the return.
14726
14727 2003-03-01 Akim Demaille <akim@epita.fr>
14728
14729 * src/scan-gram.l (code_start): Always initialize it when entering
14730 into yylex, as SC_EPILOGUE is activated *before* the corresponding
14731 yylex invocation. An alternative would be making it static, but
14732 then it starts with the second %%'s beginning, instead of its end.
14733
14734 2003-02-28 Paul Eggert <eggert@twinsun.com>
14735
14736 * lib/mbswidth.c: Include <wchar.h> before "mbswidth.h", to work
14737 around a UnixWare 7.1.1 porting bug reported by John Hughes in
14738 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00030.html>.
14739
14740 2003-02-26 Paul Eggert <eggert@twinsun.com>
14741
14742 * README: Mention compiler bug in Sun Forte Developer 6 update 2.
14743 Remove Sequent/Pyramid discussion (nobody uses them any more).
14744 Merge VMS and MS-DOS discussion; these ports may well be dead
14745 but let's keep mentioning them for now. Put <> around email
14746 addresses. Add copyright notice.
14747
14748 2003-02-24 Paul Eggert <eggert@twinsun.com>
14749
14750 * data/glr.c (yy_reduce_print): yylineno -> yylno,
14751 to avoid collision with flex use of yylineno.
14752 Problem reported by Bruce Lilly in
14753 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00016.html>.
14754 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
14755 * data/yacc.c (yy_reduce_print): Likewise.
14756
14757 * config/depcomp: Sync with Automake 1.7.3.
14758
14759 2003-02-21 Akim Demaille <akim@epita.fr>
14760
14761 * data/lalr1.cc: Use temporary variables instead of casts to
14762 change integer types.
14763 Suggested by Paul Eggert.
14764
14765 2003-02-21 Akim Demaille <akim@epita.fr>
14766
14767 * doc/bison.texinfo: Use "location" consistently to refer to @n,
14768 to avoid confusions with lalr1.cc's notion of Position.
14769 Suggested by Paul Eggert.
14770
14771 2003-02-20 Akim Demaille <akim@epita.fr>
14772
14773 * data/lalr1.cc (position.hh): Make sure "columns" never pushes
14774 before initial_columns.
14775 (location.hh): Use consistent variable names when defining the
14776 operator<<.
14777 Use "last" so that we subtract from Positions, not from unsigned.
14778
14779 2003-02-20 Akim Demaille <akim@epita.fr>
14780
14781 * data/lalr1.cc (position.hh): New subfile, including the extended
14782 and Doxygen'ed documentation of class Position.
14783 (location.hh): Use it.
14784 Document a` la Doxygen.
14785 With the help of Benoit Perrot.
14786
14787 2003-02-20 Akim Demaille <akim@epita.fr>
14788
14789 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Define
14790 AT_YACC_IF.
14791 Redefine AT_YYERROR_SEES_LOC_IF using it.
14792 (_AT_DATA_CALC_Y): Don't declare yyerror when lalr1.cc, as it is
14793 not defined.
14794 Don't use the location in yy::Parser::error_ and
14795 yy::Parser::print_ when not %locations.
14796 Activate more lalr1.cc tests.
14797
14798 2003-02-19 Akim Demaille <akim@epita.fr>
14799
14800 * data/lalr1.cc: When displaying a line number, be sure to make it
14801 an int.
14802
14803 2003-02-19 Akim Demaille <akim@epita.fr>
14804
14805 * data/lalr1.cc (b4_stack_depth_init, yy::Parser::initdepth_):
14806 Remove, useless.
14807 (YYABORT, YYACCEPT, YYERROR): New.
14808 * tests/calc.at: Renable the lalr1.cc test.
14809
14810 2003-02-19 Akim Demaille <akim@epita.fr>
14811
14812 * tests/calc.at (AT_CHECK_CALC): Check different scenarios of
14813 error recovery, mixing with/without pops and discarding of the
14814 lookahead.
14815 Exercise YYERROR.
14816 Disable the lalr1.cc tests as currently it doesn't support YYERROR.
14817
14818 2003-02-17 Paul Eggert <eggert@twinsun.com>
14819
14820 * tests/atlocal.in (LDFLAGS, LIBS): New vars.
14821 * tests/testsuite.at (AT_COMPILE): Use them.
14822 This fixes the testsuite problem reported by Robert Lentz in
14823 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00011.html>.
14824
14825 2003-02-12 Paul Eggert <eggert@twinsun.com>
14826
14827 * data/yacc.c (yyerrlab) [YYERROR_VERBOSE]:
14828 Avoid subscript error in yycheck. Bug reported by Andrew Suffield in
14829 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00003.html>.
14830 * data/glr.c (yyreportSyntaxError) [YYERROR_VERBOSE]: Likewise.
14831 Check for malloc failure, for consistency with yacc.c.
14832 (yytname_size): Remove, for consistency with yacc.c.
14833
14834 The bug still remains in data/lalr1.cc, as I didn't have time
14835 to fix it there.
14836
14837 2003-02-06 Akim Demaille <akim@epita.fr>
14838
14839 * configure.ac (GXX): Rename as...
14840 (CXX): this, to keep the original Autoconf semantics.
14841 Require 2.57.
14842 * data/lalr1.cc: Fix b4_copyright invocations.
14843 If YYDEBUG is not defined, don't depend upon name_ being defined.
14844 (location.hh): Include string and iostream.
14845 (Position::filename): New member.
14846 (Position::Position ()): New.
14847 (operator<< (Position)): New.
14848 (operator- (Position, int)): New.
14849 (Location::first, Location::last): Rename as...
14850 (Location::begin, Location::end): these, to mock the conventional
14851 iterator names.
14852 (operator<< (Location)): New.
14853 * tests/atlocal.in (CXX): New.
14854 * tests/testsuite.at (AT_COMPILE_CXX): New.
14855 * tests/calc.at (_AT_DATA_CALC_Y): Adjust yyerror to report the
14856 locations in a more synthetic way.
14857 (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF is positive if
14858 lalr1.cc is used.
14859 Adjust the C locations to match those from Emacs: first column is
14860 column 0.
14861 Change all the expected results.
14862 Conform to the GCS: simplify the locations when applicable.
14863 (LOC, VAL, YYLLOC_FORMAL, YYLLOC_ARG, USE_YYLLOC, LEX_FORMALS)
14864 (LEX_ARGS, USE_LEX_ARGS, LEX_PRE_FORMALS, LEX_PRE_ARGS): Replace
14865 these CPP macros with the m4 macros new defined by...
14866 (AT_CHECK_PUSHDEFS): this, i.e.:
14867 (AT_LALR1_CC_IF, AT_PURE_LEX_IF, AT_LOC, AT_VAL, AT_LEX_FORMALS)
14868 (AT_LEX_ARGS, AT_USE_LEX_ARGS, AT_LEX_PRE_FORMALS, AT_LEX_PRE_ARGS)
14869 New macros.
14870 (AT_CHECK_POPDEFS): Undefine them.
14871 (AT_CHECK_CALC_LALR1_CC): New.
14872 Use it for the first lalr1.cc test.
14873
14874 2003-02-04 Akim Demaille <akim@epita.fr>
14875
14876 * data/lalr1.cc (YYLLOC_DEFAULT): Fix its definition: be based on
14877 Location as is defined.
14878
14879 2003-02-04 Akim Demaille <akim@epita.fr>
14880
14881 * data/lalr1.cc: If YYDEBUG is not defined, don't depend upon
14882 name_ being defined.
14883
14884 2003-02-03 Paul Eggert <eggert@twinsun.com>
14885
14886 * src/gram.h (start_symbol): Remove unused decl.
14887
14888 Use more-consistent naming conventions for local vars.
14889
14890 * src/derives.c (derives_compute): Change type of local var from
14891 int to rule_number.
14892 * src/gram.c (grammar_rules_partial_print): Likewise.
14893 * src/print.c (print_core): Likewise.
14894 * src/reduce.c (reduce_grammar_tables): Likewise.
14895
14896 * src/gram.c (grammar_dump): Change name of item_number *
14897 local var from r to rp.
14898 * src/nullable.c (nullable_compute): Likewise.
14899
14900 * src/gram.h (ISTOKEN, ISVAR): Use i, not s, for int var.
14901
14902 * src/gram.h (symbol_number_as_item_number): Use sym, not s,
14903 for symbol or symbol_number var.
14904 * src/reader.c (grammar_start_symbol_set): Likewise.
14905 * src/reader.h (grammar_start_symbol_set, grammar_symbol_append):
14906 Likewise.
14907 * src/state.c (transitions_to): Likewise.
14908 * src/state.h: Likewise.
14909 * src/tables.c (symbol_number_to_vector_number): Likewise.
14910
14911 * src/muscle_tab.h (MUSCLE_OBSTACK_SGROW): Use p, not s, for
14912 char * var.
14913
14914 * src/parse-gram.y (lloc_default): Use loc, not r, for YYLTYPE
14915 var.
14916
14917 * src/scan-gram.l (no_cr_read): Use bytes_read, not s, for size
14918 var.
14919
14920 * src/system.h (xstrndup, strchr, strspn, strnlen, memchr, memrchr):
14921 Use str, not s, for char * var. Use ch, not c, for character var.
14922 Use size for size var.
14923
14924 * src/uniqstr.c (uniqstr_new, uniqstr_assert): Use str, not s, for
14925 char * var.
14926 (uniqstr_print, uniqst_print_processor): Use ustr, not s, for
14927 uniqstr var.
14928 * src/uniqstr.h: Likewise.
14929
14930 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
14931 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
14932 get_node_alignment_str, get_arrow_mode_str, get_crossing_type_str,
14933 get_view_str, get_linestyle_str, get_arrowstyle_str): Rename
14934 param to have same name as that of enum, so that we don't use
14935 "s" to stand for a non-state.
14936
14937 2003-02-02 Akim Demaille <akim@epita.fr>
14938
14939 * src/scan-skel.l: Scan more than one inert character per yylex
14940 invocation.
14941
14942 2003-02-01 Paul Eggert <eggert@twinsun.com>
14943
14944 Version 1.875a.
14945
14946 * po/LINGUAS: Add ms.
14947
14948 2003-01-30 Akim Demaille <akim@epita.fr>
14949
14950 * doc/Makefile.am (CLEANFILES): Add bison.fns for distcheck.
14951
14952 2003-01-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
14953
14954 * tests/cxx-type.at: Correct apparent typo in Bison input: $$ instead
14955 of $1.
14956
14957 Changes in response to error report by S. Eken: GLR mode does not
14958 handle negative $ indices or $ indices in embedded rules correctly.
14959 See <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00076.html>.
14960
14961 * data/glr.c (b4_rhs_value): Change to use YYFILL macro.
14962 (b4_rhs_location): Ditto.
14963 (yyfill): New function to copy from stack tree into array
14964 incrementally.
14965 (yyuserAction): Modify to allow incremental move of semantic values
14966 to rhs array when in GLR mode.
14967 Define YYFILL to use in user-defined actions to fill semantic array
14968 as needed.
14969 Remove dummy use of yystack, as there is now a guaranteed use.
14970 (yydoAction): Modify to allow incremental move of semantic values
14971 to rhs array when in GLR mode.
14972 (yyresolveAction): Ditto.
14973 (yyglrShiftDefer): Update comment.
14974 (yyresolveStates): Use X == NULL for pointers, not !X.
14975 (yyglrReduce): Ditto.
14976 (yydoAction): Ditto
14977
14978 * tests/glr-regr1.at: Rename to ...
14979 * tests/glr-regression.at: Add new regression test for the problems
14980 described above (adapted from S. Eken).
14981 Update copyright notice.
14982 * tests/testsuite.at: Rename glr-regr1.at to glr-regression.at.
14983 * tests/Makefile.am: Ditto.
14984
14985 2003-01-28 Paul Eggert <eggert@twinsun.com>
14986
14987 * data/lalr1.cc: Do not use @output_header_name@ unless
14988 b4_defines_flag is set. This fixes two bugs reported by
14989 Tim Van Holder in
14990 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00071.html>
14991 and <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00073.html>.
14992
14993 2003-01-21 Paul Eggert <eggert@twinsun.com>
14994
14995 * data/yacc.c (YYERROR): Move code from yyerrlab1 to here, so that
14996 we don't need to worry about yyerrlab1 being reported as an
14997 "unused label" by non-GCC C compilers. The downside is that if
14998 locations are used then a couple of statements are duplicated each
14999 time YYERROR is invoked, but the upside is that the warnings
15000 should vanish.
15001 (yyerrlab1): Move code to YERROR.
15002 (yyerrlab2): Remove. Change uses back to yyerrlab1.
15003 This reverts some of the 2002-12-27 change.
15004
15005 2003-01-17 Paul Eggert <eggert@twinsun.com>
15006
15007 * src/output.c (symbol_printers_output): Fix typo that led
15008 to core dump. Problem reported by Antonio Rus in
15009 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00058.html>.
15010
15011 2003-01-13 Akim Demaille <akim@epita.fr>,
15012 Quoc Peyrot <chojin@lrde.epita.fr>,
15013 Robert Anisko <anisko_r@lrde.epita.fr>
15014
15015 * data/lalr1.cc (parse::yyerrlab1): When popping the stack, stop
15016 when the stacks contain one element, as the loop would otherwise
15017 free the last state, and then use the top state (the one we just
15018 popped). This means that the initial elements will not be freed
15019 explicitly, as is the case in yacc.c; it is not a problem, as
15020 these elements have fake values.
15021
15022 2003-01-11 Paul Eggert <eggert@twinsun.com>
15023
15024 * NEWS: %expect-violations are now just warnings, reverting
15025 to Bison 1.30 and 1.75 behavior. This fixes the GCC 3.2
15026 bootstrapping problem reported by Matthias Klose; see
15027 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00053.html>.
15028 * src/conflicts.c (conflicts_print): Likewise.
15029 * tests/conflicts.at (%expect not enough, %expect too much,
15030 %expect with reduce conflicts): Likewise.
15031 * doc/bison.texinfo (Expect Decl): Document this. Also mention
15032 that the warning is enabled if the number of conflicts changes
15033 (not necessarily increases).
15034
15035 * src/getargs.c (version): Update copyright year.
15036
15037 2003-01-09 Akim Demaille <akim@epita.fr>
15038
15039 * src/Makefile.am, lib/Makefile.am: Use $(VAR) instead of @VAR@.
15040
15041 2003-01-08 Paul Eggert <eggert@twinsun.com>
15042
15043 * Makefile.maint (WGETFLAGS):
15044 New macro, containing "-C off" to disable proxy caches.
15045 All uses of $(WGET) changed to $(WGET) $(WGETFLAGS).
15046 (rel-check): Use $(WGET) instead of wget.
15047
15048 2003-01-06 Paul Eggert <eggert@twinsun.com>
15049
15050 * doc/bison.texinfo (Generalized LR Parsing): Add a reference to
15051 the GLR paper of Scott, Johnstone and Hussain.
15052
15053 2003-01-04 Paul Eggert <eggert@twinsun.com>
15054
15055 * configure.ac (AC_ARG_ENABLE): Add --disable-yacc.
15056 (YACC_SCRIPT, YACC_LIBRARY): New vars to AC_SUBST.
15057 * lib/Makefile.am (lib_LIBRARIES): liby.a -> @YACC_LIBRARY@.
15058 (EXTRA_LIBRARIES): New var, for liby.a.
15059 * src/Makefile.am (bin_SCRIPTS): yacc -> @YACC_SCRIPT@.
15060 (EXTRA_SCRIPTS): New var, for yacc.
15061
15062 * data/yacc.c (yyerrlab1): Omit attribute if __cplusplus is defined,
15063 since GNU C++ (as of 3.2.1) does not allow attributes on labels.
15064 Problem reported by Nelson H. F. Beebe.
15065
15066 2003-01-03 Paul Eggert <eggert@twinsun.com>
15067
15068 * lib/obstack.h (__INT_TO_PTR) [__STDC__]: Cast result to
15069 (void *) to avoid diagnostic with native c89 on SGI IRIX 6.5
15070 when compiling Bison 1.875's `bitset bset = obstack_alloc
15071 (bobstack, bytes);'. Problem reported by Nelson H. F. Beebe.
15072
15073 * src/scan-skel.l (QPUTS): Omit redundant `;' from macro definition.
15074 ([^@\n]): Renamed from [^@\n]+ so that the token buffer does not
15075 grow to a huge size with typical invocation.
15076
15077 * lib/hash.c (_Bool, bool, false, true, __bool_true_false_are_defined):
15078 Use the pattern recommended by Autoconf 2.57, except also protect
15079 against double-definition.
15080 * src/system.h: Likewise.
15081 Portability issues reported by Nelson H. F. Beebe.
15082
15083 * data/glr.c (yybool): Renamed from bool, to avoid collisions in C.
15084 All uses changed. Provide a definition in both C and C++.
15085 (yytrue, yyfalse): Define even if defined (__cplusplus).
15086
15087 * lib/bitset_stats.c (bitset_stats_list): Remove unused var.
15088 Reported by Nelson H. F. Beebe.
15089
15090 * src/scan-skel.l ("@oline@"): Output lineno+1, not lineno.
15091
15092 2003-01-02 Paul Eggert <eggert@twinsun.com>
15093
15094 * data/yacc.c (yyerrlab1): Append `;' after attribute, to
15095 pacify the buggy "smart preprocessor" in MacOS 10.2.3.
15096 Bug reported by Nelson H. F. Beebe.
15097
15098 2003-01-01 Paul Eggert <eggert@twinsun.com>
15099
15100 * Version 1.875.
15101
15102 2002-12-30 Paul Eggert <eggert@twinsun.com>
15103
15104 * src/scan-gram.l (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>","):
15105 Moved here from...
15106 (<INITIAL>","): Here. This causes stray "," to be treated
15107 more uniformly.
15108
15109 * src/scan-gram.l (<SC_BRACED_CODE>"}"): Output ";" before the
15110 last brace in braced code when not in Yacc mode, for compatibility
15111 with Bison 1.35. This resurrects the 2001-12-15 patch to
15112 src/reader.c.
15113
15114 * src/reader.h (YYDECL): Use YYSTYPE, not its deprecated alias
15115 yystype. This follows up the 2002-12-24 YYSTYPE bug fix.
15116
15117 2002-12-28 Paul Eggert <eggert@twinsun.com>
15118
15119 * src/symtab.c (symbol_make_alias): Set type of SYMVAL to be
15120 that of SYM's type. This fixes Debian bug 168069, reported by
15121 Thomas Olsson.
15122
15123 2002-12-28 Paul Eggert <eggert@twinsun.com>
15124
15125 Version 1.75f.
15126
15127 Switch back to the Yacc style of conflict reports, undoing some
15128 of the 2002-07-30 change.
15129 * doc/bison.texinfo (Understanding): Use Yacc style for
15130 conflict reports. Also, use new way of locating rules.
15131 * src/conflicts.c (conflict_report):
15132 Renamed from conflict_report_yacc, removing the old
15133 'conflict_report'. Translate the entire conflict report at once,
15134 so that we don't assume that "," has the same interpretation in
15135 all languages.
15136 (conflicts_output): Use Yacc-style conflict report for each state,
15137 instead of our more-complicated style.
15138 (conflicts_print): Use Yacc-style conflict report, except print
15139 the input file name when not emulating Yacc.
15140 * tests/conflicts.at (Unresolved SR Conflicts, Defaulted
15141 Conflicted Reduction, %expect not enough, %expect too much,
15142 %expect with reduce conflicts): Switch to Yacc-style conflict reports.
15143 * tests/existing.at (GNU Cim Grammar): Likewise.
15144 * tests/glr-regr1.at (Badly Collapsed GLR States): Likewise.
15145
15146 * src/complain.c (warn_at, warn, complain_at, complain, fatal_at,
15147 fatal): Don't invoke fflush; it's not needed and it might even be
15148 harmful for stdout, as stdout might not be open.
15149 * src/reduce.c (reduce_print): Likewise.
15150
15151 2002-12-27 Paul Eggert <eggert@twinsun.com>
15152
15153 Fix a bug where error locations were not being recorded correctly.
15154 This problem was originally reported by Paul Hilfinger in
15155 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00086.html>.
15156
15157 * data/yacc.c (yyparse): New local var yylerrsp, to record the
15158 top of the location stack's error locations.
15159 (yyerrlab): Set it. When discarding a token, push its location
15160 onto yylerrsp so that we don't lose track of the error's end.
15161 (yyerrlab1): Now is only the target of YYERROR, so that we can
15162 properly record the location of the action that failed. For GCC
15163 2.93 and later, insert an __attribute__ ((__unused__)) to avoid
15164 GCC warning about yyerrlab1 being unused if YYERROR is unused.
15165 (yyerrlab2): New label, which yyerrlab now falls through to.
15166 Compute the error's location by applying YYLLOC_DEFAULT to
15167 the locations of all the symbols that went into the error.
15168 * doc/bison.texinfo (Location Default Action): Mention that
15169 YYLLOC_DEFAULT is also invoked for syntax errors.
15170 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
15171 Error locations include the locations of all the tokens that were
15172 discarded, not just the last token.
15173
15174 2002-12-26 Paul Eggert <eggert@twinsun.com>
15175
15176 * src/files.c: Include quote.h.
15177 (compute_output_file_names): Warn if we detect conflicting
15178 outputs to the same file. This should catch the misunderstanding
15179 exemplified by Debian Bug 165349, reported by Bruce Stephens..
15180
15181 * src/conflicts.c (conflicts_print): If the user specifies
15182 "%expect N", report an error if there are any reduce/reduce
15183 conflicts. This is what the manual says should happen.
15184 This fixes Debian bug 130890, reported by Anthony DeRobertis.
15185 * tests/conflicts.at (%expect with reduce conflicts): New test.
15186
15187 Don't use m4_include on relative file names, as it doesn't work as
15188 desired if there happens to be a file with that name under ".".
15189
15190 * m4sugar/version.m4: Remove; it was included but it wasn't used.
15191 * data/Makefile.am (dist_m4sugar_DATA): Remove m4sugar/version.m4.
15192 * data/m4sugar/m4sugar.m4: Don't include m4sugar/version.m4.
15193 * data/glr.c, data/lalr1.cc, data/yacc.c: Don't include c.m4.
15194 * src/output.c (output_skeleton): Use full path names when
15195 specifying a file to include; don't rely on include path, as
15196 it's unreliable when the working file contains a file with
15197 that name.
15198
15199 2002-12-25 Paul Eggert <eggert@twinsun.com>
15200
15201 Remove obsolete references to bison.simple and bison.hairy.
15202 Problem mentioned by Aubin Mahe in
15203 <http://lists.gnu.org/archive/html/help-bison/2002-12/msg00010.html>.
15204 * data/glr.c: Comment fix.
15205 * doc/bison.1: Remove references. Also, mention "yacc".
15206
15207 * src/getargs.c (getargs) [MSDOS]: Don't assume optarg != NULL
15208 with -g option.
15209
15210 * src/parse-gram.y (declaration): Use enum "report_states" rather
15211 than its numeric value 1.
15212
15213 * src/scan-skel.l ("@output ".*\n): Close any old yyout before
15214 opening a new one. This fixes Debian bug 165349, reported by
15215 Bruce Stephens.
15216
15217 2002-12-24 Paul Eggert <eggert@twinsun.com>
15218
15219 Version 1.75e.
15220
15221 * Makefile.maint (cvs-update): Don't assume that the shell
15222 supports $(...), as Solaris sh doesn't.
15223
15224 * src/parse-gram.y (lloc_default): Remove test for empty
15225 nonterminals at the end, since it didn't change the result.
15226
15227 2002-12-24 Paul Eggert <eggert@twinsun.com>
15228
15229 If the user does not define YYSTYPE as a macro, Bison now declares it
15230 using typedef instead of defining it as a macro. POSIX requires this.
15231 For consistency, YYLTYPE is also declared instead of defined.
15232
15233 %union directives can now have a tag before the `{', e.g., the
15234 directive `%union foo {...}' now generates the C code
15235 `typedef union foo { ... } YYSTYPE;'; this is for Yacc compatibility.
15236 The default union tag is `YYSTYPE', for compatibility with Solaris 9
15237 Yacc. For consistency, YYLTYPE's struct tag is now `YYLTYPE'
15238 instead of `yyltype'.
15239
15240 `yystype' and `yyltype' are now obsolescent macros instead of being
15241 typedefs or tags; they are no longer documented and will be
15242 withdrawn in a future release.
15243
15244 * data/glr.c (b4_location_type): Remove.
15245 (YYSTYPE): Renamed from yystype.
15246 (YYSTYPE_IS_DECLARED): New macro, used to prevent double-typedef.
15247 (struct YYLTYPE): Renamed from struct yyltype.
15248 (YYLTYPE): Renamed from yyltype.
15249 (yyltype, yystype): New (and obsolescent) macros,
15250 for backward compatibility.
15251 * data/yacc.c: Likewise.
15252
15253 * data/yacc.c (YYSTYPE): Declare as union YYSTYPE if the user
15254 does not specify a union tag. This is for compatibility with
15255 Solaris 9 yacc.
15256
15257 * src/parse-gram.y (add_param): 2nd arg is now char * not char
15258 const *, since it is now modified by stripping surrounding { }.
15259 (current_braced_code): Remove.
15260 (PERCENT_DESTRUCTOR, PERCENT_PRINTER, PERCENT_UNION,
15261 PERCENT_LEX_PARAM, PERCENT_PARSE_PARAM): Change names to include
15262 trailing " {...}". Now of type <chars>.
15263 (grammar_declaration): Adjust to bundled tokens.
15264 (code_content): Remove; stripping is now done by add_param.
15265 (print_token_value): Print contents of bundled tokens.
15266 (token_name): New function.
15267
15268 * src/reader.h (braced_code, current_braced_code): Remove.
15269 (token_name): New decl.
15270
15271 * src/scan-gram.l (handle_dollar, handle_at): Now takes int
15272 token_type, not braced_code code_kind. All uses changed.
15273 (SC_PRE_CODE): New state, for scanning after a keyword that
15274 has (or usually has) an immediately-following braced code.
15275 (token_type): New local var, to keep track of which token type
15276 to return when scanning braced code.
15277 (<INITIAL>"%destructor", <INITIAL>"%lex-param",
15278 <INITIAL>"%parse-param", <INITIAL>"%printer",
15279 <INITIAL>"%union"): Set token type and BEGIN SC_PRE_CODE
15280 instead of returning a token type immediately.
15281 (<INITIAL>"{"): Set token type.
15282 (<SC_BRACED_CODE>"}"): Use it.
15283 (handle_action_dollar, handle_action_at): Now returns bool
15284 indicating success. Fail if ! current_rule; this prevents a core dump.
15285 (handle_symbol_code_dollar, handle_symbol_code_at):
15286 Remove; merge body into caller.
15287 (handle_dollar, handle_at): Complain in invalid contexts.
15288
15289 * NEWS, doc/bison.texinfo: Document the above.
15290 * NEWS: Fix years and program names in copyright notice.
15291
15292 2002-12-17 Paul Eggert <eggert@twinsun.com>
15293
15294 * NEWS, doc/bison.texinfo (Parser Function, Pure Calling, Error
15295 Reporting, Table of Symbols): Omit mentions of %lex-param and
15296 %parse-param from the documentation for now.
15297
15298 2002-12-15 Paul Eggert <eggert@twinsun.com>
15299
15300 Undo most of the 2002-11-12 yychar -> yytoken patch, as it broke
15301 GCC 3.2.1 (which depends on yychar == YYEMPTY when there is no
15302 lookahead symbol, and which sets yychar in parser actions) and it
15303 disagreed with the Bison documentation. Bug
15304 reported by Andrew Walrond.
15305
15306 * data/yacc.c (YYTRANSLATE): Don't check for negative argument,
15307 as the caller now does that.
15308 (yyclearin, YYBACKUP, yyparse): Use yychar, not yytoken.
15309 (YYEMPTY): Parenthesize right hand side, since others use it.
15310 (yyparse): Don't assume that our generated code is the only code
15311 that sets yychar.
15312
15313 2002-12-13 Paul Eggert <eggert@twinsun.com>
15314
15315 Version 1.75d.
15316
15317 POSIX requires a "yacc" command.
15318 * src/Makefile.am (bin_SCRIPTS): New macro, for yacc.
15319 (MOSTLYCLEANFILES): Add yacc.
15320 (yacc): New rule.
15321 * doc/bison.texinfo (Invocation, Bison Options): Mention yacc
15322 as an alias for bison y.
15323
15324 * po/LINGUAS: Add da.
15325
15326 * src/getargs.c (__GNU_LIBRARY__) [lint]: Define to work around
15327 problem with latest <getopt.h>.
15328 (HACK_FOR___GNU_LIBRARY___PROTOTYPE): New macro.
15329
15330 * doc/fdl.texi: Upgrade to 1.2.
15331 * lib/alloca.c, lib/error.c, lib/getopt.c, lib/getopt.h
15332 lib/getopt1.c, lib/gettext.h, lib/memrchr.c, lib/obstack.c,
15333 lib/obstack.h, lib/strnlen.c, lib/unlocked-io.h: Sync with
15334 gnulib.
15335 * config/install-sh: Sync with autotools.
15336
15337 Fix a bad interaction with flex 2.5.23 reported by Bruce Lilly in
15338 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
15339 * data/yacc.c (YYLTYPE, struct yyltype): Do not define unless
15340 locations are requested.
15341 (union yyalloc): Do not depend on YYLTYPE_IS_TRIVIAL unless
15342 locations are requested.
15343
15344 2002-12-12 Paul Eggert <eggert@twinsun.com>
15345
15346 Remove unportable casts and storage allocation tricks.
15347 While we're at it, remove almost all casts, since they
15348 usually aren't needed and are a sign of trouble.
15349
15350 * configure.ac (AC_CHECK_TYPES): Check for uintptr_t.
15351
15352 * src/derives.c (derives_compute): Do not subtract NTOKENS from
15353 the pointer DSET returned by malloc; this isn't portable.
15354 Instead, always use DSET[i - NTOKENS] rather than DSET[i].
15355 Similarly for DERIVES.
15356 * src/lalr.c (set_goto_map): Likewise, for GOTO_MAP and TEMP_MAP.
15357 * src/nullable.c (nullable_compute): Likewise, for RSETS and NULLABLE.
15358 * src/reduce.c (reduce_grammar_tables): Likewise, for nontermmap
15359
15360 * src/derives.c (derives_compute): Do not bother invoking
15361 int_of_rule_number, since rule numbers are integers.
15362
15363 * src/files.c (concat2, tr, compute_base_name): Use xmalloc (N)
15364 rather than XMALLOC (char, N).
15365
15366 * src/files.c (filename_split): Rewrite to avoid cast.
15367
15368 * src/gram.h (symbol_number_as_item_number,
15369 item_number_as_symbol_number, rule_number_as_item_number,
15370 item_number_as_rule_number):
15371 Now inline functions rather than macros, to avoid casts.
15372 * src/state.h (state_number_as_int): Likewise.
15373 * src/tables.c (state_number_to_vector_number,
15374 symbol_number_to_vector_number): Likewise.
15375
15376 * src/gram.h (int_of_rule_number): Remove; no longer used.
15377
15378 * src/lalr.c (add_lookback_edge): Use malloc rather than calloc,
15379 since the resulting storage is always stored into.
15380
15381 * src/main.c (alloca) [C_ALLOCA]: Add decl here, the only place
15382 where it's needed.
15383
15384 * src/muscle_tab.c (muscle_m4_output):
15385 Now inline. Return bool, not int.
15386 * src/state.c (state_compare): Likewise.
15387 * src/symtab.c (symbol_check_defined,
15388 symbol_check_alias_consistency, symbol_pack, symbol_translation,
15389 hash_compare_symbol, hash_symbol):
15390 Likewise.
15391 * src/uniqstr.c (uniqstr_print): Likewise.
15392 * src/muscle_tab.c (muscle_m4_output_processor):
15393 New function, to avoid casts.
15394 * src/state.c (state_comparator, stage_hasher): Likewise.
15395 * src/symtab.c (symbol_check_defined_processor,
15396 symbol_check_alias_consistency_processor, symbol_pack_processor,
15397 symbol_translation_processor, hash_symbol_comparator,
15398 hash_symbol_hasher): Likewise.
15399 * src/uniqstr.c (uniqstr_print_processor): Likewise.
15400 * src/muscle_tab.c (muscles_m4_output):
15401 Use new functions instead of casting old functions unportably.
15402 * src/state.c (state_hash_new): Likewise.
15403 * src/symtab.c (symbols_new, symbols_do, symbols_check_defined,
15404 symbols_token_translations_init):
15405 Likewise.
15406 * src/uniqstr.c (uniqstrs_new, hash_initialize, uniqstrs_do): Likewise.
15407
15408 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): Use long local
15409 var instead of casting to long, to avoid casts.
15410 (prepare_states): Use MALLOC rather than alloca, so that we don't
15411 have to worry about alloca.
15412 * src/state.c (state_hash_lookup): Likewise.
15413
15414 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>"'"): Use unsigned char
15415 local var instead of casting to unsigned char, to avoid casts.
15416
15417 * src/state.c (TRANSITIONS_ALLOC, ERRS_ALLOC, REDUCTIONS_ALLOC,
15418 STATE_ALLOC): Remove.
15419 (transitions_new, errs_new, reductions_new, state_new): Use malloc
15420 rather than calloc, and use offsetof to avoid allocating slightly
15421 too much storage.
15422 (state_new): Initialize all members.
15423
15424 * src/state.c (state_hash): Use unsigned accumulator, not signed.
15425
15426 * src/symtab.c (symbol_free): Remove; unused.
15427 (symbol_get): Remove cast in lhs of assignment.
15428 (symbols_do): Now static. Accept generic arguments, not
15429 hashing-related ones.
15430
15431 * src/symtab.h: (NUMBER_UNDEFINED): Remove unnecessary cast.
15432 (symbol_processor): Remove.
15433 (symbols_do): Remove decl; now static.
15434
15435 * src/system.h (alloca): Remove; decl no longer needed.
15436 (<stddef.h>): Include, for offsetof.
15437 (<inttypes.>, <stdint.h>): Include if available.
15438 (uintptr_t): New type, if system lacks it.
15439 (CALLOC, MALLOC, REALLOC): New macros.
15440 All uses of XCALLOC, XMALLOC, and XREALLOC changed to use these
15441 new macros.
15442
15443 * src/tables.c (table_size): Now int, to pacify GCC.
15444 (table_grow, table_ninf_remap): Use signed table size.
15445 (save_row): Don't bother initializing locals when not needed.
15446 (default_goto, goto_actions, pack_vector): Remove unnecessary casts.
15447 * src/uniqstr.c (hash_compare_uniqstr): Likewise.
15448
15449 * src/vcg.h: Correct misspellings.
15450
15451 * src/vcg_defaults.h (G_CMAX): Now INT_MAX.
15452
15453
15454 * src/getargs.c (getargs): Don't assume EOF == -1.
15455
15456 2002-12-09 Paul Eggert <eggert@twinsun.com>
15457
15458 Change identifier spellings to avoid collisions with names
15459 that are reserved by POSIX.
15460
15461 Don't use names ending in _t, since POSIX reserves them.
15462 For consistency, remove _e and _s endings -- they're weren't
15463 needed to remove ambiguity. All uses changed.
15464 * src/uniqstr.h (uniqstr): Renamed from uniqstr_t, which in
15465 turn was just renamed from struniq_t.
15466 * src/uniqstr.c (uniqstr_processor): Renamed from struniq_processor,
15467 which in turn was just renamed from struniq_processor_t.
15468 (hash_compare_uniqstr): Renamed from hash_compare_struniq, which
15469 in turn was renamed from hash_compare_struniq_t.
15470 * src/LR0.c (struct state_list): Renamed from struct state_list_s.
15471 (state_list): Renamed from state_list_t.
15472 * src/assoc.h (assoc): Renamed from assoc_t.
15473 * src/conflicts.c (enum conflict_resolution): Renamed from
15474 enum conflict_resolution_e.
15475 * src/derives.c (struct rule_list): Renamed from struct rule_list_s.
15476 (rule_list): Renamed from rule_list_t.
15477 * src/getargs.h (enum trace): Renamed from enum trace_e.
15478 (enum report): Renamed from enum report_e.
15479 * src/gram.h (item_number): Renamed from item_number_t.
15480 (rule_number): Renamed from rule_number_t.
15481 (struct rule_s): Remove the "rule_s" part; not used.
15482 (rule): Renamed from rule_t.
15483 (rule_filter): Renamed from rule_filter_t.
15484 * src/lalr.c (struct goto_list): Renamed from struct goto_list_s.
15485 (goto_list): Renamed from goto_list_t.
15486 * src/lalr.h (goto_number): Renamed from goto_number_t.
15487 * src/location.h (location): Renamed from location_t.
15488 * src/muscle_tab.c (muscle_entry): Renamed from muscle_entry_t,
15489 and moved here from:
15490 * src/muscle_tab.h (muscle_entry_t): here.
15491 * src/nullable.c (struct rule_list): Renamed from struct rule_list_s.
15492 (rule_list): Renamed from rule_list_t.
15493 * src/print_graph.c (static_graph): Renamed from graph.
15494 * src/reader.h (braced_code): Renamed from braced_code_t.
15495 Remove brace_code_e tag.
15496 * src/relation.h (relation_node): Renamed from relation_node_t.
15497 (relation_nodes): Renamed from relation_nodes_t.
15498 (relation): Renamed from relation_t.
15499 * src/state.h (state_number): Renamed from state_number_t.
15500 (struct state): Renamed from struct state_s.
15501 (state): Renamed from state_t.
15502 (transitions): Renamed from transitions_t. Unused (and
15503 misspelled) transtion_s tag removed.
15504 (errs): Renamed from errs_t. Unused errs_s tag removed.
15505 (reductions): Renamed from reductions_t. Unused tag
15506 reductions_s removed.
15507 * src/symlist.h (symbol_list): Renamed from symbol_list_t.
15508 (struct symbol_list): Renamed from struct symbol_list_s.
15509 * src/symtab.h (symbol_number): Renamed from symbol_number_t.
15510 (struct symbol): Renamed from struct symbol_s.
15511 (symbol): Renamed from symbol_t.
15512 * src/tables.c (vector_number): Renamed from vector_number_t.
15513 (action_number): Renamed from action_t.
15514 * src/tables.h (base_number): Renamed from base_t.
15515 * src/vcg.h (enum color): Renamed from enum color_e.
15516 (enum textmode): Renamed from enum textmode_e.
15517 (enum shape): Renamed from enum shape_e.
15518 (struct colorentry): Renamed from struct colorentry_s.
15519 (struct classname): Renamed from struct classname_s.
15520 (struct infoname): Renamed from struct infoname_s.
15521 (enum layoutalgorithm): Renamed from enum layoutalgorithm_e.
15522 (enum decision): Renamed from enum decision_e.
15523 (enum orientation): Renamed from enum orientation_e.
15524 (enum alignment): Renamed from enum alignment_e.
15525 (enum arrow_mode): Renamed from enum arrow_mode_e.
15526 (enum crossing_type): Renamed from enum crossing_type_e.
15527 (enum view): Renamed from enum view_e.
15528 (struct node): Renamed from struct node_s.
15529 (node): Renamed from node_t.
15530 (enum linestyle): Renamed from enum linestyle_e.
15531 (enum arrowstyle): Renamed from enum arrowstyle_e.
15532 (struct edge): Renamed from struct edge.
15533 (edge): Renamed from edge_t.
15534 (struct graph): Renamed from struct graph_s.
15535 (graph): Renamed from graph_t.
15536 * tests/calc.at (_AT_DATA_CALC_Y, Simple LALR Calculator):
15537 Rename value_t -> value.
15538 * tests/input.at (Torturing the Scanner): Rename value_t -> value,
15539 value_t_as_yystype -> value_as_yystype.
15540
15541 Don't include <errno.h> in the mainstream code, since it
15542 reserves E[A-Z0-9]* and we want to use symbols like 'EQUALS'.
15543 * lib/get-errno.c, lib/get-errno.h: New files.
15544 * lib/Makefile.am (libbison_a_SOURCES): Add get-errno.h,
15545 get-errno.c.
15546 * src/files.c (xfopen, xfclose): Use get_errno instead of errno.
15547 * src/output.c (output_skeleton): Likewise.
15548 * src/scan-gram.l (<INITIAL>{int}): Use set_errno and get_errno
15549 instead of errno.
15550 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>\\x[0-9abcdefABCDEF]+):
15551 Likewise.
15552 (handle_action_dollar, handle_action_at): Likewise.
15553 * src/system.h: Do not include <errno.h>.
15554 (TAB_EXT): Renamed from EXT_TAB.
15555 (OUTPUT_EXT): Renamed from EXT_OUTPUT.
15556
15557 Avoid str[a-z]*, since <string.h> reserves that name space.
15558 Change all instances of "struniq" in names to "uniqstr", and
15559 likewise for "STRUNIQ" and "UNIQSTR".
15560 * src/uniqstr.c: Renamed from src/struniq.c.
15561 * src/uniqstr.h: Renamed from src/struniq.h.
15562 * src/Makefile.am (bison_SOURCES): Adjust to these renamings.
15563 * src/files.c (strsuffix): Remove; unused.
15564 (concat2): Renamed from stringappend. Now static.
15565 * src/files.h (strsuffix, stringappend): Remove; unused.
15566 * src/parse-gram.y (<chars>): Renamed from <string>.
15567 (<uniqstr>): Renamed from <struniq>.
15568 * src/scan-gram.l (obstack_for_string): Renamed from string_obstack.
15569 * src/vcg.h (struct node_s.expand): Renamed from struct node_s.stretch.
15570 (struct graph_s.expand): Renamed from struct graph_s.stretch.
15571 * src/vcg_defaults.h (G_EXPAND): Renamed from G_STRETCH.
15572 (G_LONG_STRAIGHT_PHASE): Renamed from G_STRAIGHT_PHASE.
15573 (N_EXPAND): Renamed from N_STRETCH.
15574
15575 Avoid *_MAX and *_MIN, since <limits.h> reserves that name space.
15576 * data/yacc.c (YYSTACK_GAP_MAXIMUM): Renamed from YYSTACK_GAP_MAX.
15577 * src/gram.h (ITEM_NUMBER_MAX, ITEM_NUMBER_MIN, RULE_NUMBER_MAX):
15578 Remove; unused.
15579 * src/lalr.h (GOTO_NUMBER_MAXIMUM): Renamed from GOTO_NUMBER_MAX.
15580 * src/state.h (STATE_NUMBER_MAXIMUM): Renamed from STATE_NUMBER_MAX.
15581 * src/symtab.h (SYMBOL_NUMBER_MAXIMUM): Renamed from SYMBOL_NUMBER_MAX.
15582 * src/tables.c (VECTOR_NUMBER_MAX, VECTOR_NUMBER_MIN): Remove; unused.
15583 (BASE_MAXIMUM): Renamed from BASE_MAX.
15584 (BASE_MINIMUM): Renamed from BASE_MIN.
15585 (ACTION_MAX): Remove; unused.
15586 (ACTION_NUMBER_MINIMUM): Renamed from ACTION_MIN.
15587 Unnecessary casts removed from above defines.
15588
15589
15590 Fix misspelling in names.
15591 * src/vcg.h (enum_alignment_e): Renamed from enum_alignement_e.
15592 * src/vcg_defaults.h (G_NODE_ALIGNMENT): Renamed from
15593 G_NODE_ALIGNEMENT.
15594
15595
15596 * lib/timevar.c (timevar_report): Renamed from time_report,
15597 for consistency with other names.
15598 * lib/timevar.h (timevar_report): New decl.
15599 * src/system.h (time_report): Remove; decl is now in lib/timevar.h.
15600
15601
15602 Sort include-file uses.
15603
15604 Reorder all include files under src to be in the order "system.h".
15605 then the ../lib include files in angle brackets (alphabetized),
15606 then the . include files in double-quotes (alphabetized). Fix
15607 dependency breakages encountered in this process, as follows:
15608 * src/closure.h, src/derives.h, src/state.h: Include "gram.h".
15609 * src/complain.c: Don't include stdlib.h, string.h _LIBC stuff.
15610 * src/state.h: Include "symtab.h".
15611
15612 2002-12-08 Paul Eggert <eggert@twinsun.com>
15613
15614 * data/glr.c, data/lalr1.cc, data/yacc.c: Do not use __file__,
15615 since this causes problems when __file__ contains character
15616 sequences like "@" that are treated specially by src/scan-skel.l.
15617 Instead, just use the file's basename. This fixes the bug
15618 reported by Martin Mokrejs in
15619 <http://lists.gnu.org/archive/html/bug-bison/2002-12/msg00007.html>.
15620
15621 2002-12-06 Paul Eggert <eggert@twinsun.com>
15622
15623 Add support for rules that do not have trailing semicolons, as
15624 POSIX requires. Improve the quality of locations in Bison
15625 diagnostics.
15626
15627 * src/location.c: Include <quotearg.h>.
15628 (empty_location): Now const.
15629 (location_print): New function. Follow the recommendation of the
15630 GNU Coding Standards for locations that span file boundaries.
15631 * src/location.h: Do not include <quotearg.h>; no longer needed.
15632 (boundary): New type.
15633 (location_t): Use it. This allows locations to span file boundaries.
15634 All member uses changed: file -> start.file or end.file (as needed),
15635 first_line -> start.line, first_column -> start.column,
15636 last_line -> end.line, last_column -> end.column.
15637 (equal_boundaries): New function.
15638 (LOCATION_RESET, LOCATION_STEP): Remove.
15639 (LOCATION_PRINT): Remove. All callers changed to use location_print.
15640 (empty_location): Now const.
15641 (location_print): New decl.
15642 * src/parse-gram.y (lloc_default): New function, which handles
15643 empty locations more accurately.
15644 (YYLLOC_DEFAULT): Use it.
15645 (%token COLON): Remove.
15646 (%token ID_COLON): New token.
15647 (rules): Use it.
15648 (declarations, rules): Remove trailing semicolon.
15649 (declaration, rules_or_grammar_declaration):
15650 Allow empty (";") declaration.
15651 (symbol_def): Remove empty actions; no longer needed.
15652 (rules_or_grammar_declaration): Remove trailing semicolon.
15653 (semi_colon.opt): Remove.
15654 * src/reader.h: Include location.h.
15655 (scanner_cursor): New decl.
15656 * src/reduce.c (nonterminals_reduce): Use warn_at rather than
15657 rolling our own.
15658 * src/scan-gram.l (YY_USER_INIT): Initialize scanner_cursor instead
15659 of *loc.
15660 (STEP): Remove. No longer needed, now that adjust_location does
15661 the work. All uses removed.
15662 (scanner_cursor): New var.
15663 (adjust_location): Renamed from extend_location. It now sets
15664 *loc and adjusts the scanner cursor. All uses changed.
15665 Don't bother testing for CR.
15666 (handle_syncline): Remove location arg; now updates scanner cursor.
15667 All callers changed.
15668 (unexpected_end_of_file): Now accepts start boundary of token or
15669 comment, not location. All callers changed. Update scanner cursor,
15670 not the location.
15671 (SC_AFTER_IDENTIFIER): New state.
15672 (context_state): Renamed from c_context. All uses changed.
15673 (id_loc, code_start, token_start): New local vars.
15674 (<INITIAL,SC_AFTER_IDENTIFIER>): New initial context. Move all
15675 processing of Yacc white space and equivalents here.
15676 (<INITIAL>{id}): Save id_loc. Begin state SC_AFTER_IDENTIFIER
15677 instead of returning ID immediately, since we need to search for
15678 a subsequent colon.
15679 (<INITIAL>"'", "\""): Save token_start.
15680 (<INITIAL>"%{", "{", "%%"): Save code_start.
15681 (<SC_AFTER_IDENTIFIER>): New state, looking for a colon.
15682 (<SC_YACC_COMMENT>, <SC_COMMENT>, <SC_LINE_COMMENT>):
15683 BEGIN context_state at end, not INITIAL.
15684 (<SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'",
15685 <SC_BRACED_CODE>"}", <SC_PROLOGUE>"%}", <SC_EPILOGUE><<EOF>>):
15686 Return correct token start.
15687 (<SC_BRACED_CODE,SC_PROLOGUE,SC_EPILOGUE>): Save start boundary when
15688 the start of a character, string or multiline comment is found.
15689 * tests/conflicts.at (S/R in initial, Defaulted Conflicted
15690 Reduction): Adjust reported locations to match the more-precise
15691 results now expected.
15692 * tests/input.at (Invalid $n, Invalid @n, Type Clashes): Likewise.
15693 * tests/reduce.at (Useless Rules, Reduced Automaton,
15694 Underivable Rules): Likewise.
15695 * tests/regression.at (Invalid inputs): No longer `expecting ";"
15696 or "|"' now that so many other tokens are allowed by the new grammar.
15697
15698 * src/complain.h (current_file): Remove duplicate decl;
15699 current_file is now owned by files.h.
15700 * src/complain.c, src/scan-gram.l: Include files.h.
15701
15702 2002-12-06 Paul Eggert <eggert@twinsun.com>
15703
15704 * data/glr.c (yy_reduce_print): Don't assume that yyrline[yyrule]
15705 promotes to int; it might be unsigned int.
15706 * data/yacc.c (yy_reduce_print): Likewise.
15707
15708 * doc/bison.texinfo (Table of Symbols): YYERROR_VERBOSE should
15709 be #defined in the prologue, not in the Bison declarations.
15710 This fixes Debian Bug 102878, reported by Shaul Karl.
15711
15712 2002-12-02 Paul Eggert <eggert@twinsun.com>
15713
15714 * configure.ac (AC_REPLACE_FUNCS): Add strtoul.
15715 * lib/strtoul.c: New file, from gnulib.
15716 This fixes a porting bug reported by Peter Klein in
15717 <http://lists.gnu.org/archive/html/bug-bison/2002-12/msg00000.html>.
15718
15719 2002-11-30 Paul Eggert <eggert@twinsun.com>
15720
15721 * src/scan-gram.l (no_cr_read, extend_location): Move to epilogue,
15722 and put only a forward declaration in the prologue. This is for
15723 consistency with the other scanner helper functions.
15724
15725 Type clashes now generate warnings, not errors, since it
15726 appears that POSIX may allow some grammars with type clashes.
15727 * src/reader.c (grammar_current_rule_check): Warn about
15728 type clashes instead of complaining.
15729 * tests/input.at (Type Clashes): Expect warnings, not complaints.
15730
15731 Add Yacc library, since POSIX requires it.
15732 * doc/bison.texinfo (Yacc Library): New node. Regenerate top menu.
15733 * lib/Makefile.am (lib_LIBRARIES, liby_a_SOURCES): New macros.
15734 * lib/main.c, lib/yyerror.c: New files.
15735
15736 gram_error can be static; it need not be extern.
15737 * src/reader.h (gram_error): Remove decl.
15738 * src/parse-gram.y (gram_error): Now static. Add static decl.
15739 (print_token_value): Omit parameter names from forward decl,
15740 for consistency.
15741
15742 2002-11-29 Paul Eggert <eggert@twinsun.com>
15743
15744 * doc/bison.texinfo: Emphasize that yylex and yyerror must
15745 be declared before being used. E.g., one should typically
15746 declare them in the prologue. Use GNU coding style in examples.
15747 Put "const" consistently after the type it modifies. Mention
15748 that C99 supports "inline". Mention that yyerror traditionally
15749 returns "int".
15750
15751 %parse-param and %lex-param now take just one argument, the
15752 declaration; the argument name is deduced from the declaration.
15753
15754 * doc/bison.texinfo (Parser Function, Pure Calling, Error
15755 Reporting, Table of Symbols): Document this.
15756 * src/parse-gram.y (add_param): New function.
15757 (COMMA): Remove.
15758 (declaration): Implement new rule for %parse-param and %lex-param.
15759 * src/scan-gram.l: "," now elicits a warning, rather than being
15760 a token; this is more compatible with byacc.
15761 * tests/calc.at (Simple LALR Calculator): Adopt new convention.
15762
15763 2002-11-27 Paul Eggert <eggert@twinsun.com>
15764
15765 Rename identifiers to avoid real and potential collisions.
15766
15767 * data/c.m4 (b4_yysymprint_generate): yyout -> yyoutput,
15768 to avoid collision with lex macro described by Bruce Lilly in
15769 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
15770 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
15771 * doc/bison.texinfo (Prologue, Tracing): yyprint -> print_token_value.
15772 * src/parse-gram.y (print_token_value): Renamed from yyprint.
15773 All uses changed.
15774 (YYPARSE_PARAM, YYLEX_PARAM, yycontrol): Remove. All uses changed.
15775 The name "yycontrol" violates the name space rules, and this stuff
15776 wasn't being used anyway.
15777 (input): Remove action; this stuff wasn't being used.
15778 (gram_error): Rename local variable yylloc -> loc.
15779 * src/reader.h (struct gram_control_s, gram_control_t): Remove.
15780 (YY_DECL): Don't use "yy" at start of local variables.
15781 All uses changed, e.g., yylloc -> loc.
15782 * src/scan-gram.l (STEP): Renamed from YY_STEP. All uses changed.
15783 (STRING_GROW): Renamed from YY_OBS_GROW. All uses changed.
15784 (STRING_FINISH): Renamed from YY_OBS_FINISH. All uses changed.
15785 (STRING_FREE): Renamed from YY_OBS_FREE. All uses changed.
15786
15787 * src/parse-gram.y (gram_error): loc is now const *.
15788 * src/reader.h (gram_error): Likewise.
15789
15790 2002-11-24 Paul Eggert <eggert@twinsun.com>
15791
15792 Version 1.75c.
15793
15794 * tests/actions.at (Actions after errors): Use an output format
15795 more similar to that of the Printers and Destructors test.
15796 Test the position of the ';' token too.
15797 (Printers and Destructors): Likewise.
15798 (Printers and Destructors: %glr-parser): Remove for now, to avoid
15799 unnecessarily alarming people when the test fails.
15800
15801 * data/yacc.c (yyerrlab1): Move this label down, so that the
15802 parser does not discard the lookahead token if the user code
15803 invokes YYERROR. This change is required for POSIX conformance.
15804
15805 * lib/error.c: Sync with gnulib.
15806
15807 2002-11-22 Paul Eggert <eggert@twinsun.com>
15808
15809 * lib/quotearg.c, lib/quotearg.h: Sync with gnulib.
15810 * lib/mbswidth.c, lib/mbswidth.h: Likewise.
15811 * lib/xmalloc.c: Likewise.
15812
15813 2002-11-20 Paul Eggert <eggert@twinsun.com>
15814
15815 * lib/argmatch.c, lib/argmatch.h: Sync with gnulib.
15816
15817 2002-11-20 Paul Eggert <eggert@twinsun.com>
15818
15819 Avoid use of <assert.h>, as the GNU Coding Standards hint that one
15820 should use `if (! x) abort ();' rather than `assert (x);', and
15821 anyway it's one less thing to worry about configuring.
15822
15823 * data/glr.c, lib/hash.c, src/system.h: Do not include <assert.h>.
15824 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise,
15825 and replace all instances of assert with abort.
15826 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
15827 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Likewise.
15828
15829 * data/glr.c (yydoAction, yyglrReduce, yysplitStack, yyresolveStates,
15830 yyresolveAction, yyprocessOneStack): Use abort rather than assert.
15831 * lib/hash.c (hash_lookup, hash_get_first, hash_get_next,
15832 hash_find_entry, hash_rehash, hash_insert): Likewise.
15833 * src/conflicts.c (resolve_sr_conflict): Likewise.
15834 * src/lalr.c (set_goto_map, map_goto): Likewise.
15835 * src/nullable.c (nullable_compute): Likewise.
15836 * src/output.c (prepare_rules, token_definitions_output): Likewise.
15837 * src/reader.c (packgram, reader): Likewise.
15838 * src/state.c (state_new, state_free, state_transitions_set,
15839 state_reduction_find): Likewise.
15840 * src/symtab.c (symbol_user_token_number_set, symbol_make_alias,
15841 symbol_pack): Likewise.
15842 * src/tables.c (conflict_row, pack_vector): Likewise.
15843 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
15844 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
15845 get_node_alignement_str, get_arrow_mode_str, get_crossing_type_str,
15846 get_view_str, get_linestyle_str, get_arrowstyle_str): Likewise.
15847
15848 * lib/argmatch.h (ARRAY_CARDINALITY): Do not bother to #undef.
15849 (ARGMATCH_CONSTRAINT): New macro.
15850 (ARGMATCH_ASSERT): Use it.
15851
15852 * src/system.h (verify): New macro.
15853 * src/getargs.c (trace_argmatch, report_argmatch): Use verify
15854 rather than assert.
15855 * src/tables.c (tables_generate): Likewise.
15856
15857 * src/struniq.c (struniq_assert): Now returns void, and aborts
15858 if the assertion is false.
15859 (struniq_assert_p): Remove.
15860 * src/struniq.h: Likewise.
15861
15862 2002-11-18 Paul Eggert <eggert@twinsun.com>
15863
15864 * data/glr.c (yygetLRActions): Replace `yyindex' with
15865 `yytable[yyindex]' to fix typo introduced in my 2002-11-09 patch.
15866 This fixes the regression with Sun ONE Studio 7 cc that I reported in
15867 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00077.html>.
15868
15869 2002-11-18 Akim Demaille <akim@epita.fr>
15870
15871 * doc/bison.texinfo (Tracing): `yyprint' shouldn't prepend a
15872 space.
15873 From Tim Van Holder.
15874
15875 2002-11-17 Paul Eggert <eggert@twinsun.com>
15876
15877 Pacify Sun ONE Studio 7 lint. Also, rename "ParseError"
15878 to "SyntaxError" for consistency with my 2002-11-15 change.
15879
15880 * data/glr.c (YYDPRINTF, YYDSYMPRINT, YYDSYMPRINTF) [!YYDEBUG]: Do
15881 not define to {}, since this breaks the common use of `YYDPRINTF
15882 ((...));' if a single statement is desired (e.g. before `else').
15883 Work around GCC warnings by surrounding corresponding calls with
15884 {} if needed.
15885 (yyhasResolvedValue): Remove unused function.
15886 (yymergeOptionSets, yyresolvStack): Use `continue;' for empty
15887 loop body.
15888 (yyreportSyntaxError): Renamed from yyreportParseError.
15889 (yyrecoverSyntaxError): Renamed from yyrecoverParseError.
15890 All uses changed.
15891 * tests/calc.at (_AT_DATA_CALC_Y): Make vars static instead of
15892 extern when possible. Remove unused initializations.
15893
15894 2002-11-16 Akim Demaille <akim@epita.fr>
15895
15896 Augment the similarity between GLR and LALR traces.
15897
15898 * data/yacc.c (yy_stack_print, YY_STACK_PRINT, yy_reduce_print)
15899 (YY_REDUCE_PRINT): New.
15900 (yyparse): Use them.
15901 * data/glr.c (yy_reduce_print): Use YYFPRINTF, no need for
15902 YYDPRINT here.
15903 (yyglrReduce, yyrecoverParseError, yyparse): Don't report the
15904 state reached after the reduction/recovery, since...
15905 (yyparse, yyprocessOneStack): Report the state we are entering in.
15906
15907 2002-11-16 Akim Demaille <akim@epita.fr>
15908
15909 * src/getargs.h, src/getargs.c (trace_e, trace_args, trace_types):
15910 Add support for --trace=skeleton.
15911 * src/scan-skel.l: %option debug.
15912 Scan strings of non-@ or \n instead of character by character.
15913 (scan_skel): Handle trace_skeleton.
15914 (QPUTS): New.
15915 (@output_parser_name@, @output_header_name@): ``Restore'' their
15916 support (used to be M4 macros).
15917 * data/yacc.c: Quote larger chunks, a la glr.c.
15918 * data/lalr1.cc: Likewise.
15919 The header guards are no longer available, so use some other
15920 string than `YYLSP_NEEDED'.
15921
15922 2002-11-16 Akim Demaille <akim@epita.fr>
15923
15924 Make the ``Printers and Destructors'' test more verbose, taking
15925 `yacc.c''s behavior as (possibly wrong) reference.
15926
15927 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use printf
15928 instead of fprint on stdout.
15929 Set and report the last_line of the symbols.
15930 Consistently display values and locations.
15931
15932 2002-11-16 Paul Eggert <eggert@twinsun.com>
15933
15934 * data/yacc.c: Avoid over-quoting of __line__ and __file__.
15935
15936 2002-11-15 Paul Eggert <eggert@twinsun.com>
15937
15938 * tests/actions.at (Actions after errors): New test case.
15939
15940 * data/glr.c, data/lalr1.cc, data/yacc.cc, doc/bison.texinfo,
15941 src/conflicts.c, src/parse-gram.y, src/tables.c, src/tables.h,
15942 tests/action.at, tests/calc.at, tests/conflicts.at,
15943 tests/cxx-type.at, tests/regression.at:
15944 "parse error" -> "syntax error" for POSIX compatibility.
15945 "parsing stack overflow..." -> "parser stack overflow" so
15946 that code matches Bison documentation.
15947
15948 2002-11-15 Akim Demaille <akim@epita.fr>
15949
15950 * src/parse-gram.y (declaration): Have %parse-param and %lex-param
15951 take two BRACED_CODE, not two string_content.
15952 Free the scanner's obstack when we are done.
15953 (code_content): New.
15954 * tests/calc.at: Adjust.
15955 * doc/bison.texinfo: Adjust.
15956 Also, make sure to include the `,' for these declarations.
15957
15958 2002-11-15 Tim Van Holder <tim.van.holder@pandora.be>
15959
15960 * m4/prereq.m4: Removed the commented jm_PREREQ_HASH
15961 definition; avoids potential autoreconf problems.
15962
15963 2002-11-15 Akim Demaille <akim@epita.fr>
15964
15965 Always check the value returned by yyparse.
15966
15967 * tests/calc.at (_AT_DATA_CALC_Y): Have `main' exit with the value
15968 returned by yyparse.
15969 (_AT_CHECK_CALC_ERROR): Take the expected exit value as argument.
15970 Adjust calls.
15971 * tests/glr-regr1.at (glr-regr1.y): Have `main' exit with the value
15972 returned by yyparse.
15973
15974 2002-11-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
15975
15976 * data/glr.c (yyFail): Always set yyerrflag. Corrects regression
15977 on input.at test.
15978
15979 2002-11-14 Paul Eggert <eggert@twinsun.com>
15980
15981 * src/output.c (output_skeleton): Call xfopen instead of
15982 duplicating xfopen's body.
15983
15984 Fix bugs reported by Nelson H. F. Beebe in
15985 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00078.html>.
15986
15987 * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that
15988 "$CC -E foo.h" is allowed, as this doesn't work with the Portland
15989 Group compiler. Instead, use "$CC -E bar.c". Include the .h
15990 file twice in the grammar, as an extra check.
15991
15992 * tests/input.at (Torturing the Scanner): Surround the
15993 backslash-newline tests with "#if 0", to make it less likely that
15994 we'll run into compiler bugs. Bring back solitary \ inside
15995 comment, but add a closing comment to work around HP C bug. Don't
15996 test backslash-newline in C character constant.
15997
15998 2002-11-14 Akim Demaille <akim@epita.fr>
15999
16000 * tests/synclines.at (AT_SYNCLINES_COMPILE): Ignore the exit
16001 status of the compiler.
16002 Calling `exit 1' is no longer needed.
16003 Reported by Nelson H. F. Beebe.
16004
16005 2002-11-14 Akim Demaille <akim@epita.fr>
16006
16007 * tests/atlocal.in (CPPFLAGS): We have config.h.
16008 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR):
16009 New.
16010 * tests/actions.at, tests/calc.at, tests/conflicts.at,
16011 * tests/cxx-type.at, tests/glr-regr1.at, tests/headers.at,
16012 * tests/regression.at, tests/torture.at: Use them for all the
16013 grammars that are to be compiled.
16014 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Rename as...
16015 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): this.
16016 * doc/bison.texinfo (GLR Parsers): Document `inline'.
16017
16018 2002-11-14 Akim Demaille <akim@epita.fr>
16019
16020 * doc/bison.texinfo: Various formatting changes (alignments in
16021 samples, additional @group/@end group, GCS in samples.
16022 Use @deffn instead of simple @table to define the directives,
16023 macros, variables etc.
16024
16025 2002-11-13 Paul Eggert <eggert@twinsun.com>
16026
16027 Fix some bugs reported by Albert Chin-A-Young in
16028 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00066.html>.
16029
16030 * tests/input.at (Torturing the Scanner): Don't invoke "cc a.c b.c
16031 -o c"; the HP C compiler chatters during compilation.
16032 Instead, invoke "cc -c a.c -o a.o; cc -c b.c -o b.o; cc a.o b.o -o c".
16033 * tests/headers.at (export YYLTYPE): Likewise.
16034
16035 * tests/input.at (Torturing the Scanner): Remove lines containing
16036 solitary backslashes, as they tickle a bug in the HP C compiler.
16037
16038 * tests/glr-regr1.at (Badly Collapsed GLR States): Avoid //
16039 comments, since they're not portable. Use GNU coding style.
16040
16041 2002-11-13 Akim Demaille <akim@epita.fr>
16042
16043 * data/yacc.c: Leave bigger chunks of quoted text.
16044 (YYDSYMPRINTF): New.
16045 Use it to report symbol activities.
16046 * data/glr.c (YYDSYMPRINTF): New.
16047 Use it.
16048
16049 2002-11-12 Paul Eggert <eggert@twinsun.com>
16050
16051 Version 1.75b.
16052
16053 * data/glr.c (yydoAction): Return YYRESULTTAG, not int.
16054 (yyglrReduce): Return yyok, not 0.
16055 This should avoid the enumerated-type warnings reported
16056 by Nelson H. F. Beebe in
16057 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00057.html>.
16058
16059 * lib/bbitset.h (BITSET_INLINE): Remove.
16060 * lib/bitset.h [! BITSET_INLINE]: Remove.
16061 (bitset_set, bitset_reset, bitset_test): Rename local vars
16062 to avoid shadowing warnings by GCC.
16063
16064 * data/glr.c (inline): Remove #define. It's the user's
16065 responsibility to #define it away, just like 'const'.
16066 This fixes one of the bugs reported by Nelson H. F. Beebe in
16067 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00058.html>.
16068
16069 * Makefile.maint (po-check): Scan .l and .y files instead of the
16070 .c and the .h files that they generate. This fixes the bug
16071 reported by Tim Van Holder in:
16072 <http://lists.gnu.org/archive/html/bison-patches/2002-11/msg00062.html>
16073 Look for N_ as well as for _. Try to avoid matching #define for
16074 N_ and _.
16075 * po/POTFILES.in: Remove src/parse-gram.c, src/scan-gram.c,
16076 src/system.h. Add src/parse-gram.y, src/scan-gram.l.
16077 * src/scan-gram.l: Revamp regular expressions so that " and '
16078 do not confuse xgettext.
16079
16080 * src/struniq.h (struniq_new): Do not declare the return type
16081 to be 'const'; this violates the C standard.
16082 * src/struniq.c (struniq_new): Likewise.
16083
16084 2002-11-12 Albert Chin-A-Young <china@thewrittenword.com>
16085
16086 * src/Makefile.am (LDADD): Link $(LIBINTL) last to avoid the
16087 duplicate definition of optind on Tru64 UNIX 4.0D with the Compaq
16088 linker.
16089
16090 2002-11-12 Akim Demaille <akim@epita.fr>
16091
16092 * Makefile.maint: Sync with Autoconf:
16093 (local_updates): New.
16094
16095 2002-11-12 Akim Demaille <akim@epita.fr>
16096
16097 * po/POTFILES.in (src/lalr.c, src/state.c): Remove
16098
16099 2002-11-12 Akim Demaille <akim@epita.fr>
16100
16101 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Display the
16102 locations.
16103
16104 2002-11-12 Akim Demaille <akim@epita.fr>
16105
16106 * data/c.m4 (b4_yysymprint_generate): Pass *yyvaluep to YYPRINT,
16107 not yyvalue.
16108
16109 2002-11-12 Akim Demaille <akim@epita.fr>
16110
16111 * tests/actions.at (AT_CHECK_PRINTER_AND_DESTRUCTOR): New.
16112 Use it to test the GLR parser.
16113
16114 2002-11-12 Akim Demaille <akim@epita.fr>
16115
16116 * tests/regression.at (input.y): s/YYEOF/MYEOF/, as the skeleton
16117 defines it.
16118 * data/glr.c (yystos): New.
16119 (b4_yysymprint_generate, b4_yydestruct_generate): Invoke.
16120 (YYDSYMPRINT): New.
16121 (yyval): Don't define it, it is handled via M4.
16122 (yyrecoverParseError): Free verbosely the discarded symbols.
16123 * data/yacc.c (yysymprint): Remove, rather...
16124 (b4_yysymprint_generate): invoke.
16125 * data/c.m4 (b4_yysymprint_generate): New.
16126 Accept pointers as arguments, as opposed to the version from
16127 yacc.c.
16128 (b4_yydestruct_generate): Likewise.
16129 * tests/cations.at (Printers and Destructors): Use Bison directives
16130 instead of CPP macros.
16131 Don't rely on internal details.
16132
16133 2002-11-12 Akim Demaille <akim@epita.fr>
16134
16135 * data/c.m4 (b4_yydestruct_generate, b4_symbol_actions): New.
16136 * data/yacc.c: Rename yychar1 as yytoken, as in glr.c.
16137 Don't work on yychar (i.e., do set it to YYEMPTY, don't match
16138 it against YYEMPTY and so forth), work on yytoken (i.e., set
16139 it to YYEMPTY etc.).
16140 (yydestruct): Replace with a b4_yydestruct_generate invocation.
16141 (b4_symbol_actions): Remove.
16142 * data/glr.c (YYTRANSLATE): As for yacc.c, if negative, it stands
16143 for 0, end-of-input.
16144
16145 2002-11-12 Akim Demaille <akim@epita.fr>
16146
16147 * doc/bison.texinfo (Destructor Decl): New.
16148
16149 2002-11-12 Akim Demaille <akim@epita.fr>
16150
16151 * src/tables.c (tables_generate): Use free for pointers that
16152 cannot be NULL, not XFREE.
16153 (pack_vector): Use assert, not fatal, for bound violations.
16154 * src/state.c (state_new): Likewise.
16155 * src/reader.c (reader): Likewise.
16156 * src/lalr.c (set_goto_map): Likewise.
16157 * src/location.h (LOCATION_PRINT): If first_line is 0, just issue
16158 the file name.
16159
16160 2002-11-12 Akim Demaille <akim@epita.fr>
16161
16162 * src/scan-gram.l, src/reader.h (scanner_last_string_free):
16163 Restore.
16164 * src/scan-gram.l (last_string): Is global to the file, not to
16165 yylex.
16166 * src/parse-gram.y (input): Don't append the epilogue here,
16167 (epilogue.opt): do it here, and free the scanner's obstack.
16168 * src/reader.c (epilogue_set): Rename as...
16169 (epilogue_augment): this.
16170 * data/c.m4 (b4_epilogue): Defaults to empty.
16171
16172 2002-11-12 Akim Demaille <akim@epita.fr>
16173
16174 * src/getargs.c (long_options): Remove duplicates.
16175 * src/vmsgetargs.c, src/build.com, src/bison.cld, src/vmshlp.mar:
16176 Remove.
16177 * doc/bison.rnh: Remove.
16178 * doc/bison.texinfo (VMS Invocation): Remove.
16179
16180 2002-11-12 Akim Demaille <akim@epita.fr>
16181
16182 * src/struniq.h, src/struniq.c (struniq_t): Is const.
16183 (STRUNIQ_EQ, struniq_assert, struniq_assert_p): New.
16184
16185 Use struniq for symbols.
16186
16187 * src/symtab.h (symbol_t): The tag member is a struniq.
16188 (symbol_type_set): Adjust.
16189 * src/symtab.c (symbol_new): Takes a struniq.
16190 (symbol_free): Don't free the tag member.
16191 (hash_compare_symbol_t, hash_symbol_t): Rename as...
16192 (hash_compare_symbol, hash_symbol): these.
16193 Use the fact that tags as struniqs.
16194 (symbol_get): Use struniq_new.
16195 * src/symlist.h, src/symlist.c (symbol_list_n_type_name_get):
16196 Returns a strniq.
16197 * src/reader.h (merger_list, grammar_currentmerge_set): The name
16198 and type members are struniqs.
16199 * src/reader.c (get_merge_function)
16200 (grammar_current_rule_merge_set): Adjust.
16201 (TYPE, current_type): Are struniq.
16202
16203 Use struniq for file names.
16204
16205 * src/files.h, src/files.c (infile): Split into...
16206 (grammar_file, current_file): these.
16207 * src/scan-gram.c (YY_USER_INIT, handle_syncline): Adjust.
16208 * src/reduce.c (reduce_print): Likewise.
16209 * src/getargs.c (getargs): Likewise.
16210 * src/complain.h, src/complain.c: Likewise.
16211 * src/main.c (main): Call struniqs_new early enough to use it for
16212 file names.
16213 Don't free the input file name.
16214
16215 2002-11-12 Akim Demaille <akim@epita.fr>
16216
16217 * src/symtab.c (symbol_free): Remove dead deactivated code:
16218 type_name are properly removed.
16219 Don't use XFREE to free items that cannot be NULL.
16220 * src/struniq.h, src/struniq.c: New.
16221 * src/main.c (main): Initialize/free struniqs.
16222 * src/parse-gram.y (%union): Add astruniq member.
16223 (yyprint): Adjust.
16224 * src/scan-gram.l (<{tag}>): Return a struniq.
16225 Free the obstack bit that used to store it.
16226 * src/symtab.h (symbol_t): The 'type_name' member is a struniq.
16227
16228 2002-11-11 Paul Eggert <eggert@twinsun.com>
16229
16230 Revamp to fix many (but not all) of the C- and M4-related quoting
16231 problems. Among other things, this fixes the Bison bug reported
16232 by Jan Hubicka when processing the Bash grammar; see:
16233 <http://lists.gnu.org/archive/html/bison-patches/2002-11/msg00039.html>
16234
16235 Use new @ escapes consistently. Represent brackets with @{ and @}
16236 rather than @<:@ and @:>@, since this works a bit better with dumb
16237 editors like vi. Represent @ with @@, since @ is now consistently
16238 an escape. Use @oline@ and @ofile@ rather than __oline__ and
16239 __ofile__, to avoid unexpected expansions. Similarly, use @output
16240 rather than #output.
16241
16242 * data/c.m4 (b4_copyright): Omit file name from comment, since
16243 the file name could contain "*/".
16244 (b4_synclines_flag): Don't quote the 2nd argument; it should already
16245 be quoted. All uses changed.
16246
16247 * data/glr.c: Use new @ escapes consistently.
16248 (b4_input_suffix, b4_output_parser_suffix, b4_output_parser_name,
16249 b4_output_header_suffix, b4_output_header_name, b4_header_guard):
16250 Remove, since they couldn't handle arbitrary characters in file
16251 names.
16252 * data/lalr1.cc: Likewise.
16253 * data/yacc.c: Likewise.
16254
16255 * src/files.c (output_infix): Remove; all uses removed.
16256 * src/files.h: Likewise.
16257
16258 * data/glr.c: Remove use of "#ifdef b4_header_guard", since it
16259 mishandled funny characters in file names, and anyway it isn't
16260 needed any more.
16261 * data/yacc.c: Likewise.
16262 * data/lalr1.cc: Use YYSLP_NEEDED instead of b4_header_guard.
16263
16264 * data/glr.c (YYSTYPE_IS_TRIVIAL): Define when the .h file would.
16265 * data/yacc.c: Likewise.
16266
16267 * src/muscle_tab.c: Include quotearg.h, since we need to quote C
16268 strings now.
16269 (muscle_init): Quote filename as a C string.
16270 * src/muscle_tab.h (MUSCLE_GROW_STRING_PAIR): Remove; unused.
16271 (MUSCLE_OBSTACK_SGROW, MUSCLE_INSERT_C_STRING): New macros.
16272 * src/output.c (escaped_file_name_output): New function.
16273 (prepare_symbols): Quote tokens for M4.
16274 (prepare): Don't insert output_infix, output_prefix,
16275 output_parser_name, output_header_name; this is now down by scan-skel.
16276 Insert skeleton as a C string.
16277
16278 * src/output.c (user_actions_output, symbol_destructors_output,
16279 symbol_printers_output): Quote filenames for C and M4.
16280 * src/reader.c (prologue_augment, epilogue_set): Likewise.
16281
16282 * src/scan-gram.l (<SC_CHARACTER>): Don't worry about any backslash
16283 escapes other than \\ and \'; this simplifies the code.
16284 (<SC_STRING>): Likewise, for \\ and \".
16285 (<SC_COMMENT,SC_LINE_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,
16286 SC_PROLOGUE,SC_EPILOGUE>): Escape $ and @, too.
16287 Use new escapes @{ and @} for [ and ].
16288
16289 * src/scan-skel.l (yylineno, yyoutname): Remove static vars, replacing
16290 them with auto vars.
16291 Switch to new escape scheme, where @ is the escape character uniformly.
16292 Abort if a stray escape character is found. Avoid unbounded input
16293 buffer when parsing non-escaped text.
16294
16295 * tests/input.at (Torturing the Scanner): Add tests that @oline@,
16296 __oline__, #output, $@, and @{ do not have unintended meanings.
16297
16298 2002-11-09 Paul Eggert <eggert@twinsun.com>
16299
16300 Fix the test failure due to GCC warnings described in
16301 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00000.html>.
16302 * data/glr.c (yyis_pact_ninf, yyis_table_ninf): New macros, which
16303 evaluate to 0 if it's impossible for NINF to be in the respective
16304 table.
16305 (yygetLRActions, yyrecoverParseError): Use them.
16306
16307 * src/scan-gram.l (unexpected_end_of_file): Fix bug: columns were
16308 counted in the token inserted at end of file. Now takes
16309 location_t *, not location_t, so that the location can be
16310 adjusted. All uses changed.
16311
16312 * tests/regression.at (Invalid inputs): Adjust wording in
16313 diagnostic to match the new behavior.
16314
16315 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR,
16316 AT_DATA_HORIZONTAL_GRAMMAR, AT_DATA_LOOKAHEADS_GRAMMAR,
16317 AT_DATA_STACK_TORTURE): Replace `assert (x);' with `if (! (x))
16318 abort ();'. This reduces the runtime of the "Many lookaheads"
16319 test from 27.6 to 2.7 minutes on a 440 MHz Ultrasparc III running
16320 GCC 3.2.
16321
16322 2002-11-07 Paul Eggert <eggert@twinsun.com>
16323
16324 * src/parse-gram.y (CHARACTER): Remove unused token.
16325 All uses removed.
16326
16327 * src/scan-gram.l: Remove stack option. We no longer use the
16328 stack, since the stack was never deeper than 1; instead, use the
16329 new auto var c_context to record the stacked value.
16330
16331 Remove nounput option. At an unexpected end of file, we now unput
16332 the minimal input necessary to end cleanly; this simplifies the
16333 code.
16334
16335 Avoid unbounded token sizes where this is easy.
16336
16337 (unexpected_end_of_file): New function.
16338 Use it to systematize the error message on unexpected EOF.
16339 (last-string): Now auto, not static.
16340 (YY_OBS_FREE): Remove unnecessary do while (0) wrapper.
16341 (scanner_last_string_free): Remove; not used.
16342 (percent_percent_count): Move decl to just before use.
16343 (SC_ESCAPED_CHARACTER): Return ID at unexpected end of file,
16344 not the (never otherwised-used) CHARACTER.
16345
16346 2002-11-07 Akim Demaille <akim@epita.fr>
16347
16348 Let yyerror always receive the msg as last argument, so that
16349 yyerror can be variadic.
16350
16351 * data/yacc.c (b4_yyerror_args): New.
16352 Use it when calling yyerror.
16353 * data/glr.c (b4_yyerror_args, b4_lyyerror_args): New.
16354 Use it when calling yyerror.
16355 * doc/bison.texinfo (Error Reporting): Adjust.
16356 * tests/calc.at (_AT_DATA_CALC_Y): Adjust.
16357 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Adjust.
16358
16359 2002-11-06 Akim Demaille <akim@epita.fr>
16360
16361 #line should have quoted strings.
16362 Ideally, this should be done by m4_quotearg.
16363
16364 * src/scan-skel.l: Include quotearg.h.
16365 Quote __ofile__.
16366 * src/output.c (symbol_printers_output)
16367 (symbol_destructors_output): Quote the file name.
16368
16369 2002-11-06 Akim Demaille <akim@epita.fr>
16370
16371 * tests/regression.at (Invalid inputs): Adjust to the recent
16372 messages.
16373
16374 2002-11-06 Akim Demaille <akim@epita.fr>
16375
16376 Restore --no-lines.
16377 Reported by Jim Kent.
16378
16379 * data/c.m4 (b4_syncline): New.
16380 * data/glr.c, data/yacc.c, data/lalr1.cc: Use it.
16381 * src/reader.c (prologue_augment, epilogue_set): Use b4_syncline.
16382 * src/output.c (user_actions_output): Likewise.
16383 (prepare): Define 'b4_synclines_flag'.
16384 * src/muscle_tab.c (muscle_init): Don't define b4_linef.
16385
16386 2002-11-06 Akim Demaille <akim@epita.fr>
16387
16388 * src/main.c (main): Free `infile'.
16389 * src/scan-gram.l (handle_syncline): New.
16390 Recognize `#line'.
16391 * src/output.c (user_actions_output, symbol_destructors_output)
16392 (symbol_printers_output): Use the location's file name, not
16393 infile.
16394 * src/reader.c (prologue_augment, epilogue_set): Likewise.
16395
16396 2002-11-05 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16397
16398 * src/tables.c (matching_state): Don't allow states to match if
16399 either has GLR conflict entries.
16400
16401 2002-11-05 Paul Eggert <eggert@twinsun.com>
16402
16403 * src/scan-gram.l: Use more accurate diagnostics, e.g.
16404 "integer out of range" rather than "invalid value".
16405 * tests/input.at (Invalid $n, Invalid @n): Change expected wording
16406 accordingly.
16407
16408 Scan <% and %> digraphs in C code as POSIX 1003.1-2001 requires.
16409 Also, remove one static variable in the scanner.
16410
16411 * src/scan-gram.l (braces_level): Now auto, not static.
16412 Initialize to zero if the compiler is being picky.
16413 (INITIAL): Clear braces_level instead of incrementing it.
16414 (SC_BRACED_CODE): Treat <% and %> as { and } when inside C code,
16415 as POSIX 1003.1-2001 requires.
16416 * src/system.h (IF_LINT): New macro, taken from coreutils.
16417 * configure.ac: Define "lint" if --enable-gcc-warnings.
16418
16419 2002-11-05 Akim Demaille <akim@epita.fr>
16420
16421 * src/scan-gram.l: When it starts with `%', complain about the
16422 whole directive, not just that `invalid character: %'.
16423
16424 2002-11-04 Akim Demaille <akim@epita.fr>
16425
16426 * Makefile.maint: Update from Autoconf.
16427 (update, cvs-update, po-update, do-po-update): New.
16428
16429 2002-11-04 Akim Demaille <akim@epita.fr>
16430
16431 * tests/glr-regr1.at (Badly Collapsed GLR States): Prototype yylex
16432 and yyerror.
16433 Have yyerror `use' its arguments.
16434 * tests/calc.at (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF
16435 returns true when location & yacc & pure & parse-param.
16436 (_AT_DATA_CALC_Y): Let yyerror ``use'' its arguments.
16437
16438 2002-11-04 Akim Demaille <akim@epita.fr>
16439
16440 * src/location.h (LOCATION_PRINT): Use quotearg slot 3 to avoid
16441 clashes.
16442 * src/scan-gram.l: Use [\'] instead of ['] to pacify
16443 font-lock-mode.
16444 Use complain_at.
16445 Use quote, not quote_n since LOCATION_PRINT no longer uses the
16446 slot 0.
16447
16448 2002-11-03 Paul Eggert <eggert@twinsun.com>
16449
16450 * src/reader.c (get_merge_function, grammar_current_rule_check):
16451 Use consistent diagnostics for reporting type name clashes.
16452 Quote the types with <>, for consistency with Yacc.
16453 * tests/input.at (Type Clashes): Adjust to diagnostic changes.
16454
16455 2002-11-03 Akim Demaille <akim@epita.fr>
16456
16457 * data/c.m4 (b4_identification, b4_user_args, b4_parse_param):
16458 New.
16459 * data/yacc.m4 (b4_pure_args, b4_Pure_args): New.
16460 (b4_parse_param): Remove.
16461 Use b4_identification.
16462 Propagate b4_pure_args where needed to pass them to yyerror.
16463 * data/glr.m4 (b4_parse_param): Remove.
16464 (b4_user_formals, b4_pure_args, b4_pure_formals, b4_lpure_args)
16465 (b4_lpure_formals): New.
16466 Use b4_identification.
16467 (YY_USER_FORMALS, YY_USER_ARGS): Remove, replaced by
16468 b4_user_formals and b4_user_args.
16469 (yyexpandGLRStack, yyFail, yyaddDeferredAction, yyglrShiftDefer)
16470 (yyreportAmbiguity): When using a pure parser, also need
16471 the location, and the parse-params.
16472 Adjust callers.
16473 (yyuserAction, yyglrShift, yyreportParseError, yyrecoverParseError):
16474 When using a pure parser, also need the parse-params.
16475 Adjust callers.
16476 * tests/calc.at: Test pure (%pure-parser) and absolutely pure
16477 (%pure-parser + %parse-param) LALR and GLR parsers.
16478 (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): New, define AT_PARAM_IF,
16479 AT_LOCATION_IF, AT_PURE_IF, AT_GLR_IF, AAT_PURE_AND_LOC_IF,
16480 AT_GLR_OR_PARAM_IF, AT_YYERROR_ARG_LOC_IF, AT_YYERROR_SEES_LOC_IF.
16481 (_AT_DATA_CALC_Y): Equip for purity of yyerror.
16482 (_AT_CHECK_CALC_ERROR): Use AT_YYERROR_SEES_LOC_IF.
16483 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Equip for yyerror purity.
16484 * doc/bison.texinfo: Untabify the whole file.
16485 (Parser Function): Document %parse-param, deprecate YYPARSE_PARAM.
16486 (Pure Calling): Document %lex-param, deprecate YYLEX_PARAM.
16487 (Error Reporting): Adjust to these new directives.
16488 Document %error-verbose, deprecate YYERROR_VERBOSE.
16489
16490 2002-11-03 Akim Demaille <akim@epita.fr>
16491
16492 * tests/calc.at: Change all the AT_CHECK_CALC_LALR and
16493 AT_CHECK_CALC_GLR invocations to use % directives, instead of
16494 command line options.
16495 * tests/cxx-type.at: Formatting changes.
16496
16497 2002-11-03 Paul Eggert <eggert@twinsun.com>
16498
16499 * src/scan-gram.l: Revamp to fix POSIX incompatibilities,
16500 to count columns correctly, and to check for invalid inputs.
16501
16502 Use mbsnwidth to count columns correctly. Account for tabs, too.
16503 Include mbswidth.h.
16504 (YY_USER_ACTION): Invoke extend_location rather than LOCATION_COLUMNS.
16505 (extend_location): New function.
16506 (YY_LINES): Remove.
16507
16508 Handle CRLF in C code rather than in Lex code.
16509 (YY_INPUT): New macro.
16510 (no_cr_read): New function.
16511
16512 Scan UCNs, even though we don't fully handle them yet.
16513 (convert_ucn_to_byte): New function.
16514
16515 Handle backslash-newline correctly in C code.
16516 (SC_LINE_COMMENT, SC_YACC_COMMENT): New states.
16517 (eols, blanks): Remove. YY_USER_ACTION now counts newlines etc.;
16518 all uses changed.
16519 (tag, splice): New EREs. Do not allow NUL or newline in tags.
16520 Use {splice} wherever C allows backslash-newline.
16521 YY_STEP after space, newline, vertical-tab.
16522 ("/*"): BEGIN SC_YACC_COMMENT, not yy_push_state (SC_COMMENT).
16523
16524 (letter, id): Don't assume ASCII; e.g., spell out a-z.
16525
16526 ({int}, handle_action_dollar, handle_action_at): Check for integer
16527 overflow.
16528
16529 (YY_STEP): Omit trailing semicolon, so that it's more like C.
16530
16531 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>): Allow \0 and \00
16532 as well as \000. Check for UCHAR_MAX, not 255.
16533 Allow \x with an arbitrary positive number of digits, as in C.
16534 Check for overflow here.
16535 Allow \? and UCNs, for compatibility with C.
16536
16537 (handle_symbol_code_dollar): Use quote_n slot 1 to avoid collision
16538 with quote slot used by complain_at.
16539
16540 * tests/input.at: Add tests for backslash-newline, m4 quotes
16541 in symbols, long literals, and funny escapes in strings.
16542
16543 * configure.ac (jm_PREREQ_MBSWIDTH): Add.
16544 * lib/Makefile.am (libbison_a_SOURCES): Add mbswidth.h, mbswidth.c.
16545 * lib/mbswidth.h, lib/mbswidth.c: New files, from GNU gettext.
16546 * m4/Makefile.am (EXTRA_DIST): Add mbswidth.m4.
16547 * m4/mbswidth.m4: New file, from GNU coreutils.
16548
16549 * doc/bison.texinfo (Grammar Outline): Document // comments.
16550 (Symbols): Document that trigraphs have no special meaning in Bison,
16551 nor is backslash-newline allowed.
16552 (Actions): Document that trigraphs have no special meaning.
16553
16554 * src/location.h (LOCATION_COLUMNS, LOCATION_LINES): Remove;
16555 no longer used.
16556
16557 2002-11-02 Paul Eggert <eggert@twinsun.com>
16558
16559 * src/reader.c: Don't include quote.h; not needed.
16560 (get_merge_function): Reword warning to be consistent with
16561 type clash diagnostic in grammar_current_rule_check.
16562
16563 * lib/quotearg.c (quotearg_buffer_restyled): Fix off-by-two
16564 bug in trigraph handling.
16565
16566 * src/output.c (prepare_symbols): When printing token names,
16567 escape "[" as "@<:@" and likewise for "]".
16568
16569 * src/system.h (errno): Remove declaration, as we are now
16570 assuming C89 or better, and C89 guarantees errno.
16571
16572 2002-10-30 Paul Eggert <eggert@twinsun.com>
16573
16574 * lib/bitset_stats.c (bitset_stats_read, bitset_stats_write):
16575 Check for close failures.
16576 * src/files.h (xfclose): Return void, not int, since it always
16577 returned zero.
16578 * src/files.c (xfclose): Likewise. Report I/O error if ferror
16579 indicates one.
16580 * src/output.c (output_skeleton): Use xfclose rather than fclose
16581 and ferror. xfclose now checks ferror.
16582
16583 * data/glr.c (YYLEFTMOST_STATE): Remove.
16584 (yyreportTree): Use a stack-based leftmost state. This avoids
16585 our continuing battles with bogus warnings about initializers.
16586
16587 2002-10-30 Akim Demaille <akim@epita.fr>
16588
16589 * src/system.h: Don't use #ifdef/#ifndef on HAVE_ values, only
16590 #if.
16591
16592 2002-10-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16593
16594 * tests/glr-regr1.at: New test for reported regressions.
16595 * tests/testsuite.at: Add glr-regr1.at test.
16596 * tests/Makefile.am: Add glr-regr1.at test.
16597
16598 2002-10-24 Paul Eggert <eggert@twinsun.com>
16599
16600 Version 1.75a.
16601
16602 * tests/calc.at (_AT_DATA_CALC_Y): Remove unused strcat declaration.
16603 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Include stdlib.h, since
16604 we use malloc. Don't assume 'A' through 'Z' are contiguous.
16605 Don't assume strdup exists; POSIX says its an XSI extension.
16606 Check for buffer overflow on input.
16607
16608 2002-10-24 Akim Demaille <akim@epita.fr>
16609
16610 * src/output.c (output_skeleton): Don't disable M4sugar comments
16611 too soon: it results in comments being expanded.
16612 * data/yacc.c, data/glr.c, data/lalr1.cc: Do it right before the
16613 first output.
16614
16615 2002-10-24 Akim Demaille <akim@epita.fr>
16616
16617 * data/yacc.c (m4_int_type): New.
16618 * data/c.m4 (m4_int_type): Don't use yysigned_char, but `signed
16619 char' as only yacc.c wants K&R portability.
16620 * data/glr.c (yysigned_char): Remove.
16621 * data/lalr1.cc: Rename the trailing b4_name as b4_parser_class_name.
16622 Reported by Quoc Peyrot.
16623
16624 2002-10-23 Paul Eggert <eggert@twinsun.com>
16625
16626 * src/main.c (main): With --trace=time, report times even if a
16627 non-fatal error occurs. Formerly, the times were reported in some
16628 such cases but not in others.
16629 * src/reader.c (reader): Just return if a complaint has been issued,
16630 instead of exiting, so that 'main' can report times.
16631
16632 2002-10-22 Akim Demaille <akim@epita.fr>
16633
16634 * src/system.h: Include sys/types.
16635 Reported by Bert Deknuydt.
16636
16637 2002-10-23 Paul Eggert <eggert@twinsun.com>
16638
16639 * configure.ac (AC_PROG_LEX): Use instead of AM_PROG_LEX.
16640 Suggested by Art Haas.
16641
16642 2002-10-22 Paul Eggert <eggert@twinsun.com>
16643
16644 * src/complain.c (exit) [! (STDC_HEADERS || _LIBC)]: Remove exit
16645 decl; not needed any more.
16646 * src/main.c (main): Use return to exit, undoing yesterday's change.
16647 The last OS that we could find where this wouldn't work is
16648 SunOS 3.5, and that's too old to worry about now.
16649
16650 * data/glr.c (struct yyltype): Define members even when not
16651 doing locations. This is more consistent with yacc.c, and it
16652 works around the following bug reports:
16653 http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00106.html
16654 http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00111.html
16655
16656 * doc/bison.texinfo: Minor spelling and typographical fixes. Use
16657 @acronym consistently. Standardize on "Yacc" instead of "YACC",
16658 "Algol" instead of "ALGOL". Give a bit more history about BNF.
16659
16660 2002-10-22 Akim Demaille <akim@epita.fr>
16661
16662 * data/README: New.
16663
16664 2002-10-21 Paul Eggert <eggert@twinsun.com>
16665
16666 Be consistent about 'bool'; the old code used an enum in one
16667 module and an int in another, and this violates the C standard.
16668 * m4/stdbool.m4: New file, from coreutils 4.5.3.
16669 * configure.ac (AC_HEADER_STDBOOL): Add.
16670 * m4/Makefile.am (EXTRA_DIST): Add stdbool.m4.
16671 * src/muscle_tab.c (hash_compare_muscles): (a ? FALSE : TRUE) -> (! a)
16672 * src/symtab.c (hash_compare_symbol_t): Likewise.
16673 * src/system.h (bool, false, true): Use a definition consistent
16674 with ../lib/hash.c. All uses changed.
16675
16676 * src/complain.c (warning_issued): Renamed from warn_message_count,
16677 so that we needn't worry about integer overflow (!).
16678 Now of type bool. All uses changed.
16679 (complaint_issued): Renamed from complain_message_count; likewise.
16680
16681 * src/main.c (main): Use exit to exit with failure.
16682
16683 * src/complain.c (fatal_at, fatal): Use EXIT_FAILURE and EXIT_SUCCESS
16684 rather than 1 and 0.
16685 * src/main.c (main): Likewise.
16686 * src/getargs.c (getargs): Likewise.
16687 * src/reader.c (reader): Likewise.
16688
16689 * src/getarg.c (getargs): Remove duplicate code for
16690 "Try `bison --help'".
16691
16692 * src/files.c (xfopen, xfclose): Use EXIT_FAILURE rather than 2.
16693 What was that "2" for?
16694
16695 * src/complain.h (fatal, fatal_at): Add __attribute__((__noreturn__)).
16696 * src/getargs.c (usage): Likewise.
16697
16698 * src/getargs.c (getargs): When there are too few operands, report
16699 the last one. When there are too many, report the first extra
16700 one. This is how diffutils does it.
16701
16702 2002-10-20 Paul Eggert <eggert@twinsun.com>
16703
16704 Remove K&R vestiges.
16705 * configure.ac (AC_C_CONST, AM_C_PROTOTYPES): Remove.
16706 * src/complain.c (VA_START): Remove. Assume prototypes.
16707 (vfprintf) [! (HAVE_VPRINTF || defined vfprintf)]: New macro.
16708 (private_strerror, warn_at, warn, complain_at, complain, fatal_at,
16709 fatal): Assume prototypes.
16710 * src/complain.h: Assume prototypes.
16711 * src/system.h (PARAMS): Remove.
16712 Include <limits.h> unconditionally, since it's guaranteeed even
16713 for a freestanding C89 compiler.
16714 (SHRT_MIN, SHRT_MAX): Remove, since C89 guarantees them.
16715 * src/vmsgetargs.c (getargs, cli_present, cli_get_value): Prototype.
16716
16717 2002-10-20 Akim Demaille <akim@epita.fr>
16718
16719 * src/muscle_tab.c (muscle_grow): Remove trailing debugging code.
16720 * data/glr.c (YY_USER_FORMALS, YY_USER_ARGS): New.
16721 (yyuserAction, yydoAction, yyglrReduce, yyresolveValue)
16722 (yyresolveStates, yyresolveAction, yyresolveStack)
16723 (yyprocessOneStack): Use them.
16724 (yy_reduce_print): New.
16725 * tests/calc.at (_AT_DATA_CALC_Y): Exercise %parse-param.
16726
16727 2002-10-20 Akim Demaille <akim@epita.fr>
16728
16729 * data/c.m4 (b4_c_ansi_args): Recognize functions with no
16730 arguments and output `void'.
16731 (b4_c_function): Rename as...
16732 (b4_c_function_def): this.
16733 (b4_c_function_decl, b4_c_ansi_function_def)
16734 (b4_c_ansi_function_decl): New.
16735 Change the interpretation of the arguments: before `int, foo', now
16736 `int foo, foo'.
16737 * data/yacc.c (yyparse): Prototype and define thanks to these.
16738 Adjust b4_c_function_def uses.
16739 * data/glr.c (yyparse): Likewise, but ANSI only.
16740
16741 2002-10-20 Akim Demaille <akim@epita.fr>
16742
16743 * src/output.c (prepare): Move the definition of `tokens_number',
16744 `nterms_number', `undef_token_number', `user_token_number_max'
16745 to...
16746 (prepare_tokens): Here.
16747 (prepare_tokens): Rename as...
16748 (prepare_symbols): this.
16749 (prepare): Move the definition of `rules_number' to...
16750 (prepare_rules): here.
16751 (prepare): Move the definition of `last', `final_state_number',
16752 `states_number' to...
16753 (prepare_states): here.
16754 * data/yacc.c, data/lalr1.cc, data/glr.c: Normalize `>' into `<'.
16755
16756 2002-10-20 Akim Demaille <akim@epita.fr>
16757
16758 * src/tables.h, src/tables.c, src/output.c: Comment changes.
16759
16760 2002-10-20 Akim Demaille <akim@epita.fr>
16761
16762 * data/yacc.c, data/yacc.c (b4_location_if, b4_pure_if): Move to...
16763 * data/c.m4: here.
16764
16765 2002-10-20 Akim Demaille <akim@epita.fr>
16766
16767 * src/output.c (prepare): Use MUSCLE_INSERT_STRING.
16768 * src/muscle_tab.c (muscle_pair_list_grow): Rename `val as
16769 `pair'.
16770 (muscle_init): Move the `b4_ltype', `b4_maxdepth', `b4_initdepth',
16771 `name' to...
16772 * data/glr.c, data/lalr1.cc, data/yacc.c (b4_location_type)
16773 (b4_stack_depth_init, b4_stack_depth_max, b4_parser_class_name):
16774 These.
16775
16776 2002-10-19 Paul Eggert <eggert@twinsun.com>
16777
16778 Do not create a temporary file, as that involves security and
16779 cleanup headaches. Instead, use a pair of pipes.
16780 Derived from a suggestion by Florian Krohm.
16781 * lib/subpipe.c, lib/subpipe.h, m4/subpipe.m4: New files.
16782 * lib/mkstemp.c, lib/readpipe.c, lib/tempname.c, m4/mkstemp.m4: Remove.
16783 * configure.ac (UTILS_FUNC_MKSTEMP, jm_PREREQ_TEMPNAME): Remove.
16784 (BISON_PREREQ_SUBPIPE): Add.
16785 * lib/Makefile.am (libbison_a_SOURCES): Remove readpipe.c.
16786 Add subpipe.h, subpipe.c.
16787 * m4/Makefile.am (EXTRA_DIST): Remove mkstemp.m4. Add subpipe.m4.
16788 * po/POTFILES.in: Add lib/subpipe.c.
16789 * src/output.c: Include "subpipe.h".
16790 (m4_invoke): Remove decl.
16791 (scan_skel): New decl.
16792 (output_skeleton): Use pipe rather than temporary file for m4 input.
16793 Check that m4sugar.m4 is readable, to avoid deadlock.
16794 Check for pipe I/O error.
16795 * src/scan-skel.l (readpipe): Remove decl.
16796 (scan_skel): New function, to be used in place of m4_invoke.
16797 Read from stream rather than file.
16798
16799 * lib/timevar.c (TICKS_TO_MSEC, CLOCKS_TO_MSEC): Do not cast to
16800 float, as this generates a warning on Solaris 8 + GCC 3.2 with
16801 --enable-gcc-warnings. Instead, divide into 1.0 rather than 1;
16802 this generates a more-accurate value anyway.
16803
16804 * lib/timevar.c (timervar_accumulate): Rename locals to
16805 avoid confusion with similarly-named more-global.
16806 * src/muscle_tab.c (muscle_pair_list_grow): Likewise.
16807
16808 * src/output.c (prepare): Use xstrdup to convert char const *
16809 to char *, to avoid GCC warning.
16810
16811 2002-10-19 Akim Demaille <akim@epita.fr>
16812
16813 * tests/calc.at (_AT_DATA_CALC_Y): Define VAL, LOC, LEX_FORMALS,
16814 LEX_PRE_FORMALS, LEX_ARGS, LEX_PRE_ARGS, USE_LEX_ARGS.
16815 Use them to have `calc.y' ready for %pure-parser.
16816 * data/yacc.c (YYLEX): Pass a yylex return type to
16817 b4_c_function_call.
16818
16819 2002-10-19 Akim Demaille <akim@epita.fr>
16820
16821 Prototype support of %lex-param and %parse-param.
16822
16823 * src/parse-gram.y: Add the definition of the %lex-param and
16824 %parse-param tokens, plus their rules.
16825 Drop the `_' version of %glr-parser.
16826 Add the "," token.
16827 * src/scan-gram.l (INITIAL): Scan them.
16828 * src/muscle_tab.c: Comment changes.
16829 (muscle_insert, muscle_find): Rename `pair' as `probe'.
16830 * src/muscle_tab.h (MUSCLE_INSERT_PREFIX): Remove unused.
16831 (muscle_entry_s): The `value' member is no longer const.
16832 Adjust all dependencies.
16833 * src/muscle_tab.c (muscle_init): Adjust: use
16834 MUSCLE_INSERT_STRING.
16835 Initialize the obstack earlier.
16836 * src/muscle_tab.h, src/muscle_tab.c (muscle_grow)
16837 (muscle_pair_list_grow): New.
16838 * data/c.m4 (b4_c_function_call, b4_c_args): New.
16839 * data/yacc.c (YYLEX): Use b4_c_function_call to honor %lex-param.
16840 * tests/calc.at: Use %locations, not --locations.
16841 (AT_CHECK_CALC_GLR): Use %glr-parser, not %glr_parser.
16842
16843 2002-10-19 Akim Demaille <akim@epita.fr>
16844
16845 * src/getargs.c (usage): Take status as argument and exit
16846 accordingly.
16847 Report the traditional `Try ... --help' message when status != 0.
16848 (usage, version): Don't take a FILE * as arg, it is pointless.
16849 (getargs): When there is an incorrect number of arguments, make it
16850 an error, and report it GNUlically thanks to `usage ()'.
16851
16852 2002-10-18 Paul Eggert <eggert@twinsun.com>
16853
16854 * data/glr.c (yyreportParseError): Don't assume that sprintf
16855 yields the length of the printed string, as this is not true
16856 on SunOS 4.1.4. Reported by Peter Klein.
16857
16858 * tests/calc.at (_AT_DATA_CALC_Y): #undef memcmp and realloc.
16859 * tests/conflicts.at (%nonassoc and eof): Likewise.
16860 Fixes SunOS 4.1.4 test failure reported by Peter Klein.
16861
16862 2002-10-17 Akim Demaille <akim@epita.fr>
16863
16864 * src/getargs.h (trace_e): Add trace_scan, and trace_parse.
16865 * src/getargs.c (trace_types, trace_args): Adjust.
16866 * src/reader.c (grammar_current_rule_prec_set)
16867 (grammar_current_rule_dprec_set, grammar_current_rule_merge_set):
16868 Standardize error messages.
16869 And s/@prec/%prec/!
16870 (reader): Use trace_flag to enable scanner/parser debugging,
16871 instead of an adhoc scheme.
16872 * src/scan-gram.l: Remove trailing debugging code.
16873
16874 2002-10-16 Paul Eggert <eggert@twinsun.com>
16875
16876 * src/muscle_tab.h (MUSCLE_TAB_H_): Was misspelled as
16877 MUSCLE_TAB_H.
16878
16879 * NEWS: Officially drop support for building Bison with K&R C,
16880 since it didn't work anyway and it's not worth worrying about.
16881 * Makefile.maint (wget_files): Remove ansi2knr.c.
16882 (ansi2knr.c-url_prefix): Remove.
16883 * lib/.cvsignore: Remove ansi2knr, ansi2knr.*.
16884 * lib/Makefile.am (AUTOMAKE_OPTIONS): Remove.
16885 * src/Makefile.am (AUTOMAKE_OPTIONS): Remove.
16886
16887 2002-10-15 Paul Eggert <eggert@twinsun.com>
16888
16889 Stop using the "enum_" trick for K&R-style function definitions;
16890 it confused me, and I was the author! Instead, assume that people
16891 who want to use K&R C compilers (when using these modules in GCC,
16892 perhaps?) will run ansi2knr.
16893
16894 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): Remove.
16895 All uses of "enum_" changed to "enum ".
16896 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
16897 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
16898
16899 * lib/abitset.c (abitset_and, abitset_and_cmp, abitset_and_or,
16900 abitset_and_or_cmp, abitset_andn, abitset_andn_cmp,
16901 abitset_andn_or, abitset_andn_or_cmp, abitset_bytes, abitset_copy,
16902 abitset_copy1, abitset_disjoint_p, abitset_empty_p,
16903 abitset_equal_p, abitset_init, abitset_list, abitset_list_reverse,
16904 abitset_not, abitset_ones, abitset_or, abitset_or_and,
16905 abitset_or_and_cmp, abitset_or_cmp, abitset_reset, abitset_set,
16906 abitset_size, abitset_small_list, abitset_subset_p, abitset_test,
16907 abitset_unused_clear, abitset_xor, abitset_xor_cmp, abitset_zero):
16908 Use function prototypes; this removes the need for declaring
16909 static functions simply to provide their prototypes.
16910 * lib/bitset.c (bitset_alloc, bitset_and_or_, bitset_and_or_cmp_,
16911 bitset_andn_or_, bitset_andn_or_cmp_, bitset_bytes, bitset_copy_,
16912 bitset_count_, bitset_create, bitset_dump, bitset_first,
16913 bitset_free, bitset_init, bitset_last, bitset_next,
16914 bitset_obstack_alloc, bitset_obstack_free, bitset_only_set_p,
16915 bitset_op4_cmp, bitset_or_and_, bitset_or_and_cmp_, bitset_prev,
16916 bitset_print, bitset_release_memory, bitset_toggle_,
16917 bitset_type_choose, bitset_type_get, bitset_type_name_get,
16918 debug_bitset): Likewise.
16919 * lib/bitset.h (bitset_set, bitset_reset, bitset_test): Likewise.
16920 * lib/bitset_stats.c (bitset_log_histogram_print,
16921 bitset_percent_histogram_print, bitset_stats_and,
16922 bitset_stats_and_cmp, bitset_stats_and_or,
16923 bitset_stats_and_or_cmp, bitset_stats_andn, bitset_stats_andn_cmp,
16924 bitset_stats_andn_or, bitset_stats_andn_or_cmp, bitset_stats_copy,
16925 bitset_stats_count, bitset_stats_disable, bitset_stats_disjoint_p,
16926 bitset_stats_dump, bitset_stats_empty_p, bitset_stats_enable,
16927 bitset_stats_equal_p, bitset_stats_free, bitset_stats_init,
16928 bitset_stats_list, bitset_stats_list_reverse, bitset_stats_not,
16929 bitset_stats_ones, bitset_stats_or, bitset_stats_or_and,
16930 bitset_stats_or_and_cmp, bitset_stats_or_cmp, bitset_stats_print,
16931 bitset_stats_print_1, bitset_stats_read, bitset_stats_reset,
16932 bitset_stats_set, bitset_stats_size, bitset_stats_subset_p,
16933 bitset_stats_test, bitset_stats_toggle, bitset_stats_type_get,
16934 bitset_stats_write, bitset_stats_xor, bitset_stats_xor_cmp,
16935 bitset_stats_zero): Likewise.
16936 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
16937 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
16938 bitsetv_dump, debug_bitsetv): Likewise.
16939 * lib/ebitset.c (ebitset_and, ebitset_and_cmp, ebitset_andn,
16940 ebitset_andn_cmp, ebitset_bytes, ebitset_copy, ebitset_copy_,
16941 ebitset_copy_cmp, ebitset_disjoint_p, ebitset_elt_add,
16942 ebitset_elt_alloc, ebitset_elt_calloc, ebitset_elt_find,
16943 ebitset_elt_free, ebitset_elt_last, ebitset_elt_remove,
16944 ebitset_elt_zero_p, ebitset_elts_grow, ebitset_empty_p,
16945 ebitset_equal_p, ebitset_free, ebitset_init, ebitset_list,
16946 ebitset_list_reverse, ebitset_not, ebitset_ones, ebitset_op3_cmp,
16947 ebitset_or, ebitset_or_cmp, ebitset_release_memory, ebitset_reset,
16948 ebitset_set, ebitset_size, ebitset_subset_p, ebitset_test,
16949 ebitset_weed, ebitset_xor, ebitset_xor_cmp, ebitset_zero):
16950 Likewise.
16951 * lib/lbitset.c (debug_lbitset, lbitset_and, lbitset_and_cmp,
16952 lbitset_andn, lbitset_andn_cmp, lbitset_bytes, lbitset_copy,
16953 lbitset_copy_cmp, lbitset_disjoint_p, lbitset_elt_alloc,
16954 lbitset_elt_calloc, lbitset_elt_find, lbitset_elt_free,
16955 lbitset_elt_link, lbitset_elt_unlink, lbitset_elt_zero_p,
16956 lbitset_empty_p, lbitset_equal_p, lbitset_free, lbitset_init,
16957 lbitset_list, lbitset_list_reverse, lbitset_not, lbitset_ones,
16958 lbitset_op3_cmp, lbitset_or, lbitset_or_cmp, lbitset_prune,
16959 lbitset_release_memory, lbitset_reset, lbitset_set, lbitset_size,
16960 lbitset_subset_p, lbitset_test, lbitset_weed, lbitset_xor,
16961 lbitset_xor_cmp, lbitset_zero): Likewise.
16962
16963 2002-10-14 Akim Demaille <akim@epita.fr>
16964
16965 Version 1.75.
16966
16967 2002-10-14 Akim Demaille <akim@epita.fr>
16968
16969 * tests/Makefile.am (maintainer-check-posix): New.
16970
16971 2002-10-14 Akim Demaille <akim@epita.fr>
16972
16973 * data/glr.c [YYDEBUG] (YYLEFTMOST_STATE): Initialize the yyloc
16974 member.
16975
16976 2002-10-14 Akim Demaille <akim@epita.fr>
16977
16978 * src/tables.c (table_ninf_remap): base -> tab.
16979 Reported by Matt Rosing.
16980
16981 2002-10-14 Paul Eggert <eggert@twinsun.com>
16982
16983 * tests/action.at, tests/calc.at, tests/conflicts.at,
16984 tests/cxx-type.at, tests/headers.at, tests/input.at,
16985 tests/regression.at, tests/synclines.at, tests/torture.at:
16986 Say "bison -o foo.c foo.y", not "bison foo.y -o foo.c",
16987 so that the tests still work even if POSIXLY_CORRECT is set.
16988 * doc/bison.texinfo (Rpcalc Compile, Invocation): Likewise.
16989
16990 * data/c.m4 (b4_int_type): Use yysigned_char instead of signed char,
16991 for portability to K&R hosts. Fix typo: signed char is guaranteed
16992 only to 127, not to 128.
16993 * data/glr.c (yysigned_char): New type.
16994 * data/yacc.c (yysigned_char): Likewise.
16995 * tests/regression.at (Web2c Actions): signed char -> yysigned_char.
16996
16997 2002-10-13 Paul Eggert <eggert@twinsun.com>
16998
16999 * data/yacc.c (yyparse): Rewrite to avoid "comparison is always
17000 true due to limited range of data type" warning from GCC.
17001
17002 * data/c.m4 (b4_token_defines): Protect against double-inclusion
17003 by wrapping enum yytokentype's definition inside #ifndef
17004 YYTOKENTYPE. This undoes a bug I introduced on 2002-10-12.
17005
17006 2002-10-13 Akim Demaille <akim@epita.fr>
17007
17008 * data/glr.c (yyglrShiftDefer, yyaddDeferredAction, yydoAction):
17009 Un yy- yyrhs to avoid the name clash with the global YYRHS.
17010
17011 2002-10-13 Akim Demaille <akim@epita.fr>
17012
17013 * Makefile.maint: Update from Autoconf 2.54.
17014 * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Remove, shipped with 2.54.
17015
17016 2002-10-13 Akim Demaille <akim@epita.fr>
17017
17018 * src/print.c (print_state): Separate the list of solved conflicts
17019 from the other items.
17020 * tests/conflicts.at (Resolved SR Conflicts): Adjust.
17021
17022 2002-10-13 Akim Demaille <akim@epita.fr>
17023
17024 Let nondeterministic skeletons be usable with deterministic
17025 tables.
17026
17027 With the patch, GAWK compiled by GCC without -O2 passes its test
17028 suite using a GLR parser driven by LALR tables. It fails with -O2
17029 because `struct stat' gives two different answers on my machine:
17030 88 (definition of an auto var) and later 96 (memset on this var).
17031 Hence the stack is badly corrumpted. The headers inclusion is to
17032 blame: if I move the awk.h inclusion before GLR's system header
17033 inclusion, the two struct stat have the same size.
17034
17035 * src/tables.c (pack_table): Always create conflict_table.
17036 (token_actions): Always create conflict_list.
17037 * data/glr.c (YYFLAG): Remove, unused.
17038
17039 2002-10-13 Akim Demaille <akim@epita.fr>
17040
17041 * configure.ac (AC_GNU_SOURCE): Use it instead of hand written code.
17042 (O0FLAGS): New.
17043 (VALGRIND, GXX): New.
17044 * tests/atlocal.in (CFLAGS): Use O0FLAGS.
17045 * tests/bison.in: Run $PREBISON a pre-command.
17046 * tests/Makefile.am (maintainer-check, maintainer-check-valgrind)
17047 (maintainer-check-g++): New.
17048 * Makefile.am (maintainer-check): New.
17049
17050 2002-10-13 Akim Demaille <akim@epita.fr>
17051
17052 * data/glr.c: Formatting changes.
17053 Tweak some trace messages to match yacc.c's.
17054
17055 2002-10-13 Akim Demaille <akim@epita.fr>
17056
17057 GLR parsers sometimes raise parse errors instead of performing the
17058 default reduction.
17059 Reported by Charles-Henry de Boysson.
17060
17061 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Don't
17062 check the length of the traces when %glr.
17063 (_AT_CHECK_CALC_ERROR): Also skip `^Stack' lines, coming from
17064 GLR's traces.
17065 (AT_CHECK_CALC_LALR, AT_CHECK_CALC_GLR): New.
17066 Test GLR parsers.
17067 * data/glr.c (YYLEFTMOST_STATE): Fix its value.
17068 (yyltype): Remove the yy prefix from the member names.
17069 (yytable): Complete its comment.
17070 (yygetLRActions): Map error action number from YYTABLE from
17071 YYTABLE_NINF to 0.
17072 (yyisErrorAction): No longer compare YYACTION to YYPACT_NINF
17073 (which was a bug: it should have been YYTABEL_NINF, and yet it was
17074 not satisfying as we could compare an YYACTION computed from
17075 YYDEFACT to YYTABLE_NINF although they are unrelated): 0 is the
17076 only value for error actions.
17077 (yyreportParseError): In verbose parse error messages, don't issue
17078 `error' in the list of expected tokens.
17079 * data/yacc.c (yyparse) <yybackup>: Rewrite the decoding of the
17080 next action to perform to match glr.c's decoding.
17081 (yytable): Complete its comment.
17082
17083 2002-10-13 Paul Eggert <eggert@twinsun.com>
17084
17085 Fix problem reported by Henrik Grubbstroem in
17086 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00098.html>:
17087 "nonterm: { $$ = 123; } { $$ = $1; };" was wrongly rejected,
17088 because the Bison parser reads the second action before reducing
17089 the first one.
17090 * src/scan-gram.l (rule_length): New static var.
17091 Use it to keep track of the rule length in the scanner, since
17092 we can't expect the parser to be in lock-step sync with the scanner.
17093 (handle_action_dollar, handle_action_at): Use this var.
17094 * tests/actions.at (Exotic Dollars): Test for the problem.
17095
17096 2002-10-12 Paul Eggert <eggert@twinsun.com>
17097
17098 * lib/timevar.c [! IN_GCC && HAVE_SYS_TIME_H]: Include <sys/time.h>.
17099 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): Check for <sys/time.h>.
17100 Include <sys/time.h> when checking for clock_t and struct tms.
17101 Use same include order as source.
17102 This is for the SunOS 4.1.4 porting bug reported by Peter Klein in
17103 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00016.html>.
17104
17105 * lib/timevar.c: Update copyright date and clarify comments.
17106 (get_time) [IN_GCC]: Keep the GCC version for reference.
17107
17108 * lib/timevar.c, lib/timevar.h, lib/timevar.def: Import
17109 GCC version as of today, then merge Bison's changes.
17110 Change "GCC" to "Bison" in copyright notice. timevar.def's
17111 author is Akim, so change that too.
17112
17113 * src/reader.c (grammar_current_rule_check):
17114 Don't worry about the default action if $$ is untyped.
17115 Prevents bogus warnings reported by Jim Gifford in
17116 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00015.html>.
17117
17118 * data/c.m4 (b4_token_enum): Do not define YYTOKENTYPE.
17119 * data/glr.c, data/lalr1.cc, data/yacc.c:
17120 Output token definitions before the first part of user declarations.
17121 Fixes compatibility problem reported by Jim Gifford for kbd in
17122 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00014.html>.
17123
17124 2002-10-11 Paul Eggert <eggert@twinsun.com>
17125
17126 * data/yacc.c (yyreport_parse_error): Remove, putting its body into...
17127 (yyparse): here. This undoes some of the 2002-07-25 change.
17128 Compatibility problem reported by Ralf S. Engelschall with
17129 OSSP cfg <http://www.ossp.org/pkg/lib/cfg/>.
17130
17131 2002-10-11 Akim Demaille <akim@epita.fr>
17132
17133 * tests/regression.at Characters Escapes): New.
17134 * src/scan-gram.l (SC_ESCAPED_CHARACTER): Accept \' in strings and
17135 characters.
17136 Reported by Jan Nieuwenhuizen.
17137
17138 2002-10-11 Akim Demaille <akim@epita.fr>
17139
17140 * po/id.po: New.
17141
17142 2002-10-10 Paul Eggert <eggert@twinsun.com>
17143
17144 Portability fixes for bitsets; this also avoids several GCC
17145 warnings.
17146
17147 * lib/abitset.c: Include <stddef.h>, for offsetof.
17148 * lib/lbitset.c: Likewise.
17149
17150 * lib/abitset.c (abitset_bytes): Return a size that is aligned
17151 properly for vectors of objects. Do not assume that adding a
17152 header size to a multiple of a word size yields a value that is
17153 properly aligned for the whole union.
17154 * lib/bitsetv.c (bitsetv_alloc): Likewise.
17155
17156 * lib/bitset_stats.c (bitset_stats_bytes): Adjust to new,
17157 unique names for structures.
17158 * lib/ebitset.c (ebitset_bytes): Likewise.
17159 * lib/lbitset.c (lbitset_bytes): Likewise.
17160
17161 * lib/abitset.c (abitset_ones, abitset_zero, abitset_empty_p,
17162 abitset_copy1, abitset_not, abitset_equal_p, abitset_subset_p,
17163 abitset_disjoint_p, abitset_and, abitset_and_cmp, abitset_andn,
17164 abitset_andn_cmp, abitset_or, abitset_or_cmp, abitset_xor,
17165 abitset_xor_cmp, abitset_and_or, abitset_and_or_cmp,
17166 abitset_andn_or, abitset_andn_or_cmp, abitset_or_and,
17167 abitset_or_and_cmp, abitset_copy): Supply prototype decls,
17168 to improve the type-checking that GCC can do.
17169 * lib/bitset.c (bitset_op4_cmp): Likewise.
17170 * lib/bitset_stats.c (bitset_stats_count,
17171 bitset_stats_empty_p, bitset_stats_ones, bitset_stats_zero,
17172 bitset_stats_copy, bitset_stats_disjoint_p,
17173 bitset_stats_equal_p, bitset_stats_not, bitset_stats_subset_p,
17174 bitset_stats_and, bitset_stats_and_cmp, bitset_stats_andn,
17175 bitset_stats_andn_cmp, bitset_stats_or, bitset_stats_or_cmp,
17176 bitset_stats_xor, bitset_stats_xor_cmp, bitset_stats_and_or,
17177 bitset_stats_and_or_cmp, bitset_stats_andn_or,
17178 bitset_stats_andn_or_cmp, bitset_stats_or_and,
17179 bitset_stats_or_and_cmp): Likewise.
17180 * lib/lbitset.c (lbitset_and, lbitset_and_cmp, lbitset_andn,
17181 lbitset_andn_cmp, lbitset_or, lbitset_or_cmp, lbitset_xor,
17182 lbitset_xor_cmp, lbitset_empty_p, lbitset_ones, lbitset_not,
17183 lbitset_subset_p, lbitset_disjoint_p, debug_lbitset): Likewise.
17184
17185 * lib/abitset.h: Include bitset.h, not bbitset.h.
17186 * lib/ebitset.h: Likewise.
17187 * lib/lbitset.h: Likewise.
17188
17189 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): New types.
17190 All instances of parameters of type enum bitset_opts are now of
17191 type enum_bitset_opts, to conform to the C Standard, and similarly
17192 for enum_bitset_type.
17193 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
17194 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
17195
17196 Do not use "struct bitset_struct" to mean different things in
17197 different modules. Not only is this confusing, it violates
17198 the C Standard, which requires that structure types in different
17199 modules must be compatible if one is to be passed to the other.
17200 * lib/bbitset.h (bitset): Now points to a union, not to a struct.
17201 All instances of "struct bitset_struct *" replaced with "bitset".
17202 * lib/bitset.h (struct bitset_struct): Remove, replacing with....
17203 (union bitset_union, struct abitset_struct, struct ebitset_struct,
17204 struct lbitset_struct, struct bitset_stats_struct): New types.
17205 All uses of struct bitset_struct changed to union bitset_union,
17206 etc.
17207 * lib/abitset.c (struct abitset_struct, abitset,
17208 struct bitset_struct): Remove.
17209 * lib/bitset_stats.c (struct bitset_stats_struct, bitset_stats,
17210 struct bitset_struct): Remove.
17211 * lib/ebitset.c (struct ebitset_struct, ebitset, struct
17212 bitset_struct): Remove.
17213 * lib/lbitset.c (struct lbitset_struct, lbitset, bitset_struct):
17214 Likewise.
17215
17216 Do not call a function of type T using a call that assumes the
17217 function is of a different type U. Standard C requires that a
17218 function must be called with a type that is compatible with its
17219 definition.
17220 * lib/bbitset.h (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
17221 New decls.
17222 * lib/bitset.c (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
17223 New functions.
17224 * lib/ebitset.c (PFV): Remove.
17225 * lib/lbitset.c (PFV): Likewise.
17226 * lib/ebitset.c (ebitset_and, ebitset_andn, ebitset_or,
17227 ebitset_xor, ebitset_copy, ebitset_ones, ebitset_empty_p): New
17228 decls.
17229 (ebitset_and, ebitset_andn, ebitset_or, ebitset_xor): New functions.
17230 (ebitset_vtable): Use them.
17231 * lib/lbitset.c (lbitset_and, lbitset_andn, lbitset_or,
17232 lbitset_xor): New functions.
17233 (lbitset_vtable): Use them.
17234
17235 * lib/bitset.h (bitset_next, bitset_prev, bitset_only_set_p):
17236 Declare.
17237
17238 * lib/bitsetv.c (bitsetv_alloc): Add a cast to (void *) to avoid a
17239 GCC warning.
17240 * lib/lbitset.c (LBITSET_CURRENT1): Likewise.
17241 Use offsetof, for simplicity.
17242
17243 2002-10-06 Paul Eggert <eggert@twinsun.com>
17244
17245 * lib/bitset.h (bitset_reset): Do not assume that bitset_word is
17246 the same width as int. This reapplies a hunk of the 2002-08-12 patch
17247 <http://lists.gnu.org/archive/html/bison-patches/2002-08/msg00007.html>,
17248 which was inadvertently undone by the 2002-09-30 patch.
17249 * lib/lbitset.c (debug_lbitset): Do not assume that bitset_word is
17250 the same width as int.
17251
17252 2002-10-04 Paul Eggert <eggert@twinsun.com>
17253
17254 Version 1.50.
17255
17256 * configure.ac (AC_INIT), NEWS: Increment version number.
17257
17258 * doc/bison.texinfo: Minor spelling, grammar, and white space
17259 fixes.
17260 (Symbols): Mention that any negative value returned from yylex
17261 signifies end-of-input. Warn about negative chars. Mention
17262 the portable Standard C character set.
17263
17264 The GNU coding standard says CFLAGS and YFLAGS are reserved
17265 for the installer to set.
17266 * lib/Makefile.am (AM_CFLAGS): Renamed from CFLAGS.
17267 * src/Makefile.am (AM_CFLAGS): Likewise.
17268 (AM_YFLAGS): Renamed from YFLAGS.
17269
17270 Fix some MAX and MIN problems.
17271 * src/gram.h (ITEM_NUMBER_MIN): MIN_MAX -> INT_MIN.
17272 * src/lalr.h (GOTO_NUMBER_MAX): INT_MAX -> SHRT_MAX.
17273 * src/symtab.h (SYMBOL_NUMBER_MAX): New macro.
17274 * src/reader.c (reader): Use it.
17275
17276 * tests/regression.at (Braces parsing): Use grep, not fgrep, as
17277 POSIX 1003.1-2001 has removed fgrep.
17278
17279 2002-10-04 Michael Hayes <m.hayes@elec.canterbury.ac.nz>
17280
17281 * lib/bbitset.h (BITSET_WINDEX_MAX): Redefine so that it cannot be
17282 interpreted as signed.
17283 * lib/ebitset.c (ebitset_list): Fix bug.
17284
17285 2002-10-01 Paul Eggert <eggert@twinsun.com>
17286
17287 More fixes for 64-bit hosts and large bitsets.
17288
17289 * lib/abitset.c (struct abitset_struct.n_bits, abitset_small_list,
17290 abitset_size, abitset_list, abitset_list_reverse, abitset_list):
17291 Use bitset_bindex, not int or unsigned int or size_t, to count bits.
17292 * lib/bbitset.h (struct bitset_vtable.size, struct bitset_vtable.count,
17293 struct bitset_vtable.list, struct bitset_vtable.list_reverse,
17294 bitset_count_, bitset_next, bitset_prev, bitset_first, bitset_last,
17295 bitset_count_): Likewise.
17296 * lib/bitset.h (bitset_iterator.num, bitset_iterator.i,
17297 bitset_first, bitset_last): Likewise.
17298 * lib/bitset_stats.c (bitset_stats_size, bitset_stats_list,
17299 bitset_stats_list_reverse, bitset_stats_size,
17300 bitset_stats_count, bitset_stats_list, bitset_stat_list_reverse):
17301 Likewise.
17302 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
17303 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
17304 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
17305 bitsetv_reflexive_transitive_closure): Likewise.
17306 * lib/bitsetv.h (bitsetv_alloc, bitsetv_create): Likewise.
17307 * lib/ebitset.c (ebitset_size, ebitset_list, ebitset_list_reverse):
17308 Likewise.
17309 * lib/lbitset.c (lbitset_size, lbitset_list, lbitset_list_merge):
17310 Likewise.
17311
17312 * lib/abitset.c (abitset_ones, abitset_zero, abitset_bytes):
17313 Use size_t, not unsigned int, to count bytes.
17314 * lib/abitset.h (abitset_bytes): Likewise.
17315 * lib/bitset.c (bitset_bytes, bitset_alloc, bitset_obstack_alloc):
17316 Likewise.
17317 * lib/bitset.h (bitset_bytes): Likewise.
17318 * lib/bitset_stats.c (bitset_stats_bytes, bitset_stats_init): Likewise.
17319 * lib/bitset_stats.h (bitset_stats_bytes): Likewise.
17320 * lib/bitsetv.c (bitsetv_alloc): Likewise.
17321 * lib/ebitset.c (ebitset_bytes): Likewise.
17322 * lib/ebitset.h (ebitset_bytes): Likewise.
17323 * lib/lbitset.c (lbitset_bytes): Likewise.
17324 * lib/lbitset.h (lbitset_bytes): Likewise.
17325
17326 * lib/abitset.c (abitset_empty_p, abitset_not, abitset_equal_p,
17327 abitset_subset_p, abitset_disjoint_p, abitset_and,
17328 abitset_and_cmp, abitset_andn, abitset_andn_cmp, abitset_or,
17329 abitset_or_cmp, abitset_xor, abitset_xor_cmp, abitset_and_or,
17330 abitset_and_or_cmp, abitset_andn_or, abitset_andn_or_cmp,
17331 abitset_or_and, abitset_or_and_cmp):
17332 Use bitset_windex instead of unsigned int.
17333 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
17334 * lib/ebitset.c (struct ebitset_struct.size, ebitset_elts_grow,
17335 ebitset_elt_add, ebitset_elt_remove, ebitset_weed,
17336 ebitset_elt_find, ebitset_list_reverse, ebitset_list, ebitset_init):
17337 Likewise.
17338 * lib/lbitset.c (lbitset_ones, lbitset_not): Likewise.
17339
17340 * lib/bitset.c (bitset_print):
17341 Use proper printf formats for widths of integer types.
17342 * lib/bitset_stats.c (bitset_percent_histogram_print,
17343 bitset_log_histogram_print, bitset_stats_print_1): Likewise.
17344 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
17345 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
17346 * lib/lbitset.c (lbitset_bytes): Likewise.
17347
17348 * lib/bbitset.h (BITSET_BINDEX_MAX, BITSET_WINDEX_MAX,
17349 BITSET_SIZE_MAX): New macros.
17350 (BITSET_INDEX_MAX): Remove. It wasn't right, since it assumed that
17351 sizeof (bitset_word) == sizeof (bitset_windex). All uses changed
17352 to BITSET_WINDEX_MAX.
17353
17354 * lib/bitset.c (bitset_next, bitset_prev, bitset_first,
17355 bitset_last): Return BITSET_BINDEX_MAX (not -1) for no value,
17356 since we now return the bitset_bindex type (not int).
17357
17358 * lib/bitsetv.c (bitsetv_alloc): Check for arithmetic overflow
17359 when computing sizes.
17360 * lib/ebitset.c (ebitset_elts_grow): Likewise.
17361
17362 * lib/lbitset.c (lbitset_elt_find): Simplify windex calculation
17363 and avoid cast to unsigned.
17364
17365 2002-09-30 Akim Demaille <akim@epita.fr>
17366
17367 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
17368 * lib/bitset_stats.c, lib/bitsetv.c, lib/ebitset.c, lib/lbitset.c:
17369 Updates from Michael Hayes.
17370
17371 2002-09-30 Art Haas <ahaas@neosoft.com>
17372
17373 * configure.ac: Update AC_OUTPUT and AM_CONFIG_HEADER
17374 invocations.
17375 * tests/cxx-type.at (declarator): Don't rely on NDEBUG being not
17376 defined.
17377
17378 2002-09-27 Akim Demaille <akim@epita.fr>
17379
17380 Version 1.49c.
17381
17382 2002-09-27 Akim Demaille <akim@epita.fr>
17383
17384 * configure.ac (AM_INIT_AUTOMAKE): We _need_ 1.7.
17385 (Because of AC_LIBSOURCE).
17386
17387 2002-09-27 Akim Demaille <akim@epita.fr>
17388
17389 Playing with Autoscan.
17390
17391 * configure.ac: Remove the old LIBOBJ tweaks.
17392 (AC_REPLACE_FUNCS): Add strrchr and strtol.
17393 * lib/strrchr.c: New.
17394 * lib/strtol.c: New, from the Coreutils 4.5.1.
17395
17396 2002-09-27 Akim Demaille <akim@epita.fr>
17397
17398 Playing with Autoscan.
17399
17400 * m4/prereq.m4 (jm_PREREQ_ARGMATCH, jm_FUNC_ARGMATCH): New.
17401 * lib/Makefile.am (libbison_a_SOURCES): No longer include
17402 argmatch.c and argmatch.h, since they are AC_LIBSOURCE'd.
17403 * lib/strcasecmp.c, lib/strncasecmp.c, lib/memcmp.c: New, from the
17404 Coreutils 4.5.1.
17405
17406 2002-09-24 Akim Demaille <akim@epita.fr>
17407
17408 * doc/bison.texinfo (Stack Overflow): xref to Recursion.
17409 (Frequently Asked Questions, Parser Stack Overflow): New.
17410
17411 2002-09-13 Akim Demaille <akim@epita.fr>
17412
17413 Playing with autoscan.
17414
17415 * src/reader.c (get_merge_function): Use xstrdup, not strdup.
17416 * src/files.c (skeleton_find): Remove, unused.
17417 * m4/memcmp.m4: New, from the Coreutils 4.5.1.
17418 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Run jm_FUNC_MEMCMP.
17419
17420 2002-09-13 Akim Demaille <akim@epita.fr>
17421
17422 * configure.ac (AM_INIT_AUTOMAKE): Require Automake 1.6.3.
17423 * Makefile.am (AUTOMAKE_OPTIONS): Don't.
17424
17425 2002-09-13 Akim Demaille <akim@epita.fr>
17426
17427 * configure.ac: Require 2.54.
17428 s/jm_FUNC_MALLOC/AC_FUNC_MALLOC/.
17429 s/jm_FUNC_REALLOC/AC_FUNC_REALLOC/.
17430 * m4/c-bs-a.m4, m4/malloc.m4, m4/mbstate_t.m4, m4/realloc.m4:
17431 Remove, provided by Autoconf macros.
17432
17433 2002-09-12 Akim Demaille <akim@epita.fr>
17434
17435 * m4/prereq.m4: Update, from Coreutils 4.5.1.
17436
17437 2002-09-12 Akim Demaille <akim@epita.fr>
17438
17439 * m4/prereq.m4: Update, from Fileutils 4.1.5.
17440 * configure.ac (jm_PREREQ_TEMPNAME): Invoke it.
17441 Reported by Martin Mokrejs.
17442
17443 2002-09-10 Akim Demaille <akim@epita.fr>
17444
17445 * src/parse-gram.y: Associate a human readable string to each
17446 token type.
17447 * tests/regression.at (Invalid inputs): Adjust.
17448
17449 2002-09-10 Gary V. Vaughan <gary@gnu.org>
17450
17451 * tests/Makefile.am ($(srcdir)/package.m4): Bison now ships
17452 with an Autoconf-2.5x style configure.ac.
17453
17454 2002-09-06 Paul Eggert <eggert@twinsun.com>
17455
17456 * doc/bison.texinfo (Conditions): Make explicit that the GPL
17457 exception applies only to yacc.c. This is a modification of a
17458 patch originally suggested by Akim Demaille.
17459
17460 2002-09-06 Akim Demaille <akim@epita.fr>
17461
17462 * data/c.m4 (b4_copyright): Move the GPL exception comment from
17463 here to...
17464 * data/yacc.c: here.
17465
17466 * data/lalr1.cc (struct yyltype): Don't define it, since we use
17467 LocationType.
17468 (b4_ltype): Default to yy::Location from location.hh.
17469
17470 2002-09-04 Jim Meyering <jim@meyering.net>
17471
17472 * data/yacc.c: Guard the declaration of yytoknum also with
17473 `#ifdef YYPRINT', so it is declared only when used.
17474
17475 2002-09-04 Akim Demaille <akim@epita.fr>
17476
17477 * configure.in: Rename as...
17478 * configure.ac: this.
17479 Bump to 1.49c.
17480
17481 2002-09-04 Akim Demaille <akim@epita.fr>
17482
17483 * src/assoc.c, src/closure.c, src/gram.c, src/injections.c,
17484 * src/lalr.c, src/LR0.c, src/relation.c, src/tables.c: Don't
17485 translate maintainer only messages.
17486
17487 2002-08-12 Paul Eggert <eggert@twinsun.com>
17488
17489 Version 1.49b.
17490
17491 * Makefile.am (SUBDIRS): Remove intl.
17492 (DISTCLEANFILES): Remove.
17493 * NEWS: Mention that GNU M4 is now required. Clarify what is
17494 meant by "larger grammars". Mention the pt_BR translation.
17495 * configure.in (AC_CHECK_DECLS): Add getenv, getopt.
17496 (AM_GNU_GETTEXT_VERSION): New macro, replacing GETTEXT_VERSION var.
17497 Bump version from 0.11.2 to 0.11.5.
17498 (BISON_PREREQ_STAGE): Remove.
17499 (AM_GNU_GETTEXT): Use external gettext.
17500 (AC_OUTPUT): Remove intl/Makefile.
17501
17502 * config/depcomp, config/install-sh: Sync with Automake 1.6.3.
17503
17504 * data/glr.c: Include string.h, for strlen.
17505 (yyreportParseError): Use size_t for yysize.
17506 (yy_yypstack): No longer nested inside yypstates, as nested
17507 functions are not portable. Do not assume size_t is the
17508 same width as int.
17509 (yypstates): Do not assume that ptrdiff_t is the same width
17510 as int, and similarly for yyposn and YYINDEX.
17511
17512 * data/yacc.c: Fix comment about `$$ = $1': it can copy garbage.
17513
17514 * lib/Makefile.am (INCLUDES): Do not include from the intl
17515 directory, which has been removed.
17516 * src/Makefile.am (INCLUDES): Likewise.
17517
17518 * lib/Makefile.am (libbison_a_SOURCES): Add unlocked-io.h.
17519 (bitsets_sources, additional_bitsets_sources, timevars_sources):
17520 New vars.
17521
17522 * lib/Makefile.am (libbison_a_SOURCES): Avoid +=, a GNU make extension.
17523 * tests/Makefile.am (EXTRA_DIST): Likewise.
17524
17525 * lib/abitset.c (abitset_reverse_list, ebitset_reverse_list):
17526 Do not assume that bitset_windex is the same width as unsigned.
17527
17528 * lib/abitset.c (abitset_unused_clear): Do not assume that
17529 bitset_word is the same width as int.
17530 * lib/bbitset.h (BITSET_INDEX_MAX, BITSET_MSB): Likewise.
17531 * lib/bitset.h (bitset_set, bitset_reset): Likewise.
17532 * lib/bitset_stats.c (bitset_stats_set, bitset_stats_reset): Likewise.
17533 * lib/ebitset.c (ebitset_set, ebitset_reset): Likewise.
17534 * lib/lbitset.c (lbitset_set, lbitset_reset): Likewise.
17535
17536 * lib/abitset.c (abitset_op1): Use -1, not ~0, as memset arg (for
17537 portability to one's complement hosts!).
17538 * lib/ebitset.c (ebitset_op1): Likewise.
17539 * lib/lbitset.c (lbitset_op1): Likewise.
17540
17541 * lib/argmatch.c, lib/quotearg.c, quotearg.h: Sync with GNU tar.
17542 * lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
17543 lib/hash.c, lib/hash.h, lib/strnlen.c, lib/xmalloc.c:
17544 Sync with fileutils.
17545 * lib/error.c, lib/getopt.c, lib/getopt.h, lib/getopt1.c,
17546 lib/gettext.h: Sync with diffutils.
17547
17548 * lib/memrchr.c, lib/mkstemp.c, lib/strchr.c, lib/strnlen.c,
17549 lib/strspn.c, lib/tempname.c: Use GPL, not LGPL.
17550
17551 * lib/obstack.c, lib/obstack.h: Sync with fileutils, except use
17552 PROTOTYPES to check for prototypes, and "defined __STDC__" to
17553 check for void *.
17554
17555 * lib/bbitset.h (BITSET_WORD_BITS): Now of type unsigned, not
17556 size_t; the old version tried to do this but casted improperly.
17557 (bitset_bindex, bitset_windex): Now size_t, not unsigned long.
17558 (bitset_test): Now returns int, not unsigned long.
17559
17560 * lib/bitset_stats.c: Include "gettext.h".
17561 (_): New macro.
17562 (bitset_stats_set, bitset_stats_reset, bitset_stats_test): Don't
17563 name locals "index", as it generates unnecessary warnings on some
17564 hosts that have an "index" function.
17565
17566 * lib/bitset_stats.c (bitset_stats_print_1, bitset_stats_print,
17567 bitset_stats_read, bitset_stats_write): Wrap strings in _() if
17568 they need translation.
17569 * src/LR0.c (state_list_append, new_itemsets, get_state,
17570 append_states, generate_states): Likewise.
17571 * src/assoc.c (assoc_to_string): Likewise.
17572 * src/closure.c (print_closure, set_firsts, closure): Likewise.
17573 * src/gram.c (grammar_dump): Likewise.
17574 * src/injections.c (injections_compute): Likewise.
17575 * src/lalr.c (lookaheads_print): Likewise.
17576 * src/relation.c (relation_transpose): Likewise.
17577 * src/scan-gram.l: Likewise.
17578 * src/tables.c (table_grow, pack_vector): Likewise.
17579
17580 * m4/Makefile.am (EXTRA_DIST): Remove codeset.m4,
17581 glibc21.m4, isc-posix.m4 lcmessage.m4, stage.m4.
17582 * m4/malloc.m4, m4/realloc.m4: Sync with diffutils.
17583 * m4/mbstate_t.m4: Sync with fileutils.
17584 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): AC_MBSTATE_T -> AC_TYPE_MBSTATE_T.
17585
17586 * po/LINGUAS: Add pt_BR.
17587 * po/POTFILES.in: Add src/assoc.c, src/closure.c, src/gram.c,
17588 src/main.c, src/relation.c, src/state.c, lib/bitset_stats.c,
17589 lib/timevar.c.
17590 Use src/parse-gram.y instead of src/parse-gram.c, as the gettext
17591 manual recommends.
17592 Similarly, use src/scan-gram.l instead of src/scan-gram.c.
17593
17594 * src/complain.c (strerror_r): Remove decl; not needed.
17595 (strerror): Use same pattern as ../lib/error.c.
17596
17597 * src/files.c, src/files.h (compute_header_macro): Remove; unused.
17598
17599 * src/gram.c (grammar_dump): Do not assume ptrdiff_t fits in int.
17600
17601 * src/main.c (main): Cast result of bindtextdomain and textdomain
17602 to void, to avoid a GCC warning when --disable-nls is in effect.
17603
17604 * src/scan-gram.l: Use strings rather than escapes when possible,
17605 to minimize the number of warnings from xgettext.
17606 (handle_action_dollar, handle_action_at): Don't use isdigit,
17607 as it mishandles negative chars and it may not work as expected
17608 outside the C locale.
17609
17610 * src/symtab.c (symbol_get): Don't cast LHS of an assignment;
17611 this is a GCC extension and is not portable to other compilers.
17612
17613 * src/system.h (alloca): Use same pattern as ../lib/error.c.
17614 Do not include <ctype.h>; no longer needed.
17615 Do not include <malloc.h>; no longer needed (and generates
17616 warnings on OpenBSD 3.0).
17617
17618 * tests/cxx-type.at (yylex): Do not pass signed char to isupper;
17619 it's not portable.
17620
17621 * tests/regression.at: Do not use 'cc -c input.c -o input';
17622 Sun C rejects this. Instead, use 'cc -c input.c -o input.o'.
17623
17624 * tests/synclines.at (AC_SYNCLINES_COMPILE): Accept any nonzero
17625 exit status as failure, not just exit status 1. Sun C exits
17626 with status 2 sometimes.
17627
17628 * tests/torture.at (AT_INCREASE_DATA_SIZE): New macro.
17629 Use it for the two large tests.
17630
17631 2002-08-02 Akim Demaille <akim@epita.fr>
17632
17633 * src/conflicts.c (conflicts_output): Don't output rules never
17634 reduced here, since anyway that computation doesn't work.
17635 * src/gram.h, src/gram.h (rule_filter_t, rule_useful_p)
17636 (rule_useless_p, rule_never_reduced_p): New.
17637 (grammar_rules_partial_print): Use a filter instead of a range.
17638 Display the title only if needed.
17639 (grammar_rules_print): Adjust.
17640 (grammar_rules_never_reduced_report): New.
17641 * src/tables.c (action_row): Move the computation of rules never
17642 reduced to...
17643 (token_actions): here.
17644 * src/main.c (main): Make the parser before making the report, so
17645 that rules never reduced are computed.
17646 Call grammar_rules_never_reduced_report.
17647 * src/print.c (print_results): Report rules never reduced.
17648 * tests/conflicts.at, tests/reduce.at: Adjust.
17649
17650 2002-08-01 Akim Demaille <akim@epita.fr>
17651
17652 Instead of attaching lookaheads and duplicating the rules being
17653 reduced by a state, attach the lookaheads to the reductions.
17654
17655 * src/state.h (state_t): Remove the `lookaheads',
17656 `lookaheads_rule' member.
17657 (reductions_t): Add a `lookaheads' member.
17658 Use a regular array for the `rules'.
17659 * src/state.c (reductions_new): Initialize the lookaheads member
17660 to 0.
17661 (state_rule_lookaheads_print): Adjust.
17662 * src/state.h, src/state.c (state_reductions_find): New.
17663 * src/conflicts.c (resolve_sr_conflict, set_conflicts)
17664 (count_rr_conflicts): Adjust.
17665 * src/lalr.c (LArule): Remove.
17666 (add_lookback_edge): Adjust.
17667 (state_lookaheads_count): New.
17668 (states_lookaheads_initialize): Merge into...
17669 (initialize_LA): this.
17670 (lalr_free): Adjust.
17671 * src/main.c (main): Don't free nullable and derives too early: it
17672 is used by --verbose.
17673 * src/print.c, src/print_graph.c, src/tables.c: Adjust.
17674
17675 2002-08-01 Akim Demaille <akim@epita.fr>
17676
17677 * src/derives.h, src/derives.c (derives): A `rule_t***' instead of
17678 `rule_number_t**'.
17679 (set_derives, free_derives): Rename as...
17680 (derives_compute, derives_free): this.
17681 Adjust all dependencies.
17682 * src/nullable.c (set_nullable, free_nullable): Rename as...
17683 (nullable_compute, nullable_free): these.
17684 (rule_list_t): Store rule_t *, not rule_number_t.
17685 * src/state.c (state_rule_lookaheads_print): Directly compare rule
17686 pointers, instead of their numbers.
17687 * src/main.c (main): Call nullable_free, and derives_free earlier,
17688 as they were lo longer used.
17689
17690 2002-08-01 Akim Demaille <akim@epita.fr>
17691
17692 * lib/timevar.c (get_time): Include children time.
17693 * src/lalr.h (LA, LArule): Don't export them: used with the
17694 state_t.
17695 * src/lalr.c (LA, LArule): Static.
17696 * src/lalr.h, src/lalr.c (lalr_free): New.
17697 * src/main.c (main): Call it.
17698 * src/tables.c (pack_vector): Check whether loc is >= to the
17699 table_size, not >.
17700 (pack_tables): Don't free froms, tos, conflict_tos, and pos...
17701 (tables_generate): do it, since that's also it which allocates
17702 them.
17703 Don't free LA and LArule, main does.
17704
17705 2002-07-31 Akim Demaille <akim@epita.fr>
17706
17707 Separate parser tables computation and output.
17708
17709 * src/output.c (nvectors, base_t, base, base_ninf, conflict_table)
17710 (conflict_list, conflict_list_cnt, table, check, table_ninf)
17711 (yydefgoto, yydefact, high): Move to...
17712 * src/tables.h, src/tables.c: here.
17713 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
17714 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
17715 (symbol_number_to_vector_number, nvectors, BASE_MAX, BASE_MIN)
17716 (froms, tos, conflict_tos, tally, width, action_t, ACTION_MAX)
17717 (ACTION_MIN, actrow, order, nentries, pos, conflrow)
17718 (conflict_list_free, table_size, lowzero, table_grow, conflict_row)
17719 (action_row, save_row, token_actions, save_column, default_goto)
17720 (goto_actions, sort_actions, matching_state, pack_vector)
17721 (table_ninf_remap, pack_table, prepare_actions): Move to...
17722 * src/tables.c: here.
17723 * src/tables.h, src/tables.c(tables_generate, tables_free): New.
17724 * src/output.c (token_actions, output_base, output_conflicts)
17725 (output_check): Merge into...
17726 (prepare_actions): this.
17727 (actions_output): Rename as...
17728 (user_actions_output): this.
17729 * src/main.c (main): Call tables_generate and tables_free.
17730
17731 2002-07-31 Akim Demaille <akim@epita.fr>
17732
17733 Steal GCC's --time-report support.
17734
17735 * lib/timevar.c, lib/timevar.h, lib/timevar.def: New,
17736 stolen/adjusted from GCC.
17737 * m4/stage.m4: Remove time related checks.
17738 * m4/timevar.m4: New.
17739 * configure.in: Adjust.
17740 * src/system.h: Adjust to using timevar.h.
17741 * src/getargs.h, src/getargs.c: Support trace_time for
17742 --trace=time.
17743 * src/main.c (stage): Remove.
17744 (main): Replace `stage' invocations with timevar calls.
17745 * src/output.c: Insert pertinent timevar calls.
17746
17747 2002-07-31 Akim Demaille <akim@epita.fr>
17748
17749 Let --trace have arguments.
17750
17751 * src/getargs.h (enum trace_e): New.
17752 * src/getargs.c (trace_args, trace_types, trace_argmatch): New.
17753 (long_options, short_options): --trace/-T takes an optional
17754 argument.
17755 Change all the uses of trace_flag to reflect the new flags.
17756 * tests/sets.at (Firsts, Nullable, Broken Closure): Use --trace=sets.
17757
17758 Strengthen `stage' portability.
17759
17760 * m4/stage.m4 (BISON_PREREQ_STAGE): New.
17761 * configure.in: Use it.
17762 Don't check for malloc.h and sys/times.h.
17763 * src/system.h: Include them when appropriate.
17764 * src/main.c (stage): Compile only when mallinfo, struct mallinfo,
17765 times and struct tms are available.
17766
17767 2002-07-30 Akim Demaille <akim@epita.fr>
17768
17769 In verbose parse error message, don't report `error' as an
17770 expected token.
17771 * tests/actions.at (Printers and Destructors): Adjust.
17772 * tests/calc.at (Calculator $1): Adjust.
17773 * data/yacc.c, data/glr.c, data/lalr1.c: When making the verbose
17774 error message, do not report the parser accepts the error token in
17775 that state.
17776
17777 2002-07-30 Akim Demaille <akim@epita.fr>
17778
17779 Normalize conflict related messages.
17780
17781 * src/complain.h, src/complain.c (warn, complain): New.
17782 * src/conflicts.c (conflicts_print): Use them.
17783 (conflict_report_yacc): New, extracted from...
17784 (conflicts_print): here.
17785 * tests/conflicts.at, tests/existing.at: Adjust.
17786
17787 2002-07-30 Akim Demaille <akim@epita.fr>
17788
17789 Report rules which are never reduced by the parser: those hidden
17790 by conflicts.
17791
17792 * src/LR0.c (save_reductions): Don't make the final state too
17793 different: save its reduction (accept) instead of having a state
17794 without any action (no shift or goto, no reduce).
17795 Note: the final state is now a ``regular'' state, i.e., the
17796 parsers now contain `reduce 0' as default reduction.
17797 Nevertheless, since they decide to `accept' when yystate =
17798 final_state, they still will not reduce rule 0.
17799 * src/print.c (print_actions, print_reduction): Adjust.
17800 * src/output.c (action_row): Track reduced rules.
17801 (token_actions): Report rules never reduced.
17802 * tests/conflicts.at, tests/regression.at: Adjust.
17803
17804 2002-07-30 Akim Demaille <akim@epita.fr>
17805
17806 `stage' was accidently included in a previous patch.
17807 Initiate its autoconfiscation.
17808
17809 * configure.in: Look for malloc.h and sys/times.h.
17810 * src/main.c (stage): Adjust.
17811 Report only when trace_flag.
17812
17813 2002-07-29 Akim Demaille <akim@epita.fr>
17814
17815 * src/state.h, src/state.c (transitions_t): Holds state_t*'s, not
17816 state_number_t.
17817 (errs_t): symbol_t*, not symbol_number_t.
17818 (reductions_t): rule_t*, not rule_number_t.
17819 (FOR_EACH_SHIFT): New.
17820 * src/LR0.c, src/conflicts.c, src/lalr.c, src/output.c
17821 * src/print.c, src/print_graph.c: Adjust.
17822
17823 2002-07-29 Akim Demaille <akim@epita.fr>
17824
17825 Use $accept and $end, as BYacc and BTYacc do, instead of $axiom and $.
17826
17827 * src/symtab.h, src/symtab.c (eoftoken, axiom): Rename as...
17828 (endtoken, accept): these.
17829 * src/reader.c (reader): Set endtoken's default tag to "$end".
17830 Set undeftoken's tag to "$undefined" instead of "$undefined.".
17831 * doc/bison.texinfo (Table of Symbols): Mention $accept and $end.
17832 Adjust.
17833
17834 2002-07-29 Akim Demaille <akim@epita.fr>
17835
17836 * src/reduce.c (reduce_grammar): When the language is empty,
17837 complain about the start symbol, not the axiom.
17838 Use its location.
17839 * tests/reduce.at (Empty Language): New.
17840
17841 2002-07-26 Akim Demaille <akim@epita.fr>
17842
17843 * src/reader.h, src/reader.c (gram_error): ... can't get
17844 yycontrol without making too strong assumptions on the parser
17845 itself.
17846 * src/output.c (prepare_tokens): Use the real 0th value of
17847 token_translations instead of `0'.
17848 * src/parse-gram.y (yyerror): Don't rely on yycontrol being
17849 visible here.
17850 * data/yacc.c (yyreport_parse_error): Rename yylocation as yylloc
17851 for the time being: %locations ought to provide it to yyerror.
17852
17853 2002-07-25 Akim Demaille <akim@epita.fr>
17854
17855 * src/output.c (prepare_tokens): Go up to ntokens, not ntokens + 1.
17856 * doc/bison.texinfo (Decl Summary): s/$illegal/$undefined./.
17857 * tests/regression.at (Web2c Actions): Adjust.
17858
17859 2002-07-25 Akim Demaille <akim@epita.fr>
17860
17861 Stop storing rules from 1 to nrules + 1.
17862
17863 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c, src/lalr.c
17864 * src/nullable.c, src/output.c, src/print.c, src/reader.c
17865 * src/reduce.c: Allocate and free from &rules[0], not &rules[1].
17866 Iterate from 0 to nrules.
17867 Use rule_number_as_item_number and item_number_as_rule_number.
17868 Adjust to `derive' now containing possibly 0.
17869 * src/gram.h (rule_number_as_item_number, item_number_as_rule_number):
17870 Handle the `- 1' part in rule numbers from/to item numbers.
17871 * src/conflicts.c (log_resolution): Fix the message which reversed
17872 shift and reduce.
17873 * src/output.c (action_row): Initialize default_rule to -1.
17874 (token_actions): Adjust.
17875 * tests/sets.at (Nullable, Firsts): Fix the previously bogus
17876 expected output.
17877 * tests/conflicts.at (Resolved SR Conflicts): Likewise.
17878
17879 2002-07-25 Akim Demaille <akim@epita.fr>
17880
17881 * data/c.m4 (b4_c_function, b4_c_ansi_args, b4_c_ansi_arg)
17882 (b4_c_knr_arg_names, b4_c_knr_arg_name, b4_c_knr_arg_decls)
17883 (b4_c_knr_arg_decl): New.
17884 * data/yacc.c: Use it to define yysymprint, yydestruct, and
17885 yyreport_parse_error.
17886
17887 2002-07-25 Akim Demaille <akim@epita.fr>
17888
17889 * data/yacc.c (yyreport_parse_error): New, extracted from...
17890 (yyparse): here.
17891 (yydestruct, yysymprint): Move above yyparse.
17892 Be K&R compliant.
17893
17894 2002-07-25 Akim Demaille <akim@epita.fr>
17895
17896 * data/c.m4 (b4_ints_in, b4_int_type, b4_int_type_for): New,
17897 replace...
17898 (b4_sint_type, b4_uint_type): these.
17899 * data/yacc.c, data/glr.c, data/lalr1.cc: Use b4_int_type_for.
17900 * tests/regression.at (Web2c Actions): Adjust.
17901
17902 2002-07-25 Akim Demaille <akim@epita.fr>
17903
17904 * src/gram.h (TIEM_NUMBER_MAX): New.
17905 (item_number_of_rule_number, rule_number_of_item_number): Rename
17906 as...
17907 (rule_number_as_item_number, item_number_as_rule_number): these.
17908 Adjust dependencies.
17909 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
17910 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
17911 (symbol_number_to_vector_number): New.
17912 (order): Of vector_number_t* type.
17913 (base_t, BASE_MAX, BASE_MIN): New.
17914 (froms, tos, width, pos, check): Of base_t type.
17915 (action_number_t, ACTION_MIN, ACTION_MAX): New.
17916 (actrow): Of action_number_t type.
17917 (conflrow): Of unsigned int type.
17918 (table_ninf, base_ninf): New.
17919 (GENERATE_MUSCLE_INSERT_TABLE): Also output the `*_min' value.
17920 (muscle_insert_int_table, muscle_insert_base_table)
17921 (muscle_insert_rule_number_table): New.
17922 (prepare_tokens): Output `toknum' as int_table.
17923 (action_row): Returns a rule_number_t.
17924 Use ACTION_MIN, not SHRT_MIN.
17925 (token_actions): yydefact is rule_number_t*.
17926 (table_ninf_remap): New.
17927 (pack_table): Use it for `base' and `table'.
17928 * data/yacc.c, data/glr.c, data/lalr1.cc (YYFLAG): Remove,
17929 replaced with...
17930 (YYPACT_NINF, YYTABLE_NINF): these.
17931 (yypact, yytable): Compute their types instead of hard-coded
17932 `short'.
17933 * tests/regression.at (Web2c Actions): Adjust.
17934
17935 2002-07-19 Akim Demaille <akim@epita.fr>
17936
17937 * src/scan-gram.l (id): Can start with an underscore.
17938
17939 2002-07-16 Akim Demaille <akim@epita.fr>
17940
17941 * src/assoc.c, src/asssoc.h (assoc_t, assoc_to_string): New.
17942 Adjust all former `associativity' dependencies.
17943 * src/symtab.c (symbol_new): Default associativity is `undef', not
17944 `right'.
17945 (symbol_check_alias_consistence): Adjust.
17946
17947 2002-07-09 Akim Demaille <akim@epita.fr>
17948
17949 * doc/bison.texinfo: Properly set the ``header'' part.
17950 Use @dircategory ``GNU programming tools'' as per Texinfo's
17951 documentation.
17952 Use @copying.
17953
17954 2002-07-09 Akim Demaille <akim@epita.fr>
17955
17956 * lib/quotearg.h: Protect against multiple inclusions.
17957 * src/location.h (location_t): Add a `file' member.
17958 (LOCATION_RESET, LOCATION_PRINT): Adjust.
17959 * src/complain.c (warn_at, complain_at, fatal_at): Drop
17960 `error_one_per_line' support.
17961
17962 2002-07-09 Akim Demaille <akim@epita.fr>
17963
17964 * src/complain.h, src/complain.c (warn, complain): Remove, unused.
17965 * src/reader.c (lineno): Remove.
17966 Adjust all dependencies.
17967 (get_merge_function): Take a location and use complain_at.
17968 * src/symtab.h, src/symtab.c (symbol_make_alias): Likewise.
17969 * tests/regression.at (Invalid inputs, Mixing %token styles):
17970 Adjust.
17971
17972 2002-07-09 Akim Demaille <akim@epita.fr>
17973
17974 * src/parse-gram.y (rules_or_grammar_declaration): Add an error
17975 recovery rule, and forbid extensions when --yacc.
17976 (gram_error): Use complain_at.
17977 * src/reader.c (reader): Exit if there were parse errors.
17978
17979 2002-07-09 Akim Demaille <akim@epita.fr>
17980
17981 * tests/synclines.at (AT_SYNCLINES_COMPILE): New.
17982 (AT_TEST_SYNCLINE): Adjust to unusual GCC outputs.
17983 Reported by R Blake <blakers@mac.com>.
17984
17985 2002-07-09 Akim Demaille <akim@epita.fr>
17986
17987 * data/yacc.c: Output the copyright notive in the header.
17988
17989 2002-07-03 Akim Demaille <akim@epita.fr>
17990
17991 * src/output.c (froms, tos): Are state_number_t.
17992 (save_column): sp, sp1, and sp2 are state_number_t.
17993 (prepare): Rename `final' as `final_state_number', `nnts' as
17994 `nterms_number', `nrules' as `rules_number', `nstates' as
17995 `states_number', and `ntokens' as `tokens_number'. Remove `nsym',
17996 unused.
17997 * data/yacc.c, data/glr.c, data/lalr1.cc: Adjust.
17998 * data/lalr1.cc (nsym_): Remove, unused.
17999
18000 2002-07-03 Akim Demaille <akim@epita.fr>
18001
18002 * src/lalr.h, src/lalr.c (goto_number_t): New.
18003 * src/lalr.c (goto_list_t): New.
18004 Propagate them.
18005 * src/nullable.c (rule_list_t): New.
18006 Propagate.
18007 * src/types.h: Remove.
18008
18009 2002-07-03 Akim Demaille <akim@epita.fr>
18010
18011 * src/closure.c (print_fderives): Use rule_rhs_print.
18012 * src/derives.c (print_derives): Use rule_rhs_print.
18013 (rule_list_t): New, replaces `shorts'.
18014 (set_derives): Add comments.
18015 * tests/sets.at (Nullable, Firsts): Adjust.
18016
18017 2002-07-03 Akim Demaille <akim@epita.fr>
18018
18019 * src/output.c (prepare_actions): Free `tally' and `width'.
18020 (prepare_actions): Allocate and free `order'.
18021 * src/symtab.c (symbols_free): Free `symbols'.
18022 * src/scan-gram.l (scanner_free): Clear Flex's scanners memory.
18023 * src/output.c (m4_invoke): Move to...
18024 * src/scan-skel.l: here.
18025 (<<EOF>>): Close yyout, and free its name.
18026
18027 2002-07-03 Akim Demaille <akim@epita.fr>
18028
18029 Fix some memory leaks, and fix a bug: state 0 was examined twice.
18030
18031 * src/LR0.c (new_state): Merge into...
18032 (state_list_append): this.
18033 (new_states): Merge into...
18034 (generate_states): here.
18035 (set_states): Don't ensure a proper `errs' state member here, do it...
18036 * src/conflicts.c (conflicts_solve): here.
18037 * src/state.h, src/state.c: Comment changes.
18038 (state_t): Rename member `shifts' as `transitions'.
18039 Adjust all dependencies.
18040 (errs_new): For consistency, also take the values as argument.
18041 (errs_dup): Remove.
18042 (state_errs_set): New.
18043 (state_reductions_set, state_transitions_set): Assert that no
18044 previous value was assigned.
18045 (state_free): New.
18046 (states_free): Use it.
18047 * src/conflicts.c (resolve_sr_conflict): Don't use an `errs_t' as
18048 temporary storage: use `errs' and `nerrs' as elsewhere.
18049 (set_conflicts): Allocate and free this `errs'.
18050
18051 2002-07-02 Akim Demaille <akim@epita.fr>
18052
18053 * lib/libiberty.h: New.
18054 * lib: Update the bitset implementation from upstream.
18055 * src/closure.c, src/lalr.c, src/output.c, src/print_graph.c,
18056 * src/state.c: Use BITSET_FOR_EACH, not BITSET_EXECUTE.
18057 * src/main.c: Adjust bitset stats calls.
18058
18059 2002-07-01 Paul Eggert <eggert@twinsun.com>
18060
18061 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>): Convert to unsigned
18062 char, so that negative chars don't collide with $.
18063
18064 2002-06-30 Akim Demaille <akim@epita.fr>
18065
18066 Have the GLR tests be `warning' checked, and fix the warnings.
18067
18068 * data/glr.c (YYFPRINTF): Always define it, not only when YYDEBUG
18069 (yyuserAction, yyreportAmbiguity): `Use' all the arguments.
18070 (yyremoveDeletes): `yyi' and `yyj' are size_t.
18071 Use YYFPRINTF when under if (YYDEBUG) to avoid empty `if' bodies.
18072 (yyaddDeferredAction): static.
18073 (yyglrReduce): yyi, yyk, amd yyposn are size_t.
18074 (yyreportParseError): yyprefix is const.
18075 yytokenp is used only when verbose.
18076 (yy__GNUC__): Replace with __GNUC__.
18077 (yypdumpstack): yyi is size_t.
18078 (yypreference): Un-yy local variables and arguments, to avoid
18079 clashes with `yyr1'. Anyway, we are not in the user name space.
18080 (yytname_size): be an int, as is compared with ints.
18081 * tests/testsuite.at (AT_COMPILE, AT_PARSER_CHECK): New.
18082 Use them.
18083 * tests/cxx-gram.at: Use quotation to protect $1.
18084 Use AT_COMPILE to enable warnings hunts.
18085 Prototype yylex and yyerror.
18086 `Use' argc.
18087 Include `string.h', not `strings.h'.
18088 Produce and prototype stmtMerge only when used.
18089 yylex takes a location.
18090
18091 2002-06-30 Akim Demaille <akim@epita.fr>
18092
18093 We spend a lot of time in quotearg, in particular when --verbose.
18094
18095 * src/symtab.c (symbol_get): Store a quoted version of the key.
18096 (symbol_tag_get, symbol_tag_get_n, symbol_tag_print): Remove.
18097 Adjust all callers.
18098
18099 2002-06-30 Akim Demaille <akim@epita.fr>
18100
18101 * src/state.h (reductions_t): Rename member `nreds' as num.
18102 (errs_t): Rename members `nerrs' and `errs' as `num' and `symbols'.
18103 * src/state.c (ERRS_ALLOC, REDUCTIONS_ALLOC): Use the correct types.
18104
18105 2002-06-30 Akim Demaille <akim@epita.fr>
18106
18107 * src/state.h, src/state.c (shift_t, SHIFT_SYMBOL, SHIFT_IS_SHIFT)
18108 (SHIFT_IS_GOTO, SHIFT_IS_ERROR, SHIFT_DISABLE, SHIFT_IS_DISABLED)
18109 (shifts_to): Rename as...
18110 (transition_t, TRANSITION_SYMBOL, TRANSITION_IS_TRANSITION)
18111 (TRANSITION_IS_GOTO, TRANSITION_IS_ERROR, TRANSITION_DISABLE)
18112 (TRANSITION_IS_DISABLED, transitions_to): these.
18113
18114 2002-06-30 Akim Demaille <akim@epita.fr>
18115
18116 * src/print.c (print_shifts, print_gotos): Merge into...
18117 (print_transitions): this.
18118 (print_transitions, print_errs, print_reductions): Align the
18119 lookaheads columns.
18120 (print_core, print_transitions, print_errs, print_state,
18121 print_grammar): Output empty lines separator before, not after.
18122 (state_default_rule_compute): Rename as...
18123 (state_default_rule): this.
18124 * tests/conflicts.at (Defaulted Conflicted Reduction),
18125 (Unresolved SR Conflicts, Resolved SR Conflicts): Adjust.
18126 * tests/regression.at (Rule Line Numbers, Web2c Report): Adjust.
18127
18128 2002-06-30 Akim Demaille <akim@epita.fr>
18129
18130 Display items as we display rules.
18131
18132 * src/gram.h, src/gram.c (rule_lhs_print): New.
18133 * src/gram.c (grammar_rules_partial_print): Use it.
18134 * src/print.c (print_core): Likewise.
18135 * tests/conflicts.at (Defaulted Conflicted Reduction),
18136 (Unresolved SR Conflicts): Adjust.
18137 (Unresolved SR Conflicts): Adjust and rename as...
18138 (Resolved SR Conflicts): this, as was meant.
18139 * tests/regression.at (Web2c Report): Adjust.
18140
18141 2002-06-30 Akim Demaille <akim@epita.fr>
18142
18143 * src/print.c (state_default_rule_compute): New, extracted from...
18144 (print_reductions): here.
18145 Pessimize, but clarify the code.
18146 * tests/conflicts.at (Defaulted Conflicted Reduction): New.
18147
18148 2002-06-30 Akim Demaille <akim@epita.fr>
18149
18150 * src/output.c (action_row): Let default_rule be always a rule
18151 number.
18152
18153 2002-06-30 Akim Demaille <akim@epita.fr>
18154
18155 * src/closure.c (print_firsts, print_fderives, closure):
18156 Use BITSET_EXECUTE.
18157 * src/lalr.c (lookaheads_print): Likewise.
18158 * src/state.c (state_rule_lookaheads_print): Likewise.
18159 * src/print_graph.c (print_core): Likewise.
18160 * src/print.c (print_reductions): Likewise.
18161 * src/output.c (action_row): Likewise.
18162 Use SHIFT_IS_DISABLED, SHIFT_IS_SHIFT and SHIFT_SYMBOL.
18163
18164 2002-06-30 Akim Demaille <akim@epita.fr>
18165
18166 * src/print_graph.c: Use report_flag.
18167
18168 2002-06-30 Akim Demaille <akim@epita.fr>
18169
18170 * src/lalr.c (traverse, digraph, matrix_print, transpose): Move
18171 to...
18172 * src/relation.h, src/relation.c (traverse, relation_digraph)
18173 (relation_print, relation_transpose): New.
18174
18175 2002-06-30 Akim Demaille <akim@epita.fr>
18176
18177 * src/state.h, src/state.c (shifts_to): New.
18178 * src/lalr.c (build_relations): Use it.
18179
18180 2002-06-30 Akim Demaille <akim@epita.fr>
18181
18182 * src/gram.h (rule_number_t, RULE_NUMBER_MAX, int_of_rule_number)
18183 (item_number_of_rule_number, rule_number_of_item_number): New.
18184 * src/LR0.c, src/closure.c, src/derives.c, src/derives.h,
18185 * src/gram.c, src/lalr.c, src/nullable.c, src/output.c, src/print.c,
18186 * src/print_graph.c, src/reader.c, src/reduce.c, src/reduce.h:
18187 Propagate their use.
18188 Much remains to be done, in particular wrt `shorts' from types.h.
18189
18190 2002-06-30 Akim Demaille <akim@epita.fr>
18191
18192 * src/symtab.c (symbol_new): Initialize the `printer' member.
18193
18194 2002-06-30 Akim Demaille <akim@epita.fr>
18195
18196 * src/LR0.c (save_reductions): Remove, replaced by...
18197 * src/state.h, src/state.c (state_reductions_set): New.
18198 (reductions, errs): Rename as...
18199 (reductions_t, errs_t): these.
18200 Adjust all dependencies.
18201
18202 2002-06-30 Akim Demaille <akim@epita.fr>
18203
18204 * src/LR0.c (state_list_t, state_list_append): New.
18205 (first_state, last_state): Now symbol_list_t.
18206 (this_state): Remove.
18207 (new_itemsets, append_states, save_reductions): Take a state_t as
18208 argument.
18209 (set_states, generate_states): Adjust.
18210 (save_shifts): Remove, replaced by...
18211 * src/state.h, src/state.c (state_shifts_set): New.
18212 (shifts): Rename as...
18213 (shifts_t): this.
18214 Adjust all dependencies.
18215 * src/state.h (state_t): Remove the `next' member.
18216
18217 2002-06-30 Akim Demaille <akim@epita.fr>
18218
18219 * src/vcg.c (quote): Use slot 2, since we often pass symbol tag
18220 escaped in slot 0.
18221
18222 2002-06-30 Akim Demaille <akim@epita.fr>
18223
18224 Use hash.h for the state hash table.
18225
18226 * src/LR0.c (STATE_HASH_SIZE, state_hash): Remove.
18227 (allocate_storage): Use state_hash_new.
18228 (free_storage): Use state_hash_free.
18229 (new_state, get_state): Adjust.
18230 * src/lalr.h, src/lalr.c (states): Move to...
18231 * src/states.h (state_t): Remove the `link' member, no longer
18232 used.
18233 * src/states.h, src/states.c: here.
18234 (state_hash_new, state_hash_free, state_hash_lookup)
18235 (state_hash_insert, states_free): New.
18236 * src/states.c (state_table, state_compare, state_hash): New.
18237 * src/output.c (output_actions): Do not free states now, since we
18238 still need to know the final_state number in `prepare', called
18239 afterwards. Do it...
18240 * src/main.c (main): here: call states_free after `output'.
18241
18242 2002-06-30 Akim Demaille <akim@epita.fr>
18243
18244 * src/state.h, src/state.c (state_new): New, extracted from...
18245 * src/LR0.c (new_state): here.
18246 * src/state.h (STATE_ALLOC): Move to...
18247 * src/state.c: here.
18248 * src/LR0.h, src/LR0.c (nstates, final_state): Move to...
18249 * src/state.h, src/state.c: here.
18250
18251 2002-06-30 Akim Demaille <akim@epita.fr>
18252
18253 * src/reader.c (gensym): Rename as...
18254 * src/symtab.h, src/symtab.c (dummy_symbol_get): this.
18255 (getsym): Rename as...
18256 (symbol_get): this.
18257
18258 2002-06-30 Akim Demaille <akim@epita.fr>
18259
18260 * src/state.h (state_number_t, STATE_NUMBER_MAX): New.
18261 * src/LR0.c, src/LR0.h, src/conflicts.c, src/lalr.c, src/lalr.h,
18262 * src/output.c, src/print.c, src/print_graph.c: Propagate.
18263 * src/LR0.h, src/LR0.h (final_state): Is a state_t*.
18264
18265 2002-06-30 Akim Demaille <akim@epita.fr>
18266
18267 Make the test suite pass with warnings checked.
18268
18269 * tests/actions.at (Printers and Destructors): Improve.
18270 Avoid unsigned vs. signed issues.
18271 * tests/calc.at: Don't exercise the scanner here, do it...
18272 * tests/input.at (Torturing the Scanner): here.
18273
18274 2002-06-28 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
18275
18276 * data/glr.c: Correct typo in Emacs-mode directive. Slightly
18277 reorganize first lines parallel to yacc.c.
18278
18279 2002-06-28 Akim Demaille <akim@epita.fr>
18280
18281 * data/c.m4 (b4_copyright, b4_sint_type, b4_uint_type, b4_token_define)
18282 (b4_token_enum, b4_token_defines): New, factored from...
18283 * data/lalr1.cc, data/yacc.c, glr.c: here.
18284
18285 2002-06-28 Akim Demaille <akim@epita.fr>
18286
18287 * data/yacc.c (yydestruct, yysymprint): Pacify GCC warnings for
18288 unused variables.
18289 * src/output.c (merger_output): static.
18290
18291 2002-06-28 Akim Demaille <akim@epita.fr>
18292
18293 * src/reader.h: s/grammer_current_rule_merge_set/grammar_.../.
18294 * src/conflicts.c (conflicts_total_count): `i' is unsigned, to
18295 pacify GCC.
18296 * src/output.c (save_row): Initialize all the variables to pacify GCC.
18297
18298 2002-06-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
18299
18300 Accumulated changelog for new GLR parsing features.
18301
18302 * src/conflicts.c (count_total_conflicts): Change name to
18303 conflicts_total_count.
18304 * src/conflicts.h: Ditto.
18305 * src/output.c (token_actions): Use the new name.
18306 (output_conflicts): Change conflp => conflict_list_heads, and
18307 confl => conflict_list for better readability.
18308 * data/glr.c: Use the new names.
18309 * NEWS: Add self to GLR announcement.
18310
18311 * src/reader.c (free_merger_functions): Cleanup: XFREE->free.
18312
18313 * doc/bison.texinfo (GLR Parsers): Make corrections suggested by
18314 Akim Demaille.
18315
18316 * data/bison.glr: Change name to glr.c
18317 * data/glr.c: Renamed from bison.glr.
18318 * data/Makefile.am: Add glr.c
18319
18320 * src/getargs.c:
18321
18322 * src/symlist.h: Add dprec and merger fields to symbol_list_s.
18323 * src/symlist.c (symbol_list_new): Initialize dprec and merger fields.
18324
18325 Originally 2002-06-16 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
18326
18327 * data/bison.glr: Be sure to restore the
18328 current #line when returning to the skeleton contents after having
18329 exposed the input file's #line.
18330
18331 Originally 2002-06-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
18332
18333 * data/bison.glr: Bring up to date with changes to bison.simple.
18334
18335 Originally 2002-06-03 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
18336
18337 * data/bison.glr: Correct definitions that use b4_prefix.
18338 Various reformatting.
18339 (GLRStack): Make yychar (in YYPURE case) and yytokenp as part of stack.
18340 (yyreportParseError, yyrecoverParseError, yyprocessOneStack): remove
18341 yytokenp argument; now part of stack.
18342 (yychar): Define to behave as documented.
18343 (yyclearin): Ditto.
18344
18345 Originally 2002-05-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
18346
18347 * src/reader.h: Add declaration for free_merger_functions.
18348
18349 * src/reader.c (merge_functions): New variable.
18350 (get_merge_function): New function.
18351 (free_merger_functions): New function.
18352 (readgram): Check for %prec that is not followed by a symbol.
18353 Handle %dprec and %merge declarations.
18354 (packgram): Initialize dprec and merger fields in rules array.
18355
18356 * src/output.c (conflict_tos, conflrow, conflict_table, conflict_list,
18357 conflict_list_cnt, conflict_list_free): New variables.
18358 (table_grow): Also grow conflict_table.
18359 (prepare_rules): Output dprec and merger tables.
18360 (conflict_row): New function.
18361 (action_row): Output conflict lists for GLR parser. Don't use
18362 default reduction in conflicted states for GLR parser so that there
18363 are spaces for the conflict lists.
18364 (save_row): Also save conflict information.
18365 (token_actions): Allocate conflict list.
18366 (merger_output): New function.
18367 (pack_vector): Pack conflict table, too.
18368 (output_conflicts): New function to output yyconflp and yyconfl.
18369 (output_check): Allocate conflict_tos.
18370 (output_actions): Output conflict tables, also.
18371 (output_skeleton): Output b4_mergers definition.
18372 (prepare): Output b4_max_rhs_length definition.
18373 Use 'bison.glr' as default skeleton for GLR parsers.
18374
18375 * src/gram.c (glr_parser): New flag.
18376 (grammar_free): Call free_merger_functions.
18377
18378 * src/conflicts.c (count_rr_conflicts): Augment to optionally count
18379 all pairs of conflicting reductions, rather than just all tokens
18380 causing conflicts. Needed to size conflict tables.
18381 (conflicts_output): Modify call to count_rr_conflicts for new
18382 interface.
18383 (conflicts_print): Ditto.
18384 (count_total_conflicts): New function.
18385
18386 * src/reader.h (merger_list): New type.
18387 (merge_functions): New variable.
18388
18389 * src/lex.h (tok_dprec, tok_merge): New token types.
18390
18391 * src/gram.h (rule_s): Add dprec and merger fields.
18392 (glr_parser): New flag.
18393
18394 * src/conflicts.h (count_total_conflicts): New function.
18395
18396 * src/options.c (option_table): Add %dprec, %merge, and %glr-parser.
18397
18398 * doc/bison.texinfo (Generalized LR Parsing): New section.
18399 (GLR Parsers): New section.
18400 (Language and Grammar): Mention GLR parsing.
18401 (Table of Symbols): Add %dprec, %glr-parser, %merge, GLR
18402 Correct typo ("tge" -> "the").
18403
18404 * data/bison.glr: New skeleton for GLR parsing.
18405
18406 * tests/cxx-gram.at: New tests for GLR parsing.
18407
18408 * tests/testsuite.at: Include cxx-gram.at.
18409
18410 * tests/Makefile.am: Add cxx-gram.at.
18411
18412 * src/parse-gram.y:
18413
18414 * src/scan-gram.l: Add %dprec, %glr-parser, %merge.
18415
18416 * src/parse-gram.y: Grammar for %dprec, %merge, %glr-parser.
18417
18418 2002-06-27 Akim Demaille <akim@epita.fr>
18419
18420 * src/options.h, src/options.c: Remove.
18421 * src/getargs.c (short_options, long_options): New.
18422
18423 2002-06-27 Akim Demaille <akim@epita.fr>
18424
18425 * data/bison.simple, data/bison.c++: Rename as...
18426 * data/yacc.c, data/lalr1.cc: these.
18427 * doc/bison.texinfo (Environment Variables): Remove.
18428
18429 2002-06-25 Raja R Harinath <harinath@cs.umn.edu>
18430
18431 * src/getargs.c (report_argmatch): Initialize strtok().
18432
18433 2002-06-20 Akim Demaille <akim@epita.fr>
18434
18435 * data/bison.simple (b4_symbol_actions): New, replaces...
18436 (b4_symbol_destructor, b4_symbol_printer): these.
18437 (yysymprint): Be sure to call YYPRINT only for tokens, and using
18438 user token numbers.
18439
18440 2002-06-20 Akim Demaille <akim@epita.fr>
18441
18442 * data/bison.simple (yydestructor): Rename as...
18443 (yydestruct): this.
18444
18445 2002-06-20 Akim Demaille <akim@epita.fr>
18446
18447 * src/symtab.h, src/symtab.c (symbol_type_set)
18448 (symbol_destructor_set, symbol_precedence_set): The location is
18449 the last argument.
18450 Adjust all callers.
18451
18452 2002-06-20 Akim Demaille <akim@epita.fr>
18453
18454 * src/parse-gram.y (YYPRINT, yyprint): Don't mess with the parser
18455 internals.
18456 * src/reader.h, src/reader.c (grammar_current_rule_prec_set):
18457 Takes a location.
18458 * src/symtab.h, src/symtab.c (symbol_class_set)
18459 (symbol_user_token_number_set): Likewise.
18460 Adjust all callers.
18461 Promote complain_at.
18462 * tests/input.at (Type Clashes): Adjust.
18463
18464 2002-06-20 Akim Demaille <akim@epita.fr>
18465
18466 * data/bison.simple (YYLEX): Fix the declaration when
18467 %pure-parser.
18468
18469 2002-06-20 Akim Demaille <akim@epita.fr>
18470
18471 * data/bison.simple (yysymprint): Don't print the token number,
18472 just its name.
18473 * tests/actions.at (Destructors): Rename as...
18474 (Printers and Destructors): this.
18475 Also exercise %printer.
18476
18477 2002-06-20 Akim Demaille <akim@epita.fr>
18478
18479 * data/bison.simple (YYDSYMPRINT): New.
18480 Use it to remove many of the #if YYDEBUG/if (yydebug).
18481
18482 2002-06-20 Akim Demaille <akim@epita.fr>
18483
18484 * src/symtab.h, src/symtab.c (symbol_t): printer and
18485 printer_location are new members.
18486 (symbol_printer_set): New.
18487 * src/parse-gram.y (PERCENT_PRINTER): New token.
18488 Handle its associated rule.
18489 * src/scan-gram.l: Adjust.
18490 (handle_destructor_at, handle_destructor_dollar): Rename as...
18491 (handle_symbol_code_at, handle_symbol_code_dollar): these.
18492 * src/output.c (symbol_printers_output): New.
18493 (output_skeleton): Call it.
18494 * data/bison.simple (yysymprint): New. Cannot be named yyprint
18495 since there are already many grammar files with a user `yyprint'.
18496 Replace the calls to YYPRINT to calls to yysymprint.
18497 * tests/calc.at: Adjust.
18498 * tests/torture.at (AT_DATA_STACK_TORTURE): Remove YYPRINT: it was
18499 taking advantage of parser very internal details (stack size!).
18500
18501 2002-06-20 Akim Demaille <akim@epita.fr>
18502
18503 * src/scan-gram.l: Complete the scanner with the missing patterns
18504 to pacify Flex.
18505 Use `quote' and `symbol_tag_get' where appropriate.
18506
18507 2002-06-19 Akim Demaille <akim@epita.fr>
18508
18509 * tests/actions.at (Destructors): Augment to test locations.
18510 * data/bison.simple (yydestructor): Pass it the current location
18511 if locations are enabled.
18512 Prototype only when __STDC__ or C++.
18513 Change the argument names to move into the yy name space: there is
18514 user code here.
18515
18516 2002-06-19 Akim Demaille <akim@epita.fr>
18517
18518 * data/bison.simple (b4_pure_if): New.
18519 Use it instead of #ifdef YYPURE.
18520
18521 2002-06-19 Akim Demaille <akim@epita.fr>
18522
18523 * data/bison.simple (b4_location_if): New.
18524 Use it instead of #ifdef YYLSP_NEEDED.
18525
18526 2002-06-19 Akim Demaille <akim@epita.fr>
18527
18528 Prepare @$ in %destructor, but currently don't bind it in the
18529 skeleton, as %location use is not cleaned up yet.
18530
18531 * src/scan-gram.l (handle_dollar, handle_destructor_at)
18532 (handle_action_at): New.
18533 (handle_at, handle_action_dollar, handle_destructor_dollar): Take
18534 a braced_code_t and a location as additional arguments.
18535 (handle_destructor_dollar): Instead of requiring `b4_eval', just
18536 unquote one when outputting `b4_dollar_dollar'.
18537 Adjust callers.
18538 * data/bison.simple (b4_eval): Remove.
18539 (b4_symbol_destructor): Adjust.
18540 * tests/input.at (Invalid @n): Adjust.
18541
18542 2002-06-19 Zack Weinberg <zack@codesourcery.com>
18543
18544 * doc/bison.texinfo: Document ability to have multiple
18545 prologue sections.
18546
18547 2002-06-18 Akim Demaille <akim@epita.fr>
18548
18549 * src/files.c (compute_base_names): When computing the output file
18550 names from the input file name, strip the directory part.
18551
18552 2002-06-18 Akim Demaille <akim@epita.fr>
18553
18554 * data/bison.simple.new: Comment changes.
18555 Reported by Andreas Schwab.
18556
18557 2002-06-18 Matt Kraai <kraai@alumni.cmu.edu>
18558
18559 * data/bison.simple (yyoverflowlab): #ifndef yyoverflow, so that
18560 there are no `label `yyoverflowlab' defined but not used' warnings
18561 when yyoverflow is defined.
18562
18563 2002-06-18 Akim Demaille <akim@epita.fr>
18564
18565 * src/symtab.h, src/symtab.c (symbol_t): destructor_location is a
18566 new member.
18567 (symbol_destructor_set): Adjust.
18568 * src/output.c (symbol_destructors_output): Output the destructor
18569 locations.
18570 Output the symbol name.
18571 * data/bison.simple (b4_symbol_destructor): Adjust.
18572
18573 2002-06-18 Cris Bailiff <c.bailiff@awayweb.com>
18574 and Akim Demaille <akim@epita.fr>
18575
18576 * data/bison.simple.new (yyerrlab1): Be sure to pop and destroy
18577 what's left on the stack when the error recovery hits EOF.
18578 * tests/actions.at (Destructors): Complete to exercise this case.
18579
18580 2002-06-17 Akim Demaille <akim@epita.fr>
18581
18582 * data/m4sugar/m4sugar.m4 (m4_map): Recognize when the list of
18583 arguments is really empty, not only equal to `[]'.
18584 * src/symtab.h, src/symtab.c (symbol_t): `destructor' is a new
18585 member.
18586 (symbol_destructor_set): New.
18587 * src/output.c (symbol_destructors_output): New.
18588 * src/reader.h (brace_code_t, current_braced_code): New.
18589 * src/scan-gram.l (BRACED_CODE): Use it to branch on...
18590 (handle_dollar): Rename as...
18591 (handle_action_dollar): this.
18592 (handle_destructor_dollar): New.
18593 * src/parse-gram.y (PERCENT_DESTRUCTOR): New.
18594 (grammar_declaration): Use it.
18595 * data/bison.simple (yystos): Is always defined.
18596 (yydestructor): New.
18597 * tests/actions.at (Destructors): New.
18598 * tests/calc.at (_AT_CHECK_CALC_ERROR): Don't rely on egrep.
18599
18600 2002-06-17 Akim Demaille <akim@epita.fr>
18601
18602 * src/symlist.h, src/symlist.c (symbol_list_length): New.
18603 * src/scan-gram.l (handle_dollar, handle_at): Compute the
18604 rule_length only when needed.
18605 * src/output.c (actions_output, token_definitions_output): Output
18606 the full M4 block.
18607 * src/symtab.c: Don't access directly to the symbol tag, use
18608 symbol_tag_get.
18609 * src/parse-gram.y: Use symbol_list_free.
18610
18611 2002-06-17 Akim Demaille <akim@epita.fr>
18612
18613 * src/reader.h, src/reader.c (symbol_list, symbol_list_new)
18614 (symbol_list_prepend, get_type_name): Move to...
18615 * src/symlist.h, src/symlist.c (symbol_list_t, symbol_list_new)
18616 (symbol_list_prepend, symbol_list_n_type_name_get): here.
18617 Adjust all callers.
18618 (symbol_list_free): New.
18619 * src/scan-gram.l (handle_dollar): Takes a location.
18620 * tests/input.at (Invalid $n): Adjust.
18621
18622 2002-06-17 Akim Demaille <akim@epita.fr>
18623
18624 * src/reader.h, src/reader.c (symbol_list_new): Export it.
18625 (symbol_list_prepend): New.
18626 * src/parse-gram.y (%union): `list' is a new member.
18627 (symbols.1): New, replaces...
18628 (terms_to_prec.1, nterms_to_type.1): these.
18629 * src/symtab.h, src/symtab.c (symbol_type_set, symbol_precedence_set)
18630 Take a location as additional argument.
18631 Adjust all callers.
18632
18633 2002-06-15 Akim Demaille <akim@epita.fr>
18634
18635 * src/parse-gram.y: Move %token in the declaration section so that
18636 we don't depend upon CVS Bison.
18637
18638 2002-06-15 Akim Demaille <akim@epita.fr>
18639
18640 * src/state.h, src/state.c (state_rule_lookaheads_print): New.
18641 * src/print.c (print_core): Use it.
18642
18643 2002-06-15 Akim Demaille <akim@epita.fr>
18644
18645 * src/conflicts.c (log_resolution): Accept the rule involved in
18646 the sr conflicts instead of the lookahead number that points to
18647 that rule.
18648 (flush_reduce): Accept the current lookahead vector as argument,
18649 instead of the index in LA.
18650 (resolve_sr_conflict): Accept the current number of lookahead
18651 bitset to consider for the STATE, instead of the index in LA.
18652 (set_conflicts): Adjust.
18653 * src/lalr.c, src/lalr.h, src/state.h: Comment changes.
18654
18655 2002-06-15 Akim Demaille <akim@epita.fr>
18656
18657 * src/state.h (state_t): Replace the `lookaheadsp' member, a
18658 short, with `lookaheads' (bitsetv), `lookaheads_rule' (rule_t**).
18659 Adjust all dependencies.
18660 * src/lalr.c (initialize_lookaheads): Split into...
18661 (states_lookaheads_count, states_lookaheads_initialize): these.
18662 (lalr): Adjust.
18663
18664 2002-06-15 Akim Demaille <akim@epita.fr>
18665
18666 * src/gram.h, src/gram.c (grammar_rules_partial_print): New, eved
18667 out of...
18668 (grammar_rules_print): here.
18669 * src/reduce.c (reduce_output): Use it.
18670 * tests/reduce.at (Useless Rules, Reduced Automaton)
18671 (Underivable Rules): Adjust.
18672
18673 2002-06-15 Akim Demaille <akim@epita.fr>
18674
18675 Copy BYacc's nice way to report the grammar.
18676
18677 * src/gram.h, src/gram.c (grammar_rhs_print, grammar_rules_print):
18678 New.
18679 Don't print the rules' location, it is confusing and useless.
18680 (rule_print): Use grammar_rhs_print.
18681 * src/print.c (print_grammar): Use grammar_rules_print.
18682
18683 2002-06-15 Akim Demaille <akim@epita.fr>
18684
18685 Complete and rationalize `useless thing' warnings.
18686
18687 * src/symtab.h, src/symtab.c (symbol_tag_get, symbol_tag_get_n)
18688 (symbol_tag_print): New.
18689 Use them everywhere in place of accessing directly the tag member.
18690 * src/gram.h, src/gram.c (rule_print): New.
18691 Use it where a rule used to be printed `by hand'.
18692 * src/reduce.c (nonterminals_reduce): Report the use nonterminals.
18693 (reduce_grammar_tables): Report the useless rules.
18694 (reduce_print): Useless things are a warning, not an error.
18695 Report it as such.
18696 * tests/reduce.at (Useless Nonterminals, Useless Rules):
18697 (Reduced Automaton, Underivable Rules): Adjust.
18698 * tests/regression.at (Web2c Report, Web2c Report): Adjust.
18699 * tests/conflicts.at (Unresolved SR Conflicts)
18700 (Solved SR Conflicts): Adjust.
18701
18702 2002-06-15 Akim Demaille <akim@epita.fr>
18703
18704 Let symbols have a location.
18705
18706 * src/symtab.h, src/symtab.c (symbol_t): Location is a new member.
18707 (getsym): Adjust.
18708 Adjust all callers.
18709 * src/complain.h, src/complain.c (complain_at, fatal_at, warn_at):
18710 Use location_t, not int.
18711 * src/symtab.c (symbol_check_defined): Take advantage of the
18712 location.
18713 * tests/regression.at (Invalid inputs): Adjust.
18714
18715 2002-06-15 Akim Demaille <akim@epita.fr>
18716
18717 * src/parse-gram.y (YYLLOC_DEFAULT, current_lhs_location): New.
18718 (input): Don't try to initialize yylloc here, do it in the
18719 scanner.
18720 * src/scan-gram.l (YY_USER_INIT): Initialize yylloc.
18721 * src/gram.h (rule_t): Change line and action_line into location
18722 and action_location, of location_t type.
18723 Adjust all dependencies.
18724 * src/location.h, src/location.c (empty_location): New.
18725 * src/reader.h, src/reader.c (grammar_start_symbol_set)
18726 (grammar_symbol_append, grammar_rule_begin, grammar_rule_end)
18727 (grammar_current_rule_symbol_append)
18728 (grammar_current_rule_action_append): Expect a location as argument.
18729 * src/reader.c (grammar_midrule_action): Adjust to attach an
18730 action's location as dummy symbol location.
18731 * src/symtab.h, src/symtab.c (startsymbol_location): New.
18732 * tests/regression.at (Web2c Report, Rule Line Numbers): Adjust
18733 the line numbers.
18734
18735 2002-06-14 Akim Demaille <akim@epita.fr>
18736
18737 Grammar declarations may be found in the grammar section.
18738
18739 * src/parse-gram.y (rules_or_grammar_declaration): New.
18740 (declarations): Each declaration may end with a semicolon, not
18741 just...
18742 (grammar_declaration): `"%union"'.
18743 (grammar): Branch to rules_or_grammar_declaration.
18744
18745 2002-06-14 Akim Demaille <akim@epita.fr>
18746
18747 * src/main.c (main): Invoke scanner_free.
18748
18749 2002-06-14 Akim Demaille <akim@epita.fr>
18750
18751 * src/output.c (m4_invoke): Extracted from...
18752 (output_skeleton): here.
18753 Free tempfile.
18754
18755 2002-06-14 Akim Demaille <akim@epita.fr>
18756
18757 * src/parse-gram.y (directives, directive, gram)
18758 (grammar_directives, precedence_directives, precedence_directive):
18759 Rename as...
18760 (declarations, declaration, grammar, grammar_declaration)
18761 (precedence_declaration, precedence_declarator): these.
18762 (symbol_declaration): New.
18763
18764 2002-06-14 Akim Demaille <akim@epita.fr>
18765
18766 * src/files.c (action_obstack): Remove, unused.
18767 (output_obstack): Remove it, and all its dependencies, as it is no
18768 longer needed.
18769 * src/reader.c (epilogue_set): Build the epilogue in the
18770 muscle_obstack.
18771 * src/output.h, src/output.c (muscle_obstack): Move to...
18772 * src/muscle_tab.h, src/muscle_tab.h: here.
18773 (muscle_init): Initialize muscle_obstack.
18774 (muscle_free): New.
18775 * src/main.c (main): Call it.
18776
18777 2002-06-14 Akim Demaille <akim@epita.fr>
18778
18779 * src/location.h: New, extracted from...
18780 * src/reader.h: here.
18781 * src/Makefile.am (noinst_HEADERS): Merge into
18782 (bison_SOURCES): this.
18783 Add location.h.
18784 * src/parse-gram.y: Use location_t instead of Bison's.
18785 * src/reader.h, src/reader.c (prologue_augment, epilogue_set):
18786 Use location_t instead of ints.
18787
18788 2002-06-14 Akim Demaille <akim@epita.fr>
18789
18790 * data/bison.simple, data/bison.c++: Be sure to restore the
18791 current #line when returning to the skeleton contents after having
18792 exposed the input file's #line.
18793
18794 2002-06-12 Akim Demaille <akim@epita.fr>
18795
18796 * src/scan-gram.l (SC_BRACED_CODE): Don't use `<.*>', it is too
18797 eager.
18798 * tests/actions.at (Exotic Dollars): New.
18799
18800 2002-06-12 Akim Demaille <akim@epita.fr>
18801
18802 * src/scan-gram.l (SC_PROLOGUE): Don't eat characters amongst
18803 ['"/] too eagerly.
18804 * tests/input.at (Torturing the Scanner): New.
18805
18806 2002-06-11 Akim Demaille <akim@epita.fr>
18807
18808 * src/scan-gram.l (YY_OBS_INIT): Remove, replace with...
18809 [SC_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,SC_PROLOGUE]
18810 [SC_EPILOGUE]: Output the quadrigraphs only when not in a comment.
18811 * src/reader.h, src/scan-gram.l (scanner_initialize): this.
18812 * src/reader.c (reader): Use it.
18813
18814 2002-06-11 Akim Demaille <akim@epita.fr>
18815
18816 * src/scan-gram.l (YY_OBS_FINISH): Don't set yylval.
18817 Adjust all callers.
18818 (scanner_last_string_free): New.
18819
18820 2002-06-11 Akim Demaille <akim@epita.fr>
18821
18822 * src/scan-gram.l (YY_INIT, YY_GROW, YY_FINISH): Rename as...
18823 (YY_OBS_INIT, YY_OBS_GROW, YY_OBS_FINISH): these.
18824 (last_string, YY_OBS_FREE): New.
18825 Use them when returning an ID.
18826
18827 2002-06-11 Akim Demaille <akim@epita.fr>
18828
18829 Have Bison grammars parsed by a Bison grammar.
18830
18831 * src/reader.c, src/reader.h (prologue_augment): New.
18832 * src/reader.c (copy_definition): Remove.
18833
18834 * src/reader.h, src/reader.c (gram_start_symbol_set, prologue_augment)
18835 (grammar_symbol_append, grammar_rule_begin, grammar_midrule_action)
18836 (grammar_current_rule_prec_set, grammar_current_rule_check)
18837 (grammar_current_rule_symbol_append)
18838 (grammar_current_rule_action_append): Export.
18839 * src/parse-gram.y (symbol_list_new, symbol_list_symbol_append_
18840 (symbol_list_action_append): Remove.
18841 Hook the routines from reader.
18842 * src/scan-gram.l: In INITIAL, characters and strings are tokens.
18843 * src/system.h (ATTRIBUTE_NORETURN, ATTRIBUTE_UNUSED): Now.
18844
18845 * src/reader.c (read_declarations): Remove, unused.
18846
18847 * src/parse-gram.y: Handle the epilogue.
18848 * src/reader.h, src/reader.c (gram_start_symbol_set): Rename as...
18849 (grammar_start_symbol_set): this.
18850 * src/scan-gram.l: Be sure to ``use'' yycontrol to keep GCC quiet.
18851 * src/reader.c (readgram): Remove, unused.
18852 (reader): Adjust to insert eoftoken and axiom where appropriate.
18853
18854 * src/reader.c (copy_dollar): Replace with...
18855 * src/scan-gram.h (handle_dollar): this.
18856 * src/parse-gram.y: Remove `%thong'.
18857
18858 * src/reader.c (copy_at): Replace with...
18859 * src/scan-gram.h (handle_at): this.
18860
18861 * src/complain.h, src/complain.c (warn_at, complain_at, fatal_at):
18862 New.
18863
18864 * src/scan-gram.l (YY_LINES): Keep lineno synchronized for the
18865 time being.
18866
18867 * src/reader.h, src/reader.c (grammar_rule_end): New.
18868
18869 * src/parse.y (current_type, current_class): New.
18870 Implement `%nterm', `%token' support.
18871 Merge `%term' into `%token'.
18872 (string_as_id): New.
18873 * src/symtab.h, src/symtab.c (symbol_make_alias): Don't pass the
18874 type name.
18875
18876 * src/parse-gram.y: Be sure to handle properly the beginning of
18877 rules.
18878
18879 * src/parse-gram.y: Handle %type.
18880 * src/reader.c (grammar_rule_end): Call grammar_current_rule_check.
18881
18882 * src/parse-gram.y: More directives support.
18883 * src/options.c: No longer handle source directives.
18884
18885 * src/parse-gram.y: Fix %output.
18886
18887 * src/parse-gram.y: Handle %union.
18888 Use the prologue locations.
18889 * src/reader.c (parse_union_decl): Remove.
18890
18891 * src/reader.h, src/reader.c (epilogue_set): New.
18892 * src/parse-gram.y: Use it.
18893
18894 * data/bison.simple, data/bison.c++: b4_stype is now either not
18895 defined, then default to int, or to the contents of %union,
18896 without `union' itself.
18897 Adjust.
18898 * src/muscle_tab.c (muscle_init): Don't predefine `stype'.
18899
18900 * src/output.c (actions_output): Don't output braces, as they are
18901 already handled by the scanner.
18902
18903 * src/scan-gram.l (SC_CHARACTER): Set the user_token_number of
18904 characters to themselves.
18905
18906 * tests/reduce.at (Reduced Automaton): End the grammars with %% so
18907 that the epilogue has a proper #line.
18908
18909 * src/parse-gram.y: Handle precedence/associativity.
18910
18911 * src/symtab.c (symbol_precedence_set): Requires the symbol to be
18912 a terminal.
18913 * src/scan-gram.l (SC_BRACED_CODE): Catch strings and characters.
18914 * tests/calc.at: Do not use `%token "foo"' as it makes not sense
18915 at all to define terminals that cannot be emitted.
18916
18917 * src/scan-gram.l: Escape M4 characters.
18918
18919 * src/scan-gram.l: Working properly with escapes in user
18920 strings/characters.
18921
18922 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR)
18923 (AT_DATA_HORIZONTAL_GRAMMAR): Respect the `%token ID NUM STRING'
18924 grammar.
18925 Use more modest sizes, as for the time being the parser does not
18926 release memory, and therefore the process swallows a huge amount
18927 of memory.
18928
18929 * tests/torture.at (AT_DATA_LOOKAHEADS_GRAMMAR): Adjust to the
18930 stricter %token grammar.
18931
18932 * src/symtab.h (associativity): Add `undef_assoc'.
18933 (symbol_precedence_set): Do nothing when passed an undef_assoc.
18934 * src/symtab.c (symbol_check_alias_consistence): Adjust.
18935
18936 * tests/regression.at (Invalid %directive): Remove, as it is now
18937 meaningless.
18938 (Invalid inputs): Adjust to the new error messages.
18939 (Token definitions): The new grammar doesn't allow too many
18940 eccentricities.
18941
18942 * src/lex.h, src/lex.c: Remove.
18943 * src/reader.c (lastprec, skip_to_char, read_signed_integer)
18944 (copy_character, copy_string2, copy_string, copy_identifier)
18945 (copy_comment, parse_token_decl, parse_type_decl, parse_assoc_decl)
18946 (parse_muscle_decl, parse_dquoted_param, parse_skel_decl)
18947 (parse_action): Remove.
18948 * po/POTFILES.in: Adjust.
18949
18950 2002-06-11 Akim Demaille <akim@epita.fr>
18951
18952 * src/reader.c (parse_action): Don't store directly into the
18953 rule's action member: return the action as a string.
18954 Don't require `rule_length' as an argument: compute it.
18955 (grammar_current_rule_symbol_append)
18956 (grammar_current_rule_action_append): New, eved out from
18957 (readgram): here.
18958 Remove `action_flag', `rulelength', unused now.
18959
18960 2002-06-11 Akim Demaille <akim@epita.fr>
18961
18962 * src/reader.c (grammar_current_rule_prec_set).
18963 (grammar_current_rule_check): New, eved out from...
18964 (readgram): here.
18965 Remove `xaction', `first_rhs': useless.
18966 * tests/input.at (Type clashes): New.
18967 * tests/existing.at (GNU Cim Grammar): Adjust.
18968
18969 2002-06-11 Akim Demaille <akim@epita.fr>
18970
18971 * src/reader.c (grammar_midrule_action): New, Eved out from
18972 (readgram): here.
18973
18974 2002-06-11 Akim Demaille <akim@epita.fr>
18975
18976 * src/reader.c (grammar_rule_begin, previous_rule, current_rule):
18977 New.
18978 (readgram): Use them as replacement of inlined code, crule and
18979 crule1.
18980
18981 2002-06-11 Akim Demaille <akim@epita.fr>
18982
18983 * src/reader.c (grammar_end, grammar_symbol_append): New.
18984 (readgram): Use them.
18985 Make the use of `p' as local as possible.
18986
18987 2002-06-10 Akim Demaille <akim@epita.fr>
18988
18989 GCJ's parser requires the tokens to be defined before the prologue.
18990
18991 * data/bison.simple: Output the token definition before the user's
18992 prologue.
18993 * tests/regression.at (Braces parsing, Duplicate string)
18994 (Mixing %token styles): Check the output from bison.
18995 (Early token definitions): New.
18996
18997 2002-06-10 Akim Demaille <akim@epita.fr>
18998
18999 * src/symtab.c (symbol_user_token_number_set): Don't complain when
19000 assigning twice the same user number to a token, so that we can
19001 use it in...
19002 * src/lex.c (lex): here.
19003 Also use `symbol_class_set' instead of hand written code.
19004 * src/reader.c (parse_assoc_decl): Likewise.
19005
19006 2002-06-10 Akim Demaille <akim@epita.fr>
19007
19008 * src/symtab.c, src/symtab.c (symbol_class_set)
19009 (symbol_user_token_number_set): New.
19010 * src/reader.c (parse_token_decl): Use them.
19011 Use a switch instead of ifs.
19012 Use a single argument.
19013
19014 2002-06-10 Akim Demaille <akim@epita.fr>
19015
19016 Remove `%thong' support as it is undocumented, unused, duplicates
19017 `%token's job, and creates useless e-mail traffic with people who
19018 want to know what it is, why it is undocumented, unused, and
19019 duplicates `%token's job.
19020
19021 * src/reader.c (parse_thong_decl): Remove.
19022 * src/options.c (option_table): Remove "thong".
19023 * src/lex.h (tok_thong): Remove.
19024
19025 2002-06-10 Akim Demaille <akim@epita.fr>
19026
19027 * src/symtab.c, src/symtab.c (symbol_type_set)
19028 (symbol_precedence_set): New.
19029 * src/reader.c (parse_type_decl, parse_assoc_decl): Use them.
19030 (value_components_used): Remove, unused.
19031
19032 2002-06-09 Akim Demaille <akim@epita.fr>
19033
19034 Move symbols handling code out of the reader.
19035
19036 * src/reader.h, src/reader.c (errtoken, undeftoken, eoftoken)
19037 (axiom): Move to...
19038 * src/symtab.h, src/symtab.c: here.
19039
19040 * src/gram.c (start_symbol): Remove: use startsymbol->number.
19041 * src/reader.c (startval): Rename as...
19042 * src/symtab.h, src/symtab.c (startsymbol): this.
19043 * src/reader.c: Adjust.
19044
19045 * src/reader.c (symbol_check_defined, symbol_make_alias)
19046 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
19047 (token_translations_init)
19048 Move to...
19049 * src/symtab.c: here.
19050 * src/reader.c (packsymbols): Move to...
19051 * src/symtab.h, src/symtab.c (symbols_pack): here.
19052 * src/symtab.h, src/symtab.c (symbol_make_alias): Takes SYMVAL as
19053 argument.
19054
19055 2002-06-03 Akim Demaille <akim@epita.fr>
19056
19057 * src/muscle_tab.c (muscle_insert, muscle_find): Declarations,
19058 then statements.
19059
19060 2002-06-03 Akim Demaille <akim@epita.fr>
19061
19062 * src/muscle_tab.c (muscle_find, muscle_insert): Don't initialize
19063 structs with non literals.
19064 * src/scan-skel.l: never-interactive.
19065 * src/conflicts.c (enum conflict_resolution_e): No trailing
19066 comma.
19067 * src/getargs.c (usage): Split long literal strings.
19068 Reported by Hans Aberg.
19069
19070 2002-05-28 Akim Demaille <akim@epita.fr>
19071
19072 * data/bison.c++: Use C++ ostreams.
19073 (cdebug_): New member.
19074
19075 2002-05-28 Akim Demaille <akim@epita.fr>
19076
19077 * src/output.c (output_skeleton): Be sure to allocate enough room
19078 for `/' _and_ for `\0' in full_skeleton.
19079
19080 2002-05-28 Akim Demaille <akim@epita.fr>
19081
19082 * data/bison.c++: Catch up with bison.simple:
19083 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
19084 and Paul Eggert <eggert@twinsun.com>: `error' handing.
19085 2002-05-26 Akim Demaille <akim@epita.fr>: stos_, token_number_,
19086 and popping traces.
19087
19088 2002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
19089
19090 * src/output.c (output_skeleton): Put an explicit path in front of
19091 the skeleton file name, rather than relying on the -I directory,
19092 to partially alleviate effects of having a skeleton file lying around
19093 in the current directory.
19094
19095 2002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
19096
19097 * src/conflicts.c (log_resolution): Correct typo:
19098 obstack_printf should be obstack_fgrow1.
19099
19100 2002-05-26 Akim Demaille <akim@epita.fr>
19101
19102 * src/state.h (state_t): `solved_conflicts' is a new member.
19103 * src/LR0.c (new_state): Set it to 0.
19104 * src/conflicts.h, src/conflicts.c (print_conflicts)
19105 (free_conflicts, solve_conflicts): Rename as...
19106 (conflicts_print, conflicts_free, conflicts_solve): these.
19107 Adjust callers.
19108 * src/conflicts.c (enum conflict_resolution_e)
19109 (solved_conflicts_obstack): New, used by...
19110 (log_resolution): this.
19111 Adjust to attach the conflict resolution to each state.
19112 Complete the description with the precedence/associativity
19113 information.
19114 (resolve_sr_conflict): Adjust.
19115 * src/print.c (print_state): Output its solved_conflicts.
19116 * tests/conflicts.at (Unresolved SR Conflicts)
19117 (Solved SR Conflicts): Exercise --report=all.
19118
19119 2002-05-26 Akim Demaille <akim@epita.fr>
19120
19121 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
19122 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
19123 * src/reader.c, src/reduce.c, src/state.h, src/symtab.h
19124 (token_number_t, item_number_as_token_number)
19125 (token_number_as_item_number, muscle_insert_token_number_table):
19126 Rename as...
19127 (symbol_number_t, item_number_as_symbol_number)
19128 (symbol_number_as_item_number, muscle_insert_symbol_number_table):
19129 these, since it is more appropriate.
19130
19131 2002-05-26 Akim Demaille <akim@epita.fr>
19132
19133 * tests/calc.at (AT_CHECK_CALC): Adjust: there are now additional
19134 `Error:' lines.
19135 * data/bison.simple (yystos) [YYDEBUG]: New.
19136 (yyparse) [YYDEBUG]: Display the symbols which are popped during
19137 error recovery.
19138 * tests/regression.at (Web2c Actions): Adjust: yystos is output now.
19139
19140 2002-05-25 Akim Demaille <akim@epita.fr>
19141
19142 * doc/bison.texinfo (Debugging): Split into...
19143 (Tracing): this new section, its former contents, and...
19144 (Understanding): this new section.
19145 * src/getargs.h, src/getargs.c (verbose_flag): Remove, replaced
19146 by...
19147 (report_flag): this.
19148 Adjust all dependencies.
19149 (report_args, report_types, report_argmatch): New.
19150 (usage, getargs): Report/support -r, --report.
19151 * src/options.h
19152 (struct option_table_struct): Rename as..,
19153 (struct option_table_s): this.
19154 Rename the `set_flag' member to `flag' to match with getopt_long's
19155 struct.
19156 * src/options.c (option_table): Split verbose into an entry for
19157 %verbose, and another for --verbose.
19158 Support --report/-r, so remove -r from the obsolete --raw.
19159 * src/print.c: Attach full item sets and lookaheads reports to
19160 report_flag instead of trace_flag.
19161 * lib/argmatch.h, lib/argmatch.c: New, from Fileutils 4.1.
19162
19163 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
19164 and Paul Eggert <eggert@twinsun.com>
19165
19166 * data/bison.simple (yyparse): Correct error handling to conform to
19167 POSIX and yacc. Specifically, after syntax error is discovered,
19168 do not reduce further before shifting the error token.
19169 Clean up the code a bit by removing the labels yyerrdefault,
19170 yyerrhandle, yyerrpop.
19171 * NEWS: Document the above.
19172
19173 2002-05-20 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
19174
19175 * data/bison.simple (yyr1): Don't use yy_token_number_type as element
19176 type; it isn't always big enough, since it doesn't necessarily
19177 include non-terminals.
19178 (yytranslate): Expand definition of yy_token_number_type, so that
19179 the latter can be removed.
19180 (yy_token_number_type): Remove, only one use.
19181 * data/bison.c++ (r1_): Parallel change to yyr1 in bison.simple---
19182 don't use TokenNumberType as element type.
19183
19184 * tests/regression.at: Modify expected output to agree with change
19185 to yyr1 and yytranslate.
19186
19187 2002-05-13 Florian Krohm <florian@edamail.fishkill.ibm.com>
19188
19189 * src/reader.c (parse_action): Use copy_character instead of
19190 obstack_1grow.
19191
19192 2002-05-13 Akim Demaille <akim@epita.fr>
19193
19194 * tests/regression.at (Token definitions): Prototype yylex and
19195 yyerror.
19196
19197 2002-05-12 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
19198
19199 * src/scan-skel.l: Correct off-by-one error in handling of __oline__.
19200 * data/bison.simple (b4_sint_type, b4_uint_type): Correct to reflect
19201 32-bit arithmetic.
19202 * data/bison.c++ (b4_sint_type, b4_uint_type): Ditto.
19203
19204 2002-05-07 Akim Demaille <akim@epita.fr>
19205
19206 * tests/synclines.at: Be sure to prototype yylex and yyerror to
19207 avoid GCC warnings.
19208
19209 2002-05-07 Akim Demaille <akim@epita.fr>
19210
19211 Kill GCC warnings.
19212
19213 * src/reduce.c (nonterminals_reduce): Don't loop over RITEM: loop
19214 over the RHS of each rule.
19215 * src/gram.h, src/gram.c (nritems): Is `unsigned int', not int.
19216 * src/state.h (state_t): Member `nitems' is unsigned short.
19217 * src/LR0.c (get_state): Adjust.
19218 * src/reader.c (packgram): Likewise.
19219 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): `max' is of type
19220 `Type'.
19221 (muscle_insert_int_table): Remove, unused.
19222 (prepare_rules): Remove `max'.
19223
19224 2002-05-06 Akim Demaille <akim@epita.fr>
19225
19226 * src/closure.c (print_firsts): Display of the symbol tags.
19227 (bitmatrix_print): Move to...
19228 * lib/bitsetv-print.h, lib/bitsetv-print.c (bitsetv_matrix_dump):
19229 here.
19230 * tests/sets.at (Nullable, Broken Closure, Firsts): Adjust.
19231
19232 2002-05-06 Akim Demaille <akim@epita.fr>
19233
19234 * src/muscle_tab.c (muscle_m4_output): Must return TRUE for
19235 hash_do_for_each.
19236
19237 2002-05-06 Akim Demaille <akim@epita.fr>
19238
19239 * src/LR0.c (new_state, get_state): Instead of using the global
19240 `kernel_size' and `kernel_base', have two new arguments:
19241 `core_size' and `core'.
19242 Adjust callers.
19243
19244 2002-05-06 Akim Demaille <akim@epita.fr>
19245
19246 * src/reader.c (packgram): No longer end `ritem' with a 0
19247 sentinel: it is not used.
19248
19249 2002-05-05 Akim Demaille <akim@epita.fr>
19250
19251 New experimental feature: display the lookaheads in the report and
19252 graph.
19253
19254 * src/print (print_core): When --trace-flag, display the rules
19255 lookaheads.
19256 * src/print_graph.c (print_core): Likewise.
19257 Swap the arguments.
19258 Adjust caller.
19259
19260 2002-05-05 Akim Demaille <akim@epita.fr>
19261
19262 * tests/torture.at (Many lookaheads): New test.
19263
19264 2002-05-05 Akim Demaille <akim@epita.fr>
19265
19266 * src/output.c (GENERATE_OUTPUT_TABLE): Replace with...
19267 (GENERATE_MUSCLE_INSERT_TABLE): this.
19268 (output_int_table, output_unsigned_int_table, output_short_table)
19269 (output_token_number_table, output_item_number_table): Replace with...
19270 (muscle_insert_int_table, muscle_insert_unsigned_int_table)
19271 (muscle_insert_short_table, muscle_insert_token_number_table)
19272 (muscle_insert_item_number_table): these.
19273 Adjust all callers.
19274 (prepare_tokens): Don't free `translations', since...
19275 * src/reader.h, src/reader.c (grammar_free): do it.
19276 Move to...
19277 * src/gram.h, src/gram.c (grammar_free): here.
19278 * data/bison.simple, data/bison.c++: b4_token_number_max is now
19279 b4_translate_max.
19280
19281 2002-05-05 Akim Demaille <akim@epita.fr>
19282
19283 * src/output.c (output_unsigned_int_table): New.
19284 (prepare_rules): `i' is unsigned.
19285 `prhs', `rline', `r2' are unsigned int.
19286 Rename muscle `rhs_number_max' as `rhs_max'.
19287 Output muscles `prhs_max', `rline_max', and `r2_max'.
19288 Free rline and r1.
19289 * data/bison.simple, data/bison.c++: Adjust to use these muscles
19290 to compute types instead of constant types.
19291 * tests/regression.at (Web2c Actions): Adjust.
19292
19293 2002-05-04 Akim Demaille <akim@epita.fr>
19294
19295 * src/symtab.h (SALIAS, SUNDEF): Rename as...
19296 (USER_NUMBER_ALIAS, USER_NUMBER_UNDEFINED): these.
19297 Adjust dependencies.
19298 * src/output.c (token_definitions_output): Be sure not to output a
19299 `#define 'a'' when fed with `%token 'a' "a"'.
19300 * tests/regression.at (Token definitions): New.
19301
19302 2002-05-03 Paul Eggert <eggert@twinsun.com>
19303
19304 * data/bison.simple (b4_token_defines): Also define YYTOKENTYPE
19305 for K&R C.
19306
19307 2002-05-03 gettextize <bug-gnu-gettext@gnu.org>
19308
19309 * Makefile.am (SUBDIRS): Remove intl.
19310 (EXTRA_DIST): Add config/config.rpath.
19311
19312 2002-05-03 Akim Demaille <akim@epita.fr>
19313
19314 * data/bison.simple (m4_if): Don't output empty enums.
19315 And actually, output valid enum definitions :(.
19316
19317 2002-05-03 Akim Demaille <akim@epita.fr>
19318
19319 * configure.bat: Remove, completely obsolete.
19320 * Makefile.am (EXTRA_DIST): Adjust.
19321 Don't distribute config.rpath...
19322 * config/Makefile.am (EXTRA_DIST): Do it.
19323
19324 2002-05-03 Akim Demaille <akim@epita.fr>
19325
19326 * configure.in (GETTEXT_VERSION): New.
19327 Suggested by Bruno Haible for the forthcoming Gettext 0.10.3.
19328
19329 2002-05-03 Akim Demaille <akim@epita.fr>
19330
19331 * data/bison.simple (b4_token_enum): New.
19332 (b4_token_defines): Use it to output tokens both as #define and
19333 enums.
19334 Suggested by Paul Eggert.
19335 * src/output.c (token_definitions_output): Don't output spurious
19336 white spaces.
19337
19338 2002-05-03 Akim Demaille <akim@epita.fr>
19339
19340 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
19341
19342 2002-05-02 Robert Anisko <robert@lrde.epita.fr>
19343
19344 * data/bison.c++: Adapt expansion of $s and @s to the C++ parser.
19345 Update the stack class, give a try to deque as the default container.
19346
19347 2002-05-02 Akim Demaille <akim@epita.fr>
19348
19349 * data/bison.simple (yyparse): Do not implement @$ = @1.
19350 (YYLLOC_DEFAULT): Adjust to do it.
19351 * doc/bison.texinfo (Location Default Action): Fix.
19352
19353 2002-05-02 Akim Demaille <akim@epita.fr>
19354
19355 * src/reader.c (parse_braces): Merge into...
19356 (parse_action): this.
19357
19358 2002-05-02 Akim Demaille <akim@epita.fr>
19359
19360 * configure.in (ALL_LINGUAS): Remove.
19361 * po/LINGUAS, hr.po: New.
19362
19363 2002-05-02 Akim Demaille <akim@epita.fr>
19364
19365 Remove the so called hairy (semantic) parsers.
19366
19367 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove.
19368 * src/gram.h, src/gram.c (semantic_parser): Remove.
19369 (rule_t): Remove the guard and guard_line members.
19370 * src/lex.h (token_t): remove tok_guard.
19371 * src/options.c (option_table): Remove %guard and %semantic_parser
19372 support.
19373 * src/output.c, src/output.h (guards_output): Remove.
19374 (prepare): Adjust.
19375 (token_definitions_output): Don't output the `T'
19376 tokens (???).
19377 (output_skeleton): Don't output the guards.
19378 * src/files.c, src/files.c (attrsfile): Remove.
19379 * src/reader.c (symbol_list): Remove the guard and guard_line
19380 members.
19381 Adjust dependencies.
19382 (parse_guard): Remove.
19383 * data/bison.hairy: Remove.
19384 * doc/bison.texinfo (Environment Variables): Remove occurrences of
19385 BISON_HAIRY.
19386
19387 2002-05-02 Akim Demaille <akim@epita.fr>
19388
19389 * src/reader.c (copy_at, copy_dollarm parse_braces, parse_action)
19390 (parse_guard): Rename the formal argument `stack_offset' as
19391 `rule_length', which is more readable.
19392 Adjust callers.
19393 (copy_at, copy_dollar): Instead of outputting the hard coded
19394 values of $$, $n and so forth, output invocation to b4_lhs_value,
19395 b4_lhs_location, b4_rhs_value, and b4_rhs_location.
19396 Note: this patch partially drops `semantic-parser' support: it
19397 always does `rule_length - n', where semantic parsers ought to
19398 always use `-n'.
19399 * data/bison.simple, data/bison.c++ (b4_lhs_value)
19400 (b4_lhs_location, b4_rhs_value, and b4_rhs_location: New.
19401
19402 2002-05-02 Akim Demaille <akim@epita.fr>
19403
19404 * configure.in (AC_INIT): Bump to 1.49b.
19405 (AM_INIT_AUTOMAKE): Short invocation.
19406
19407 2002-05-02 Akim Demaille <akim@epita.fr>
19408
19409 Version 1.49a.
19410
19411 2002-05-01 Akim Demaille <akim@epita.fr>
19412
19413 * src/skeleton.h: Remove.
19414
19415 2002-05-01 Akim Demaille <akim@epita.fr>
19416
19417 * src/skeleton.h: Fix the #endif.
19418 Reported by Magnus Fromreide.
19419
19420 2002-04-26 Paul Eggert <eggert@twinsun.com>
19421
19422 * data/bison.simple (YYSTYPE_IS_TRIVIAL, YYLTYPE_IS_TRIVIAL):
19423 Define if we define YYSTYPE and YYLTYPE, respectively.
19424 (YYCOPY): Fix [] quoting problem in the non-GCC case.
19425
19426 2002-04-25 Robert Anisko <robert@lrde.epita.fr>
19427
19428 * src/scan-skel.l: Postprocess quadrigraphs.
19429
19430 * src/reader.c (copy_character): New function, used to output
19431 single characters while replacing `[' and `]' with quadrigraphs, to
19432 avoid troubles with M4 quotes.
19433 (copy_comment): Output characters with copy_character.
19434 (read_additionnal_code): Likewise.
19435 (copy_string2): Likewise.
19436 (copy_definition): Likewise.
19437
19438 * tests/calc.at: Exercise M4 quoting.
19439
19440 2002-04-25 Akim Demaille <akim@epita.fr>
19441
19442 * tests/sets.at (AT_EXTRACT_SETS): Sed portability issue: no space
19443 between `!' and the command.
19444 Reported by Paul Eggert.
19445
19446 2002-04-24 Robert Anisko <robert@lrde.epita.fr>
19447
19448 * tests/calc.at: Exercise prologue splitting.
19449
19450 * data/bison.simple, data/bison.c++: Use `b4_pre_prologue' and
19451 `b4_post_prologue' instead of `b4_prologue'.
19452
19453 * src/output.c (prepare): Add the `pre_prologue' and `post_prologue'
19454 muscles.
19455 (output): Free pre_prologue_obstack and post_prologue_obstack.
19456 * src/files.h, src/files.c (attrs_obstack): Remove.
19457 (pre_prologue_obstack, post_prologue_obstack): New.
19458 * src/reader.c (copy_definition): Add a parameter to specify the
19459 obstack to fill, instead of using attrs_obstack unconditionally.
19460 (read_declarations): Pass pre_prologue_obstack to copy_definition if
19461 `%union' has not yet been seen, pass post_prologue_obstack otherwise.
19462
19463 2002-04-23 Paul Eggert <eggert@twinsun.com>
19464
19465 * data/bison.simple: Remove unnecessary commentary and white
19466 space differences from 1_29-branch.
19467 Depend on YYERROR_VERBOSE, not defined (YYERROR_VERBOSE).
19468
19469 (union yyalloc, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYCOPY,
19470 YYSTACK_RELOCATE): Do not define if yyoverflow is defined, or
19471 if this is a C++ parser and YYSTYPE or YYLTYPE has nontrivial
19472 constructors or destructors.
19473
19474 (yyparse) [! defined YYSTACK_RELOCATE]: Do not relocate the stack.
19475
19476 2002-04-23 Akim Demaille <akim@epita.fr>
19477
19478 * tests/sets.at (AT_EXTRACT_SETS): Don't use 8 char long sed labels.
19479 * tests/synclines.at (AT_TEST_SYNCLINE): Be robust to GCC's
19480 location with columns.
19481 * tests/conflicts.at (%nonassoc and eof): Don't use `error.h'.
19482 All reported by Paul Eggert.
19483
19484 2002-04-22 Akim Demaille <akim@epita.fr>
19485
19486 * src/reduce.c (dump_grammar): Move to...
19487 * src/gram.h, src/gram.c (grammar_dump): here.
19488 Be sure to separate long item numbers.
19489 Don't read the members of a rule's prec if its nil.
19490
19491 2002-04-22 Akim Demaille <akim@epita.fr>
19492
19493 * src/output.c (table_size, table_grow): New.
19494 (MAXTABLE): Remove, replace uses with table_size.
19495 (pack_vector): Instead of dying when the table is too big, grow it.
19496
19497 2002-04-22 Akim Demaille <akim@epita.fr>
19498
19499 * data/bison.simple (yyr1): Its type is that of a token number.
19500 * data/bison.c++ (r1_): Likewise.
19501 * tests/regression.at (Web2c Actions): Adjust.
19502
19503 2002-04-22 Akim Demaille <akim@epita.fr>
19504
19505 * src/reader.c (token_translations_init): 256 is now the default
19506 value for the error token, i.e., it will be assigned another
19507 number if the user assigned 256 to one of her tokens.
19508 (reader): Don't force 256 to error.
19509 * doc/bison.texinfo (Symbols): Adjust.
19510 * tests/torture.at (AT_DATA_HORIZONTAL_GRAMMAR)
19511 (AT_DATA_TRIANGULAR_GRAMMAR): Number the tokens as 1, 2, 3
19512 etc. instead of 10, 20, 30 (which was used to `jump' over error
19513 (256) and undefined (2)).
19514
19515 2002-04-22 Akim Demaille <akim@epita.fr>
19516
19517 Propagate more token_number_t.
19518
19519 * src/gram.h (token_number_as_item_number)
19520 (item_number_as_token_number): New.
19521 * src/output.c (GENERATE_OUTPUT_TABLE): New.
19522 Use it to create output_item_number_table and
19523 output_token_number_table.
19524 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
19525 * src/lex.c, src/nullable.c, src/output.c, src/print.c,
19526 * src/print_graph.c, src/reader.c, src/reduce.c, src/state.h,
19527 * src/symtab.c, src/symtab.h: Use token_number_t instead of shorts.
19528
19529 2002-04-22 Akim Demaille <akim@epita.fr>
19530
19531 * src/output.h, src/output.c (get_lines_number): Remove.
19532
19533 2002-04-19 Akim Demaille <akim@epita.fr>
19534
19535 * doc/bison.texinfo (Actions): Make clear that `|' is not the same
19536 as Lex/Flex'.
19537 (Debugging): More details about enabling the debugging features.
19538 (Table of Symbols): Describe $$, $n, @$, and @n.
19539 Suggested by Tim Josling.
19540
19541 2002-04-19 Akim Demaille <akim@epita.fr>
19542
19543 * doc/bison.texinfo: Remove the uses of the obsolete @refill.
19544
19545 2002-04-10 Akim Demaille <akim@epita.fr>
19546
19547 * src/system.h: Rely on HAVE_LIMITS_H.
19548 Suggested by Paul Eggert.
19549
19550 2002-04-09 Akim Demaille <akim@epita.fr>
19551
19552 * tests/calc.at (_AT_CHECK_CALC_ERROR): Receive as argument the
19553 full stderr, and strip it according to the bison options, instead
19554 of composing the error message from different bits.
19555 This makes it easier to check for several error messages.
19556 Adjust all the invocations.
19557 Add an invocation exercising the error token.
19558 Add an invocation demonstrating a stupid error message.
19559 (_AT_DATA_CALC_Y): Follow the GCS: initial column is 1, not 0.
19560 Adjust the tests.
19561 Error message are for stderr, not stdout.
19562
19563 2002-04-09 Akim Demaille <akim@epita.fr>
19564
19565 * src/gram.h, src/gram.c (error_token_number): Remove, use
19566 errtoken->number.
19567 * src/reader.c (reader): Don't specify the user token number (2)
19568 for $undefined, as it uselessly prevents using it.
19569 * src/gram.h (token_number_t): Move to...
19570 * src/symtab.h: here.
19571 (state_t.number): Is a token_number_t.
19572 * src/print.c, src/reader.c: Use undeftoken->number instead of
19573 hard coded 2.
19574 (Even though this 2 is not the same as above: the number of the
19575 undeftoken remains being 2, it is its user token number which
19576 might not be 2).
19577 * src/output.c (prepare_tokens): Rename the `maxtok' muscle with
19578 `user_token_number_max'.
19579 Output `undef_token_number'.
19580 * data/bison.simple, data/bison.c++: Use them.
19581 Be sure to map invalid yylex return values to
19582 `undef_token_number'. This saves us from gratuitous SEGV.
19583
19584 * tests/conflicts.at (Solved SR Conflicts)
19585 (Unresolved SR Conflicts): Adjust.
19586 * tests/regression.at (Web2c Actions): Adjust.
19587
19588 2002-04-08 Akim Demaille <akim@epita.fr>
19589
19590 * data/bison.c++: s/b4_item_number_max/b4_rhs_number_max/.
19591 Adding #line.
19592 Remove the duplicate `typedefs'.
19593 (RhsNumberType): Fix the declaration and various other typos.
19594 Use __ofile__.
19595 * data/bison.simple: Use __ofile__.
19596 * src/scan-skel.l: Handle __ofile__.
19597
19598 2002-04-08 Akim Demaille <akim@epita.fr>
19599
19600 * src/gram.h (item_number_t): New, the type of item numbers in
19601 RITEM. Note that it must be able to code symbol numbers as
19602 positive number, and the negation of rule numbers as negative
19603 numbers.
19604 Adjust all dependencies (pretty many).
19605 * src/reduce.c (rule): Remove this `short *' pointer: use
19606 item_number_t.
19607 * src/system.h (MINSHORT, MAXSHORT): Remove.
19608 Include `limits.h'.
19609 Adjust dependencies to using SHRT_MAX and SHRT_MIN.
19610 (shortcpy): Remove.
19611 (MAXTABLE): Move to...
19612 * src/output.c (MAXTABLE): here.
19613 (prepare_rules): Use output_int_table to output rhs.
19614 * data/bison.simple, data/bison.c++: Adjust.
19615 * tests/torture.at (Big triangle): Move the limit from 254 to
19616 500.
19617 * tests/regression.at (Web2c Actions): Ajust.
19618
19619 Trying with bigger grammars shows various phenomena: at 3000 (28Mb
19620 of grammar file) bison is killed by my system, at 2000 (12Mb) bison
19621 passes, but produces negative #line number, once fixed, GCC is
19622 killed while compiling 14Mb, at 1500 (6.7 Mb of grammar, 8.2Mb of
19623 C), it passes.
19624 * src/state.h (state_h): Code input lines on ints, not shorts.
19625
19626 2002-04-08 Akim Demaille <akim@epita.fr>
19627
19628 * src/reduce.c (reduce_grammar): First reduce the nonterminals,
19629 and then the grammar.
19630
19631 2002-04-08 Akim Demaille <akim@epita.fr>
19632
19633 * src/system.h: No longer using strndup.
19634
19635 2002-04-07 Akim Demaille <akim@epita.fr>
19636
19637 * src/muscle_tab.h (MUSCLE_INSERT_LONG_INT): New.
19638 * src/output.c (output_table_data): Return the longest number.
19639 (prepare_tokens): Output `token_number_max').
19640 * data/bison.simple, data/bison.c++ (b4_sint_type, b4_uint_type):
19641 New.
19642 Use them to define yy_token_number_type/TokenNumberType.
19643 Use this type for yytranslate.
19644 * tests/torture.at (Big triangle): Push the limit from 124 to
19645 253.
19646 * tests/regression.at (Web2c Actions): Adjust.
19647
19648 2002-04-07 Akim Demaille <akim@epita.fr>
19649
19650 * tests/torture.at (Big triangle): New.
19651 (GNU AWK Grammar, GNU Cim Grammar): Move to...
19652 * tests/existing.at: here.
19653
19654 2002-04-07 Akim Demaille <akim@epita.fr>
19655
19656 * src/gram.h, src/gram.c (nitems): Remove, it is an alias of
19657 nritems.
19658 Adjust dependencies.
19659
19660 2002-04-07 Akim Demaille <akim@epita.fr>
19661
19662 * src/reader.c: Normalize increments to prefix form.
19663
19664 2002-04-07 Akim Demaille <akim@epita.fr>
19665
19666 * src/reader.c, symtab.c: Remove debugging code.
19667
19668 2002-04-07 Akim Demaille <akim@epita.fr>
19669
19670 Rename all the `bucket's as `symbol_t'.
19671
19672 * src/gram.c, src/gram.h, src/lex.c, src/lex.h, src/output.c,
19673 * src/reader.c, src/reader.h, src/reduce.c, src/state.h,
19674 * src/symtab.c, src/symtab.h (bucket): Rename as...
19675 (symbol_t): this.
19676 (symbol_list_new, bucket_check_defined, bucket_make_alias)
19677 (bucket_check_alias_consistence, bucket_pack, bucket_translation)
19678 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
19679 (buckets_new, buckets_free, buckets_do): Rename as...
19680 (symbol_list_new, symbol_check_defined, symbol_make_alias)
19681 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
19682 (symbol_new, symbol_free, hash_compare_symbol_t, hash_symbol_t)
19683 (symbols_new, symbols_free, symbols_do): these.
19684
19685 2002-04-07 Akim Demaille <akim@epita.fr>
19686
19687 Use lib/hash for the symbol table.
19688
19689 * src/gram.c (ntokens): Initialize to 1, to reserve a slot for
19690 EOF.
19691 * src/lex.c (lex): Set the `number' member of new terminals.
19692 * src/reader.c (bucket_check_defined, bucket_make_alias)
19693 (bucket_check_alias_consistence, bucket_translation): New.
19694 (reader, grammar_free, readgram, token_translations_init)
19695 (packsymbols): Adjust.
19696 (reader): Number the predefined tokens.
19697 * src/reduce.c (inaccessable_symbols): Just use hard coded numbers
19698 for predefined tokens.
19699 * src/symtab.h (bucket): Remove all the hash table related
19700 members.
19701 * src/symtab.c (symtab): Replace by...
19702 (bucket_table): this.
19703 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
19704 (buckets_new, buckets_do): New.
19705
19706 2002-04-07 Akim Demaille <akim@epita.fr>
19707
19708 * src/gram.c (nitems, nrules, nsyms, ntokens, nvars, nritems)
19709 (start_symbol, max_user_token_number, semantic_parser)
19710 (error_token_number): Initialize.
19711 * src/reader.c (grammar, start_flag, startval, typed, lastprec):
19712 Initialize.
19713 (reader): Don't.
19714 (errtoken, eoftoken, undeftoken, axiom): Extern.
19715
19716 2002-04-07 Akim Demaille <akim@epita.fr>
19717
19718 * src/gram.h (rule_s): prec and precsym are now pointers
19719 to the bucket giving the priority/associativity.
19720 Member `associativity' removed: useless.
19721 * src/reduce.c, src/conflicts.c: Adjust.
19722
19723 2002-04-07 Akim Demaille <akim@epita.fr>
19724
19725 * src/lalr.c, src/LR0.c, src/closure.c, src/gram.c, src/reduce.c:
19726 Properly escape the symbols' TAG when outputting them.
19727
19728 2002-04-07 Akim Demaille <akim@epita.fr>
19729
19730 * src/lalr.h (LA): Is a bitsetv, not bitset*.
19731
19732 2002-04-07 Akim Demaille <akim@epita.fr>
19733
19734 * src/lalr.h, src/lalr.c (LAruleno): Replace with...
19735 (LArule): this, which is an array to rule_t*.
19736 * src/print.c, src/conflicts.c: Adjust.
19737
19738 2002-04-07 Akim Demaille <akim@epita.fr>
19739
19740 * src/gram.h (rule_t): Rename `number' as `user_number'.
19741 `number' is a new member.
19742 Adjust dependencies.
19743 * src/reduce.c (reduce_grammar_tables): Renumber rule_t.number.
19744
19745 2002-04-07 Akim Demaille <akim@epita.fr>
19746
19747 As a result of the previous patch, it is no longer needed
19748 to reorder ritem itself.
19749
19750 * src/reduce.c (reduce_grammar_tables): Don't sort RITEM.
19751
19752 2002-04-07 Akim Demaille <akim@epita.fr>
19753
19754 Be sure never to walk through RITEMS, but use only data related to
19755 the rules themselves. RITEMS should be banished.
19756
19757 * src/output.c (output_token_translations): Rename as...
19758 (prepare_tokens): this.
19759 In addition to `translate', prepare the muscles `tname' and
19760 `toknum', which were handled by...
19761 (output_rule_data): this.
19762 Remove, and move the remainder of its outputs into...
19763 (prepare_rules): this new routines, which also merges content from
19764 (output_gram): this.
19765 (prepare_rules): Be sure never to walk through RITEMS.
19766 (output_stos): Rename as...
19767 (prepare_stos): this.
19768 (output): Always invoke prepare_states, after all, just don't use it
19769 in the output if you don't need it.
19770
19771 2002-04-07 Akim Demaille <akim@epita.fr>
19772
19773 * src/LR0.c (new_state): Display `nstates' as the name of the
19774 newly created state.
19775 Adjust to initialize first_state and last_state if needed.
19776 Be sure to distinguish the initial from the final state.
19777 (new_states): Create the itemset of the initial state, and use
19778 new_state.
19779 * src/closure.c (closure): Now that the initial state has its
19780 items properly set, there is no need for a special case when
19781 creating `ruleset'.
19782
19783 As a result, now the rule 0, reducing to $axiom, is visible in the
19784 outputs. Adjust the test suite.
19785
19786 * tests/conflicts.at (Solved SR Conflicts)
19787 (Unresolved SR Conflicts): Adjust.
19788 * tests/regression.at (Web2c Report, Rule Line Numbers): Idem.
19789 * tests/conflicts.at (S/R in initial): New.
19790
19791 2002-04-07 Akim Demaille <akim@epita.fr>
19792
19793 * src/LR0.c (allocate_itemsets): Don't loop over ritem: loop over
19794 the RHS of the rules.
19795 * src/output.c (output_gram): Likewise.
19796
19797 2002-04-07 Akim Demaille <akim@epita.fr>
19798
19799 * src/gram.h (rule_t): `lhs' is now a pointer to the symbol's
19800 bucket.
19801 Adjust all dependencies.
19802 * src/reduce.c (nonterminals_reduce): Don't forget to renumber the
19803 `number' of the buckets too.
19804 * src/gram.h: Include `symtab.h'.
19805 (associativity): Move to...
19806 * src/symtab.h: here.
19807 No longer include `gram.h'.
19808
19809 2002-04-07 Akim Demaille <akim@epita.fr>
19810
19811 * src/gram.h, src/gram.c (rules_rhs_length): New.
19812 (ritem_longest_rhs): Use it.
19813 * src/gram.h (rule_t): `number' is a new member.
19814 * src/reader.c (packgram): Set it.
19815 * src/reduce.c (reduce_grammar_tables): Move the useless rules at
19816 the end of `rules', and count them out of `nrules'.
19817 (reduce_output, dump_grammar): Adjust.
19818 * src/print.c (print_grammar): It is no longer needed to check for
19819 the usefulness of a rule, as useless rules are beyond `nrules + 1'.
19820 * tests/reduce.at (Reduced Automaton): New test.
19821
19822 2002-04-07 Akim Demaille <akim@epita.fr>
19823
19824 * src/reduce.c (inaccessable_symbols): Fix a buglet: because of a
19825 lacking `+ 1' to nrules, Bison reported as useless a token if it
19826 was used solely to set the precedence of the last rule...
19827
19828 2002-04-07 Akim Demaille <akim@epita.fr>
19829
19830 * data/bison.c++, data/bison.simple: Don't output the current file
19831 name in #line, to avoid useless diffs between two identical
19832 outputs under different names.
19833
19834 2002-04-07 Akim Demaille <akim@epita.fr>
19835
19836 * src/closure.c, src/print.c, src/reader.c, src/reduce.c:
19837 Normalize loops to using `< nrules + 1', not `<= nrules'.
19838
19839 2002-04-07 Akim Demaille <akim@epita.fr>
19840
19841 * TODO: Update.
19842
19843 2002-04-07 Akim Demaille <akim@epita.fr>
19844
19845 * src/output.c, src/reader.c, src/symtab.c, src/symtab.h: Rename
19846 bucket.value as bucket.number.
19847
19848 2002-04-07 Akim Demaille <akim@epita.fr>
19849
19850 * src/closure.c, src/derives.c, src/gram.h, src/lalr.c,
19851 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
19852 * src/reader.c, src/reduce.c: Let rule_t.rhs point directly to the
19853 RHS, instead of being an index in RITEMS.
19854
19855 2002-04-04 Paul Eggert <eggert@twinsun.com>
19856
19857 * doc/bison.texinfo: Update copyright date.
19858 (Rpcalc Lexer, Symbols, Token Decl): Don't assume ASCII.
19859 (Symbols): Warn about running Bison in one character set,
19860 but compiling and/or running in an incompatible one.
19861 Warn about character code 256, too.
19862
19863 2002-04-03 Paul Eggert <eggert@twinsun.com>
19864
19865 * src/bison.data (YYSTACK_ALLOC): Depend on whether
19866 YYERROR_VERBOSE is nonzero, not whether it is defined.
19867
19868 Merge changes from bison-1_29-branch.
19869
19870 2002-03-20 Paul Eggert <eggert@twinsun.com>
19871
19872 Merge fixes from Debian bison_1.34-1.diff.
19873
19874 * configure.in (AC_PREREQ): 2.53.
19875
19876 2002-03-20 Akim Demaille <akim@epita.fr>
19877
19878 * src/conflicts.c (log_resolution): Argument `resolution' is const.
19879
19880 2002-03-19 Paul Eggert <eggert@twinsun.com>
19881
19882 * src/bison.simple (YYCOPY): New macro.
19883 (YYSTACK_RELOCATE): Use it.
19884 Remove Type arg; no longer needed. All callers changed.
19885 (yymemcpy): Remove; no longer needed.
19886
19887 * Makefile.am (AUTOMAKE_OPTIONS): 1.6.
19888 * doc/Makefile.am (AUTOMAKE_OPTIONS): Remove.
19889
19890 2002-03-19 Akim Demaille <akim@epita.fr>
19891
19892 Test and fix the #line outputs.
19893
19894 * tests/atlocal.at (GCC): New.
19895 * tests/synclines.at (AT_TEST_SYNCLINE): New macro.
19896 (Prologue synch line, %union synch line, Postprologue synch line)
19897 (Action synch line, Epilogue synch line): New tests.
19898 * src/reader.c (parse_union_decl): Define the muscle stype_line.
19899 * data/bison.simple, data/bison.c++: Use it.
19900
19901 2002-03-19 Akim Demaille <akim@epita.fr>
19902
19903 * tests/regression.at (%nonassoc and eof, Unresolved SR Conflicts)
19904 (Solved SR Conflicts, %expect not enough, %expect right)
19905 (%expect too much): Move to...
19906 * tests/conflicts.at: this new file.
19907
19908 2002-03-19 Akim Demaille <akim@epita.fr>
19909
19910 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
19911 * data/bison.simple, data/bison.c++: Handle the `#define' part, so
19912 that we can move to enums for instance.
19913 * src/output.c (token_definitions_output): Output a list of
19914 `token-name, token-number' instead of the #define.
19915 (output_skeleton): Name this list `b4_tokens', not `b4_tokendefs'.
19916
19917 2002-03-14 Akim Demaille <akim@epita.fr>
19918
19919 Use Gettext 0.11.1.
19920
19921 2002-03-09 Robert Anisko <robert@lrde.epita.fr>
19922
19923 * data/bison.c++: Make the user able to add members to the generated
19924 parser by subclassing.
19925
19926 2002-03-05 Robert Anisko <robert@lrde.epita.fr>
19927
19928 * src/reader.c (read_additionnal_code): `c' should be an integer, not
19929 a character.
19930 Reported by Nicolas Tisserand and Nicolas Burrus.
19931
19932 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
19933
19934 * src/reader.c: Warn about lacking semi-colons, do not complain.
19935
19936 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
19937
19938 * data/bison.c++: Remove a debug line.
19939
19940 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
19941
19942 * data/bison.c++: Unmerge value as yylval and value as yyval. Unmerge
19943 location as yylloc and location as yyloc. Use YYLLOC_DEFAULT, and
19944 provide a default implementation.
19945
19946 2002-03-04 Akim Demaille <akim@epita.fr>
19947
19948 * tests/input.at (Invalid $n, Invalid @n): Add the ending `;'.
19949 * tests/output.at (AT_CHECK_OUTPUT): Likewise.
19950 * tests/headers.at (AT_TEST_CPP_GUARD_H): Ditto.
19951 * tests/semantic.at (Parsing Guards): Similarly.
19952 * src/reader.at (readgram): Complain if the last rule is not ended
19953 with a semi-colon.
19954
19955 2002-03-04 Akim Demaille <akim@epita.fr>
19956
19957 * src/warshall.h, src/warshall.c (bitmatrix_print): Move to...
19958 * src/closure.c: here.
19959 (set_firsts): Use bitsetv_reflexive_transitive_closure instead of
19960 RTC.
19961 * src/warshall.h, src/warshall.c: Remove.
19962 * tests/sets.at (Broken Closure): Adjust.
19963
19964 2002-03-04 Akim Demaille <akim@epita.fr>
19965
19966 * src/output.c (output_skeleton): tempdir is const.
19967 bytes_read is unused.
19968
19969 2002-03-04 Akim Demaille <akim@epita.fr>
19970
19971 * lib/bbitset.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
19972 * lib/bitsetv.h, lib/ebitset.c, lib/lbitset.c, lib/sbitset.c:
19973 Update.
19974 From Michael Hayes.
19975
19976 2002-03-04 Akim Demaille <akim@epita.fr>
19977
19978 * src/closure.c (closure): `r' is unused.
19979
19980 2002-03-04 Akim Demaille <akim@epita.fr>
19981
19982 * tests/sets.at (Broken Closure): Add the ending `;'.
19983 * src/reader.at (readgram): Complain if a rule is not ended with a
19984 semi-colon.
19985
19986 2002-03-04 Akim Demaille <akim@epita.fr>
19987
19988 * src/conflicts.c (set_conflicts): Use bitset_disjoint_p.
19989 (count_sr_conflicts): Use bitset_count.
19990 * src/reduce.c (inaccessable_symbols): Ditto.
19991 (bits_size): Remove.
19992 * src/warshall.h, src/warshall.c: Convert to bitsetv.
19993
19994 2002-03-04 Akim Demaille <akim@epita.fr>
19995
19996 * src/closure.c, src/conflicts.c, src/lalr.c, src/print.c,
19997 * src/reduce.c: Remove the `bitset_zero's following the
19998 `bitset_create's, as now it is performed by the latter.
19999
20000 2002-03-04 Akim Demaille <akim@epita.fr>
20001
20002 * lib/bitset.c, lib/bitset.h, lib/bitsetv.c, lib/bitsetv.h,
20003 * lib/ebitset.c, lib/ebitset.h, lib/lbitset.c, lib/lbitset.h,
20004 * lib/sbitset.c, lib/sbitset.h, lib/bbitset.h: Update from the
20005 latest sources from Michael.
20006
20007 2002-03-04 Akim Demaille <akim@epita.fr>
20008
20009 * src/output.c (output): Don't free the grammar.
20010 * src/reader.c (grammar_free): New.
20011 * src/main.c (main): Call it and don't free symtab here.
20012
20013 2002-03-04 Akim Demaille <akim@epita.fr>
20014
20015 * src/lex.c (parse_percent_token): Be sure to 0-end token_buffer
20016 before returning.
20017 Reported by Benoit Perrot.
20018
20019 2002-03-04 Akim Demaille <akim@epita.fr>
20020
20021 Use bitset operations when possible, not loops over bits.
20022
20023 * src/conflicts.c (set_conflicts, count_sr_conflicts): Use
20024 bitset_or.
20025 * src/print.c (print_reductions): Use bitset_and, bitset_andn.
20026 * src/reduce.c (useless_nonterminals): Formatting changes.
20027 * src/warshall.c (TC): Use bitset_or.
20028
20029 2002-03-04 Akim Demaille <akim@epita.fr>
20030
20031 * src/lalr.h, src/lalr.c (tokensetsize): Remove, unused.
20032 * src/system.h (BITS_PER_WORD, WORDSIZE, SETBIT, RESETBIT, BITISSET):
20033 Ditto.
20034
20035 2002-03-04 Akim Demaille <akim@epita.fr>
20036
20037 * src/lalr.c (F): Now a bitset*.
20038 Adjust all dependencies.
20039
20040 2002-03-04 Akim Demaille <akim@epita.fr>
20041
20042 * src/conflicts.c (shiftset, lookaheadset): Now bitset.
20043 Adjust all dependencies.
20044
20045 2002-03-04 Akim Demaille <akim@epita.fr>
20046
20047 * src/L0.c, src/LR0.h (nstates): Be size_t.
20048 Adjust comparisons (signed vs unsigned).
20049 * src/conflics.c, src/lalr.c, src/lalr.h, src/output.c (LA): Now a
20050 bitset*.
20051 Adjust all dependencies.
20052
20053 2002-03-04 Akim Demaille <akim@epita.fr>
20054
20055 * src/closure.c (firsts): Now, also a bitset.
20056 Adjust all dependencies.
20057 (varsetsize): Remove, now unused.
20058 * src/warshall.h, src/warshall.c: Now work on arrays of bitsets.
20059
20060 2002-03-04 Akim Demaille <akim@epita.fr>
20061
20062 * src/print.c: Convert to use bitset.h, not hand coded iterations
20063 over ints.
20064
20065 2002-03-04 Akim Demaille <akim@epita.fr>
20066
20067 * src/reduce.c: Convert to use bitset.h, not hand coded BSet.
20068
20069 2002-03-04 Akim Demaille <akim@epita.fr>
20070
20071 * src/closure.c (ruleset): Be a bitset.
20072 (rulesetsize): Remove.
20073
20074 2002-03-04 Akim Demaille <akim@epita.fr>
20075
20076 * lib/bitset-int.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
20077 * lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/lbitset.c,
20078 * lib/lbitset.h, lib/sbitset.c, lib/sbitset.h: New.
20079 * src/closure.c (fderives): Be an array of bitsets.
20080
20081 2002-02-28 Robert Anisko <robert@lrde.epita.fr>
20082
20083 * data/bison.c++: Merge the two generated headers. Insert a copyright
20084 notice in each output file.
20085
20086 2002-02-28 Akim Demaille <akim@epita.fr>
20087
20088 * data/bison.c++: Copy the prologue of bison.simple to fetch
20089 useful M4 definitions, such as b4_header_guard.
20090
20091 2002-02-25 Akim Demaille <akim@epita.fr>
20092
20093 * src/getargs.c (version): Give the name of the authors, and use a
20094 translator friendly scheme for the bgr
20095 copyright notice.
20096
20097 2002-02-25 Akim Demaille <akim@epita.fr>
20098
20099 * src/output.c (header_output): Remove, now handled completely via
20100 M4.
20101
20102 2002-02-25 Akim Demaille <akim@epita.fr>
20103
20104 * m4/m4.m4: New, from CVS Autoconf.
20105 * configure.in: Invoke it.
20106 * src/output.c (output_skeleton): Use its result instead of the
20107 hard coded name.
20108
20109 2002-02-25 Akim Demaille <akim@epita.fr>
20110
20111 * lib/tempname.c, lib/mkstemp.c, m4/mkstemp.m4: New, stolen from
20112 Fileutils 4.1.5.
20113 * configure.in: Invoke UTILS_FUNC_MKSTEMP.
20114 * src/output.c (output_skeleton): Use mkstemp to create a real
20115 temporary file.
20116 Move the filling of `skeleton' and its muscle to...
20117 (prepare): here.
20118 (output): Move the definition of the prologue muscle to...
20119 (prepare): here.
20120 * src/system.h (DEFAULT_TMPDIR): New.
20121
20122 2002-02-14 Paul Eggert <eggert@twinsun.com>
20123
20124 Remove the support for C++ namespace cleanliness; it was
20125 causing more problems than it was curing, since it didn't work
20126 properly on some nonstandard C++ compilers. This can wait
20127 for a proper C++ parser.
20128
20129 * NEWS: Document this.
20130 * doc/bison.texinfo (Bison Parser, Debugging): Remove special mention
20131 of C++, as it's treated like C now.
20132 * src/bison.simple (YYSTD): Remove.
20133 (YYSIZE_T, YYFPRINTF, YYPARSE_PARAM_ARG, YYPARSE_PARAM_DECL):
20134 Treat C++ just like Standard C instead of trying to support
20135 namespace cleanliness.
20136
20137 2002-02-14 Akim Demaille <akim@epita.fr>
20138
20139 * tests/regression.at (else): Adjust to Andreas' change.
20140
20141 2002-02-14 Akim Demaille <akim@epita.fr>
20142
20143 * lib/Makefile.am (EXTRA_DIST): Ship strnlen.c.
20144
20145 2002-02-13 Andreas Schwab <schwab@suse.de>
20146
20147 * src/output.c (output_rule_data): Don't output NULL, it might
20148 not be defined yet.
20149
20150 2002-02-11 Robert Anisko <robert@lrde.epita.fr>
20151
20152 * data/bison.c++ (YYDEBUG, YYERROR_VERBOSE): After the prologue.
20153 (Copyright notice): Update.
20154
20155 2002-02-11 Akim Demaille <akim@epita.fr>
20156
20157 * tests/regression.at (%nonassoc and eof): Don't include
20158 nonportable headers.
20159
20160 2002-02-08 Robert Anisko <robert@lrde.epita.fr>
20161
20162 * data/bison.c++: Correct error recovery. Make the user able to
20163 initialize the starting location.
20164
20165 2002-02-07 Akim Demaille <akim@epita.fr>
20166
20167 * tests/input.at: New.
20168
20169 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
20170
20171 * data/bison.c++: Replace some direct m4 expansions by constants. Be
20172 more consistent when naming methods and variables. Put preprocessor
20173 directives around tables only needed for debugging.
20174
20175 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
20176
20177 * data/bison.c++ (yy::b4_name::print_): New method, replaces yyprint in
20178 C++ parsers.
20179 (yy::b4_name::parse): Use print_.
20180
20181 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
20182
20183 * data/bison.c++ (yy::b4_name::parse): Error recovery is back.
20184
20185 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
20186
20187 * data/bison.c++ (yy::b4_name::error_): New method, replaces yyerror in
20188 C++ parsers.
20189 (yy::b4_name::parse): Build verbose error messages, and use error_.
20190
20191 2002-02-06 Robert Anisko <robert@lrde.epita.fr>
20192
20193 * data/bison.c++: Fix m4 quoting in comments.
20194
20195 2002-02-06 Robert Anisko <robert@lrde.epita.fr>
20196
20197 * data/bison.c++: Adjust the parser code. Fix some muscles that were
20198 not expanded by m4.
20199
20200 2002-02-05 Akim Demaille <akim@epita.fr>
20201
20202 * data/bison.c++: Adjust to the M4 back end.
20203 More is certainly needed.
20204
20205 2002-02-05 Akim Demaille <akim@epita.fr>
20206
20207 Give a try to M4 as a back end.
20208
20209 * lib/readpipe.c: New, from wdiff.
20210 * src/Makefile.am (DEFS): Define PKGDATADIR, not BISON_SIMPLE and
20211 BISON_HAIRY.
20212 * src/system.h (BISON_HAIRY, BISON_SIMPLE): Remove the DOS and VMS
20213 specific values. Now it is m4 that performs the lookup.
20214 * src/parse-skel.y: Remove.
20215 * src/muscle_tab.c, src/muscle_tab.h (muscles_m4_output): New.
20216 * src/output.c (actions_output, guards_output)
20217 (token_definitions_output): No longer keeps track of the output
20218 line number, hence remove the second argument.
20219 (guards_output): Check against the guard member of a rule, not the
20220 action member.
20221 Adjust callers.
20222 (output_skeleton): Don't look for the skeleton location, let m4 do
20223 that.
20224 Create `/tmp/muscles.m4'. This is temporary, a proper temporary
20225 file will be used.
20226 Invoke `m4' on m4sugar.m4, muscles.m4, and the skeleton.
20227 (prepare): Given that for the time being changesyntax is not
20228 usable in M4, rename the muscles using `-' to `_'.
20229 Define `defines_flag', `output_parser_name' and `output_header_name'.
20230 * src/output.h (actions_output, guards_output)
20231 (token_definitions_output): Adjust prototypes.
20232 * src/scan-skel.l: Instead of scanning the skeletons, it now
20233 processes the output of m4: `__oline__' and `#output'.
20234 * data/bison.simple: Adjust to be used by M4(sugar).
20235 * tests/Makefile.am: Use check_SCRIPTS to make sure `bison' is up
20236 to date.
20237 * tests/bison.in: Use the secrete envvar `BISON_PKGDATADIR'
20238 instead of the dead `BISON_SIMPLE' and `BISON_HAIRY'.
20239 * data/m4sugar/m4sugar.m4, data/m4sugar/version.m4: New,
20240 shamelessly stolen from CVS Autoconf.
20241
20242 2002-02-05 Akim Demaille <akim@epita.fr>
20243
20244 * lib/hash.c, lib/hash.h: Replace with Fileutils 4.1's version.
20245 * configure.in: Check for the declarations of free and malloc.
20246 * src/muscle_tab.c: Adjust.
20247
20248 2002-02-05 Akim Demaille <akim@epita.fr>
20249
20250 * src/muscle_tab.c (muscle_init): Don't default to NULL muscle
20251 which have no values.
20252
20253 2002-02-05 Akim Demaille <akim@epita.fr>
20254
20255 * src/bison.simple, src/bison.hairy, src/bison.c++: Move to...
20256 * data/: here.
20257
20258 2002-01-29 Paul Eggert <eggert@twinsun.com>
20259
20260 * src/bison.simple (YYSIZE_T): Do not define merely because
20261 YYSTACK_USE_ALLOCA is nonzero or alloca or _ALLOCA_H are defined.
20262 On some platforms, <alloca.h> does not declare YYSTD (size_t).
20263
20264 2002-01-27 Akim Demaille <akim@epita.fr>
20265
20266 Fix `%nonassoc and eof'.
20267
20268 * src/state.c (errs_dup): Aaaah! The failure was due to bytes
20269 which were not properly copied! Replace
20270 memcpy (res->errs, src->errs, src->nerrs);
20271 with
20272 memcpy (res->errs, src->errs, src->nerrs * sizeof (src->errs[0]));
20273 !!!
20274 * tests/regression.at (%nonassoc and eof): Adjust to newest
20275 Autotest: `.' is not in the PATH.
20276
20277 2002-01-27 Akim Demaille <akim@epita.fr>
20278
20279 * tests/sets.at (AT_EXTRACT_SETS): New.
20280 (Nullable): Use it.
20281 (Firsts): New.
20282
20283 2002-01-26 Akim Demaille <akim@epita.fr>
20284
20285 * tests/actions.at, tests/calc.at, tests/headers.at,
20286 * tests/torture.at: Adjust to the newest Autotest which no longer
20287 forces `.' in the PATH.
20288
20289 2002-01-25 Akim Demaille <akim@epita.fr>
20290
20291 * tests/regression.at (%nonassoc and eof): New.
20292 Suggested by Robert Anisko.
20293
20294 2002-01-24 Akim Demaille <akim@epita.fr>
20295
20296 Bison dumps core when trying to complain about broken input files.
20297 Reported by Cris van Pelt.
20298
20299 * src/lex.c (parse_percent_token): Be sure to set token_buffer.
20300 * tests/regression.at (Invalid input: 1, Invalid input: 2): Merge
20301 into...
20302 (Invalid inputs): Strengthen: exercise parse_percent_token.
20303
20304 2002-01-24 Robert Anisko <robert.anisko@epita.fr>
20305
20306 * src/Makefile.am: Add bison.c++.
20307 * src/bison.c++: New skeleton.
20308
20309 2002-01-21 Paolo Bonzini <bonzini@gnu.org>
20310
20311 * po/it.po: New.
20312
20313 2002-01-21 Kees Zeelenberg <kzlg@users.sourceforge.net>
20314
20315 * src/files.c (skeleton_find) [MSDOS]: Fix cp definition.
20316
20317 2002-01-20 Marc Autret <marc@gnu.org>
20318
20319 * src/files.c (compute_output_file_names): Fix
20320
20321 2002-01-20 Marc Autret <marc@gnu.org>
20322
20323 * tests/output.at: New test.
20324 * src/files.c (compute_base_names): Don't map extensions when
20325 the YACC flag is set, use defaults.
20326 Reported by Evgeny Stambulchik.
20327
20328 2002-01-20 Marc Autret <marc@gnu.org>
20329
20330 * src/system.h: Need to define __attribute__ away for non-GCC
20331 compilers as well (i.e., the vendor C compiler).
20332 Suggested by Albert Chin-A-Young.
20333
20334 2002-01-11 Tim Van Holder <tim.van.holder@pandora.be>
20335
20336 * lib/hash.h, lib/hash.c: Renamed __P to PARAMS and used the
20337 canonical definition.
20338 * src/system.h: Use the canonical definition for PARAMS (avoids
20339 a conflict with the macro from lib/hash.h).
20340
20341 2002-01-11 Akim Demaille <akim@epita.fr>
20342
20343 * configure.in: Use AC_FUNC_STRNLEN.
20344 Fixes the failures observed on AIX 4.3 by H.Merijn Brand.
20345
20346 2002-01-09 Akim Demaille <akim@epita.fr>
20347
20348 * src/files.c, src/files.h (output_infix): New.
20349 (tab_extension): Remove.
20350 (compute_base_names): Compute the former, drop the latter.
20351 * src/output.c (prepare): Insert the muscles `output-infix', and
20352 `output-suffix'.
20353 * src/parse-skel.y (string, string.1): New.
20354 (section.header): Use it.
20355 (section.yacc): Remove.
20356 (prefix): Remove too.
20357 * src/scan-skel.l: Adjust.
20358 * src/bison.simple, src/bison.hairy: Adjust.
20359
20360 2002-01-09 Akim Demaille <akim@epita.fr>
20361
20362 * configure.in (WERROR_CFLAGS): Compute it.
20363 * src/Makefile.am (CFLAGS): Pass it.
20364 * tests/atlocal.in (CFLAGS): Idem.
20365 * src/files.c: Fix a few warnings.
20366 (get_extension_index): Remove, unused.
20367
20368 2002-01-08 Akim Demaille <akim@epita.fr>
20369
20370 * src/getargs.c (AS_FILE_NAME): New.
20371 (getargs): Use it to convert DOSish file names.
20372 * src/files.c (base_name): Rename as full_base_name to avoid
20373 clashes with `base_name ()'.
20374 (filename_split): New.
20375 (compute_base_names): N-th rewrite, using filename_split.
20376
20377 2002-01-08 Akim Demaille <akim@epita.fr>
20378
20379 * lib/basename.c, lib/dirname.h, lib/dirname.c, lib/memrchr.c:
20380 New, stolen from the Fileutils 4.1.
20381 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
20382 * configure.in: Check for the presence of memrchr, and of its
20383 prototype.
20384
20385 2002-01-07 Tim Van Holder <tim.van.holder@pandora.be>
20386
20387 * lib/hash.h (__P): Added definition for this macro.
20388 * src/Makefile.am: Add parse-skel.c and scan-skel.c to
20389 BUILT_SOURCES, to ensure they are generated first.
20390 * src/parse-skel.y: Use YYERROR_VERBOSE instead of
20391 %error-verbose to allow bootstrapping with bison 1.30x.
20392
20393 2002-01-06 Akim Demaille <akim@epita.fr>
20394
20395 * src/reader.c (parse_braces): Don't fetch the next char, the
20396 convention is to fetch on entry.
20397 * tests/torture.at (GNU Cim Grammar): Reintroduce their weird
20398 'switch' without a following semicolon.
20399 * tests/regression.at (braces parsing): New.
20400
20401 2002-01-06 Akim Demaille <akim@epita.fr>
20402
20403 Bison is dead wrong in its RR conflict reports.
20404
20405 * tests/torture.at (GNU Cim Grammar): New.
20406 * src/conflicts.c (count_rr_conflicts): Fix.
20407
20408 2002-01-06 Akim Demaille <akim@epita.fr>
20409
20410 Creating package.m4 from configure.ac causes too many problems.
20411
20412 * tests/Makefile.am (package.m4): Create it by hand,
20413 AC_CONFIG_TESTDIR no longer does in the most recent CVS Autoconf.
20414
20415 2002-01-06 Akim Demaille <akim@epita.fr>
20416
20417 * src/Makefile.am (bison_SOURCES): Add parse-skel.h and
20418 skeleton.h.
20419
20420 2002-01-04 Paul Eggert <eggert@twinsun.com>
20421
20422 * doc/bison.texinfo (Debugging):
20423 Remove YYSTDERR; it's no longer defined or used.
20424 Also, s/cstdio.h/cstdio/.
20425
20426 2002-01-03 Akim Demaille <akim@epita.fr>
20427
20428 * tests/bison.in, tests/atlocal.in: Adjust to CVS Autoconf.
20429
20430 2002-01-03 Akim Demaille <akim@epita.fr>
20431
20432 * src/parse-skel.y (process_skeleton): Don't bind the parser's
20433 tracing code to --trace, wait for a better --trace option, with
20434 args.
20435
20436 2002-01-03 Akim Demaille <akim@epita.fr>
20437
20438 * src/bison.simple (YYSTDERR): Remove, replace `stderr'.
20439 The ISO C++ standard is extremely clear about it: stderr is
20440 considered a macro, not a regular symbol (see table 94 `Header
20441 <cstdio> synopsis', [lib.c.files] 27.8.2 C Library files).
20442 Therefore std:: does not apply to it. It still does with fprintf.
20443 Also, s/cstdio.h/cstdio/.
20444
20445 2002-01-03 Akim Demaille <akim@epita.fr>
20446
20447 * lib/quotearg.c: Use `#include "..."' instead of `#include <...>'
20448 for non system headers.
20449
20450 2002-01-02 Akim Demaille <akim@epita.fr>
20451
20452 Equip the skeleton chain with location tracking, runtime trace,
20453 pure parser and scanner.
20454
20455 * src/parse-skel.y: Request a pure parser, locations, and prefix
20456 renaming.
20457 (%union): Having several members with the same type does not help
20458 type mismatches, simplify.
20459 (YYPRINT, yyprint): New.
20460 (yyerror): ``Rename'' (there is a #define yyerror skel_error) as...
20461 (skel_error): this.
20462 Handle locations.
20463 * src/scan-skel.l: Adjust to these changes.
20464 * src/skeleton.h (LOCATION_RESET, LOCATION_LINES, LOCATION_STEP)
20465 (LOCATION_PRINT, skel_control_t): New.
20466
20467 2001-12-30 Akim Demaille <akim@epita.fr>
20468
20469 * src/parse-skel.y: Get rid of the shift/reduce conflict:
20470 replace `gb' with BLANKS.
20471 * src/scan-skel.l: Adjust.
20472
20473 2001-12-30 Akim Demaille <akim@epita.fr>
20474
20475 * src/system.h: We don't need nor want bcopy.
20476 Throw away MS-DOS crap: we don't need getpid.
20477 * configure.in: We don't need strndup. It was even causing
20478 problems: because Flex includes the headers *before* us,
20479 _GNU_SOURCE is not defined by config.h, and therefore strndup was
20480 not visible.
20481 * lib/xstrndup.c: New.
20482 * src/scan-skel.l: Use it.
20483 Be sure to initialize yylval.muscle member when scanning a MUSCLE.
20484 * src/parse-skel.y: Use %directives instead of #defines.
20485
20486 2001-12-30 Akim Demaille <akim@epita.fr>
20487
20488 * src/skeleton.h: New.
20489 * src/output.c (output_parser, output_master_parser): Remove, dead
20490 code.
20491 * src/output.h (get_lines_number, actions_output, guards_output)
20492 (token_definitions_output): Prototype them.
20493 * src/parse-skel.y: Add the license notice.
20494 Include output.h and skeleton.h.
20495 (process_skeleton): Returns void, and takes a single parameter.
20496 * src/scan-skel.l: Add the license notice.
20497 Include skeleton.h.
20498 Don't use %option yylineno: it seems that then Flex imagines
20499 REJECT has been used, and therefore it won't reallocate its
20500 buffers (which makes no other sense to me than a bug). It results
20501 in warnings for `unused: yy_flex_realloc'.
20502
20503 2001-12-30 Robert Anisko <robert.anisko@epita.fr>
20504
20505 * src/muscle_tab.h (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
20506 (MUSCLE_INSERT_PREFIX): ...to there.
20507 * src/output.c (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
20508 (MUSCLE_INSERT_PREFIX): Move from here...
20509
20510 * src/bison.hairy: Add a section directive. Put braces around muscle
20511 names. This parser skeleton is still broken, but Bison should not
20512 choke on a bad muscle 'syntax'.
20513 * src/bison.simple: Add a section directive. Put braces around muscle
20514 names.
20515
20516 * src/files.h (strsuffix, stringappend): Add declarations.
20517 (tab_extension): Add declaration.
20518 (short_base_name): Add declaration.
20519
20520 * src/files.c (strsuffix, stringappend): No longer static. These
20521 functions are used in the skeleton parser.
20522 (tab_extension): New.
20523 (compute_base_names): Use the computations done in this function
20524 to guess if the generated parsers should have '.tab' in their
20525 names.
20526 (short_base_name): No longer static.
20527
20528 * src/output.c (output_skeleton): New.
20529 (output): Disable call to output_master_parser, and give a try to
20530 a new skeleton handling system.
20531 (guards_output, actions_output): No longer static.
20532 (token_definitions_output, get_lines_number): No longer static.
20533
20534 * configure.in: Use AM_PROG_LEX and AC_PROG_YACC.
20535
20536 * src/Makefile.am (bison_SOURCES): Add scan-skel.l and
20537 parse-skel.y.
20538
20539 * src/parse-skel.y: New file.
20540 * src/scan-skel.l: New file.
20541
20542 2001-12-29 Akim Demaille <akim@epita.fr>
20543
20544 %name-prefix is broken.
20545
20546 * src/files.c (spec_name_prefix): Initialize to NULL, not to "yy".
20547 Adjust all dependencies.
20548 * tests/headers.at (export YYLTYPE): Strengthen this test: use
20549 %name-prefix.
20550
20551 Renaming yylval but not yylloc is not consistent. Now we do.
20552
20553 * src/bison.simple: Prefix yylloc if used.
20554 * doc/bison.texinfo (Decl Summary): Document that.
20555
20556 2001-12-29 Akim Demaille <akim@epita.fr>
20557
20558 * doc/bison.texinfo: Promote `%long-directive' over
20559 `%long_directive'.
20560 Remove all references to fixed-output-files, yacc is enough.
20561
20562 2001-12-29 Akim Demaille <akim@epita.fr>
20563
20564 * src/bison.simple: Define YYDEBUG and YYERROR_VERBOSE *after* the
20565 user prologue. These are defaults.
20566 * tests/actions.at (Mid-rule actions): Make sure the user can
20567 define YYDEBUG and YYERROR_VERBOSE.
20568
20569 2001-12-29 Akim Demaille <akim@epita.fr>
20570
20571 * src/output.c (header_output): Don't forget to export YYLTYPE and
20572 yylloc.
20573 * tests/headers.at (export YYLTYPE): New, make sure it does.
20574 * tests/regression.at (%union and --defines, Invalid CPP headers):
20575 Move to...
20576 * tests/headers.at: here.
20577
20578 2001-12-29 Akim Demaille <akim@epita.fr>
20579
20580 * src/gram.h (rule_s): Member `assoc' is of type `associativity'.
20581
20582 2001-12-29 Akim Demaille <akim@epita.fr>
20583
20584 * tests/actions.at (Mid-rule actions): Output on a single line
20585 instead of several.
20586
20587 2001-12-29 Akim Demaille <akim@epita.fr>
20588
20589 * doc/bison.texinfo: Formatting changes.
20590
20591 2001-12-29 Akim Demaille <akim@epita.fr>
20592
20593 Don't store the token defs in a muscle, just be ready to output it
20594 on command. Now possible via `symbols'. Fixes a memory leak.
20595
20596 * src/output.c (token_definitions_output): New.
20597 (output_parser, header_output): Use it.
20598 * src/reader.c (symbols_save): Remove.
20599
20600 2001-12-29 Akim Demaille <akim@epita.fr>
20601
20602 * src/bison.simple: Do not provide a default for YYSTYPE and
20603 YYLTYPE before the user's prologue. Otherwise it's hardly... a
20604 default.
20605
20606 2001-12-29 Akim Demaille <akim@epita.fr>
20607
20608 Mid-rule actions are simply... ignored!
20609
20610 * src/reader.c (readgram): Be sure to attach mid-rule actions to
20611 the empty-rule associated to the dummy symbol, not to the host
20612 rule.
20613 * tests/actions.at (Mid-rule actions): New.
20614
20615 2001-12-29 Akim Demaille <akim@epita.fr>
20616
20617 Memory leak.
20618
20619 * src/reader.c (reader): Free grammar.
20620
20621 2001-12-29 Akim Demaille <akim@epita.fr>
20622
20623 Memory leak.
20624
20625 * src/LR0.c (new_itemsets): Don't allocate `shift_symbol' here,
20626 since it allocates it for each state, although only one is needed.
20627 (allocate_storage): Do it here.
20628
20629 2001-12-29 Akim Demaille <akim@epita.fr>
20630
20631 * src/options.h, src/options.c (create_long_option_table): Rename
20632 as...
20633 (long_option_table_new): this, with a clearer prototype.
20634 (percent_table): Remove, unused,
20635 * src/getargs.c (getargs): Adjust.
20636
20637 2001-12-29 Akim Demaille <akim@epita.fr>
20638
20639 * src/LR0.c, src/conflicts.c, src/lalr.c, src/lalr.h, src/output.c
20640 * src/print.c, src/print_graph.c, src/state.h: Rename state_table
20641 as states.
20642
20643 2001-12-29 Akim Demaille <akim@epita.fr>
20644
20645 * src/lalr.c (build_relations): Rename `states' as `states1'.
20646 Sorry, I don't understand exactly what it is, no better name...
20647
20648 2001-12-29 Akim Demaille <akim@epita.fr>
20649
20650 * src/closure.c, src/conflicts.c, src/derives.c, src/gram.c
20651 * src/gram.h, src/lalr.c, src/nullable.c, src/output.c, src/print.c
20652 * src/print_graph.c, src/reader.c, src/reduce.c: Rename rule_table
20653 as rules.
20654
20655 2001-12-29 Akim Demaille <akim@epita.fr>
20656
20657 * src/gram.c (rprec, rprecsym, rassoc): Remove, unused since long
20658 ago.
20659
20660 2001-12-29 Akim Demaille <akim@epita.fr>
20661
20662 * src/reader.c, src/reader.h (user_toknums): Remove.
20663 Adjust all users to use symbols[i]->user_token_number.
20664
20665 2001-12-29 Akim Demaille <akim@epita.fr>
20666
20667 * src/gram.c, src/gram.h (sprec, sassoc): Remove.
20668 Adjust all users to use symbols[i]->prec or ->assoc.
20669
20670 2001-12-29 Akim Demaille <akim@epita.fr>
20671
20672 * src/reader.c, src/reader.h (tags): Remove.
20673 Adjust all users to use symbols[i]->tag.
20674
20675 2001-12-29 Akim Demaille <akim@epita.fr>
20676
20677 * src/gram.h, src/gram.c (symbols): New, similar to state_table
20678 and rule_table.
20679 * src/reader.c (packsymbols): Fill this table.
20680 Drop sprec.
20681 * src/conflicts.c (resolve_sr_conflict): Adjust.
20682 * src/reduce.c (reduce_grammar): Adjust: just sort symbols, a
20683 single table.
20684 Use symbols[i]->tag instead of tags[i].
20685
20686 2001-12-29 Akim Demaille <akim@epita.fr>
20687
20688 * tests/calc.at (_AT_DATA_CALC_Y): Also use %union.
20689 In addition, put a comment in there, to replace...
20690 * tests/regression.at (%union and C comments): Remove.
20691
20692 2001-12-29 Akim Demaille <akim@epita.fr>
20693
20694 * tests/regression.at (Web2c Actions): Blindly move the actual
20695 output as expected output. The contents *seem* right to me, but I
20696 can't pretend reading perfectly parser tables... Nonetheless, all
20697 the other tests pass correctly, the table look OK, even though the
20698 presence of `$axiom' is to be noted: AFAICS it is useless (but
20699 harmless).
20700
20701 2001-12-29 Akim Demaille <akim@epita.fr>
20702
20703 * src/reader.c (readgram): Don't add the rule 0 if there were no
20704 rules read. In other words, add it _after_ having performed
20705 grammar sanity checks.
20706 Fixes the `tests/regression.at (Invalid input: 1)' Failure.
20707
20708 2001-12-29 Akim Demaille <akim@epita.fr>
20709
20710 * tests/regression.at (Web2c Report): Catch up: the rule 0 is now
20711 visible, and some states have now a different number.
20712
20713 2001-12-29 Akim Demaille <akim@epita.fr>
20714
20715 * src/reader.c (readgram): Bind the initial rule's lineno to that
20716 of the first rule.
20717 * tests/regression.at (Rule Line Numbers, Unresolved SR Conflicts):
20718 (Solved SR Conflicts): Adjust rule 0's line number.
20719
20720 2001-12-29 Akim Demaille <akim@epita.fr>
20721
20722 Fix the `GAWK Grammar' failure.
20723
20724 * src/LR0.c (final_state): Initialize to -1 so that we do compute
20725 the reductions of the first state which was mistakenly confused
20726 with the final state because precisely final_state was initialized
20727 to 0.
20728 * tests/sets.at (Nullable): Adjust: state 0 does have lookaheads,
20729 now noticed by Bison.
20730 * tests/regression.at (Rule Line Numbers): Adjust: state 0 does
20731 have a reduction on $default.
20732
20733 2001-12-29 Akim Demaille <akim@epita.fr>
20734
20735 * src/gram.c (ritem_print): Be sure to subtract 1 when displaying
20736 rule line numbers.
20737 * src/closure.c (print_closure): Likewise.
20738 * src/derives.c (print_derives): Likewise.
20739 * tests/sets.at (Nullable): Adjust: the rule numbers are correct
20740 now.
20741
20742 2001-12-29 Akim Demaille <akim@epita.fr>
20743
20744 * src/lalr.c (lookaheads_print): New.
20745 (lalr): Call it when --trace-flag.
20746 * tests/sets.at (Nullable): Adjust: when tracing, the lookaheads
20747 are dumped.
20748
20749 2001-12-29 Akim Demaille <akim@epita.fr>
20750
20751 * src/derives.c (print_derives): Be sure to use `>= 0', not `> 0',
20752 when walking through ritem, even via rule->rhs.
20753 * src/reduce.c (dump_grammar, useful_production, reduce_output)
20754 (useful_production, useless_nonterminals): Likewise.
20755 (reduce_grammar_tables): Likewise, plus update nritems.
20756 * src/nullable.c (set_nullable): Likewise.
20757 * src/lalr.c (build_relations): Likewise.
20758 * tests/sets.at (Nullable): Adjust.
20759 Fortunately, now, the $axiom is no longer nullable.
20760
20761 2001-12-29 Akim Demaille <akim@epita.fr>
20762
20763 * src/LR0.c (generate_states): Use nritems, not nitems, nor using
20764 the 0-sentinel.
20765 * src/gram.c (ritem_longest_rhs): Likewise.
20766 * src/reduce.c (nonterminals_reduce): Likewise.
20767 * src/print_graph.c (print_graph): Likewise.
20768 * src/output.c (output_rule_data): Likewise.
20769 * src/nullable.c (set_nullable): Likewise.
20770
20771 2001-12-29 Akim Demaille <akim@epita.fr>
20772
20773 * src/output.c: Comment changes.
20774
20775 2001-12-27 Paul Eggert <eggert@twinsun.com>
20776
20777 * src/bison.simple (YYSTACK_ALLOC, YYSIZE_T): Remove special
20778 cases for non-GNU systems like AIX, HP-UX, SGI, Sun, and
20779 Sparc, as they were causing more porting problems than the
20780 (minor) performance improvement was worth.
20781
20782 Also, catch up with 1.31's YYSTD.
20783
20784 2001-12-27 Akim Demaille <akim@epita.fr>
20785
20786 * src/output.c (output_gram): Rely on nritems, not the
20787 0-sentinel. See below.
20788 Use -1 as separator, not 0.
20789 * src/bison.simple (yyparse): Subtract 1 to the rule numbers.
20790 Rely on -1 as separator in yyrhs, instead of 0.
20791 * tests/calc.at (AT_CHECK_CALC): Now, the parsers no longer issue
20792 twice `Now at end of input', therefore there are two lines less to
20793 expect.
20794
20795 2001-12-27 Akim Demaille <akim@epita.fr>
20796
20797 * tests/regression.at (Unresolved SR Conflicts):
20798 (Solved SR Conflicts, Rule Line Numbers): Adjust to the changes
20799 below.
20800
20801 2001-12-27 Akim Demaille <akim@epita.fr>
20802
20803 * src/LR0.c (new_state): Recognize the final state by the fact it
20804 is reached by eoftoken.
20805 (insert_start_shifting_state, insert_eof_shifting_state)
20806 (insert_accepting_state, augment_automaton): Remove, since now
20807 these states are automatically computed from the initial state.
20808 (generate_states): Adjust.
20809 * src/print.c: When reporting a rule number to the user, substract
20810 1, so that the axiom rule is rule 0, and the first user rule is 1.
20811 * src/reduce.c: Likewise.
20812 * src/print_graph.c (print_core): For the time being, just as for
20813 the report, depend upon --trace-flags to dump the full set of
20814 items.
20815 * src/reader.c (readgram): Once the grammar read, insert the rule
20816 0: `$axiom: START-SYMBOL $'.
20817 * tests/set.at: Adjust: rule 0 is now displayed, and since the
20818 number of the states has changed (the final state is no longer
20819 necessarily the last), catch up.
20820
20821 2001-12-27 Akim Demaille <akim@epita.fr>
20822
20823 Try to make the use of the eoftoken valid. Given that its value
20824 is 0 which was also used as a sentinel in ritem, (i) make sure >= 0
20825 is used instead of > 0 where appropriate, (ii), depend upon nritems
20826 instead of the 0-sentinel.
20827
20828 * src/gram.h, src/gram.c (nritems): New.
20829 Expected to be duplication of nitems, but for the time being...
20830 * src/reader.c (packgram): Assert nritems and nitems are equal.
20831 * src/LR0.c (allocate_itemsets, new_itemsets): Adjust.
20832 * src/closure.c (print_closure, print_fderives): Likewise.
20833 * src/gram.c (ritem_print): Likewise.
20834 * src/print.c (print_core, print_grammar): Likewise.
20835 * src/print_graph.c: Likewise.
20836
20837 2001-12-27 Akim Demaille <akim@epita.fr>
20838
20839 * src/main.c (main): If there are complains after grammar
20840 reductions, then output the report anyway if requested, then die.
20841 * src/symtab.c (bucket_new): Initialize `value' to -1, not 0.
20842 * src/reader.c (eoftoken): New.
20843 (parse_token_decl): If the token being defined has value `0', it
20844 is the eoftoken.
20845 (packsymbols): No longer hack `tags' to insert `$' by hand.
20846 Be sure to preserve the value of the eoftoken.
20847 (reader): Make sure eoftoken is defined.
20848 Initialize nsyms to 0: now eoftoken is created just like the others.
20849 * src/print.c (print_grammar): Don't special case the eof token.
20850 * src/regression.at: Adjust: `$' has value 0, not -1, which was a
20851 lie anyway, albeit pleasant.
20852 * tests/calc.at: Exercise error messages with eoftoken.
20853 Change the grammar so that empty input is invalid.
20854 Adjust expectations.
20855 When yyungeting, be sure to use a valid yylloc: use last_yylloc.
20856
20857 2001-12-27 Akim Demaille <akim@epita.fr>
20858
20859 * configure.in: Check the protos of strchr ans strspn.
20860 Replace strchr if needed.
20861 * src/system.h: Provide the protos of strchr, strspn and memchr if
20862 missing.
20863 * lib/strchr.c: New.
20864 * src/reader.c (symbols_save): Use strchr.
20865
20866 2001-12-27 Akim Demaille <akim@epita.fr>
20867
20868 * src/print.c, src/print_graph.c (escape): New.
20869 Use it to quote the TAGS outputs.
20870 * src/print_graph.c (print_state): Now errors are in red, and
20871 reductions in green.
20872 Prefer high to wide: output the state number on a line of its own.
20873
20874 2001-12-27 Akim Demaille <akim@epita.fr>
20875
20876 * src/state.h, src/state.c (reductions_new): New.
20877 * src/LR0.c (set_state_table): Let all the states have a
20878 `reductions', even if reduced to 0.
20879 (save_reductions): Adjust.
20880 * src/lalr.c (initialize_LA, initialize_lookaheads): Adjust.
20881 * src/print.c (print_reductions, print_actions): Adjust.
20882 * src/output.c (action_row): Adjust.
20883
20884 2001-12-27 Akim Demaille <akim@epita.fr>
20885
20886 * src/state.h, src/state.c (errs_new, errs_dup): New.
20887 * src/LR0.c (set_state_table): Let all the states have an errs,
20888 even if reduced to 0.
20889 * src/print.c (print_errs, print_reductions): Adjust.
20890 * src/output.c (output_actions, action_row): Adjust.
20891 * src/conflicts.c (resolve_sr_conflict): Adjust.
20892
20893 2001-12-27 Akim Demaille <akim@epita.fr>
20894
20895 * src/lalr.c (set_goto_map, initialize_F): Use SHIFT_SYMBOL.
20896
20897 2001-12-27 Akim Demaille <akim@epita.fr>
20898
20899 * src/conflicts.c, src/conflicts.h (print_reductions): Move to...
20900 * src/print.c: here.
20901 (lookaheadset, shiftset): New, used as additional storage by
20902 print_reductions.
20903 (print_results): Adjust.
20904 (print_shifts, print_gotos, print_errs): New, extracted from...
20905 (print_actions): here.
20906 * src/print_graph.c (print_actions): Remove dead code.
20907
20908 2001-12-27 Akim Demaille <akim@epita.fr>
20909
20910 * src/reader.c (copy_dollar, copy_at): Better checking of `n' in
20911 `$n' and `@n'.
20912
20913 2001-12-27 Akim Demaille <akim@epita.fr>
20914
20915 * src/lalr.c (add_lookback_edge): Use state_t instead of ints.
20916 (build_relations): Adjust.
20917
20918 2001-12-27 Akim Demaille <akim@epita.fr>
20919
20920 * src/lalr.c (set_goto_map): Remove a wrong but benign loop
20921 duplication.
20922
20923 2001-12-27 Akim Demaille <akim@epita.fr>
20924
20925 * src/reader.c (packgram): Catch nitems overflows.
20926
20927 2001-12-27 Akim Demaille <akim@epita.fr>
20928
20929 * src/files.c, src/files.h (guard_obstack): Remove.
20930 * src/output.c (output): Adjust.
20931 * src/reader.c (parse_braces): New, factoring...
20932 (copy_action, copy_guard): these two which are renamed as...
20933 (parse_action, parse_guard): these.
20934 As a voluntary consequence, using braces around guards is now
20935 mandatory.
20936
20937 2001-12-27 Akim Demaille <akim@epita.fr>
20938
20939 * src/gram.h (rule_t): `guard' and `guard_line' are new members.
20940 * src/reader.c (symbol_list): `guard' and `guard_line' are new
20941 members.
20942 (symbol_list_new): Adjust.
20943 (copy_action): action_line is the first line, not the last.
20944 (copy_guard): Just as for actions, store the `action' only, not
20945 the switch/case/break flesh.
20946 Don't parse the user action that might follow the guard, let...
20947 (readgram): do it, i.e., now, there can be an action after a
20948 guard.
20949 In other words the guard is just explicitly optional.
20950 (packgram): Adjust.
20951 * src/output.c (guards_output): New.
20952 (output_parser): Call it when needed.
20953 (output): Also free the guard and attrs obstacks.
20954 * src/files.c, src/files.h (obstack_save): Remove.
20955 (output_files): Remove.
20956 As a result, if one needs the former `.act' file, using an
20957 appropriate skeleton which requires actions and guards is now
20958 required.
20959 * src/main.c (main): Adjust.
20960 * tests/semantic.at: New.
20961 * tests/regression.at: Use `input.y' as input file name.
20962 Avoid 8+3 problems by requiring input.c when the test needs the
20963 parser.
20964
20965 2001-12-27 Akim Demaille <akim@epita.fr>
20966
20967 * src/reader.c (symbol_list_new): Be sure to initialize all the
20968 fields.
20969
20970 2001-12-27 Akim Demaille <akim@epita.fr>
20971
20972 All the hacks using a final pseudo state are now useless.
20973
20974 * src/LR0.c (set_state_table): state_table holds exactly nstates.
20975 * src/lalr.c (nLA): New.
20976 (initialize_LA, compute_lookaheads, initialize_lookaheads): Use it
20977 instead of lookaheadsp from the pseudo state (nstate + 1).
20978
20979 2001-12-27 Akim Demaille <akim@epita.fr>
20980
20981 * src/output.c (action_row, token_actions): Use a state_t instead
20982 of a integer, and nlookaheads instead of the following state's
20983 lookaheadsp.
20984
20985 2001-12-27 Akim Demaille <akim@epita.fr>
20986
20987 * src/conflicts.c (log_resolution, flush_shift)
20988 (resolve_sr_conflict, set_conflicts, solve_conflicts)
20989 (count_sr_conflicts, count_rr_conflicts, conflicts_output)
20990 (conflicts_print, print_reductions): Use a state_t instead of an
20991 integer when referring to a state.
20992 As much as possible, depend upon nlookaheads, instead of the
20993 `lookaheadsp' member of the following state (since lookaheads of
20994 successive states are successive, the difference between state n + 1
20995 and n served as the number of lookaheads for state n).
20996 * src/lalr.c (add_lookback_edge): Likewise.
20997 * src/print.c (print_core, print_actions, print_state)
20998 (print_results): Likewise.
20999 * src/print_graph.c (print_core, print_actions, print_state)
21000 (print_graph): Likewise.
21001 * src/conflicts.h: Adjust.
21002
21003 2001-12-27 Akim Demaille <akim@epita.fr>
21004
21005 * src/bison.hairy: Formatting/comment changes.
21006 ANSIfy.
21007 Remove `register' indications.
21008 Add plenty of `static'.
21009
21010 2001-12-27 Akim Demaille <akim@epita.fr>
21011
21012 * src/output.c (prepare): Drop the muscle `ntbase' which
21013 duplicates ntokens.
21014 * src/bison.simple: Formatting/comment changes.
21015 Use YYNTOKENS only, which is documented, but not YYNTBASE, which
21016 is an undocumented synonym.
21017
21018 2001-12-22 Akim Demaille <akim@epita.fr>
21019
21020 * src/output.c (output_table_data): Change the prototype to use
21021 `int' for array ranges: some invocations do pass an int, not a
21022 short.
21023 Reported by Wayne Green.
21024
21025 2001-12-22 Akim Demaille <akim@epita.fr>
21026
21027 Some actions of web2c.y are improperly triggered.
21028 Reported by Mike Castle.
21029
21030 * src/lalr.c (traverse): s/F (i)[k] = F (j)[k]/F (j)[k] = F (i)[k]/.
21031 * tests/regression.at (Web2c): Rename as...
21032 (Web2c Report): this.
21033 (Web2c Actions): New.
21034
21035 2001-12-22 Akim Demaille <akim@epita.fr>
21036
21037 Reductions in web2c.y are improperly reported.
21038 Reported by Mike Castle.
21039
21040 * src/conflicts.c (print_reductions): Fix.
21041 * tests/regression.at (Web2c): New.
21042
21043 2001-12-18 Akim Demaille <akim@epita.fr>
21044
21045 Some host fail on `assert (!"foo")', which expands to
21046 ((!"foo") ? (void)0 : __assert("!"foo."", __FILE__, __LINE__))
21047 Reported by Nelson Beebee.
21048
21049 * src/output.c, src/vcg.c: Replace `assert (!"it succeeded")' with
21050 `#define it_succeeded 0' and `assert (it_succeeded)'.
21051
21052 2001-12-17 Marc Autret <autret_m@epita.fr>
21053
21054 * src/bison.simple: Don't hard code the skeleton line and filename.
21055 * src/output.c (output_parser): Rename 'line' as 'output_line'.
21056 New line counter 'skeleton_line' (skeleton-line muscle).
21057
21058 2001-12-17 Paul Eggert <eggert@twinsun.com>
21059
21060 * NEWS, doc/bison.texinfo, doc/bison.1, doc/bison.rnh: Document that
21061 YYDEBUG must be defined to a nonzero value.
21062
21063 * src/bison.simple (yytname): Do not assume that the user defines
21064 YYDEBUG to a properly parenthesized expression.
21065
21066 2001-12-17 Akim Demaille <akim@epita.fr>
21067
21068 * src/state.h (state_t): Rename lookaheads as lookaheadsp.
21069 nlookaheads is a new member.
21070 Adjust all users.
21071 * src/lalr.h (nlookaheads): Remove this orphan declaration.
21072 * src/lalr.c (initialize_lookaheads): Set nlookaheads for each
21073 state.
21074
21075 2001-12-17 Akim Demaille <akim@epita.fr>
21076
21077 * src/files.h, src/files.c (open_files, close_files): Remove.
21078 * src/main.c (main): Don't open/close files, nor invoke lex_free,
21079 let...
21080 * src/reader.c (reader): Do it.
21081
21082 2001-12-17 Akim Demaille <akim@epita.fr>
21083
21084 * src/conflicts.c (print_reductions): Formatting changes.
21085
21086 2001-12-17 Akim Demaille <akim@epita.fr>
21087
21088 * src/conflicts.c (flush_shift): Also adjust lookaheadset.
21089 (flush_reduce): New.
21090 (resolve_sr_conflict): Adjust.
21091
21092 2001-12-17 Akim Demaille <akim@epita.fr>
21093
21094 * src/output.c (output_obstack): Be static and rename as...
21095 (format_obstack): this, to avoid any confusion with files.c's
21096 output_obstack.
21097 * src/reader.h (muscle_obstack): Move to...
21098 * src/output.h: here, since it's defined in output.c.
21099
21100 2001-12-17 Akim Demaille <akim@epita.fr>
21101
21102 * src/output.c (action_row, save_column, default_goto)
21103 (sort_actions, matching_state, pack_vector): Better variable
21104 locality.
21105
21106 2001-12-17 Akim Demaille <akim@epita.fr>
21107
21108 * src/output.c: Various formatting changes.
21109
21110 2001-12-17 Akim Demaille <akim@epita.fr>
21111
21112 * src/files.c (output_files): Free the output_obstack.
21113 * src/main.c (main): Call print and print_graph conditionally.
21114 * src/print.c (print): Work unconditionally.
21115 * src/print_graph.c (print_graph): Work unconditionally.
21116 * src/conflicts.c (log_resolution): Output only if verbose_flag.
21117
21118 2001-12-16 Marc Autret <autret_m@epita.fr>
21119
21120 * src/output.c (actions_output): Fix. When we use %no-lines,
21121 there is one less line per action.
21122
21123 2001-12-16 Marc Autret <autret_m@epita.fr>
21124
21125 * src/bison.simple: Remove a useless #line directive.
21126 s/#line %%line %%skeleton/#line %%line "%%parser-file-name"/'.
21127 * src/output.c (get_lines_number): New.
21128 (output_parser): Adjust, now takes care about the lines of a
21129 output muscles.
21130 Fix line numbering.
21131 (actions_output): Computes the number of lines taken by actions.
21132 (output_master_parser): Insert new skeleton which is the name of
21133 the output parser file name.
21134
21135 2001-12-15 Marc Autret <autret_m@epita.fr>
21136
21137 * src/bison.simple [YYERROR_VERBOSE]: Restore backward compatibility.
21138
21139 2001-12-15 Marc Autret <autret_m@epita.fr>
21140
21141 * src/output.c (output_gram): Keep track of the hairy one.
21142
21143 2001-12-15 Akim Demaille <akim@epita.fr>
21144
21145 Make `make distcheck' work.
21146
21147 * lib/Makefile.am (INCLUDES): Add top_srcdir/intl, since hash uses
21148 system.h which uses libgettext.h.
21149
21150 2001-12-15 Akim Demaille <akim@epita.fr>
21151
21152 * src/nullable.c (set_nullable): Useless rules must be skipped,
21153 otherwise, since we range over their symbols, we might look at a
21154 nonterminal which no longer ``exists'', i.e., it is not counted in
21155 `nvars', hence we overflow our arrays.
21156
21157 2001-12-15 Akim Demaille <akim@epita.fr>
21158
21159 The header can also be produced directly, without any obstack!
21160 Yahoo!
21161
21162 * src/files.c, src/files.h (defines_obstack): Remove.
21163 (compute_header_macro): Global.
21164 (defines_obstack_save): Remove.
21165 * src/reader.c (parse_union_decl): No longer output to
21166 defines_obstack: its content can be found in the `stype' muscle
21167 anyway.
21168 (output_token_translations): Merge into...
21169 (symbols_output): this.
21170 Rename as...
21171 (symbols_save): this.
21172 (reader): Adjust.
21173 * src/output.c (header_output): New.
21174 (output): Call it.
21175
21176 2001-12-15 Akim Demaille <akim@epita.fr>
21177
21178 * src/reader.c (parse_union_decl): Instead of handling two obstack
21179 simultaneously, use one to define the `stype' muscle, and use the
21180 value of the latter to fill defines_obstack.
21181 (copy_comment): Remove.
21182 (copy_comment2): Work for a single obstack.
21183 Rename as...
21184 (copy_comment): this.
21185
21186 2001-12-15 Akim Demaille <akim@epita.fr>
21187
21188 * src/lex.c, src/lex.h (xgetc): No longer static.
21189 * src/reader.c (parse_union_decl): Revamp.
21190
21191 2001-12-15 Akim Demaille <akim@epita.fr>
21192
21193 Still making progress in separating Bison into (i) input, (ii)
21194 process, (iii) output: now we can directly output the parser file
21195 without using table_obstack at all.
21196
21197 * src/files.c, src/files.h (table_obstack): Bye bye.
21198 (parser_file_name): New.
21199 * src/files.c (compute_output_file_names): Compute it.
21200 * src/output.c (actions_output, output_parser)
21201 (output_master_parser): To a file instead of an obstack.
21202
21203 2001-12-15 Akim Demaille <akim@epita.fr>
21204
21205 Attach actions to rules, instead of pre-outputting them to
21206 actions_obstack.
21207
21208 * src/gram.h (rule_t): action and action_line are new members.
21209 * src/reader.c (symbol_list): Likewise.
21210 (copy_action): Save the actions within the rule.
21211 (packgram): Save them in rule_table.
21212 * src/output.c (actions_output): New.
21213 (output_parser): Use it on `%%actions'.
21214 (output_rule_data): Don't free rule_table.
21215 (output): Do it.
21216 (prepare): Don't save the `action' muscle.
21217 * src/bison.simple: s/%%action/%%actions/.
21218
21219 2001-12-15 Akim Demaille <akim@epita.fr>
21220
21221 * src/reader.c (copy_action): When --yacc, don't append a `;'
21222 to the user action: let it fail if lacking.
21223 Suggested by Arnold Robbins and Tom Tromey.
21224
21225 2001-12-14 Akim Demaille <akim@epita.fr>
21226
21227 * src/lex.c (literalchar): Simply return the char you decoded, non
21228 longer mess around with obstacks and int pointers.
21229 Adjust all callers.
21230
21231 2001-12-14 Akim Demaille <akim@epita.fr>
21232
21233 * src/lex.c (literalchar): Don't escape the special characters,
21234 just decode them, and keep them as char (before, eol was output as
21235 the 2 char string `\n' etc.).
21236 * src/output.c (output_rule_data): Use quotearg to output the
21237 token strings.
21238
21239 2001-12-13 Paul Eggert <eggert@twinsun.com>
21240
21241 * src/bison.simple (YYSIZE_T, YYSTACK_ALLOC, YYSTACK_FREE):
21242 Do not infringe on the global user namespace when using C++.
21243 (YYFPRINTF, YYSTDERR): New macros, needed for the above.
21244 All uses of `fprintf' and `stderr' changed.
21245
21246 * doc/bison.texinfo: Document YYFPRINTF, YYSTDERR.
21247
21248 2001-12-13 Akim Demaille <akim@epita.fr>
21249
21250 The computation of nullable is broken: it doesn't handle empty
21251 RHS's properly.
21252
21253 * tests/torture.at (GNU AWK Grammar): New.
21254 * tests/sets.at (Nullable): New.
21255 * src/nullable.c (set_nullable): Instead of blindly looping over
21256 `ritems', loop over the rules, and then over their rhs's.
21257
21258 Work around Autotest bugs.
21259
21260 * src/warshall.c (bitmatrix_print): Don't use `+--+' as table
21261 frame, because Autotest understand lines starting with a `+' as
21262 traces from the shell. Then, they are not processed properly.
21263 Admittedly an Autotest bug, but we don't have time to wait for
21264 Autotest to catch up.
21265 * tests/regression.at (Broken Closure): Adjust to the new table
21266 frames.
21267 Move to...
21268 * tests/sets.at: here.
21269
21270 2001-12-13 Akim Demaille <akim@epita.fr>
21271
21272 * src/closure.c (closure): Use nrules instead of playing tricks
21273 with BITS_PER_WORD.
21274
21275 2001-12-13 Akim Demaille <akim@epita.fr>
21276
21277 * src/print.c (print_actions): Output the handling of `$' as the
21278 traces do: shifting the token EOF. Before EOF was treated as a
21279 nonterminal.
21280 * tests/regression.at: Adjust some tests.
21281 * src/print_graph.c (print_core): Complete the set of items via
21282 closure. The next-to-final and final states are still unsatisfying,
21283 but that's to be addressed elsewhere.
21284 No longer output the rule numbers, but do output the state number.
21285 A single loop for the shifts + gotos is enough, but picked a
21286 distinct color for each.
21287 (print_graph): Initialize and finalize closure.
21288
21289 2001-12-13 Akim Demaille <akim@epita.fr>
21290
21291 * src/reader.c (readgram): Remove dead code, an strip useless
21292 braces.
21293 (get_type): Remove, unused.
21294
21295 2001-12-12 Akim Demaille <akim@epita.fr>
21296
21297 * src/complain.h, src/complain.c: Remove error_one_per_line, rely
21298 on that of lib/error.c.
21299
21300 2001-12-12 Akim Demaille <akim@epita.fr>
21301
21302 Some hosts don't like `/' in includes.
21303
21304 * src/system.h: Include libgettext.h without qualifying the path.
21305 * src/Makefile.am (INCLUDES): Add $(top_srcdir)/intl, remove
21306 $(top_srcdir).
21307
21308 2001-12-11 Marc Autret <autret_m@epita.fr>
21309
21310 * src/output.c (output_parser): Remove useless muscle.
21311
21312 2001-12-11 Marc Autret <autret_m@epita.fr>
21313
21314 * src/bison.simple: Remove #line just before %%epilogue. It
21315 is now handled in ...
21316 * src/reader.c (read_additionnal_code): Add the output of a
21317 #line for the epilogue.
21318
21319 2001-12-10 Marc Autret <autret_m@epita.fr>
21320
21321 * src/reader.c (copy_definition): Re-use CPP-outed code which
21322 replace precedent remove.
21323 * src/bison.simple: Remove #line before %%prologue because
21324 %%input-line is wrong at this time.
21325
21326 2001-12-10 Marc Autret <autret_m@epita.fr>
21327
21328 * src/reader.c (symbols_output): Clean up.
21329 * src/output.c (output_gram, output): Clean up.
21330
21331 2001-12-10 Akim Demaille <akim@epita.fr>
21332
21333 * src/lalr.c (initialize_lookaheads): New. Extracted from...
21334 * src/LR0.c (set_state_table): here.
21335 * src/lalr.c (lalr): Call it.
21336
21337 2001-12-10 Akim Demaille <akim@epita.fr>
21338
21339 * src/state.h (shifts): Remove the `number' member: shifts are
21340 attached to state, hence no longer need to be labelled with a
21341 state number.
21342
21343 2001-12-10 Akim Demaille <akim@epita.fr>
21344
21345 Now that states have a complete set of members, the linked list of
21346 shifts is useless: just fill directly the state's shifts member.
21347
21348 * src/state.h (shifts): Remove the `next' member.
21349 * src/LR0.c (first_state, last_state): Remove.
21350 Adjust the callers.
21351 (augment_automaton): Don't look for the shifts that must be added
21352 a shift on EOF: it is those of the state we looked for! But now,
21353 since shifts are attached, it is no longer needed to looking
21354 merely by its id: its number.
21355
21356 2001-12-10 Akim Demaille <akim@epita.fr>
21357
21358 * src/LR0.c (augment_automaton): Better variable locality.
21359 Remove an impossible branch: if there is a state corresponding to
21360 the start symbol being shifted, then there is shift for the start
21361 symbol from the initial state.
21362
21363 2001-12-10 Akim Demaille <akim@epita.fr>
21364
21365 * src/LR0.c (augment_automaton): Call `insert_eof_shifting_state'
21366 only when appropriate: when insert_start_shifting_state' is not
21367 invoked.
21368 * tests/regression.at (Rule Line Numbers): Adjust.
21369
21370 2001-12-10 Akim Demaille <akim@epita.fr>
21371
21372 * src/LR0.c (augment_automaton): Now that all states have shifts,
21373 merge the two cases addition shifts to the initial state.
21374
21375 2001-12-10 Akim Demaille <akim@epita.fr>
21376
21377 * src/lalr.c (set_state_table): Move to...
21378 * src/LR0.c: here.
21379 * src/lalr.c (lalr): Don't call it...
21380 * src/LR0.c (generate_states): do it.
21381 * src/LR0.h (first_state): Remove, only the table is used.
21382
21383 2001-12-10 Akim Demaille <akim@epita.fr>
21384
21385 * src/LR0.h (first_shift, first_reduction): Remove.
21386 * src/lalr.c: Don't use first_shift: find shifts through the
21387 states.
21388
21389 2001-12-10 Akim Demaille <akim@epita.fr>
21390
21391 * src/LR0.c: Attach shifts to states as soon as they are
21392 computed.
21393 * src/lalr.c (set_state_table): Instead of assigning shifts to
21394 state, just assert that the mapping was properly done.
21395
21396 2001-12-10 Akim Demaille <akim@epita.fr>
21397
21398 * src/LR0.c (insert_start_shift): Rename as...
21399 (insert_start_shifting_state): this.
21400 (insert_eof_shifting_state, insert_accepting_state): New.
21401 (augment_automaton): Adjust.
21402 Better locality of the variables.
21403 When looking if the start_symbol is shifted from the initial
21404 state, using `while (... symbol != start_symbol ...)' sounds
21405 better than `while (... symbol < start_symbol ...)': If fail
21406 to see how the order between symbols could be relevant!
21407
21408 2001-12-10 Akim Demaille <akim@epita.fr>
21409
21410 * src/getargs.h: Don't declare `spec_name_prefix' and
21411 `spec_file_prefix', declared by src/files.h.
21412 * src/files.c, src/files.h: Default for spec_name_prefix is "yy".
21413 * src/muscle_tab.c (muscle_init): Default prefix to NULL.
21414 * src/output.c (prepare): Adjust.
21415 * src/reader.c (symbols_output): Likewise.
21416 * src/vmsgetargs.c: Vaguely adjust, but who cares?
21417
21418 2001-12-10 Akim Demaille <akim@epita.fr>
21419
21420 * src/muscle_tab.c (muscle_init): NULL is a better default than
21421 `"0"'.
21422
21423 2001-12-10 Akim Demaille <akim@epita.fr>
21424
21425 * src/reader.c (reader): Calling symbols_output once is enough.
21426
21427 2001-12-10 Akim Demaille <akim@epita.fr>
21428
21429 Now that states have a complete set of members, the linked list of
21430 reductions is useless: just fill directly the state's reductions
21431 member.
21432
21433 * src/state.h (struct reductions): Remove member `number' and
21434 `next'.
21435 * src/LR0.c (first_reduction, last_reduction): Remove.
21436 (save_reductions): Don't link the new reductions, store them in
21437 this_state.
21438 * src/lalr.c (set_state_table): No need to attach reductions to
21439 states, it's already done.
21440 * src/output.c (output_actions): No longer free the shifts, then
21441 the reductions, then the states: free all the states and their
21442 members.
21443
21444 2001-12-10 Akim Demaille <akim@epita.fr>
21445
21446 * src/options.c (OPTN, DRTV, BOTH): New.
21447 (option_table): Use them.
21448
21449 * src/muscle_tab.c: Don't include xalloc.h and string.h: that's
21450 the job of system.h.
21451 * src/options.c: Don't include stdio.h and xalloc.h for the same
21452 reasons.
21453
21454 2001-12-10 Akim Demaille <akim@epita.fr>
21455
21456 * src/output.c (output, prepare): Make sure the values of the
21457 muscles `action' and `prologue' are 0-terminated.
21458
21459 2001-12-10 Akim Demaille <akim@epita.fr>
21460
21461 Clean up GCC warnings.
21462
21463 * src/reader.c (copy_action): `buf' is not used.
21464 (parse_skel_decl): Be static.
21465 * src/muscle_tab.c (mhash1, mhash2, muscle_insert): Preserve `const'.
21466 * src/options.h (create_long_option_table): Have a real prototype.
21467 * lib/hash.c, lib/hash.h (hash_insert, hash_insert_at, hash_delete)
21468 (hash_delete_at): Return const void *.
21469 Adjust casts to preserve the const.
21470
21471 2001-12-10 Akim Demaille <akim@epita.fr>
21472
21473 * configure.in: Require 2.52g.
21474 M4 is not needed, but AUTOM4TE is.
21475 * m4/m4.m4: Remove.
21476 * tests/Makefile.am: Adjust.
21477
21478 2001-12-10 Akim Demaille <akim@epita.fr>
21479
21480 One structure for states is enough, even though theoretically
21481 there are LR(0) states and LALR(1) states.
21482
21483 * src/lalr.h (state_t): Remove.
21484 (state_table): Be state_t **, not state_t *.
21485 * src/state.h (core, CORE_ALLOC): Rename as...
21486 (state_t, STATE_ALLOC): this.
21487 Add the LALR(1) members: shifts, reductions, errs.
21488 * src/LR0.c (state_table): Rename as...
21489 (state_hash): this, to avoid name clashes with the global
21490 `state_table'.
21491 * src/print_graph.c, src/LR0.c, src/LR0.h, src/conflicts.c
21492 * src/lalr.c, src/lalr.h, src/output.c, src/print.c: Adjust.
21493
21494 2001-12-10 Akim Demaille <akim@epita.fr>
21495
21496 Bison dumps core on bash.y.
21497 Reported by Pascal Bart.
21498
21499 * src/warshall.c (bitmatrix_print): New.
21500 (TC): Use it.
21501 When performing a transitive closure R(i, j) && R(j, k) => R(i, k),
21502 j must be the outer loop.
21503 * tests/regression.at (Broken Closure): New.
21504
21505 2001-12-05 Akim Demaille <akim@epita.fr>
21506
21507 * tests/atlocal.in (CPPFLAGS): Do not leave a space between -I and
21508 its argument.
21509 Reported by Peter Hamorsky.
21510
21511 2001-12-05 Akim Demaille <akim@epita.fr>
21512
21513 * src/conflicts.c (err_table): Remove.
21514 (resolve_sr_conflict): Adjust.
21515 * src/lalr.h (state_t.reduction_table, state_t.shift_table):
21516 Rename as...
21517 (state_t.reductions, state_t.shifts): this.
21518
21519 2001-12-05 Akim Demaille <akim@epita.fr>
21520
21521 * src/reduce.c (reduce_grammar_tables): No longer disable the
21522 removal of useless rules via CPP but via `if (0)', so that the
21523 compiler still check the code is valid.
21524 For instance, it should have noticed `rline' no longer exists: use
21525 the `line' member of rule_t.
21526 * src/gram.c (dummy, rline): Remove, unused.
21527
21528 2001-12-05 Akim Demaille <akim@epita.fr>
21529
21530 * src/output.c (pack_vector): Use assert, not berror.
21531 * src/main.c (berror): Remove, unused.
21532
21533 2001-12-05 Akim Demaille <akim@epita.fr>
21534
21535 New experimental feature: if --verbose --trace output all the
21536 items of a state, not only its kernel.
21537
21538 * src/print.c (print_core): If `trace_flag', then invoke closure
21539 before outputting the items of the state (print_core is no longer
21540 a correct name them).
21541 (print_results): Invoke new_closure/free_closure if needed.
21542
21543 2001-12-05 Akim Demaille <akim@epita.fr>
21544
21545 * src/LR0.c (new_itemsets): Use nshifts only, not shiftcount.
21546 * src/closure.c, src/closure.h (itemsetsize): Rename as...
21547 (nitemset): for consistency with the rest of the project.
21548
21549 2001-12-05 Akim Demaille <akim@epita.fr>
21550
21551 * src/closure.c (print_closure): Improve.
21552 (closure): Use it for printing input and output.
21553
21554 2001-12-05 Akim Demaille <akim@epita.fr>
21555
21556 * src/closure.c (FIRSTS, FDERIVES): Adjust to reality: they are
21557 indexed by nonterminals.
21558
21559 2001-12-05 Akim Demaille <akim@epita.fr>
21560
21561 * src/warshall.c (TC, RTC): De-obsfucate (source reduced to 22% of
21562 what it was!).
21563 * src/warshall.h: Remove accidental duplication of the content.
21564
21565 2001-12-05 Akim Demaille <akim@epita.fr>
21566
21567 * src/closure.c (set_fderives): De-obfuscate.
21568
21569 2001-12-05 Akim Demaille <akim@epita.fr>
21570
21571 * src/closure.c (print_firsts, print_fderives): De-obfuscate.
21572
21573 2001-12-05 Akim Demaille <akim@epita.fr>
21574
21575 * src/closure.c (set_firsts): De-obfuscate.
21576
21577 2001-12-05 Akim Demaille <akim@epita.fr>
21578
21579 * src/output.c (action_row): De-obfuscate
21580 using the good o' techniques: arrays not pointers, variable
21581 locality, BITISSET, RESETBIT etc.
21582
21583 2001-12-05 Akim Demaille <akim@epita.fr>
21584
21585 Pessimize the code to simplify it: from now on, all the states
21586 have a valid SHIFTS, which NSHIFTS is possibly 0.
21587
21588 * src/LR0.c (shifts_new): Be global and move to..
21589 * src/state.c, src/state.h: here.
21590 * src/conflicts, src/lalr.c, src/output.c, src/print.c,
21591 * src/print_graph: Adjust.
21592
21593 2001-12-05 Akim Demaille <akim@epita.fr>
21594
21595 * src/state.h (SHIFT_DISABLE, SHIFT_IS_DISABLED): New.
21596 * src/conflicts.c: Use it.
21597 Restore a few missing `if (!SHIFT_IS_DISABLED)' which were
21598 incorrectly ``simplified''.
21599
21600 2001-12-05 Akim Demaille <akim@epita.fr>
21601
21602 * src/conflicts.c (flush_shift, resolve_sr_conflict): De-obfuscate
21603 using the good o' techniques: arrays not pointers, variable
21604 locality, BITISSET, RESETBIT etc.
21605
21606 2001-12-05 Akim Demaille <akim@epita.fr>
21607
21608 * src/state.h (SHIFT_SYMBOL): New.
21609 * src/conflicts.c: Use it to deobfuscate.
21610
21611 2001-12-05 Akim Demaille <akim@epita.fr>
21612
21613 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts)
21614 (print_reductions): De-obfuscate using the good o' techniques:
21615 arrays not pointers, variable locality, BITISSET.
21616
21617 2001-12-05 Akim Demaille <akim@epita.fr>
21618
21619 * src/conflicts.c (print_reductions): Arrays, not pointers.
21620 Use BITISSET.
21621
21622 2001-12-05 Akim Demaille <akim@epita.fr>
21623
21624 * src/conflicts.c (print_reductions): Pessimize, but clarify.
21625
21626 2001-12-05 Akim Demaille <akim@epita.fr>
21627
21628 * src/conflicts.c (print_reductions): Improve variable locality.
21629
21630 2001-12-05 Akim Demaille <akim@epita.fr>
21631
21632 * src/conflicts.c (print_reductions): Pessimize, but clarify.
21633
21634 2001-12-05 Akim Demaille <akim@epita.fr>
21635
21636 * src/conflicts.c (print_reductions): Improve variable locality.
21637
21638 2001-12-05 Akim Demaille <akim@epita.fr>
21639
21640 * src/state.h (SHIFT_IS_ERROR, SHIFT_IS_GOTO, SHIFT_IS_SHIFT): New.
21641 * src/lalr.c: Use them.
21642
21643 2001-12-05 Akim Demaille <akim@epita.fr>
21644
21645 * src/LR0.c (augment_automaton): Formatting changes.
21646 Better variable locality.
21647
21648 2001-12-05 Akim Demaille <akim@epita.fr>
21649
21650 * src/lalr.c (matrix_print): New.
21651 (transpose): Use it.
21652 Use arrays instead of pointers.
21653
21654 2001-12-05 Akim Demaille <akim@epita.fr>
21655
21656 * src/lalr.c (maxrhs): Move to...
21657 * src/gram.c, src/gram.h (ritem_longest_rhs): here.
21658 * src/lalr.c (build_relations): Adjust.
21659
21660 2001-12-05 Akim Demaille <akim@epita.fr>
21661
21662 * src/lalr.c (transpose): Free the memory allocated to the
21663 argument, as it is replaced by the results by the unique caller.
21664 (build_relations): Merely invoke transpose: it handles the memory
21665 deallocation.
21666 Improve variable locality.
21667 Avoid variables used as mere abbreviations.
21668 (compute_lookaheads): Use arrays instead of pointers.
21669
21670 2001-12-05 Akim Demaille <akim@epita.fr>
21671
21672 * src/lalr.c (initialize_F): Improve variable locality.
21673 Avoid variables used as mere abbreviations.
21674
21675 2001-12-05 Akim Demaille <akim@epita.fr>
21676
21677 * src/derives.c (print_derives): Display the ruleno.
21678 * src/lalr.c (initialize_F, transpose): Better variable locality
21679 to improve readability.
21680 Avoid variables used as mere abbreviations.
21681
21682 2001-12-05 Akim Demaille <akim@epita.fr>
21683
21684 * src/lalr.c (traverse): Use arrays instead of pointers.
21685
21686 2001-12-05 Akim Demaille <akim@epita.fr>
21687
21688 * src/nullable.c (set_nullable): Use a for loop to de-obfuscate
21689 the handling of squeue.
21690 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
21691
21692 2001-12-05 Akim Demaille <akim@epita.fr>
21693
21694 Because useless nonterminals are now kept alive (instead of being
21695 `destroyed'), we now sometimes examine them, and store information
21696 related to them. Hence we need to know their number, and adjust
21697 memory allocations.
21698
21699 * src/reduce.c, src/reduce.h (nuseless_nonterminals): No longer
21700 static.
21701 * src/LR0.c (allocate_itemsets): The memory allocated to
21702 `symbol_count' was used for two different purpose: once to count
21703 the number of occurrences of each symbol, and later reassigned to
21704 `shift_symbol', containing the symbol that can be shifted from a
21705 given state.
21706 Deobfuscate, i.e., allocate, use and free `symbol_count' here
21707 only, and...
21708 (new_itemsets): Allocate `shift_symbol' here.
21709 (allocate_itemsets): symbol_count includes useless nonterminals.
21710 Make room for them.
21711 (free_storage): Use `free', not `XFREE', for pointers that cannot
21712 be null.
21713
21714 2001-12-05 Akim Demaille <akim@epita.fr>
21715
21716 * src/nullable.c (set_nullable): Deobfuscate the handling of
21717 ritem.
21718 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
21719
21720 2001-12-05 Akim Demaille <akim@epita.fr>
21721
21722 * src/gram.c, src/gram.h (ritem_print): New.
21723 * src/gram.c (dummy): Remove, now there is actual code in gram.c.
21724 (This useless function was defined only to work around VMS linkers
21725 that can't handle compilation units with variables only).
21726 * src/reduce.c (dump_grammar): Use it to trace the construction of
21727 ritem.
21728
21729 2001-12-04 Paul Eggert <eggert@twinsun.com>
21730
21731 * src/bison.simple (union yyalloc): Change member names
21732 to be the same as the stack names.
21733 (yyparse): yyptr is now union yyalloc *, not char *.
21734 (YYSTACK_RELOCATE): Likewise. This avoids a GCC warning,
21735 and may generate better code on some machines.
21736 (yystpcpy): Use prototype if __STDC__ is defined, not just
21737 if __cplusplus is defined.
21738
21739 2001-11-30 Akim Demaille <akim@epita.fr>
21740
21741 * configure.in (WARNING_CFLAGS): Add -Werror when possible.
21742 (CFLAGS): Do not include the WARNING_CFLAGS here, since GNU
21743 Gettext doesn't compile cleanly, and dies with -Werror.
21744 * src/Makefile.am, lib/Makefile.am, tests/atlocal.in (CFLAGS):
21745 Include WARNING_CFLAGS here.
21746 * lib/xstrdup.c: Include xalloc.h, so that xstrdup be declared
21747 before being defined.
21748
21749 2001-11-27 Paul Eggert <eggert@twinsun.com>
21750
21751 * lib/quotearg.h (quotearg_n, quotearg_n_style):
21752 First arg is int, not unsigned.
21753 * lib/quotearg.c (quotearg_n, quotearg_n_style): Likewise.
21754 (SIZE_MAX, UINT_MAX): New macros.
21755 (quotearg_n_options): Abort if N is negative.
21756 Avoid overflow check on hosts where size_t is 64 bits and int
21757 is 32 bits, as overflow is impossible there.
21758 Fix off-by-one typo that caused unnecessary reallocation.
21759
21760 2001-11-29 Paul Eggert <eggert@twinsun.com>
21761
21762 Name space cleanup in generated parser.
21763
21764 * doc/bison.texinfo (Bison Parser): Discuss system headers
21765 and their effect on the user name space.
21766
21767 * src/bison.simple:
21768 (YYSTACK_ALLOC, YYSTACK_FREE, union yyalloc, YYSTACK_GAP_MAX,
21769 YYSTACK_BYTES, YYSTACK_RELOCATE): Do not define unless necessary,
21770 i.e. unless ! defined (yyoverflow) || defined (YYERROR_VERBOSE).
21771
21772 (YYSIZE_T): New macro. Use it instead of size_t, to avoid infringing
21773 on user names when possible.
21774
21775 (YYSTACK_USE_ALLOCA): Do not define; just use any existing defn.
21776 Simplify test for whather <alloca.h> exists.
21777
21778 (<stdlib.h>): Include if we will use malloc, and if standard C or C++.
21779
21780 (<stdio.h>): Include if YYDEBUG.
21781
21782 (yymemcpy): Renamed from __yy_memcpy. Do not define unless
21783 ! defined (yyoverflow) && ! defined (yymemcpy).
21784
21785 (yymemcpy, yyparse): Rename local variables as needed so that
21786 they all begin with 'yy'.
21787
21788 (yystrlen, yystpcpy): New functions.
21789
21790 (YY_DECL_NON_LSP_VARIABLES): Renamed from _YY_DECL_VARIABLES.
21791 All uses changed.
21792
21793 (yyparse): size_t -> YYSIZE_T. Use yystrlen and yystpcpy
21794 instead of relying on string.h functions. Use YYSTACK_ALLOC
21795 and YYSTACK_FREE instead of malloc and free.
21796
21797 2001-11-30 Akim Demaille <akim@epita.fr>
21798
21799 * src/bison.simple (YYSTYPE, YYLTYPE): Move their definitions
21800 before their first uses.
21801 (YYBISON, YYPURE): Move to the top of the output.
21802
21803 2001-11-30 Akim Demaille <akim@epita.fr>
21804
21805 * tests/reduce.at (Useless Nonterminals): Fix.
21806
21807 2001-11-30 Akim Demaille <akim@epita.fr>
21808
21809 * src/bison.simple (YYSTACK_FREE): Use `do {;} while (0)' as empty
21810 if body instead of `;' to pacify GCC's warnings.
21811
21812 2001-11-30 Akim Demaille <akim@epita.fr>
21813
21814 Instead of mapping the LHS of unused rules to -1, keep the LHS
21815 valid, but flag the rules as invalid.
21816
21817 * src/gram.h (rule_t): `useful' is a new member.
21818 * src/print.c (print_grammar): Adjust.
21819 * src/derives.c (set_derives): Likewise.
21820 * src/reader.c (packgram, reduce_output): Likewise.
21821 * src/reduce.c (reduce_grammar_tables): Likewise.
21822 * tests/reduce.at (Underivable Rules, Useless Rules): New.
21823
21824 2001-11-30 Akim Demaille <akim@epita.fr>
21825
21826 * src/reduce.c (reduce_output): Formatting changes.
21827 * src/print.c (print_results, print_grammar): Likewise.
21828 * tests/regression.at (Rule Line Numbers)
21829 (Solved SR Conflicts, Unresolved SR Conflicts): Adjust.
21830
21831 2001-11-30 Akim Demaille <akim@epita.fr>
21832
21833 * src/reduce.c (nonterminals_reduce): Instead of throwing away
21834 useless nonterminals, move them at the end of the symbol arrays.
21835 (reduce_output): Adjust.
21836 * tests/reduce.at (Useless Nonterminals): Adjust.
21837
21838 2001-11-30 Akim Demaille <akim@epita.fr>
21839
21840 * src/reduce.c: Various comment/formatting changes.
21841 (nonterminals_reduce): New, extracted from...
21842 (reduce_grammar_tables): here.
21843 (reduce_grammar): Call nonterminals_reduce.
21844
21845 2001-11-29 Paul Eggert <eggert@twinsun.com>
21846
21847 * src/bison.simple (YYSTACK_REALLOC): Remove.
21848 (YYSTACK_ALLOC): Resurrect this macro, with its old meaning.
21849 (YYSTACK_FREE, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYSTACK_RELOCATE):
21850 New macros.
21851 (union yyalloc): New type.
21852 (__yy_memcpy): Last arg is size_t, not unsigned int, to remove
21853 an arbitrary restriction on hosts where size_t is wider than int.
21854
21855 (yyparse): Don't dump core if alloca or malloc fails; instead, report
21856 a parser stack overflow. Allocate just one block of memory for all
21857 three stacks, instead of allocating three blocks; this typically is
21858 faster and reduces fragmentation.
21859
21860 Do not limit the number of items in the stack to a value that fits
21861 in 'int', as this is an arbitrary limit on hosts with 64-bit
21862 size_t and 32-bit int.
21863
21864 2001-11-29 Marc Autret <autret_m@epita.fr>
21865
21866 * tests/calc.at [AT_DATA_CALC_Y]: Use %error-verbose instead
21867 of defining YYERROR_VERBOSE.
21868 [AT_DATA]: $4 is now out of C declarations in the prologue.
21869
21870 2001-11-28 Marc Autret <autret_m@epita.fr>
21871
21872 * src/reader.c (parse_dquoted_param): New.
21873 (parse_skel_decl): Use it.
21874 * src/lex.h: Add its prototype.
21875 * src/lex.c (literalchar): Become not static.
21876
21877 2001-11-28 Marc Autret <autret_m@epita.fr>
21878
21879 * src/output.h: And put its extern declaration here.
21880 * src/output.c (error_verbose): Define here.
21881 (prepare): Echo name modification.
21882 * src/getargs.h: Clean its extern declaration.
21883 * src/getargs.c (error_verbose_flag): Remove.
21884 (getargs): Remove case 'e'.
21885 * src/options.c (option_table): 'error-verbose' is now seen as simple
21886 percent option.
21887 Include output.h.
21888
21889 * src/reader.c (read_declarations): Remove case tok_include.
21890 (parse_include_decl): Remove.
21891 * src/lex.h (token_t): Remove tok_include.
21892 * src/options.c (option_table): 'include' is now a simple command line
21893 option.
21894
21895 2001-11-28 Marc Autret <autret_m@epita.fr>
21896
21897 * src/bison.simple: Adjust muscle names.
21898 * src/muscle_tab.c (muscle_init): Also rename the muscles.
21899 * src/output.c (prepare): s/_/-/ for the muscles names.
21900 (output_parser): When scanning for a muscle, allow '-' instead of '_'.
21901
21902 2001-11-28 Marc Autret <autret_m@epita.fr>
21903
21904 * src/bison.simple: Fix debug.
21905 [YYERROR_VERBOSE]: Re-integrate as an internal macro.
21906
21907 2001-11-28 Akim Demaille <akim@epita.fr>
21908
21909 * src/LR0.c (shifts_new): New.
21910 (save_shifts, insert_start_shift, augment_automaton): Use it.
21911
21912 2001-11-28 Akim Demaille <akim@epita.fr>
21913
21914 * src/closure.c (closure): `b' and `ruleno' denote the same value:
21915 keep ruleno only.
21916
21917 2001-11-28 Akim Demaille <akim@epita.fr>
21918
21919 * src/closure.c (closure): Instead of looping over word in array
21920 then bits in words, loop over bits in array.
21921
21922 2001-11-28 Akim Demaille <akim@epita.fr>
21923
21924 * src/closure.c (closure): No longer optimize the special case
21925 where all the bits of `ruleset[r]' are set to 0, to make the code
21926 clearer.
21927
21928 2001-11-28 Akim Demaille <akim@epita.fr>
21929
21930 * src/closure.c (closure): `r' and `c' are new variables, used to
21931 de-obfuscate accesses to RULESET and CORE.
21932
21933 2001-11-28 Akim Demaille <akim@epita.fr>
21934
21935 * src/reduce.c (reduce_print): Use ngettext.
21936 (dump_grammar): Improve the trace accuracy.
21937
21938 2001-11-28 Akim Demaille <akim@epita.fr>
21939
21940 * src/reduce.c (dump_grammar): Don't translate trace messages.
21941
21942 2001-11-28 Akim Demaille <akim@epita.fr>
21943
21944 * tests/reduce.at (Useless Terminals, Useless Nonterminals): New.
21945 * src/reduce.c (reduce_grammar_tables): Do not free useless tags,
21946 as all tags are free'ed afterwards.
21947 From Enrico Scholz.
21948
21949 2001-11-27 Paul Eggert <eggert@twinsun.com>
21950
21951 * src/bison.simple (YYSTACK_REALLOC): Fix typo that caused us to
21952 use alloca when we didn't want to, and vice versa.
21953
21954 2001-11-27 Marc Autret <autret_m@epita.fr>
21955
21956 * src/muscle_tab.c (muscle_init): Remove 'verbose' muscle
21957 initialization.
21958 * src/output.c (prepare): Remove its update.
21959
21960 2001-11-27 Marc Autret <autret_m@epita.fr>
21961
21962 * tests/torture.at [AT_DATA]: Remove YYERROR_VERBOSE definition.
21963 Use %error-verbose.
21964
21965 2001-11-27 Marc Autret <autret_m@epita.fr>
21966
21967 * src/bison.simple: Remove YYERROR_VERBOSE using.
21968 Use %%error_verbose.
21969 (yyparse): Likewise.
21970 * src/output.c (prepare): Give its final value.
21971 * src/muscle_tab.c (muscle_init): Init new muscle 'error_verbose'.
21972 * src/getargs.h: Add its extern declaration.
21973 * src/getargs.c (error_verbose_flag): New int.
21974 (getargs): Update to catch new case.
21975 * src/options.c (option_table): 'error-verbose' is a new option.
21976 (shortopts): Update.
21977
21978 2001-11-27 Akim Demaille <akim@epita.fr>
21979
21980 * src/system.h: Use intl/libgettext.h.
21981 * src/Makefile.am (INCLUDES): Add -I $(top_srcdir).
21982
21983 2001-11-27 Akim Demaille <akim@epita.fr>
21984
21985 * tests/torture.at (Exploding the Stack Size with Malloc):
21986 s/YYSTACK_USE_ALLOCA_ALLOCA/YYSTACK_USE_ALLOCA/.
21987
21988 2001-11-27 Akim Demaille <akim@epita.fr>
21989
21990 * src/files.c: Include error.h.
21991 Reported by Hans Aberg.
21992
21993 2001-11-26 Marc Autret <autret_m@epita.fr>
21994
21995 * src/reader.c (parse_include_decl): New, not yet implemented.
21996 (read_declarations): Add case tok_include.
21997 * src/getargs.h (include): Add its extern definition.
21998 * src/getargs.c (include): New const char *.
21999 (getargs): Add case '-I'.
22000 * src/options.c (option_table): Add include as command line and
22001 percent option.
22002 * src/lex.h (token_t): Add tok_include.
22003
22004 2001-11-26 Akim Demaille <akim@epita.fr>
22005
22006 * src/reader.c (readgram): Make sure rules for mid-rule actions
22007 have a lineno equal to that of their host rule.
22008 Reported by Hans Aberg.
22009 * tests/regression.at (Rule Line Numbers): New.
22010
22011 2001-11-26 Akim Demaille <akim@epita.fr>
22012
22013 * src/LR0.c (allocate_itemsets): kernel_size contains ints, not
22014 size_ts.
22015
22016 2001-11-26 Akim Demaille <akim@epita.fr>
22017
22018 * src/complain.c, src/complain.h (error): Remove, provided by
22019 lib/error.[ch].
22020
22021 2001-11-26 Akim Demaille <akim@epita.fr>
22022
22023 * src/reader.c (read_declarations): Don't abort on tok_illegal,
22024 issue an error message.
22025 * tests/regression.at (Invalid %directive): New.
22026 Reported by Hans Aberg.
22027
22028 2001-11-26 Akim Demaille <akim@epita.fr>
22029
22030 * configure.in: Invoke AC_FUNC_OBSTACK and AC_FUNC_ERROR_AT_LINE.
22031 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
22032
22033 2001-11-26 Akim Demaille <akim@epita.fr>
22034
22035 * src/conflicts.c (conflicts_print): Don't complain at all when
22036 there are no reduce/reduce conflicts, and as many shift/reduce
22037 conflicts as expected.
22038 * tests/regression.at (%expect right): Adjust.
22039
22040 2001-11-23 Akim Demaille <akim@epita.fr>
22041
22042 * lib/alloca.c: Update, from fileutils.
22043
22044 2001-11-23 Akim Demaille <akim@epita.fr>
22045
22046 * lib/Makefile.am (libbison_a_LIBADD): Add @ALLOCA@.
22047
22048 2001-11-23 Akim Demaille <akim@epita.fr>
22049
22050 * src/system.h: Include alloca.h.
22051 * src/main.c (main) [C_ALLOCA]: Call alloca (0).
22052
22053 2001-11-23 Akim Demaille <akim@epita.fr>
22054
22055 * src/print_graph.c (print_actions): Remove `rule', unused.
22056 * src/LR0.c (kernel_size): Contain `int' instead of `size_t' to
22057 pacify GCC's signed < unsigned warnings.
22058 * src/closure.c (itemsetsize): Likewise.
22059 * src/reader.c (symbol_list_new): Static.
22060
22061 2001-11-23 Akim Demaille <akim@epita.fr>
22062
22063 Attaching lineno to buckets is stupid, since only one copy of each
22064 symbol is kept, only the line of the first occurrence is kept too.
22065
22066 * src/symtab.h, src/symtab.c (bucket): Remove the line member.
22067 * src/reader.c (rline_allocated): Remove, unused.
22068 (symbol_list): Have a `line' member.
22069 (symbol_list_new): New.
22070 (readgram): Use it.
22071 * src/print.c (print_grammar): Output the rule line numbers.
22072 * tests/regression.at (Solved SR Conflicts)
22073 (Unresolved SR Conflicts): Adjust.
22074 Reported by Hans Aberg.
22075
22076 2001-11-22 Marc Autret <autret_m@epita.fr>
22077
22078 * src/bison.simple [YYERROR_VERBOSE]: Force its value to be 1 or 0.
22079
22080 2001-11-22 Marc Autret <autret_m@epita.fr>
22081
22082 * src/muscle_tab.c (muscle_init): Remove initialization of
22083 skeleton muscle.
22084 * src/output.c (output_master_parser): Do it here.
22085
22086 2001-11-20 Akim Demaille <akim@epita.fr>
22087
22088 * po/sv.po: New.
22089 * configure.in (ALL_LINGUAS): Adjust.
22090 * po/POTFILE.in: Remove `nullable.c' and `derives.c' which no
22091 longer contains strings to translate.
22092
22093 2001-11-19 Akim Demaille <akim@epita.fr>
22094
22095 * src/conflicts.c (conflicts_print): Add a missing \n.
22096
22097 2001-11-19 Akim Demaille <akim@epita.fr>
22098
22099 * src/nullable.c (nullable_print): New.
22100 (set_nullable): Call it when tracing.
22101 Better locality of variables.
22102
22103 2001-11-19 Akim Demaille <akim@epita.fr>
22104
22105 * src/print.c (print_actions): Better locality of variables.
22106
22107 2001-11-19 Akim Demaille <akim@epita.fr>
22108
22109 * src/derives.c (print_derives): Fix and enrich.
22110 * src/closure.c (print_fderives): Likewise.
22111
22112 2001-11-19 Akim Demaille <akim@epita.fr>
22113
22114 * src/closure.c (itemsetend): Remove, replaced with...
22115 (itemsetsize): new.
22116
22117 2001-11-19 Akim Demaille <akim@epita.fr>
22118
22119 * src/LR0.c (kernel_end): Remove, replaced with...
22120 (kernel_size): new.
22121
22122 2001-11-19 Akim Demaille <akim@epita.fr>
22123
22124 * src/conflicts.c (set_conflicts): Use arrays instead of pointers
22125 to clarify.
22126
22127 2001-11-19 Akim Demaille <akim@epita.fr>
22128
22129 * src/closure.c (closure): Use arrays instead of pointers to clarify.
22130
22131 2001-11-19 Akim Demaille <akim@epita.fr>
22132
22133 * src/closure.c, src/derives.c, src/nullable.c: Adjust various
22134 trace messages.
22135 * src/LR0.c: Likewise.
22136 (allocate_itemsets): Use arrays instead of pointers to clarify.
22137
22138 2001-11-19 Akim Demaille <akim@epita.fr>
22139
22140 * src/getargs.c (statistics_flag): Replace with...
22141 (trace_flag): New.
22142 (longopts): Accept --trace instead of --statistics.
22143 * src/getargs.h, src/options.c: Adjust.
22144 * src/LR0.c, src/closure.c, src/derives.c, src/nullable.c,
22145 * src/reduce.c: Use trace_flags instead of the CPP conditional TRACE.
22146
22147 2001-11-19 Akim Demaille <akim@epita.fr>
22148
22149 * src/LR0.c (new_itemsets, get_state): Use more arrays and fewer
22150 pointers to clarify the code.
22151 (save_reductions, save_shifts): Factor common parts of alternatives.
22152
22153 2001-11-19 Akim Demaille <akim@epita.fr>
22154
22155 * src/LR0.c (new_state, get_state): Complete TRACE code.
22156 * src/closure.c: Include `reader.h' to get `tags', needed by the
22157 trace code.
22158 Rename the conditional DEBUG as TRACE.
22159 Output consistently TRACEs to stderr, not stdout.
22160 * src/derives.c: Likewise.
22161 * src/reduce.c: (inaccessable_symbols): Using if is better style
22162 than goto.
22163 Use `#if TRACE' instead of `#if 0' for tracing code.
22164
22165 2001-11-19 Akim Demaille <akim@epita.fr>
22166
22167 * src/system.h (LIST_FREE, shortcpy): New.
22168 * src/LR0.c: Use them.
22169 * src/output.c (free_itemsets, free_reductions, free_shifts):
22170 Remove, replaced by LIST_FREE.
22171
22172 2001-11-19 Akim Demaille <akim@epita.fr>
22173
22174 * src/state.h (CORE_ALLOC, SHIFTS_ALLOC, ERRS_ALLOC)
22175 (REDUCTIONS_ALLOC): New.
22176 * src/LR0.c, src/conflicts.c: Use them to de-obfuscate memory
22177 allocation.
22178
22179 2001-11-19 Akim Demaille <akim@epita.fr>
22180
22181 * src/LR0.c (new_state): Complete trace code.
22182 * src/nullable.c (set_nullable): Don't translate traces.
22183
22184 2001-11-19 Akim Demaille <akim@epita.fr>
22185
22186 * src/print_graph.c (print_core): Better locality of variables.
22187 * src/print.c (print_core): Likewise.
22188
22189 2001-11-19 Akim Demaille <akim@epita.fr>
22190
22191 * src/vcg.c: You do the output, so you are responsible of the
22192 handling of VCG syntax, in particular: use quotearg.
22193 * src/print_graph.c: Don't.
22194 (print_actions): Don't output the actions as part of the nodes,
22195 since that's the job of the edges.
22196 (print_state): Don't output by hand: fill the node description,
22197 and ask for its output.
22198
22199 2001-11-19 Akim Demaille <akim@epita.fr>
22200
22201 * src/bison.simple (yyparse): When verbosely reporting an error,
22202 no longer put additional quotes around token names.
22203 * tests/calc.at: Adjust.
22204
22205 2001-11-19 Akim Demaille <akim@epita.fr>
22206
22207 * src/symtab.h, src/symtab.c: `line' is a new member of `bucket'.
22208 * src/reader.c (record_rule_lines, rline, rline_allocated): Remove.
22209 * src/output.c: Adjust.
22210
22211 2001-11-19 Akim Demaille <akim@epita.fr>
22212
22213 * src/gram.h (rprec, rprecsym, rassoc): Remove, now part of...
22214 (rule_t): this.
22215 * src/conflicts.c, src/reader.c, src/reduce.c: Adjust.
22216
22217 2001-11-19 Akim Demaille <akim@epita.fr>
22218
22219 * src/gram.h (rule_t): New.
22220 (rule_table): New.
22221 (rrhs, rlhs): Remove, part of state_t.
22222 * src/print_graph.c, src/closure.c, src/conflicts.c, src/derives.c,
22223 * src/lalr.c, src/nullable.c, src/output.c, src/print.c,
22224 * src/reader.c, src/reduce.c: Adjust.
22225
22226 2001-11-19 Akim Demaille <akim@epita.fr>
22227
22228 * src/reader.c (symbols_output): New, extracted from...
22229 (packsymbols): Here.
22230 (reader): Call it.
22231
22232 2001-11-19 Akim Demaille <akim@epita.fr>
22233
22234 * src/lalr.c (set_maxrhs, maxrhs): Remove, replaced with...
22235 (maxrhs): this new function.
22236
22237 2001-11-19 Akim Demaille <akim@epita.fr>
22238
22239 * src/lalr.c (F): New macro to access the variable F.
22240 Adjust.
22241
22242 2001-11-19 Akim Demaille <akim@epita.fr>
22243
22244 * src/lalr.h (LA): New macro to access the variable LA.
22245 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
22246 * src/lalr.c: Adjust.
22247
22248 2001-11-19 Akim Demaille <akim@epita.fr>
22249
22250 * src/lalr.c (initialize_LA): Only initialize LA. Let...
22251 (set_state_table): handle the `lookaheads' members.
22252
22253 2001-11-19 Akim Demaille <akim@epita.fr>
22254
22255 * src/lalr.h (lookaheads): Removed array, whose contents is now
22256 a member of...
22257 (state_t): this structure.
22258 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
22259 Adjust.
22260
22261 2001-11-19 Akim Demaille <akim@epita.fr>
22262
22263 * src/lalr.h (consistent): Removed array, whose contents is now
22264 a member of...
22265 (state_t): this structure.
22266 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
22267 Adjust.
22268
22269 2001-11-19 Akim Demaille <akim@epita.fr>
22270
22271 * src/lalr.h (reduction_table, shift_table): Removed arrays, whose
22272 contents are now members of...
22273 (state_t): this structure.
22274 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
22275 Adjust.
22276
22277 2001-11-19 Akim Demaille <akim@epita.fr>
22278
22279 * src/lalr.h (state_t): New.
22280 (state_table): Be a state_t * instead of a core **.
22281 (accessing_symbol): Remove, part of state_t.
22282 * src/lalr.c: Adjust.
22283 (set_accessing_symbol): Merge into...
22284 (set_state_table): this.
22285 * src/print_graph.c, src/conflicts.c: Adjust.
22286
22287 2001-11-14 Akim Demaille <akim@epita.fr>
22288
22289 * tests/calc.at, tests/output.at, tests/regression.at,
22290 * tests/testsuite.at, tests/torture.at: Rely on Autotest 2.52g:
22291 now the tests are run in private dirs, therefore AC_CLEANUP and
22292 family can be simplified to 0-ary.
22293 * tests/atlocal.in: Now that we run `elsewhere' than in tests/,
22294 use abs. path to find config.h.
22295 * tests/calc.at (AT_CHECK_CALC): Don't try to check the compiler's
22296 stderr, there can be way too much random noise.
22297 Instead pass -Werror to GCC and rely on the exit status.
22298 Reported by Wolfram Wagner.
22299
22300 2001-11-14 Akim Demaille <akim@epita.fr>
22301
22302 * src/bison.simple (yyparse): Let yyls1, yyss1 and yyvs1 be
22303 defined only if yyoverflow is defined, to avoid `warning: unused
22304 variable `yyvs1''.
22305 Reported by The Test Suite.
22306
22307 2001-11-14 Akim Demaille <akim@epita.fr>
22308
22309 * src/print.c: Include reduce.h.
22310 Reported by Hans Aberg.
22311
22312 2001-11-14 Akim Demaille <akim@epita.fr>
22313
22314 * src/lex.c, src/lex.h (token_buffer, unlexed_token_buffer):
22315 Revert a previous patch: these are really const.
22316 * src/conflicts.c (conflict_report): Additional useless pair of
22317 braces to pacify GCC's warnings for `if () if () {} else {}'.
22318 * src/lex.c (parse_percent_token): Replace equal_offset with
22319 arg_offset.
22320 arg is const.
22321 Be sure to strdup `arg' when used, since there is no reason for
22322 token_buffer not to change.
22323
22324 2001-11-14 Akim Demaille <akim@epita.fr>
22325
22326 * src/system.h (EXIT_SUCCESS, EXIT_FAILURE): Ensure a proper
22327 definition.
22328 * src/main.c (main): Use them.
22329 Suggested by Hans Aberg.
22330
22331 2001-11-12 Akim Demaille <akim@epita.fr>
22332
22333 * src/system.h (ngettext): Now that we use ngettext, be sure to
22334 provide a default definition when NLS are not used.
22335
22336 2001-11-12 Akim Demaille <akim@epita.fr>
22337
22338 * doc/bison.texinfo: Use `$' as shell prompt, not `%'.
22339 Use @kbd to denote user input.
22340 (Language and Grammar): ANSIfy the example.
22341 Adjust its layout for info/notinfo.
22342 (Location Tracking Calc): Output error messages to stderr.
22343 Output locations in a more GNUtically correct way.
22344 Fix a couple of Englishos.
22345 Adjust @group/@end group pairs.
22346
22347 2001-11-12 Akim Demaille <akim@epita.fr>
22348
22349 %expect was not functioning at all.
22350
22351 * src/conflicts.c (expected_conflicts): Set to -1.
22352 (conflict_report): Use ngettext.
22353 (conflicts_print): Check %expect and make its violation an error.
22354 * doc/bison.texinfo (Expect Decl): Adjust.
22355 * configure.in (AM_GNU_GETTEXT): Ask for ngettext.
22356 * tests/regression.at (%expect not enough, %expect right)
22357 (%expect too much): New.
22358
22359 2001-11-12 Akim Demaille <akim@epita.fr>
22360
22361 * tests/regression.at (Conflicts): Rename as...
22362 (Unresolved SR Conflicts): this.
22363 (Solved SR Conflicts): New.
22364
22365 2001-11-12 Akim Demaille <akim@epita.fr>
22366
22367 * src/reduce.c (print_results): Rename as...
22368 (reduce_output): This.
22369 Output to OUT, passed as argument, instead of output_obstack.
22370 (dump_grammar): Likewise.
22371 (reduce_free): New.
22372 Also free V1.
22373 (reduce_grammar): No longer call reduce_output, since...
22374 * src/print.c (print_results): do it.
22375 * src/main.c (main): Call reduce_free;
22376
22377 2001-11-12 Akim Demaille <akim@epita.fr>
22378
22379 * src/conflicts.c (print_reductions): Accept OUT as argument.
22380 Output to it, not to output_obstack.
22381 * src/print.c (print_actions): Adjust.
22382
22383 2001-11-12 Akim Demaille <akim@epita.fr>
22384
22385 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts): Return
22386 the result instead of using...
22387 (src_total, rrc_total, src_count, rrc_count): Remove.
22388 (any_conflicts): Remove.
22389 (print_conflicts): Split into...
22390 (conflicts_print, conflicts_output): New.
22391 * src/conflicts.h: Adjust.
22392 * src/main.c (main): Invoke both conflicts_output and conflicts_print.
22393 * src/print.c (print_grammar): Issue `\n' between two rules.
22394 * tests/regression.at (Conflicts): New.
22395 Reported by Tom Lane.
22396
22397 2001-11-12 Akim Demaille <akim@epita.fr>
22398
22399 * tests/regression.at (Invalid input): Remove, duplicate with
22400 ``Invalid input: 1''.
22401
22402 2001-11-12 Akim Demaille <akim@epita.fr>
22403
22404 * tests/torture.at (AT_DATA_STACK_TORTURE)
22405 (Exploding the Stack Size with Alloca)
22406 (Exploding the Stack Size with Malloc): New.
22407
22408 2001-11-12 Akim Demaille <akim@epita.fr>
22409
22410 * src/bison.simple (YYSTACK_REALLOC): New.
22411 (yyparse) [!yyoverflow]: Use it and free the old stack.
22412 Reported by Per Allansson.
22413
22414 2001-11-12 Pascal Bart <pascal.bart@epita.fr>
22415
22416 * src/bison.simple: Define type yystype instead of YYSTYPE, and
22417 define CPP macro, which substitute YYSTYPE by yystype.
22418 * src/reader.c (parse_union_decl): Output yystype/YYSTYPE as we do
22419 with yyltype/YYLTYPE. This allows inclusion of the generated
22420 header within the parser if the compiler, such as GGC, accepts
22421 multiple equivalent #defines.
22422 From Akim.
22423
22424 2001-11-05 Akim Demaille <akim@epita.fr>
22425
22426 * src/reader.c (symbols_output): New, extracted from...
22427 (packsymbols): here.
22428 (reader): Adjust.
22429
22430 2001-11-05 Akim Demaille <akim@epita.fr>
22431
22432 * src/lex.c (parse_percent_token): s/quotearg/quote/.
22433
22434 2001-11-05 Akim Demaille <akim@epita.fr>
22435
22436 * tests/regression.at (AT_TEST_CPP_GUARD_H): Adjust the clean up
22437 pattern.
22438
22439 2001-11-05 Akim Demaille <akim@epita.fr>
22440
22441 * src/options.h (struct option_table_struct): set_flags is void*.
22442 * src/options.c (longopts): Support `--output' and `%output'.
22443 (usage): Adjust.
22444 * src/lex.h (tok_setopt): Remove, replaced with...
22445 (tok_intopt, tok_stropt): these new guys.
22446 * src/lex.c (getopt.h): Not needed.
22447 (token_buffer, unlexed_token_buffer): Not const.
22448 (percent_table): Promote `-' over `_' in directive names.
22449 Active `%name-prefix', `file-prefix', and `output'.
22450 (parse_percent_token): Accept possible arguments to directives.
22451 Promote `-' over `_' in directive names.
22452
22453 2001-11-04 Akim Demaille <akim@epita.fr>
22454
22455 * doc/bison.texinfo (Decl Summary): Split the list into
22456 `directives for grammars' and `directives for bison'.
22457 Sort'em.
22458 Add description of `%name-prefix', `file-prefix', and `output'.
22459 Promote `-' over `_' in directive names.
22460 (Bison Options): s/%locactions/%locations/. Nice Freudian slip.
22461 Simplify the description of `--name-prefix'.
22462 Promote `-' over `_' in directive names.
22463 Promote `--output' over `--output-file'.
22464 Fix the description of `--defines'.
22465 * tests/output.at: Exercise %file-prefix and %output.
22466
22467 2001-11-02 Akim Demaille <akim@epita.fr>
22468
22469 * doc/refcard.tex: Update.
22470
22471 2001-11-02 Akim Demaille <akim@epita.fr>
22472
22473 * src/symtab.h (SUNDEF): New.
22474 * src/symtab.c (bucket_new): Init user_token_number to SUNDEF to
22475 stand for `uninitialized', instead of 0.
22476 * src/reader.c (packsymbols, parse_thong_decl): Adjust.
22477 * src/lex.c (lex): Adjust.
22478
22479 * tests/calc.at (_AT_DATA_CALC_Y): Declare a token for EOF.
22480 Number it 0.
22481 Let yylex return it instead of a plain 0.
22482 Reported by Dick Streefland.
22483
22484 2001-11-02 Akim Demaille <akim@epita.fr>
22485
22486 * tests/regression.at (Mixing %token styles): New test.
22487
22488 2001-11-02 Akim Demaille <akim@epita.fr>
22489
22490 * src/reader.c (parse_thong_decl): Formatting changes.
22491 (token_translations_init): New, extracted from...
22492 (packsymbols): Here.
22493 Adjust.
22494
22495 2001-11-01 Akim Demaille <akim@epita.fr>
22496
22497 * tests/regression.at (AT_TEST_CPP_GUARD_H): New.
22498 Check that `9foo.y' produces correct cpp guards.
22499 * src/files.c (compute_header_macro): Prepend `BISON_' to CPP
22500 guards.
22501 Reported by Wwp.
22502
22503 2001-11-01 Akim Demaille <akim@epita.fr>
22504
22505 * tests/regression.at (Invalid input: 2): New.
22506 * src/lex.c (unlexed_token_buffer): New.
22507 (lex, unlex): Adjust: when unlexing, be sure to save token_buffer
22508 too.
22509 Reported by Wwp.
22510
22511 2001-11-01 Akim Demaille <akim@epita.fr>
22512
22513 * tests/calc.at: Catch up with 1.30.
22514 * configure.in: Bump to 1.49a.
22515 Adjust to newer Autotest.
22516
22517 2001-10-19 Pascal Bart <pascal.bart@epita.fr>
22518
22519 * src/conflicts.c: Move global variables rrc_total and src_total ...
22520 (print_conflicts): here.
22521 * src/output.c (output): Free global variable user_toknums.
22522 * src/lex.c (token_obstack): Become static.
22523
22524 2001-10-18 Akim Demaille <akim@epita.fr>
22525
22526 * tests/atlocal.in (GCC): Add.
22527 * tests/calc.at: s/m4_match/m4_bmatch/.
22528 s/m4_patsubst/m4_bpatsubst/.
22529 (AT_CHECK_CALC): Check the compiler's stderr only if it's GCC.
22530 * configure.in: AC_SUBST(GCC).
22531
22532 2001-10-14 Marc Autret <autret_m@epita.fr>
22533
22534 * src/options.c (create_long_option_table): Fix.
22535
22536 2001-10-10 Akim Demaille <akim@epita.fr>
22537
22538 * src/bison.simple: Be sure to set YYSTACK_USE_ALLOCA.
22539
22540 2001-10-04 Akim Demaille <akim@epita.fr>
22541
22542 * src/reader.c (parse_union_decl): Push the caracters in
22543 union_obstack, not attrs_obstack.
22544
22545 2001-10-04 Akim Demaille <akim@epita.fr>
22546
22547 Merge in the branch 1.29.
22548
22549 * src/reader.c (packsymbols): Use a temporary obstack for
22550 `%%tokendef', since output_stack is already used elsewhere.
22551
22552 2001-10-02 Akim Demaille <akim@epita.fr>
22553
22554 Bump 1.29d.
22555
22556 2001-10-02 Akim Demaille <akim@epita.fr>
22557
22558 Version 1.29c.
22559
22560 2001-10-02 Akim Demaille <akim@epita.fr>
22561
22562 * tests/regression.at (Invalid CPP headers): New.
22563 From Alexander Belopolsky.
22564 * src/files.c (compute_header_macro): Map non alnum chars to `_'.
22565
22566 2001-10-02 Akim Demaille <akim@epita.fr>
22567
22568 * tests/regression.at (Invalid input): New.
22569 * src/lex.c (lex): Be sure to set `token_buffer' in any case.
22570 Reported by Shura.
22571
22572 2001-10-02 Akim Demaille <akim@epita.fr>
22573
22574 * tests/calc.at: Now that --debug works, the tests must be adjusted.
22575
22576 2001-10-02 Akim Demaille <akim@epita.fr>
22577
22578 * src/output.c (output_parser): Assert `skeleton'.
22579 * src/files.c (skeleton_find): Look harder for skeletons on DOSish
22580 systems.
22581 From Shura.
22582
22583 2001-10-01 Marc Autret <autret_m@epita.fr>
22584
22585 * src/lex.h: Echo modifications.
22586 * src/lex.c (unlex): Parameter is now token_t.
22587 From Hans Aberg.
22588
22589 2001-10-01 Marc Autret <autret_m@epita.fr>
22590
22591 * src/main.c: Include lex.h.
22592 From Hans Aberg.
22593
22594 2001-09-29 Akim Demaille <akim@epita.fr>
22595
22596 * src/getargs.c (longopts): `--debug' is `-t', not `-d'.
22597
22598 2001-09-28 Akim Demaille <akim@epita.fr>
22599
22600 * tests/testsuite.at: Update to newer Autotest.
22601 * tests/Makefile.am (EXTRA_DIST): bison is not to be shipped.
22602
22603 2001-09-27 Akim Demaille <akim@epita.fr>
22604
22605 Position independent wrapper.
22606
22607 * tests/bison: Remove.
22608 * tests/bison.in: New.
22609 * configure.in: Adjust.
22610
22611 2001-09-27 Paul Eggert <eggert@twinsun.com>
22612
22613 Port quotearg fixes from tar 1.13.24.
22614
22615 * lib/quotearg.c: BSD/OS 4.1 wchar.h requires FILE and struct
22616 tm to be declared.
22617 (HAVE_MBSINIT): Undef if !HAVE_MBRTOWC.
22618 (mbsinit): Define to 1 if !defined mbsinit && !HAVE_MBSINIT.
22619
22620 * m4/Makefile.am (EXTRA_DIST): Add mbrtowc.m4.
22621 * m4/mbrtowc.m4: New file.
22622 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Check for mbsinit and stddef.h.
22623 Use jm_FUNC_MBRTOWC instead of AC_CHECK_FUNCS(mbrtowc).
22624
22625 2001-09-27 Akim Demaille <akim@epita.fr>
22626
22627 Bump to 1.29c.
22628
22629 2001-09-27 Akim Demaille <akim@epita.fr>
22630
22631 Version 1.29b.
22632
22633 2001-09-25 Akim Demaille <akim@epita.fr>
22634
22635 * src/system.h: Include `xalloc.h'.
22636 Remove it from the C files.
22637 * src/files.c (output_files): Free the obstacks.
22638 * src/lex.c (init_lex): Rename as...
22639 (lex_init): this.
22640 (lex_free): New.
22641 * src/main.c (main): Use it.
22642
22643 2001-09-24 Marc Autret <autret_m@epita.fr>
22644
22645 * src/vcg.c (open_edge, close_edge, open_node, close_node): Change
22646 to output informations in fout (FILE*).
22647 (open_graph, close_graph): Likewise.
22648 (output_graph, output_edge, output_node): Likewise.
22649 * src/vcg.h: Update function prototypes.
22650 * src/print_graph.c (print_graph): Open output graph file.
22651 (print_actions): Adjust.
22652 * src/files.h: Remove extern declaration.
22653 * src/files.c: Remove graph_obstack declaration.
22654 (open_files): Remove graph_obstack initialization.
22655 (output_files): Remove graph_obstack saving.
22656
22657 2001-09-24 Marc Autret <autret_m@epita.fr>
22658
22659 * src/files.c (compute_output_file_names): Fix.
22660
22661 2001-09-24 Marc Autret <autret_m@epita.fr>,
22662 Akim Demaille <akim@epita.fr>
22663
22664 * src/reader.c (reader): Remove call to free_symtab ().
22665 * src/main.c (main): Call it here.
22666 Include symtab.h.
22667 * src/conflicts.c (initialize_conflicts): Rename as...
22668 (solve_conflicts): this.
22669 * src/print.c (print_core, print_actions, print_state)
22670 (print_grammar): Dump to a file instead a `output_obstack'.
22671 (print_results): Dump `output_obstack', and then proceed with the
22672 FILE *.
22673 * src/files.c (compute_output_file_names, close_files): New.
22674 (output_files): Adjust.
22675 * src/main.c (main): Adjust.
22676
22677 2001-09-23 Marc Autret <autret_m@epita.fr>
22678
22679 * src/files.c (compute_header_macro): Computes header macro name
22680 from spec_defines_file when given.
22681
22682 2001-09-23 Marc Autret <autret_m@epita.fr>
22683
22684 * src/files.c (output_files): Add default extensions.
22685
22686 2001-09-22 Akim Demaille <akim@epita.fr>
22687
22688 * src/conflicts.c (finalize_conflicts): Rename as...
22689 (free_conflicts): this.
22690
22691 2001-09-22 Akim Demaille <akim@epita.fr>
22692
22693 * src/gram.c (gram_free): Rename back as...
22694 (dummy): this.
22695 (output_token_translations): Free `token_translations'.
22696 * src/symtab.c (free_symtab): Free the tag field.
22697
22698 2001-09-22 Akim Demaille <akim@epita.fr>
22699
22700 Remove `translations' as it is always set to true.
22701
22702 * src/gram.h: Adjust.
22703 * src/reader.c (packsymbols, parse_token_decl): Adjust
22704 * src/print.c (print_grammar): Adjust.
22705 * src/output.c (output_token_translations): Adjust.
22706 * src/lex.c (lex): Adjust.
22707 * src/gram.c: Be sure the set pointers to NULL.
22708 (dummy): Rename as...
22709 (gram_free): this.
22710
22711 2001-09-22 Akim Demaille <akim@epita.fr>
22712
22713 * configure.in: Invoke AM_LIB_DMALLOC.
22714 * src/system.h: Use dmalloc.
22715 * src/LR0.c: Be sure to have pointers initialized to NULL.
22716 (allocate_itemsets): Allocate kernel_items only if needed.
22717
22718 2001-09-22 Akim Demaille <akim@epita.fr>
22719
22720 * configure.in: Bump to 1.29b.
22721 * tests/Makefile.am (DISTCLEANFILES): Add package.m4.
22722 * tests/calc.at (_AT_DATA_CALC_Y): #undef malloc so that we don't
22723 need xmalloc.c in calc.y.
22724 From Pascal Bart.
22725
22726 2001-09-21 Akim Demaille <akim@epita.fr>
22727
22728 Version 1.29a.
22729 * Makefile.maint, config/config.guess, config/config.sub,
22730 * config/missing: Update from masters.
22731 * tests/Makefile.am ($(srcdir)/$(TESTSUITE)): No longer depend
22732 upon package.m4.
22733 * configure.in (ALL_LINGUAS): Add `tr'.
22734
22735 2001-09-21 Akim Demaille <akim@epita.fr>
22736
22737 * tests/Makefile.am (package.m4): Move to...
22738 ($(srcdir)/$(TESTSUITE)): here.
22739
22740 2001-09-20 Akim Demaille <akim@epita.fr>
22741
22742 * src/complain.c: No longer try to be standalone: use system.h.
22743 Don't assume __STDC__ is defined to 1. Just test if it is defined.
22744 * src/complain.h: Likewise.
22745 * src/reduce.c (useless_nonterminals, inaccessable_symbols):
22746 Remove the unused variable `n'.
22747 From Albert Chin-A-Young.
22748
22749 2001-09-18 Marc Autret <autret_m@epita.fr>
22750
22751 * doc/bison.1: Update.
22752 * doc/bison.texinfo (Bison Options): Update --defines and --graph
22753 descriptions.
22754 (Option Cross Key): Update.
22755 Add --graph.
22756
22757 2001-09-18 Marc Autret <autret_m@epita.fr>
22758
22759 * tests/regression.at: New test (comment in %union).
22760
22761 2001-09-18 Marc Autret <autret_m@epita.fr>
22762
22763 * src/reader.c (parse_union_decl): Do not output '/'. Let copy_comment
22764 do that.
22765 Reported by Keith Browne.
22766
22767 2001-09-18 Marc Autret <autret_m@epita.fr>
22768
22769 * tests/output.at: Add tests for --defines and --graph.
22770
22771 2001-09-18 Marc Autret <autret_m@epita.fr>
22772
22773 * tests/output.at: Removes tests of %{header,src}_extension features.
22774
22775 2001-09-18 Akim Demaille <akim@epita.fr>
22776
22777 * tests/Makefile.am (package.m4): New.
22778 * tests/calc.at (_AT_CHECK_CALC): Just run `calc input'.
22779 (_AT_CHECK_CALC_ERROR): Likewise.
22780 Factor the `, ' part of verbose error messages.
22781
22782 2001-09-18 Marc Autret <autret_m@epita.fr>
22783
22784 * src/getargs.c (longopts): Declare --defines and --graph as options
22785 with optional arguments.
22786 * src/files.h: Add extern declarations.
22787 * src/files.c (spec_graph_file, spec_defines_file): New.
22788 (output_files): Update.
22789 Remove CPP-outed code.
22790
22791 2001-09-18 Marc Autret <autret_m@epita.fr>
22792
22793 Turn off %{source,header}_extension feature.
22794
22795 * src/files.c (compute_exts_from_gf): Update.
22796 (compute_exts_from_src): Update.
22797 (output_files): CPP-out useless code.
22798 * src/files.h: Remove {header,source}_extension extern declarations.
22799 * src/reader.c (parse_dquoted_param): CPP-out.
22800 (parse_header_extension_decl): Remove.
22801 (parse_source_extension_decl): Remove.
22802 (read_declarations): Remove cases tok_{hdrext,srcext}.
22803 * src/lex.c (percent_table): Remove {header,source}_extension entries.
22804 * src/lex.h (token_t): Remove tok_hdrext and tok_srcext.
22805
22806 2001-09-10 Akim Demaille <akim@epita.fr>
22807
22808 * tests/output.at (AT_CHECK_BISON_FLAGS, AT_CHECK_BISON_PERCENT):
22809 (AT_CHECK_BISON_PERCENT_FLAGS): Merge into...
22810 (AT_CHECK_OUTPUT): this.
22811 Merely check ls' exit status, its output is useless.
22812
22813 2001-09-10 Akim Demaille <akim@epita.fr>
22814
22815 * tests/calc.at: Use m4_match.
22816 (_AT_DATA_CALC_Y): Check `yyin != NULL', not `stdin != NULL'.
22817
22818 2001-09-10 Marc Autret <autret_m@epita.fr>,
22819 Akim Demaille <akim@epita.fr>
22820
22821 * src/vcg.h (graph_s): color, textcolor, bordercolor are now
22822 enum color_e.
22823 * src/print_graph.c (print_graph): Initalize graph.layoutalgorithm
22824 to `normal'.
22825 * src/reader.c (parse_token_decl): Initialize token with tok_eof.
22826 * src/lex.h: Adjust prototype.
22827 (token_t): Add `tok_undef'.
22828 * src/lex.c (struct percent_table_struct): Retval is now a token_t.
22829 (parse_percent_token): Now returns token_t.
22830 Add default statement in switch.
22831 (lex): Separate `c' as an input variable, from the token_t result
22832 part.
22833 (unlexed): Is a token_t.
22834
22835 2001-09-10 Akim Demaille <akim@epita.fr>
22836
22837 * configure.in: Bump to 1.29a.
22838
22839 2001-09-07 Akim Demaille <akim@epita.fr>
22840
22841 Version 1.29.
22842
22843 2001-08-30 Akim Demaille <akim@epita.fr>
22844
22845 * tests/atgeneral.m4, tests/atconfig.in, tests/suite.at: Remove.
22846 * m4/atconfig.m4: Remove.
22847 * tests/testsuite.at, tests/atlocal.in, tests/output.at,
22848 * tests/bison: New.
22849 * tests/regression.at, tests/calc.at: Use m4_define, AT_BANNER,
22850 m4_if, m4_patsubst, and m4_regexp.
22851 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Use an
22852 `input' file instead of echo.
22853
22854 2001-08-29 Akim Demaille <akim@epita.fr>
22855
22856 Bump to 1.28e.
22857
22858 2001-08-29 Akim Demaille <akim@epita.fr>
22859
22860 Version 1.28d.
22861
22862 2001-08-29 Paul Eggert <eggert@twinsun.com>
22863
22864 * src/bison.simple (yyparse): Don't take the address of an
22865 item before the start of an array, as that doesn't conform to
22866 the C Standard.
22867
22868 2001-08-29 Robert Anisko <anisko_r@epita.fr>
22869
22870 * doc/bison.texinfo (Location Tracking Calc): New node.
22871
22872 2001-08-29 Paul Eggert <eggert@twinsun.com>
22873
22874 * src/output.c (output): Do not define const, as this now
22875 causes more problems than it cures.
22876
22877 2001-08-29 Akim Demaille <akim@epita.fr>
22878
22879 * doc/bison.texinfo: Modernize `@node' and `@top' use: just name
22880 the nodes.
22881 Be sure to tag the `detailmenu'.
22882
22883 2001-08-29 Akim Demaille <akim@epita.fr>
22884
22885 * Makefile.maint (do-po-update): Wget refuses to overwrite files:
22886 download in a tmp dir.
22887
22888 2001-08-28 Marc Autret <autret_m@epita.fr>
22889
22890 * config/depcomp: New file.
22891
22892 2001-08-28 Marc Autret <autret_m@epita.fr>
22893
22894 * doc/bison.1 (mandoc): Adjust.
22895 From Juan Manuel Guerrero.
22896
22897 2001-08-28 Marc Autret <autret_m@epita.fr>
22898
22899 * src/print_graph.c (print_state): Fix.
22900
22901 2001-08-27 Marc Autret <autret_m@epita.fr>
22902
22903 * src/vcg.h (classname_s, infoname_s, node_s): Constify the
22904 char * members.
22905 Echo modifications to the functions prototypes.
22906 * src/vcg.c (add_classname, add_infoname): Adjust arguments.
22907
22908 2001-08-27 Marc Autret <autret_m@epita.fr>
22909
22910 * src/vcg.c: Include `xalloc.h'.
22911 (add_colorentry): New.
22912 (add_classname): New.
22913 (add_infoname): New.
22914 * src/vcg.h: Add new prototypes.
22915
22916 2001-08-27 Akim Demaille <akim@epita.fr>
22917
22918 * Makefile.maint: Sync. again with CVS Autoconf.
22919
22920 2001-08-27 Akim Demaille <akim@epita.fr>
22921
22922 * Makefile.maint: Formatting changes.
22923 (po-update, cvs-update, update): New targets.
22924 (AMTAR): Remove.
22925
22926 2001-08-27 Akim Demaille <akim@epita.fr>
22927
22928 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
22929 * Makefile.maint: Sync. with CVS Autoconf.
22930
22931 2001-08-27 Marc Autret <autret_m@epita.fr>
22932
22933 * src/vcg.h (struct infoname_s): New.
22934 (struct colorentry_s): New.
22935 (graph_s): New fields {vertical,horizontal}_order in structure.
22936 Add `infoname' field.
22937 Add `colorentry' field;
22938 * src/vcg_defaults.h (G_VERTICAL_ORDER): New.
22939 (G_HORIZONTAL_ORDER): New.
22940 (G_INFONAME): New.
22941 (G_COLORENTRY): New.
22942 * src/vcg.c (output_graph): Add output of {vertical,horizontal}_order.
22943 Add output of `infoname'.
22944 Add output of `colorentry'.
22945
22946 2001-08-27 Marc Autret <autret_m@epita.fr>
22947
22948 * src/reader.c (parse_dquoted_param): Rename variable `index' to `i'.
22949 This one shadowed a global parameter.
22950
22951 2001-08-24 Marc Autret <autret_m@epita.fr>
22952
22953 * src/print_graph.c (node_output_size): Declared POSIX `size_t' type,
22954 instead of `unsigned'.
22955 (print_state): Do not call obstack_object_size () in obstack_grow ()
22956 to avoid macro variables shadowing.
22957
22958 2001-08-23 Marc Autret <autret_m@epita.fr>
22959
22960 * src/lex.c (percent_table): Typo: s/naem/name/.
22961 Add graph option.
22962 Normalize new options declarations.
22963
22964 2001-08-20 Pascal Bart <pascal.bart@epita.fr>
22965
22966 * tests/suite.at: Exercise %header_extension and %source_extension.
22967
22968 2001-08-16 Marc Autret <autret_m@epita.fr>
22969
22970 * src/reader.c (parse_dquoted_param): New.
22971 (parse_header_extension_decl): Use it.
22972 (parse_source_extension_decl): Likewise.
22973
22974 2001-08-16 Marc Autret <autret_m@epita.fr>
22975
22976 * src/vcg.c: Remove includes of `complain.h' and `xalloc.h'.
22977 (get_xxxx_str): Use assert () instead of complain ().
22978 Remove return invokations in default cases.
22979 (get_decision_str): Modify default behaviour. Remove second argument.
22980 Echo modifications on calls.
22981 (output_graph): Fix.
22982
22983 2001-08-16 Marc Autret <autret_m@epita.fr>
22984
22985 * src/getargs.c (usage): Update with ``-g, --graph''.
22986
22987 2001-08-16 Marc Autret <autret_m@epita.fr>
22988
22989 * doc/bison.texinfo (Bison Options): Add items `-g', `--graph'.
22990 (Option Cross Key): Likewise.
22991 * doc/bison.1: Update.
22992
22993 2001-09-25 Pascal Bart <pascal.bart@epita.fr>
22994
22995 * src/output.c (output_master_parser): Don't finish action_obstack.
22996 (output_parser): Don't care about the muscle action, here.
22997 (prepare): Copy the action_obstack in the action muscle.
22998 (output): Free action_obstack.
22999
23000 2001-09-23 Pascal Bart <pascal.bart@epita.fr>
23001
23002 * src/reader.c (parse_union_decl): Add new obstack union_obstack. Which
23003 will contain `%union' declaration.
23004 (parse_union_decl): Delete #line directive output.
23005 (parse_union_decl): Substitute /attrs_obstack/union_obstack for all
23006 informations about %union.
23007 (parse_union_decl): Copy the union_obstack in the muscle stype.
23008 * src/bison.simple: Add new #line directive.
23009 Add typdef %%stype YYSTYPE.
23010
23011 2001-09-23 Pascal Bart <pascal.bart@epita.fr>
23012
23013 * src/bison.simple: Add new `#line' directive.
23014
23015 2001-09-22 Pascal Bart <pascal.bart@epita.fr>
23016
23017 * src/bison.simple: New `#line' directive.
23018 * src/output.c (output_parser): Support new dynamic muscle input_line.
23019
23020 2001-09-22 Marc Autret <autret_m@epita.fr>
23021
23022 * src/output.c (output_master_parser): New.
23023 (output_parser): Be more re-entrant.
23024
23025 2001-09-21 Marc Autret <autret_m@epita.fr>
23026
23027 * src/reader.c (copy_definition, parse_union_decl): Update and use
23028 `linef' muscle.
23029 (copy_action): Likewise.
23030 Use obstack_1grow ().
23031 * src/muscle_tab.c (muscle_init): Add muscle `linef'.
23032
23033 2001-09-21 Marc Autret <autret_m@epita.fr>
23034
23035 * src/options.c (option_table): Adjust.
23036 * src/lex.c (parse_percent_token): Fix.
23037
23038 2001-09-20 Pascal Bart <pascal.bart@epita.fr>
23039
23040 * src/options.c (symtab.h): Include it, need by lex.h.
23041
23042 2001-09-20 Pascal Bart <pascal.bart@epita.fr>
23043
23044 * src/lex.c (parse_percent_token): Change type of variable `tx', which
23045 is now an option_table_struct*.
23046 (option_strcmp): New function option_strcmp.
23047 (parse_percent_token): Call option_strcmp.
23048 * src/getargs.c (xalloc.h, options.h): Include it.
23049 (getargs): Call create_long_option_table.
23050 (getargs): Free longopts at the end of the function.
23051 (shortopts): Move in options.c.
23052 * src/options.c (create_long_option_table): New function. Convert
23053 information from option_table to option structure.
23054 * src/reader.c (options.h): Include it.
23055
23056 * src/Makefile.am: Adjust.
23057 * src/options.c (option_table): Create from longopts and percent_table.
23058 * src/getargs.c (longopts): Delete.
23059 * src/lex.c (struct percent_table_struct): Delete.
23060 (percent_table): Delete.
23061 (options.h): Include it.
23062 * src/options.c: Create.
23063 * src/options.h: Create.
23064 Declare enum opt_access_e.
23065 Define struct option_table_struct.
23066
23067 2001-09-20 Marc Autret <autret_m@epita.fr>
23068
23069 * doc/bison.texinfo: Adjust terminologies about prologue and epilogue
23070 sections of Bison.
23071
23072 2001-09-19 Pascal Bart <pascal.bart@epita.fr>
23073
23074 * src/bison.simple: s/%%filename/%%skeleton.
23075 * src/muscle_tab.c (getargs.h): Include it.
23076 (muscle_init): Insert new muscle skeleton.
23077
23078 2001-09-18 Pascal Bart <pascal.bart@epita.fr>
23079
23080 * src/output.c (output_parser): Delete unused variable actions_dumped.
23081
23082 2001-09-07 Pascal Bart <pascal.bart@epita.fr>
23083
23084 * src/output.c (output): Delete call to reader_output_yylsp.
23085 * src/reader.c (reader): Likewise.
23086 * src/reader.h: Delete declaration of reader_output_yylsp.
23087
23088 2001-09-02 Marc Autret <autret_m@epita.fr>
23089
23090 * src/reader.c: Include muscle_tab.h.
23091 (parse_union_decl): Update.
23092 (parse_macro_decl): Rename parse_muscle_decl.
23093 Update to use renamed functions and variable.
23094 (read_declarations, copy_action, read_additionnal_code, : Updated
23095 with correct variables and functions names.
23096 (packsymbols, reader): Likewise.
23097
23098 * src/reader.h (muscle_obstack): Extern declaration update.
23099
23100 * src/output.c: Include muscle_tab.h
23101 In all functions using macro_insert, change by using muscle_insert ().
23102 (macro_obstack): Rename muscle_obstack.
23103 Echo modifications in the whole file.
23104 (MACRO_INSERT_INT): Rename MUSCLE_INSERT_INT.
23105 (MACRO_INSERT_STRING): Rename MUSCLE_INSERT_STRING.
23106 (MACRO_INSERT_PREFIX): Rename MUSCLE_INSERT_PREFIX.
23107
23108 * src/muscle_tab.h: Update double inclusion macros.
23109 (macro_entry_s): Rename muscle_entry_s.
23110 Update prototypes.
23111
23112 * src/muscle_tab.c: Include muscle_tab.h.
23113 Rename macro_tabble to muscle_table.
23114 (mhash1, mhash2, mcmp): Use muscle_entry.
23115 (macro_init): Rename muscle_init. Update.
23116 (macro_insert): Rename muscle_insert. Update.
23117 (macro_find): Rename muscle_find. Update.
23118
23119 * src/main.c: Include muscle_tab.h.
23120 (main): Call muscle_init ().
23121 * src/Makefile.am (bison_SOURCES): Echo modifications.
23122
23123 2001-09-02 Marc Autret <autret_m@epita.fr>
23124
23125 Now the files macro_tab.[ch] are named muscle_tab.[ch].
23126
23127 * src/muscle_tab.c, src/muscle_tab.h: Add files.
23128
23129 2001-09-02 Marc Autret <autret_m@epita.fr>
23130
23131 * src/macrotab.c, src/macrotab.h: Remove.
23132
23133 2001-09-01 Pascal Bart <pascal.bart@epita.fr>
23134
23135 * src/reader.c (copy_guard): Use muscle to specify the `#line'
23136 filename.
23137
23138 2001-09-01 Marc Autret <autret_m@epita.fr>
23139
23140 * tests/calc.at (exp): Now, YYERROR_VERBOSE need to be set
23141 to an explicit value to activate the feature. We do it here.
23142
23143 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
23144
23145 * src/output.c (prepare): Delete the `filename' muscule insertion.
23146 * src/reader.c (copy_action): Use `filename' muscule with `#line'.
23147 (parse_union_decl): Likewise.
23148 * src/macrotab.c (macro_init): Initialize filename by infile.
23149
23150 2001-08-31 Marc Autret <autret_m@epita.fr>
23151
23152 * src/bison.simple (YYLSP_NEEDED): New definition.
23153 * src/output.c (prepare): Add macro insertion of `locations_flag'
23154
23155 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
23156
23157 * src/output.c (prepare): Delete insertion of previous muscles,
23158 and insert the `prefix' muscles.
23159 * src/macrotab.c (macro_init): Likewise.
23160 (macro_init): Initialization prefix directive by `yy'.
23161 * src/bison.simple: Substitute all %%yylex, %%yychar, %%yylval,
23162 %%yydebug, %%yyerror, %%yynerrs and %%yyparse by yylex, yychar,
23163 yylval, yydebug, yyerror, yynerrs and yyparse.
23164 New directive `#define' to substitute yydebug, ... with option
23165 name_prefix.
23166
23167 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
23168
23169 * src/main.c (main): Standardize.
23170 * src/output.c (output_table_data, output_parser): Likewise.
23171 * src/macrotab.h, src/macrotab.c, src/bison.simple: Likewise.
23172
23173 2001-08-31 Pascal Bart <pascal.bart@epita.fr>, Marc Autret <autret_m@epita.fr>
23174
23175 * src/reader.c (read_additionnal_code): Rename %%user_code to
23176 %%epilogue.
23177 * src/output.c (output): Rename %%declarations to %%prologue.
23178 * src/bison.simple: Echo modifications.
23179
23180 2001-08-31 Marc Autret <autret_m@epita.fr>
23181
23182 * src/reader.c (readgram): CleanUp.
23183 (output_token_defines): Likewise.
23184 (packsymbols): Likewise.
23185 (reader): Likewise.
23186 * src/output.c (output): CPP-out useless code.
23187
23188 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
23189
23190 * src/reader.c (reader): Delete obsolete call to function
23191 output_trailers and output_headers.
23192 * src/output.h: Remove obsolete functions prototypes of output_headers
23193 and output_trailers.
23194
23195 2001-08-30 Pascal Bart <pascal.bart@epita.fr>
23196
23197 * src/main.c: Include macrotab.h.
23198 * src/macrotab.h (macro_entry_s): Constify fields.
23199 Adjust functions prototypes.
23200 * src/macrotab.c (macro_insert): Constify key and value.
23201 (macro_find): Constify key.
23202 (macro_insert): Include 'xalloc.h'
23203 (macro_insert): Use XMALLOC.
23204 (macro_find): Constify return value.
23205 * src/output.c (output_table_data): Rename table to table_data.
23206 (output_parser): Constify macro_key, macro_value.
23207
23208 2001-08-30 Marc Autret <autret_m@epita.fr>
23209
23210 * src/reader.c (parse_skel_decl): New.
23211 (read_declarations): Add case `tok_skel', call parse_skel_decl ().
23212 * src/lex.h (token_t): New token `tok_skel'.
23213 * src/lex.c (percent_table): Add skeleton option entry.
23214 Standardize.
23215
23216 2001-08-29 Marc Autret <autret_m@epita.fr>
23217
23218 * src/bison.simple: Add %%user_code directive at the end.
23219 * src/reader.c (read_additionnal_code): New.
23220 (reader): Use it.
23221 * src/output.c (output_program): Remove.
23222 (output): Update.
23223
23224 2001-08-28 Marc Autret <autret_m@epita.fr>
23225
23226 * src/output.c (output_actions): Clean up.
23227 (output_gram): CPP-out useless code.
23228 * src/reader.c (reader): Clean up, CPP-out useless code.
23229
23230 2001-08-28 Pascal Bart <pascal.bart@epita.fr>
23231
23232 * src/output.c (output): Copy attrs_obstack in the '%%definitions'
23233 directive.
23234 * src/bison.simple: Add `%%definitions'.
23235
23236 2001-08-28 Marc Autret <autret_m@epita.fr>
23237
23238 * config/depcomp: New file.
23239
23240 2001-08-27 Paul Eggert <eggert@twinsun.com>
23241
23242 * src/bison.simple (yyparse): Don't take the address of an
23243 item before the start of an array, as that doesn't conform to
23244 the C Standard.
23245
23246 2001-08-27 Robert Anisko <robert.anisko@epita.fr>
23247
23248 * src/output.c (output): Remove the initialization of the macro
23249 obstack. It was done too late here.
23250
23251 * src/reader.c (parse_macro_decl): Fix. Use of the macro obstack was
23252 completely wrong.
23253 (reader): Initialize the macro obstack here, since we need it to grow
23254 '%define' directives.
23255
23256 * src/reader.h: Declare the macro obstack as extern.
23257
23258 2001-08-27 Robert Anisko <robert.anisko@epita.fr>
23259
23260 * src/output.c (output_parser): Fix. Store single '%' characters in
23261 the output obstack instead of throwing them away.
23262
23263 2001-08-27 Akim Demaille <akim@epita.fr>
23264
23265 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
23266
23267 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
23268
23269 * lib/Makefile.am: Adjust.
23270
23271 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
23272
23273 * src/bison.simple: Update and add '%%' directives.
23274
23275 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
23276
23277 * src/reader.c (reader): Remove calls to 'output_headers' and
23278 'output_trailers'. Remove some C output.
23279 (readgram): Disable a piece of code that was writing a default
23280 definition for 'YYSTYPE'.
23281 (reader_output_yylsp): Remove.
23282 (packsymbols): Output token defintions to a macro.
23283 (copy_definition): Disable C output.
23284
23285 * src/reader.c (parse_macro_decl): New function used to parse macro
23286 declarations.
23287 (copy_string2): Put the body of copy_string into this new function.
23288 Add a parameter to let the caller choose whether he wants to copy the
23289 string delimiters or not.
23290 (copy_string): Be a simple call to copy_string2 with the last argument
23291 bound to true.
23292 (read_declarations): Add case for macro definition.
23293 (copy_identifier): New.
23294 (parse_macro_decl): Read macro identifiers using copy_identifier
23295 rather than lex.
23296
23297 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
23298
23299 * src/output.c (prepare): Add prefixed names.
23300 (output_parser): Output semantic actions.
23301 (output_parser): Fix bug on '%%line' directives.
23302
23303 * src/output.c (output_headers): Remove. The C code printed by this
23304 function should now be in the skeletons.
23305 (output_trailers): Remove.
23306 (output): Disable call to 'reader_output_yylsp'.
23307 (output_rule_data): Do not output tables to the table obstack.
23308
23309 * src/output.c: Remove some C dedicated output.
23310 Improve the use of macro and output obstacks.
23311 (output_defines): Remove.
23312
23313 * src/output.c (output_token_translations): Associate 'translate'
23314 table with a macro. No output to the table obstack.
23315 (output_gram): Same for 'rhs' and 'prhs'.
23316 (output_stos): Same for 'stos'.
23317 (output_rule_data): Same for 'r1' and 'r2'.
23318 (token_actions): Same for 'defact'.
23319 (goto_actions): Same for 'defgoto'.
23320 (output_base): Same for 'pact' and 'pgoto'.
23321 (output_table): Same for 'table'.
23322 (output_check): Same for 'check'.
23323
23324 * src/output.c (output_table_data): New function.
23325 (output_short_table): Remove.
23326 (output_short_or_char_table): Remove.
23327
23328 * src/output.c (output_parser): Replace most of the skeleton copy code
23329 with something new. Skeletons are now processed character by character
23330 rather than line by line, and Bison looks for '%%' macros. This is the
23331 first step in making Bison's output process (a lot) more flexible.
23332 (output_parser): Use the macro table.
23333
23334 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
23335
23336 * src/main.c (main): Initialize the macro table.
23337
23338 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
23339
23340 * src/lex.c (percent_table): Add tok_define.
23341 * src/lex.h: Add tok_define.
23342
23343 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
23344
23345 * src/macrotab.c: New file.
23346 * src/macrotab.h: New file.
23347 * src/Makefile.am: Update.
23348
23349 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
23350
23351 * lib/hash.c: New file.
23352 * lib/hash.h: New file.
23353 * lib/Makefile.am: Update.
23354
23355 2001-08-15 Akim Demaille <akim@epita.fr>
23356
23357 Version 1.28c.
23358
23359 2001-08-15 Marc Autret <autret_m@epita.fr>
23360
23361 * src/reader.c (readgram): Indent output macro YYSTYPE.
23362 (packsymbols): Likewise.
23363 (output_token_defines): Likewise.
23364 * src/files.c: Standardize.
23365 (compute_header_macro): New.
23366 (defines_obstack_save): New. Use compute_header_macro.
23367 (output_files): Update. Use defines_obstack_save.
23368
23369 2001-08-15 Akim Demaille <akim@epita.fr>
23370
23371 * doc/bison.texinfo (Table of Symbols): Document
23372 YYSTACK_USE_ALLOCA.
23373
23374 2001-08-15 Akim Demaille <akim@epita.fr>
23375
23376 * missing: Update from CVS Automake.
23377 * config/config.guess, config/config.sub, config/texinfo.tex:
23378 Update from gnu.org.
23379
23380 2001-08-15 Akim Demaille <akim@epita.fr>
23381
23382 * Makefile.maint: Sync with CVS Autoconf.
23383
23384 2001-08-14 Pascal Bart <pascal.bart@epita.fr>
23385
23386 * doc/bison.texinfo: Include GNU Free Documentation License from
23387 `fdl.texi'.
23388 * doc/fdl.texi: Add to package.
23389
23390 2001-08-14 Marc Autret <autret_m@epita.fr>
23391
23392 Turn on %{source,header}_extension features.
23393
23394 * src/lex.c (percent_table): Un-CPP out header_extension and
23395 source_extension.
23396 * src/files.c (compute_exts_from_gf): Compare pointers with NULL.
23397 (compute_exts_from_src): Remove conditions. It restores priorities
23398 between options.
23399
23400 2001-08-14 Marc Autret <autret_m@epita.fr>
23401
23402 * src/files.c (compute_base_names): Add extensions computing when
23403 `--file-prefix' used.
23404 Standardize function calls.
23405
23406 2001-08-13 Marc Autret <autret_m@epita.fr>
23407
23408 * src/bison.simple (YYSTACK_USE_ALLOCA): Changed to allow users
23409 defining it (defined but null disables alloca).
23410
23411 2001-08-13 Marc Autret <autret_m@epita.fr>
23412
23413 * src/bison.simple (_yy_memcpy): CPP reformat.
23414
23415 2001-08-13 Pascal Bart <pascal.bart@epita.fr>
23416
23417 * tests/atconfig.in (CPPFLAGS): Fix.
23418
23419 2001-08-10 Pascal Bart <pascal.bart@epita.fr>
23420
23421 * doc/bison.texinfo: Include GNU General Public License from
23422 `gpl.texi'.
23423 * doc/gpl.texi: Add to package.
23424
23425 2001-08-10 Marc Autret <autret_m@epita.fr>
23426
23427 * src/print_graph.h: Fix.
23428 * src/reader.c (read_declarations): Use parse_header_extension_decl ().
23429
23430 2001-08-10 Akim Demaille <akim@epita.fr>
23431
23432 * src/system.h: Provide default declarations for stpcpy, strndup,
23433 and strnlen.
23434
23435 2001-08-10 Robert Anisko <anisko_r@epita.fr>
23436
23437 * doc/bison.texinfo (Locations): Update @$ stuff.
23438
23439 2001-08-09 Robert Anisko <anisko_r@epita.fr>
23440
23441 * src/bison.simple (YYLLOC_DEFAULT): Update.
23442 (yyparse): Adjust.
23443
23444 2001-08-08 Marc Autret <autret_m@epita.fr>
23445
23446 * doc/bison.texinfo: Change @samp{$<@dots{}>} to
23447 @samp{$<@dots{}>@var{n}} in Section Actions in Mid-Rule.
23448 Reported by Fabrice Bauzac.
23449
23450 2001-08-08 Marc Autret <autret_m@epita.fr>
23451
23452 * src/vcg_default.h: Use NULL instead of 0 to initialize pointers.
23453 * src/vcg.c (output_node): Fix.
23454 * src/vcg.h: Cleanup.
23455 * src/print_graph.c: Add comments.
23456 (node_output_size): New global variable. Simplify the formatting of
23457 the VCG graph output.
23458 (print_actions): Unused code is now used. It notifies the final state
23459 and no action states in the VCG graph. It also give the reduce actions.
23460 The `shift and goto' edges are red and the `go to state' edges are
23461 blue.
23462 Get the current node name and node_obstack by argument.
23463 (node_obstack): New variable.
23464 (print_state): Manage node_obstack.
23465 (print_core): Use node_obstack given by argument.
23466 A node is not only computed here but in print_actions also.
23467 (print_graph): CPP out useless code instead of commenting it.
23468
23469 2001-08-07 Pascal Bart <pascal.bart@epita.fr>
23470
23471 * tests/atconfig.in (CPPFLAGS): Fix.
23472
23473 2001-08-07 Akim Demaille <akim@epita.fr>
23474
23475 * src/print_graph.c (quote): New.
23476 (print_core): Use it.
23477
23478 2001-08-06 Akim Demaille <akim@epita.fr>, Marc Autret <autret_m@epita.fr>
23479
23480 * src/vcg.c (complain.h): Include it.
23481 Unepitaize `return' invocations.
23482 [NDEBUG] (main): Remove.
23483 * src/vcg.h (node_t, edge_t, graph_t): Constify the char * members.
23484 * src/files.c (open_files): Initialize graph_obstack.
23485 * src/print_graph.c (print_actions): CPP out useless code.
23486 (print_core): Don't output the last `\n' in labels.
23487 Use `quote'.
23488 * src/files.c (output_files): Output the VCG file.
23489 * src/main.c (main): Invoke print_graph ();
23490
23491 2001-08-06 Marc Autret <autret_m@epita.fr>
23492
23493 Automaton VCG graph output.
23494 Using option ``-g'' or long option ``--graph'', you can generate
23495 a gram_filename.vcg file containing a VCG description of the LALR (1)
23496 automaton of your grammar.
23497
23498 * src/main.c: Call to print_graph() function.
23499 * src/getargs.h: Update.
23500 * src/getargs.c (options): Update to catch `-g' and `--graph' options.
23501 (graph_flag): New flag.
23502 (longopts): Update.
23503 (getargs): Add case `g'.
23504 * src/files.c (graph_obstack): New obstack struct.
23505 (open_files): Initialize new obstack.
23506 (output_files): Saves graph_obstack if required.
23507 * src/files.h (graph_obstack): New extern declaration.
23508 * src/Makefile.am: Add new source files.
23509
23510 2001-08-06 Marc Autret <autret_m@epita.fr>
23511
23512 * src/print_graph.c, src/print_graph.h (graph): New.
23513 * src/vcg.h: New file.
23514 * src/vcg.c: New file, VCG graph handling.
23515
23516 2001-08-06 Marc Autret <autret_m@epita.fr>
23517
23518 Add of %source_extension and %header_extension which specify
23519 the source or/and the header output file extension.
23520
23521 * src/files.c (compute_base_names): Remove initialisation of
23522 src_extension and header_extension.
23523 (compute_exts_from_gf): Update.
23524 (compute_exts_from_src): Update.
23525 (output_files): Update.
23526 * src/reader.c (parse_header_extension_decl): New.
23527 (parse_source_extension_decl): New.
23528 (read_declarations): New case statements for the new tokens.
23529 * src/lex.c (percent_table): Add entries for %source_extension
23530 and %header_extension.
23531 * src/lex.h (token_e): New tokens tok_hdrext and tok_srcext.
23532
23533 2001-08-06 Marc Autret <autret_m@epita.fr>
23534
23535 * configure.in: Bump to 1.28c.
23536 * doc/bison.texinfo: Texinfo thingies.
23537
23538 2001-08-04 Pascal Bart <pascal.bart@epita.fr>
23539
23540 * tests/atconfig.in (CPPFLAGS): Add.
23541 * tests/calc.at (AT_CHECK): Use CPPFLAGS.
23542
23543 2001-08-03 Akim Demaille <akim@epita.fr>
23544
23545 Version 1.28b.
23546
23547 2001-08-03 Akim Demaille <akim@epita.fr>
23548
23549 * tests/Makefile.am (check-local): Ship testsuite.
23550 * tests/calc.at (_AT_DATA_CALC_Y): Prototype all the functions.
23551 Include `string.h'.
23552
23553 2001-08-03 Akim Demaille <akim@epita.fr>
23554
23555 * configure.in: Try using -Wformat when compiling.
23556
23557 2001-08-03 Akim Demaille <akim@epita.fr>
23558
23559 * configure.in: Bump to 1.28b.
23560
23561 2001-08-03 Akim Demaille <akim@epita.fr>
23562
23563 * src/complain.c: Adjust strerror_r portability issues.
23564
23565 2001-08-03 Akim Demaille <akim@epita.fr>
23566
23567 Version 1.28a.
23568
23569 2001-08-03 Akim Demaille <akim@epita.fr>
23570
23571 * src/getargs.c, src/getarg.h (skeleton)): Constify.
23572 * src/lex.c (literalchar): Avoid name clashes on `buf'.
23573 * src/getargs.c: Include complain.h.
23574 * src/files.c, src/files.h (skeleton_find): Avoid name clashes.
23575 * lib/quotearg.c, lib/quotearg.h: Update from fileutils 4.1.
23576
23577 2001-08-03 Akim Demaille <akim@epita.fr>
23578
23579 * src/reader.c (readgram): Display hidden chars in error messages.
23580
23581 2001-08-03 Akim Demaille <akim@epita.fr>
23582
23583 Update to gettext 0.10.39.
23584
23585 2001-08-03 Akim Demaille <akim@epita.fr>
23586
23587 * lib/strspn.c: New.
23588
23589 2001-08-01 Marc Autret <autret_m@epita.fr>
23590
23591 * doc/bison.texinfo: Update.
23592 * doc/bison.1 (mandoc): Update.
23593 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove .c and .h.
23594 * src/files.c: Support output files extensions computing.
23595 (src_extension): New static variable.
23596 (header_extension): New static variable.
23597 (tr): New function.
23598 (get_extension_index): New function, gets the index of an extension
23599 filename in a string.
23600 (compute_exts_from_gf): New function, computes extensions from the
23601 grammar file extension.
23602 (compute_exts_from_src): New functions, computes extensions from the
23603 C source file extension, file given by ``-o'' option.
23604 (compute_base_names): Update.
23605 (output_files): Update.
23606
23607 2001-08-01 Robert Anisko <anisko_r@epita.fr>
23608
23609 * doc/bison.texi: Document @$.
23610 (Locations): New section.
23611
23612 2001-07-18 Akim Demaille <akim@epita.fr>
23613
23614 * Makefile.maint, GNUmakefile: New, from Autoconf 2.52.
23615 * config/prev-version.txt, config/move-if-change: New.
23616 * Makefile.am: Adjust.
23617
23618 2001-07-08 Pascal Bart <pascal.bart@epita.fr>
23619
23620 * src/bison.simple (yyparse): Suppress warning `comparaison
23621 between signed and unsigned'.
23622
23623 2001-07-05 Pascal Bart <pascal.bart@epita.fr>
23624
23625 * src/getargs.h (raw_flag): Remove.
23626 * src/getargs.c: Die on `-r'/`--raw'.
23627 * src/lex.c (parse_percent_token): Die on `%raw'.
23628 * src/reader.c (output_token_defines): Suppress call to `raw_flag'.
23629 * tests/calc.at: Suppress test with option `--raw'.
23630
23631 2001-07-14 Akim Demaille <akim@epita.fr>
23632
23633 * config/: New.
23634 * configure.in: Require Autoconf 2.50.
23635 Update to gettext 0.10.38.
23636
23637 2001-03-16 Akim Demaille <akim@epita.fr>
23638
23639 * doc/bison.texinfo: ANSIfy the examples.
23640
23641 2001-03-16 Akim Demaille <akim@epita.fr>
23642
23643 * getargs.c (skeleton): New variable.
23644 (longopts): --skeleton is a new option.
23645 (shortopts, getargs): -S is a new option.
23646 * getargs.h: Declare skeleton.
23647 * output.c (output_parser): Use it.
23648
23649 2001-03-16 Akim Demaille <akim@epita.fr>
23650
23651 * m4/strerror_r.m4: New.
23652 * m4/error.m4: Run AC_FUNC_STRERROR_R.
23653 * lib/error.h, lib/error.c: Update.
23654
23655 2001-03-16 Akim Demaille <akim@epita.fr>
23656
23657 * src/getargs.c (longopts): Clean up.
23658
23659 2001-02-21 Akim Demaille <akim@epita.fr>
23660
23661 * src/reader.c (gensym): `gensym_count' is your own.
23662 Use a static buf to create the symbol name, as token_buffer is no
23663 longer a buffer.
23664
23665 2001-02-08 Akim Demaille <akim@epita.fr>
23666
23667 * src/conflicts.c (conflict_report): Be sure not to append to res
23668 between two calls, which could happen if both first sprintf were
23669 skipped, but not the first cp += strlen.
23670
23671 2001-02-08 Akim Demaille <akim@epita.fr>
23672
23673 * lib/memchr.c, lib/stpcpy.c, lib/strndup.c, lib/strnlen.c:
23674 New, from fileutils 4.0.37.
23675 * configure.in: Require Autoconf 2.49c. I took some time before
23676 making this decision. This is the only way out for portability
23677 issues in Bison, it would mean way too much duplicate effort to
23678 import in Bison features implemented in 2.49c since 2.13.
23679 AC_REPLACE_FUNCS and AC_CHECK_DECLS the functions above.
23680
23681 2001-02-02 Akim Demaille <akim@epita.fr>
23682
23683 * lib/malloc.c, lib/realloc.c: New, from the fileutils 4.0.37.
23684 * lib/xalloc.h, lib/xmalloc.c: Update.
23685
23686 2001-01-19 Akim Demaille <akim@epita.fr>
23687
23688 Get rid of the ad hoc handling of token_buffer in the scanner: use
23689 the obstacks.
23690
23691 * src/lex.c (token_obstack): New.
23692 (init_lex): Initialize it. No longer call...
23693 (grow_token_buffer): this. Remove it.
23694 Adjust all the places which used it to use the obstack.
23695
23696 2001-01-19 Akim Demaille <akim@epita.fr>
23697
23698 * src/lex.h: Rename all the tokens:
23699 s/\bENDFILE\b/tok_eof/g;
23700 s/\bIDENTIFIER\b/tok_identifier/g;
23701 etc.
23702 Let them be enums, not #define, to ease debugging.
23703 Adjust all the code.
23704
23705 2001-01-18 Akim Demaille <akim@epita.fr>
23706
23707 * src/lex.h (MAXTOKEN, maxtoken, grow_token_buffer): Remove, private.
23708 * src/lex.c (maxtoken, grow_token_buffer): Static.
23709
23710 2001-01-18 Akim Demaille <akim@epita.fr>
23711
23712 Since we now use obstacks, more % directives can be enabled.
23713
23714 * src/lex.c (percent_table): Also accept `%yacc',
23715 `%fixed_output_files', `%defines', `%no_parser', `%verbose', and
23716 `%debug'.
23717 Handle the actions for `%semantic_parser' and `%pure_parser' here,
23718 instead of returning a token.
23719 * src/lex.h (SEMANTIC_PARSER, PURE_PARSER): Remove, unused.
23720 * src/reader.c (read_declarations): Adjust.
23721 * src/files.c (open_files): Don't call `compute_base_names', don't
23722 compute `attrsfile' since they depend upon data which might be
23723 *in* the input file now.
23724 (output_files): Do it here.
23725 * src/output.c (output_headers): Document the fact that this patch
23726 introduces a guaranteed SEGV for semantic parsers.
23727 * doc/bison.texinfo: Document them.
23728 * tests/suite.at: Exercise these %options.
23729
23730 2000-12-20 Akim Demaille <akim@epita.fr>
23731
23732 Also handle the output file (--verbose) with obstacks.
23733
23734 * files.c (foutput): Remove.
23735 (output_obstack): New.
23736 Adjust all dependencies.
23737 * src/conflicts.c: Return a string.
23738 * src/system.h (obstack_grow_string): Rename as...
23739 (obstack_sgrow): this. Be ready to work with non literals.
23740 (obstack_fgrow4): New.
23741
23742 2000-12-20 Akim Demaille <akim@epita.fr>
23743
23744 * src/files.c (open_files): Fix the computation of short_base_name
23745 in the case of `-o foo.tab.c'.
23746
23747 2000-12-20 Akim Demaille <akim@epita.fr>
23748
23749 * src/reader.c (copy_string, copy_comment, copy_comment2, copy_at)
23750 (copy_dollar): Now that everything uses obstacks, get rid of the
23751 FILE * parameters.
23752
23753 2000-12-20 Akim Demaille <akim@epita.fr>
23754
23755 * src/files.c (open_files): Actually the `.output' file is based
23756 on the short_base_name, not base_name.
23757 * tests/suite.at (Checking output file names): Adjust.
23758
23759 2000-12-20 Akim Demaille <akim@epita.fr>
23760
23761 * src/bison.s1: Remove, we now use directly...
23762 * src/bison.simple: this.
23763 * src/Makefile.am: Use pkgdata instead of data.
23764
23765 2000-12-20 Akim Demaille <akim@epita.fr>
23766
23767 * src/files.c (guard_obstack): New.
23768 (open_files): Initialize it.
23769 (output_files): Dump it...
23770 * src/files.h: Export it.
23771 * src/reader.c (copy_guard): Use it.
23772
23773 2000-12-19 Akim Demaille <akim@epita.fr>
23774
23775 * src/files.c (outfile, defsfile, actfile): Removed as global
23776 vars.
23777 (open_files): Don't compute them.
23778 (output_files): Adjust.
23779 (base_name, short_base_name): Be global.
23780 Adjust dependencies.
23781
23782 2000-12-19 Akim Demaille <akim@epita.fr>
23783
23784 * src/files.c (strsuffix): New.
23785 (stringappend): Be just like strcat but allocate.
23786 (base_names): Eve out from open_files.
23787 Try to simplify the rather hairy computation of base_name and
23788 short_base_name.
23789 (open_files): Use it.
23790 * tests/suite.at (Checking output file names): New test.
23791
23792 2000-12-19 Akim Demaille <akim@epita.fr>
23793
23794 * src/system.h (obstack_grow_literal_string): Rename as...
23795 (obstack_grow_string): this.
23796 * src/output.c (output_parser): Recognize `%% actions' instead of
23797 `$'.
23798 * src/bison.s1: s/$/%% actions/.
23799 * src/bison.hairy: Likewise.
23800
23801 2000-12-19 Akim Demaille <akim@epita.fr>
23802
23803 * src/output.c (output_parser): Compute the `#line' lines when
23804 there are.
23805 * src/Makefile.am (bison.simple): Be a simple copy of bison.s1.
23806 Suggested by Hans Aberg.
23807
23808 2000-12-19 Akim Demaille <akim@epita.fr>
23809
23810 Let the handling of the skeleton files be local to the procedures
23811 that use it.
23812
23813 * src/files.c (xfopen, xfclose, skeleton_find, guardfile): No
23814 longer static.
23815 (fparser, open_extra_files): Remove.
23816 (open_files, output_files): Don't take care of fparser.
23817 * src/files.h: Adjust.
23818 * src/output.c (output_parser): Open and close the file to the
23819 skeleton.
23820 * src/reader.c (read_declarations): When %semantic_parser, open
23821 fguard.
23822
23823 2000-12-19 Akim Demaille <akim@epita.fr>
23824
23825 * src/file.h (BISON_SIMPLE, BISON_HAIRY): Move from here...
23826 * src/system.h (BISON_SIMPLE, BISON_HAIRY): ... to here.
23827
23828 2000-12-19 Akim Demaille <akim@epita.fr>
23829
23830 * src/files.c (open_files): Yipee! We no longer need all the code
23831 looking for `/tmp' since we have no tmp file.
23832
23833 2000-12-19 Akim Demaille <akim@epita.fr>
23834
23835 * src/system.h (EXT_TAB, EXT_OUTPUT, EXT_STYPE_H, EXT_GUARD_C):
23836 New macros.
23837 * src/files.c (open_files): Less dependency on MSDOS etc.
23838
23839 2000-12-14 Akim Demaille <akim@epita.fr>
23840
23841 * src/bison.s1 (YYLLOC_DEFAULT): New macro.
23842 Provide a default definition.
23843 Use it when executing the default @ action.
23844 * src/reader.c (reader_output_yylsp): No longer include
23845 `timestamp' and `text' in the default YYLTYPE.
23846
23847 2000-12-12 Akim Demaille <akim@epita.fr>
23848
23849 * src/reader.c (copy_definition, parse_union_decl, copy_action)
23850 (copy_guard): Quote the file names.
23851 Reported by Laurent Mascherpa.
23852
23853 2000-12-12 Akim Demaille <akim@epita.fr>
23854
23855 * src/output.c (output_headers, output_program, output): Be sure
23856 to escape special characters when outputting filenames.
23857 (ACTSTR_PROLOGUE, ACTSTR_EPILOGUE): Remove.
23858 (output_headers): Don't depend on them, Use ACTSTR.
23859
23860 2000-11-17 Akim Demaille <akim@epita.fr>
23861
23862 * lib/obstack.h: Formatting changes.
23863 (obstack_grow, obstack_grow0): Don't cast WHERE at all: it
23864 prevents type checking.
23865 (obstack_ptr_grow, obstack_ptr_grow_fast): When assigning, don't
23866 cast the value to (void *): assigning a `foo *' to a `void *'
23867 variable is valid.
23868 (obstack_int_grow, obstack_int_grow_fast): Don't cast AINT to int.
23869 * src/reader.c (parse_union_decl): Typo: use obstack_1grow to
23870 append characters.
23871
23872 2000-11-17 Akim Demaille <akim@epita.fr>
23873
23874 * tests/Makefile.am (suite.m4, regression.m4, calc.m4): Rename
23875 as...
23876 (suite.m4, regression.m4, calc.m4): these.
23877 * tests/atgeneral.m4: Update from CVS Autoconf.
23878
23879 2000-11-17 Akim Demaille <akim@epita.fr>
23880
23881 * tests/regression.m4 (%union and --defines): New test,
23882 demonstrating a current bug in the obstack implementation.
23883
23884 2000-11-17 Akim Demaille <akim@epita.fr>
23885
23886 * src/bison.s1 (_YY_DECL_VARIABLES, YY_DECL_VARIABLES): New
23887 macros.
23888 Use them to declare the variables which are global or local to
23889 `yyparse'.
23890
23891 2000-11-17 Akim Demaille <akim@epita.fr>
23892
23893 * acconfig.h: Remove, no longer used.
23894
23895 2000-11-07 Akim Demaille <akim@epita.fr>
23896
23897 * src: s/Copyright (C)/Copyright/g.
23898
23899 2000-11-07 Akim Demaille <akim@epita.fr>
23900
23901 * src/reader.c (reader): #define YYLSP_NEEDED to 1 instead of just
23902 defining.
23903 * src/bison.s1: s/#ifdef YYLSP_NEEDED/#if YYLSP_NEEDED/.
23904
23905 2000-11-07 Akim Demaille <akim@epita.fr>
23906
23907 * src/bison.s1 (YYLEX): Use #if instead of #ifdef.
23908 Merge in a single CPP if/else.
23909
23910 2000-11-07 Akim Demaille <akim@epita.fr>
23911
23912 * src/output.c (output): Remove useless variables.
23913 * lib/obstack.c (obstack_grow, obstack_grow0): Rename the second
23914 argument `data' for consistency with the prototypes.
23915 Qualify it `const'.
23916 (obstack_copy, obstack_copy0): Rename the second argument as
23917 `address' for consistency. Qualify it `const'.
23918 * lib/obstack.h (obstack_copy, obstack_copy0, obstack_grow)
23919 (obstack_grow0, obstack_ptr_grow, obstack_ptr_grow_fast): Qualify
23920 `const' their input argument (`data' or `address').
23921 Adjust the corresponding macros to include `const' in casts.
23922
23923 2000-11-03 Akim Demaille <akim@epita.fr>
23924
23925 * src/Makefile.am (INCLUDES): s/PFILE/BISON_SIMPLE/.
23926 s/PFILE1/BISON_HAIRY/.
23927 Adjust dependencies.
23928
23929 2000-11-03 Akim Demaille <akim@epita.fr>
23930
23931 For some reason, this was not applied.
23932
23933 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
23934 `unlink': it's no longer used.
23935
23936 2000-11-03 Akim Demaille <akim@epita.fr>
23937
23938 * src/files.c (skeleton_find): New function, eved out of...
23939 (open_files, open_extra_files): here.
23940
23941 2000-11-03 Akim Demaille <akim@epita.fr>
23942
23943 Don't use `atexit'.
23944
23945 * src/files.c (obstack_save): New function.
23946 (done): Rename as...
23947 (output_files): this.
23948 Use `obstack_save'.
23949 * src/main.c (main): Don't use `atexit' to register `done', since
23950 it no longer has to remove tmp files, just call `output_files'
23951 when there are no errors.
23952
23953 2000-11-02 Akim Demaille <akim@epita.fr>
23954
23955 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
23956 `unlink': it's no longer used.
23957 * src/files.h: Formatting changes.
23958
23959 2000-11-02 Akim Demaille <akim@epita.fr>
23960
23961 Remove the last uses of mktemp and unlink/delete.
23962
23963 * src/files.c (fdefines, ftable): Removed.
23964 (defines_ostack, table_obstack): New.
23965 Adjust dependencies of the former into uses of the latter.
23966 * src/output.c (output_short_or_char_table, output_short_table):
23967 Convert to using obstacks.
23968 * src/reader.c (copy_comment2): Accept one FILE * and two
23969 obstacks.
23970 (output_token_defines, reader_output_yylsp): Use obstacks.
23971 * src/system.h (obstack_fgrow3): New.
23972 * po/POTFILES.in: Adjust.
23973
23974 2000-11-01 Akim Demaille <akim@epita.fr>
23975
23976 Change each use of `fattrs' into a use of `attrs_obstack'.
23977
23978 * src/reader.c (copy_at): Typo: s/yylloc/yyloc/.
23979 * src/files.c (fattrs): Remove.
23980 (attrs_obstack): New.
23981 Adjust all dependencies.
23982 (done): If SEMANTIC_PARSER, dump attrs_obstack into attrsfile.
23983
23984 2000-11-01 Akim Demaille <akim@epita.fr>
23985
23986 Introduce obstacks.
23987 Change each use of `faction' into a use of `action_obstack'.
23988
23989 * lib/obstack.h, lib/obstack.c: New files.
23990 * src/files.c (faction): Remove.
23991 (action_obstack): New.
23992 Adjust all dependencies.
23993
23994 2000-10-20 Akim Demaille <akim@epita.fr>
23995
23996 * lib/quote.h (PARAMS): New macro. Use it.
23997
23998 2000-10-16 Akim Demaille <akim@epita.fr>
23999
24000 * src/output.c (output_short_or_char_table): New function.
24001 (output_short_table, output_token_translations): Use it.
24002 (goto_actions): Use output_short_table.
24003
24004 2000-10-16 Akim Demaille <akim@epita.fr>
24005
24006 * src/symtab.c (bucket_new): New function.
24007 (getsym): Use it.
24008
24009 * src/output.c (output_short_table): New argument to display the
24010 comment associated with the table.
24011 Adjust dependencies.
24012 (output_gram): Use it.
24013 (output_rule_data): Nicer output layout for YYTNAME.
24014
24015 2000-10-16 Akim Demaille <akim@epita.fr>
24016
24017 * src/lex.c (read_typename): New function.
24018 (lex): Use it.
24019 * src/reader.c (copy_dollar): Likewise.
24020
24021 2000-10-16 Akim Demaille <akim@epita.fr>
24022
24023 * src/reader.c (copy_comment2): Expect the input stream to be on
24024 the `/' which is suspected to open a comment, instead of being
24025 called after `//' or `/*' was read.
24026 (copy_comment, copy_definition, parse_union_decl, copy_action)
24027 (copy_guard): Adjust.
24028
24029 2000-10-16 Akim Demaille <akim@epita.fr>
24030
24031 * src/reader.c (parse_expect_decl): Use `skip_white_space' and
24032 `read_signed_integer'.
24033
24034 2000-10-16 Akim Demaille <akim@epita.fr>
24035
24036 * src/reader.c (copy_dollar): New function.
24037 (copy_guard, copy_action): Use it.
24038
24039 2000-10-16 Akim Demaille <akim@epita.fr>
24040
24041 * lib/quote.h, lib/quote.c, lib/quotearg.h, lib/quotearg.c:
24042 * m4/prereq.m4, m4/c-bs-a.m4, m4/mbstate.m4:
24043 New files, from Fileutils 4.0.27.
24044 * src/main.c (printable_version): Remove.
24045 * src/lex.c, src/reader.c: Use `quote'.
24046
24047 2000-10-04 Akim Demaille <akim@epita.fr>
24048
24049 * lib/error.c, lib/error.h: New files, needed by xmalloc.c.
24050
24051 2000-10-04 Akim Demaille <akim@epita.fr>
24052
24053 * doc/bison.texinfo: Various typos spotted by Neil Booth.
24054
24055 2000-10-04 Akim Demaille <akim@epita.fr>
24056
24057 When a literal string is used to define two different tokens,
24058 `bison -v' segfaults.
24059 Reported by Piotr Gackiewicz, and fixed by Neil Booth.
24060
24061 * tests/regression.m4: New file.
24062 Include the core of the sample provided by Piotr Gackiewicz.
24063 * src/reader.c (parse_token_decl): Diagnose bad cases, and proceed
24064 properly.
24065
24066 2000-10-04 Akim Demaille <akim@epita.fr>
24067
24068 * src/reader.c (parse_expect_decl): Keep `count' within the size
24069 of `buffer'.
24070 From Neil Booth.
24071
24072 2000-10-02 Paul Eggert <eggert@twinsun.com>
24073
24074 * bison.s1 (yyparse): Assign the default value
24075 unconditionally, to avoid a GCC warning and make the parser a
24076 tad smaller.
24077
24078 2000-10-02 Akim Demaille <akim@epita.fr>
24079
24080 * src/getargs.c (getargs): Don't dump `--help' on unrecognized
24081 options.
24082
24083 2000-10-02 Akim Demaille <akim@epita.fr>
24084
24085 * src/derives.c, src/print.c, src/reduce.c: To ease the
24086 translation, move some `\n' out of the translated strings.
24087
24088 2000-10-02 Akim Demaille <akim@epita.fr>
24089
24090 The location tracking mechanism is precious for parse error
24091 messages. Nevertheless, it is enabled only when `@n' is used in
24092 the grammar, which is a different issue (you can use it in error
24093 message, but not in the grammar per se). Therefore, there should
24094 be another means to enable it.
24095
24096 * src/getargs.c (getargs): Support `--locations'.
24097 (usage): Report it.
24098 * src/getargs.h (locationsflag): Export it.
24099 * src/lex.c (percent_table): Support `%locations'.
24100 * src/reader.c (yylsp_needed): Remove this variable, now replaced
24101 with `locationsflag'.
24102 * doc/bison.texinfo: Document `--locations' and `%locations'.
24103 Sort the options.
24104 * tests/calc.m4: Test it.
24105
24106 For regularity of the names, replace each
24107 (nolineflag, toknumflag, rawtokenumflag, noparserflag): with...
24108 (no_lineflag, token_tableflag, rawflag, no_parserflag): this.
24109 In addition replace each `flag' with `_flag'.
24110
24111 2000-10-02 Akim Demaille <akim@epita.fr>
24112
24113 Also test parse error messages, including with YYERROR_VERBOSE.
24114
24115 * tests/calc.m4 (calc.y): Add support for `exp = exp' (non
24116 associative).
24117 Use it to check the computations.
24118 Use it to check `nonassoc' is honored.
24119 (AT_DATA_CALC_Y): Equip `calc.y' with YYERROR_VERBOSE when passed
24120 `--yyerror-verbose'.
24121 (_AT_CHECK_CALC): Adjust to this option.
24122 (_AT_CHECK_CALC_ERROR): New macro to check parse error messages.
24123
24124 2000-10-02 Akim Demaille <akim@epita.fr>
24125
24126 Test also `--verbose', `--defines' and `--name-prefix'. Testing
24127 the latter demonstrates a flaw in the handling of non debugging
24128 parsers introduced by myself on 2000-03-16: `#define yydebug 0'
24129 was used in order to simplify:
24130
24131 #if YYDEBUG
24132 if (yydebug)
24133 {
24134 ...
24135 }
24136 #endif
24137
24138 into
24139
24140 if (yydebug)
24141 {
24142 ...
24143 }
24144
24145 unfortunately this leads to a CPP conflict when
24146 `--name-prefix=foo' is used since it produces `#define yydebug
24147 foodebug'.
24148
24149 * src/bison.s1 [!YYDEBUG]: Do not define yydebug.
24150 (YYDPRINTF): New macro.
24151 Spread its use.
24152 * tests/calc.m4 (AT_CHECK_CALC): Do require a title, build it from
24153 the bison options.
24154 Also test `--verbose', `--defines' and `--name-prefix'.
24155
24156 2000-10-02 Akim Demaille <akim@epita.fr>
24157
24158 Improve the readability of the produced parsers.
24159
24160 * src/bison.s1: Formatting changes.
24161 Improve the comment related to the `$' mark.
24162 (yydefault): Don't fall through to `yyresume': `goto' there.
24163 * src/output.c (output_parser): When the `$' is met, skip the end
24164 of its line.
24165 New variable, `number_of_dollar_signs', to check there's exactly
24166 one `$' in the parser skeleton.
24167
24168 2000-10-02 Akim Demaille <akim@epita.fr>
24169
24170 * lib/xstrdup.c: New file, from the fileutils.
24171 * src/reader.c (parse_token_decl, get_type_name, parse_type_decl)
24172 (parse_assoc_decl, parse_thong_decl, get_type): Use `xstrdup'
24173 instead of strlen + xmalloc + strcpy.
24174 * src/symtab.c (copys): Remove, use xstrdup instead.
24175
24176 2000-10-02 Akim Demaille <akim@epita.fr>
24177
24178 * src/gram.h (associativity): New enum type which replaces the
24179 former CPP macros `RIGHT_ASSOC', `LEFT_ASSOC' and `NON_ASSOC' with
24180 `right_assoc', `left_assoc' and `non_assoc'.
24181 Adjust all dependencies.
24182 * src/reader.c: Formatting changes.
24183 (LTYPESTR): Don't define it, use it as a literal in
24184 `reader_output_yylsp'.
24185 * src/symtab.h (symbol_class): New enum type which replaces the
24186 former CPP macros `SUNKNOWN', `STOKEN and `SNTERM' with
24187 `sunknown', `stoken and `snterm'.
24188
24189 2000-10-02 Akim Demaille <akim@epita.fr>
24190
24191 * src/getargs.c (fixed_outfiles): Rename as...
24192 (yaccflag): for consistency and accuracy.
24193 Adjust dependencies.
24194
24195 2000-10-02 Akim Demaille <akim@epita.fr>
24196
24197 Use the more standard files `xalloc.h' and `xmalloc.c' instead of
24198 Bison's `allocate.c' and `alloc.h'. This patch was surprisingly
24199 difficult and introduced a lot of core dump. It turns out that
24200 Bison used an implementation of `xmalloc' based on `calloc', and
24201 at various places it does depend upon the initialization to 0. I
24202 have not tried to isolate the pertinent places, and all the former
24203 calls to Bison's `xmalloc' are now using `XCALLOC'. Someday,
24204 someone should address this issue.
24205
24206 * src/allocate.c, src/alloc.h, m4/bison-decl.m4: Remove.
24207 * lib/xmalloc.c, lib/xalloc.h, m4/malloc.m4, m4/realloc.m4: New
24208 files.
24209 Adjust dependencies.
24210 * src/warshall.h: New file.
24211 Propagate.
24212
24213 2000-10-02 Akim Demaille <akim@epita.fr>
24214
24215 Various anti-`extern in *.c' changes.
24216
24217 * src/system.h: Include `assert.h'.
24218
24219 2000-10-02 Akim Demaille <akim@epita.fr>
24220
24221 * src/state.h (nstates, final_state, first_state, first_shift)
24222 (first_reduction): Move their exportation from here...
24223 * src/LR0.h: to here.
24224 Adjust dependencies.
24225 * src/getargs.c (statisticsflag): New variable.
24226 Add support for `--statistics'.
24227 Adjust dependencies.
24228
24229 Remove a lot of now useless `extern' statements in most files.
24230
24231 2000-10-02 Akim Demaille <akim@epita.fr>
24232
24233 * src/LR0.h: New file.
24234 Propagate its use.
24235
24236 2000-10-02 Akim Demaille <akim@epita.fr>
24237
24238 * src/print.h: New file.
24239 Propagate its use.
24240 * src/print.c: Formatting and ordering changes.
24241 (verbose, terse): Replace with...
24242 (print_results): this new function.
24243 Adjust dependencies.
24244
24245 2000-10-02 Akim Demaille <akim@epita.fr>
24246
24247 * src/conflicts.c (conflict_report): New function.
24248 (conflict_log, verbose_conflict_log): Replace with...
24249 (print_conflicts): this function.
24250 Adjust dependencies.
24251 * src/conflicts.h: New file.
24252 Propagate its inclusion.
24253
24254 2000-10-02 Akim Demaille <akim@epita.fr>
24255
24256 * src/nullable.h: New file.
24257 Propagate its inclusion.
24258 * src/nullable.c: Formatting changes.
24259
24260 2000-10-02 Akim Demaille <akim@epita.fr>
24261
24262 * src/reduce.h: New file.
24263 Propagate its inclusion.
24264 * src/reduce.c: Topological sort and other formatting changes.
24265 (bool, TRUE, FALSE): Move their definition to...
24266 * src/system.h: here.
24267
24268 2000-10-02 Akim Demaille <akim@epita.fr>
24269
24270 * src/files.c: Formatting changes.
24271 (tryopen, tryclose, openfiles): Rename as...
24272 (xfopen, xfclose, open_files): this.
24273 (stringappend): static.
24274 * src/files.h: Complete the list of exported symbols.
24275 Propagate its use.
24276
24277 2000-10-02 Akim Demaille <akim@epita.fr>
24278
24279 * src/reader.h: New file.
24280 Propagate its use instead of tedious list of `extern' and
24281 prototypes.
24282 * src/reader.c: Formatting changes, topological sort,
24283 s/register//.
24284
24285 2000-10-02 Akim Demaille <akim@epita.fr>
24286
24287 * src/lex.h: Prototype `lex.c' exported functions.
24288 * src/reader.c: Adjust.
24289 * src/lex.c: Formatting changes.
24290 (safegetc): Rename as...
24291 (xgetc): this.
24292
24293 2000-10-02 Akim Demaille <akim@epita.fr>
24294
24295 * src/lalr.h: New file.
24296 Propagate its inclusion instead of prototypes and `extern'.
24297 * src/lalr.c: Formatting changes, topological sorting etc.
24298
24299 2000-10-02 Akim Demaille <akim@epita.fr>
24300
24301 * src/output.c (token_actions): Introduce a temporary array,
24302 YYDEFACT, that makes it possible for this function to use
24303 output_short_table.
24304
24305 2000-10-02 Akim Demaille <akim@epita.fr>
24306
24307 `user_toknums' is output as a `short[]' in `output.c', while it is
24308 defined as a `int[]' in `reader.c'. For consistency with the
24309 other output tables, `user_toknums' is now defined as a table of
24310 shorts.
24311
24312 * src/reader.c (user_toknums): Be a short table instead of an int
24313 table.
24314 Adjust dependencies.
24315
24316 Factor the short table outputs.
24317
24318 * src/output.c (output_short_table): New function.
24319 * src/output.c (output_gram, output_stos, output_rule_data)
24320 (output_base, output_table, output_check): Use it.
24321
24322 2000-10-02 Akim Demaille <akim@epita.fr>
24323
24324 * src/output.c (output): Topological sort of the functions, in
24325 order to get rid of the `static' prototypes.
24326 No longer use `register'.
24327 * src/output.h: New file.
24328 Propagate its inclusion in files explicitly prototyping functions
24329 from output.c.
24330
24331 2000-09-21 Akim Demaille <akim@epita.fr>
24332
24333 * src/atgeneral.m4: Update from Autoconf.
24334
24335 2000-09-21 Akim Demaille <akim@epita.fr>
24336
24337 * src/closure.h: New file.
24338 * src/closure.c: Formatting changes, topological sort over the
24339 functions, use of closure.h.
24340 (initialize_closure, finalize_closure): Rename as...
24341 (new_closure, free_closure): these. Adjust dependencies.
24342 * src/LR0.c: Formatting changes, topological sort, use of
24343 cloture.h.
24344 (initialize_states): Rename as...
24345 (new_states): this.
24346 * src/Makefile.am (noinst_HEADERS): Adjust.
24347
24348 2000-09-20 Akim Demaille <akim@epita.fr>
24349
24350 * src/acconfig.h: Don't protect config.h against multiple
24351 inclusion.
24352 Don't define PARAMS.
24353 * src/system.h: Define PARAMS.
24354 Remove some of the ad-hoc CPP magic for DOS, VMS etc.: this is the
24355 purpose of config.h. system.h must not try to fix wrong
24356 definitions in config.h.
24357
24358 2000-09-20 Akim Demaille <akim@epita.fr>
24359
24360 * src/derives.h: New file.
24361 * src/main.c, src/derives.h: Use it.
24362 Formatting changes.
24363 * src/Makefile.am (noinst_HEADERS): Adjust.
24364
24365 2000-09-20 Akim Demaille <akim@epita.fr>
24366
24367 * tests/atgeneral.m4: Update from Autoconf.
24368 * tests/calc.m4 (_AT_DATA_CALC_Y, AT_DATA_CALC_Y, _AT_CHECK_CALC)
24369 (AT_CHECK_CALC): New macros.
24370 Use these macros to test bison with options `', `--raw',
24371 `--debug', `--yacc', `--yacc --debug'.
24372
24373 2000-09-19 Akim Demaille <akim@epita.fr>
24374
24375 * src/output.c: Formatting changes.
24376 * src/machine.h: Remove, leaving its contents in...
24377 * src/system.h: here.
24378 Include stdio.h.
24379 Adjust all dependencies on stdio.h and machine.h.
24380 * src/getargs.h: New file.
24381 Let all `extern' declarations about getargs.c be replaced with
24382 inclusion of `getargs.h'.
24383 * src/Makefile.am (noinst_HEADERS): Adjust.
24384
24385 * tests/calc.m4 (yyin): Be initialized in main, not on the global
24386 scope.
24387 (yyerror): Returns void, not int.
24388 * doc/bison.texinfo: Formatting changes.
24389
24390 2000-09-19 Akim Demaille <akim@epita.fr>
24391
24392 * tests/calc.m4 (calc.y): Do not assign to stdin, as it's not
24393 portable.
24394
24395 2000-09-18 Akim Demaille <akim@epita.fr>
24396
24397 * configure.in: Append WARNING_CFLAGS to CFLAGS.
24398 * src/Makefile.am (INCLUDES): Don't.
24399 Be ready to fetch headers in lib/.
24400
24401 2000-09-18 Akim Demaille <akim@epita.fr>
24402
24403 * doc/bison.texinfo: Update the copyright.
24404 ANSIfy and GNUify the examples.
24405 Remove the old menu.
24406
24407 2000-09-18 Akim Demaille <akim@epita.fr>
24408
24409 First set of tests: use the `calc' example from the documentation.
24410
24411 * src/bison.s1 (yyparse): Condition the code using `yytname' which
24412 is defined only when YYDEBUG is.
24413 * m4/atconfig.m4 (AT_CONFIG): Adjust to Autoconf 2.13.
24414 * src/files.c (tryopen, tryclose): Formatting changes.
24415 Move to the top and be static.
24416 * src/reader.c (read_signed_integer): Likewise.
24417 * tests/calc.m4: New file.
24418 * Makefile.am, suite.m4: Adjust.
24419 * m4/atconfig.m4: Set BISON_SIMPLE and BISON_HAIRY.
24420
24421 2000-09-18 Akim Demaille <akim@epita.fr>
24422
24423 Add support for an Autotest test suite for Bison.
24424
24425 * m4/m4.m4, m4/atconfig.m4: New files.
24426 * m4/Makefile.am (EXTRA_DIST): Adjust.
24427 * tests/suite.m4, tests/Makefile.am, tests/atgeneral.m4: New
24428 files.
24429 * src/getargs.c: Display a more standard --version message.
24430 * src/reader.c (reader): Formatting changes.
24431 No longer depend upon VERSION_STRING.
24432 * configure.in: No longer use `dnl'.
24433 Set up the test suite and the new directory `tests/.
24434 (VERSION_STRING): Remove.
24435
24436 2000-04-14 Akim Demaille <akim@epita.fr>
24437
24438 * src/reader.c (copy_comment2): New function, same as former
24439 `copy_comment', but outputs into two FILE *.
24440 (copy_comment): Use it.
24441 (parse_union_decl): Use it.
24442 (get_type, parse_start_decl): Use the same `invalid' message.
24443 (parse_start_decl, parse_union_decl): Use the same `multiple'
24444 message.
24445 (parse_union_decl, copy_guard, copy_action): Use the same
24446 `unmatched' message.
24447 * m4/Makefile.am (EXTRA_DIST): Add `warning.m4'.
24448
24449 2000-03-31 Akim Demaille <akim@epita.fr>
24450
24451 * src/files.c (tryopen, tryclose): Move to the top.
24452 Be static.
24453
24454 2000-03-31 Akim Demaille <akim@epita.fr>
24455
24456 * src/main.c (main): Don't call `done', exit does it.
24457
24458 2000-03-31 Akim Demaille <akim@epita.fr>
24459
24460 * allocate.c: s/return (foo)/return foo/.
24461 * lalr.c: Likewise.
24462 * LR0.c: Likewise.
24463 * output.c: Likewise.
24464 * reader.c: Likewise.
24465 * symtab.c: Likewise.
24466 * vmsgetargs.c: Likewise.
24467
24468 2000-03-31 Akim Demaille <akim@epita.fr>
24469
24470 Clean up the error reporting functions.
24471
24472 * src/report.c: New file.
24473 * src/report.h: Likewise.
24474 * src/Makefile.am: Adjust.
24475 * m4/error.m4: New file.
24476 * m4/Makefile.am: Adjust.
24477 * configure.in (jm_PREREQ_ERROR): Call it.
24478 * src/main.c (int_to_string, banner, fatal_banner, warn_banner):
24479 Remove.
24480 (fatal, fatals): Remove. All callers use complain.c::fatal.
24481 (warn, warni, warns, warnss, warnss): Remove. All callers use
24482 complain.c::complain.
24483 (toomany): Remove, use fatal instead.
24484 * src/files.c (done): No argument, use complain_message_count.
24485 * src/main.c (main): Register `done' to `atexit'.
24486
24487 * src/getargs.c (usage): More `fputs', less `fprintf'.
24488
24489 2000-03-28 Akim Demaille <akim@epita.fr>
24490
24491 * lib/: New directory.
24492 * Makefile.am (SUBDIRS): Adjust.
24493 * configure.in: Adjust.
24494 (LIBOBJS): Although not used yet, AC_SUBST it, otherwise it's
24495 useless.
24496 * src/alloca.c: Moved to lib/.
24497 * src/getopt.c: Likewise.
24498 * src/getopt1.c: Likewise.
24499 * src/getopt.h: Likewise.
24500 * src/ansi2knr.c: Likewise.
24501 * src/ansi2knr.1: Likewise.
24502 * src/Makefile.am: Adjust.
24503 * lib/Makefile.am: New file.
24504
24505 2000-03-28 Akim Demaille <akim@epita.fr>
24506
24507 * src/getargs.c (usage): Refresh the help message.
24508
24509 2000-03-17 Akim Demaille <akim@epita.fr>
24510
24511 * src/getopt1.c: Updated from textutils 2.0e
24512 * src/getopt.c: Likewise.
24513 * src/getopt.h: Likewise.
24514
24515 2000-03-17 Akim Demaille <akim@epita.fr>
24516
24517 * src/Makefile.am (bison.simple): Fix the awk program: quote only
24518 the file name, not the whole `#line LINE FILE'.
24519
24520 2000-03-17 Akim Demaille <akim@epita.fr>
24521
24522 On syntax errors, report the token on which we choked.
24523
24524 * src/bison.s1 (yyparse): In the label yyerrlab, when
24525 YYERROR_VERBOSE, add yychar in msg.
24526
24527 2000-03-17 Akim Demaille <akim@epita.fr>
24528
24529 * src/reader.c (copy_at): New function.
24530 (copy_guard): Use it.
24531 (copy_action): Use it.
24532
24533 2000-03-17 Akim Demaille <akim@epita.fr>
24534
24535 Be kind to translators, save some useless translations.
24536
24537 * src/main.c (banner): New function.
24538 (fatal_banner): Use it.
24539 (warn_banner): Use it.
24540
24541 2000-03-17 Akim Demaille <akim@epita.fr>
24542
24543 * src/reader.c (copy_definition): Use copy_string and
24544 copy_comment. Removed now unused `match', `ended',
24545 `cplus_comment'.
24546 (copy_comment, copy_string): Moved, to be visible from
24547 copy_definition.
24548
24549 2000-03-17 Akim Demaille <akim@epita.fr>
24550
24551 * src/reader.c (copy_string): Declare `static inline'. No
24552 problems with inline, since it is checked by configure.
24553 (copy_comment): Likewise.
24554
24555 2000-03-17 Akim Demaille <akim@epita.fr>
24556
24557 * src/reader.c (packsymbols): Formatting changes.
24558
24559 2000-03-17 Akim Demaille <akim@epita.fr>
24560
24561 * src/reader.c (copy_comment): New function, factored out from:
24562 (copy_action): Use it. Removed now unused `match', `ended',
24563 `cplus_comment'.
24564 (copy_guard): Likewise.
24565
24566 2000-03-17 Akim Demaille <akim@epita.fr>
24567
24568 * src/reader.c (copy_string): New function, factored out from:
24569 (copy_action): Use it.
24570 (copy_guard): Likewise.
24571
24572 2000-03-17 Akim Demaille <akim@epita.fr>
24573
24574 Change the handling of @s so that they behave exactly like $s.
24575 There is now a pseudo variable @$ (readble and writable), location
24576 of the lhs of the rule (by default ranging from the location of
24577 the first symbol of the rhs, to the location of the last symbol,
24578 or, if the rhs is empty, YYLLOC).
24579
24580 * src/bison.s1 [YYLSP_NEEDED] (yyloc): New variable, twin of
24581 yyval.
24582 (yyparse): When providing a default semantic action, provide a
24583 default location action.
24584 (after the $): No longer change `*YYLSP', just stack YYLOC the
24585 same way you stack YYVAL.
24586 * src/reader.c (read_declarations): Use warns.
24587 (copy_guard, case '@'): Also recognize `@$', expanded as `YYLOC'.
24588 (copy_action, case '@'): Likewise.
24589 Use a standard error message, to save useless work from
24590 translators.
24591
24592 2000-03-17 Akim Demaille <akim@epita.fr>
24593
24594 * src/bison.s1: Formatting and cosmetics changes.
24595 * src/reader.c: Likewise.
24596 Update the Copyright notice.
24597
24598 2000-03-17 Akim Demaille <akim@epita.fr>
24599
24600 * src/bison.s1 (#line): All set to `#line' only, since the
24601 Makefile now handles them.
24602
24603 2000-03-16 Akim Demaille <akim@epita.fr>
24604
24605 * src/output.c (output_rule_data): Output the documentation of
24606 some of the tables.
24607 (Copyright notice): Update.
24608 Formatting changes.
24609
24610 2000-03-16 Akim Demaille <akim@epita.fr>
24611
24612 * src/bison.s1 [!YYDEBUG]: Define yydebug to 0. This allows to
24613 remove most `#if YYDEBUG != 0', since `if (yydebug)' is enough.
24614 One `#if YYDEBUG' remains, since it uses variables which are
24615 defined only if `YYDEBUG != 0'.
24616
24617 2000-03-16 Akim Demaille <akim@epita.fr>
24618
24619 * src/bison.s1 (yyparse): Reorganize the definitions of the stacks
24620 and related variables so that the similarities are highlighted.
24621
24622 2000-03-16 Akim Demaille <akim@epita.fr>
24623
24624 * src/bison.s1: Properly indent CPP directives.
24625
24626 2000-03-16 Akim Demaille <akim@epita.fr>
24627
24628 * src/bison.s1: Properly indent the `alloca' CPP section.
24629
24630 2000-03-16 Akim Demaille <akim@epita.fr>
24631
24632 Do not hard code values of directories in `configure.in'.
24633 Update the `configure' tool chain.
24634
24635 * configure.in (XPFILE, XPFILE1, LOCALEDIR): Remove, handled by
24636 src/makefile.am.
24637 (VERSION_STRING): Use the third arg of AC_DEFINE_UNQUOTED.
24638 (AC_OUTPUT): Add m4/Makefile.
24639 Bump to bison 1.28a, 1.29 has never been released.
24640 * acconfig.h (XPFILE, XPFILE1, LOCALEDIR): Remove, since they are
24641 handled via src/Makefile.am.
24642 (VERSION_STRING, PROTOTYPES, ENABLE_NLS, HAVE_CATGETS,
24643 HAVE_GETTEXT, HAVE_LC_MESSAGES, HAVE_STPCPY): Remove, handled by
24644 autoheader.
24645 * Makefile.am (SUBDIRS): Add m4.
24646 (ACLOCAL_AM_FLAGS): New variable.
24647 (AUTOMAKE_OPTIONS): Add check-news.
24648 * src/Makefile.am (bison.simple): Use awk to replace #line lines with
24649 the proper line number and file name.
24650 (DEFS): Propagate the location of bison library files and of the
24651 locale files.
24652 (INCLUDES): Added `-I ..' so that one can compile with srcdir !=
24653 builddir.
24654 * acinclude.m4: Remove, replaced by the directory m4.
24655 * m4/Makefile.am (EXTRA_DIST): New variable.
24656 * m4/gettext.m4: New file, from the fileutils.
24657 * m4/lcmessage.m4: Likewise
24658 * m4/progtest.m4: Likewise.
24659 * m4/bison-decl.m4: New file, extracted from former acinclude.m4.
24660
24661 2000-03-10 Akim Demaille <akim@epita.fr>
24662
24663 * src/closure.c:
24664 Formatting changes of various comments.
24665 Respect the GNU coding standards at various places.
24666 Don't use `_()' when no translation is needed.
24667
24668 1999-12-13 Jesse Thilo <jthilo@gnu.org>
24669
24670 * src/files.c:
24671 OS/2 honors TMPDIR environment variable.
24672
24673 1999-12-13 Jesse Thilo <jthilo@gnu.org>
24674
24675 * doc/bison.texinfo: Tweaked spelling and grammar.
24676 Updated ISBN.
24677 Removed reference to price of printed copy.
24678 Mention BISON_SIMPLE and BISON_HAIRY.
24679
24680 1999-12-13 Jesse Thilo <jthilo@gnu.org>
24681
24682 * configure.in, NEWS:
24683 Bison 1.29 released.
24684
24685 1999-10-27 Jesse Thilo <jthilo@gnu.org>
24686
24687 * doc/.cvsignore, doc/Makefile.am, doc/refcard.tex:
24688 Added reference card.
24689
24690 1999-07-26 Jesse Thilo <jthilo@gnu.org>
24691
24692 * po/ru.po: Added Russian translation.
24693
24694 1999-07-26 Jesse Thilo <jthilo@gnu.org>
24695
24696 * configure.in: Added Russian translation.
24697
24698 1999-07-06 Jesse Thilo <jthilo@gnu.org>
24699
24700 * configure.in, NEWS, README:
24701 Released version 1.28.
24702
24703 1999-06-14 Jesse Thilo <jthilo@gnu.org>
24704
24705 * src/system.h:
24706 Squashed redefinition warning on some systems.
24707
24708 * src/getargs.c, src/Makefile.am, src/reader.c, src/version.c:
24709 Have configure build version string instead of relying on ANSI string
24710 concatentation.
24711
24712 1999-06-14 Jesse Thilo <jthilo@gnu.org>
24713
24714 * po/POTFILES.in: Got rid of version.c.
24715
24716 1999-06-14 Jesse Thilo <jthilo@gnu.org>
24717
24718 * acconfig.h, configure.in:
24719 Have configure build version string instead of relying on ANSI string
24720 concatentation.
24721
24722 1999-06-08 Jesse Thilo <jthilo@gnu.org>
24723
24724 * doc/bison.1:
24725 Dropped mention of `+' for long-named options.
24726
24727 1999-05-30 Jesse Thilo <jthilo@gnu.org>
24728
24729 * src/files.c: Added <unistd.h> for unlink().
24730
24731 * src/Makefile.am, src/system.h:
24732 I18n fixes.
24733
24734 1999-05-30 Jesse Thilo <jthilo@gnu.org>
24735
24736 * README: Added a FAQ list.
24737
24738 * configure.in, acconfig.h:
24739 I18n fixes.
24740
24741 1999-05-30 Jesse Thilo <jthilo@gnu.org>
24742
24743 * doc/FAQ, doc/Makefile.am:
24744 Added a FAQ list.
24745
24746 1999-05-19 Jesse Thilo <jthilo@gnu.org>
24747
24748 * src/alloc.h, src/symtab.h, src/version.c:
24749 Protected inclusion of "config.h" with HAVE_CONFIG_H.
24750
24751 1999-04-18 Jesse Thilo <jthilo@gnu.org>
24752
24753 * src/.cvsignore, src/Makefile.am:
24754 Reorganized: sources in `src', documentation in `doc'.
24755
24756 * src/lex.c (literalchar):
24757 fixed the code for escaping double quotes (thanks
24758 Jonathan Czisny.)
24759
24760 1999-04-18 Jesse Thilo <jthilo@gnu.org>
24761
24762 * po/de.po, po/es.po, po/fr.po, po/nl.po, po/POTFILES.in:
24763 Adjusted paths to reflect directory reorganization.
24764
24765 1999-04-18 Jesse Thilo <jthilo@gnu.org>
24766
24767 * doc/.cvsignore, doc/Makefile.am:
24768 Reorganized: sources in `src', documentation in `doc'.
24769
24770 1999-04-18 Jesse Thilo <jthilo@gnu.org>
24771
24772 * configure.in:
24773 Updated AC_INIT file to reflect directory reorganization.
24774
24775 * configure.in, .cvsignore, Makefile.am, POTFILES.in:
24776 Reorganized: sources in `src', documentation in `doc'.
24777
24778 1999-04-13 Jesse Thilo <jthilo@gnu.org>
24779
24780 * src/allocate.c:
24781 Don't declare calloc() and realloc() if not necessary.
24782
24783 1999-04-13 Jesse Thilo <jthilo@gnu.org>
24784
24785 * configure.in, acconfig.h, acinclude.m4:
24786 Don't declare calloc() and realloc() if not necessary.
24787
24788 1999-03-23 Jesse Thilo <jthilo@gnu.org>
24789
24790 * po/.cvsignore: Added i18n support.
24791
24792 1999-03-23 Jesse Thilo <jthilo@gnu.org>
24793
24794 * acconfig.h, configure.in, Makefile.am:
24795 Added i18n support.
24796
24797 1999-03-22 Jesse Thilo <jthilo@gnu.org>
24798
24799 * src/bison.s1: Fixed #line numbers.
24800
24801 1999-03-15 Jesse Thilo <jthilo@gnu.org>
24802
24803 * po/es.po, po/fr.po, po/nl.po, po/de.po:
24804 Added PO files from Translation Project.
24805
24806 1999-03-03 Jesse Thilo <jthilo@gnu.org>
24807
24808 * Makefile.am:
24809 Added support for non-ANSI compilers (ansi2knr).
24810
24811 1999-02-16 Jesse Thilo <jthilo@gnu.org>
24812
24813 * configure.in: Bumped version number to 1.27.
24814
24815 * Makefile.am:
24816 Added `bison.simple' to list of files removed by `make distclean'.
24817
24818 1999-02-12 Jesse Thilo <jthilo@gnu.org>
24819
24820 * src/files.c, src/files.h:
24821 Defined locations of parser files in config.h instead of Makefile.
24822
24823 1999-02-12 Jesse Thilo <jthilo@gnu.org>
24824
24825 * acconfig.h, acinclude.m4, configure.in, Makefile.am:
24826 Defined locations of parser files in config.h instead of Makefile.
24827
24828 1999-02-09 Jesse Thilo <jthilo@gnu.org>
24829
24830 * Makefile.am:
24831 Removed inappropriate use of $< macro.
24832
24833 1999-02-05 Jesse Thilo <jthilo@gnu.org>
24834
24835 * po/Makefile.in.in, po/POTFILES.in:
24836 Add `po' directory skeleton.
24837
24838 1999-01-27 Jesse Thilo <jthilo@gnu.org>
24839
24840 * README: Document help-bison list.
24841
24842 * configure.in: Add check for mkstemp().
24843
24844 1999-01-20 Jesse Thilo <jthilo@gnu.org>
24845
24846 * src/conflicts.c, src/LR0.c, src/output.c, src/reader.c:
24847 Hush a few compiler warnings.
24848
24849 * src/files.c:
24850 Add tryclose(), which verifies that fclose was successful.
24851 Hush a couple of compiler warnings.
24852
24853 1999-01-20 Jesse Thilo <jthilo@gnu.org>
24854
24855 * Makefile.am, OChangeLog:
24856 ChangeLog is now automatically generated. Include the old version as
24857 OChangeLog.
24858
24859 1999-01-14 Jesse Thilo <jthilo@gnu.org>
24860
24861 * 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:
24862 Update FSF address.
24863
24864 1999-01-14 Jesse Thilo <jthilo@gnu.org>
24865
24866 * doc/bison.texinfo: Fix formatting glitch.
24867
24868 * doc/bison.texinfo: Update FSF address.
24869
24870 1999-01-14 Jesse Thilo <jthilo@gnu.org>
24871
24872 * acconfig.h: Update FSF address.
24873
24874 1999-01-08 Jesse Thilo <jthilo@gnu.org>
24875
24876 * src/system.h:
24877 Don't define PACKAGE here, since config.h defines it.
24878
24879 1998-12-30 Jesse Thilo <jthilo@gnu.org>
24880
24881 * src/reader.c: Update copyright date.
24882
24883 * src/main.c:
24884 Ditch sprintf to statically-sized buffers in fatal/warn functions in
24885 favor of output directly to stderr (avoids buffer overruns).
24886
24887 * src/reader.c: Some checks for premature EOF.
24888
24889 * 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:
24890 Use prototypes if the compiler understands them.
24891
24892 * src/files.c: Honor TMPDIR on Unix hosts.
24893 Use prototypes if the compiler understands them.
24894
24895 * src/reader.c:
24896 Fix a couple of buffer overrun bugs.
24897 Use prototypes if the compiler understands them.
24898
24899 * src/system.h: Include unistd.h and ctype.h.
24900 Use #ifdef instead of #if for NLS symbols.
24901
24902 1998-12-30 Jesse Thilo <jthilo@gnu.org>
24903
24904 * doc/bison.texinfo:
24905 Delete comment "consider using @set for edition number, etc..." since
24906 we now are doing so.
24907
24908 1998-12-30 Jesse Thilo <jthilo@gnu.org>
24909
24910 * configure.in:
24911 Use prototypes if the compiler understands them.
24912
24913 * NEWS: Document 1.26 highlights.
24914
24915 * Makefile.am: Require Automake 1.3 or later.
24916
24917 * acconfig.h:
24918 Use prototypes if the compiler understands them.
24919
24920 1998-12-29 Jesse Thilo <jthilo@gnu.org>
24921
24922 * src/version.c:
24923 Use VERSION symbol from automake for version number.
24924
24925 1998-12-29 Jesse Thilo <jthilo@gnu.org>
24926
24927 * acconfig.h, configure.in, version.cin:
24928 Use VERSION symbol from automake for version number.
24929
24930 1998-11-28 Jesse Thilo <jthilo@gnu.org>
24931
24932 * Makefile.am:
24933 Distribute original version of simple parser (bison.s1), not built
24934 version (bison.simple).
24935
24936 1998-11-28 Jesse Thilo <jthilo@gnu.org>
24937
24938 * doc/bison.texinfo: Add info dir entry.
24939
24940 * doc/bison.texinfo:
24941 Let automake put version number into documentation.
24942
24943 1998-11-26 Jesse Thilo <jthilo@gnu.org>
24944
24945 * src/bison.cld, src/build.com, src/vmshlp.mar:
24946 Add non-RCS files from /gd/gnu/bison.
24947
24948 1998-11-26 Jesse Thilo <jthilo@gnu.org>
24949
24950 * doc/bison.1:
24951 Document the BISON_HAIRY and BISON_SIMPLE variables.
24952
24953 1998-11-25 Jesse Thilo <jthilo@gnu.org>
24954
24955 * src/version.c: Build version.c automatically.
24956
24957 * src/reader.c:
24958 Fix token numbering (used to start at 258, not 257).
24959
24960 * src/system.h: Include config.h.
24961
24962 * src/getargs.c: Update bug report address.
24963
24964 * src/alloca.c, src/getopt1.c, src/getopt.c, src/getopt.h:
24965 Get latest copies of alloca.c, getopt.c, getopt.h, getopt1.c from gnu.org.
24966
24967 1998-11-25 Jesse Thilo <jthilo@gnu.org>
24968
24969 * Makefile.am:
24970 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
24971
24972 * configure.in, version.cin:
24973 Build version.c automatically.
24974
24975 * AUTHORS: Add AUTHORS file.
24976
24977 * README: Update bug report address.
24978
24979 * bison.simple:
24980 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
24981
24982 * configure.in, Makefile.am, Makefile.in, stamp-h.in:
24983 Add automake stuff.
24984
24985 1998-11-25 Jesse Thilo <jthilo@gnu.org>
24986
24987 * doc/bison.texinfo: Clean up some formatting.
24988
24989 1998-05-05 Richard Stallman <rms@gnu.org>
24990
24991 * doc/bison.texinfo:
24992 Explain better why to make a pure parser.
24993
24994 1998-01-05 Richard Stallman <rms@gnu.org>
24995
24996 * src/files.c (openfiles):
24997 [_WIN32 && !__CYGWIN32__] Use TEMP or Temp to
24998 find a temporary directory, if possible. Do not unlink files while
24999 they are open.
25000
25001 1997-08-25 Richard Stallman <rms@gnu.org>
25002
25003 * src/reader.c (stack_offset;):
25004 Change some warni to warns.
25005
25006 * src/lex.c (literalchar): Use warns, not warni.
25007
25008 1997-06-28 Richard Stallman <rms@gnu.org>
25009
25010 * src/bison.s1: Add a Bison version comment.
25011
25012 * src/main.c (fatal, warn, berror):
25013 Use program_name.
25014
25015 1997-06-28 Richard Stallman <rms@gnu.org>
25016
25017 * Makefile.in (bison_version): New variable.
25018 (dist): Use that variable.
25019 (bison.s1): Substitute the Bison version into bison.simple.
25020
25021 * bison.simple: Add a Bison version comment.
25022
25023 1997-06-18 Richard Stallman <rms@gnu.org>
25024
25025 * src/main.c (fatal, warn, berror):
25026 Make error messages standard.
25027 (toomany): Improve error message text.
25028
25029 * 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:
25030 new.h renamed to alloc.h.
25031
25032 1997-06-18 Richard Stallman <rms@gnu.org>
25033
25034 * Makefile.in: new.h renamed to alloc.h.
25035
25036 1997-05-24 Richard Stallman <rms@gnu.org>
25037
25038 * src/lex.c (literalchar):
25039 Fix the code for escaping \, " and '.
25040
25041 (lex): Avoid trouble when there are many chars
25042 to discard in a char literal with just several chars in it.
25043
25044 1997-05-17 Richard Stallman <rms@gnu.org>
25045
25046 * src/bison.s1:
25047 Use malloc, if using alloca is troublesome.
25048 (YYSTACK_USE_ALLOCA): New flag macro.
25049 Define it for some systems and compilers.
25050 (YYSTACK_ALLOC): New macro.
25051 (yyparse): Use YYSTACK_ALLOC to allocate stack.
25052 If it was malloc'd, free it.
25053
25054 1997-05-17 Richard Stallman <rms@gnu.org>
25055
25056 * bison.simple:
25057 Use malloc, if using alloca is troublesome.
25058 (YYSTACK_USE_ALLOCA): New flag macro.
25059 Define it for some systems and compilers.
25060 (YYSTACK_ALLOC): New macro.
25061 (yyparse): Use YYSTACK_ALLOC to allocate stack.
25062 If it was malloc'd, free it.
25063
25064 1997-04-23 Richard Stallman <rms@gnu.org>
25065
25066 * src/bison.s1:
25067 (alloca) [__hpux]: Always define as __builtin_alloca.
25068
25069 1997-04-23 Richard Stallman <rms@gnu.org>
25070
25071 * bison.simple:
25072 (alloca) [__hpux]: Always define as __builtin_alloca.
25073
25074 1997-04-22 Richard Stallman <rms@gnu.org>
25075
25076 * src/bison.s1:
25077 [__hpux]: Include alloca.h (right for HPUX 10)
25078 instead of declaring alloca (right for HPUX 9).
25079
25080 * src/bison.s1 (__yy_memcpy):
25081 Declare arg `count' as unsigned int.
25082 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
25083
25084 1997-04-22 Richard Stallman <rms@gnu.org>
25085
25086 * bison.simple:
25087 [__hpux]: Include alloca.h (right for HPUX 10)
25088 instead of declaring alloca (right for HPUX 9).
25089
25090 * bison.simple (__yy_memcpy):
25091 Declare arg `count' as unsigned int.
25092 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
25093
25094 1997-01-03 Richard Stallman <rms@gnu.org>
25095
25096 * src/allocate.c: [__STDC__ or _MSC_VER]:
25097 Declare calloc and realloc to return void *.
25098
25099 1997-01-02 Richard Stallman <rms@gnu.org>
25100
25101 * src/system.h:
25102 [_MSC_VER]: Include stdlib.h and process.h.
25103 [_MSC_VER] (getpid): Define as macro--translate it to _getpid.
25104
25105 * src/main.c (main): Return FAILURE as a value.
25106 (printable_version): Declare arg as int, not char.
25107
25108 1997-01-02 Richard Stallman <rms@gnu.org>
25109
25110 * Makefile.in (dist):
25111 Explicitly check for symlinks, and copy them.
25112
25113 1996-12-19 Richard Stallman <rms@gnu.org>
25114
25115 * src/files.c:
25116 [_MSC_VER] (XPFILE, XPFILE1): Define, if not already defined.
25117
25118 1996-12-18 Paul Eggert <eggert@gnu.org>
25119
25120 * src/bison.s1 (yyparse):
25121 If __GNUC__ and YYPARSE_PARAM are both defined,
25122 declare yyparse to have a void * argument.
25123
25124 1996-12-18 Paul Eggert <eggert@gnu.org>
25125
25126 * bison.simple (yyparse):
25127 If __GNUC__ and YYPARSE_PARAM are both defined,
25128 declare yyparse to have a void * argument.
25129
25130 1996-12-17 Richard Stallman <rms@gnu.org>
25131
25132 * src/reduce.c (nbits): Add some casts.
25133
25134 1996-08-12 Richard Stallman <rms@gnu.org>
25135
25136 * src/bison.s1: Test _MSDOS as well as _MSDOS_.
25137
25138 1996-08-12 Richard Stallman <rms@gnu.org>
25139
25140 * bison.simple: Test _MSDOS as well as _MSDOS_.
25141
25142 1996-07-31 Richard Stallman <rms@gnu.org>
25143
25144 * src/bison.s1:
25145 [__sun && __i386]: Include alloca.h.
25146
25147 1996-07-31 Richard Stallman <rms@gnu.org>
25148
25149 * bison.simple:
25150 [__sun && __i386]: Include alloca.h.
25151
25152 1996-07-30 Richard Stallman <rms@gnu.org>
25153
25154 * src/bison.s1: Comment change.
25155
25156 * src/bison.s1: Test _MSDOS_, not MSDOS.
25157
25158 1996-07-30 Richard Stallman <rms@gnu.org>
25159
25160 * bison.simple: Comment change.
25161
25162 * bison.simple: Test _MSDOS_, not MSDOS.
25163
25164 1996-06-01 Richard Stallman <rms@gnu.org>
25165
25166 * 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:
25167 Insert `_' macro around many string constants.
25168
25169 * src/main.c:
25170 Insert `_' macro around many string constants.
25171
25172 (main): Call setlocale, bindtextdomain and textdomain.
25173
25174 * src/system.h: [HAVE_LOCALE_H]: Include locale.h.
25175 [! HAVE_LOCALE_H] (setlocale): Define as no-op.
25176 [ENABLE_NLS]: Include libintl.h.
25177 [ENABLE_NLS] (gettext): Define.
25178 [! ENABLE_NLS] (bintextdomain, textdomain, _): Consolation definitions.
25179 (N_, PACKAGE, LOCALEDIR): New macros.
25180
25181 1996-06-01 Richard Stallman <rms@gnu.org>
25182
25183 * POTFILES.in: New file.
25184
25185 * Makefile.in (allocate.o):
25186 Define target explicitly.
25187
25188 * Makefile.in (CFLAGS): Set to @CFLAGS@.
25189 (LDFLAGS): Set to @LDFLAGS@.
25190 (configure): Run autoconf only if preceding `cd' succeeds.
25191 (bison.s1): Redirect output to temporary file then move the
25192 temporary to the target, rather than redirecting directly to bison.s1.
25193 (clean): Remove config.status and config.log.
25194 (distclean): Don't remove config.status here.
25195
25196 1996-05-12 Richard Stallman <rms@gnu.org>
25197
25198 * src/bison.s1:
25199 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
25200
25201 1996-05-12 Richard Stallman <rms@gnu.org>
25202
25203 * bison.simple:
25204 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
25205
25206 1996-05-11 Richard Stallman <rms@gnu.org>
25207
25208 * src/bison.s1 (__yy_memcpy):
25209 Really reorder the args, as was supposedly done on Feb 14 1995.
25210 (yyparse): Calls changed accordingly.
25211
25212 1996-05-11 Richard Stallman <rms@gnu.org>
25213
25214 * Makefile.in (dist): Don't use $(srcdir).
25215
25216 * bison.simple (__yy_memcpy):
25217 Really reorder the args, as was supposedly done on Feb 14 1995.
25218 (yyparse): Calls changed accordingly.
25219
25220 1996-01-27 Richard Stallman <rms@gnu.org>
25221
25222 * src/output.c (output_rule_data):
25223 Test YYERROR_VERBOSE in the conditional
25224 around the definition of ttyname.
25225
25226 1995-12-29 Richard Stallman <rms@gnu.org>
25227
25228 * src/bison.s1:
25229 Fix line numbers in #line commands.
25230
25231 1995-12-29 Richard Stallman <rms@gnu.org>
25232
25233 * bison.simple:
25234 Fix line numbers in #line commands.
25235
25236 1995-12-27 Richard Stallman <rms@gnu.org>
25237
25238 * src/bison.s1 (YYPARSE_PARAM_DECL):
25239 In C++, make it always null.
25240 (YYPARSE_PARAM_ARG): New macro.
25241 (yyparse): Use YYPARSE_PARAM_ARG.
25242
25243 1995-12-27 Richard Stallman <rms@gnu.org>
25244
25245 * bison.simple (YYPARSE_PARAM_DECL):
25246 In C++, make it always null.
25247 (YYPARSE_PARAM_ARG): New macro.
25248 (yyparse): Use YYPARSE_PARAM_ARG.
25249
25250 1995-11-29 Richard Stallman <rms@gnu.org>
25251
25252 * doc/bison.texinfo:
25253 Describe literal string tokens, %raw, %no_lines, %token_table.
25254
25255 1995-11-29 Daniel Hagerty <hag@gnu.org>
25256
25257 * doc/bison.texinfo: Fixed update date
25258
25259 1995-10-16 Richard Stallman <rms@gnu.org>
25260
25261 * src/version.c: Version 1.25.
25262
25263 1995-10-16 Richard Stallman <rms@gnu.org>
25264
25265 * NEWS: *** empty log message ***
25266
25267 1995-10-16 Richard Stallman <rms@gnu.org>
25268
25269 * doc/bison.1, doc/bison.rnh:
25270 Add new options.
25271
25272 1995-10-15 Richard Stallman <rms@gnu.org>
25273
25274 * src/vmsgetargs.c, src/getargs.c:
25275 Added -n, -k, and -raw switches.
25276 (noparserflag, toknumflag, rawtoknumflag): New variables.
25277
25278 * src/symtab.h (SALIAS):
25279 New #define for adding aliases to %token.
25280 (struct bucket): Added `alias' field.
25281
25282 * src/reduce.c (reduce_grammar):
25283 Revise error message.
25284 (print_notices): Remove final `.' from error message.
25285
25286 * src/reader.c (reader_output_yylsp):
25287 New function.
25288 (readgram): Use `#if 0' around code that accepted %command
25289 inside grammar rules: The documentation doesn't allow it,
25290 and it will fail since the %command processors scan for the next %.
25291 (parse_token_decl): Extended the %token
25292 declaration to allow a multi-character symbol as an alias.
25293 (parse_thong_decl): New function.
25294 (read_declarations): Added %thong declarations.
25295 (read_declarations): Handle NOOP to deal with allowing
25296 % declarations as another means to specify the flags.
25297 (readgram): Allow %prec prior to semantics embedded in a rule.
25298 (skip_to_char, read_declarations, copy_definition)
25299 (parse_token_decl, parse_start_decl, parse_type_decl)
25300 (parse_assoc_decl, parse_union_decl, parse_expect_decl)
25301 (get_type_name, copy_guard, copy_action, readgram)
25302 (get_type, packsymbols): Revised most error messages.
25303 Changed `fatal' to `warnxxx' to avoid aborting for error.
25304 Revised and use multiple warnxxx functions to avoid using VARARGS1.
25305 (read_declarations): Improve the error message for
25306 an invalid character. Do not abort.
25307 (read_declarations, copy_guard, copy_action): Use
25308 printable_version to avoid unprintable characters in printed output.
25309 (parse_expect_decl): Error if argument to %expect exceeds 10 digits.
25310 (parse_token_decl, parse_assoc_decl, parse_type_decl, get_type):
25311 Allow the type of a non-terminal can be given
25312 more than once, as long as all specifications give the same type.
25313
25314 * src/output.c:
25315 (output_headers, output_trailers, output, output_gram)
25316 (output_rule_data): Implement noparserflag variable.
25317 Implement toknumflag variable.
25318 (output): Call reader_output_yylsp to output LTYPESTR.
25319
25320 * src/main.c (main):
25321 If reader sees an error, don't process the grammar.
25322 (fatals): Updated to not use VARARGS1.
25323 (printable_version, int_to_string, warn, warni, warns, warnss)
25324 (warnsss): New error reporting functions. Avoid abort for error.
25325
25326 * src/lex.h:
25327 Added THONG and NOOP for alias processing.
25328 Added SETOPT for the new code that allows setting options with %flags.
25329
25330 * src/lex.c:
25331 Include getopt.h. Add some extern decls.
25332 (safegetc): New function to deal with EOF gracefully.
25333 (literalchar); new function to deal with reading \ escapes.
25334 (lex): Use literalchar.
25335 (lex): Implemented "..." tokens.
25336 (literalchar, lex, parse_percent_token): Made tokenbuffer
25337 always contain the token. This includes growing the token
25338 buffer while reading an integer.
25339 (parse_percent_token): Replaced if-else statement with percent_table.
25340 (parse_percent_token): Added % declarations as another
25341 way to specify the flags -n, -l, and -r. Also added hooks for
25342 -d, -k, -y, -v, -t, -p, -b, -o, but implementation requires
25343 major changes to files.c.
25344 (lex) Retain in the incoming stream a character following
25345 an incorrect '/'.
25346 (skip_white_space, lex): Revised most error messages
25347 and changed fatal to warn to avoid aborting.
25348 (percent_table): Added %thong declarations.
25349
25350 * src/gram.h: Comment changes.
25351
25352 * src/files.c (openfiles, open_extra_files, done):
25353 Add faction flag
25354 and actfile file. Handle noparserflag. Both for -n switch.
25355
25356 * src/conflicts.c (resolve_sr_conflict):
25357 Remove use of alloca.
25358
25359 1995-06-01 Jim Meyering <meyering@gnu.org>
25360
25361 * doc/bison.texinfo: *** empty log message ***
25362
25363 1995-05-06 Richard Stallman <rms@gnu.org>
25364
25365 * src/bison.s1: Comment change.
25366
25367 1995-05-06 Richard Stallman <rms@gnu.org>
25368
25369 * bison.simple: Comment change.
25370
25371 1995-05-03 Richard Stallman <rms@gnu.org>
25372
25373 * src/version.c: Version now 1.24.
25374
25375 * src/bison.s1: Change distribution terms.
25376
25377 * src/version.c: Version now 1.23.
25378
25379 1995-05-03 Richard Stallman <rms@gnu.org>
25380
25381 * doc/bison.texinfo:
25382 Rewrite "Conditions for Using Bison".
25383 Update version to 1.24.
25384
25385 1995-05-03 Richard Stallman <rms@gnu.org>
25386
25387 * bison.simple: Change distribution terms.
25388
25389 1995-02-23 Richard Stallman <rms@gnu.org>
25390
25391 * src/files.c: Test __VMS_POSIX as well as VMS.
25392
25393 1995-02-14 Jim Meyering <meyering@gnu.org>
25394
25395 * src/bison.s1 (__yy_memcpy):
25396 Renamed from __yy_bcopy to avoid
25397 confusion. Reverse FROM and TO arguments to be consistent with
25398 those of memcpy.
25399
25400 1995-02-14 Jim Meyering <meyering@gnu.org>
25401
25402 * bison.simple (__yy_memcpy):
25403 Renamed from __yy_bcopy to avoid
25404 confusion. Reverse FROM and TO arguments to be consistent with
25405 those of memcpy.
25406
25407 1994-11-10 David J. MacKenzie <djm@gnu.org>
25408
25409 * NEWS: reformat
25410
25411 * NEWS: New file.
25412
25413 * Makefile.in (DISTFILES): Include NEWS.
25414
25415 * Makefile.in (DISTFILES):
25416 Include install-sh, not install.sh.
25417
25418 * configure.in: Update to Autoconf v2 macro names.
25419
25420 1994-10-05 David J. MacKenzie <djm@gnu.org>
25421
25422 * Makefile.in: fix typo
25423
25424 * Makefile.in (prefix, exec_prefix):
25425 Let configure set them.
25426
25427 1994-09-28 David J. MacKenzie <djm@gnu.org>
25428
25429 * Makefile.in: Set datadir to $(prefix)/share.
25430
25431 1994-09-15 Richard Stallman <rms@gnu.org>
25432
25433 * src/bison.s1:
25434 Update copyright notice and GPL version.
25435
25436 1994-09-15 Richard Stallman <rms@gnu.org>
25437
25438 * bison.simple:
25439 Update copyright notice and GPL version.
25440
25441 1994-07-12 Richard Stallman <rms@gnu.org>
25442
25443 * src/reduce.c, src/reader.c:
25444 entered into RCS
25445
25446 1994-05-05 David J. MacKenzie <djm@gnu.org>
25447
25448 * Makefile.in: entered into RCS
25449
25450 1994-03-26 Richard Stallman <rms@gnu.org>
25451
25452 * src/bison.s1: entered into RCS
25453
25454 1994-03-26 Richard Stallman <rms@gnu.org>
25455
25456 * bison.simple: entered into RCS
25457
25458 1994-03-25 Richard Stallman <rms@gnu.org>
25459
25460 * src/main.c: entered into RCS
25461
25462 1994-03-24 Richard Stallman <rms@gnu.org>
25463
25464 * src/conflicts.c: entered into RCS
25465
25466 1994-01-02 Richard Stallman <rms@gnu.org>
25467
25468 * Makefile.in: *** empty log message ***
25469
25470 1993-11-21 Richard Stallman <rms@gnu.org>
25471
25472 * src/bison.s1: *** empty log message ***
25473
25474 1993-11-21 Richard Stallman <rms@gnu.org>
25475
25476 * doc/bison.texinfo: entered into RCS
25477
25478 * doc/bison.texinfo: *** empty log message ***
25479
25480 1993-11-21 Richard Stallman <rms@gnu.org>
25481
25482 * bison.simple: *** empty log message ***
25483
25484 1993-10-25 David J. MacKenzie <djm@gnu.org>
25485
25486 * doc/bison.texinfo: *** empty log message ***
25487
25488 1993-10-19 Richard Stallman <rms@gnu.org>
25489
25490 * src/bison.s1: *** empty log message ***
25491
25492 1993-10-19 Richard Stallman <rms@gnu.org>
25493
25494 * bison.simple: *** empty log message ***
25495
25496 1993-10-14 Richard Stallman <rms@gnu.org>
25497
25498 * src/bison.s1: *** empty log message ***
25499
25500 1993-10-14 Richard Stallman <rms@gnu.org>
25501
25502 * bison.simple: *** empty log message ***
25503
25504 1993-09-14 David J. MacKenzie <djm@gnu.org>
25505
25506 * doc/bison.texinfo: *** empty log message ***
25507
25508 1993-09-13 Noah Friedman <friedman@gnu.org>
25509
25510 * Makefile.in: *** empty log message ***
25511
25512 1993-09-10 Richard Stallman <rms@gnu.org>
25513
25514 * src/conflicts.c: *** empty log message ***
25515
25516 * src/system.h: entered into RCS
25517
25518 1993-09-10 Richard Stallman <rms@gnu.org>
25519
25520 * doc/bison.1: entered into RCS
25521
25522 1993-09-06 Noah Friedman <friedman@gnu.org>
25523
25524 * src/version.c: entered into RCS
25525
25526 1993-09-06 Noah Friedman <friedman@gnu.org>
25527
25528 * Makefile.in: *** empty log message ***
25529
25530 1993-07-30 David J. MacKenzie <djm@gnu.org>
25531
25532 * Makefile.in: *** empty log message ***
25533
25534 1993-07-24 Richard Stallman <rms@gnu.org>
25535
25536 * src/bison.s1: *** empty log message ***
25537
25538 1993-07-24 Richard Stallman <rms@gnu.org>
25539
25540 * bison.simple: *** empty log message ***
25541
25542 1993-07-08 David J. MacKenzie <djm@gnu.org>
25543
25544 * Makefile.in: *** empty log message ***
25545
25546 1993-07-04 Richard Stallman <rms@gnu.org>
25547
25548 * src/bison.s1: *** empty log message ***
25549
25550 1993-07-04 Richard Stallman <rms@gnu.org>
25551
25552 * bison.simple: *** empty log message ***
25553
25554 1993-06-26 David J. MacKenzie <djm@gnu.org>
25555
25556 * src/getargs.c: entered into RCS
25557
25558 1993-06-26 David J. MacKenzie <djm@gnu.org>
25559
25560 * doc/bison.texinfo: *** empty log message ***
25561
25562 * doc/bison.1: New file.
25563
25564 1993-06-25 Richard Stallman <rms@gnu.org>
25565
25566 * src/getargs.c: New file.
25567
25568 1993-06-16 Richard Stallman <rms@gnu.org>
25569
25570 * src/bison.s1: *** empty log message ***
25571
25572 1993-06-16 Richard Stallman <rms@gnu.org>
25573
25574 * bison.simple: *** empty log message ***
25575
25576 1993-06-03 Richard Stallman <rms@gnu.org>
25577
25578 * src/bison.s1: New file.
25579
25580 1993-06-03 Richard Stallman <rms@gnu.org>
25581
25582 * doc/bison.texinfo: *** empty log message ***
25583
25584 1993-06-03 Richard Stallman <rms@gnu.org>
25585
25586 * bison.simple: New file.
25587
25588 1993-05-19 Richard Stallman <rms@gnu.org>
25589
25590 * doc/bison.texinfo: New file.
25591
25592 1993-05-07 Noah Friedman <friedman@gnu.org>
25593
25594 * Makefile.in: *** empty log message ***
25595
25596 1993-04-28 Noah Friedman <friedman@gnu.org>
25597
25598 * src/reader.c: *** empty log message ***
25599
25600 1993-04-23 Noah Friedman <friedman@gnu.org>
25601
25602 * src/alloc.h: entered into RCS
25603
25604 1993-04-20 David J. MacKenzie <djm@gnu.org>
25605
25606 * src/version.c: *** empty log message ***
25607
25608 * src/files.c, src/allocate.c:
25609 entered into RCS
25610
25611 * src/reader.c: *** empty log message ***
25612
25613 * src/lex.c: entered into RCS
25614
25615 * src/conflicts.c: New file.
25616
25617 * src/symtab.c: entered into RCS
25618
25619 * src/alloc.h: New file.
25620
25621 * src/LR0.c: entered into RCS
25622
25623 1993-04-18 Noah Friedman <friedman@gnu.org>
25624
25625 * src/reader.c: New file.
25626
25627 * src/version.c: *** empty log message ***
25628
25629 1993-04-18 Noah Friedman <friedman@gnu.org>
25630
25631 * Makefile.in: *** empty log message ***
25632
25633 1993-04-17 Noah Friedman <friedman@gnu.org>
25634
25635 * Makefile.in: *** empty log message ***
25636
25637 1993-04-15 Richard Stallman <rms@gnu.org>
25638
25639 * src/main.c, src/files.c:
25640 New file.
25641
25642 1993-04-15 Noah Friedman <friedman@gnu.org>
25643
25644 * configure.in: entered into RCS
25645
25646 * configure.in: *** empty log message ***
25647
25648 * configure.in: New file.
25649
25650 1993-04-14 Richard Stallman <rms@gnu.org>
25651
25652 * Makefile.in: New file.
25653
25654 1993-04-13 Richard Stallman <rms@gnu.org>
25655
25656 * src/version.c: New file.
25657
25658 1993-03-25 Richard Stallman <rms@gnu.org>
25659
25660 * src/output.c: entered into RCS
25661
25662 1992-09-25 Richard Stallman <rms@gnu.org>
25663
25664 * configure.bat: entered into RCS
25665
25666 1992-06-22 Richard Stallman <rms@gnu.org>
25667
25668 * src/vmsgetargs.c: entered into RCS
25669
25670 1992-06-22 Richard Stallman <rms@gnu.org>
25671
25672 * doc/bison.rnh: entered into RCS
25673
25674 1992-04-20 David J. MacKenzie <djm@gnu.org>
25675
25676 * README: entered into RCS
25677
25678 1992-01-22 Richard Stallman <rms@gnu.org>
25679
25680 * src/machine.h: entered into RCS
25681
25682 1991-12-21 Richard Stallman <rms@gnu.org>
25683
25684 * src/lalr.c, src/closure.c:
25685 entered into RCS
25686
25687 1991-12-20 Richard Stallman <rms@gnu.org>
25688
25689 * src/state.h: entered into RCS
25690
25691 1991-12-18 Richard Stallman <rms@gnu.org>
25692
25693 * src/print.c, src/nullable.c, src/derives.c:
25694 entered into RCS
25695
25696 1991-11-03 David J. MacKenzie <djm@gnu.org>
25697
25698 * src/warshall.c, src/types.h, src/symtab.h, src/lex.h, src/gram.c, src/gram.h, src/files.h:
25699 entered into RCS
25700
25701 1988-09-09 Richard Stallman <rms@gnu.org>
25702
25703 * src/bison.hairy: entered into RCS
25704
25705 1987-12-16 Richard Stallman <rms@gnu.org>
25706
25707 * REFERENCES: entered into RCS
25708
25709
25710 -----
25711
25712 Copyright (C) 1987, 1988, 1991, 1992, 1993, 1994, 1995, 1996,
25713 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
25714 2008, 2009, 2010 Free Software Foundation, Inc.
25715
25716 Copying and distribution of this file, with or without
25717 modification, are permitted provided the copyright notice and this
25718 notice are preserved.