]> git.saurik.com Git - bison.git/blob - ChangeLog
-Werror: fix for rules useless in parser after conflicts.
[bison.git] / ChangeLog
1 2010-08-01 Joel E. Denny <joeldenny@joeldenny.org>
2
3 -Werror: fix for rules useless in parser after conflicts.
4 * NEWS (2.4.3): Document fix.
5 * src/complain.c (error_message): Extend to handle incomplete
6 error messages so warn and warn_at can be used in more cases.
7 * src/gram.c (grammar_rules_useless_report): Use warn_at so that
8 -Werror is always obeyed.
9 * src/reduce.c (reduce_print): Use warn so that the "warnings
10 being treated as errors" message is printed consistently before
11 the first warning message. This makes testing easier.
12 * tests/local.at (AT_BISON_WERROR_MSG): New macro.
13 (AT_BISON_CHECK_NO_XML): Extend to check -Werror and
14 --warnings=error when warnings appear in bison's stderr.
15
16 2010-07-29 Joel E. Denny <joeldenny@joeldenny.org>
17
18 maint: enable gnits only at stable releases.
19 * configure.ac (AM_INIT_AUTOMAKE): Underscore or dash in a
20 version string should disable gnits. Explain in comments.
21
22 2010-07-28 Joel E. Denny <joeldenny@joeldenny.org>
23
24 i18n: update.
25 * po/POTFILES.in: Add src/graphviz.c.
26
27 2010-07-28 Joel E. Denny <joeldenny@joeldenny.org>
28
29 i18n: fix for gnulib.
30 * po/POTFILES.in: Add remaining gnulib files that have
31 translatable strings.
32
33 2010-07-25 Joel E. Denny <joeldenny@joeldenny.org>
34
35 build: fix our adjustments for gnulib files in lib.
36 * configure.ac: For prepending lib/ to the values of config
37 variables, fix detection of empty values. Also, due to recent
38 gnulib changes, add LIBUNISTRING_UNITYPES_H and
39 LIBUNISTRING_UNIWIDTH_H to the list of those variables.
40
41 2010-07-25 Joel E. Denny <joeldenny@joeldenny.org>
42
43 maint: use announce-gen's new --mail-headers.
44 * HACKING (Announce): Update instructions.
45 * cfg.mk (announcement_Cc_): Define.
46 * configure.ac (AM_GNU_GETTEXT_VERSION): Update to 0.18 as
47 required by latest gnulib.
48 * gnulib: Update to latest.
49
50 2010-07-24 Joel E. Denny <joeldenny@joeldenny.org>
51
52 tests: handle Valgrind that complains about >&-.
53 * tests/output.at (AT_CHECK_OUTPUT): Extend to accept pre-tests.
54 (Output files: -dv >&-): Skip test group if running
55 maintainer-check-valgrind.
56
57 2010-07-23 Paul Hilfinger <hilfingr@EECS.Berkeley.EDU>
58
59 * NEWS: Describe new semantic-predicate feature.
60 * data/c.m4 (b4_predicate_case): New definition.
61 * data/java.m4 (b4_predicate_case): New definition.
62 * data/glr.c (yyimmediate): Add definition.
63 (yydoAction): Remove comment, now obsolete.
64 Do YY_REDUCE_PRINT here.
65 (yyglrReduce): Alter comment to indicate that semantic values
66 need not be deferred.
67 Remove YY_REDUCE_PRINT from here; done in yydoAction.
68 (yyprocessOneStack): Pass immediate flag.
69 Delete stacks rejected by predicates in newly split-off parsers.
70 Change handling of yyerr so that only current stack gets deleted
71 when semantic predicate fails.
72 (yyfillin): Don't crash if a semantic value is unresolved (as may
73 happen in predicate rules).
74 Copy lr state as well in debugging mode.
75 Update comment on setting of yysval to include yyloc as well.
76 (yy_reduce_print): Add yynormal argument. Perform fillin properly.
77 Report unresolved RHS values.
78 (yyimmediate): New table.
79 * src/gram.h (struct rule): Add is_predicate field.
80 * src/output.c (user_actions_output): Use b4_predicate_case for
81 predicates.
82 (prepare_symbols): Output yyimmediate.
83 * src/scan-gram.l: Add %? token, SC_PREDICATE state.
84 * src/scan-code.l (code_props_rule_action_init): Add is_predicate
85 argument.
86 * src/scan-code.h (struct code_props): Add is_predicate field.
87 (code_props_rule_action_init): New interface.
88 * src/parse-gram.y (%?{...}): New token.
89 (rhs): Add %?{...} rule.
90 * src/parse-gram.c: Regenerate.
91 * src/parse-gram.h: Regenerate.
92 * src/reader.c (grammar_current_rule_action_append): Add
93 immediate argument.
94 (grammar_midrule_action): Use new interface for
95 code_props_rule_action_init.
96 (grammar_current_rule_action_append): Ditto.
97 (packgram): Transfer is_predicate value.
98 * src/reader.h (grammar_current_rule_action_append): New interface.
99 * doc/bison.texinfo: Document semantic predicates (%?).
100
101 * data/glr.c (yylhsNonterm, yyisDefaultedState,yyDefaultAction)
102 (yygetLRActions,yynewGLRStackItem,yyaddDeferredAction,yyinitStateSet)
103 (yyinitGLRStack,yyexpandGLRStack,yyupdateSplit,yymarkStackDeleted)
104 (yyundeleteLastStack,yyglrShift,yyglrShiftDefer,yydoAction,yyglrReduce)
105 (yyidenticalOptions,yymergeOptionSets,yyresolveStates,yyresolveAction)
106 (yyresolveLocations,yyresolveValue,yyreducePrint): Update parameter
107 names in comments and mention all parameters.
108 (struct yyGLRState): Fix description of yyposn field.
109 (yyresolveLocations): Correct comment so as not to imply action when
110 yyn1==0.
111
112 2010-06-17 Paul Eggert <eggert@cs.ucla.edu>
113
114 Update from GFDL GFDL 1.2 to 1.3.
115 * doc/bison.texinfo: Update GFDL version number.
116 * doc/fdl.texi: Update to version 1.3, taken from:
117 http://www.gnu.org/licenses/fdl.texi
118
119 Do not use date ranges in copyright notices.
120 See http://www.gnu.org/prep/maintain/maintain.html#Copyright-Notices
121
122 * HACKING, Makefile.am, NEWS, PACKAGING, README, README-alpha:
123 * TODO, bootstrap, bootstrap.conf:
124 * build-aux/update-b4-copyright, cfg.mk, configure.ac:
125 * data/README, data/bison.m4, data/c++-skel.m4, data/c++.m4:
126 * data/c-skel.m4, data/c.m4, data/glr.c, data/glr.cc:
127 * data/java-skel.m4, data/java.m4, data/lalr1.cc:
128 * data/lalr1.java, data/local.mk, data/location.cc:
129 * data/stack.hh, data/variant.hh, data/xslt/bison.xsl:
130 * data/xslt/xml2dot.xsl, data/xslt/xml2text.xsl:
131 * data/xslt/xml2xhtml.xsl, data/yacc.c, djgpp/Makefile.maint:
132 * djgpp/README.in, djgpp/config.bat, djgpp/config.sed:
133 * djgpp/config.site, djgpp/config_h.sed, djgpp/djunpack.bat:
134 * djgpp/local.mk, djgpp/subpipe.c, djgpp/subpipe.h:
135 * djgpp/testsuite.sed, doc/bison.texinfo, doc/local.mk:
136 * doc/refcard.tex, etc/README, etc/bench.pl.in, etc/local.mk:
137 * examples/calc++/Makefile.am, examples/extexi:
138 * examples/local.mk, lib/abitset.c, lib/abitset.h:
139 * lib/bbitset.h, lib/bitset.c, lib/bitset.h:
140 * lib/bitset_stats.c, lib/bitset_stats.h, lib/bitsetv-print.c:
141 * lib/bitsetv-print.h, lib/bitsetv.c, lib/bitsetv.h:
142 * lib/ebitset.c, lib/ebitset.h, lib/get-errno.c:
143 * lib/get-errno.h, lib/lbitset.c, lib/lbitset.h:
144 * lib/libiberty.h, lib/local.mk, lib/main.c, lib/timevar.c:
145 * lib/timevar.def, lib/timevar.h, lib/vbitset.c:
146 * lib/vbitset.h, lib/yyerror.c, m4/bison-i18n.m4:
147 * m4/c-working.m4, m4/cxx.m4, m4/subpipe.m4, m4/timevar.m4:
148 * src/AnnotationList.c, src/AnnotationList.h:
149 * src/InadequacyList.c, src/InadequacyList.h, src/LR0.c:
150 * src/LR0.h, src/Sbitset.c, src/Sbitset.h, src/assoc.c:
151 * src/assoc.h, src/closure.c, src/closure.h, src/complain.c:
152 * src/complain.h, src/conflicts.c, src/conflicts.h:
153 * src/derives.c, src/derives.h, src/files.c, src/files.h:
154 * src/flex-scanner.h, src/getargs.c, src/getargs.h:
155 * src/gram.c, src/gram.h, src/graphviz.c, src/ielr.c:
156 * src/ielr.h, src/lalr.c, src/lalr.h, src/local.mk:
157 * src/location.c, src/location.h, src/main.c:
158 * src/muscle-tab.c, src/muscle-tab.h, src/named-ref.c:
159 * src/named-ref.h, src/nullable.c, src/nullable.h:
160 * src/output.c, src/output.h, src/parse-gram.y:
161 * src/print-xml.c, src/print-xml.h, src/print.c, src/print.h:
162 * src/print_graph.c, src/print_graph.h, src/reader.c:
163 * src/reader.h, src/reduce.c, src/reduce.h, src/relation.c:
164 * src/relation.h, src/scan-code.h, src/scan-code.l:
165 * src/scan-gram.h, src/scan-gram.l, src/scan-skel.h:
166 * src/scan-skel.l, src/state.c, src/state.h, src/symlist.c:
167 * src/symlist.h, src/symtab.c, src/symtab.h, src/system.h:
168 * src/tables.c, src/tables.h, src/uniqstr.c, src/uniqstr.h:
169 * tests/actions.at, tests/atlocal.in, tests/c++.at:
170 * tests/calc.at, tests/conflicts.at, tests/cxx-type.at:
171 * tests/existing.at, tests/glr-regression.at:
172 * tests/headers.at, tests/input.at, tests/java.at:
173 * tests/local.at, tests/local.mk, tests/named-refs.at:
174 * tests/output.at, tests/push.at, tests/reduce.at:
175 * tests/regression.at, tests/sets.at, tests/skeletons.at:
176 * tests/synclines.at, tests/testsuite.at, tests/torture.at:
177 Don't use date ranges in copyright notices.
178
179 2010-05-11 Akim Demaille <demaille@gostai.com>
180
181 lalrl1.cc: give a chance to user defined YYLLOC_DEFAULT.
182 * data/lalr1.cc (YYLLOC_DEFAULT): Move its definition from the
183 header file to the implementation file, after the user %code
184 sections.
185 * NEWS (2.5): Document this.
186
187 2010-05-11 Akim Demaille <demaille@gostai.com>
188
189 doc: please Emacs.
190 * doc/bison.texinfo (Local Variables): Move this after the
191 LocalWords, since the latter are looked for in the whole document,
192 while the former are looked for only at its end.
193 Require american spell checking.
194
195 2010-05-10 Akim Demaille <demaille@gostai.com>
196
197 doc: fix lalr1.cc documentation.
198 * doc/bison.texinfo (C++ Scanner Interface): Fix yylex signature.
199 (C++ Bison Interface): Fix lalr1.cc skeleton name.
200 (C++ Parser Interface): Fix semantic_type and location_type names.
201 Document yy::parser::token.
202 Reported by Jerry Quinn.
203
204 2010-05-10 Akim Demaille <demaille@gostai.com>
205
206 c++: use YYRHSLOC.
207 * data/lalr1.cc (YYRHSLOC): New.
208 (YYLLOC_DEFAULT): Use it.
209 * data/glr.cc: If location_type was user defined, do not include
210 location.hh, and do not produce location.hh and position.hh.
211 * tests/calc.at (YYLLOC_DEFAULT): Use YYRHSLOC.
212 Check that glr.cc supports user defined location_type.
213 * NEWS: Document this.
214
215 2010-05-07 Akim Demaille <demaille@gostai.com>
216
217 doc: fix typo.
218 * tests/synclines.at: here.
219
220 2010-05-04 Akim Demaille <demaille@gostai.com>
221
222 tests: enhance AT_SYNCLINES_COMPILE.
223 * tests/synclines.at (AT_SYNCLINES_COMPILE): More distcc patterns.
224 (AT_TEST_SYNCLINE): Remove GCC 4.5 protection which is already
225 taken care of in AT_SYNCLINES_COMPILE.
226
227 2010-05-04 Akim Demaille <demaille@gostai.com>
228
229 lalr1.cc: don't generate location.hh when location_type is defined
230 * data/bison.m4 (b4_percent_define_get): Accept a default value.
231 * data/c++.m4: Do not provide a default value for the %define
232 variable location_type, rather, use b4_percent_define_get with a
233 default argument where its value is needed.
234 * data/lalr1.cc: Do not load location.cc (which outputs both
235 location.hh and position.hh) if the user defined location_type.
236 Do not include location.hh either.
237
238 2010-05-04 Akim Demaille <demaille@gostai.com>
239
240 lalr1.cc: minor refactoring.
241 * data/lalr1.cc: Don't issue empty namespaces.
242
243 2010-05-04 Akim Demaille <demaille@gostai.com>
244
245 tests: fix %printer.
246 Currently, there is no check that %printer ... <foo> (nor
247 %destructor) is about an existing <foo> type. This C++ test had
248 it wrong (<::std::string> vs. <std::string>).
249
250 * tests/c++.at (AT_CHECK_VARIANTS): In list.yy, redefine the
251 pretty-printing of lists into something better for parser traces.
252 Update the expected output.
253 Fix correspondance between %type/%token and %printer.
254
255 2010-05-04 Akim Demaille <demaille@gostai.com>
256
257 lalr1.cc: location_type: make sure we don't depend on loc.(begin|end).
258 * tests/calc.at (Span): Instead of begin/end, as in the built-in
259 location class, use first and last.
260 Define YYLLOC_DEFAULT to adjust to these changes.
261 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Adjust to the
262 location_type changes.
263
264 2010-05-01 Joel E. Denny <joeldenny@joeldenny.org>
265
266 tests: fix maintainer-xml-check.
267 * data/xslt/xml2dot.xsl (xsl:template match="bison-xml-report"):
268 Update output to include comments now produced by --graph.
269 (xsl:template match="automaton"): As for --graph, name the
270 digraph after the grammar file.
271 * src/print-xml.c (escape_bufs): Enlarge array.
272 (print_xml): Add bug-report and url attributes to
273 bison-xml-report element.
274
275 2010-05-01 Joel E. Denny <joeldenny@joeldenny.org>
276
277 In DOT output, convert from "/*" comments to "//" comments.
278 This handles the possibility that a "*/" might appear in
279 variable portions of those comments at some point in the future.
280 * src/graphviz.c (start_graph): Implement.
281
282 2010-04-30 Joel E. Denny <joeldenny@joeldenny.org>
283
284 Document that undefined %prec identifier warnings will remain.
285 * NEWS (2.4.3): Here.
286 (2.4.2): Here.
287
288 2010-04-30 Joel E. Denny <joeldenny@joeldenny.org>
289
290 Revert 2009-12-30 change for undefined %prec token complaints.
291 That is, keep them as warnings because that should be sufficient
292 to satisfy POSIX without creating backward compatibility issues.
293 Suggested by Richard Stallman at
294 <http://lists.gnu.org/archive/html/bison-patches/2010-03/msg00033.html>.
295 * NEWS (2.5): Remove mention of complaint.
296 * src/reader.c (grammar_rule_check): Convert complaint back to
297 warning.
298 * tests/input.at (%prec's token must be defined): Update.
299
300 2010-04-25 Joel E. Denny <joeldenny@joeldenny.org>
301
302 build: don't require src/bison during bootstrap.
303 Suggested by Eric Blake at
304 <http://lists.gnu.org/archive/html/bug-bison/2010-03/msg00003.html>.
305 * bootstrap.conf (bootstrap_epilogue): New function to make sure
306 src/parse-gram.[ch] are stamped later than src/parse-gram.y.
307
308 2010-04-25 Joel E. Denny <joeldenny@joeldenny.org>
309
310 i18n: fix untranslatable string.
311 Reported by Goran Uddeborg at
312 <http://lists.gnu.org/archive/html/bug-bison/2010-03/msg00000.html>.
313 * src/muscle-tab.c (muscle_percent_define_insert): Here.
314
315 2010-04-13 Akim Demaille <demaille@gostai.com>
316
317 tests: calc: minor refactoring.
318 * tests/calc.at (_AT_DATA_CALC_Y): Simplify yylex.
319
320 2010-04-13 Akim Demaille <demaille@gostai.com>
321
322 tests: calc: simplify location management.
323 * tests/local.at (AT_LOC_PUSHDEF, AT_LOC_POPDEF): New.
324 (_AT_BISON_OPTION_PUSHDEFS, AT_BISON_OPTION_POPDEFS): Use them to
325 define the appropriate AT_LOC accessors.
326 * tests/calc.at: Use AT_LOC accessors.
327
328 2010-04-13 Akim Demaille <demaille@gostai.com>
329
330 test location_type.
331 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS):
332 Define AT_LOCATION_TYPE_IF.
333 (_AT_BISON_OPTION_POPDEFS): Undefine AT_LOCATION_TYPE_IF.
334 * tests/calc.at (_AT_DATA_CALC_Y): When %define location_type is
335 used, provide a user location type and use it.
336 (Simple LALR1 C++ Calculator): Add a test case for location_type.
337
338 2010-04-13 Akim Demaille <demaille@gostai.com>
339
340 tests: check fclose's return value.
341 * tests/calc.at (_AT_DATA_CALC_Y): Check fclose's return status.
342
343 2010-04-13 Akim Demaille <demaille@gostai.com>
344
345 tests: don't depend on the actual location type.
346 * tests/calc.at: Use yy::parser::location_type rather than
347 yy::location, since the former is always right, and might point to
348 another type than the latter.
349
350 2010-04-13 Akim Demaille <demaille@gostai.com>
351
352 formatting changes.
353 * tests/calc.at: Formatting changes.
354
355 2010-04-13 Akim Demaille <demaille@gostai.com>
356
357 lalr1.cc: remove useless forward declaration.
358 * data/lalr1.cc: Include location.hh before stack.hh.
359 Remove the useless forward declarations of position and location.
360 Reported by Chris Morley.
361 * data/glr.cc: Likewise.
362
363 2010-04-11 Joel E. Denny <joeldenny@joeldenny.org>
364
365 * NEWS (2.4.3): Mention fix for Sun Studio C++.
366
367 2010-04-10 Joel E. Denny <joeldenny@joeldenny.org>
368
369 tests: fix for newer Sun Studio C++.
370 Reported by Dagobert Michelsen at
371 <http://lists.gnu.org/archive/html/bug-bison/2010-03/msg00023.html>.
372 * THANKS (Dagobert Michelsen): Add.
373 * configure.ac (AC_PREREQ): Set to 2.64 so we get the latest
374 Autoconf macro for handling the restrict keyword.
375 * gnulib: Update to latest, which no longer overrides that macro
376 from Autoconf.
377
378 2010-04-03 Joel E. Denny <jdenny@ces.clemson.edu>
379
380 portability: fix pointer arithmetic to conform to C standard.
381 Reported by Tys Lefering at
382 <http://lists.gnu.org/archive/html/bug-bison/2010-03/msg00035.html>.
383 This fix is already implemented in glr.c and does not apply to
384 lalr1.java.
385 * data/lalr1.cc (yy::parser::parse): Increase size of
386 yyerror_range and adjust subscripting so you don't have to
387 subtract one from the beginning of the array.
388 * data/yacc.c (b4_declare_parser_state_variables,
389 yyparse, yypush_parse): Likewise.
390
391 2010-04-05 Akim Demaille <demaille@gostai.com>
392
393 remove useless include.
394 * src/graphviz.h: Don't include stdbool.h.
395
396 2010-04-05 Akim Demaille <demaille@gostai.com>
397
398 graph: sign the output file.
399 * src/graphviz.c (start_graph): Issue comments about Bison.
400 Suggested by Tys Lefering.
401
402 2010-03-31 Joel E. Denny <jdenny@ces.clemson.edu>
403
404 portability: fix test suite for GCC 4.5's new #error message.
405 Reported by Tys Lefering at
406 <http://lists.gnu.org/archive/html/bug-bison/2010-03/msg00030.html>.
407 * NEWS (2.4.3): Mention.
408 * tests/synclines.at (AT_TEST_SYNCLINE): Implement.
409
410 2010-03-30 Akim Demaille <demaille@gostai.com>
411
412 fix comments.
413 * src/graphviz.h: Add missing license notice.
414 Document.
415
416 2010-03-25 Akim Demaille <demaille@gostai.com>
417
418 tests: fix 250: parse.error=verbose overflow.
419 * tests/regression.at (parse.error=verbose overflow): Avoid the
420 double inclusion of stdlib.h as it triggers hard errors.
421
422 2010-03-23 Joel E. Denny <jdenny@ces.clemson.edu>
423
424 portability: fix for BSD make.
425 Reported by Johan van Selst at
426 <http://lists.gnu.org/archive/html/bug-bison/2010-03/msg00016.html>.
427 * tests/local.mk ($(TESTSUITE)): Qualify package.m4 in
428 this dependency list as in package.m4's target rule.
429
430 2010-03-23 Joel E. Denny <jdenny@ces.clemson.edu>
431
432 portability: fix spawning on at least FreeBSD 8 and FreeBSD 9.
433 Reported by Johan van Selst at
434 <http://lists.gnu.org/archive/html/bug-bison/2010-03/msg00014.html>.
435 * NEWS (2.4.3): New.
436 * THANKS (Johan van Selst): Add.
437 * etc/prefix-gnulib-mk (prefix): Adjust regex for makefile
438 targets so that gnulib's new c++defs.h is matched.
439 * gnulib: Update to latest.
440
441 2010-03-20 Joel E. Denny <jdenny@ces.clemson.edu>
442
443 maint: update for changes to gnulib's announce-gen.
444 * HACKING (Announce): RELEASE_TYPE=major must now be written
445 RELEASE_TYPE=stable.
446
447 2010-03-20 Joel E. Denny <jdenny@ces.clemson.edu>
448
449 Version 2.4.2.
450 * NEWS (2.4.2): Set version and date. For the recent test suite
451 portability fixes, don't be so optimistic about their success
452 given the lack of feedback on the affected platforms.
453
454 2010-02-22 Joel E. Denny <jdenny@ces.clemson.edu>
455
456 tests: fix maintainer-xml-check for recent changes.
457 * tests/output.at (AT_CHECK_CONFLICTING_OUTPUT): Use
458 AT_BISON_CHECK_NO_XML rather than AT_BISON_CHECK because an
459 output file whose name conflicts with a previous output file
460 is now never generated.
461
462 2010-02-22 Joel E. Denny <jdenny@ces.clemson.edu>
463
464 portability: fix several issues with M4 subprocess.
465
466 M4's output pipe was not being drained upon fatal errors during
467 scan_skel. As a result, broken-pipe messages from M4 were seen
468 on at least AIX, HP-UX, Solaris, and RHEL4, and this caused a
469 failure in the test suite. The problem was that, on platforms
470 where the default disposition for SIGPIPE is ignore instead of
471 terminate, M4 sometimes saw fwrite fail with errno=EPIPE and
472 then reported it. However, there's some sort of race condition,
473 because the new test group occasionally succeeded.
474 Reported by Albert Chin at
475 <http://lists.gnu.org/archive/html/bug-bison/2010-02/msg00004.html>.
476
477 There were also problems with the test suite livelocking on
478 Tru64 5.1b. Reported by Didier Godefroy at
479 <http://lists.gnu.org/archive/html/bug-bison/2009-05/msg00005.html>.
480 Switching to create_pipe_bidi suggested by Akim Demaille.
481
482 To attempt to solve both of these problems, switch to gnulib's
483 create_pipe_bidi and register M4 process as a slave. Along the
484 way, clean up file name conflict handling, which was affected by
485 the broken-pipe problem before the switch.
486 * NEWS (2.4.2): Document.
487 * THANKS (Didier Godefroy): Add.
488 * bootstrap.conf (gnulib_modules): Add pipe.
489 * gnulib: Update to latest to make sure we have all the latest
490 fixes.
491 * lib/local.mk (lib_libbison_a_SOURCES): Remove subpipe.h and
492 subpipe.c.
493 * po/POTFILES.in (lib/subpipe.c): Remove.
494 * src/files.c (compute_output_file_names): Update invocations
495 of output_file_name_check.
496 (output_file_name_check): In the case that the grammar file
497 would be overwritten, use complain instead of fatal, but replace
498 the output file name with /dev/null. Use the /dev/null solution
499 for the case of two conflicting output files as well because it
500 seems safer in case Bison one day tries to open both files at
501 the same time.
502 * src/files.h (output_file_name_check): Update prototype.
503 * src/output.c (output_skeleton): Use create_pipe_bidi and
504 wait_subprocess. Assert that scan_skel completely drains the
505 pipe.
506 * src/scan-skel.l (at_directive_perform): Update
507 output_file_name_check invocation.
508 * tests/output.at (AT_CHECK_CONFLICTING_OUTPUT): Check that the
509 grammar file actually isn't overwritten.
510 (Conflicting output files: -o foo.y): Update expected output.
511 * tests/skeletons.at (Fatal errors but M4 continues producing
512 output): New test group.
513
514 2010-02-04 Joel E. Denny <jdenny@ces.clemson.edu>
515
516 Update POTFILES.
517 * HACKING (Release Procedure): Add reminder about keeping
518 POTFILES files up-to-date.
519 * po/POTFILES.in (src/muscle-tab.c, src/scan-skel.l): Add.
520
521 2010-02-01 Joel E. Denny <jdenny@clemson.edu>
522
523 Code cleanup.
524 * tests/atlocal.in (abs_top_srcdir): Remove shell variable,
525 which is already defined in atconfig.
526
527 2010-01-22 Joel E. Denny <jdenny@clemson.edu>
528
529 tests: fix missing include caught by g++ 4.4.1.
530 Reported by Tys Lefering.
531 * HACKING (Release checks): Add note about trying a recent GCC.
532 * tests/regression.at (_AT_DATA_DANCER_Y): For C++, include
533 cstdlib for abort.
534 (_AT_DATA_EXPECT2_Y): Likewise.
535
536 2010-01-21 Joel E. Denny <jdenny@clemson.edu>
537
538 * cfg.mk (gnulib_dir): Assume gnulib is a subdirectory.
539
540 2010-01-21 Joel E. Denny <jdenny@clemson.edu>
541
542 maint: automate PACKAGE_COPYRIGHT_YEAR update, and update it.
543 * HACKING (Release Procedure): Update notes on copyright years.
544 * Makefile.am (update-package-copyright-year): New target rule.
545 * build-aux/update-package-copyright-year: New file.
546 * cfg.mk (update-copyright): Add update-package-copyright-year
547 as a dependency.
548
549 2010-01-19 Joel E. Denny <jdenny@clemson.edu>
550
551 * bootstrap: Import improvements from latest gnulib.
552
553 2010-01-19 Joel E. Denny <jdenny@clemson.edu>
554
555 build: require Automake 1.11.1 to avoid a security flaw.
556 * HACKING (Release Procedure): Don't document Automake security
557 flaw here.
558 * configure.ac (AM_INIT_AUTOMAKE): Require 1.11.1, and explain
559 why here.
560
561 2010-01-19 Joel E. Denny <jdenny@clemson.edu>
562
563 gnulib: update to latest.
564
565 2010-01-19 Joel E. Denny <jdenny@clemson.edu>
566
567 ChangeLog (2006-09-15): add Odd Arild Olsen's role for push.c.
568
569 2010-01-15 Joel E. Denny <jdenny@clemson.edu>
570
571 Thank the developer of the initial push parser implementation.
572 This unfortunate oversight is several years old.
573 * THANKS (Odd Arild Olsen): Add.
574
575 2010-01-04 Joel E. Denny <jdenny@clemson.edu>
576
577 Fix some comments concerning LR(0) versus LALR(1).
578
579 Stop equating LR(0) with nondeterminism and LALR(1) with
580 determinism. That is, if all states are consistent, then LR(0)
581 tables are deterministic. On the other hand, LALR(1) tables
582 might be nondeterministic before conflict resolution, and GLR
583 permits LALR(1) tables to remain nondeterministic.
584 * src/LR0.c, src/LR0.h: Here.
585 * src/lalr.c, src/lalr.h: Here.
586 * src/main.c (main): Here.
587 * src/state.c, src/state.h: Here.
588
589 * src/ielr.h (ielr): In preconditions, expect LR(0) not LALR(1)
590 parser tables.
591
592 2010-01-04 Joel E. Denny <jdenny@clemson.edu>
593
594 maint: run "make update-copyright"
595
596 2009-12-30 Joel E. Denny <jdenny@clemson.edu>
597
598 POSIX: complain if %prec's token was not defined.
599 * NEWS (2.5): Document.
600 * src/reader.c (grammar_rule_check): Convert warning to
601 complaint.
602 * tests/input.at (%prec's token must be defined): Update.
603
604 2009-12-30 Joel E. Denny <jdenny@clemson.edu>
605
606 POSIX: warn if %prec's token was not defined.
607 Reported by Florian Krohm at
608 <http://lists.gnu.org/archive/html/bug-bison/2009-12/msg00005.html>.
609 * NEWS (2.4.2): Document.
610 * src/reader.c (grammar_rule_check): Implement.
611 (grammar_current_rule_prec_set): Add comments explaining that we
612 here assume a %prec identifier is a token, but we still manage
613 to support POSIX.
614 * tests/input.at (%prec's token must be defined): New test
615 group.
616
617 2009-12-31 Joel E. Denny <jdenny@clemson.edu>
618
619 * HACKING (Release Procedure): Recommend a secure automake.
620
621 2009-12-29 Joel E. Denny <jdenny@clemson.edu>
622
623 portability: `<' and `>' are not always defined on addresses.
624 Specifically, don't sort objects by their memory addresses when
625 they're not allocated in the same array or other object. Though
626 I haven't found a test case where that fails on my platform, C
627 says the behavior is undefined.
628 * src/AnnotationList.c (AnnotationList__insertInto): Remove
629 FIXME. Use new id field of InadequacyList nodes rather than
630 their memory addresses when sorting.
631 (AnnotationList__compute_from_inadequacies): Add
632 inadequacy_list_node_count argument to pass to
633 InadequacyList__new_conflict.
634 * src/AnnotationList.h
635 (AnnotationList__compute_from_inadequacies): Update prototype
636 and documentation for new argument.
637 * src/InadequacyList.c (InadequacyList__new_conflict): Add
638 node_count argument and use it to assign a unique ID.
639 * src/InadequacyList.h (InadequacyListNodeCount): New typedef.
640 (InadequacyList): Add id field.
641 (InadequacyList__new_conflict): Update prototype and
642 documentation for new argument.
643 * src/ielr.c (ielr_compute_annotation_lists): Update
644 AnnotationList__compute_from_inadequacies invocation.
645
646 2009-12-20 Joel E. Denny <jdenny@clemson.edu>
647
648 Fix handling of yychar manipulation in user semantic actions.
649 The problem was that yacc.c didn't always update the yychar
650 translation afterwards. However, other skeletons appear to be
651 fine. glr.c appears to already translate yychar before every
652 use. lalr1.cc does not define yychar and does not document its
653 replacement, yyla, for users. It does provide yyclearin, but
654 that does not manipulate yyla and thus requires no translation
655 update. In lalr1.java, yychar is out of scope during semantic
656 actions.
657 * NEWS (2.5): Document.
658 * data/yacc.c (YYBACKUP): Don't bother translating yychar into
659 yytoken here.
660 (yyparse, yypush_parse): Instead, translate before every use of
661 yytoken, and add comments explaining this approach.
662 * tests/actions.at (Destroying lookahead assigned by semantic
663 action): New test group checking that translation happens before
664 lookahead destructor calls at parser return. Previously,
665 incorrect destructors were called.
666 * tests/conflicts.at (parse.error=verbose and consistent
667 errors): New test group checking that translation happens at
668 syntax error detection before the associated verbose error
669 message and the associated lookahead destructor calls. While
670 the destructor call is fixed by this patch, the verbose error
671 message is currently incorrect due to another bug (see
672 comments in test group), so this is an expected failure for now.
673
674 2009-12-21 Joel E. Denny <jdenny@clemson.edu>
675
676 YYFAIL: warn about uses and remove from lalr1.java.
677 * NEWS (2.5): Document.
678 * data/lalr1.java (parser::YYStack::YYFAIL): Rename to YYERRLAB,
679 and make it private. Update all uses.
680 * src/scan-code.l (SC_RULE_ACTION): Implement warning.
681
682 2009-12-21 Joel E. Denny <jdenny@clemson.edu>
683
684 YYFAIL: deprecate.
685 * NEWS (2.4.2): Document deprecation and the phase-out plan.
686 * data/lalr1.java (parser::YYStack::YYFAIL): Add comment about
687 deprecation.
688 * data/yacc.c (YYFAIL): Likewise, and suppress warnings about
689 YYFAIL from GCC cpp's -Wunused-macros.
690 * doc/bison.texinfo (Java Action Features): Remove YYFAIL
691 documentation.
692 (LocalWords): Remove YYFAIL.
693
694 2009-12-20 Joel E. Denny <jdenny@clemson.edu>
695
696 tests: cleanup.
697 * tests/c++.at (Syntax error discarding no lookahead): Don't
698 ignore stderr. Instead, eliminate remaining warnings.
699
700 2009-12-18 Joel E. Denny <jdenny@clemson.edu>
701
702 lalr1.cc: don't discard non-existent lookahead on syntax error.
703 * data/lalr1.cc (parser::parse): Check yyempty first.
704 * tests/c++.at (Syntax error discarding no lookahead): New test
705 group.
706
707 2009-12-17 Joel E. Denny <jdenny@clemson.edu>
708
709 Code cleanup.
710 * src/symtab.c, src/symtab.h (symbol_class_get_string): Remove
711 function, which is no longer used.
712
713 2009-12-16 Joel E. Denny <jdenny@clemson.edu>
714
715 Add gcc's -Wundef to test suite and fix another warning from it.
716 * NEWS (2.4.2): Update description of -Wundef fix.
717 * configure.ac (WARN_CXXFLAGS_TEST): New substitution.
718 (WARN_CFLAGS_TEST): New substitution.
719 * data/glr.c: Avoid warning about __STRICT_ANSI__.
720 * tests/atlocal.in (CFLAGS): Use WARN_CFLAGS_TEST instead of
721 WARN_CFLAGS.
722 (NO_WERROR_CFLAGS): Likewise.
723 (CXXFLAGS): Use WARN_CXXFLAGS_TEST instead of WARN_CXXFLAGS.
724
725 2009-12-16 Joel E. Denny <jdenny@clemson.edu>
726
727 * data/yacc.c: Reformat m4 a little.
728
729 2009-12-16 Joel E. Denny <jdenny@clemson.edu>
730
731 Document gcc -Wundef fix.
732 * NEWS (2.4.2): Here.
733 * THANKS (Jonathan Nieder): Add.
734
735 2009-12-15 Jonathan Nieder <jrnieder@gmail.com> (tiny change)
736
737 Simplify y.tab.c when location tracking is disabled.
738 * data/yacc.c: Do not check YYLTYPE_IS_TRIVIAL if location
739 tracking is not enabled. Instead, unconditionally define
740 YY_LOCATION_PRINT as a no-op for backward compatibility.
741
742 2009-12-15 Jonathan Nieder <jrnieder@gmail.com> (tiny change)
743
744 Avoid warnings from gcc -Wundef y.tab.c.
745 * data/glr.c: Check if YYENABLE_NLS and YYLTYPE_IS_TRIVIAL are
746 defined before using them.
747 * data/lalr1.cc: Likewise.
748 * data/yacc.c: Likewise.
749
750 2009-12-15 Joel E. Denny <jdenny@clemson.edu>
751
752 autoconf: update to latest for fix of M4 detection.
753 Reported by Eric Blake.
754 * submodules/autoconf: Update.
755
756 2009-12-15 Joel E. Denny <jdenny@clemson.edu>
757
758 portability: use -DGNULIB_POSIXCHECK.
759 Reported by Eric Blake. See discussions at
760 <http://lists.gnu.org/archive/html/bug-bison/2009-09/msg00008.html>
761 and
762 <http://lists.gnu.org/archive/html/bug-gnulib/2009-10/msg00108.html>.
763 * HACKING (Release checks): Suggest -DGNULIB_POSIXCHECK.
764 * bootstrap.conf (gnulib_modules): Add all the printf modules
765 suggested by -DGNULIB_POSIXCHECK. Add realloc-posix as
766 suggested by -DGNULIB_POSIXCHECK for gnulib's own vasnprintf.c.
767 (excluded_files): Remove m4/printf-posix.m4.
768 * tests/atlocal.in (LIBS): As for LDADD in src/local.mk, add
769 lib/libbison.a so gnulib libraries can be linked.
770
771 2009-12-15 Joel E. Denny <jdenny@clemson.edu>
772
773 gnulib: update for fix of fprintf-posix, which we'll use soon.
774 * etc/prefix-gnulib-mk (prefix): Adjust regex for make file
775 targets so that gnulib's new arg-nonnull.h and link-warning.h
776 are matched.
777 * gnulib: Update.
778
779 2009-12-14 Joel E. Denny <jdenny@clemson.edu>
780
781 Enable assertion output and --disable-assert for configure.
782 * bootstrap.conf (gnulib_modules): Add assert module.
783 * src/system.h (aver): Define as assert, and summarize the
784 discussion on this issue.
785
786 2009-12-14 Joel E. Denny <jdenny@clemson.edu>
787
788 Expand GLR acronym in summary of Bison.
789 Based on discussion with Akim Demaille starting at
790 <http://lists.gnu.org/archive/html/bison-patches/2009-04/msg00087.html>.
791 * doc/bison.texinfo (Introduction): Here.
792 * src/getargs.c (usage): Here.
793
794 2009-10-03 Alex Rozenman <rozenman@gmail.com>
795
796 Document named references.
797 * doc/bison.texinfo (Actions): Add new example and xref to
798 Using Named References node.
799 (Using Named References): New node.
800
801 2009-10-16 Joel E. Denny <jdenny@clemson.edu>
802
803 cleanup.
804 * src/Sbitset.c (Sbitset__new_on_obstack): Use Sbitset instead
805 of char*.
806 (Sbitset__isEmpty): Use Sbitset instead of char*.
807 * src/Sbitset.h (Sbitset): Make it a pointer to unsigned char
808 instead of char. This helps to avoid casting errors.
809 (Sbitset__or): Use Sbitset instead of char*.
810
811 2009-10-16 Joel E. Denny <jdenny@clemson.edu>
812
813 portability: don't assume 8-bit bytes.
814 That is, use CHAR_BIT and UCHAR_MAX instead of 8 and 0xff.
815 * src/Sbitset.h (Sbitset__nbytes): Here.
816 (Sbitset__byteAddress): Here.
817 (Sbitset__bit_mask): Here.
818 (Sbitset__last_byte_mask): Here.
819 (Sbitset__ones): Here.
820 (SBITSET__FOR_EACH): Here.
821
822 2009-10-11 Joel E. Denny <jdenny@clemson.edu>
823
824 portability: use va_start and va_end in the same function.
825 * src/complain.c (error_message): Move va_end from here...
826 (ERROR_MESSAGE): ... to here.
827
828 2009-10-08 Joel E. Denny <jdenny@clemson.edu>
829
830 * data/bison.m4: Update comments for rename to muscle-tab.h.
831
832 2009-10-07 Joel E. Denny <jdenny@clemson.edu>
833
834 Minor code cleanup.
835 * src/muscle-tab.c (MUSCLE_USER_NAME_CONVERT): Remove macro and
836 replace all uses with UNIQSTR_CONCAT.
837 * src/uniqstr.c (uniqstr_vsprintf): New function.
838 * src/uniqstr.h (uniqstr_vsprintf): Add prototype.
839 (UNIQSTR_CONCAT, UNIQSTR_GEN_FORMAT, UNIQSTR_GEN_FORMAT_): New
840 macros.
841
842 2009-10-06 Joel E. Denny <jdenny@clemson.edu>
843
844 * TODO (Complaint submessage indentation): New.
845
846 2009-10-04 Joel E. Denny <jdenny@clemson.edu>
847
848 Minor code cleanup.
849 * src/parse-gram.y: Clean up sorting of declarations.
850 Use types to simplify %printer declarations where possible.
851 Provide %printer for BRACKETED_ID and symbol.prec.
852 * src/symtab.c: Whitespace change.
853
854 2009-10-04 Joel E. Denny <jdenny@clemson.edu>
855
856 tests: skip tests of file names that platform does not support.
857 Reported by Michael Raskin at
858 <http://lists.gnu.org/archive/html/bug-bison/2009-09/msg00001.html>.
859 * THANKS (Michael Raskin): Add.
860 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): Fix. Cygwin used
861 to fail at least for file names containing ":" or "\".
862
863 2009-09-23 Joel E. Denny <jdenny@clemson.edu>
864
865 yysyntax_error: avoid duplicate lookahead collection.
866 Except when memory reallocation is required, this change
867 eliminates the need to invoke yysyntax_error twice and thus to
868 repeat the collection of lookaheads. It also prepares for
869 future extensions that will make those repetitions more
870 expensive and that will require additional memory management in
871 yysyntax_error. Finally, it fixes an obscure bug already
872 exercised in the test suite.
873 * data/yacc.c (yysyntax_error): Add arguments for message
874 buffer variables stored in the parser. Instead of size, return
875 status similar to yyparse status but indicating success of
876 message creation. Other than the actual reallocation of the
877 message buffer, import and clean up memory management code
878 from...
879 (yyparse, yypush_parse): ... here.
880 * tests/regression.at (parse.error=verbose overflow): No longer
881 an expected failure.
882
883 2009-09-23 Joel E. Denny <jdenny@clemson.edu>
884
885 yysyntax_error: test memory management more.
886 * tests/atlocal.in (NO_WERROR_CFLAGS): New cpp macro.
887 * tests/regression.at (parse.error=verbose and
888 YYSTACK_USE_ALLOCA): New test group.
889 (parse.error=verbose overflow): New test group that reveals an
890 obscure bug. Expected fail for now.
891
892 2009-10-04 Joel E. Denny <jdenny@clemson.edu>
893
894 benchmarks: use %debug consistently among grammars.
895 * etc/bench.pl.in (generate_grammar_triangular): Do not activate
896 %debug by default. It can affect the timings even if yydebug=0.
897 (generate_grammar_calc): For consistency with other grammars,
898 use YYDEBUG environment variable to set yydebug.
899
900 2009-10-03 Joel E. Denny <jdenny@clemson.edu>
901
902 Remove dead code.
903 * src/symtab.c (symbol_pack): Here because every symbol's number
904 is always defined by this time.
905
906 2009-10-03 Alex Rozenman <rozenman@gmail.com>
907
908 Add additional space after periods in NEWS.
909 * NEWS (2.5): here.
910
911 2009-09-29 Joel E. Denny <jdenny@clemson.edu>
912
913 Use the correct conversion specifier for size_t.
914 Reported by Jim Meyering.
915 * src/Sbitset.h (SBITSET__INDEX__CONVERSION_SPEC): New, "zu"
916 because Sbitset__Index is size_t.
917 * src/Sbitset.c (Sbitset__fprint): Use it instead of %d.
918
919 2009-09-27 Joel E. Denny <jdenny@clemson.edu>
920
921 tests: don't abuse AT_BISON_CHECK.
922 * tests/regression.at (parse-gram.y: LALR = IELR): Move
923 additional shell commands outside of AT_BISON_CHECK.
924
925 2009-09-26 Joel E. Denny <jdenny@clemson.edu>
926
927 tests: check that parse-gram.y's IELR and LALR are identical.
928 * tests/atlocal.in (abs_top_srcdir): New shell variable.
929 * tests/regression.at (parse-gram.y: LALR = IELR): New test
930 group.
931
932 2009-09-19 Alex Rozenman <rozenman@gmail.com>
933
934 Keep sub-messages aligned. Fix strings for translation.
935 * src/location.h (location_print): Add return value.
936 * src/location.c (location_print): Return number of printed
937 characters.
938 * src/complain.h (complain_at_indent, warn_at_indent): Prototype
939 new functions.
940 * src/complain.cpp (indent_ptr): New static variable.
941 (error_message, complain_at_indent, warn_at_indent): Implement
942 the alignment mechanism.
943 * src/scan-code.l (parse_ref, show_sub_messages): Fix strings
944 for translations. Use new alignment mechanism.
945 * tests/named-ref.at: Adjust test-cases.
946 * NEWS (2.5): Add an announcement about named references.
947
948 2009-09-17 Akim Demaille <demaille@gostai.com>
949
950 doc: fixes.
951 * doc/bison.texinfo: here.
952 Reported by Alex Rozenman.
953
954 2009-09-16 Akim Demaille <demaille@gostai.com>
955
956 doc: lalr1.cc and variants.
957 * doc/bison.texinfo (Decl Summary): Document the "lex_symbol" and
958 "variant" %define variables.
959 (C++ Semantic Values): Split into...
960 (C++ Unions, C++ Variants): these.
961 The latter is new.
962 (C++ Parser Interface): Fix type names.
963 Document parser::syntax_error.
964 Document the fact that locations are not mandatory.
965 (C++ Scanner Interface): Split into...
966 (Split Symbols, Complete Symbols): these.
967 The later is new.
968 (Calc++ Parsing Driver): Use variants.
969 Add more comments.
970 Adjust style.
971 (Calc++ Parser): Declare all the tokens, no
972 longer accept raw characters.
973 Remove %union.
974 Adjust types and printers.
975 Remove destructors.
976 (Calc++ Scanner): Use make_<SYMBOL> functions.
977 Use strerror in error message.
978
979 2009-09-16 Akim Demaille <demaille@gostai.com>
980
981 doc: spell checking.
982 * doc/bison.texinfo: here.
983
984 2009-09-16 Akim Demaille <demaille@gostai.com>
985
986 doc: comment changes.
987 * doc/bison.texinfo: Comment changes.
988
989 2009-09-16 Akim Demaille <demaille@gostai.com>
990
991 lalr1.cc: factor the yytranslate_ invocation in make_SYMBOLS.
992 * data/c++.m4, data/lalr1.cc (parser::symbol_type): Change the
993 constructor to take a token_type instead of the (internal) symbol
994 number.
995 Call yytranslate_.
996 * data/variant.hh (b4_symbol_constructor_define_): Therefore,
997 don't call yytranslate_ here.
998
999 2009-09-16 Akim Demaille <demaille@gostai.com>
1000
1001 TODO: statistics.
1002 * TODO (Figures): New.
1003
1004 2009-09-13 Joel E. Denny <jdenny@clemson.edu>
1005
1006 tests: clean up push.at test group titles.
1007 * tests/push.at: Remove "Push Parsing: " from test group titles
1008 because these are already under the banner "Push Parsing Tests".
1009
1010 2009-09-12 Alex Rozenman <rozenman@gmail.com>
1011
1012 Provide an additional sub-message for clarity.
1013 Add "symbol not found in production" error message when
1014 an "invalid reference" is detected in named references
1015 resolution.
1016 * src/scan-code.l: Update "invalid reference" case.
1017 * tests/named-ref.at: Adjust test-cases.
1018
1019 2009-09-10 Joel E. Denny <jdenny@clemson.edu>
1020
1021 Clean up yacc.c a little.
1022 * data/yacc.c: Clean up M4 for readability, and make output
1023 whitespace more consistent. For the main parse function
1024 comment, instead of saying "yyparse or yypush_parse", say either
1025 "yyparse" or "yypush_parse" depending on which it actually is.
1026
1027 2009-09-10 Joel E. Denny <jdenny@clemson.edu>
1028
1029 Fix --enable-gcc-warnings.
1030 * src/parse-gram.y (%printer <param>): Handle param_none.
1031
1032 2009-09-09 Akim Demaille <demaille@gostai.com>
1033
1034 lalr1.cc: syntax_error as exceptions.
1035 It is common to use sort of factories in the user actions. These
1036 factories may check some "syntactic" constraints that are not
1037 enforced by the grammar itself. This is possible using YYERROR
1038 within the action itself. Provide the user with a means to throw
1039 a syntax_error exception.
1040
1041 * data/c++.m4 (b4_public_types_declare, b4_public_types_define):
1042 Declare and define yy::parser::syntax_error.
1043 * data/lalr1.cc: Include stdexcept.
1044 (yy::parser::parse): Wrap the user action within a try/catch.
1045 * data/glr.cc: Include stdexcept.
1046
1047 2009-09-09 Akim Demaille <demaille@gostai.com>
1048
1049 lalr1.cc: add missing "inline".
1050 * data/c++.m4 (b4_public_types_define): Add missing inline to
1051 implementations provided in headers.
1052
1053 2009-09-09 Akim Demaille <demaille@gostai.com>
1054
1055 %param: documentation.
1056 * NEWS (2.6): Document %param, %lex-param, and %parse-param
1057 changes.
1058 * doc/bison.texinfo: Document that %lex-param and %parse-param
1059 are n-ary.
1060 Changes some examples to demonstrate it.
1061 (Calc++ Parser): Use %param.
1062
1063 2009-09-09 Akim Demaille <demaille@gostai.com>
1064
1065 Regen.
1066
1067 2009-09-09 Akim Demaille <demaille@gostai.com>
1068
1069 style changes.
1070 * src/parse-gram.y (add_param): Scope changes.
1071
1072 2009-09-09 Akim Demaille <demaille@gostai.com>
1073
1074 %parse: support several arguments.
1075 * src/parse-gram.y (current_param): New.
1076 (param_type): Add param_none.
1077 (params): New nonterminal.
1078 Use it.
1079
1080 2009-09-09 Akim Demaille <demaille@gostai.com>
1081
1082 Regen.
1083
1084 2009-09-09 Akim Demaille <demaille@gostai.com>
1085
1086 %param.
1087 Provide a means to factor lex-param and parse-param common
1088 declarations.
1089
1090 * src/parse-gram.y (param_type): New.
1091 Define a %printer for it.
1092 (add_param): Use it.
1093 (%parse-param, %lex-param): Merge into...
1094 (%parse): this new token.
1095 Adjust the grammar to use it.
1096 * src/scan-gram.l (RETURN_VALUE): New.
1097 (RETURN_PERCENT_FLAG): Use it.
1098 (RETURN_PERCENT_PARAM): New.
1099 Use it to support %parse-param, %lex-param and %param.
1100
1101 2009-09-03 Joel E. Denny <jdenny@clemson.edu>
1102
1103 Use aver not assert.
1104 * src/output.c: Don't include assert.h.
1105 (output_skeleton): Use aver not assert.
1106 * src/system.h (aver): In documentation of why, add links to
1107 Paul Eggert's explanations in the mailing lists.
1108
1109 2009-09-05 Alex Rozenman <rozenman@gmail.com>
1110
1111 Use "Unresolved reference" error message when no symbols were found
1112 in a symbolic reference resolution. Remove .expr and -expr from
1113 the shown reference when the reference is unresolved.
1114 * src/scan-code.l: Change the error message, adjust location columns,
1115 rename variable "exact_mode" to "explicit_bracketing".
1116 * tests/named-ref.at: Adjust existing tests and add a new one.
1117
1118 2009-09-04 Akim Demaille <demaille@gostai.com>
1119
1120 Adjust synclines in src/parse-gram.[ch].
1121 * tests/bison.in: Do some magic (including working around issues
1122 with ylwrap) when this wrapper is used to compile
1123 src/parse-gram.y.
1124
1125 2009-09-03 Joel E. Denny <jdenny@clemson.edu>
1126
1127 Complain about unused %define variables and %code qualifiers.
1128 * NEWS (2.5): Document.
1129 * data/bison.m4 (b4_check_user_names): Complain instead of warn.
1130 * doc/bison.texinfo (Decl Summary): Document complaint, and
1131 improve %define documentation a little otherwise.
1132 * tests/input.at (Reject unused %code qualifiers): Update.
1133 (%define errors): Update.
1134 (%define, --define, --force-define): Update.
1135 (%define backward compatibility): Update.
1136 (Unused %define api.pure): Update.
1137 * tests/push.at (Push Parsing: Unsupported Skeletons): Update.
1138
1139 2009-09-03 Joel E. Denny <jdenny@clemson.edu>
1140
1141 Don't suppress warnings about unused parse.error.
1142 * data/bison.m4 (b4_error_verbose_flag): Don't examine value of
1143 %define variable parse.error unless b4_error_verbose_flag is
1144 actually expanded in a skeleton.
1145
1146 2009-09-03 Akim Demaille <demaille@gostai.com>
1147
1148 * NEWS (2.4.2): Add "Internationalization" item.
1149
1150 2009-09-03 Akim Demaille <demaille@gostai.com>
1151
1152 bootstrap: fix/improve find_tool.
1153 * bootstrap (find_tool): Improve error messages.
1154 Fix typo about find_tool_names.
1155
1156 2009-08-29 Joel E. Denny <jdenny@clemson.edu>
1157
1158 Fix gcc 3.4.4 shadowing warning reported by Eric Blake.
1159 See
1160 <http://lists.gnu.org/archive/html/bison-patches/2009-08/msg00093.html>.
1161 * src/scan-code.h (code_props_rule_action_init): Rename
1162 named_ref arg to name so it doesn't shadow named_ref type. This
1163 makes it consistent with the function definition in scan-code.l
1164 anyway.
1165
1166 2009-08-28 Joel E. Denny <jdenny@clemson.edu>
1167
1168 %define: accept unquoted values.
1169 * NEWS (2.5): Group all %define changes together, and document
1170 this one. Remove quotes in IELR and canonical LR entry.
1171 * doc/bison.texinfo: Remove quotes in most examples throughout.
1172 (Decl Summary): Update %define documentation.
1173 (Table of Symbols): Likewise.
1174 * src/ielr.c (LrType): Update documentation.
1175 * src/parse-gram.y (content.opt): Add production for ID.
1176 * tests/actions.at: Remove quotes in most tests.
1177 * tests/calc.at: Likewise.
1178 * tests/existing.at: Likewise.
1179 * tests/input.at: Likewise.
1180 * tests/local.at: Likewise.
1181 * tests/push.at: Likewise.
1182 * tests/reduce.at: Likewise.
1183 * tests/torture.at: Likewise.
1184
1185 2009-08-28 Joel E. Denny <jdenny@clemson.edu>
1186
1187 %define lr.type: make values lowercase IDs.
1188 That is, "LALR" => "lalr", "IELR" => "ielr", and
1189 "canonical LR" => "canonical-lr".
1190 * NEWS (2.5): Update documentation.
1191 * doc/bison.texinfo (Decl Summary): Likewise.
1192 * src/ielr.c (ielr): Use new values.
1193 * src/ielr.h (ielr): Update documentation.
1194 * src/reader.c (prepare_percent_define_front_end_variables): Use
1195 and validate new values.
1196 * tests/existing.at (AT_TEST_EXISTING_GRAMMAR): Update test
1197 grammars.
1198 * tests/reduce.at (AT_TEST_LR_TYPE): Likewise.
1199
1200 2009-08-27 Eric Blake <ebb9@byu.net>
1201
1202 scan-gram: avoid portability trap with ctype usage.
1203 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>):
1204 Avoid compiler warning.
1205
1206 2009-08-27 Joel E. Denny <jdenny@clemson.edu>
1207
1208 tests: use perl for printing special sequences to files.
1209 And skip tests if perl is not available. This is better than
1210 playing tricks with shell portability. Suggested by Akim
1211 Demaille.
1212 * tests/input.at (Bad character literals): Use it here for
1213 omitting final newlines.
1214 (Bad escapes in literals): Use it here for special characters.
1215
1216 2009-08-26 Joel E. Denny <jdenny@clemson.edu>
1217
1218 tests: show a use of %define lr.default-reductions "consistent"
1219 * tests/conflicts.at (%nonassoc and eof): Extend to test that it
1220 prevents the omission of expected tokens for %error-verbose.
1221
1222 2009-08-26 Akim Demaille <demaille@gostai.com>
1223
1224 tests: portability fix.
1225 * tests/input.at (Bad escapes in literals): Don't expect "echo
1226 '\0'" to output \ then 0.
1227
1228 2009-08-26 Joel E. Denny <jdenny@clemson.edu>
1229
1230 Actually handle the yytable zero value correctly this time.
1231 * data/bison.m4 (b4_integral_parser_tables_map): Don't mention
1232 zero values in the YYTABLE comments.
1233 * data/glr.c (yytable_value_is_error): Don't check for zero
1234 value.
1235 * data/lalr1.cc (yy_table_value_is_error_): Likewise.
1236 * data/yacc.c (yytable_value_is_error): Likewise.
1237 * data/lalr1.java (yy_table_value_is_error_): Likewise.
1238 (yysyntax_error): Fix typo in code: use yytable_ not yycheck_.
1239 * src/tables.h: In header comments, explain why it's useless to
1240 check for a zero value in yytable.
1241
1242 2009-08-25 Joel E. Denny <jdenny@clemson.edu>
1243
1244 More fixes related to last two patches.
1245 * data/bison.m4 (b4_integral_parser_tables_map): Fix YYTABLE
1246 comments: zero indicates syntax error not default action.
1247 * data/c.m4 (b4_table_value_equals): Comment that YYID must be
1248 defined.
1249 * data/glr.c (yyis_pact_ninf): Rename to...
1250 (yypact_value_is_default): ... this.
1251 (yyisDefaultedState): Update for rename.
1252 (yyis_table_ninf): Rename to...
1253 (yytable_value_is_error): ... this, and check for value zero
1254 besides just YYTABLE_NINF.
1255 (yygetLRActions): Check for default value from yypact. It
1256 appears that this check is always performed before this function
1257 is invoked, and so adding the check here is probably redundant.
1258 However, the code may evolve after this subtlety is forgotten.
1259 Also, update for rename to yytable_value_is_error. Because that
1260 macro now checks for zero, a different but equivalent branch of
1261 the if-then-else here is evaluated.
1262 (yyreportSyntaxError): Update for rename to
1263 yytable_value_is_error. The zero condition was mishandled
1264 before.
1265 (yyrecoverSyntaxError): Update for renames. No behavioral
1266 changes.
1267 * data/lalr1.cc, data/lalr1.java (yy_pact_value_is_default_):
1268 New function.
1269 (yy_table_value_is_error_): New function.
1270 (parse): Use new functions where possible. No behavioral
1271 changes.
1272 (yysyntax_error_, yysyntax_error): Use yy_table_value_is_error_.
1273 The zero condition was mishandled before.
1274 * data/yacc.c (yyis_pact_ninf): Rename to...
1275 (yypact_value_is_default): ... this.
1276 (yyis_table_ninf): Rename to...
1277 (yytable_value_is_error): ... this, and check for value zero
1278 besides just YYTABLE_NINF.
1279 (yysyntax_error): Update for rename to yytable_value_is_error.
1280 The zero condition was mishandled before.
1281 (yyparse): Update for renames. No behavioral changes.
1282 * src/tables.h: Improve comments about yypact, yytable, etc.
1283 more. Most importantly, say yytable value of zero means syntax
1284 error not default action.
1285
1286 2009-08-25 Joel E. Denny <jdenny@clemson.edu>
1287
1288 Fix %error-verbose for conflicts resolved by %nonassoc.
1289 * NEWS (2.5): Document.
1290 * data/glr.c (yyreportSyntaxError): Fix this by checking
1291 yyis_table_ninf.
1292 * data/yacc.c (yysyntax_error): Likewise.
1293 * data/lalr1.cc (yysyntax_error_): Fix this by checking
1294 yytable_ninf_.
1295 * data/lalr1.java (yysyntax_error): Likewise.
1296 * tests/conflicts.at (%nonassoc and eof): Update expected output
1297 and remove FIXME.
1298
1299 2009-08-25 Joel E. Denny <jdenny@clemson.edu>
1300
1301 Some code and documentation improvements.
1302 * data/c.m4 (b4_table_value_equals): New macro to capture
1303 some repeated code.
1304 * data/glr.c (yyis_pact_ninf): Use it here.
1305 (yyis_table_ninf): Likewise.
1306 (yyreportSyntaxError): Improve internal comments.
1307 * data/yacc.c (yyis_pact_ninf): New macro copied from glr.c.
1308 Use it everywhere possible.
1309 (yyis_table_ninf): Likewise.
1310 (yysyntax_error): Improve internal comments.
1311 * data/lalr1.cc (yysyntax_error_): Likewise.
1312 * data/lalr1.java (yysyntax_error): Likewise.
1313 * src/tables.h: Improve comments about yypact, yytable, etc.
1314
1315 2009-08-21 Joel E. Denny <jdenny@clemson.edu>
1316
1317 Use locale when quoting.
1318 * src/scan-gram.l (SC_ESCAPED_STRING, SC_ESCAPED_CHARACTER): Use
1319 quote rather than implementing quoting here.
1320
1321 2009-08-20 Eric Blake <ebb9@byu.net>
1322
1323 Make previous patch more robust.
1324 * src/output.c (ARRAY_CARDINALITY): New macro, copied from
1325 argmatch.h.
1326 (output_skeleton): Use it.
1327 Suggested by Akim Demaille.
1328
1329 Import latest m4/m4.m4.
1330 * submodules/autoconf: Update to autoconf 2.64.
1331 * configure.ac (M4_GNU_OPTION): New define.
1332 * src/output.c (output_skeleton): Use it to resolve FIXME.
1333 * NEWS: Mention this.
1334
1335 2009-08-19 Joel E. Denny <jdenny@clemson.edu>
1336
1337 Fix complaints about escape sequences.
1338 Discussed starting at
1339 <http://lists.gnu.org/archive/html/bison-patches/2009-08/msg00036.html>.
1340 * src/scan-gram.l (SC_ESCAPED_STRING, SC_ESCAPED_CHARACTER):
1341 For a \0 and similar escape sequences meaning the null
1342 character, report an invalid escape sequence instead of an
1343 invalid null character because the latter does not actually
1344 appear in the user's input.
1345 In all escape sequence complaints, don't escape the initial
1346 backslash, and don't quote when the sequence appears at the end
1347 of the complaint line unless there's whitespace that quotearg
1348 won't escape.
1349 Consistently say "invalid" not "unrecognized".
1350 Consistently prefer "empty character literal" over "extra
1351 characters in character literal" warning for invalid escape
1352 sequences; that is, consistently discard those sequences.
1353 * tests/input.at (Bad escapes in literals): New.
1354
1355 2009-08-19 Akim Demaille <demaille@gostai.com>
1356
1357 doc: fixes.
1358 * doc/bison.texinfo: Fix minor Texinfo errors.
1359
1360 2009-08-19 Akim Demaille <demaille@gostai.com>
1361
1362 tests: distcc compliance.
1363 * tests/synclines.at (AT_SYNCLINES_COMPILE): Discard distcc's
1364 error messages from the output.
1365
1366 2009-08-19 Akim Demaille <demaille@gostai.com>
1367
1368 variables: simplify the upgrade of namespace into api.namespace.
1369
1370 This patch simplifies "variables: rename namespace as
1371 api.namespace", commit 67501061076ba46355cfd9f9361c7eed861b389c.
1372 Suggested by Joel E. Denny in
1373 http://lists.gnu.org/archive/html/bison-patches/2009-07/msg00006.html
1374
1375 * src/muscle-tab.c (muscle_percent_variable_update): New.
1376 (muscle_percent_define_insert): Use it in replacement of the
1377 previous tr invocation.
1378 Remove variable_tr, no longer needed.
1379 * data/bison.m4 (b4_percent_define_copy_, b4_percent_define_copy):
1380 Remove.
1381 * data/c++.m4: No longer handle namespace -> api.namespace.
1382 * tests/input.at (%define backward compatibility): Check that
1383 namespace is treated as api.namespace.
1384
1385 2009-08-19 Akim Demaille <demaille@gostai.com>
1386
1387 doc: %initial-action to initialize yylloc.
1388 Reported by Bill Allombert.
1389 * doc/bison.texinfo: Set fill-column to 76.
1390 (Location Type): Document the use of %initial-action to initialize
1391 yylloc.
1392
1393 2009-08-19 Akim Demaille <demaille@gostai.com>
1394
1395 lalr1.cc: use state_type.
1396 * data/lalr1.cc (yysyntax_error_): Use state_type.
1397 Move argument names into yy*.
1398
1399 2009-08-19 Akim Demaille <demaille@gostai.com>
1400
1401 lalr1.cc: get rid of yyparse's yystate.
1402 yystate and yystack_[0].state are equal, keep only the latter.
1403 The former was also used as a temporary variable to compute the
1404 post-reduction state. Move this computation into an auxiliary
1405 function.
1406
1407 * data/glr.c (yyLRgotoState): Fuse variable definition and first
1408 assignment.
1409 * data/lalr1.cc (yy_lr_goto_state_): New.
1410 (yyparse): Use it.
1411 Replace remaining uses of yystate by yystate_[0].state.
1412 Remove the former.
1413
1414 2009-08-19 Akim Demaille <demaille@gostai.com>
1415
1416 lalr1.cc: destroy $$ when YYERROR is called.
1417 * data/lalr1.cc (yyreduce): Compute the resulting state before
1418 running the user action so that yylhs is a valid symbol.
1419 (yyerrorlab): Since yylhs is complete (it knows its type), we can
1420 simply call yy_destroy_ to destroy $$ on YYERROR invocations.
1421 * tests/c++.at (AT_CHECK_VARIANTS): Test YYERROR with variants.
1422
1423 2009-08-18 Joel E. Denny <jdenny@clemson.edu>
1424
1425 maint: update for gnulib's recent update-copyright changes
1426 * gnulib: Update.
1427 * .x-update-copyright (COPYING): Add as it's no longer implied
1428 when .x-update-copyright is present.
1429 * cfg.mk (update-copyright-local): Remove, now ignored.
1430 (update-copyright): Declare update-b4-copyright as a dependency.
1431
1432 2009-08-17 Akim Demaille <demaille@gostai.com>
1433
1434 build: require gettext 0.17.
1435
1436 Suggested by Bruno Haible.
1437 http://lists.gnu.org/archive/html/bug-bison/2009-08/msg00009.html
1438 * configure.ac: require gettext 0.17 to ensure compatibility with
1439 gnulib.
1440
1441 2009-08-17 Akim Demaille <demaille@gostai.com>
1442
1443 build: lower gettext requirements.
1444
1445 Bison was uselessly requiring the formatstring macros from
1446 gettext, which resulted in mo files not being installed on systems
1447 that perfectly supported Bison mo files. Lower the requirement.
1448 http://lists.gnu.org/archive/html/bug-bison/2009-08/msg00006.html
1449
1450 * configure.ac: Require need-ngettext instead of
1451 need-formatstring-macros.
1452 Reported by Martin Jabocs.
1453 Suggested by Bruno Haible.
1454 * INSTALL: Restructure.
1455 (Internationalization): New.
1456
1457 2009-08-14 Joel E. Denny <jdenny@clemson.edu>
1458
1459 maint: fix use of copyright year intervals.
1460 * gnulib: Update.
1461 * bootstrap.conf (gnulib_modules): Update getopt to getopt-gnu
1462 as now recommended in gnulib/NEWS.
1463 * build-aux/update-b4-copyright: Fix.
1464 * cfg.mk (update-copyright-env): Configure update-copyright.
1465
1466 2009-08-13 Joel E. Denny <jdenny@clemson.edu>
1467
1468 Make it easier to write deterministic tests.
1469 Continues Akim's work from his 2009-06-10 commits.
1470 * src/reader.c (check_and_convert_grammar): Don't add any
1471 symbols after the first symbols_do invocation.
1472 * src/symtab.c (symbols_sorted): New static global.
1473 (user_token_number_redeclaration): Update comments.
1474 (symbol_from_uniqstr): If a new symbol is being created, assert
1475 that symbols_sorted hasn't been allocated yet.
1476 (symbols_free): Free symbols_sorted.
1477 (symbols_cmp, symbols_cmp_qsort): New functions.
1478 (symbols_do): Sort symbol_table into symbols_sorted on first
1479 invocation.
1480 * tests/input.at (Numbered tokens): Recombine tests now that the
1481 output should be deterministic across multiple numbers.
1482
1483 2009-08-12 Akim Demaille <demaille@gostai.com>
1484
1485 tests: GCC 4.5 compliance.
1486 * tests/synclines.at (AT_SYNCLINES_COMPILE): Adjust to GCC 4.5's
1487 messages about #error.
1488
1489 2009-08-12 Akim Demaille <demaille@gostai.com>
1490
1491 build: fix the generation of the documentation.
1492 Some of our targets use "bison --help", but they can't depend on
1493 "bison" itself (to avoid additional requirements on the user), so
1494 they used to call "make src/bison" in the commands. Then
1495 concurrent builds may fail: one make might be aiming one of its
1496 jobs at compiling src/bison, and another job at generating the man
1497 page. If the latter is faster than the former, then we have two
1498 makes that concurrently try to compile src/bison.
1499
1500 This might also be a more convincing explanation for the failure
1501 described in the patch "build: fix paths".
1502
1503 * Makefile.am (SUFFIXES): Initialize.
1504 * build-aux/move-if-change: New, symlink to gnulib's.
1505 * build-aux/local.mk: Ship it.
1506 * doc/common.x: Remove, merged into...
1507 * doc/bison.x: here.
1508 * doc/local.mk (doc/bison.help): New.
1509 ($(CROSS_OPTIONS_TEXI)): Depend on it.
1510 Use src/bison.
1511 (.x.1): Replace with...
1512 (doc/bison.1): this explicit, simpler, target.
1513 (common_dep): Remove, inlined where appropriate.
1514 (SUFFIXES, PREPATH): Remove, unused.
1515
1516 2009-08-12 Akim Demaille <demaille@gostai.com>
1517
1518 gnulib: improve prefixing.
1519 * configure.ac (gl_PREFIXED_LIBOBJS): Don't rename it, rather,
1520 change the value of...
1521 (gl_LIBOBJS): this.
1522 Adjust more variables.
1523 * etc/prefix-gnulib-mk (prefix_assignment): Don't rename
1524 gl_LIBOBJS.
1525 (prefix): Also transform rules whose targets have slashes.
1526 Use $prefix liberally.
1527 Map @MKDIR_P@ to $(MKDIR_P).
1528 Prefix directories that are mkdir'd.
1529
1530 2009-08-12 Akim Demaille <demaille@gostai.com>
1531
1532 build: fix paths.
1533 When using $(top_builddir) inconsistently, Make (including GNU
1534 Make) is sometimes confused. As a result it may want to build
1535 lib/libbison.la and $(top_builddir)/lib/libbison.la (the same
1536 file, different names) concurrently, which, amusingly enough,
1537 might end with:
1538
1539 ranlib lib/libbison.a
1540 ranlib lib/libbison.a
1541 make[2]: *** [lib/libbison.a] Segmentation fault
1542
1543 on OS X.
1544
1545 * doc/local.mk, src/local.mk: Do not use $(top_builddir) when not
1546 needed.
1547
1548 2009-08-12 Akim Demaille <demaille@gostai.com>
1549
1550 distcheck: fix.
1551
1552 * examples/calc++/Makefile.am: (EXTRA_DIST): Ship calc.stamp.
1553
1554 2009-08-10 Joel E. Denny <jdenny@clemson.edu>
1555
1556 * tests/local.mk (TESTSUITE_AT): Add named-refs.at.
1557
1558 2009-08-10 Joel E. Denny <jdenny@clemson.edu>
1559
1560 Miscellaneous code readability improvements.
1561
1562 * src/reader.c (reader): Move %define front-end variable
1563 defaults and checking into...
1564 (prepare_percent_define_front_end_variables): ... this new
1565 function.
1566
1567 * src/scan-gram.l (INITIAL): For consistency with string
1568 literals, don't store open quote on character literal. It's
1569 discarded before returning anyway.
1570 (SC_ESCAPED_CHARACTER): Similarly, don't store close quote.
1571 Make length test more readable, and make the character stored
1572 for an empty literal more obvious while consistent with the
1573 previous behavior.
1574
1575 * src/symtab.c, src/symtab.h: Rename USER_NUMBER_ALIAS to
1576 USER_NUMBER_HAS_STRING_ALIAS throughout.
1577 * src/symtab.c (symbol_make_alias): Remove comment from symtab.c
1578 that is repeated in symtab.h. Improve argument names to make it
1579 clear which side of the symbol-string alias pair is which.
1580 (symbol_check_alias_consistency): Improve local variable names
1581 for the same purpose.
1582 * src/symtab.h (struct symbol): Make comments about aliases
1583 clearer.
1584 (symbol_make_alias): Improve comments and argument name.
1585 * src/output.c (token_definitions_output): Update for rename to
1586 USER_NUMBER_HAS_STRING_ALIAS and improve comments about aliases.
1587
1588 2009-08-08 Alex Rozenman <rozenman@gmail.com>
1589
1590 Convert "misleading reference" messages to warnings.
1591 * src/scan-code.l: New function 'show_sub_messages', more
1592 factoring.
1593 * tests/named-ref.at: Adjust tests.
1594
1595 2009-08-06 Joel E. Denny <jdenny@clemson.edu>
1596
1597 maint: run "make update-copyright"
1598
1599 2009-08-06 Joel E. Denny <jdenny@clemson.edu>
1600
1601 maint: make update-b4-copyright easier to use
1602 * build-aux/update-b4-copyright: In warnings, report line
1603 numbers rather than character positions.
1604 * cfg.mk (update-copyright-local): Set to update-b4-copyright so
1605 that update-copyright runs it.
1606 * gnulib: Update.
1607
1608 2009-08-05 Joel E. Denny <jdenny@clemson.edu>
1609
1610 maint: clean up update-b4-copyright code
1611 * build-aux/update-b4-copyright: Do not accept 2-digit
1612 UPDATE_COPYRIGHT_YEAR, which was not handled correctly.
1613 Don't accept a `[' in a b4_copyright argument.
1614 Format code more consistently.
1615 Don't assume b4*copyright never occurs.
1616
1617 2009-08-04 Joel E. Denny <jdenny@clemson.edu>
1618
1619 maint: automate b4_copyright updates.
1620 * Makefile.am (update-b4-copyright): New target rule.
1621 * build-aux/local.mk (EXTRA_DIST): Add update-b4-copyright.
1622 * build-aux/update-b4-copyright: New.
1623 * data/yacc.c: Remove stray characters around b4_copyright
1624 invocations.
1625
1626 2009-08-04 Joel E. Denny <jdenny@clemson.edu>
1627
1628 maint: automate annual package-wide copyright-year update.
1629 * .x-update-copyright: New.
1630 * Makefile.am (EXTRA_DIST): Remove maint.mk.
1631 * bootstrap.conf (gnulib_modules): Add maintainer-makefile and
1632 update-copyright. Remove gnumakefile, which is implied by
1633 maintainer-makefile.
1634 * cfg.mk (bootstrap-tools): Copy from old maint.mk.
1635 * gnulib: Update.
1636 * maint.mk: Remove, now copied from gnulib.
1637 * examples/extexi: Add missing "(C)" in copyright statement so
1638 update-copyright can recognize it.
1639 * src/LR0.h: Likewise.
1640 * src/print.h: Likewise.
1641 * src/print_graph.h: Likewise.
1642 * src/gram.c: Add missing comma in copyright statement.
1643 * src/gram.h: Likewise.
1644
1645 2009-08-04 Joel E. Denny <jdenny@clemson.edu>
1646
1647 Fix "make distcheck".
1648 * examples/calc++/Makefile.am: Say $(srcdir)/calc.stamp instead
1649 of just calc.stamp.
1650
1651 2009-08-01 Joel E. Denny <jdenny@clemson.edu>
1652
1653 Pacify "gcc -Wunused" for the input function from Flex.
1654 Reported by Alex Rozenman. This warning shows up with gcc-4.3.0
1655 and later.
1656 * src/scan-code.l: Add "%option noinput", which I cannot find in
1657 the Flex manual, but which Flex has supported since at least as
1658 far back as 2.5.4. However, if any of our developers still use
1659 Flex 2.5.4, they'll need to stop configuring with
1660 --enable-gcc-warnings because "%option noinput" didn't work
1661 correctly until Flex 2.5.6.
1662 * src/scan-gram.l: Likewise.
1663 * src/scan-skel.l: Likewise.
1664
1665 2009-07-31 Alex Rozenman <rozenman@gmail.com>
1666
1667 Fix --enable-gcc-warnings problems.
1668 * src/reader.c: Adjust variable names.
1669 * src/scan-code.l: Fix prototypes and adjust names.
1670 * src/named-ref.c: Remove redundant "if".
1671
1672 2009-07-29 Joel E. Denny <jdenny@ces.clemson.edu>
1673
1674 Fix a --enable-gcc-warnings problem.
1675 * src/scan-gram.l (SC_ESCAPED_CHARACTER): Actually use length
1676 variable.
1677
1678 2009-07-24 Joel E. Denny <jdenny@ces.clemson.edu>
1679
1680 Warn about character literals not of length one.
1681 * NEWS (2.5): Document.
1682 * src/scan-gram.l (INITIAL): Remove comment that we don't check
1683 the length.
1684 (SC_ESCAPED_CHARACTER): Warn if length is wrong.
1685 * tests/input.at (Bad character literals): New test group.
1686
1687 2009-07-24 Alex Rozenman <rozenman@gmail.com>
1688
1689 Fix some memory leaks.
1690 * src/named-ref.c: Add a pointer check (named_ref_free).
1691 * src/scan-code.l: New function (variant_table_free). Called in
1692 code_scanner_free.
1693 * src/symlist.c: Call to named_ref_free (symbol_list_free).
1694
1695 2009-07-24 Joel E. Denny <jdenny@ces.clemson.edu>
1696
1697 * src/lalr.c (state_lookahead_tokens_count): Correct comment.
1698
1699 2009-07-22 Joel E. Denny <jdenny@ces.clemson.edu>
1700
1701 Some M4 cleanup in the testsuite.
1702 Suggested by Eric Blake at
1703 <http://lists.gnu.org/archive/html/bison-patches/2009-04/msg00083.html>.
1704 * tests/existing.at (_AT_TEST_EXISTING_GRAMMAR): Do not
1705 complicate the code by distinguishing between a missing value
1706 and an empty string value for an optional argument. This fix is
1707 allowed by the similar fix in AT_TEST_TABLES_AND_PARSE below.
1708 * tests/local.at (_AT_TEST_TABLES_AND_PARSE): Merge into...
1709 (AT_TEST_TABLES_AND_PARSE): ... this now that the special
1710 arguments are not needed because of the following changes.
1711 Fix stale comments.
1712 Bison developers should use GNU M4 and should not use
1713 POSIXLY_CORRECT when building the test suite, so do not
1714 complicate the code by avoiding $10 and above.
1715 Do not quote an empty string value for an optional argument, and
1716 do not distinguish between a missing value and an empty string
1717 value.
1718
1719 2009-07-15 Joel E. Denny <jdenny@ces.clemson.edu>
1720
1721 Revert unnecessary column realignment in --help output.
1722 Reported by Akim Demaille at
1723 <http://lists.gnu.org/archive/html/bison-patches/2009-06/msg00010.html>.
1724 * src/getargs.c (usage): Here.
1725
1726 2009-07-04 Alex Rozenman <rozenman@gmail.com>
1727
1728 Alphabetical order in src/local.mk.
1729 * src/local.mk: Adjust.
1730
1731 2009-07-04 Alex Rozenman <rozenman@gmail.com>
1732
1733 Style changes and factoring.
1734 * src/named-ref.h: Add comments.
1735 * src/parse-gram.y: Readability and style changes.
1736 * src/reader.c: Factoring: assign_named_ref function.
1737 * src/scan-code.l: Factoring and style changes. Rename
1738 parse_named_ref to parse_ref. Use "c-ctype.h" from gnulib.
1739 Use "unsigned" type for variant index. Improve readablity.
1740 * src/scan-gram.l: Change error messages and add comments.
1741 * src/symlist.h: symbol_list_null: New function decl.
1742 * src/symlist.c: symbol_list_null: Implement here.
1743 * tests/named-refs.at: Adjust for new error messages.
1744
1745 2009-06-29 Eric Blake <ebb9@byu.net>
1746
1747 scan-code: avoid compiler warnings
1748 * src/scan-code.l (parse_named_ref): Use correct specifiers.
1749
1750 2009-06-29 Akim Demaille <demaille@gostai.com>
1751
1752 build: avoid concurrent extraction of calc++.
1753 * examples/calc++/Makefile.am (calc.stamp): New.
1754 Depend on it to create the sources of calc++ so that concurrent
1755 builds don't launch several "extexi" in parallel.
1756 Not only this is inefficient, this also builds incorrect sources
1757 with several extractions mixed together.
1758
1759 2009-06-29 Akim Demaille <demaille@gostai.com>
1760
1761 parse.error: fix.
1762 * data/bison.m4: Move code related to specific variables after the
1763 definition of the variable-maintaining macros so that we don't
1764 "invoke" b4_percent_define_check_values before it is defined.
1765
1766 2009-06-29 Akim Demaille <demaille@gostai.com>
1767
1768 variables: parse.error
1769
1770 Implement, document, and test the replacement of %error-verbose
1771 by %define parse.error "verbose".
1772 * data/bison.m4 (b4_error_verbose_if): Reimplement to track the
1773 values of the parse.error variable.
1774 Make "simple" its default value.
1775 Check the valid values.
1776 * src/parse-gram.y: Use %define parse.error.
1777 (PERCENT_ERROR_VERBOSE): New token.
1778 Support it.
1779 * src/scan-gram.l: Support %error-verbose.
1780
1781 * doc/bison.texinfo (Decl Summary): Replace the documentation of
1782 %define error-verbose by that of %define parse.error.
1783 * NEWS: Document it.
1784
1785 * tests/actions.at, tests/calc.at: Use parse.error instead of
1786 %error-verbose.
1787
1788 2009-06-27 Alex Rozenman <rozenman@gmail.com>
1789
1790 Implement support for named symbol references.
1791 * src/parse-gram.y: Add new syntax (named_ref.opt).
1792 * src/reader.c: Store named refs in symbol lists.
1793 * src/reader.h: New argument for symbol_append and
1794 action_append functions.
1795 * src/scan-code.h: Add new field (named_ref) into
1796 code_props data structure. Keeps named ref of midrule
1797 actions.
1798 * src/scan-code.l: Support for named refs in semantic
1799 action code. New function 'parse_named_ref'.
1800 * src/scan-gram.l: Support bracketed id.
1801 * src/symlist.c: Store named refs in symbol lists.
1802 * src/symlist.h: New field in symbol list: named_ref.
1803 * src/named-ref.h: New file, a struct for named_ref.
1804 * src/named-ref.cp: New file, named_ref_new function.
1805 * src/local.mk: Add two new files.
1806 * tests/testsuite.at: Include new test group:
1807 * tests/named-refs.at: this new file.
1808
1809 2009-06-25 Akim Demaille <demaille@gostai.com>
1810
1811 hash: check insertion for memory exhaustion.
1812 * src/uniqstr.c (uniqstr_new): New.
1813
1814 2009-06-24 Akim Demaille <demaille@gostai.com>
1815
1816 variables: rename namespace as api.namespace.
1817 Discussed in
1818 http://lists.gnu.org/archive/html/bison-patches/2009-04/msg00033.html
1819
1820 * data/bison.m4 (b4_percent_define_copy_, b4_percent_define_copy):
1821 New.
1822 (b4_percent_define_use): New.
1823 Use it where applicable.
1824 * data/c++.m4: Replace uses of the variable "namespace" by
1825 "api.namespace".
1826 Default the latter to the former.
1827 * doc/bison.texinfo (Decl Summary): Document "namespace" as
1828 obsolete.
1829 Document api.namespace.
1830 Use @samp to document %define uses, keep @code for identifiers.
1831 * NEWS: Likewise.
1832 * tests/c++.at, tests/input.at: Test api.namespace instead of
1833 namespace. (The tests passed with namespace.)
1834
1835 2009-06-11 Akim Demaille <demaille@gostai.com>
1836
1837 style changes.
1838 * data/xslt/xml2dot.xsl, data/xslt/xml2xhtml.xsl: Space changes.
1839 * src/print-xml.c: Style changes.
1840 * tests/conflicts.at: Comment changes.
1841
1842 2009-06-11 Akim Demaille <demaille@gostai.com>
1843
1844 xml: beware of user strings used to give a %prec to rules.
1845 * tests/conflicts.at (%prec with user strings): New.
1846 * src/gram.c (grammar_rules_print_xml): Escape the precedence for
1847 XML output.
1848
1849 2009-06-11 Akim Demaille <demaille@gostai.com>
1850
1851 hash: check insertion for memory exhaustion.
1852 * src/muscle-tab.c (muscle_insert, muscle_grow)
1853 * src/state.c (state_hash_insert): Check the return value of
1854 hash_insert.
1855
1856 2009-06-11 Akim Demaille <demaille@gostai.com>
1857
1858 tests: honor TESTSUITEFLAGS in every check target.
1859 * tests/local.mk (RUN_TESTSUITE): New.
1860 (check-local, installcheck-local, maintainer-check-g++)
1861 (maintainer-check-posix, maintainer-check-valgrind): Use it.
1862
1863 2009-06-10 Akim Demaille <demaille@gostai.com>
1864
1865 deterministic test suite.
1866 Some consistency checks on symbols are performed after all the
1867 symbols were read, by an iteration over the symbol table. This
1868 traversal is nondeterministic, which can be a problem for test
1869 cases.
1870 Avoid this.
1871 Addresses another form of nondeterminism reported by Joel E. Denny.
1872 http://lists.gnu.org/archive/html/bison-patches/2009-05/msg00023.html
1873
1874 * tests/input.at (Numbered tokens): Split the hexadecimal/decimal
1875 test in two.
1876 Use different file names for the three tests to make the
1877 maintenance easier.
1878
1879 2009-06-10 Akim Demaille <demaille@gostai.com>
1880
1881 gnulib: update.
1882 * gnulib: Update to latest.
1883 * lib/.cvsignore, lib/.gitignore, m4/.cvsignore,
1884 * m4/.gitignore: Regen.
1885 * src/symtab.c (symbol_from_uniqstr, semantic_type_from_uniqstr):
1886 Call xalloc_die on hash_insert failures.
1887 Requested by the new __warn_unused_result__ attribute of
1888 hash_insert.
1889
1890 2009-06-10 Akim Demaille <demaille@gostai.com>
1891
1892 deterministic user-token-number redeclaration errors.
1893 Address nondeterminism reported by Joel E. Denny.
1894 http://lists.gnu.org/archive/html/bison-patches/2009-05/msg00023.html
1895
1896 * src/uniqstr.h: Comment changes.
1897 * src/location.h (boundary_cmp, location_cmp): New.
1898 * src/symtab.c (user_token_number_redeclaration): New.
1899 (symbol_translation): Use it.
1900 * tests/input.at (Numbered tokens): Adjust the expected output.
1901
1902 2009-05-25 Akim Demaille <demaille@gostai.com>
1903
1904 build: avoid ignored errors.
1905 * doc/local.mk ($(CROSS_OPTIONS_TEXI)): Don't generate ignored
1906 errors, they pollute the output.
1907
1908 2009-05-22 Joel E. Denny <jdenny@ces.clemson.edu>
1909
1910 Convert multiple variable definition warnings to complaints.
1911 * NEWS (2.5): Add a new entry for that change.
1912 * doc/bison.texinfo (Decl Summary): Update %define entry.
1913 (Bison Options): Update -D/--define/-F/--force-define entry.
1914 * src/muscle-tab.c (muscle_percent_define_insert): Implement.
1915 * src/muscle-tab.h (muscle_percent_define_insert): Update
1916 comments.
1917 * tests/input.at (`%define errors'): Update.
1918 (`%define, --define, --force-define'): Update.
1919
1920 2009-05-22 Joel E. Denny <jdenny@ces.clemson.edu>
1921
1922 -F/--force-define and relative %define/-D/--define priorities.
1923 * NEWS (2.5): Add documentation to -D/--define entry.
1924 * build-aux/cross-options.pl: Hard-code association of
1925 --force-define with %define.
1926 * doc/bison.texinfo (Decl Summary): In %define entry,
1927 cross-reference command-line options.
1928 (Bison Options): Add documentation to -D/--define entry.
1929 (Option Cross Key): Widen column for --force-define row.
1930 * src/getargs.c (usage): Document -F/--force-define. Realign
1931 options in output.
1932 (short_options, long_options, getargs): Parse -F/--force-define,
1933 and update muscle_percent_define_insert invocations.
1934 * src/muscle-tab.h (muscle_percent_define_how): New enum type.
1935 (muscle_percent_define_insert): Add argument with that type.
1936 * src/muscle-tab.c (muscle_percent_define_insert): Implement
1937 -F/--force-define behavior and priorities.
1938 (muscle_percent_define_ensure): Update
1939 muscle_percent_define_insert invocation.
1940 * src/parse-gram.y (prologue_declaration): Update
1941 muscle_percent_define_insert invocations.
1942 * tests/input.at (`%define, --define'): Rename to...
1943 (`%define, --define, --force-define'): ... this and extend.
1944
1945 2009-05-22 Joel E. Denny <jdenny@ces.clemson.edu>
1946
1947 Update some comments to make sense for -D.
1948 * data/bison.m4 (b4_check_user_names): In header comments, say
1949 "user occurrence" instead of "grammar occurrence".
1950 * src/muscle-tab.h (muscle_percent_define_insert): Likewise.
1951 (muscle_percent_code_grow): Likewise just for consistency.
1952
1953 2009-05-20 Joel E. Denny <jdenny@ces.clemson.edu>
1954
1955 * data/c++.m4 (b4_namespace_close): Simplify slightly.
1956
1957 2009-05-19 Joel E. Denny <jdenny@ces.clemson.edu>
1958
1959 Handle a trailing `:' in a user-supplied C++ namespace better.
1960 * data/c++.m4 (b4_namespace_close): Don't let it be printed
1961 among the closing braces here. This fix might make the
1962 generated code easier to debug, but otherwise it should be
1963 insignificant because a trailing `:' is a C++ error already.
1964
1965 2009-05-19 Akim Demaille <demaille@gostai.com>
1966
1967 remove useless variable.
1968 * src/getargs.c (skeleton_arg): Remove now useless variable.
1969 Should help the compiler see that this printf-like call is sane.
1970
1971 2009-05-15 Akim Demaille <demaille@gostai.com>
1972
1973 Rename token.prefix as api.tokens.prefix.
1974 Discussed here.
1975 http://lists.gnu.org/archive/html/bison-patches/2009-05/msg00024.html.
1976
1977 * NEWS, data/bison.m4, data/c.m4, data/java.m4, doc/bison.texinfo,
1978 * tests/c++.at, tests/calc.at, tests/java.at, tests/local.at
1979 (token.prefix): Rename as...
1980 (api.tokens.prefix): this.
1981
1982 2009-05-11 Akim Demaille <demaille@gostai.com>
1983
1984 doc: use C++ headers.
1985 * doc/bison.texinfo (Calc++ Scanner): Prefer C++ headers to C
1986 headers.
1987
1988 2009-05-11 Akim Demaille <demaille@gostai.com>
1989
1990 doc: token.prefix
1991 * doc/bison.simple (Decl Summary): Document token.prefix.
1992 (Calc++ Parser): Various fixes.
1993 Formatting changes.
1994 Use token.prefix.
1995 Introduce a macro TOKEN to shorten the code and make it more
1996 readable.
1997 (Calc++ Scanner): Adjust.
1998 * NEWS (Variable token.prefix): New.
1999
2000 2009-05-04 Akim Demaille <demaille@gostai.com>
2001
2002 bison: catch bad symbol names.
2003 * src/scan-gram.l({int}{id}): Report as an invalid identifier.
2004 * tests/input.at: Adjust.
2005
2006 2009-05-04 Akim Demaille <demaille@gostai.com>
2007
2008 identifiers: dashes are letters.
2009 Dashes can now start identifiers (symbols and directives).
2010
2011 * src/scan-gram.l ({letter}): Add dash.
2012 ({id}): Remove it.
2013 * tests/input.at (Symbols): Adjust.
2014 Remove stray comment.
2015 * tests/regression.at (Invalid inputs): Adjust error message.
2016 * doc/bison.texinfo (Symbols): Update.
2017
2018 2009-05-01 Joel E. Denny <jdenny@ces.clemson.edu>
2019
2020 Declare %code to be a permanent feature.
2021 * NEWS (2.4.2): Here.
2022 * doc/bison.texinfo (Prologue Alternatives): Don't say it's
2023 experimental.
2024 (Decl Summary): Likewise.
2025
2026 2009-04-30 Joel E. Denny <jdenny@ces.clemson.edu>
2027
2028 Convert underscores to dashes in some %define variable names.
2029 For now, just api.push-pull and lr.keep-unreachable-states.
2030 Maintain old names for backward compatibility.
2031 * NEWS (2.5): Document.
2032 * data/c.m4 (b4_identification): Update comment.
2033 * data/yacc.c: Update access.
2034 * doc/bison.texinfo: Update.
2035 * etc/bench.pl.in (bench_push_parser): Update use.
2036 * src/files.c (tr): Move to...
2037 * src/getargs.c, src/getargs.h (tr): ... here because I can't
2038 think of a better place to expose it. My logic is that, for all
2039 uses of tr so far, command-line arguments can be involved, and
2040 getargs.h is already included.
2041 * src/main.c (main): Update access.
2042 * src/muscle_tab.c (muscle_percent_define_insert): Convert old
2043 variable names to new variable names before assigning value.
2044 * src/reader.c (reader): Update setting default.
2045 * tests/calc.at: Update uses.
2046 * tests/conflicts.at (Unreachable States After Conflict
2047 Resolution): Update use.
2048 * tests/input.at (%define enum variables): Update use.
2049 (%define backward compatibility): New test group.
2050 * tests/push.at: Update uses.
2051 * tests/reduce.at: Update uses.
2052 * tests/torture.at: Update uses.
2053
2054 2009-04-30 Joel E. Denny <jdenny@ces.clemson.edu>
2055
2056 Set all front-end %define defaults in one place.
2057 * src/main.c (main): Move lr.keep_unreachable_states default...
2058 * src/reader.c (reader): ... to here.
2059
2060 2009-04-29 Joel E. Denny <jdenny@ces.clemson.edu>
2061
2062 Rename lr.default_reductions to lr.default-reductions.
2063 * NEWS (2.5): Here.
2064 * doc/bison.texinfo: Here.
2065 * src/lalr.c (initialize_LA): Here.
2066 * src/print.c (print_reductions): Here.
2067 * src/reader.c (reader): Here.
2068 * src/tables.c (action_row): Here.
2069 * tests/input.at (%define enum variables): Here.
2070 * tests/reduce.at (AT_TEST_LR_DEFAULT_REDUCTIONS): Here.
2071
2072 2009-04-29 Joel E. Denny <jdenny@ces.clemson.edu>
2073
2074 Pacify ./configure --enable-gcc-warnings.
2075 * tests/input.at (Symbols): Prototype yyerror and yylex.
2076
2077 2009-04-29 Joel E. Denny <jdenny@ces.clemson.edu>
2078
2079 Document how `%define "var" "value"' is not M4-friendly.
2080 * src/parse-gram.y (variable): In comments here.
2081
2082 2009-04-24 Joel E. Denny <jdenny@ces.clemson.edu>
2083
2084 Clean up recent patches a little.
2085 Reported by Akim Demaille.
2086 * doc/bison.texinfo (Understanding): Fix typos.
2087 * src/print.c (print_reductions): Don't use negated variable.
2088
2089 2009-04-24 Joel E. Denny <jdenny@ces.clemson.edu>
2090
2091 List accepted values for a %define enum variable with an invalid value.
2092 Suggested by Akim Demaille at
2093 <http://lists.gnu.org/archive/html/bison-patches/2009-04/msg00082.html>.
2094 * data/bison.m4 (_b4_percent_define_check_values): Implement.
2095 * src/muscle-tab.c (muscle_percent_define_check_values): Implement.
2096 * tests/input.at (%define lr.default_reductions invalid values): Merge
2097 into...
2098 (%define enum variables): ... here, and update output.
2099
2100 2009-04-23 Joel E. Denny <jdenny@ces.clemson.edu>
2101
2102 Rename "default rule" to "default reduction".
2103 This includes changing variable names in code, changing
2104 comments, and renaming %define lr.default_rules to %define
2105 lr.default_reductions.
2106 * NEWS (2.5): Update IELR documentation.
2107 * data/bison.m4 (b4_integral_parser_tables_map): Adjust YYDEFACT
2108 documentation.
2109 * data/glr.c, data/lalr1.java: Sync copyright dates.
2110 * doc/bison.texinfo (Decl Summary): Adjust lr.default_reductions
2111 and lr.type documentation. Make some other wording
2112 improvements.
2113 (Glossary): Adjust cross-references and Default Reduction
2114 definition.
2115 * src/lalr.c (state_lookahead_tokens_count): Adjust code.
2116 Remove a confusing comment pointed out by Akim Demaille.
2117 (initialize_LA): Adjust code.
2118 * src/print-xml.c (print_reductions): Adjust code.
2119 * src/print.c (print_reductions): Adjust code.
2120 * src/reader.c (reader): Adjust code.
2121 * src/tables.c (action_row): Adjust code.
2122 (token_actions): Adjust code.
2123 * src/tables.h: Adjust YYDEFACT documentation.
2124 * tests/input.at (%define lr.default_rules invalid values):
2125 Rename test group to...
2126 (%define lr.default_reductions invalid values): ... this, and
2127 update grammar file and expected output.
2128 * tests/reduce.at (AT_TEST_LR_DEFAULT_RULES): Rename to...
2129 (AT_TEST_LR_DEFAULT_REDUCTIONS): ... this, and update.
2130
2131 2009-04-21 Akim Demaille <demaille@gostai.com>
2132
2133 tests: check the use of dashes and periods in symbols.
2134 * tests/input.at (Symbol): New test group.
2135
2136 2009-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
2137
2138 Document %define lr.type and lr.default_rules.
2139 * NEWS (2.5): Add an entry.
2140 * src/getargs.c (usage): Mention IELR(1) and canonical LR(1)
2141 besides just LALR(1) and GLR(1).
2142 * doc/bison.texinfo (Introduction): Likewise.
2143 (Language and Grammar): Bison is no longer limited to LALR(1)
2144 restrictions.
2145 (GLR parsing): Say deterministic or LR(1) rather than LALR(1)
2146 when trying to distinguish from GLR. Talk about LR(1) grammars
2147 rather than LALR(1) grammars.
2148 (Decl Summary): In %define api.push_pull entry, say it applies
2149 to deterministic parsers in C rather than LALR(1) parsers in C.
2150 Add lr.default_rules entry.
2151 Add lr.type entry.
2152 (Mystery Conflicts): Bison is no longer limited to LALR(1)
2153 restrictions.
2154 (Generalized LR Parsing): Same changes as for the previous GLR
2155 section.
2156 (Memory Management): Say deterministic rather than LALR(1).
2157 (Understanding): Correct some bison output.
2158 Index discussion of "accepting state".
2159 Say deterministic rather than LALR(1).
2160 (Bison Options): In --yacc entry, say deterministic rather than
2161 LALR(1).
2162 In --report, --graph, and --xml entries, just don't mention
2163 LALR(1).
2164 (C++ Parsers): Say deterministic rather than LALR(1).
2165 (Table of Symbols): Likewise in YYSTACK_USE_ALLOCA entry.
2166 (Glossary): Add Accepting State, Consistent State, Default Rule,
2167 and IELR(1) definitions.
2168 In Generalized LR (GLR) definition, make same changes as in
2169 previous GLR sections.
2170 In LALR(1) definition, say Bison uses LALR(1) by default rather
2171 than implying Bison is limited to LALR(1).
2172 (LocalWords): Add IELR.
2173
2174 2009-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
2175
2176 Finish implementing %define lr.type.
2177 Its value can be "LALR", "IELR", or "canonical LR".
2178 * lib/timevar.def (TV_IELR_PHASE1): New var.
2179 (TV_IELR_PHASE2): New var.
2180 (TV_IELR_PHASE3): New var.
2181 (TV_IELR_PHASE4): New var.
2182 * src/Makefile.am (bison_SOURCES): Add AnnotationList.c,
2183 AnnotationList.h, InadequacyList.c, InadequacyList.h, Sbitset.c,
2184 Sbitset.h, ielr.h, and ielr.c.
2185 * src/getargs.h, src/getargs.c (enum trace, trace_args,
2186 trace_types): Add trace_ielr.
2187 * src/lalr.h, src/lalr.c (ngotos): Export it.
2188 (F): Rename to...
2189 (goto_follows): ... this, update all uses, and export it.
2190 (set_goto_map): Export it.
2191 (map_goto): Export it.
2192 (compute_lookahead_tokens): Don't free goto_follows yet. Now
2193 handled in ielr.
2194 (initialize_LA): Export it. Move lookback allocation to...
2195 (lalr): ... here because, for canonical LR, initialize_LA must
2196 be invoked but lookback and much of the rest of LALR isn't
2197 needed.
2198 * main.c (main): Instead of lalr, invoke ielr, which invokes
2199 lalr.
2200 * src/reader.c (reader): Default lr.type to "LALR".
2201 Default lr.default_rules to "accepting" if lr.type is "canonical
2202 LR". Leave the default as "all" otherwise.
2203 Check for a valid lr.type value.
2204 * src/state.h, src/state.c (struct state_list): Add state_list
2205 member.
2206 (state_new): Initialize state_list member to NULL.
2207 (state_new_isocore): New function, exported.
2208 * tests/existing.at (AT_TEST_EXISTING_GRAMMAR): New macro that
2209 exercises all values of lr.type.
2210 (GNU AWK Grammar): Rename test group to...
2211 (GNU AWK 3.1.0 Grammar): ... this, and extend to use
2212 AT_TEST_EXISTING_GRAMMAR.
2213 (GNU Cim Grammar): Extend to use AT_TEST_EXISTING_GRAMMAR.
2214 (GNU pic Grammar): Rename test group to...
2215 (GNU pic (Groff 1.18.1) Grammar): ... this, and extend to use
2216 AT_TEST_EXISTING_GRAMMAR.
2217 * tests/reduce.at (AT_TEST_LR_TYPE): New macro that exercises
2218 all values of lr.type.
2219 (Single State Split): New test groups using AT_TEST_LR_TYPE.
2220 (Lane Split): Likewise.
2221 (Complex Lane Split): Likewise.
2222 (Split During Added Lookahead Propagation): Likewise.
2223
2224 2009-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
2225
2226 Add new files for IELR and canonical LR implementation.
2227 * src/AnnotationList.c: New.
2228 * src/AnnotationList.h: New.
2229 * src/InadequacyList.c: New.
2230 * src/InadequacyList.h: New.
2231 * src/Sbitset.c: New.
2232 * src/Sbitset.h: New.
2233 * src/ielr.c: New.
2234 * src/ielr.h: New.
2235
2236 2009-04-20 Joel E. Denny <jdenny@ces.clemson.edu>
2237
2238 Implement %define lr.default_rules.
2239 Its value describes the states that are permitted to contain
2240 default rules: "all", "consistent", or "accepting".
2241 * src/reader.c (reader): Default lr.default_rules to "all".
2242 Check for a valid lr.default_rules value.
2243 * src/lalr.c (state_lookahead_tokens_count): If lr.default_rules
2244 is "accepting", then only mark the accepting state as
2245 consistent.
2246 (initialize_LA): Tell state_lookahead_tokens_count whether
2247 lr.default_rules is "accepting".
2248 * src/tables.c (action_row): If lr.default_rules is not "all",
2249 then disable default rules in inconsistent states.
2250 * src/print.c (print_reductions): Use this opportunity to
2251 perform some assertions about whether lr.default_rules was
2252 obeyed correctly.
2253 * tests/local.at (AT_TEST_TABLES_AND_PARSE): New macro that
2254 helps with checking the parser tables for a grammar.
2255 * tests/input.at (%define lr.default_rules invalid values): New
2256 test group.
2257 * tests/reduce.at (AT_TEST_LR_DEFAULT_RULES): New macro using
2258 AT_TEST_TABLES_AND_PARSE.
2259 (`no %define lr.default_rules'): New test group generated by
2260 AT_TEST_LR_DEFAULT_RULES.
2261 (`%define lr.default_rules "all"'): Likewise.
2262 (`%define lr.default_rules "consistent"'): Likewise.
2263 (`%define lr.default_rules "accepting"'): Likewise.
2264
2265 2009-04-20 Akim Demaille <demaille@gostai.com>
2266
2267 Formatting change.
2268
2269 2009-04-20 Akim Demaille <demaille@gostai.com>
2270
2271 bison: factoring.
2272 * src/output.c (token_definitions_output): Use symbol_id_get
2273 instead of duplicating its logic.
2274 * TODO (YYERRCODE): Extend.
2275
2276 2009-04-20 Akim Demaille <demaille@gostai.com>
2277
2278 variables: prefer error-verbose to error_verbose.
2279 * data/bison.m4 (b4_error_verbose_if): Based on error-verbose
2280 instead of error_verbose.
2281 * src/scan-gram.l (%error-verbose): Map to the error-verbose
2282 variable.
2283 * doc/bison.texinfo: Promote %define error-verbose instead of
2284 %error-verbose.
2285 * tests/actions.at: Prefer %define error-verbose to %error-verbose.
2286
2287 2009-04-15 Akim Demaille <demaille@gostai.com>
2288
2289 variables: accept dashes.
2290 * data/bison.m4 (b4_percent_define_if_define_): Also map dashes to
2291 underscores.
2292 * src/scan-gram.l ({id}): Also accept dashes after the initial
2293 letter.
2294 ({directive}): Use {id}.
2295 * src/parse-gram.y: Comment and formatting changes.
2296 * doc/bison.texinfo (Symbols): Adjust the lexical definitions of
2297 symbols.
2298 * src/complain.h, src/complain.c (yacc_at): New.
2299 * src/symtab.c (symbol_new): Use yacc_at to report inappropriate
2300 symbol names.
2301 * src/output.c (token_definitions_output): Do not #define token
2302 names with dashes.
2303
2304 2009-04-20 Akim Demaille <demaille@gostai.com>
2305
2306 Consistently refer to Yacc, not YACC.
2307 * src/getargs.c (usage, warnings_args): s/YACC/Yacc/.
2308
2309 2009-04-17 Joel E. Denny <jdenny@ces.clemson.edu>
2310
2311 Pacify make maintainer-check-posix.
2312 * tests/input.at (%define, --define): Move bison command-line
2313 options before grammar file name.
2314
2315 2009-04-04 Joel E. Denny <jdenny@ces.clemson.edu>
2316
2317 Document semicolon warnings.
2318 * NEWS (2.5): Here.
2319
2320 2009-04-14 Akim Demaille <demaille@gostai.com>
2321
2322 variables: use `parse.assert' instead of `assert'.
2323 * TODO (assert): Remove.
2324 * data/bison.m4 (b4_assert_if): Replace with...
2325 (b4_parse_assert_if): this.
2326 * data/lalr1.cc, data/variant.hh, tests/c++.at: Adjust.
2327 * doc/bison.texinfo (Decl Summary): Document parse.assert.
2328
2329 2009-04-14 Akim Demaille <demaille@gostai.com>
2330
2331 variables: use `parse.trace' instead of `debug'.
2332 * src/getargs.c (getargs): Map -t to %define trace.parse.
2333 * src/scan-gram.l (%debug): Map to %define trace.parse.
2334 * data/bison.m4 (b4_percent_define_if_define): Map `.' in variable
2335 names to `_' in macro names.
2336 (b4_debug_if): Replace with...
2337 (b4_parse_trace_if): this.
2338 * data/glr.c, data/glr.cc, data/lalr1.cc, data/lalr1.java,
2339 * data/yacc.c: Adjust.
2340 * doc/bison.texinfo (Decl Summary): Document %debug as obsoleted.
2341 Use @code to label the variable list.
2342 Document the variable parse.trace.
2343 (Tracing): Promote the parse.trace variable.
2344 * TODO: %printer is not documented.
2345
2346 2009-04-14 Akim Demaille <demaille@gostai.com>
2347
2348 doc: minor fixes.
2349 * doc/bison.texinfo (Decl Summary): Fix entry about %debug.
2350 (Table of Symbols): Remove duplicate entry for %debug.
2351
2352 2009-04-10 Eric Blake <ebb9@byu.net>
2353
2354 submodules: update to latest
2355 * submodules/autoconf: Use latest upstream Autoconf.
2356
2357 2009-04-06 Eric Blake <ebb9@byu.net>
2358
2359 Work around autoconf 2.63b bug in testsuite.
2360 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): Avoid tripping
2361 autoconf bug related to # in test.
2362
2363 2009-04-06 Joel E. Denny <jdenny@ces.clemson.edu>
2364
2365 * NEWS (2.5): New section. Describe new -D/--define feature.
2366
2367 2009-04-06 Akim Demaille <demaille@gostai.com>
2368
2369 Regen.
2370 * src/parse-gram.h, src/parse-gram.c: Regen.
2371
2372 2009-04-06 Akim Demaille <demaille@gostai.com>
2373
2374 rename muscle_tab.* as muscle-tab.* for consistency.
2375 * src/muscle_tab.h, src/muscle_tab.c: Rename as...
2376 * src/muscle-tab.h, src/muscle-tab.c: these.
2377 * src/getargs.c, src/local.mk, src/main.c, src/output.c,
2378 * src/parse-gram.y, src/reader.c, src/scan-code.l: Adjust.
2379
2380 2009-04-06 Akim Demaille <demaille@gostai.com>
2381
2382 Makefile: introduce $(BISON).
2383 * src/local.mk (BISON): New.
2384 (YACC): Use it.
2385
2386 2009-04-06 Akim Demaille <demaille@gostai.com>
2387
2388 parser: handle %locations as %define locations.
2389 * src/getargs.h, src/getargs.c (locations_flag): Remove.
2390 * src/getargs.c, src/scan-code.l: Use muscle_percent_define_ensure
2391 to set "locations" to true.
2392 * src/output.c (prepare): Don't output "locations".
2393 * src/scan-gram.l (%locations): Handle it as a %<flag>.
2394 * src/parse-gram.y: It's no longer a token.
2395 Don't handle it.
2396 * data/bison.m4 (b4_locations_if): Define it with
2397 b4_percent_define_if_define.
2398 * data/c.m4, data/glr.cc: Adjust.
2399
2400 2009-04-06 Akim Demaille <demaille@gostai.com>
2401
2402 Regen.
2403 * src/parse-gram.c: Regen.
2404
2405 2009-04-06 Akim Demaille <demaille@gostai.com>
2406
2407 muscle: factor the handling of obsolete of obsolete directives.
2408 Suggested by Joel E. Denny.
2409
2410 * src/muscle_tab.h, src/muscle_tab.c (muscle_percent_define_ensure):
2411 New, extracted from...
2412 * src/parse-gram.y (prologue_declaration: pure-parser): here.
2413 Remove it.
2414 (prologue_declaration: "%<flag>"): Use
2415 muscle_percent_define_ensure.
2416 (%error-verbose, %pure-parser): No longer tokens.
2417 * src/scan-gram.l (pure-parser): Return as a %<flag>.
2418
2419 2009-04-06 Joel E. Denny <jdenny@ces.clemson.edu>
2420
2421 Fix options documentation.
2422 * build-aux/cross-options.pl: As in --help output, write optional
2423 arguments as [=ARG] not =[ARG].
2424 * doc/bison.texinfo (Bison Options): Add -W/--warnings argument.
2425
2426 2009-04-04 Joel E. Denny <jdenny@ces.clemson.edu>
2427
2428 Replace BISON_PROG_GNU_M4 with Autoconf's AC_PROG_GNU_M4.
2429 If the first m4 in $PATH is wrong, it keeps looking. Moreover, its
2430 requirements for a correct m4 are stricter.
2431 * m4/m4.m4: Make it a symbolic link to submodules/autoconf/m4/m4.m4.
2432 * configure.ac: Update to use AC_PROG_GNU_M4.
2433 Reported by Eric Blake.
2434
2435 2009-04-03 Joel E. Denny <jdenny@ces.clemson.edu>
2436
2437 Help with updating web manual.
2438 * HACKING: Incorporate instructions from gnulib/doc/README.
2439 * bootstrap.conf (gnulib_modules): Add gendocs.
2440
2441 2009-04-03 Akim Demaille <demaille@gostai.com>
2442
2443 Regen.
2444 * src/parse-gram.h, src/parse-gram.c: Regen.
2445
2446 2009-04-03 Akim Demaille <demaille@gostai.com>
2447
2448 Factor %FLAG at scan level.
2449 * src/parse-gram.y (PERCENT_DEBUG, PERCENT_ERROR_VERBOSE): Token
2450 definitions and associated rules, replaced by....
2451 (PERCENT_FLAG): this new token type, and rule.
2452 * src/scan-gram.l (RETURN_PERCENT_FLAG): New.
2453 Use it for %debug and %error-verbose.
2454
2455 2009-04-03 Akim Demaille <demaille@gostai.com>
2456
2457 Regen.
2458 * src/parse-gram.h, src/parse-gram.c: Regen.
2459
2460 2009-04-03 Akim Demaille <demaille@gostai.com>
2461
2462 Treat %debug as %define debug.
2463 * data/bison.m4 (b4_debug_if): New.
2464 * data/glr.c, data/glr.cc, data/lalr1.cc, data/yacc.c,
2465 * data/lalr1.java: Use it instead of b4_debug_flag.
2466 * src/getargs.h, src/getargs.c (debug_flag): Remove.
2467 * src/output.c (prepare): Don't output it.
2468 * src/parse-gram.y: Treat %debug as %define debug.
2469
2470 2009-04-03 Akim Demaille <demaille@gostai.com>
2471
2472 Treat %error-verbose as %define error_verbose.
2473 This allows to pass -Derror_verbose on the command line. Better
2474 yet, it allows to pass -Derror_verbose=$(ERROR_VERBOSE), with
2475 ERROR_VERBOSE being defined as false or true.
2476 * data/bison.m4 (b4_percent_define_if_define): Instead of relying
2477 on b4_percent_define_ifdef, for does not check the defined value,
2478 but only whether the symbol is defined, rely on
2479 b4_percent_define_flag_if, so that a value of "false" is processed
2480 as a false.
2481 If not defined, define the flag to "false".
2482 (b4_error_verbose_if): New.
2483 * data/glr.c, data/lalr1.cc, data/yacc.c: Use it instead of
2484 b4_error_verbose_flag.
2485 * src/getargs.h, src/getargs.c (error_verbose_flag): Remove.
2486 * src/output.c (prepare): Don't output it.
2487 * src/parse-gram.y (%error-verbose): Treat as %define error_verbose.
2488
2489 2009-04-03 Joel E. Denny <jdenny@ces.clemson.edu>
2490
2491 Fix strange %define locations for default values.
2492 Reported by Akim Demaille at
2493 <http://lists.gnu.org/archive/html/bug-bison/2007-12/msg00001.html>
2494 and discussed again starting at
2495 <http://lists.gnu.org/archive/html/bison-patches/2008-11/msg00102.html>.
2496 * data/bison.m4 (b4_percent_define_default): Leave syncline blank
2497 because location information is bogus.
2498 Use angle brackets to delimit fake file name because square brackets
2499 look like underexpanded m4. Choose a better fake file name.
2500 Use negative line numbers.
2501 * src/muscle_tab.c (muscle_percent_define_default): Likewise.
2502 * src/location.c (location_print): If line for a boundary is negative,
2503 only print that boundary's file name.
2504 * src/location.h: Document that.
2505 * tests/skeletons.at (%define Boolean variables: invalid skeleton
2506 defaults): Update output.
2507
2508 2009-04-03 Joel E. Denny <jdenny@ces.clemson.edu>
2509
2510 Pacify ./configure --enable-gcc-warnings.
2511 * Makefile.am (AM_CFLAGS): Remove $(WERROR_CFLAGS) because many files
2512 in lib won't compile with it.
2513 * src/local.mk (src_bison_CFLAGS): Use $(WERROR_CFLAGS) here only.
2514
2515 2009-03-31 Akim Demaille <demaille@gostai.com>
2516
2517 bootstrap: --help to stdout.
2518 * bootstrap (usage): Don't send --help to stderr.
2519 Use a here doc instead of a long string.
2520
2521 2009-03-31 Akim Demaille <demaille@gostai.com>
2522
2523 bootstrap: README-hacking no longer exists
2524 * bootstrap (checkout_only_file): Set to HACKING.
2525
2526 2009-03-26 Akim Demaille <demaille@gostai.com>
2527
2528 doc: merge HACKING and README-hacking.
2529 Two files is confusing.
2530 Reported by Alexandre Duret-Lutz.
2531
2532 * README-hacking: Merge into...
2533 * HACKING (Working from the repository): here.
2534
2535 2009-03-26 Akim Demaille <demaille@gostai.com>
2536
2537 doc: update README-hacking.
2538 * README-hacking: We now use git and git submodules.
2539 Reported by Ralf Wildenhues and Alexandre Duret-Lutz.
2540
2541 2009-03-26 Akim Demaille <demaille@gostai.com>
2542
2543 lalr1.cc: avoid GCC 4.3 warnings.
2544 GCC 4.3 now warns about "a || b && c" and asks for explicit
2545 parentheses.
2546 Reported by Alexandre Duret-Lutz.
2547 * data/location.cc: Update copyright years.
2548 (Position::operator==): Use parens to make precedence explicit.
2549 Compare lines and columns first, as they are more likely to be
2550 different, and they are faster to compare.
2551
2552 2009-03-26 Akim Demaille <demaille@gostai.com>
2553
2554 gnulib: update.
2555 * gnulib: Update to latest.
2556 * src/local.mk (AM_CFLAGS): Move to...
2557 * Makefile.am: here.
2558 * etc/prefix-gnulib-mk (prefix_assignment): Also transform
2559 AM_CFLAGS.
2560
2561 2009-03-02 Akim Demaille <demaille@gostai.com>
2562
2563 Comment changes.
2564
2565 2009-03-02 Akim Demaille <demaille@gostai.com>
2566
2567 Share b4_yytranslate_define.
2568 * data/lalr1.cc (b4_yytranslate_define): Move to...
2569 * data/c++.m4: here.
2570
2571 2009-03-02 Akim Demaille <demaille@gostai.com>
2572
2573 Use locations in the variant example.
2574 Yes, this obfuscates the point of this example, variants only.
2575 But glr.cc cannot work (yet?) without locations. This change
2576 makes it easier to use this example with glr.cc.
2577
2578 * examples/variant.yy (assert): %define it.
2579 (locations): Request them.
2580 (yylex): Bind the location to the stage.
2581
2582 2009-03-02 Akim Demaille <demaille@gostai.com>
2583
2584 Dub make_TOKEN as a public type interface.
2585 * data/c++.m4 (b4_symbol_constructor_declare)
2586 (b4_symbol_constructor_define): New empty stubs.
2587 (b4_public_types_declare, b4_public_types_define): Use them.
2588 * data/lalr1.cc (b4_symbol_constructor_declare)
2589 (b4_symbol_constructor_declare_)
2590 (b4_symbol_constructor_define_, b4_symbol_constructor_define):
2591 Move to...
2592 * data/variant.hh: here.
2593 Remove the "b4_variant_if" parts, as variant.hh is loaded only if
2594 needed.
2595 * data/lalr1.cc: No longer invoke b4_symbol_constructor_define and
2596 b4_symbol_constructor_declare, as it is now done by
2597 b4_public_types_define and b4_public_types_declare.
2598
2599 2009-03-02 Akim Demaille <demaille@gostai.com>
2600
2601 Coding style changes.
2602 * data/lalr1.cc (b4_symbol_constructor_declaration_)
2603 (b4_symbol_constructor_declarations)
2604 (b4_symbol_constructor_definition_)
2605 (b4_symbol_constructor_definitions)
2606 (b4_yytranslate_definition): Rename as...
2607 (b4_symbol_constructor_declare_)
2608 (b4_symbol_constructor_declare)
2609 (b4_symbol_constructor_define_)
2610 (b4_symbol_constructor_define)
2611 (b4_yytranslate_define): these.
2612 * data/variant.hh (b4_variant_definition): Rename as...
2613 (b4_variant_define): this.
2614
2615 2009-03-02 Akim Demaille <demaille@gostai.com>
2616
2617 Factor b4_assert_if, b4_lex_symbol_if, and b4_variant_if.
2618 * data/bison.m4 (b4_percent_define_if_define): New.
2619 * data/c++.m4 (b4_variant_if): Move to...
2620 * data/bison.m4: Here, using b4_percent_define_if_define.
2621 * data/lalr1.cc (b4_assert_if, b4_lex_symbol_if): Move to...
2622 * data/bison.m4: Here, using b4_percent_define_if_define.
2623
2624 2009-03-02 Akim Demaille <demaille@gostai.com>
2625
2626 Dub symbol_type_base as a public type.
2627 * data/c++.m4 (b4_public_types_declare): Now define
2628 symbol_type_base and symbol_type.
2629 (b4_public_types_define): New.
2630 In both cases, the definitions are taken verbatim from lalr1.cc.
2631 * data/lalr1.cc: Adjust.
2632
2633 2009-03-02 Akim Demaille <demaille@gostai.com>
2634
2635 b4_public_types_declare.
2636 * data/c++.m4 (b4_public_types_declare): New.
2637 * data/glr.cc, data/lalr1.cc: Use it.
2638
2639 2009-03-02 Akim Demaille <demaille@gostai.com>
2640
2641 b4_semantic_type_declare.
2642 * data/c++.m4 (b4_semantic_type_declare): New.
2643 Factors and generalizes what was in glr.cc and lalr1.cc.
2644 * data/variant.hh (b4_semantic_type_declare): Redefine it for
2645 variants.
2646 * data/lalr1.cc, data/glr.cc: Use it.
2647
2648 2009-02-26 Akim Demaille <demaille@gostai.com>
2649
2650 Upgrade gnulib.
2651 * gnulib: Upgrade from master.
2652 * lib/.cvsignore, lib/.gitignore, m4/.cvsignore, m4/.gitignore:
2653 Regen.
2654
2655 2009-02-25 Akim Demaille <demaille@gostai.com>
2656
2657 Remove useless arguments.
2658 * data/glr.c (yy_reduce_print): $$ and @$ are not used and not
2659 relevant.
2660
2661 2009-02-25 Akim Demaille <demaille@gostai.com>
2662
2663 Comment changes.
2664 * data/lalr1.cc: here.
2665
2666 2009-02-25 Akim Demaille <demaille@gostai.com>
2667
2668 Fix glr.cc's debug level handling.
2669 * data/glr.cc (yydebug_): Remove, as it is actually yydebug from
2670 glr.c which is used.
2671 (debug_level, set_debug_level): Adjust.
2672
2673 2009-02-25 Akim Demaille <demaille@gostai.com>
2674
2675 Copyright years.
2676 * data/glr.c: Add 2007 and 2008 here, consistenly with the comments.
2677
2678 2009-02-25 Akim Demaille <demaille@gostai.com>
2679
2680 Style changes.
2681 * etc/bench.pl.in (generate_grammar_list): Consitently use
2682 location_type, not yy::location.
2683
2684 2009-02-25 Akim Demaille <demaille@gostai.com>
2685
2686 Comment change.
2687 * data/lalr1.cc: here.
2688
2689 2009-02-19 Akim Demaille <demaille@gostai.com>
2690
2691 Make yyparser::error public.
2692 * data/lalr1.cc: here.
2693 There is no good reason to keep it private (and it is convenient
2694 to use it from the scanner for instance). It is already public in
2695 glr.cc.
2696
2697 2009-02-19 Akim Demaille <demaille@gostai.com>
2698
2699 Comment changes.
2700 * data/glr.cc: here.
2701
2702 2009-02-19 Akim Demaille <demaille@gostai.com>
2703
2704 Remove trailing blanks.
2705 The epilogue has its own ending \n, no need to add another.
2706
2707 * data/glr.c, data/lalr1.java, data/yacc.c: dnl when outputing the
2708 epilogue.
2709 * data/glr.cc: dnl when extending the epilogue.
2710 Remove stray "private:".
2711
2712 2009-02-19 Akim Demaille <demaille@gostai.com>
2713
2714 Use b4_c_modern.
2715 * data/c.m4 (b4_c_function_decl): Here.
2716
2717 2009-02-19 Akim Demaille <demaille@gostai.com>
2718
2719 Comment changes.
2720 * data/lalr1.cc: here.
2721
2722 2009-02-19 Akim Demaille <demaille@gostai.com>
2723
2724 Extract variant.hh
2725 * data/variant.hh: New, extracted from...
2726 * data/lalr1.cc: here.
2727 Adjust.
2728 * data/local.mk: Adjust.
2729
2730 2009-02-19 Akim Demaille <demaille@gostai.com>
2731
2732 Extract stack.hh from lalr1.cc.
2733 * data/stack.hh: New.
2734 * data/lalr1.cc: Extract from here.
2735 * data/local.mk: Adjust.
2736
2737 2009-02-03 Joel E. Denny <jdenny@ces.clemson.edu>
2738
2739 Add reminder about uploading public key to keys.gnupg.net.
2740 * HACKING (Release Procedure): Here.
2741
2742 2009-01-28 Akim Demaille <demaille@gostai.com>
2743
2744 * NEWS: Update information about 2.4.1 and 2.4.2.
2745
2746 2008-11-04 Akim Demaille <demaille@gostai.com>
2747
2748 Reformat NEWS.
2749 * NEWS: Use more outline-mode markup.
2750 Suggested by Jim Meyering.
2751
2752 2009-01-08 Akim Demaille <demaille@gostai.com>
2753
2754 Fix grep portability issues.
2755 Grep on Solaris does not support -q.
2756 Reported by Summum Bonum.
2757
2758 * NEWS: Add a stub for 2.4.2.
2759 * THANKS: Add Summum Bonum.
2760 * tests/atlocal.in (EGREP): New.
2761 (CC, CXX, XSLTPROC): Make it possible to override them via
2762 envvars.
2763 * tests/java.at: Use $EGREP instead of egrep.
2764 Use AT_CHECK's ignore instead of grep's -q.
2765
2766 2008-12-11 Akim Demaille <demaille@gostai.com>
2767
2768 Pass the token type to yysyntax_error.
2769 * data/yacc.c (yysyntax_error): Take the transated token instead
2770 of the raw number.
2771 Adjust callers.
2772 * TODO: Update.
2773
2774 2008-12-11 Akim Demaille <demaille@gostai.com>
2775
2776 Formatting changes.
2777 * data/glr.c: Formatting changes.
2778
2779 2008-12-11 Akim Demaille <demaille@gostai.com>
2780
2781 Propagate i18n changes into glr.c.
2782 * TODO: Update.
2783 * data/glr.c (yyreportSyntaxError): Use "switch" instead of
2784 building the error message format dynamically.
2785 * data/lalr1.java: Formatting changes.
2786
2787 2008-12-11 Akim Demaille <demaille@gostai.com>
2788
2789 Use testsuite -C.
2790 * tests/local.mk: Replace "cd && testsuite" by "testsuite -C".
2791 Solves problems when top_srcdir is an absolute path.
2792 Suggested by Eric Blake.
2793 * configure.ac: Require Autoconf 2.62.
2794
2795 2008-12-11 Akim Demaille <demaille@gostai.com>
2796
2797 Simplify the i18n of the error messages.
2798 * data/lalr1.cc: Comment changes.
2799 * data/yacc.c (yysyntax_error): Rewrite, using a switch as in
2800 lalr1.cc instead of building dynamically the format string.
2801
2802 2008-12-08 Akim Demaille <demaille@gostai.com>
2803
2804 Fix portability issue in the test suite.
2805 * tests/local.at (AT_MATCHES_CHECK): New.
2806 Based on Perl instead of Sed. Sed has too many portability
2807 pitfalls, not ever Sed is GNU Sed.
2808 * tests/actions.at (Fix user actions without a trailing semicolon):
2809 Use it.
2810
2811 2008-12-08 Akim Demaille <demaille@gostai.com>
2812
2813 Update data/README.
2814 * data/README: Document glr.cc, lalr1.java, m4sugar and xslt.
2815
2816 2008-12-08 Akim Demaille <demaille@gostai.com>
2817
2818 Install autoconf as a submodule to get m4sugar.
2819 * .gitmodules: Add submodules/autoconf.
2820 * data/m4sugar/foreach.m4, data/m4sugar/m4sugar.m4: Now links into
2821 submodules/autoconf.
2822
2823 2008-12-08 Akim Demaille <demaille@gostai.com>
2824
2825 Test token.prefix in all the skeletons.
2826 * data/java.m4 (b4_token_enum): Use the token.prefix.
2827 * tests/local.at (AT_BISON_OPTION_PUSHDEFS): Define AT_TOKEN_PREFIX.
2828 * tests/calc.at (_AT_DATA_CALC_Y): Use it.
2829 Add checks for yacc.c, glr.c, lalr1.cc and glr.cc.
2830 * tests/java.at: Comment changes.
2831 (AT_CHECK_JAVA_MINIMAL): Define the END token.
2832 (Java parser class and package names): Add token.prefix check.
2833
2834 2008-12-08 Akim Demaille <demaille@gostai.com>
2835
2836 Fix regeneration of atconfig.
2837 * tests/local.mk (tests/atconfig): The rule was incorrect, but
2838 remove it: now that there is no tests/Makefile.am, the top-level
2839 Makefile properly updates atconfig when needed.
2840
2841 2008-12-07 Di-an Jan <dianj@freeshell.org>
2842
2843 Implement the FIXME that ends an user action with a semicolon
2844 if it seems necessary.
2845 * src/scan-code.l (flex rules section): Flag cpp directive from
2846 any `#' to the first unescaped end-of-line. Semicolon is not
2847 needed after `;', `{', '}', or cpp directives and is needed after
2848 any other token (whitespaces and comments have no effect).
2849 * tests/actions.at (Fix user actions without a trailing semicolon):
2850 New test.
2851 * tests/input.at (AT_CHECK_UNUSED_VALUES): Add semicolons to
2852 to make user actions complete statements.
2853 Adjust column numbers in error messages.
2854 * tests/regression.at (Fix user actions without a trailing semicolon):
2855 Remove. Covered by new test.
2856
2857 2008-12-07 Akim Demaille <demaille@gostai.com>
2858
2859 Update gnulib.
2860 * gnulib: Update from master.
2861
2862 2008-12-05 Eric Blake <ebb9@byu.net>
2863
2864 Avoid compiler warning.
2865 * src/output.c (muscle_insert_item_number_table): Delete unused
2866 function.
2867
2868 2008-12-02 Eric Blake <ebb9@byu.net>
2869
2870 Build testsuite with newer autoconf.
2871 * tests/output.at (m4_expand): Don't override in newer autoconf,
2872 where the underlying implementation changed.
2873 * tests/cxx-type.at (_AT_RESOLVED_GLR_OUTPUT)
2874 (_AT_RESOLVED_GLR_OUTPUT_WITH_LOC, _AT_AMBIG_GLR_OUTPUT)
2875 (_AT_AMBIG_GLR_OUTPUT_WITH_LOC, _AT_GLR_STDERR)
2876 (_AT_VERBOSE_GLR_STDERR): Expand to double-quoted strings,
2877 since some of them contain unbalanced ')'.
2878
2879 2008-12-01 Akim Demaille <demaille@gostai.com>
2880
2881 Use b4_symbol for printers and destructors everywhere.
2882 * data/bison.m4 (b4_symbol_action_location): New.
2883 * data/c.m4 (b4_symbol_actions): Remove.
2884 Adjust all callers to use by b4_symbol_foreach and the corresponding
2885 b4_symbol_printer/destructor macro.
2886 * data/glr.cc: Adjust.
2887 * data/lalr1.java: Adjust the %destructor sanity check.
2888 * src/output.c (symbol_code_props_output): Remove, we no longer
2889 need the b4_symbol_printers/destructors tables.
2890
2891 2008-12-01 Akim Demaille <demaille@gostai.com>
2892
2893 Use b4_symbol_case_.
2894 * data/lalr1.cc, data/bison.m4 (b4_symbol_action): Use
2895 b4_symbol_case_.
2896
2897 2008-12-01 Akim Demaille <demaille@gostai.com>
2898
2899 Move b4_symbol based macro to bison.m4.
2900 * data/lalr1.cc (b4_symbol_, b4_symbol, b4_symbol_if)
2901 (b4_symbol_action, b4_symbol_destructor, b4_symbol_printer)
2902 (b4_symbol_case_, b4_symbol_foreach, b4_type_action_)
2903 (b4_type_foreach): Move to...
2904 * data/bison.m4: Here.
2905 * data/lalr1.cc (b4_symbol_action): Specialize for C++: use
2906 b4_symbol_value_template instead of b4_symbol_value.
2907
2908 2008-12-01 Akim Demaille <demaille@gostai.com>
2909
2910 b4_symbol/type_foreach.
2911 * data/lalr1.cc (b4_symbol_foreach, b4_type_foreach): New.
2912 Use them.
2913
2914 2008-12-01 Akim Demaille <demaille@gostai.com>
2915
2916 Use the symbol properties to output the printer/destructor for lalr1.cc.
2917 Instead of defining complex list of tuples to define various
2918 properties of the symbols, we now prefer to define symbols as
2919 "structs" in m4: using the symbol key (its number), and the
2920 property name, b4_symbol gives it value. Use this to handle
2921 destructors and printers.
2922
2923 * src/output.c (CODE_PROP): New.
2924 (prepare_symbol_definitions): Use it to define the printer and
2925 destructor related attributes of the symbols.
2926 * data/lalr1.cc (b4_symbol_actions): Rename as...
2927 (b4_symbol_action): this.
2928 Use b4_symbol instead of 6 arguments.
2929 (b4_symbol_printer, b4_symbol_destructor): New.
2930 Use them instead of b4_symbol_actions.
2931
2932 2008-12-01 Akim Demaille <demaille@gostai.com>
2933
2934 Avoid capturing variables too easily.
2935 * src/muscle_tab.h (MUSCLE_INSERT_BOOL, MUSCLE_OBSTACK_SGROW): Use
2936 v__ and p__ instead of v and p.
2937
2938 2008-12-01 Akim Demaille <demaille@gostai.com>
2939
2940 Remove spurious empty line before syncline.
2941 * data/bison.m4 (b4_syncline): Don't output an empty line before
2942 the output.
2943
2944 2008-11-26 Akim Demaille <demaille@gostai.com>
2945
2946 Convert lib/Makefile.am into lib/local.mk.
2947 The real problem is rather gnulib.mk, which itself is extracted
2948 from a Makefile.am that gnulib expects to the "recursive". The
2949 tool prefix-gnulib-mk converts such a gnulib.mk to be
2950 non-recursive. Also, some AC_SUBST variables need to be adjusted.
2951
2952 * etc/prefix-gnulib-mk: New.
2953 * bootstrap (slurp): Use it to convert further gnulib.mk.
2954 No longer try to avoid re-creation of lib/gnulib.mk as the changes
2955 are deeper.
2956 * lib/Makefile.am: Rename as...
2957 * lib/local.mk: this.
2958 Adjust to be prefixed.
2959 * Makefile.am, configure.ac: Adjust.
2960 * src/local.mk (AM_CPPFLAGS): Extend it, don't define it.
2961
2962 2008-11-26 Akim Demaille <demaille@gostai.com>
2963
2964 s/_FLAGS/FLAGS/.
2965 * tests/local.mk (TESTSUITE_FLAGS, AUTOTEST_FLAGS): Rename as...
2966 (TESTSUITEFLAGS, AUTOTESTFLAGS): these to compy with the GCS.
2967 Reported by Eric Blake.
2968
2969 2008-11-26 Akim Demaille <demaille@gostai.com>
2970
2971 Use b4_parser_tables_define in glr.cc.
2972 * data/glr.c: Use b4_parser_tables_define instead of defining the
2973 (deterministic integral) tables by hand.
2974
2975 2008-11-26 Akim Demaille <demaille@gostai.com>
2976
2977 Use b4_parser_tables_define in Java.
2978 * data/java.m4 (b4_typed_parser_table): Rename as...
2979 (b4_typed_parser_table_define): this, for consistency.
2980 Accept a comment as $4.
2981 Move $2 into yy*_.
2982 (b4_integral_parser_table): Rename as...
2983 (b4_integral_parser_table_define): this.
2984 * data/lalr1.java: Adjust all uses.
2985 Use b4_parser_tables_define instead of generation by hand.
2986
2987 2008-11-26 Akim Demaille <demaille@gostai.com>
2988
2989 Prepare the convergence bw C style and Java table generation.
2990 * data/bison.m4 (b4_tables_map, b4_tables_declare)
2991 (b4_tables_define): Rename as...
2992 (b4_integral_parser_tables_map, b4_parser_tables_declare)
2993 (b4_parser_tables_define): these.
2994 * data/c.m4 (b4_table_define): Rename as...
2995 (b4_integral_parser_table_define): this.
2996 * data/lalr1.cc: Adjust.
2997 (b4_table_define, b4_table_declare): Rename as...
2998 (b4_integral_parser_table_define)
2999 (b4_integral_parser_table_declare): these.
3000 (yyrline_): Move the comment where it is actually used.
3001 * data/yacc.c: Adjust.
3002 (yyrline): Use b4_integral_parser_table_define.
3003
3004 2008-11-26 Akim Demaille <demaille@gostai.com>
3005
3006 Regen.
3007 * src/parse-gram.h, src/parse-gram.c: Regen.
3008
3009 2008-11-26 Akim Demaille <demaille@gostai.com>
3010
3011 Factor the generation of the (integral) tables bw yacc.c and lalr1.cc.
3012 * data/lalr1.cc (b4_tables_map): Move to...
3013 * data/bison.m4: here.
3014 Update the comment for yytable during the flight.
3015 (b4_tables_declare, b4_tables_define): New.
3016 * data/lalr1.cc: Use them.
3017 * data/c.m4 (b4_table_define): New.
3018 * data/yacc.c: Use b4_tables_define instead of output the tables
3019 by hand.
3020 * tests/regression.at (Web2c Actions): Adjust the expected output,
3021 the order of the tables changed.
3022
3023 2008-11-26 Akim Demaille <demaille@gostai.com>
3024
3025 Get rid of (yy)rhs and (yy)prhs.
3026 These tables are no longer needed in the parsers, and they don't seem to
3027 be useful. They are not documented either.
3028
3029 * src/output.c (prepare_rules): Get rid of rhs and prhs.
3030 Adjust the computation of (yy)r2.
3031
3032 2008-11-26 Akim Demaille <demaille@gostai.com>
3033
3034 Rule length is unsigned.
3035 * src/gram.h, src/gram.c (rule_rhs_length): Return a size_t.
3036
3037 2008-11-26 Akim Demaille <demaille@gostai.com>
3038
3039 Get rid of lalr1-split.cc.
3040 It was no longer maintainer.
3041
3042 * data/lalr1-split.cc: Remove.
3043 * etc/bench.pl.in (bench_fusion_parser): Remove.
3044 Adjust.
3045
3046 2008-11-26 Akim Demaille <demaille@gostai.com>
3047
3048 Use yy* consistently.
3049 * data/glr.c: Now that yyrhs no longer exists as a global
3050 variable, rename local "rhs" variables into "yyrhs" for
3051 consistency.
3052
3053 2008-11-25 Akim Demaille <demaille@gostai.com>
3054
3055 Get rid of yyrhs and yyprhs in glr.c.
3056 * data/glr.c (yyrhs, yyprhs): Remove.
3057 Instead, use the state stack and yystos.
3058
3059 2008-11-25 Akim Demaille <demaille@gostai.com>
3060
3061 Flag glr tests.
3062 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): If glr, declare it
3063 as an Autotest keyword.
3064
3065 2008-11-25 Akim Demaille <demaille@gostai.com>
3066
3067 Prefer TESTSUITE_FLAGS.
3068 TESTSUITEFLAGS is barely readable.
3069
3070 * tests/local.mk (TESTSUITE_FLAGS): Default to $(TESTSUITEFLAGS)
3071 for backward compatibility.
3072 Use the former instead of the latter.
3073
3074 2008-11-25 Akim Demaille <demaille@gostai.com>
3075
3076 Get rid of yyrhs and yyprhs in larl1.java.
3077 * data/lalr1.java (yyrhs_, yyprhs_): Remove.
3078 (yy_reduce_print): Rather, use yystos_ and the state stack.
3079
3080 2008-11-25 Akim Demaille <demaille@gostai.com>
3081
3082 Formatting changes.
3083
3084 2008-11-25 Akim Demaille <demaille@gostai.com>
3085
3086 Get rid of yyrhs and yyprhs in yacc.c.
3087 They were used to get the symbol types, given a rule number, when
3088 displaying the top of the stack before a reduction. But the
3089 symbol type is available from the state stack. This has two be
3090 benefits: two tables less in the parser (making it smaller), and a
3091 more consistent use of the three stacks which will help to fuse
3092 them.
3093
3094 * data/yacc.c (yyprhs, yyrhs): Remove.
3095 (YY_REDUCE_PRINT): Pass yyssp to yy_reduce_print.
3096 (yy_reduce_print): Take yyssp as argument.
3097 Use it, together with yystos, to get the symbol type.
3098 * tests/regression.at (Web2c Report): Remove these tables from the
3099 expected output.
3100
3101 2008-11-25 Akim Demaille <demaille@gostai.com>
3102
3103 b4_tables_map.
3104 The point is to factor the generation of the tables across skeletons.
3105 This is language dependant.
3106
3107 * data/c.m4 (b4_comment_): New.
3108 Should be usable to define how to generate tables independently of
3109 the language.
3110 (b4_c_comment): New.
3111 (b4_comment): Bounce to b4_c_comment.
3112 Now support $2 = [PREFIX] for indentation.
3113 * data/lalr1.cc (b4_table_declare): Don't output a comment if
3114 there is no comment.
3115 Indent it properly when there is one.
3116 Output the ending semicolon.
3117 (b4_table_define): Space changes.
3118 Output the ending semicolon.
3119 (b4_tables_map): New.
3120 Use it twice instead of declaring and defining the (integral)
3121 tables by hand.
3122
3123 2008-11-25 Akim Demaille <demaille@gostai.com>
3124
3125 b4_table_declare.
3126 * data/lalr1.cc (b4_table_declare): New.
3127 Use it to declare the tables defined with b4_table_define.
3128 (b4_table_define): Declare a third arg to match b4_table_declare
3129 signature.
3130 Move all the comments around invocations of b4_table_define into
3131 the invocations itselves.
3132 Move things around to have the order for declarations and
3133 definitions.
3134
3135 2008-11-25 Akim Demaille <demaille@gostai.com>
3136
3137 Formatting changes.
3138 * data/lalr1.java: here.
3139
3140 2008-11-25 Akim Demaille <demaille@gostai.com>
3141
3142 b4_args is more general than only C++.
3143 * data/lalr1.cc (b4_args, _b4_args): Move to...
3144 * data/bison.m4: here.
3145
3146 2008-11-21 Di-an Jan <dianj@freeshell.org>
3147
3148 Implement no-XXX arguments for --warnings, --report, --trace.
3149 * src/getargs.c (flags_argmatch): Handles no-XXX.
3150 Fix typo in doxygen comment.
3151
3152 2008-11-21 Akim Demaille <demaille@gostai.com>
3153
3154 Display the changes in cross-options.texi.
3155 * build-aux/cross-options.pl ($sep): New, to separate items.
3156 * doc/local.mk ($(CROSS_OPTIONS_TEXI)): Use diff to display the
3157 changes.
3158
3159 2008-11-20 Di-an Jan <dianj@freeshell.org>
3160
3161 Improves options in the manual.
3162 * doc/bison.texinfo (-g, -x): Add space before argument.
3163 (Option Cross Key): Implement FIXME: listing directives also.
3164 * build-aux/cross-options.pl: Read from <STDIN> rather than <>.
3165 (Short Option): Special case -d. Put arguments inside @option.
3166 (Bison Directive): Add column, automatically extracted from
3167 src/scan-gram.l (actual name passed as the first argument)
3168 with special case for %define.
3169 * doc/local.mk (doc/cross-options.texi): Pass src/scan-gram.l
3170 to build-aux/cross-options.pl.
3171 * src/getargs.c (usage): Document limitations of cross-options.pl.
3172 * src/scan-gram.l: Likewise.
3173
3174 2008-11-18 Joel E. Denny <jdenny@ces.clemson.edu>
3175
3176 Fix unexpanded macros in GLR defines file.
3177 Reported by Csaba Raduly at
3178 <http://lists.gnu.org/archive/html/bug-bison/2008-11/msg00048.html>.
3179 * THANKS (Csaba Raduly): Add.
3180 * data/glr.c: Fix overquoting on b4_prefix for yylval and yylloc.
3181 * tests/calc.at (_AT_DATA_CALC_Y): If %defines is specified, generate
3182 lexer in a separate module that includes the defines file.
3183 (AT_CHECK_CALC): From AT_FULL_COMPILE, request compilation of lexer
3184 source.
3185 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Push AT_DEFINES_IF.
3186 Adjust AT_LOC and AT_VAL to use AT_NAME_PREFIX.
3187 (AT_BISON_OPTION_POPDEFS): Pop AT_DEFINES_IF.
3188 (AT_DATA_SOURCE_PROLOGUE): New.
3189 (AT_DATA_GRAMMAR_PROLOGUE): Use AT_DATA_SOURCE_PROLOGUE.
3190 (AT_DATA_SOURCE): New.
3191 (AT_FULL_COMPILE): Extend to support an additional source file.
3192
3193 2008-11-18 Akim Demaille <demaille@gostai.com>
3194
3195 More TODO.
3196 * TODO: More short term issues.
3197
3198 2008-11-18 Akim Demaille <demaille@gostai.com>
3199
3200 Regen.
3201 * src/parse-gram.h, src/parse-gram.c: Regen.
3202
3203 2008-11-18 Akim Demaille <demaille@gostai.com>
3204
3205 Use b4_subtract where possible.
3206 * data/lalr1.cc (b4_subtract): Move to...
3207 * data/bison.m4: here.
3208 * data/glr.c (b4_rhs_data): Use it.
3209 * data/yacc.c (b4_rhs_value, b4_rhs_location): Use it.
3210
3211 2008-11-18 Akim Demaille <demaille@gostai.com>
3212
3213 Remove incorrect mode specification.
3214 * data/glr.cc: Don't pretend it's C code.
3215
3216 2008-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
3217
3218 Simplify last patch slightly.
3219 * src/getargs.c (getargs): Here.
3220
3221 2008-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
3222
3223 Fix last warning from --enable-gcc-warnings.
3224 * src/getargs.c (getargs): Don't assign const address to non-const
3225 pointer.
3226
3227 2008-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
3228
3229 Don't let maintainer-*-check targets force a version update.
3230 * cfg.mk (_is-dist-target): Implement. maintainer-check* was already
3231 handled.
3232
3233 2008-11-17 Di-an Jan <dianj@freeshell.org>
3234
3235 * doc/bison.texinfo: Synchronize ``Detail Node Listing''.
3236 Align menus. Adjust word wrapping. Use node names for menu names.
3237 (Examples): Don't abbreviate node names.
3238 (LocalWords): Remove abbreviations.
3239 (Copying): Make description a sentence.
3240 (Java Action Features): Remove period to match the rest of menu.
3241
3242 2008-11-17 Di-an Jan <dianj@freeshell.org>
3243
3244 Handles several --enable-gcc-warnings.
3245 * src/getargs.c (command_line_location): Set parameters to void.
3246 * src/output.c (symbol_type_name_cmp): Make static.
3247 (symbols_by_type_name): Set parameters to void.
3248 (symbol_definitions_output): Remove unused parameter. Rename as...
3249 (prepare_symbol_definitions): this.
3250 (muscles_output): Move symbol_definitions_output to...
3251 (output): here as prepare_symbol_definitions.
3252 * tests/c++.at (AT_CHECK_VARIANTS): Remove unused parameters of main.
3253 (AT_CHECK_NAMESPACE): Make unused parameter lloc unnamed.
3254
3255 2008-11-17 Di-an Jan <dianj@freeshell.org>
3256
3257 * tests/c++.at (AT_CHECK_VARIANTS): Fixes tests 198-202.
3258 Use AT_DATA_GRAMMAR instead of AT_DATA for compiled tests.
3259
3260 2008-11-16 Akim Demaille <demaille@gostai.com>
3261
3262 Add missing $(EXEEXT).
3263 * doc/local.mk ($(CROSS_OPTIONS_TEXI)): The target is
3264 "src/bison$(EXEEXT)".
3265 Reported by Di-an Jan.
3266
3267 2008-11-15 Akim Demaille <demaille@gostai.com>
3268
3269 * TODO: Update.
3270
3271 2008-11-15 Akim Demaille <demaille@gostai.com>
3272
3273 Formatting changes.
3274 * tests/input.at: here.
3275
3276 2008-11-15 Akim Demaille <demaille@gostai.com>
3277
3278 Remove duplicate header inclusion.
3279 * src/LR0.c: here.
3280
3281 2008-11-15 Akim Demaille <demaille@gostai.com>
3282
3283 * src/parse-gram.h, src/parse-gram.c: Regen.
3284
3285 2008-11-15 Akim Demaille <demaille@gostai.com>
3286
3287 Support parametric types.
3288
3289 There are two issues to handle: first scanning nested angle
3290 bracket pairs to support types such as std::pair< std::string,
3291 std::list<std::string> > >.
3292
3293 Another issue is to address idiosyncracies of C++: do not glue two
3294 closing angle brackets together (otherwise it's operator>>), and
3295 avoid sticking blindly a TYPE to the opening <, as it can result
3296 in '<:' which is a digraph for '['.
3297
3298 * src/scan-gram.l (brace_level): Rename as...
3299 (nesting): this.
3300 (SC_TAG): New.
3301 Implement support for complex tags.
3302 (tag): Accept
3303 , but not <.
3304 * data/lalr1.cc (b4_symbol_value, b4_symbol_value_template)
3305 (b4_symbol_variant): Leave space around types as parameters.
3306 * examples/variant.yy: Use nested template types and leading ::.
3307 * src/parse-gram.y (TYPE, TYPE_TAG_ANY, TYPE_TAG_NONE, type.opt):
3308 Rename as...
3309 (TAG, TAG_ANY, TAG_NONE, tag.opt): these.
3310 * tests/c++.at: Test parametric types.
3311
3312 2008-11-15 Akim Demaille <akim@betelgeuse.gostai.ensta.fr>
3313
3314 Test token.prefix.
3315 This is not sufficient, but we test at least that the make_SYMBOL
3316 interface is not affected by token.prefix. A more general test
3317 will be implemented when the support of token.prefix is generalized
3318 to more skeletons.
3319
3320 * tests/c++.at: One more variant test, using token.prefix.
3321
3322 2008-11-15 Akim Demaille <akim@betelgeuse.gostai.ensta.fr>
3323
3324 Test the make_TOKEN interface.
3325 * tests/c++.at (AT_CHECK_VARIANTS): Require and use locations.
3326 Factor the common code in yylex.
3327 Use it to test "%define lex_symbol".
3328
3329 2008-11-15 Akim Demaille <akim@betelgeuse.gostai.ensta.fr>
3330
3331 Formatting change.
3332
3333 2008-11-15 Akim Demaille <akim@betelgeuse.gostai.ensta.fr>
3334
3335 Simplify code for variants bench marks.
3336 * etc/bench.pl.in (&generate_grammar_list): Define and use
3337 location_type.
3338 Factor the common code in yylex.
3339
3340 2008-11-15 Akim Demaille <demaille@gostai.com>
3341
3342 Better error message.
3343 * bootstrap (find_tool): Fix the error message.
3344
3345 2008-11-15 Akim Demaille <demaille@gostai.com>
3346
3347 Update variant.yy to newest interface.
3348 * examples/variant.yy: Define lex_symbol.
3349 Adjust.
3350
3351 2008-11-15 Akim Demaille <demaille@gostai.com>
3352
3353 Don't use locations in variant.yy.
3354 * examples/variant.yy: Adjust to not using locations.
3355
3356 2008-11-15 Akim Demaille <demaille@gostai.com>
3357
3358 Comment changes.
3359 * data/local.mk, etc/local.mk, examples/local.mk: Use Automake
3360 comments for the license.
3361
3362 2008-11-15 Akim Demaille <demaille@gostai.com>
3363
3364 Remove tests/Makefile.am.
3365 * tests/Makefile.am: Rename as...
3366 * tests/local.mk: this.
3367 * Makefile.am, configure.ac: Adjust.
3368 * Makefile.am (DISTCLEANFILES): Define.
3369 (maintainer-check, maintainer-xml-check, maintainer-push-check):
3370 Remove, we no longer need to bounce to the real targets.
3371
3372 2008-11-15 Akim Demaille <demaille@gostai.com>
3373
3374 Comment changes.
3375
3376 2008-11-15 Akim Demaille <demaille@gostai.com>
3377
3378 djgpp/local.mk.
3379 * Makefile.am (EXTRA_DIST): Move djgpp related part to...
3380 * djgpp/local.mk: this new file.
3381
3382 2008-11-15 Akim Demaille <demaille@gostai.com>
3383
3384 Remove doc/Makefile.am.
3385 * doc/Makefile.am: Rename as...
3386 * doc/local.mk: this.
3387 Adjust paths
3388 * Makefile.am, configure.ac: Adjust.
3389 * Makefile.am (MOSTLYCLEANFILES): New.
3390 * src/local.mk: Adjust.
3391
3392 2008-11-15 Akim Demaille <demaille@gostai.com>
3393
3394 Move sc_tight_scope into maint.mk.
3395 It does not work, and I don't know how it was supposed to work: it
3396 seems to be looking for sources in the build tree. I just moved
3397 it at a better place, fixing it is still required.
3398
3399 * src/local.mk (echo): Remove.
3400 (sc_tight_scope): Move to...
3401 * maint.mk: here.
3402
3403 2008-11-15 Akim Demaille <demaille@gostai.com>
3404
3405 Regen.
3406 * src/parse-gram.h, src/parse-gram.h: Regen.
3407
3408 2008-11-15 Akim Demaille <demaille@gostai.com>
3409
3410 Remove src/Makefile.am.
3411 * src/Makefile.am: Rename as...
3412 * src/local.mk: this.
3413 Prefix all the paths with src/.
3414 (AUTOMAKE_OPTIONS): Build object files in the sub dirs.
3415 (AM_CPPFLAGS): Find find in builddir/src.
3416 (YACC): Move the flags into...
3417 (AM_YFLAGS): here.
3418 * maint.mk (sc_tight_scope): Disable.
3419 It used to bounce to the version in src/Makefile.am which is now
3420 part of this very Makefile.
3421 * Makefile.am, configure.ac: Adjust.
3422 * src/scan-code-c.c, src/scan-code.l: We can no longer rely on
3423 include "..." to find files "here": we are no longer in src/, so
3424 qualify the includes with src/.
3425 * doc/Makefile.am (PREPATH): No longer include the top_builddir
3426 prefix.
3427 (.x.1): Adjust to be able to create src/foo from the top level
3428 Makefile, instead of going bounce to src/Makefile the creation of
3429 foo.
3430
3431 2008-11-15 Akim Demaille <demaille@gostai.com>
3432
3433 Remove useless variable.
3434 * doc/Makefile.am (srcsrcdir): Remove.
3435
3436 2008-11-15 Akim Demaille <demaille@gostai.com>
3437
3438 Remove data/Makefile.am.
3439 * data/Makefile.am: Rename as...
3440 * data/local.mk: this.
3441 Adjust paths.
3442 * Makefile.am, configure.ac: Adjust.
3443
3444 2008-11-15 Akim Demaille <demaille@gostai.com>
3445
3446 Remove etc/Makefile.am.
3447 * etc/Makefile.am: Rename as...
3448 * etc/local.mk: this.
3449 Adjust.
3450 * Makefile.am, configure.ac: Adjust.
3451
3452 2008-11-15 Akim Demaille <demaille@gostai.com>
3453
3454 Remove examples/local.mk.
3455 examples/calc++/Makefile.am might be interesting to keep as is, since
3456 it is an example in itself.
3457
3458 * examples/Makefile.am: Rename as...
3459 * examples/local.mk: this.
3460 Adjust.
3461 * Makefile.am, configure.ac: Adjust.
3462
3463 2008-11-15 Akim Demaille <demaille@gostai.com>
3464
3465 Remove build-aux/Makefile.am.
3466 Recursive Makefiles are really way too slow, let's get rid of some of
3467 them.
3468
3469 * build-aux/Makefile.am: Rename as...
3470 * build-aux/local.mk: this.
3471 Adjust paths.
3472 * Makefile.am, configure.ac: Adjust.
3473
3474 2008-11-15 Akim Demaille <demaille@gostai.com>
3475
3476 Provide convenience constructors for locations and positions.
3477 * data/location.cc (position::position): Accept file, line and
3478 column as arguments with default values.
3479 Always qualify initial line and column literals as unsigned.
3480 (location::location): Provide convenience constructors.
3481
3482 2008-11-15 Akim Demaille <demaille@gostai.com>
3483
3484 Instead of using make_symbol<TOK_FOO>, generate make_FOO for each
3485 token type.
3486 Using template buys us nothing, and makes it uselessly complex to
3487 construct a symbol. Besides, it could not be generalized to other
3488 languages, while make_FOO would work in C/Java etc.
3489
3490 * data/lalr1.cc (b4_symbol_): New.
3491 (b4_symbol): Use it.
3492 (b4_symbol_constructor_declaration_)
3493 (b4_symbol_constructor_definition_): Instead of generating
3494 specializations of an overloaded template function, just generate
3495 several functions whose names are forged from the token names
3496 without the token.prefix.
3497 (b4_symbol_constructor_declarations): Generate them for all the
3498 symbols, not just by class of symbol type, now that instead of
3499 specializing a function template by the token, we generate a
3500 function named after the token.
3501 (b4_symbol_constructor_specialization_)
3502 (b4_symbol_constructor_specializations): Remove.
3503 * etc/bench.pl.in: Adjust to this new API.
3504
3505 2008-11-13 Akim Demaille <demaille@gostai.com>
3506
3507 %define token.prefix.
3508 Provide a means to add a prefix to the name of the tokens as
3509 output in the generated files. Because of name clashes, it is
3510 good to have such a prefix such as TOK_ that protects from names
3511 such as EOF, FILE etc. But it clutters the grammar itself.
3512
3513 * data/bison.m4 (token.prefix): Empty by default.
3514 * data/c.m4 (b4_token_enum, b4_token_define): Use it.
3515 * data/lalr1.cc (b4_symbol): Ditto.
3516
3517 2008-11-13 Akim Demaille <demaille@gostai.com>
3518
3519 Compute at M4 time some of the subtractions.
3520 * data/lalr1.cc (b4_subtract): New.
3521 (b4_rhs_data): Use it.
3522
3523 2008-11-13 Akim Demaille <demaille@gostai.com>
3524
3525 symbol::token.
3526 This allows the user to get the type of a token returned by yylex.
3527
3528 * data/lalr1.cc (symbol::token): New.
3529 (yytoknum_): Define when %define lex_symbol, independently of
3530 %debug.
3531 (yytoken_number_): Move into...
3532 (symbol::token): here, since that's the only use.
3533 The other one is YYPRINT which was not officially supported
3534 by lalr1.cc, and anyway it did not work since YYPRINT uses this
3535 array under a different name (yytoknum).
3536
3537 2008-11-13 Akim Demaille <demaille@gostai.com>
3538
3539 YYERRCODE.
3540 * TODO (YYERRCODE): Mention the case of $undef.
3541
3542 2008-11-13 Akim Demaille <demaille@gostai.com>
3543
3544 TODO: YYPRINT.
3545 * TODO (YYPRINT): New.
3546
3547 2008-11-13 Akim Demaille <demaille@gostai.com>
3548
3549 Comment changes.
3550 * data/lalr1.cc, data/yacc.c: Fix the description of the
3551 yytranslate and yytoknum tables.
3552
3553 2008-11-13 Akim Demaille <demaille@gostai.com>
3554
3555 Define make_symbol in the header.
3556 To reach good performances these functions should be inlined (yet
3557 this is to measure precisely). To this end they must be available
3558 to the caller.
3559
3560 * data/lalr1.cc (b4_symbol_constructor_definition_): Qualify
3561 location_type with the class name.
3562 Since will now be output in the header, declare "inline".
3563 No longer use b4_symbol_constructor_specializations, but
3564 b4_symbol_constructor_definitions in the header.
3565 Don't call it in the *.cc file.
3566
3567 2008-11-13 Akim Demaille <demaille@gostai.com>
3568
3569 Define yytranslate in the header for lex_symbol.
3570 * data/lalr1.cc: Move the invocation of b4_yytranslate_definition
3571 into the header file when using %define lex_symbol.
3572 (yytranslate_): Declare inline.
3573
3574 2008-11-13 Akim Demaille <demaille@gostai.com>
3575
3576 Define the constructors of symbol_type in
3577 b4_symbol_constructor_definitions.
3578 The constructors are called by the make_symbol functions, which a
3579 forthcoming patch will move elsewhere. Hence the interest of
3580 putting them together.
3581
3582 The stack_symbol_type does not need to be moved, it is used only
3583 by the parser.
3584
3585 * data/lalr1.cc: Move symbol_type and symbol_base_type
3586 constructors into...
3587 (b4_symbol_constructor_definitions): here.
3588 Adjust.
3589
3590 2008-11-13 Akim Demaille <demaille@gostai.com>
3591
3592 Make it easier to move the definition of yytranslate_.
3593 Forthcoming changes will make it possible to use yytranslate_
3594 from outside the parser implementation file.
3595
3596 * data/lalr1.cc (b4_yytranslate_definition): New.
3597 Use it.
3598
3599 2008-11-13 Akim Demaille <demaille@gostai.com>
3600
3601 Remove useless class specification.
3602 * data/lalr1.cc (b4_symbol_constructor_specialization_): No need
3603 to refer to the class name to use a type defined by the class for
3604 arguments of member functions.
3605
3606 2008-11-13 Akim Demaille <demaille@gostai.com>
3607
3608 Finer input type for yytranslate.
3609 This patch is debatable: the tradition expects yylex to return an int
3610 which happens to correspond to token_number (which is an enum). This
3611 allows for instance to return characters (such as '*' etc.). But this
3612 goes against the stronger typing I am trying to have with the new
3613 lex interface which return a symbol_type. So in this case, feed
3614 yytranslate_ with a token_type.
3615
3616 * data/lalr1.cc (yytranslate_): When in %define lex-symbol,
3617 expect a token_type.
3618
3619 2008-11-13 Akim Demaille <demaille@gostai.com>
3620
3621 Honor lex-params in %define lex_symbol mode.
3622 * data/lalr1.cc: Use b4_lex_param.
3623
3624 2008-11-13 Akim Demaille <demaille@gostai.com>
3625
3626 Simplify names.
3627 * src/output.c (symbol_definitions_output): Rename symbol
3628 attributes type_name and has_type_name as type and has_type.
3629 * data/lalr1.cc: Adjust uses.
3630
3631 2008-11-13 Akim Demaille <demaille@gostai.com>
3632
3633 Use b4_type_names for the union type.
3634 The union used to compute the size of the variant used to iterate
3635 over the type of all the symbols, with a lot of redundancy. Now
3636 iterate over the lists of symbols having the same type-name.
3637
3638 * data/lalr1.cc (b4_char_sizeof_): New.
3639 (b4_char_sizeof): Use it.
3640 Adjust to be called with a list of numbers instead of a single
3641 number.
3642 Adjust its caller for new-line issues.
3643
3644 2008-11-13 Akim Demaille <demaille@gostai.com>
3645
3646 Define the "identifier" of a symbol.
3647 Symbols may have several string representations, for instance if
3648 they have an alias. What I call its "id" is a string that can be
3649 used as an identifier. May not exist.
3650
3651 Currently the symbols which have the "tag_is_id" flag set are
3652 those that don't have an alias. Look harder for the id.
3653
3654 * src/output.c (is_identifier): Move to...
3655 * src/symtab.c (is_identifier): here.
3656 * src/symtab.h, src/symtab.c (symbol_id_get): New.
3657 * src/output.c (symbol_definitions_output): Use it to define "id"
3658 and "has_id".
3659 Remove the definition of "tag_is_id".
3660 * data/lalr1.cc: Use the "id" and "has_id" whereever "tag" and
3661 "tag_is_id" were used to produce code.
3662 We still use "tag" for documentation.
3663
3664 2008-11-11 Akim Demaille <demaille@gostai.com>
3665
3666 Locations are no longer required by lalr1.cc.
3667 * data/lalr1.cc (_b4_args, b4_args): New.
3668 Adjust all uses of locations to make them optional.
3669 * tests/c++.at (AT_CHECK_VARIANTS): No longer use the locations.
3670 (AT_CHECK_NAMESPACE): Check the use of locations.
3671 * tests/calc.at (_AT_DATA_CALC_Y): Adjust to be usable with or
3672 without locations with lalr1.cc.
3673 Test these cases.
3674 * tests/output.at: Check lalr1.cc with and without location
3675 support.
3676 * tests/regression.at (_AT_DATA_EXPECT2_Y, _AT_DATA_DANCER_Y):
3677 Don't use locations.
3678
3679 2008-11-11 Akim Demaille <demaille@gostai.com>
3680
3681 AT_FULL_COMPILE.
3682 * tests/local.at (AT_FULL_COMPILE): New.
3683 * tests/actions.at, tests/calc.at, tests/regression.at: Use it.
3684
3685 2008-11-11 Akim Demaille <demaille@gostai.com>
3686
3687 Support parens in calc++.
3688 * doc/bison.texinfo (Calc++ Scanner, Calc++ Parser): Support parens.
3689 * examples/calc++/test (run): Check the expected output.
3690 Adjust callers.
3691 Check parens too.
3692
3693 2008-11-11 Akim Demaille <demaille@gostai.com>
3694
3695 Simplify lalr1.cc since %defines is mandatory.
3696 * data/lalr1.cc: Remove useless calls to b4_defines_if.
3697
3698 2008-11-11 Akim Demaille <demaille@gostai.com>
3699
3700 TODO: yyfmt.
3701 * TODO (yysyntax_error): New item.
3702
3703 2008-11-11 Akim Demaille <demaille@gostai.com>
3704
3705 Prefer M4 to CPP.
3706 * data/lalr1.cc: Use b4_error_verbose_if instead of #if
3707 YYERROR_VERBOSE.
3708
3709 2008-11-11 Akim Demaille <demaille@gostai.com>
3710
3711 Support i18n of the parse error messages.
3712 * TODO (lalr1.cc/I18n): Remove.
3713 * data/lalr1.cc (yysyntax_error_): Support the translation of the
3714 error messages, as done in yacc.c.
3715 Stay within the yy* pseudo namespace.
3716
3717 2008-11-11 Akim Demaille <demaille@gostai.com>
3718
3719 More TODO.
3720 * TODO (single stack, yysyntax_error): New.
3721
3722 2008-11-11 Akim Demaille <demaille@gostai.com>
3723
3724 Make it possible to return a symbol_type from yylex.
3725 * data/lalr1.cc (b4_lex_symbol_if): New.
3726 (parse): When lex_symbol is defined, expected yylex to return the
3727 complete lookahead.
3728 * etc/bench.pl.in (generate_grammar_list): Extend to support this
3729 yylex interface.
3730 (bench_variant_parser): Exercise it.
3731
3732 2008-11-11 Akim Demaille <demaille@gostai.com>
3733
3734 Remove useless bench case.
3735 * etc/bench.pl.in (bench_variant_parser): VARIANT_DESTROY is
3736 no longer used.
3737
3738 2008-11-11 Akim Demaille <demaille@gostai.com>
3739
3740 Improve display of directives.
3741 * etc/bench.pl.in (parse_term): Don't add useless eol.
3742
3743 2008-11-11 Akim Demaille <demaille@gostai.com>
3744
3745 Use string_cast in the bench.
3746 * etc/bench.pl.in (generate_grammar_list): Define and use
3747 string_cast.
3748
3749 2008-11-11 Akim Demaille <demaille@gostai.com>
3750
3751 Replace yychar with a Boolean.
3752 * data/lalr1.cc (parse::yychar): Replace by...
3753 (parse::yyempty): this.
3754
3755 2008-11-11 Akim Demaille <demaille@gostai.com>
3756
3757 Factor the tables.
3758 * TODO: New item.
3759
3760 2008-11-11 Akim Demaille <demaille@gostai.com>
3761
3762 Let yytranslate handle the eof case.
3763 * data/lalr1.cc (yytranslate_): Handle the EOF case.
3764 Adjust callers.
3765 No longer expect yychar to be equal to yyeof_, rather, test the
3766 lookahead's (translated) kind.
3767
3768 2008-11-11 Akim Demaille <demaille@gostai.com>
3769
3770 yychar cannot be empty in yyerrlab.
3771 * TODO (yychar == yyempty_): New.
3772 * data/lalr1.cc: Remove the handling of this case.
3773 This eases forthcoming changes related to yychar and yytranslate.
3774
3775 2008-11-11 Akim Demaille <demaille@gostai.com>
3776
3777 Bench: syntactic sugar for %define/#define.
3778 * etc/bench.pl.in (parse_dirs): Support %d and #d with arguments.
3779 (&bench_push_parser, bench_variant_parser): Use this feature.
3780 (&eat): New.
3781 Use it.
3782
3783 2008-11-11 Akim Demaille <demaille@gostai.com>
3784
3785 Less memory pressure on the "list" bench.
3786 * etc/bench.pl.in (generate_grammar_list): Do not accumulate all
3787 the values, to limit memory pressure.
3788
3789 2008-11-11 Akim Demaille <demaille@gostai.com>
3790
3791 Introduce make_symbol.
3792 make_symbol provides a means to construct a full symbol (kind,
3793 value, location) in a single shot. It is meant to be a Symbol
3794 constructor, parameterized by the symbol kind so that overloading
3795 would prevent incorrect kind/value pairs. Unfortunately
3796 parameterized constructors do not work well in C++ (unless the
3797 parameter also appears as an argument, which is not acceptable),
3798 hence the use of a function instead of a constructor.
3799
3800 * data/lalr1.cc (b4_symbol_constructor_declaration_)
3801 (b4_symbol_constructor_declarations)
3802 (b4_symbol_constructor_specialization_)
3803 (b4_symbol_constructor_specializations)
3804 (b4_symbol_constructor_definition_)
3805 (b4_symbol_constructor_definitions): New.
3806 Use them where appropriate to generate declaration, declaration of
3807 the specializations, and implementations of the templated
3808 overloaded function "make_symbol".
3809 (variant::variant): Always define a default ctor.
3810 Also provide a copy ctor.
3811 (symbol_base_type, symbol_type): New ctor overloads for value-less
3812 symbols.
3813 (symbol_type): Now public, so that functions such as yylex can use
3814 it.
3815
3816 2008-11-11 Akim Demaille <demaille@gostai.com>
3817
3818 Inform m4 whether a tag is a valid id.
3819 * src/output.c (is_identifier): New.
3820 (symbol_definitions_output): Use it to define tag_is_id.
3821 But maybe this should be done at m4 level?
3822
3823 2008-11-11 Akim Demaille <demaille@gostai.com>
3824
3825 Test 214 was failing: it greps with a pattern containing [ ]*
3826 which obviously meant to catch spaces and tabs, but contained only
3827 spaces. Tabulations in sources are a nuisance, so to simplify the
3828 matter, get rid of all the tabulations in the Java sources. The
3829 other skeletons will be treated equally later.
3830
3831 * data/java.m4, data/lalr1.java: Untabify.
3832 * tests/java.at: Simplify AT_CHECK_JAVA_GREP invocations:
3833 tabulations are no longer generated.
3834
3835 2008-11-11 Paolo Bonzini <bonzini@gnu.org>
3836
3837 * bootstrap.conf: Replace m4/warning.m4 with warnings module.
3838 * configure.ac: Adjust usage.
3839 * lib/Makefile.am: Replace $(WARNING_CFLAGS) with $(WARN_CFLAGS).
3840 * src/Makefile.am: Replace $(WARNING_CFLAGS) with $(WARN_CFLAGS).
3841 * tests/atlocal.in: Replace $(WARNING_*FLAGS) with $(WARN_*FLAGS).
3842
3843 2008-11-10 Di-an Jan <dianj@freeshell.org>
3844
3845 Workaround Java's ``code too large'' problem for parser tables
3846 in most cases, by using one function per initialization.
3847 * data/java.m4 (b4_typed_parser_table, b4_integral_parser_table): New.
3848 * data/lalr1.java (yypact_, yydefact_, yypgoto_, yydefgoto_,
3849 yytable_, yycheck_, yystos_, yytoken_number_, yyr1_, yyr2_, yyrhs_
3850 yyprhs_, yyrline_, yytranslate_table_): Use b4_integral_parser_table.
3851 (yytname_): Use b4_typed_parser_table.
3852 * doc/bison.texinfo (Java Bison Interface): Add note on Java's
3853 ``code too large'' error.
3854
3855 2008-11-10 Di-an Jan <dianj@freeshell.org>
3856
3857 * NEWS: Document them.
3858
3859 General Java skeleton improvements.
3860 * configure.ac (gt_JAVACOMP): Request target of 1.4, which allows
3861 using gcj < 4.3 in the testsuite, according to comments in
3862 gnulib/m4/javacomp.m4.
3863 * data/java.m4 (stype, parser_class_name, lex_throws, throws,
3864 location_type, position_type): Remove extraneous brackets from
3865 b4_percent_define_default.
3866 (b4_lex_param, b4_parse_param): Remove extraneous brackets from
3867 m4_define and m4_define_default.
3868 * data/lalr1.java (b4_pre_prologue): Change to b4_user_post_prologue,
3869 which marks the end of user code with appropriate syncline, like all
3870 the other skeletons.
3871 (b4_user_post_prologue): Add. Don't silently drop.
3872 (yylex): Remove.
3873 (parse): Inline yylex.
3874 * doc/bison.texinfo (bisonVersion, bisonSkeleton): Document.
3875 (%{...%}): Fix typo of %code imports.
3876 * tests/java.at (AT_JAVA_COMPILE): Add "java" keyword.
3877
3878 Support annotations on parser class with %define annotations.
3879 * data/lalr1.java (annotations): Add to parser class modifier.
3880 * doc/bison.texinfo (Java Parser Interface): Document
3881 %define annotations.
3882 (Java Declarations Summary): Document %define annotations.
3883 * tests/java.at (Java parser class modifiers): Test annotations.
3884
3885 Do not generate code for %error-verbose unless requested.
3886 * data/lalr1.java (errorVerbose): Rename to yyErrorVerbose.
3887 Make private. Make conditional on %error-verbose.
3888 (getErrorVerbose, setErrorVerbose): New.
3889 (yytnamerr_): Make conditional on %error-verbose.
3890 (yysyntax_error): Make some code conditional on %error-verbose.
3891 * doc/bison.texinfo (Java Bison Interface): Remove the parts
3892 about %error-verbose having no effect.
3893 (getErrorVerbose, setErrorVerbose): Document.
3894
3895 Move constants for token names to Lexer interface.
3896 * data/lalr1.java (Lexer): Move EOF, b4_token_enums(b4_tokens) here.
3897 * data/java.m4 (b4_token_enum): Indent for move to Lexer interface.
3898 (parse): Qualify EOF to Lexer.EOF.
3899 * doc/bison.texinfo (Java Parser Interface): Move documentation of
3900 EOF and token names to Java Lexer Interface.
3901 * tests/java.at (_AT_DATA_JAVA_CALC_Y): Remove Calc qualifier.
3902
3903 Make yyerror public.
3904 * data/lalr1.java (Lexer.yyerror): Use longer parameter name.
3905 (yyerror): Change to public. Add Javadoc comments. Use longer
3906 parameter names. Make the body rather than the declarator
3907 conditional on %locations.
3908 * doc/bison.texinfo (yyerror): Document. Don't mark as protected.
3909
3910 Allow user to add code to the constructor with %code init.
3911 * data/java.m4 (b4_init_throws): New, for %define init_throws.
3912 * data/lalr1.java (YYParser.YYParser): Add b4_init_throws.
3913 Add %code init to the front of the constructor body.
3914 * doc/bison.texinfo (YYParser.YYParser): Document %code init
3915 and %define init_throws.
3916 (Java Declarations Summary): Document %code init and
3917 %define init_throws.
3918 * tests/java.at (Java %parse-param and %lex-param): Adjust grep.
3919 (Java constructor init and init_throws): Add tests.
3920
3921 2008-11-10 Akim Demaille <demaille@gostai.com>
3922
3923 Update TODO.
3924 * TODO (-D): is implemented.
3925 (associativity): Same precedence must have the same associativity.
3926 For instance, how can a * b / c be parsed if * is %left and / is
3927 %right?
3928 (YYERRORCODE, YYFAIL, YYBACKUP): New.
3929
3930 2008-11-10 Akim Demaille <demaille@gostai.com>
3931
3932 Formatting changes.
3933
3934 2008-11-10 Akim Demaille <demaille@gostai.com>
3935
3936 More information about the symbols.
3937 * src/output.c (type_names_output): Document all the symbols,
3938 including those that don't have a type-name.
3939 (symbol_definitions_output): Define "is_token" and
3940 "has_type_name".
3941 * data/lalr1.cc (b4_type_action_): Skip symbols that have an empty
3942 type-name, now that they are defined too in b4_type_names.
3943
3944 2008-11-10 Akim Demaille <demaille@gostai.com>
3945
3946 Regen.
3947
3948 2008-11-10 Akim Demaille <demaille@gostai.com>
3949
3950 Make parser::yytranslate static.
3951 Small speedup (1%) on the list grammar. And makes yytranslate_
3952 available in non member functions.
3953
3954 * data/lalr1.cc (yytranslate_): Does not need to be a instance
3955 function.
3956
3957 2008-11-10 Akim Demaille <demaille@gostai.com>
3958
3959 Avoid trailing spaces.
3960 * data/c.m4: b4_comment(TEXT): Don't indent empty lines.
3961 * data/lalr1.cc: Don't indent before rule and symbol actions, as
3962 they can be empty, and anyway this incorrectly indents the first
3963 action.
3964
3965 2008-11-10 Akim Demaille <demaille@gostai.com>
3966
3967 Comment changes.
3968
3969 2008-11-10 Akim Demaille <demaille@gostai.com>
3970
3971 Use "enum" for integral constants.
3972 This is just nicer to read, I observed no speedup.
3973
3974 * data/lalr1.cc (yyeof_, yylast_, yynnts_, yyempty_, yyfinal_)
3975 (yterror_, yyerrcode_, yyntokens_): Define as members of an enum.
3976 (yyuser_token_number_max_, yyundef_token_): Move into...
3977 (yytranslate_): here.
3978
3979 2008-11-10 Akim Demaille <demaille@gostai.com>
3980
3981 Shortcuts in bench directives.
3982 * etc/bench.pl.in (parse_dirs): New.
3983 Use it.
3984 (bench_variant_parser, bench_fusion_parser): Use %s and %d.
3985 Create the benches in "benches/".
3986
3987 2008-11-10 Akim Demaille <demaille@gostai.com>
3988
3989 Formatting changes.
3990 * data/lalr1.cc: here.
3991
3992 2008-11-10 Akim Demaille <demaille@gostai.com>
3993
3994 Adjust verbose message to using emacs.
3995 * etc/bench.pl.in: Inform compilation-mode when we change the
3996 directory.
3997 (generate_grammar_list): Recognize %define "variant" in addition
3998 to %define variant.
3999
4000 2008-11-10 Akim Demaille <demaille@gostai.com>
4001
4002 Classify symbols by type-name.
4003 * src/uniqstr.h (UNIQSTR_CMP): New.
4004 * src/output.c (symbol_type_name_cmp, symbols_by_type_name)
4005 (type_names_output): New.
4006 (muscles_output): Use it.
4007 * data/lalr1.cc (b4_symbol_action_): Remove.
4008 (b4_symbol_case_, b4_type_action_): New.
4009 Adjust uses of b4_symbol_action_ to use b4_type_action_.
4010
4011 2008-11-10 Akim Demaille <demaille@gostai.com>
4012
4013 Change the handling of the symbols in the skeletons.
4014 Before we were using tables which lines were the symbols and which
4015 columns were things like number, tag, type-name etc. It is was
4016 difficult to extend: each time a column was added, all the numbers had
4017 to be updated (you asked for colon $2, not for "tag"). Also, it was
4018 hard to filter these tables when only a subset of the symbols (say the
4019 tokens, or the nterms, or the tokens that have and external number
4020 *and* a type-name) was of interest.
4021
4022 Now instead of monolithic tables, we define one macro per cell. For
4023 instance "b4_symbol(0, tag)" is a macro name which contents is
4024 self-decriptive. The macro "b4_symbol" provides easier access to
4025 these cells.
4026
4027 * src/output.c (type_names_output): Remove.
4028 (symbol_numbers_output, symbol_definitions_output): New.
4029 (muscles_output): Call them.
4030 (prepare_symbols): Define b4_symbols_number.
4031
4032 2008-11-10 Akim Demaille <demaille@gostai.com>
4033
4034 --trace=muscles
4035 * src/getargs.h, src/getargs.c (trace_muscle): New.
4036 (trace_types, trace_args): Support it.
4037 * src/output.c (output_skeleton): Use it.
4038
4039 2008-11-10 Akim Demaille <demaille@gostai.com>
4040
4041 muscles_output.
4042 * src/output.c (muscles_output): New, extracted from...
4043 (output_skeleton): here.
4044 Adjust.
4045
4046 2008-11-10 Akim Demaille <demaille@gostai.com>
4047
4048 Formatting changes.
4049
4050 2008-11-10 Akim Demaille <demaille@gostai.com>
4051
4052 Update the variant example.
4053 * examples/variant.yy: Formatting changes.
4054 One stage build.
4055
4056 2008-11-10 Akim Demaille <demaille@gostai.com>
4057
4058 Support constructor with an argument.
4059 This improves the "list" bench by 2%.
4060
4061 * data/lalr1.cc (variant::build): Add an overloaded version with
4062 an argument.
4063 * tests/c++.at (AT_CHECK_VARIANT): Check it.
4064
4065 2008-11-10 Akim Demaille <demaille@gostai.com>
4066
4067 Test variants.
4068 * tests/c++.at (AT_CHECK_VARIANTS): New.
4069 Use it with and without %define assert.
4070
4071 2008-11-10 Akim Demaille <demaille@gostai.com>
4072
4073 Add %precedence support.
4074 Unfortunately it is not possible to reuse the %prec directive. This
4075 is because to please POSIX, we do not require to end the rules with a
4076 semicolon. As a result,
4077
4078 foo: bar %prec baz
4079
4080 is ambiguous: either a rule which precedence is that of baz, or a rule,
4081 and then a declaration of the precedence of the token baz.
4082
4083 * doc/bison.texinfo: Document %precedence.
4084 (Precedence Only): New.
4085 * src/assoc.h, src/assoc.c (precedence_assoc): New.
4086 * src/conflicts.c (resolve_sr_conflict): Support it.
4087 * src/scan-gram.l, src/parse-gram.y (%precedence): New token.
4088 Parse it.
4089 * tests/calc.at: Use %precedence for NEG.
4090 * tests/conflicts.at (%precedence does not suffice)
4091 (%precedence suffices): New tests.
4092
4093 2008-11-09 Akim Demaille <demaille@gostai.com>
4094
4095 Make benches in a sub dirs.
4096 * etc/bench.pl.in ($dir): New.
4097 Use it.
4098 Check the use of constructors with an argument.
4099 (bench_variant_parser): Fix.
4100
4101 2008-11-09 Akim Demaille <demaille@gostai.com>
4102
4103 fix eof condition
4104
4105 2008-11-09 Akim Demaille <demaille@gostai.com>
4106
4107 Fix --help.
4108
4109 2008-11-09 Akim Demaille <demaille@gostai.com>
4110
4111 Require the generation of parse-gram.output.
4112 * src/Makefile.am (YACC): Pass --report=all.
4113
4114 2008-11-09 Akim Demaille <demaille@gostai.com>
4115
4116 Formatting changes.
4117
4118 2008-11-09 Akim Demaille <demaille@gostai.com>
4119
4120 Update TODO.
4121 * TODO: Remove obsolete items.
4122 Update others.
4123
4124 2008-11-09 Akim Demaille <demaille@gostai.com>
4125
4126 Enhance bench.pl.
4127 * etc/bench.pl.in (parse, parse_expr, parse_term, parse_fact)
4128 (@token, $grammar, $bench): New.
4129 (generate_grammar_variant): Rename as...
4130 (generate_grammar_list): this.
4131 (generate_grammar): Adjust.
4132 (bench_grammar): Rename as...
4133 (bench): this.
4134 Use it in the various bench-marking routines.
4135 (-b, -g): New options.
4136
4137 2008-11-09 Akim Demaille <demaille@gostai.com>
4138
4139 Use a static hierarchy for symbols in the C++ parser.
4140 * data/lalr1.cc (symbol_base_type, symbol_type)
4141 (stack_symbol_type): Make it a static hierarchy.
4142 Adjust dependencies.
4143
4144 2008-11-09 Akim Demaille <demaille@gostai.com>
4145
4146 bench.pl -d, --directive.
4147 * etc/bench.pl.in (@directive): New.
4148 (&bench_grammar): Use it.
4149 (&bench_list_grammar): New, to provide access to the "variant"
4150 grammar.
4151 Use it.
4152 (getopts): Support -d, --directive.
4153
4154 2008-11-09 Akim Demaille <demaille@gostai.com>
4155
4156 Use inline for small operations.
4157 * data/lalr1.cc (symbol_base_type, symbol_type)
4158 (stack_symbol_type): Declare constructor and other operations as
4159 inline.
4160 (yy_destroy_): Inline.
4161
4162 2008-11-09 Akim Demaille <demaille@gostai.com>
4163
4164 Introduce a hierarchy for symbols.
4165 * data/lalr1.cc (symbol_base_type, symbol_type): New.
4166 (data_type): Rename as...
4167 (stack_symbol_type): this.
4168 Derive from symbol_base_type.
4169 (yy_symbol_value_print_): Merge into...
4170 (yy_symbol_print_): this.
4171 Rename as...
4172 (yy_print_): this.
4173 (yydestruct_): Rename as...
4174 (yy_destroy_): this.
4175 (b4_symbols_actions, YY_SYMBOL_PRINT): Adjust.
4176 (parser::parse): yyla is now of symbol_type.
4177 Use its type member instead of yytoken.
4178
4179 2008-11-09 Akim Demaille <demaille@gostai.com>
4180
4181 Rename data_type and stack_symbol_type.
4182 * data/lalr1.cc (data_type): Rename as...
4183 (stack_symbol_type): this.
4184
4185 2008-11-09 Akim Demaille <demaille@gostai.com>
4186
4187 Handle semantic value and location together.
4188 * data/lalr1.cc (b4_symbol_actions): Bounce $$ and @$ to
4189 yydata.value and yydata.location.
4190 (yy_symbol_value_print_, yy_symbol_print_, yydestruct_)
4191 (YY_SYMBOL_PRINT): Now take semantic value and location as a
4192 single arg.
4193 Adjust all callers.
4194 (yydestruct_): New overload for a stack symbol.
4195
4196 2008-11-09 Akim Demaille <demaille@gostai.com>
4197
4198 Push a complete symbol, not connected parts.
4199 * data/lalr1.cc (yypush_): Take a data_type&, not disconnected
4200 state, value and location.
4201 Adjust callers.
4202
4203 2008-11-09 Akim Demaille <demaille@gostai.com>
4204
4205 Agregate yylval and yylloc.
4206 * data/lalr1.cc (parser::yylval, parser::yylloc): Replace by...
4207 (parser::yyla): this.
4208
4209 2008-11-09 Akim Demaille <demaille@gostai.com>
4210
4211 Rely on the state stack to display reduction traces.
4212 To display rhs symbols before a reduction, we used information
4213 about the rule reduced, which required the tables yyrhs and
4214 yyprhs. Now use rely only on the state stack to get the same
4215 information.
4216
4217 * data/lalr1.cc (b4_rhs_data, b4_rhs_state): New.
4218 Use them.
4219 (parser::yyrhs_, parser::yyprhs_): Remove.
4220 (parser::yy_reduce_print_): Use the state stack.
4221
4222 2008-11-09 Akim Demaille <demaille@gostai.com>
4223
4224 Fuse yyval and yyloc into yylhs.
4225 * data/lalr1.cc (b4_lhs_value, b4_lhs_location): Adjust to using
4226 yylhs.
4227 (parse): Replace yyval and yyloc with yylhs.value and
4228 yylhs.location.
4229 After a user action, compute yylhs.state earlier.
4230 (yyerrlab1): Do not play tricks with yylhs.location, rather, use a
4231 fresh error_token.
4232
4233 2008-11-09 Di-an Jan <dianj@freeshell.org>
4234
4235 Remove unused variable.
4236 * src/output.c (type_names_output): Remove unused variable sep.
4237
4238 2008-11-09 Paolo Bonzini <bonzini@gnu.org>
4239
4240 Change tests/output.at quoting.
4241 * tests/output.at (AT_CHECK_OUTPUT): Use conventional m4 quoting when
4242 expanding arguments.
4243
4244 2008-11-07 Joel E. Denny <jdenny@ces.clemson.edu>
4245
4246 Don't add a semicolon to actions for %skeleton or %language.
4247 It breaks Java test cases as reported by Akim Demaille.
4248 * src/scan-code.l: Implement.
4249
4250 2008-11-07 Joel E. Denny <jdenny@ces.clemson.edu>
4251
4252 Clean up %skeleton and %language priority implementation.
4253 * src/getargs.c (skeleton_prio): Use default_prio rather than 2, and
4254 remove static qualifier because others will soon need to see it.
4255 (language_prio): Likewise.
4256 (getargs): Use command_line_prio rather than 0.
4257 * src/getargs.h (command_line_prio, grammar_prio, default_prio): New
4258 enum fields.
4259 (skeleton_prio): Extern it.
4260 (language_prio): Extern it.
4261 * src/parse-gram.y: Use grammar_prio rather than 1.
4262
4263 2008-11-07 Akim Demaille <demaille@gostai.com>
4264
4265 Moving push traces into yypush_.
4266 * data/lalr1.cc (yypush_): Now takes a optional trace message.
4267 Adjust all uses.
4268
4269 2008-11-07 Akim Demaille <demaille@gostai.com>
4270
4271 The single-stack C++ parser is now the standard one.
4272 * data/lalr1.cc: Rename as...
4273 * data/lalr1-split.cc: this.
4274 * data/lalr1-fusion.cc: Rename as...
4275 * data/lalr1.cc: this.
4276 * etc/bench.pl.in: Adjust.
4277
4278 2008-11-07 Akim Demaille <demaille@gostai.com>
4279
4280 Avoid empty-if warnings.
4281 Reported by Quentin Hocquet.
4282
4283 * data/lalr1-fusion.cc (YY_SYMBOL_PRINT, YY_REDUCE_PRINT)
4284 (YY_STACK_PRINT): Provide some contents even when !YYDEBUG.
4285
4286 2008-11-07 Akim Demaille <demaille@gostai.com>
4287
4288 Pass command line location to skeleton_arg and language_argmatch.
4289 * src/getargs.h, src/getargs.c (skeleton_arg, language_argmatch):
4290 The location argument is now mandatory.
4291 Adjust all dependencies.
4292 (getargs): Use command_line_location.
4293
4294 2008-11-07 Akim Demaille <demaille@gostai.com>
4295
4296 -D, --define.
4297 * src/getargs.c (usage): Document -D.
4298 Fix help string for --locations.
4299 (command_line_location): New.
4300 (short_options, long_options, getargs): Support -D, --define.
4301 (getargs): Move -d support at the right place.
4302 * doc/bison.texinfo (Bison Options): Update.
4303 * tests/input.at (%define, --define): New.
4304
4305 2008-11-07 Akim Demaille <demaille@gostai.com>
4306
4307 Initialize the muscle table before parsing the command line.
4308 * src/getargs.c (quotearg.h, muscle_tab.h): Include.
4309 (getargs): Define file_name.
4310 * src/main.c (main): Initialize muscle_tab before calling
4311 getargs.
4312 * src/muscle_tab.c (muscle_init): No longer define file_name, as
4313 its value is not available yet.
4314
4315 2008-11-07 Akim Demaille <demaille@gostai.com>
4316
4317 Locations without columns for command line arguments.
4318 * src/location.c (location_print): Don't display negative columns.
4319 * src/location.h: Document this.
4320
4321 2008-11-07 Akim Demaille <demaille@gostai.com>
4322
4323 Fix --help.
4324 * src/getargs.c (usage): Fix help string for -W.
4325
4326 2008-11-07 Akim Demaille <demaille@gostai.com>
4327
4328 Handle more general types of option arguments.
4329 * build-aux/cross-options.pl: The argument ends at the first
4330 space, not the first non-symbol character.
4331 Use @var for each word appearing the argument description.
4332
4333 2008-11-07 Akim Demaille <demaille@gostai.com>
4334
4335 Destroy the variants that remain on the stack in case of error.
4336 * data/lalr1-fusion.cc (yydestruct_): Invoke the variant's
4337 destructor.
4338 Display the value only if yymsg is nonnull.
4339 (yyreduce): Invoke yydestruct_ when popping lhs symbols.
4340
4341 2008-11-07 Akim Demaille <demaille@gostai.com>
4342
4343 Add "%define assert" to variants.
4344 This is used to help the user catch cases where some value gets
4345 ovewritten by a new one. This should not happen, as this will
4346 probably leak.
4347
4348 Unfortunately this uncovered a bug in the C++ parser itself: the
4349 lookahead value was not destroyed between two calls to yylex. For
4350 instance if the previous lookahead was a std::string, and then an int,
4351 then the value of the std::string was correctly taken (i.e., the
4352 lookahead was now an empty string), but std::string structure itself
4353 was not reclaimed.
4354
4355 This is now done in variant::build(other&) (which is used to take the
4356 value of the lookahead): other is not only stolen from its value, it
4357 is also destroyed. This incurs a new performance penalty of a few
4358 percent, and union becomes faster again.
4359
4360 * data/lalr1-fusion.cc (variant::build(other&)): Destroy other.
4361 (b4_variant_if): New.
4362 (variant::built): New.
4363 Use it whereever the status of the variant changes.
4364 * etc/bench.pl.in: Check the penalty of %define assert.
4365
4366 2008-11-07 Akim Demaille <demaille@gostai.com>
4367
4368 Use "%define variant" in bench.pl.
4369 * etc/bench.pl.in: No longer use the pseudo directive %variants,
4370 just use %define variants.
4371
4372 2008-11-07 Akim Demaille <demaille@gostai.com>
4373
4374 Regen.
4375 * src/parse-gram.h, src/parse-gram.c: Regen.
4376
4377 2008-11-04 Joel E. Denny <jdenny@ces.clemson.edu>
4378
4379 Fix user actions without a trailing semicolon.
4380 Reported by Sergei Steshenko at
4381 <http://lists.gnu.org/archive/html/bug-bison/2008-11/msg00001.html>.
4382 * THANKS (Sergei Steshenko): Add.
4383 * src/scan-code.l (SC_RULE_ACTION): Fix it.
4384 * tests/regression.at (Fix user actions without a trailing semicolon):
4385 New test case.
4386
4387 2008-11-04 Akim Demaille <demaille@gostai.com>
4388
4389 Use b4_copyright_years.
4390 * data/yacc.c (b4_copyright_years): New.
4391 Fix its value according to the comments in the file.
4392 Use it and undefine it.
4393
4394 2008-11-04 Akim Demaille <demaille@gostai.com>
4395
4396 Formatting changes.
4397 * data/lalr1-fusion.cc, src/parse-gram.y: here.
4398
4399 2008-11-04 Akim Demaille <demaille@gostai.com>
4400
4401 Formatting changes.
4402 * data/lalr1-fusion.cc: here.
4403
4404 2008-11-04 Akim Demaille <demaille@gostai.com>
4405
4406 Use strict on bench.pl.
4407 * etc/bench.pl.in (&run, &generate_grammar): New.
4408 Rename the grammar generating functions for consistency.
4409 Change the interface so that the list of benches to run is passed
4410 as (optionless) arguments.
4411 (&compile): Use &run.
4412
4413 2008-11-04 Akim Demaille <demaille@gostai.com>
4414
4415 Remove spurious initial empty lines.
4416 * data/glr.c, data/glr.cc, data/lalr1.cc, data/lalr1.java,
4417 * data/yacc.c: End the @output lines with an @.
4418
4419 2008-11-04 Akim Demaille <demaille@gostai.com>
4420
4421 Improve the display of sizes.
4422 * etc/bench.p.in: Higher precision.
4423 Sort by decreasing size.
4424
4425 2008-11-04 Akim Demaille <demaille@gostai.com>
4426
4427 Don't memcpy C++ structures.
4428 * data/lalr1-fusion.cc (b4_symbol_variant): Adjust additional
4429 arguments.
4430 (variant::build): New overload for
4431 copy-construction-that-destroys.
4432 (variant::swap): New.
4433 (parser::yypush_): Use it in variant mode.
4434
4435 2008-11-04 Akim Demaille <demaille@gostai.com>
4436
4437 Better defaults for bench.pl.
4438 * etc/bench.pl.in ($verbose, $cflags, $iterations): Change the
4439 default values.
4440 Adjust &verbose uses.
4441 (-q, --quiet): New.
4442
4443 2008-11-04 Akim Demaille <demaille@gostai.com>
4444
4445 Make variant.yy more complex.
4446 std::list cannot be copied via memcpy, they are more demanding than
4447 std::string. Use one std::list to strengthen the test.
4448
4449 * examples/variant.yy: Use lalr1-fusion.cc, not lalr1.cc.
4450 Adjust.
4451 Create a list of strings, instead of a single large string.
4452
4453 2008-11-04 Akim Demaille <demaille@gostai.com>
4454
4455 bench.pl --bench.
4456 * etc/bench.pl.in (--bench, $bench): New.
4457
4458 2008-11-04 Akim Demaille <demaille@gostai.com>
4459
4460 Sort methods.
4461 * data/lalr1-fusion.cc (destroy): Use as() in its definition.
4462 Define it after as().
4463
4464 2008-11-04 Akim Demaille <demaille@gostai.com>
4465
4466 Useless parens.
4467 * data/lalr1-fusion.cc (b4_rhs_location): Remove useless parens.
4468
4469 2008-11-04 Akim Demaille <demaille@gostai.com>
4470
4471 Issue missing synclines after user actions.
4472 * data/c.m4 (b4_case): Issue synclines on the output file.
4473
4474 2008-11-04 Akim Demaille <demaille@gostai.com>
4475
4476 Remove trailing empty line.
4477 * data/lalr1-fusion.cc: Don't add an empty line after the user's
4478 epilogue.
4479
4480 2008-11-04 Akim Demaille <demaille@gostai.com>
4481
4482 Fix output of copyright years.
4483 * data/bison.m4 (b4_copyright): Fix the indentation of the
4484 copyright year paragraph.
4485 Use b4_copyright_years when no years are given.
4486 * data/lalr1.cc, data/lalr1-fusion.cc, data/location.cc
4487 (b4_copyright_years): New.
4488 Use it.
4489
4490 2008-11-04 Akim Demaille <demaille@gostai.com>
4491
4492 Avoid the spurious initial empty line.
4493 * data/lalr1-fusion.cc, data/location.cc: Put a trailing "@" at
4494 the end of @output request to suppress the empty line that
4495 results.
4496
4497 2008-11-04 Akim Demaille <demaille@gostai.com>
4498
4499 Remove parser::rhs_number_type.
4500 * data/lalr1-fusion.cc (rhs_number_type): No longer define it.
4501 (yyrhs_): Use b4_table_define.
4502
4503 2008-11-04 Akim Demaille <demaille@gostai.com>
4504
4505 Fix iteration type.
4506 * data/lalr1-fusion.cc: Use an int to iterate up to an int.
4507
4508 2008-11-04 Akim Demaille <demaille@gostai.com>
4509
4510 Factor the declaration of the integer tables.
4511 * data/lalr1-fusion.cc (b4_table_define): New.
4512 Use it.
4513
4514 2008-11-03 Akim Demaille <demaille@gostai.com>
4515
4516 Fix indentation of tables in lalr1.cc
4517 * data/lalr1-fusion.cc: Fix the indentation.
4518
4519 2008-11-03 Akim Demaille <demaille@gostai.com>
4520
4521 Destroy the lhs symbols after reduction.
4522 * data/lalr1-fusion.cc (parse): After the user action, when in
4523 variant mode, destroy the lhs symbols.
4524
4525 2008-11-03 Akim Demaille <demaille@gostai.com>
4526
4527 Simplify yysyntax_error_ use.
4528 * data/lalr1-fusion.cc (yysyntax_error_): Always pass it the token
4529 type, but make it unnamed in the declaration when it is not used.
4530
4531 2008-11-03 Akim Demaille <demaille@gostai.com>
4532
4533 Let yy::variant::build return an lvalue.
4534 * data/lalr1-fusion.cc (variant::build): Return a reference to the
4535 object.
4536
4537 2008-11-03 Akim Demaille <demaille@gostai.com>
4538
4539 Define yy::variant only when needed.
4540 * data/lalr1-fusion.cc (yy::variant): Define only if variants are
4541 used.
4542
4543 2008-11-03 Akim Demaille <demaille@gostai.com>
4544
4545 Bench the three-stack lalr1.cc.
4546 * etc/bench.pl.in: Bench the three-stack lalr1.cc vs. the
4547 one-stack one.
4548
4549 2008-11-03 Akim Demaille <demaille@gostai.com>
4550
4551 Fail on parse error in calc++.
4552 * doc/bison.texinfo (calc++.cc): Propagate failures to the exit
4553 status.
4554 * examples/calc++/test ($me, $number, $exit, run): New.
4555 Use them to propagate errors to the exit status.
4556
4557 2008-11-03 Akim Demaille <demaille@gostai.com>
4558
4559 Don't specify the skeleton twice in the example.
4560 * examples/calc++/Makefile.am: Don't pass -S to Bison, the grammar
4561 file does what is needed.
4562
4563 2008-11-03 Akim Demaille <demaille@gostai.com>
4564
4565 bench: Improve output.
4566 * etc/bench.pl.in (bench_grammar): Tune the printf format.
4567
4568 2008-11-03 Akim Demaille <demaille@gostai.com>
4569
4570 bench: check impact of %debug on variants.
4571 * etc/bench.pl.in (variant_grammar): Fix the computation of
4572 $variant.
4573 Generate a grammar file that can work with or without %debug.
4574 Do use the @directive.
4575 (bench_variant_parser): Check impact of %debug.
4576 (@directives): Rename all the occurrences to...
4577 (@directive): this, for consistency.
4578
4579 2008-11-03 Akim Demaille <demaille@gostai.com>
4580
4581 bench: report the size too.
4582 * etc/bench.pl.in ($iterations): Defaults to -3.
4583 (&bench_grammar): Require hireswallclock.
4584 Compute and display the size of the result.
4585 More comments.
4586
4587 2008-11-03 Akim Demaille <demaille@gostai.com>
4588
4589 bench: More use of the verbosity level.
4590 * etc/bench.pl.in ($verbose, &verbose): New.
4591 Use them.
4592 More POD documentation.
4593
4594 2008-11-03 Akim Demaille <demaille@gostai.com>
4595
4596 bench.pl: a command line interface
4597 * etc/bench.pl.in: More doc.
4598 Some fixes in the documentation.
4599 ($cflags, $iterations, &help, &getopt): New.
4600 Use them.
4601 (&variant_grammar): Let the number of stages be 10 times what is
4602 specified.
4603
4604 2008-11-03 Akim Demaille <demaille@gostai.com>
4605
4606 Bench the use of Boost.Variants.
4607 * etc/bench.pl.in ($cxx, &variant_grammar, &bench_variant_parser):
4608 New.
4609 (&compile): Be ready to compile C++ parsers.
4610 (&bench_push_parser): Move debug information to the outermost
4611 level.
4612 * THANKS: Add Michiel De Wilde.
4613
4614 2008-11-03 Akim Demaille <demaille@gostai.com>
4615
4616 bench.pl: Pass directives as a list instead of as a string.
4617 * etc/bench.pl.in (&directives): New.
4618 (&triangular_grammar, &calc_grammar): Use it to format the Bison
4619 directives.
4620 (&triangular_grammar): Do use the directives (were ignored).
4621 (&bench_grammar, &bench_push_parser): Adjust to pass lists of
4622 directives.
4623
4624 2008-11-03 Akim Demaille <demaille@gostai.com>
4625
4626 Improve genericity of bench.pl.
4627 * etc/bench.pl.in (&bench_grammar): Take the set of benches as
4628 argument.
4629 (&bench_push_parser): New.
4630 Call it.
4631
4632 2008-11-03 Akim Demaille <demaille@gostai.com>
4633
4634 Add documentation to bench.pl.
4635 * etc/bench.pl.in: Comment changes.
4636
4637 2008-11-03 Akim Demaille <demaille@gostai.com>
4638
4639 Fuse the three stacks into a single one.
4640
4641 In order to make it easy to perform benchmarks to ensure that
4642 there are no performance loss, lalr1.cc is forked into
4643 lalr1-fusion.cc. Eventually, lalr1-fusion.cc will replace
4644 lalr1.cc.
4645
4646 Meanwhile, to make sure that lalr1-fusion.cc is correctly
4647 exercized by the test suite, the user must install a symbolic link
4648 from lalr1.cc to it.
4649
4650 Instead of having three stacks (state, value, location), use a
4651 stack of triples. This considerably simplifies the code (and it
4652 will be easier not to require locations as currently does the C++
4653 parser), and also gives a 10% speedup according to
4654 etc/bench (probably mainly since memory allocation is done once
4655 instead of three times).
4656
4657 Another motivation is to make it easier to destruct properly
4658 semantic values: now that they are bound to their state (hence
4659 symbol type) it will be easier to call the appropriate destructor.
4660
4661 These changes should probably benefit the C parser too.
4662
4663 * data/lalr1.cc: Copy as...
4664 * data/lalr1-fusion.cc: this new file.
4665 (b4_rhs_value, b4_rhs_location): New definitions overriding those
4666 from c++.m4.
4667 (state_stack_type, semantic_stack_type, location_stack_type)
4668 (yystate_stack_, yysemantic_stack_, yylocation_stack_): Remove.
4669 (data_type, stack_type, yystack_): New.
4670 (YYLLOC_DEFAULT, yypush_): Adjust.
4671 (yyerror_range): Now based on data_type, not location_type.
4672
4673 2008-11-03 Akim Demaille <demaille@gostai.com>
4674
4675 Push the state, value, and location at the same time.
4676 This is needed to prepare a forthcoming patch that fuses the three
4677 stacks into one.
4678
4679 * data/lalr1.cc (parser::yypush_): New.
4680 (parser::yynewstate): Change the semantics: instead of arriving to
4681 this label when value and location have been pushed, but yystate
4682 is to be pushed on the state stack, now the three of them must
4683 have been pushed before. yystate still must be the new state.
4684 This allows to use yypush_ everywhere instead of individual
4685 handling of the stacks.
4686
4687 2008-11-03 Akim Demaille <demaille@gostai.com>
4688
4689 Prefer references to pointers.
4690 * data/lalr1.cc (b4_symbol_actions): New, overrides the default C
4691 definition to use references instead of pointers.
4692 (yy_symbol_value_print_, yy_symbol_print_, yydestruct_):
4693 Take the value and location as references.
4694 Adjust callers.
4695
4696 2008-11-03 Akim Demaille <demaille@gostai.com>
4697
4698 stack::size instead of stack::height.
4699 * data/lalr1.cc (stack::height): Rename as...
4700 (stack::size): this.
4701 Fix the output type.
4702 Comment changes.
4703
4704 2008-11-03 Akim Demaille <demaille@gostai.com>
4705
4706 Use variants to support objects as semantic values.
4707 This patch was inspired by work by Michiel De Wilde. But he used
4708 Boost variants which (i) requires Boost on the user side, (ii) is
4709 slow, and (iii) has useless overhead (the parser knows the type of
4710 the semantic value there is no reason to duplicate this
4711 information as Boost.Variants do).
4712
4713 This implementation reserves a buffer large enough to store the
4714 largest objects. yy::variant implements this buffer. It was
4715 implemented with Quentin Hocquet.
4716
4717 * src/output.c (type_names_output): New.
4718 (output_skeleton): Invoke it.
4719 * data/c++.m4 (b4_variant_if): New.
4720 (b4_symbol_value): If needed, provide a definition for variants.
4721 * data/lalr1.cc (b4_symbol_value, b4_symbol_action_)
4722 (b4_symbol_variant, _b4_char_sizeof_counter, _b4_char_sizeof_dummy)
4723 (b4_char_sizeof, yy::variant): New.
4724 (parser::parse): If variants are requested, define
4725 parser::union_type, parser::variant, change the definition of
4726 semantic_type, construct $$ before running the user action instead
4727 of performing a default $$ = $1.
4728 * examples/variant.yy: New.
4729 Based on an example by Michiel De Wilde.
4730
4731 2008-11-03 Akim Demaille <demaille@gostai.com>
4732
4733 Parameterize the extraction of semantic values.
4734 To make future changes easier, no longer rely on ".TYPE" being the
4735 way to get a semantic value.
4736
4737 * data/c.m4 (b4_symbol_value): New.
4738 Use it.
4739 * data/c++.m4, data/yacc.c: Use it.
4740 * data/glr.c: Use b4_symbol_value.
4741 (b4_rhs_data): New.
4742 Use it.
4743
4744 2008-11-03 Akim Demaille <demaille@gostai.com>
4745
4746 Prepare easier M4 changes.
4747 * data/lalr1.cc: Use escaped [] instead of literals to prepare
4748 future changes.
4749
4750 2008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
4751
4752 Initiate further development.
4753 * NEWS: Create an empty section for new entries.
4754 * gnulib: Update submodule to HEAD.
4755
4756 2008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
4757
4758 * NEWS: Version 2.4.
4759
4760 2008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
4761
4762 Prepare for next release.
4763 * NEWS: Briefly mention changes since 2.3b.
4764 * README: Say GNU m4 1.4.6, which we've been requiring in release
4765 announcements already, not 1.4.3, which breaks the build.
4766
4767 2008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
4768
4769 Say %language is experimental.
4770 We're thinking of extending it's effect on output file naming. See the
4771 thread at
4772 <http://lists.gnu.org/archive/html/bison-patches/2008-10/msg00003.html>.
4773 * NEWS: Say it's experimental.
4774 * doc/bison.texinfo (Decl Summary): Say it's experimental, and so don't
4775 recommend it over %skeleton for now.
4776 (Bison Options): Likewise.
4777 (C++ Bison Interface): Use %skeleton not %language.
4778 (Calc++ Parser): Use %skeleton not %language.
4779 * src/getargs.c (usage): Say it's experimental.
4780
4781 2008-11-01 Di-an Jan <dianj@freeshell.org>
4782 Paolo Bonzini <bonzini@gnu.org>
4783
4784 Support all Java parser class modifiers.
4785 * data/java.m4 (b4_percent_define_get3): New.
4786 (b4_final_if, b4_strictfp_if): New.
4787 * data/lalr1.java (final, strictfp, extends, implements): Support.
4788 * doc/bison.texinfo (final, strictfp, extends, implements): Add
4789 documentation.
4790 * tests/java.at (AT_CHECK_JAVA_MINIMAL): New.
4791 (AT_CHECK_JAVA_MINIMAL_W_LEXER): New.
4792 (AT_CHECK_JAVA_GREP): New.
4793 (Java parser class modifiers): New test.
4794 (Java parser class extends and implements): New test.
4795
4796 Model exception propagation better with throws and lex_throws.
4797 * data/java.m4 (b4_list2): New.
4798 (throws): Change default.
4799 * data/lalr1.java (yyaction): Add throws.
4800 (parse): Add lex_throws in addition to throws.
4801 * doc/bison.texinfo (throws, lex_throws): Add documentation.
4802 * tests/java.at (Java throws specifications): New test.
4803
4804 Improve documentation for Java parsers.
4805 * doc/bison.texinfo (Java Parsers): Add subsections.
4806 Don't quote first argument of %define.
4807 (Java Bison Interface): Document output files. Move documentation
4808 of parser class and merge into Java Parser Interface. Document
4809 features that error out. Document directives with no effect.
4810 Move note about Javadoc higher.
4811 (Java Semantic Values): Explicitly mention stype.
4812 Document that generic types cannot be used.
4813 (Java Location Values): Use @deftypeivar. Document constructors.
4814 Correct return value for toString.
4815 (Java Parser Interface): List undocumented constants/fields.
4816 Move documentation of fields added by %parse-param closer to list
4817 of members. Document that token names are added as fields.
4818 Document constructors accurately. Remove error method.
4819 (Java Scanner Interface): Move note on %pure-parser to Java Bison
4820 Interface. Describe %code lexer and yylex accutately.
4821 Remove documentation that does not match the code.
4822 (Java Action Features): New.
4823 (Java Differences): Add reference. Add item on semantic values.
4824 Add note about @{ ... @}. Clarify %% epilogue placement.
4825 (Java Declarations Summary): New.
4826
4827 Fix Java skeleton.
4828 * data/java.m4 (b4_prefix): Correct quoting for m4_define_default.
4829 (b4_remove_comma): Quote test argument.
4830 (b4_identification): Remove "bison" field.
4831 * tests/java.at (Java parser class and package names): New test.
4832 (Java %parse-param and %lex-param): New test.
4833 (Java stype, position_class and location_class): New test.
4834
4835 2008-10-31 Di-an Jan <dianj@freeshell.org>
4836
4837 * data/lalr1.jave: Update copyright years.
4838 (YYParser): Correct name of "generated from" file in Javadoc:
4839 use b4_file_name instead of @ofile@.
4840 (Location constructor): Correct Javadoc parameter name.
4841 (yylloc): Add missing opening m4 quote after b4_location_if.
4842 This removes a stray [ in the Javadoc of Lexer.getStartPos.
4843 (Lexer.yyerror): Fix incorrect m4 and Javadoc.
4844 (YYParser constructor): Correct Javadoc parameter name.
4845
4846 2008-10-30 Joel E. Denny <jdenny@ces.clemson.edu>
4847
4848 Always put auxiliary code files in the same dir as other output files.
4849 * src/files.c (compute_file_name_parts): When the user specifies
4850 --output but not --file-prefix, extract the directory prefix from the
4851 file prefix not from the grammar file name. This affects the location
4852 of files like location.hh generated by the C++ skeleton. The includes
4853 in the other output files require this fix.
4854 * tests/output.at (AT_CHECK_OUTPUT): Automatically create directories
4855 for expected output files.
4856 (Output files): Add a test for the above.
4857
4858 2008-10-29 Joel E. Denny <jdenny@ces.clemson.edu>
4859
4860 * gnulib: Update submodule to HEAD.
4861
4862 2008-10-28 Joel E. Denny <jdenny@ces.clemson.edu>
4863
4864 Update copyright year.
4865 * src/files.c: Here.
4866
4867 2008-10-28 Di-an Jan <dianj@freeshell.org> (tiny change)
4868
4869 Don't overwrite the input file.
4870 * src/files.c (output_file_name_check): Fatal error if using input file
4871 for output.
4872 * tests/output.at: (AT_CHECK_CONFLICTING_OUTPUT): Add return status
4873 argument.
4874 (Conflicting output files): Add test.
4875
4876 2008-10-28 Akim Demaille <demaille@gostai.com>
4877
4878 Space changes.
4879 * data/lalr1.cc: Formatting changes.
4880
4881 2008-10-28 Akim Demaille <demaille@gostai.com>
4882
4883 Don't define debugging functions when !YYDEBUG.
4884 * data/lalr1.cc (debug_stream, set_debug_stream)
4885 (debug_level_type, debug_level, set_debug_level): Don't
4886 declare them when YYDEBUG is not defined.
4887 The implementation are already YYDEBUG-aware.
4888
4889 2008-10-28 Akim Demaille <demaille@gostai.com>
4890
4891 Prefer "continue" for empty loop bodies.
4892 * etc/bench.pl.in: Use "continue" instead of {}.
4893
4894 2008-10-28 Akim Demaille <demaille@gostai.com>
4895
4896 Space and comments changes.
4897 * data/c++.m4, data/glr.c, data/lalr1.cc: Copyright year changes.
4898 * data/c.m4, data/lalr1.cc: Space changes.
4899
4900 2008-10-28 Akim Demaille <demaille@gostai.com>
4901
4902 Make gnulib a submodule.
4903 * gnulib: New.
4904 * .gitmodules (gnulib): New.
4905
4906 2008-10-18 Joel E. Denny <jdenny@ces.clemson.edu>
4907
4908 Fix yyerror_range for user-defined location type in C++. Reported by
4909 Georg Sauthoff at
4910 <http://lists.gnu.org/archive/html/bug-bison/2008-08/msg00008.html>.
4911 * data/lalr1.cc (parse): Change type of yyerror_range to location_type.
4912 * THANKS (Georg Sauthoff): Add.
4913
4914 2008-10-18 Joel E. Denny <jdenny@ces.clemson.edu>
4915
4916 Update several administrative files mainly to facilitate releasing.
4917 * HACKING (Administrivia): Make the git-merge-changelog notes more
4918 helpful.
4919 (Test suite): Don't say lalr1.cc is not exercised in the test suite.
4920 (Release Procedure): Update for git and add numerous details that were
4921 previously missing.
4922 * Makefile.am (EXTRA_DIST): Remove Makefile.cfg and Makefile.maint.
4923 * maint.mk (announcement): Don't list bison as a bootstrap tool so
4924 that announcements don't claim we bootstrapped with whatever bison
4925 happened to be in PATH. Add flex as a bootstrap tool.
4926 * Makefile.maint: Remove, previously replaced by maint.mk.
4927 * Makefile.cfg: Remove, and migrate settings to...
4928 * cfg.mk: ... here for the sake of `make announcement'.
4929 * bootstrap.conf (gnulib_modules): Add announce-gen.
4930 * README: Say GNU Bison instead of just Bison. Suggested by Karl
4931 Berry.
4932
4933 2008-10-08 Di-an Jan <dianj@freeshell.org> (tiny change)
4934
4935 Small but important bugfixes for the Java skeleton.
4936 * data/lalr1.java (yyerror): Change Location to b4_location_type.
4937 (yy_symbol_print): Call toString on yyvaluep.
4938
4939 2008-08-29 Akim Demaille <demaille@gostai.com>
4940
4941 Clarify UPDATED use.
4942 * doc/bison.texinfo: It refers to the last edition of this file,
4943 not to the release date of Bison.
4944 Reported by Joel E. Denny.
4945
4946 2008-08-29 Akim Demaille <demaille@gostai.com>
4947
4948 * README: Update FAQ pointer.
4949 Reported by Joel E. Denny.
4950
4951 2008-08-27 Eric Blake <ebb9@byu.net>
4952
4953 Resync m4sugar from autoconf.
4954 * data/m4sugar/m4sugar.m4 (m4_defn, m4_popdef, m4_undefine)
4955 (m4_init): Adjust to latest m4.git changes.
4956 (m4_mapall_sep, _m4_list_cmp, m4_version_compare): Reduce side
4957 effects.
4958 * data/m4sugar/foreach.m4 (_m4_shiftn): Fix off-by-one bug.
4959 (_m4_list_cmp): Reduce side effects.
4960
4961 2008-08-27 Akim Demaille <demaille@gostai.com>
4962
4963 Check yyerrok in calc.at.
4964 * tests/calc.at (calc.y): Use yyerrok on "( error )".
4965 (AT_CHECK_CALC): Add a check that ensures that yyerrok works as
4966 expected.
4967
4968 2008-08-27 Akim Demaille <demaille@gostai.com>
4969
4970 Support yyerrok in lalr1.cc.
4971 YYBACKUP is still to import back into lalr1.cc.
4972 * data/lalr1.cc (yyerrork, yyclearin, YYRECOVERING): Define.
4973
4974 2008-08-26 Joel E. Denny <jdenny@ces.clemson.edu>
4975
4976 For maintainer-check*, don't recompile for a $(VERSION) update.
4977 * cfg.mk: New file.
4978 (_is-dist-target): Override the one in GNUmakefile.
4979 * Makefile.am (EXTRA_DIST): Add cfg.mk.
4980
4981 2008-08-26 Joel E. Denny <jdenny@ces.clemson.edu>
4982
4983 Update for recent change to gnulib.
4984 * src/parse-gram.y: Don't include strverscmp.h. It comes from
4985 string.h now.
4986
4987 2008-08-15 Eric Blake <ebb9@byu.net>
4988
4989 Remaining m4sugar merge from autoconf.
4990 * data/m4sugar/m4sugar.m4: Copy entire file from autoconf.
4991 * data/m4sugar/foreach.m4: New file, copied from autoconf.
4992 * data/Makefile.am (dist_m4sugar_DATA): Distribute it.
4993 * src/output.c (output_skeleton): Tell m4 how to find it.
4994
4995 Partial m4sugar merge from autoconf: m4_map.
4996 * data/m4sugar/m4sugar.m4 (m4_fst): Delete.
4997 (m4_map, m4_map_sep, _m4_map): Rewrite more efficiently.
4998 (m4_apply, _m4_apply, m4_mapall, m4_mapall_sep): New macros.
4999 * data/java.m4 (b4_token_enums): Use more efficient short-circuit
5000 for empty list.
5001 * data/c.m4 (b4_token_defines, b4_token_enums, b4_c_ansi_formals):
5002 Likewise.
5003 (b4_parse_param_for): Avoid m4_fst, now that autoconf no longer
5004 declares it.
5005
5006 2008-08-07 Joel E. Denny <jdenny@ces.clemson.edu>
5007
5008 Keep .version and PACKAGE_VERSION in sync.
5009 * Makefile.am ($(top_srcdir)/.version): Declare configure as a
5010 dependency, and add comments justifying this in more detail. Discussed
5011 starting at
5012 <http://lists.gnu.org/archive/html/bison-patches/2008-07/msg00022.html>.
5013
5014 2008-08-06 Eric Blake <ebb9@byu.net>
5015
5016 Partial m4sugar merge from autoconf: m4_shiftn.
5017 * data/m4sugar/m4sugar.m4 (m4_shiftn): Faster implementation.
5018 (m4_shift2, m4_shift3): New macros.
5019 (m4_case, m4_bmatch, m4_bpatsubsts, m4_join): Adjust clients.
5020 * data/c.m4 (b4_c_function_def, b4_c_ansi_function_def)
5021 (b4_c_ansi_function_decl, b4_c_function_call): Likewise.
5022 * data/java.m4 (b4_remove_comma): Likewise.
5023
5024 Partial m4sugar merge from autoconf: m4_wrap vs. m4 1.6.
5025 * data/m4sugar/m4sugar.m4 (m4_unquote, m4_wrap_lifo): New macros.
5026 (m4_wrap): Guarantee FIFO order, in spite of m4 1.6.
5027 (m4_init): Consolidate wrapped text into single m4_wrap.
5028 * data/bison.m4 (b4_check_user_names_wrap): Stick with LIFO order
5029 in wrapped text.
5030
5031 2008-08-05 Eric Blake <ebb9@byu.net>
5032
5033 Partial m4sugar merge from autoconf: builtins, version.m4.
5034 * data/m4sugar/m4sugar.m4 (changeword): Nuke.
5035 (m4_prepend): Remove, as it is unused and inherently quadratic,
5036 whereas m4_append is linear in newer m4.
5037 (m4_mkstemp): New builtin.
5038 (m4_symbols): Make rename conditional.
5039 (m4_version_prereq): Ensure fatal error if used in bison, which
5040 intentionally lacks version.m4.
5041
5042 Fix comments in m4sugar.
5043 * data/m4sugar/m4sugar.m4: Comment changes, borrowed from autoconf.
5044
5045 2008-08-02 Joel E. Denny <jdenny@ces.clemson.edu>
5046
5047 Update for recent .gitignore fix in Gnulib.
5048 * bootstrap: Back out 2008-07-18 hack now that gnulib-tool creates
5049 anchored .gitignore entries.
5050
5051 2008-08-02 Joel E. Denny <jdenny@ces.clemson.edu>
5052
5053 Set gnu or gnits strictness.
5054 * configure.ac (AM_INIT_AUTOMAKE): Set gnu strictness during
5055 development and gnits strictness for releases. Based on Eric Blake's
5056 suggestion at
5057 <http://lists.gnu.org/archive/html/bug-bison/2008-07/msg00019.html>.
5058
5059 2008-07-31 Paolo Bonzini <bonzini@gnu.org>
5060
5061 * NEWS: Clarify documentation of %language.
5062
5063 2008-07-31 Paolo Bonzini <bonzini@gnu.org>
5064
5065 Support usage of git-merge-changelog.
5066 * .gitattributes: New.
5067 * HACKING: Document usage of git-merge-changelog.
5068 * bootstrap: Install git-merge-changelog entries in .git/config
5069 if appropriate.
5070
5071 2008-07-27 Joel E. Denny <jdenny@ces.clemson.edu>
5072
5073 Remove remaining dependence on CVS Id keyword.
5074 * ChangeLog: For the sake of people still using CVS, don't use dollars
5075 when mentioning Id.
5076 * data/xslt/bison.xsl: Remove Id from header comments, where it was
5077 unusual anyway.
5078 * data/xslt/xml2dot.xsl: Likewise.
5079 * data/xslt/xml2text.xsl: Likewise.
5080 * data/xslt/xml2xhtml.xsl: Likewise.
5081 * doc/Doxyfile.in (PROJECT_NUMBER): Don't use ID.
5082 * doc/Makefile.am (neutralize): Remove, no longer needed.
5083 (.x.1): Don't use neutralize.
5084 (edit): Don't substitute for ID.
5085 (Doxyfile): Don't define Id, and thus don't depend on ChangeLog.
5086
5087 2008-07-27 Joel E. Denny <jdenny@ces.clemson.edu>
5088
5089 Fix dependence on computed configure variables.
5090 * doc/Makefile.am (common_dep): Depend on $(top_srcdir)/configure not
5091 $(top_srcdir)/configure.ac so that changes to computed variables, such
5092 as PACKAGE_VERSION, are seen.
5093 * tests/Makefile.am ($(srcdir)/package.m4): Likewise.
5094
5095 2008-07-20 Joel E. Denny <jdenny@ces.clemson.edu>
5096
5097 Update copyright dates for recent changes.
5098 * Makefile.am: Here.
5099 * src/Makefile.am: Here.
5100 * src/reduce.c: Here.
5101 * tests/reduce.at: Here.
5102
5103 2008-07-18 Joel E. Denny <jdenny@ces.clemson.edu>
5104
5105 Use git-version-gen for version names between releases.
5106 * .cvsignore (.tarball-version, GNUmakefile, *~): Add.
5107 * .gitignore (/.tarball-version, /GNUmakefile, /*~): Add.
5108 * .prev-version: New.
5109 * .version.in: Remove.
5110 * ChangeLog: Remove the Id previously used for capturing the CVS
5111 revision.
5112 * GNUmakefile: Remove, now copied from Gnulib.
5113 * Makefile.am: Add code suggested by comments in
5114 build-aux/git-version-gen.
5115 (EXTRA_DIST): Remove GNUmakefile, handled by Gnulib. Add maint.mk,
5116 .prev-version, and .version.
5117 * NEWS (2.3b+): Rename to...
5118 (?.?): ... this because we're dropping the "+" version naming scheme,
5119 but, in general, we still can't be sure of our next release name.
5120 * bootstrap: Add a quick hack to remove from .gitignore the
5121 GNUmakefile entry that gnulib adds. We already have a /GNUmakefile
5122 entry. This should really be fixed in gnulib instead.
5123 * bootstrap.conf (gnulib_modules): Add gnumakefile.
5124 * configure.ac (AC_INIT): Set version name by invoking
5125 build-aux/git-version-gen.
5126 (AC_CONFIG_FILES): Remove .version, now generated by
5127 build-aux/git-version-gen.
5128 * maint.mk: New, copied from coreutils.
5129 * doc/.cvsignore (bison.1): Add.
5130 * doc/.gitignore (/bison.1): Add.
5131 * doc/bison.1: Remove, generated.
5132 * src/.cvsignore (revision.c): Remove.
5133 * src/.gitignore (/revision.c): Remove.
5134 * src/Makefile.am (bison_SOURCES): Remove revision.c and revision.h.
5135 (BUILT_SOURCES): Remove revision.c.
5136 (revision.c): Remove.
5137 * src/getargs.c (version): Don't print revision after the VERSION.
5138 * src/revision.h: Remove.
5139
5140 2008-07-16 Joel E. Denny <jdenny@ces.clemson.edu>
5141
5142 Fix untranslatable composition of sentences. Reported by Goran
5143 Uddeborg at
5144 <http://lists.gnu.org/archive/html/bug-bison/2008-06/msg00000.html>.
5145 * THANKS (Goran Uddeborg): Add.
5146 * src/reduce.c (reduce_print): Report the number of nonterminals and
5147 rules useless in the grammar in separate sentences.
5148 * tests/reduce.at (Useless Rules): Update output.
5149 (Reduced Automaton): Likewise.
5150 (Underivable Rules): Likewise.
5151 (Empty Language): Likewise.
5152
5153 2008-07-15 Joel E. Denny <jdenny@ces.clemson.edu>
5154
5155 Fix some .gitignore and .cvsignore problems.
5156 * bootstrap (insert_sorted_if_absent): Replace all uses with...
5157 (insert_vc_ignore): ... this new function, which prepends `/' to all
5158 .gitignore entries before passing them to insert_sorted_if_absent.
5159 * bootstrap.conf (vc_ignore): Set to '.cvsignore .gitignore' so that
5160 .cvsignore files are maintained even though Bison developers run
5161 bootstrap while using Git.
5162 * .cvsignore (*.patch *.log log patches applied): Remove, apparently
5163 unneeded by Bison.
5164 (gnulib): Add.
5165 * .gitignore (/*.patch *.log log patches applied): Remove, broken and
5166 unneeded. Reported by Eric Blake.
5167 * lib/.gitignore (/*~): Add.
5168 * po/.cvsignore, runtime-po/.cvsignore: Sync with .gitignore.
5169 * examples/calc++/.gitignore (/calc++.exe): Add. Reported by Eric
5170 Blake.
5171 * src/.gitignore (/bison.exe): Add. Reported by Eric Blake.
5172
5173 2008-07-15 Joel E. Denny <jdenny@ces.clemson.edu>
5174
5175 Improve forward-compatibility with GNU M4. Reported by Eric Blake at
5176 <http://lists.gnu.org/archive/html/bug-bison/2008-07/msg00000.html>.
5177 * bootstrap.conf (gnulib_modules): Add unsetenv.
5178 * lib/.gitignore, lib/.cvsignore (/unsetenv.c): Add.
5179 * m4/.gitignore, m4/.cvsignore (/environ.m4): Add.
5180 (/setenv.m4): Add.
5181 * src/output.c (output_skeleton): For the m4 invocation, pass -dV as
5182 the first argument because it may become position-dependent, and unset
5183 POSIXLY_CORRECT so Bison's skeletons have access to GNU M4 extensions.
5184 Add comments explaining these issues in more detail.
5185
5186 2008-07-14 Joel E. Denny <jdenny@ces.clemson.edu>
5187
5188 Add .gitignore everywhere based on .cvsignore.
5189 * .gitignore: New.
5190 * build-aux/.gitignore: New.
5191 * data/.gitignore: New.
5192 * doc/.gitignore: New.
5193 * etc/.gitignore: New.
5194 * examples/.gitignore: New.
5195 * examples/calc++/.gitignore: New.
5196 * lib/.gitignore: New.
5197 * m4/.gitignore: New.
5198 * po/.gitignore: New.
5199 * runtime-po/.gitignore: New.
5200 * src/.gitignore: New.
5201 * tests/.gitignore: New.
5202
5203 2008-05-27 Joel E. Denny <jdenny@ces.clemson.edu>
5204
5205 * NEWS (2.3b+): New section, empty for now.
5206 * configure.ac (AC_INIT): 2.3b -> 2.3b+.
5207
5208 2008-05-27 Joel E. Denny <jdenny@ces.clemson.edu>
5209
5210 * NEWS (2.3b): Update release date since there has been a delay in
5211 getting the announcements and tarballs out.
5212
5213 2008-05-23 Joel E. Denny <jdenny@ces.clemson.edu>
5214
5215 * NEWS: Version 2.3b.
5216 * configure.ac (AC_INIT): Likewise.
5217 (PACKAGE_COPYRIGHT_YEAR): Update to 2008.
5218
5219 2008-05-23 Joel E. Denny <jdenny@ces.clemson.edu>
5220
5221 * HACKING: Don't say don't mention HACKING in the ChangeLog. We've
5222 been doing it for years.
5223 (Test suite): Mention maintainer-push-check and maintainer-xml-check.
5224 (Release Procedure): Add FIXME about make alpha being unmaintained.
5225
5226 2008-05-13 Joel E. Denny <jdenny@ces.clemson.edu>
5227
5228 * data/yacc.c: Reformat m4 a little for readability.
5229 * src/lalr.c (build_relations): Correct comment.
5230
5231 2008-05-12 Juan Manuel Guerrero <juan.guerrero@gmx.de>
5232
5233 DJGPP specific issue.
5234 * djgpp/config.sed: Fixes required to run configure scripts generated
5235 by autoconf 2.62.
5236
5237 2008-05-07 Joel E. Denny <jdenny@ces.clemson.edu>
5238
5239 * HACKING (Release Procedure): translation@iro.umontreal.ca is now
5240 coordinator@translationproject.org.
5241
5242 2008-05-06 Joel E. Denny <jdenny@ces.clemson.edu>
5243
5244 * THANKS: Add Eric Blake.
5245
5246 2008-04-23 Eric Blake <ebb9@byu.net>
5247
5248 Revert prior patch, by working around autoconf regression.
5249 * tests/output.at (m4_expand): Add workaround for autoconf 2.62.
5250 ("Output file name: ("): Uncomment test.
5251 ("Output file name: )"): Likewise.
5252 Based on an idea from Noah Misch.
5253
5254 2008-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
5255
5256 Work-around an Autoconf 2.62 AT_SETUP bug that was not present in
5257 2.61. Reported by Juan Manuel Guerrero at
5258 <http://lists.gnu.org/archive/html/bug-bison/2008-04/msg00011.html>.
5259 * tests/output.at ("Output file name: ("): Comment out test case for
5260 now.
5261 ("Output file name: )"): Likewise.
5262
5263 2008-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
5264
5265 * GNUmakefile: Update git-version-gen invocation so make dist
5266 succeeds.
5267
5268 2008-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
5269
5270 Update to the current gnulib CVS repository, and fix trigraph handling
5271 in Bison.
5272 * bootstrap: Update gnulib CVS repository URL.
5273 (symlink_to_dir): Encapsulate the code that guarantees the destination
5274 directory exists into...
5275 (check_dst_dir): ... this new function, and...
5276 (cp_mark_as_generated): ... reuse it here so that bootstrap doesn't
5277 fail when copying files into lib/uniwidth/.
5278 * src/output.c (prepare_symbols): When writing yytname muscles, where
5279 symbol names will be encoded in C-string literals, tell quotearg to
5280 escape trigraphs. This used to be the default in gnulib.
5281 * tests/regression.at (Token definitions): Because of the change in
5282 gnulib's quotearg behavior, string_as_id in parse-gram.y no longer
5283 escapes trigraphs in symbol names. Thus, yytname no longer has
5284 trigraphs unnecessarily doubly escaped. Update test case output.
5285 Extend test case to be sure Bison's own error messages will no longer
5286 have trigraphs in symbol names unnecessarily escaped once.
5287
5288 2008-04-20 Joel E. Denny <jdenny@ces.clemson.edu>
5289
5290 Fix make dist infinite loop reported by Juan Manuel Guerrero at
5291 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00009.html>.
5292 * .cvsignore: Add .version.
5293 * .version.in: New.
5294 * bootstrap.conf (gnulib_modules): Add git-version-gen.
5295 * configure.ac (AC_CONFIG_FILES): Add .version.
5296 * build-aux/.cvsignore: Add git-version-gen.
5297
5298 2008-03-08 Joel E. Denny <jdenny@ces.clemson.edu>
5299
5300 * NEWS (2.3a+): Mention that -g now takes an argument.
5301 * doc/bison.texinfo (Bison Options): Reword -W entry a little for
5302 consistency. Update the -g and -x entries now that they take
5303 arguments. Use brackets to indicate optional arguments.
5304 * src/getargs.c (usage): Explain the relationship between arguments of
5305 long and short options more completely. Document --defines and -d
5306 separately since the former takes an argument but, for POSIX Yacc, the
5307 latter does not.
5308 (short_options): Let -W take an optional argument like --warnings.
5309 (getargs): Sort cases.
5310
5311 2008-02-28 Akim Demaille <demaille@gostai.com>
5312
5313 * doc/bison.texinfo: Fix a few typos.
5314
5315 2008-02-28 Akim Demaille <akim@epita.fr>
5316
5317 * doc/bison.texinfo (Bison Options): Document -W.
5318 Based on Joel E. Denny's NEWS entry, and Automake's documentation.
5319
5320 2008-02-28 Akim Demaille <akim@epita.fr>
5321
5322 * src/getargs.c (short_options): Split and sort for readability.
5323 -g and -x take optional arguments, just like their long options.
5324 * build-aux/cross-options.pl: Use /x to make the regexp easier to
5325 understand.
5326 Fix the handling of $opt which resulted in all the argument to be
5327 considered as optional.
5328
5329 2008-02-22 Joel E. Denny <jdenny@ces.clemson.edu>
5330
5331 * NEWS (2.3a+): Don't say %language is experimental. Mention Java and
5332 say its interface is experimental.
5333 * doc/bison.texinfo (Decl Summary): In the %language entry, mention
5334 Java.
5335 (Bison Options): In the -L and --language entry, mention Java.
5336 (Java Bison Interface): Say the interface is experimental.
5337 * src/getargs.c (usage): Mention -L and --language.
5338
5339 * NEWS (2.3a+): Say the push parsing interface is experimental.
5340 * doc/bison.texinfo (Push Decl): Likewise.
5341 (Decl Summary): Likewise in the "%define api.push_pull" entry.
5342 (Push Parser Function): Likewise.
5343 (Pull Parser Function): Likewise.
5344 (Parser Create Function): Likewise.
5345 (Parser Delete Function): Likewise.
5346 (Table of Symbols): Likewise in the yypstate_delete, yypstate_new,
5347 yypull_parse, and yypush_parse entries.
5348
5349 * NEWS (2.3a+): Mention XML support, and say the schema is
5350 experimental.
5351 * doc/bison.texinfo (Bison Options): Mention -x and --xml.
5352 * src/getargs.c (usage): Say the XML schema is experimental.
5353
5354 * NEWS (2.3a+): Say option instead of flag.
5355
5356 2008-02-21 Wojciech Polak <polak@gnu.org>
5357
5358 * data/xslt/xml2xhtml.xsl (xsl:template match="/"): Change footer
5359 text.
5360
5361 2008-02-20 Joel E. Denny <jdenny@ces.clemson.edu>
5362
5363 Fix impure push parser compile error reported by Bob Rossi at
5364 <http://lists.gnu.org/archive/html/help-bison/2008-02/msg00023.html>.
5365 * data/yacc.c: Clean up whitespace in the output a little.
5366 (yypstate_allocated): Define for impure push parsers regardless of
5367 whether the pull interface is also requested.
5368 * tests/push.at (Push Parsing: Multiple impure instances): Extend to
5369 check impure push parsers without the pull interface.
5370
5371 * data/yacc.c (yypstate_new): Don't try to invoke yyerror since
5372 yyerror takes arguments specified by %parse-param while yypstate_new
5373 does not.
5374 * doc/bison.texinfo (Parser Create Function): Document that
5375 yypstate_new returns 0 for multiple impure parser instances.
5376 * tests/push.at (Push Parsing: Multiple impure instances): Update
5377 expected stderr output.
5378
5379 2008-02-19 Joel E. Denny <jdenny@ces.clemson.edu>
5380
5381 * runtime-po/POTFILES.in (push.c): Remove.
5382
5383 2008-02-17 Joel E. Denny <jdenny@ces.clemson.edu>
5384
5385 * data/Makefile.am (dist_pkgdata_DATA): Remove push.c.
5386 * data/push.c: Rename to...
5387 * data/yacc.c: ... this, overwriting it.
5388 * etc/bench.pl.in (bench_grammar): `%pure-parser'-> `%define api.pure'.
5389 `%push-pull-parser' -> `%define api.push_pull "both"'.
5390 Remove old yacc.c tests, and update push.c tests to yacc.c.
5391
5392 2008-02-17 Joel E. Denny <jdenny@ces.clemson.edu>
5393
5394 * data/bison.m4 (b4_percent_code_get): Output %code block comments like
5395 `"%code top" blocks' instead of `%code "top" blocks'.
5396 * data/push.c: Import yacc.c changes from 2008-01-09 and 2007-08-03.
5397 Clean up whitespace in the output a little.
5398
5399 2008-02-16 Joel E. Denny <jdenny@ces.clemson.edu>
5400
5401 Fix documentation problems reported by Tim Josling at
5402 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00013.html>.
5403 * NEWS (2.3a+): Mention removal of --no-parser, -n, and %no-parser.
5404 * doc/bison.texinfo (Token Decl): Token numbers are *nonnegative*
5405 integers. Explain the effect of literal string aliases on error
5406 messages. Copy token 0 documentation from the C++ skeleton
5407 documentation.
5408
5409 2008-02-16 Joel E. Denny <jdenny@ces.clemson.edu>
5410
5411 Accept a token number in a %left, %right, or %nonassoc for POSIX
5412 conformance. Reported by Tim Josling at
5413 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00010.html>.
5414 * NEWS (2.3a+): Mention.
5415 * doc/bison.texinfo (Precedence Decl): Describe how literal strings
5416 and code numbers are treated by precedence declarations.
5417 * src/parse-gram.y (precedence_declaration): Use symbols.prec instead
5418 of symbols.1.
5419 (symbols.prec): New, just like symbols.1 but uses symbol.prec instead
5420 of symbol.
5421 (symbol.prec): New, just like symbol but allows INT.
5422 * src/symtab.c (symbol_user_token_number_set): Remove an aver that no
5423 longer holds.
5424 * tests/regression.at (Token number in precedence declaration): New
5425 test case.
5426
5427 2008-02-06 Juan Manuel Guerrero <juan.guerrero@gmx.de>
5428
5429 DJGPP specific issues.
5430 * djgpp/config.bat: Add filenames that are not 8.3 clean and that must
5431 be changed. Copyright timestamp adjusted.
5432 * djgpp/config.sed: Add filenames that are not 8.3 clean and that must
5433 be changed. Copyright timestamp adjusted.
5434 * djgpp/config.site: Copyright timestamp adjusted.
5435 * djgpp/config_h.sed: Copyright timestamp adjusted.
5436 * djgpp/djunpack.bat: Copyright timestamp adjusted.
5437 * djgpp/fnchnage.lst: Add filenames that are not 8.3 clean to the
5438 filename translation list.
5439 * djgpp/subpipe.c (init_subpipe): Check the environment variables
5440 TMPDIR, TMP and TEMP, in that order, to determinate where the temp
5441 files shall be created. Before trying to use the temp dir where the
5442 environment variable points to check that the dir really exists. If
5443 not default to the cwd as temp dir. Copyright timestamp adjusted.
5444 * djgpp/subpipe.h: Copyright timestamp adjusted.
5445 * djgpp/testsuite.sed: Copyright timestamp adjusted.
5446
5447 2008-01-30 Paul Eggert <eggert@cs.ucla.edu>
5448
5449 * doc/bison.texinfo: Update Back-Cover text to reflect new GNU wording.
5450
5451 2008-01-09 Paul Eggert <eggert@cs.ucla.edu>
5452
5453 * data/yacc.c (yyparse): Correct the comment when locations aren't used.
5454 Problem reported by Claudio Saavedra in
5455 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00003.html>.
5456
5457 2008-01-05 Wojciech Polak <polak@gnu.org>
5458
5459 * data/xslt/xml2xhtml.xsl (xsl:template match="/"): Precede an XHTML
5460 document's title with the input grammar file name.
5461
5462 2007-12-22 Joel E. Denny <jdenny@ces.clemson.edu>
5463
5464 Automate regression testing of the XML/XSLT implementation. Discussed
5465 starting at
5466 <http://lists.gnu.org/archive/html/bison-patches/2007-11/msg00021.html>.
5467 * configure.ac (XSLTPROC): New substitution.
5468 * Makefile.am (maintainer-xml-check): New phony target invoking...
5469 * tests/Makefile.am (maintainer-xml-check): ... this new phony target
5470 invoking make maintainer-check with BISON_TEST_XML=1.
5471 * tests/atlocal.in (XSLTPROC): New.
5472 * tests/local.at (AT_BISON_CHECK): New macro to (1) instruct Valgrind
5473 not to report reachable memory when Bison is expected to have a
5474 non-zero exit status and (2) to compare XML/XSLT output with --graph
5475 and --report=all output for every working grammar when
5476 BISON_TEST_XML=1.
5477 (AT_BISON_CHECK_NO_XML): Likewise, but skip XML checks.
5478 (AT_BISON_CHECK_XML): New.
5479 (AT_QUELL_VALGRIND): New.
5480 * tests/testsuite.at (ORIGINAL_AT_CHECK): Remove this and...
5481 (AT_CHECK): ... don't redefine this since this was the old way to
5482 quell Valgrind.
5483 * tests/actions.at: Rewrite all AT_CHECK invocations for bison as
5484 AT_BISON_CHECK invocations.
5485 * tests/c++.at: Likewise.
5486 * tests/calc.at: Likewise.
5487 * tests/conflicts.at: Likewise.
5488 * tests/cxx-type.at: Likewise.
5489 * tests/existing.at: Likewise.
5490 * tests/glr-regression.at: Likewise.
5491 * tests/headers.at: Likewise.
5492 * tests/input.at: Likewise.
5493 * tests/java.at: Likewise.
5494 * tests/output.at: Likewise.
5495 * tests/push.at: Likewise.
5496 * tests/reduce.at: Likewise.
5497 * tests/regression.at: Likewise.
5498 * tests/sets.at: Likewise.
5499 * tests/skeletons.at: Likewise.
5500 * tests/synclines.at: Likewise.
5501 * tests/torture.at: Likewise.
5502 (Big triangle): Use AT_BISON_CHECK_NO_XML instead since this grammar
5503 tends to hang xsltproc.
5504 (Big horizontal): Likewise.
5505
5506 2007-12-08 Joel E. Denny <jdenny@ces.clemson.edu>
5507
5508 In XML output, remove redundant class attribute on symbol element.
5509 * data/xslt/bison.xsl (xsl:key name="bison:symbolByName"): New.
5510 * data/xslt/xml2xhtml.xsl (xsl:template match="symbol"): Use it to
5511 look up a symbol to determine whether it's a nonterminal or terminal.
5512 * src/gram.c (rule_rhs_print_xml): Remove class attribute.
5513 * src/state.c (state_rule_lookahead_tokens_print_xml): Likewise.
5514
5515 Add prec/assoc information to XML output.
5516 * src/gram.c (grammar_rules_print_xml): For each rule that has a
5517 %prec, add a percent_prec attribute.
5518 * src/print-xml.c (print_grammar): For each terminal that has a
5519 precedence or associativity, add a prec or assoc attribute.
5520 (xml_indent): New.
5521 (xml_puts): Use xml_indent.
5522 (xml_printf): Use xml_indent.
5523 * src/print-xml.h (xml_indent): Prototype.
5524
5525 * tests/existing.at (GNU pic Grammar): Fix a rule miscopied from
5526 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00026.html>.
5527
5528 2007-12-08 Joel E. Denny <jdenny@ces.clemson.edu>
5529
5530 * data/xslt/bison.xsl (bison:ruleNumber): Rename to...
5531 (bison:ruleByNumber): ... this for clarity.
5532 * data/xslt/xml2dot.xsl (xsl:template match="item"): Update.
5533 * data/xslt/xml2text.xsl (xsl:template match="item"): Update.
5534 (xsl:template match="reduction"): Update.
5535 (xsl:template match="item"): Update.
5536 (xsl:template match="reduction"): Update.
5537
5538 In the XML output, don't print the list of rules where symbols appear.
5539 Compute it in XSLT instead. Discussed at
5540 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00024.html>.
5541 * data/xslt/bison.xsl (bison:ruleByLhs): New.
5542 (bison:ruleByRhs): New.
5543 * data/xslt/xml2text.xsl (xsl:template match="terminal"): Use
5544 bison:ruleByRhs.
5545 (xsl:template match="terminal/rule"): Remove.
5546 (xsl:template match="nonterminal"): Use bison:ruleByLhs and
5547 bison:ruleByRhs.
5548 (xsl:template match="nonterminal/left/rule|nonterminal/right/rule"):
5549 Remove.
5550 * data/xslt/xml2xhtml.xsl (xsl:template match="terminal"): Use
5551 bison:ruleByRhs and mode="number-link" for rule template.
5552 (xsl:template match="terminal/rule"): Remove.
5553 (xsl:template match="nonterminal"): Use bison:ruleByLhs and
5554 bison:ruleByRhs and mode="number-link" for rule template.
5555 (xsl:template match="nonterminal/left/rule|nonterminal/right/rule"):
5556 Rewrite as...
5557 (xsl:template match="rule" mode="number-link"): ... this.
5558 * src/print-xml.c (print_grammar): Don't print the list of rules.
5559
5560 2007-12-01 Joel E. Denny <jdenny@ces.clemson.edu>
5561
5562 Don't let --report affect XML output; always print all information.
5563 Discussed at
5564 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00020.html>.
5565 * src/conflicts.c (log_resolution): Implement.
5566 * src/print-xml.c (print_core): Implement.
5567 (print_state): Implement.
5568 (print_xml): Implement.
5569
5570 * NEWS (2.3a+): Fix quotes.
5571 * src/parse-gram.y (prologue_declaration): For consistency with -v,
5572 don't let %verbose clear the list specified by --report.
5573
5574 2007-11-26 Akim Demaille <akim@epita.fr>
5575
5576 * data/Makefile.am (dist_pkgdata_DATA): Ship and install bison.xsl.
5577
5578 2007-11-24 Joel E. Denny <jdenny@ces.clemson.edu>
5579
5580 In the XML output, list useless and unused symbols and rules with the
5581 useful ones and add a "usefulness" attribute. Discussed starting at
5582 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00017.html>.
5583 * src/gram.c (grammar_rules_partial_print_xml): Remove.
5584 (grammar_rules_print_xml): Print all rules instead of just those
5585 useful in the grammar, and add a "usefulness" attribute.
5586 * src/gram.h (grammar_rules_partial_print_xml): Remove prototype.
5587 * src/print-xml.c (print_rules_useless_in_parser): Remove.
5588 (print_grammar): Print all nonterminals instead of just useful ones,
5589 and add a "usefulness" attribute to nonterminals and terminals.
5590 (print_xml): Don't print a separate "reductions" or
5591 "rules-useless-in-parser" element.
5592 * src/reduce.c (reduce_output): Use reduce_token_unused_in_grammar.
5593 (reduce_xml): Remove.
5594 (reduce_token_unused_in_grammar): New.
5595 (reduce_nonterminal_useless_in_grammar): New.
5596 * src/reduce.h (reduce_xml): Remove prototype.
5597 (reduce_token_unused_in_grammar): Add prototype.
5598 (reduce_nonterminal_useless_in_grammar): Add prototype.
5599 * data/xslt/xml2text.xsl: Update for XML changes.
5600 * data/xslt/xml2xhtml.xsl: Update for XML changes.
5601 * tests/reduce.at (Useless Terminals): Update output.
5602 (Useless Rules): Update output.
5603 (Reduced Automaton): Update output.
5604
5605 Say "Terminals unused in grammar" instead of "Unused terminals".
5606 * NEWS (2.3a+): Update.
5607 * doc/bison.texinfo (Understanding): Update example output.
5608 * src/reduce.c (reduce_output): Implement.
5609 * data/xslt/xml2text.xsl: Implement.
5610 * data/xslt/xml2xhtml.xsl: Implement.
5611
5612 2007-11-18 Joel E. Denny <jdenny@ces.clemson.edu>
5613
5614 Accept --report-file=FILE to override the default `.output' filename.
5615 * NEWS (2.3a+): Mention.
5616 * doc/bison.texinfo (Bison Options): Add an entry.
5617 * src/files.c (compute_output_file_names): Don't override
5618 spec_verbose_file if already set.
5619 * src/getargs.c (usage): Document --report-file.
5620 (REPORT_FILE_OPTION): New anonymous enum member.
5621 (long_options): Add entry for it.
5622 (getargs): Add case for it setting spec_verbose_file.
5623
5624 * build-aux/cross-options.pl: Don't record a short option just because
5625 there's an arg.
5626 * doc/.cvsignore: Add yacc.1.
5627
5628 2007-11-14 Akim Demaille <akim@epita.fr>
5629
5630 * doc/yacc.1.in: New.
5631 * configure.ac, doc/Makefile.am: Adjust.
5632 * configure.ac (PACKAGE_COPYRIGHT_YEAR): New substitution, and new
5633 config.h symbol.
5634 Use AC_SUBST for assignments too.
5635 * src/getargs.c (version): Use PACKAGE_COPYRIGHT_YEAR.
5636
5637 2007-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
5638
5639 * src/gram.c: Remove comments that duplicate comments in gram.h.
5640
5641 When reporting useless rules and nonterminals, say "useless in grammar"
5642 instead of "useless", and say "useless in parser" instead of "never
5643 reduced". Discussed starting at
5644 <http://lists.gnu.org/archive/html/bison-patches/2007-10/msg00033.html>.
5645 * NEWS (2.3a+): Mention this change.
5646 * data/xslt/xml2text.xsl: Update output text and expected input XML
5647 element names to match changes below.
5648 * data/xslt/xml2xhtml.xsl: Likewise.
5649 (xsl:template match="bison-xml-report"): Add missing entry in Table of
5650 Contents: "Rules useless in parser due to conflicts".
5651 * doc/bison.texinfo (Decl Summary): Reword a little.
5652 (Understanding): Update example output for changes below.
5653 * src/gram.c: (rule_useful_p): Rename to...
5654 (rule_useful_in_grammar_p): ... this.
5655 (rule_useless_p): Rename to...
5656 (rule_useless_in_grammar_p): ... this.
5657 (rule_never_reduced_p): Rename to...
5658 (rule_useless_in_parser_p): ... this.
5659 (grammar_rules_print): Update for renames.
5660 (grammar_rules_print_xml): Update for renames.
5661 (grammar_rules_never_reduced_report): Rename to...
5662 (grammar_rules_useless_report): ... this since it is used for either
5663 kind of useless rule.
5664 * src/gram.h: Reword comments and update function names in prototypes.
5665 * src/main.c (main): Say "rule useless in parser due to conflicts".
5666 * src/print-xml.c (print_rules_never_reduced): Rename to...
5667 (print_rules_useless_in_parser): ... this, and rename output XML
5668 element "rules-never-reduced" to "rules-useless-in-parser".
5669 (print_xml): Update for rename.
5670 * src/print.c (print_results): Say "Rules useless in parser due to
5671 conflicts".
5672 * src/reduce.c (reduce_grammar_tables): Say "rule useless in grammar".
5673 (nonterminals_reduce): Say "nonterminal useless in grammar".
5674 (reduce_output): Say "Nonterminals useless in grammar".
5675 Say "Rules useless in grammar".
5676 (reduce_xml): Rename output XML element "useless" to
5677 "useless-in-grammar".
5678 (reduce_print): Don't report the count of grammatically useless rules
5679 as "rules never reduced" just because %yacc is specified.
5680 In the correct report of this count, say nonterminal(s) and rule(s)
5681 "useless in grammar".
5682 * tests/conflicts.at (S/R in initial): Update expected output.
5683 (Defaulted Conflicted Reduction): Likewise.
5684 (Unreachable States After Conflict Resolution): Likewise.
5685 * tests/existing.at (GNU pic Grammar): Likewise.
5686 * tests/reduce.at (Useless Nonterminals): Likewise.
5687 (Useless Rules): Likewise.
5688 (Reduced Automaton): Likewise.
5689 (Underivable Rules): Likewise.
5690 (Empty Language): Likewise.
5691
5692 2007-11-09 Joel E. Denny <jdenny@ces.clemson.edu>
5693
5694 * data/bison.m4 (b4_cat): Put a newline after the end delimiter of the
5695 here document and before the EOF so that BSD's implementation of Bourne
5696 shell doesn't parse the delimiter as part of the here document.
5697 * doc/.cvsignore: Add cross-options.texi.
5698 * src/getargs.c (usage): Add a blank line after the warning categories.
5699
5700 2007-11-08 Paolo Bonzini <bonzini@gnu.org>
5701
5702 * data/lalr1.java (Lexer): Remove usage of b4_pure_if.
5703
5704 2007-11-05 Akim Demaille <akim@epita.fr>
5705
5706 Remove Id: from bison.1.
5707 * doc/Makefile.am (remove_time_stamp): Include the sed invocation.
5708 (perl -0777 -pi -e 's/\.PP\nId): New.
5709 (.x.1): Use it to ignore the version control revision.
5710
5711 2007-11-05 Akim Demaille <demaille@gostai.com>
5712
5713 * build-aux/Makefile.am: Ship cross-options.pl.
5714 * doc/Makefile.am: Always refer to cross-options.texi with
5715 $(srcdir).
5716 (MAINTAINERCLEANFILES): Add it.
5717
5718 2007-11-04 Akim Demaille <demaille@gostai.com>
5719
5720 Generate the long/short option cross-table.
5721 * build-aux/cross-options.pl: New.
5722 * doc/Makefile.am (cross-options.texi): New.
5723 * doc/bison.texinfo: Use it.
5724
5725 2007-11-04 Akim Demaille <demaille@gostai.com>
5726
5727 Generate bison.1 using help2man.
5728 * doc/common.x, doc/bison.x: New.
5729 * doc/Makefile.am (bison.1, .x.1): New.
5730 The code is taken from autoconf-2.61/man/Makefile.am.
5731 * configure.ac: Look for help2man.
5732
5733 2007-11-04 Akim Demaille <demaille@gostai.com>
5734
5735 Complete --help.
5736 * src/getargs.c (usage): Document -W, make it clear that -d,
5737 -g and -x have optional arguments.
5738
5739 2007-11-04 Akim Demaille <demaille@gostai.com>
5740
5741 Find sha1sum when named gsha1sum.
5742 * bootstrap (find_tool): New.
5743 ($SHA1SUM): New.
5744
5745 2007-10-28 Joel E. Denny <jdenny@ces.clemson.edu>
5746
5747 Deprecate %pure-parser and add `%define api.pure'. Discussed starting
5748 at
5749 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00006.html>.
5750 * NEWS (2.3a+): Mention.
5751 * data/bison.m4 (b4_pure_if): Don't define it here.
5752 * data/c.m4 (b4_identification): Depend on individual skeletons to
5753 define b4_pure_flag, b4_push_flag, or b4_pull_flag if they use the
5754 values of the %define variables api.pure or api.push_pull. Define
5755 YYPURE, YYPUSH, and YYPULL accordingly.
5756 * data/glr.c: Define b4_pure_if based on `%define api.pure' unless
5757 glr.cc has already defined b4_pure_flag.
5758 * data/push.c: Define b4_pure_if based on `%define api.pure'.
5759 Remove YYPUSH and YYPULL since they're back in b4_identification again.
5760 * data/yacc.c: Define b4_pure_if based on `%define api.pure'.
5761 * doc/bison.texinfo (Pure Decl): Update.
5762 (Push Decl): Update.
5763 (Decl Summary): Add api.pure to %define entry.
5764 In %pure-parser entry, say it's deprecated and reference %define.
5765 (Pure Calling): Update.
5766 (Error Reporting): Update.
5767 (C++ Scanner Interface): Update.
5768 (How Can I Reset the Parser): Update.
5769 (Table of Symbols): In %pure-parser entry, say it's deprecated and
5770 reference %define.
5771 * src/getargs.c (pure_parser): Remove global variable.
5772 * src/getargs.h (pure_parser): Remove extern.
5773 * src/output.c (prepare): Don't define pure_flag muscle.
5774 * src/parse-gram.y (prologue_declaration): Implement %pure-parser as a
5775 wrapper around `%define api.pure'.
5776 * tests/calc.at (Simple LALR Calculator): Update.
5777 (Simple GLR Calculator): Update.
5778 * tests/cxx-type.at (GLR: Resolve ambiguity, pure, no locations):
5779 Update.
5780 (GLR: Resolve ambiguity, pure, locations): Update.
5781 (GLR: Merge conflicting parses, pure, no locations): Update.
5782 (GLR: Merge conflicting parses, pure, locations): Update.
5783 * tests/glr-regression.at (Uninitialized location when reporting
5784 ambiguity): Update
5785 * tests/input.at (Unused %define api.pure): New test case.
5786 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Update definition for
5787 AT_PURE_IF and AT_PURE_AND_LOC_IF.
5788 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Update.
5789
5790 2007-10-28 Joel E. Denny <jdenny@ces.clemson.edu>
5791
5792 %define push_pull -> %define api.push_pull. Discussed starting at
5793 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00005.html>.
5794 * data/push.c: Expect the new name.
5795 * data/yacc.c: Likewise.
5796 * doc/bison.texinfo (Push Decl): Update.
5797 (Decl Summary): Update %define entry.
5798 (Push Parser Function): Update.
5799 (Pull Parser Function): Update.
5800 (Parser Create Function): Update.
5801 (Parser Delete Function): Update.
5802 * tests/calc.at (Simple LALR Calculator): Update.
5803 * tests/input.at (%define enum variables): Update.
5804 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Update.
5805 (Push Parsing: Multiple impure instances): Update.
5806 (Push Parsing: Unsupported Skeletons): Update.
5807 * tests/torture.at (Exploding the Stack Size with Alloca): Update.
5808 (Exploding the Stack Size with Malloc): Update.
5809
5810 * NEWS (2.3a+): Add an entry for the push parser, and clean up the
5811 other entries some.
5812
5813 2007-10-27 Joel E. Denny <jdenny@ces.clemson.edu>
5814
5815 For the XML output's terminal element, rename @number to @token-number,
5816 and add @symbol-number. In the nonterminal element, rename @number to
5817 @symbol-number. Discussed starting at
5818 <http://lists.gnu.org/archive/html/bison-patches/2007-10/msg00040.html>.
5819 * data/xslt/xml2text.xsl (xsl:template match="terminal"): Update for
5820 renames.
5821 (xsl:template match="nonterminal"): Likewise.
5822 * data/xslt/xml2xhtml.xsl (xsl:template match="terminal"): Likewise.
5823 (xsl:template match="nonterminal"): Likewise.
5824 * src/print-xml.c (print_grammar): Implement.
5825
5826 2007-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
5827
5828 * data/xslt/xml2dot.xsl (xsl:template match="automaton/state"): After
5829 2007-10-11 change, the child elements here are items not rules.
5830 (xsl:template match="item"): New.
5831 (xsl:template match="rule"): Update for new reduced itemset.
5832 (xsl:template match="point"): Remove.
5833 (xsl:template match="empty"): For consistency with --graph, don't
5834 output "/* empty */".
5835 * data/xslt/xml2text.xsl (xsl:template match="terminal"): When invoking
5836 line-wrap, don't pass a negative value as first-line-length since this
5837 won't work with the following changes.
5838 (xsl:template name="line-wrap"): Simplify slightly.
5839 (xsl:template name="ws-search"): Eliminate recursion.
5840 * src/print_graph.c (print_core): Don't print a reduction's lookahead
5841 set next to an item whose dot is not at the end of the RHS even if it
5842 happens to be associated with the same rule.
5843
5844 2007-10-19 Joel E. Denny <jdenny@ces.clemson.edu>
5845
5846 Add %define lr.keep_unreachable_states.
5847 * NEWS (2.3a+): Mention it in the entry for unreachable state removal.
5848 * doc/bison.texinfo (Decl Summary): Mention it in the %define entry.
5849 * src/main.c (main): Implement it.
5850 * tests/conflicts.at (Unreachable States After Conflict Resolution):
5851 Extend to test it, and fix a typo.
5852
5853 2007-10-19 Joel E. Denny <jdenny@ces.clemson.edu>
5854
5855 * NEWS (2.3a+): Add entry for recent .output file lookahead set fix.
5856 * doc/bison.texinfo (Understanding): Remove a bogus lookahead set in
5857 the example .output text.
5858 * tests/regression.at (Extra lookahead sets in report): Improve wording
5859 of comments.
5860
5861 2007-10-17 Wojciech Polak <polak@gnu.org>
5862
5863 * src/print-xml.c (print_grammar): Renamed
5864 <terminal> and <nonterminal> attributes:
5865 "type" to "number" and "symbol" to "name".
5866 * data/xslt/xml2text.xsl (xsl:template match="terminal"):
5867 Use new attribute names.
5868 (xsl:template match="nonterminal"): Likewise.
5869 * data/xslt/xml2xhtml.xsl: Likewise.
5870
5871 2007-10-17 Joel E. Denny <jdenny@ces.clemson.edu>
5872
5873 * doc/bison.texinfo (Bison Options): Add entry for --print-datadir.
5874 (Option Cross Key): Likewise.
5875
5876 * src/print-xml.c (print_core): Don't print a reduction's lookahead set
5877 next to an item whose dot is not at the end of the RHS even if it
5878 happens to be associated with the same rule.
5879 * src/print.c (print_core): Likewise.
5880 * tests/conflicts.at (Unresolved SR Conflicts): Update output.
5881 (Resolved SR Conflicts): Update output.
5882 * tests/regression.at (Extra lookahead sets in report): New test case.
5883
5884 2007-10-11 Wojciech Polak <polak@gnu.org>
5885
5886 * src/print-xml.c (print_core): Remove item set
5887 redundancy.
5888 * data/xslt/bison.xsl (bison:ruleNumber): New key.
5889 Improve processing time. Suggested by Joel E. Denny.
5890 * data/xslt/xml2dot.xsl (xsl:template name="escape"):
5891 Write xsl:param "required" attribute as comment.
5892 * data/xslt/xml2text.xsl (xsl:template match="item"): New.
5893 (xsl:template match="rule"): Support new reduced itemset.
5894 (xsl:template match="point"): Remove.
5895 * data/xslt/xml2xhtml.xsl: Likewise.
5896
5897 2007-10-09 Joel E. Denny <jdenny@ces.clemson.edu>
5898
5899 * src/getargs.c (version): Update copyright year.
5900
5901 2007-10-09 Joel E. Denny <jdenny@ces.clemson.edu>
5902
5903 Make xml2dot.xsl and --graph produce the same output.
5904 * data/xslt/xml2dot.xsl (xsl:template match="rule"): Use a `&#10;'
5905 instead of a `\n'. That is, don't add escapes yet or they'll be doubly
5906 escaped later.
5907 (xsl:template name="output-node"): Use the new escape template instead
5908 of the string-replace template directly.
5909 (xsl:template name="output-edge"): Likewise.
5910 (xsl:template name="escape"): New, escapes backslashes and newlines in
5911 addition to quotation marks.
5912 * src/graphviz.c (start_graph, output_node, output_edge): Add
5913 whitespace to output for legibility.
5914
5915 Make xml2text.xsl and --report produce the same output, and remove the
5916 XML "conflicts" element since a conflict summary is easily extracted
5917 from the automaton.
5918 * data/xslt/bison.xsl: New.
5919 (xsl:template match="state" mode="bison:count-conflicts): New.
5920 * data/xslt/xml2text.xsl: Import bison.xsl.
5921 (xsl:template match="bison-xml-report"): Instead of styling the
5922 "conflicts" element, style the "automaton" element with mode
5923 "conflicts". Unlike the former, the latter lists S/R and R/R
5924 conflicts for a state on the same line.
5925 (xsl:template match="conflicts"): Remove.
5926 (xsl:template match="conflict"): Remove.
5927 (xsl:template match="terminal"): Line-wrap the list of rules in which
5928 the terminal is used.
5929 (xsl:template match="nonterminal"): Likewise for nonterminals.
5930 (xsl:template match="automaton" mode="conflicts"): New.
5931 (xsl:template match="state" mode="conflicts"): New.
5932 (xsl:template name="line-wrap"): New.
5933 (xsl:template name="ws-search"): New.
5934 * data/xslt/xml2xhtml.xsl: Import bison.xsl.
5935 (xsl:template match="bison-xml-report"): Instead of styling the
5936 "conflicts" element, style the "automaton" element with mode
5937 "conflicts."
5938 (xsl:template match="conflicts"): Remove.
5939 (xsl:template match="conflict"): Remove.
5940 (xsl:template match="automaton" mode="conflicts"): New.
5941 (xsl:template match="state" mode="conflicts): New.
5942 * src/conflicts.c (conflicts_output_xml): Remove.
5943 * src/conflicts.h (conflicts_output_xml): Remove prototype.
5944 * src/print-xml.c (print_xml): Don't invoke conflicts_output_xml.
5945 * src/print.c (print_grammar): Consistently wrap at the 66th column so
5946 the corresponding XSLT is easier. Also, never wrap between a word and
5947 the comma that follows it.
5948
5949 2007-10-08 Joel E. Denny <jdenny@ces.clemson.edu>
5950
5951 Improve C++ namespace support. Discussed starting at
5952 <http://lists.gnu.org/archive/html/help-bison/2007-09/msg00016.html>.
5953 * data/c++.m4: (b4_namespace_ref, b4_namespace_open,
5954 b4_namespace_close): New macros that interpret the %define variable
5955 "namespace" so its value can contain "::" to indicate nested
5956 namespaces.
5957 * data/glr.cc (b4_namespace): Don't define, and replace all uses with
5958 the above macros.
5959 * data/lalr1.cc (b4_namespace): Likewise.
5960 * data/location.cc (b4_namespace): Likewise.
5961 * doc/bison.texinfo (Decl Summary): Move `%define push_pull' entry
5962 inside a new table in the general %define entry. Document `%define
5963 namespace' there as well. Point the %name-prefix entry to it since it
5964 explains it more completely in the case of C++.
5965 (C++ Bison Interface): Mention `%define namespace' instead of
5966 %name-prefix.
5967 (Table of Symbols): Remove the `%define push_pull' entry. The %define
5968 entry suffices.
5969 * tests/c++.at (Relative namespace references): New test case.
5970 (Absolute namespace references): New test case.
5971 (Syntactically invalid namespace references): New test case.
5972 * tests/input.at (C++ namespace reference errors): New test case.
5973
5974 2007-10-08 Joel E. Denny <jdenny@ces.clemson.edu>
5975
5976 Add syncline support and location accessor to internal %define
5977 interfaces.
5978 * data/bison.m4 (b4_percent_define_get_loc): New.
5979 (b4_percent_define_get_syncline): New.
5980 (b4_percent_define_flag_if): Use b4_percent_define_get_loc.
5981 (b4_percent_define_default): Record defining location as line 1 rather
5982 than 0 for the sake of synchronizing #line's, and define
5983 b4_percent_define_syncline(VARIABLE).
5984 (b4_percent_define_check_values): Use b4_percent_define_get_loc.
5985 * src/muscle_tab.c (muscle_syncline_grow): New.
5986 (muscle_code_grow): Use muscle_syncline_grow.
5987 (muscle_percent_define_insert): Use muscle_percent_define_get_loc, and
5988 define b4_percent_define_syncline(VARIABLE).
5989 (muscle_percent_define_get_loc): New.
5990 (muscle_percent_define_get_syncline): New.
5991 (muscle_percent_define_flag_if): Use muscle_percent_define_get_loc, and
5992 remove some unused variables.
5993 (muscle_percent_define_default): Record defining location as line 1
5994 rather than 0 for the sake of synchronizing #line's, and define
5995 b4_percent_define_syncline(VARIABLE).
5996 (muscle_percent_define_check_values): Use
5997 muscle_percent_define_get_loc.
5998 * src/muscle_tab.h (muscle_percent_define_get_loc): Prototype.
5999 (muscle_percent_define_get_syncline): Prototype.
6000 * tests/skeletons.at (%define Boolean variables: invalid skeleton
6001 defaults): Update output for location change.
6002 (Complaining during macro argument expansion): Extend to test
6003 b4_percent_define_get_loc and b4_percent_define_get_syncline errors.
6004
6005 2007-10-07 Joel E. Denny <jdenny@ces.clemson.edu>
6006
6007 Fix some error-reporting macro bugs.
6008 * data/bison.m4 (b4_cat): New.
6009 (b4_error, b4_error_at): Use b4_cat to send error directives directly
6010 to stdout so they don't become arguments to other macros. Update
6011 comments and add examples.
6012 (b4_warn, b4_warn_at, b4_complain, b4_complain_at): Update comments and
6013 add examples.
6014 (b4_fatal, b4_fatal_at): Likewise, and invoke m4_exit(1) immediately
6015 after printing the error directive so that M4 doesn't report subsequent
6016 problems that are induced by this problem.
6017 * src/scan-skel.l: Recognize @` digraph outside of directive arguments
6018 instead of just in them. Recognize @\n in both places. Both expand to
6019 the empty string. Needed by b4_cat.
6020 * tests/skeletons.at (Complaining during macro argument expansion):
6021 New test case.
6022 (Fatal errors make M4 exit immediately): New test case.
6023
6024 2007-10-04 Joel E. Denny <jdenny@ces.clemson.edu>
6025
6026 Implement --print-datadir.
6027 * src/getargs.c (usage): Mention.
6028 (PRINT_DATADIR_OPTION): New anonymous enum member.
6029 (long_options): Add entry for it.
6030 (getargs): Add case for it calling compute_pkgdatadir.
6031 * src/output.c (output_skeleton): Encapsulate data directory
6032 computation from here...
6033 (prepare): ... and from here...
6034 (compute_pkgdatadir): ... into this new function.
6035 * src/output.h (compute_pkgdatadir): Prototype.
6036
6037 2007-09-29 Joel E. Denny <jdenny@ces.clemson.edu>
6038
6039 * src/print-xml.c (escape_bufs): New static global variable
6040 replacing...
6041 (xml_escape_n): ... the static local variable buf here.
6042 (print_xml): Free memory for escape_bufs.
6043 * src/reduce.c (reduce_xml): XML-escape terminal symbol tags.
6044
6045 2007-09-25 Joel E. Denny <jdenny@ces.clemson.edu>
6046
6047 Replace `%push-parser' and `%push-pull-parser' with
6048 `%define push_pull "push"' and `%define push_pull "both"'.
6049 `%define push_pull "pull"' is the default.
6050 * doc/bison.texinfo (Push Decl, Push Parser Function,
6051 Pull Parser Function, Parser Create Function, Parser Delete Function):
6052 Update declarations.
6053 (Decl Summary, Table of Symbols): Replace %push-parser and
6054 %push-pull-parser entries with a %define push_pull entry.
6055 * data/bison.m4 (b4_percent_define_check_values): New macro.
6056 (b4_pull_if, b4_push_if, b4_use_push_for_pull_if): Move these
6057 definitions...
6058 * data/c.m4 (b4_identification): ... and the YYPUSH and YYPULL cpp
6059 definitions...
6060 * data/push.c: ... to here and compute them from the value of the
6061 %define variable push_pull.
6062 * data/c-skel.m4: Instead of choosing the push.c skeleton for push
6063 parsing requests here...
6064 * data/yacc.c: ... hack this to switch to push.c any time
6065 b4_use_push_pull_flag or the %define variable push_pull is set. This
6066 will go away when we mv push.c yacc.c.
6067 * data/c++-skel.m4, data/glr.c, data/java-skel.m4: Don't report that
6068 push parsing is not supported since unused %define variables are
6069 reported anyway.
6070 * src/getargs.c, src/getargs.h (pull_parser, push_parser): Remove.
6071 * src/muscle_tab.h (muscle_percent_define_check_values): Update
6072 comments for consistency with b4_percent_define_check_values.
6073 * src/output.c (prepare): Don't insert b4_pull_flag and b4_push_flag
6074 muscles.
6075 * src/parse-gram.y (PERCENT_PUSH_PARSER, PERCENT_PUSH_PULL_PARSER):
6076 Remove.
6077 (prologue_declaration): Remove %push-parser and %push-pull-parser
6078 rules.
6079 * src/scan-gram.l (%push-parser, %push-pull-parser): Remove rules.
6080 * tests/calc.at: Update declarations.
6081 * tests/input.at (%define enum variables): New test case.
6082 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Update
6083 declaration.
6084 (Push Parsing: Multiple impure instances): Update declaration.
6085 (Push Parsing: Unsupported Skeletons): New test case.
6086 * tests/torture.at (Exploding the Stack Size with Alloca): Update
6087 declaration.
6088 (Exploding the Stack Size with Malloc): Update declaration.
6089
6090 2007-09-24 Wojciech Polak <polak@gnu.org>
6091
6092 Add XSLT transformations.
6093
6094 * data/xslt/xml2dot.xsl: Transform XML into DOT.
6095 * data/xslt/xml2text.xsl: Transform XML into plain text.
6096 * data/xslt/xml2xhtml.xsl: Transform XML into XHTML.
6097 * data/Makefile.am (xsltdir): New variable.
6098 (dist_xslt_DATA): Add xslt/*.xsl files.
6099
6100 2007-09-23 Paul Eggert <eggert@cs.ucla.edu>
6101
6102 * src/conflicts.c (log_resolution): Fix indenting bugs I introduced.
6103 Problem reported by Wojciech Polak.
6104 * src/print-xml.c (xml_puts): Work even if LEVEL exceeds INT_MAX/2.
6105 (xml_printf): Undo change I made on 21 September; that is,
6106 indent 2 spaces, not 1.
6107
6108 2007-09-23 Joel E. Denny <jdenny@ces.clemson.edu>
6109
6110 Pacify ./configure --enable-gcc-warnings.
6111 * src/print-xml.c, src/print-xml.h (xml_puts): Make third argument
6112 `char const *' instead of `char *'.
6113 * src/state.c (state_rule_lookahead_tokens_print_xml): Remove unused
6114 local variable `sep'.
6115
6116 2007-09-21 Paul Eggert <eggert@cs.ucla.edu>
6117
6118 * src/gram.c (rule_rhs_print_xml): Now static, since it isn't used
6119 elsewhere.
6120 * src/print-xml.c: Prefer "const" after types; that's more consistent.
6121 (xml_printf): Indent just 1 space for level.
6122 (e_char, xlate_char): Remove.
6123 (xml_escape_string): Rewrite to avoid undefined behavior (used
6124 storage that was freed from the stack).
6125 (xml_escape_n): Don't bother checking for subscript error.
6126
6127 2007-09-21 Wojciech Polak <polak@gnu.org>
6128
6129 Add Bison XML Automaton Report.
6130
6131 Add support for an -x option to generate an XML report.
6132 It is not documented yet.
6133 * src/print-xml.c: New file.
6134 * src/print-xml.h: Likewise.
6135 * lib/timevar.def (TV_XML): New var.
6136 * src/Makefile.am (bison_SOURCES): Add print-xml.c, print-xml.h.
6137 * src/conflicts.c: Include print-xml.h.
6138 (solved_conflicts_xml_obstack): New var.
6139 (log_resolution, conflicts_solve, conflicts_free):
6140 Add support for XML report.
6141 (conflicts_output_val): New function.
6142 * src/conflicts.h (conflicts_output_val): New decl.
6143 * src/files.c (spec_xml_file): New var.
6144 (compute_output_file_names, output_file_names_free): Add XML support.
6145 * src/files.h (spec_xml_file): New decl.
6146 * src/getargs.c (xml_flag): New var.
6147 (usage, short_options, long_options, getargs): Add XML support.
6148 * src/getargs.h (xml_flag): New decl.
6149 * src/gram.c: Include print-xml.h.
6150 (rule_lhs_print_xml, rule_rhs_print_xml):
6151 (grammar_rules_partial_print_xml, grammar_rules_print_xml):
6152 New functions.
6153 * src/gram.h: Declare external ones.
6154 * src/main.c: Include print-xml.h.
6155 (main): Add XML support.
6156 * src/reduce.c: Include print-xml.h.
6157 (reduce_xml): New function.
6158 * src/reduce.h: Declare it.
6159 * src/state.c: Include print-xml.h.
6160 (state_new): Add XML support.
6161 (state_rule_lookahead_tokens_print_xml): New function.
6162 * src/state.h: Declare it.
6163 (struct state): New member solved_conflicts_xml.
6164 * src/symtab.c (symbol_class_get_string): New function.
6165 * src/symtab.h: Declare it.
6166
6167 2007-09-21 Paul Eggert <eggert@cs.ucla.edu>
6168
6169 * GNUmakefile: Switch to coreutils's version.
6170 * bootstrap: Likewise.
6171 * Makefile.cfg: Adjust to new GNUmakefile.
6172 * README-hacking: Likewise.
6173
6174 Import from gnulib:
6175
6176 2006-08-18 Paul Eggert <eggert@cs.ucla.edu>
6177 Bruno Haible <bruno@clisp.org>
6178
6179 * m4/bison-i18n.m4 (BISON_I18N): Also handle the case where yacc exists
6180 and is a script that invokes bison. Tighten the code. Add comments.
6181
6182 2007-08-28 Joel E. Denny <jdenny@ces.clemson.edu>
6183
6184 Spell "boolean" as "Boolean". Reported by Akim Demaille.
6185 * data/bison.m4 (b4_percent_define_flag_if): Fix complaint.
6186 * doc/bison.texinfo (Decl Summary): Fix.
6187 * src/muscle_tab.c (muscle_percent_define_flag_if): Fix complaint.
6188 * tests/input.at (Boolean %define variables): Update output.
6189 * tests/skeletons.at (%define boolean variables: invalid skeleton
6190 defaults): Rename to...
6191 (%define Boolean variables: invalid skeleton defaults): ... this and
6192 update output.
6193
6194 2007-08-17 Joel E. Denny <jdenny@ces.clemson.edu>
6195
6196 In impure push mode, don't allow more than one yypstate to be allocated
6197 since multiple impure parsers would corrupt yynerrs.
6198 * data/push.c (yypstate_allocated): New static global variable
6199 initialized to 0.
6200 (yypull_parse): If yypstate_new returns 0, don't report it as memory
6201 exhaustion if yypstate_allocated is 1, but still return 2.
6202 (yypstate_new): Invoke yyerror and return 0 if yypstate_allocated is
6203 already 1. Otherwise, set it to 1.
6204 (yypstate_delete): Set it to 0.
6205 * tests/push.at (Push Parsing: Multiple impure instances): New test
6206 case.
6207
6208 2007-08-17 Bob Rossi <bob@brasko.net>
6209
6210 * doc/bison.texinfo (Push Decl): Document the push parser.
6211 (Table of Symbols): Ditto.
6212 (Pure Decl): Ditto.
6213 (Decl Summary): Ditto.
6214 (Multiple Parsers, Push Parser Function, Pull Parser Function,
6215 Parser Create Function, Parser Delete Function):
6216 Add new push parser symbols.
6217 (Table of Symbols): Document push-parser, push-pull-parser,
6218 yypush_parse, yypull_parse, yypstate_new and yypstate_delete.
6219
6220 2007-08-15 Paul Eggert <eggert@cs.ucla.edu>
6221
6222 Update to GPLv3.
6223 * doc/gpl-3.0.texi: New file.
6224 * doc/gpl.texi: Remove.
6225 * COPYING, GNUmakefile, HACKING, Makefile.am, Makefile.cfg:
6226 * Makefile.maint, NEWS, PACKAGING, README, README-alpha:
6227 * README-hacking, TODO, bootstrap, bootstrap.conf:
6228 * configure.ac, data/Makefile.am, data/README, data/bison.m4:
6229 * data/c++-skel.m4, data/c++.m4, data/c-skel.m4, data/c.m4:
6230 * data/glr.c, data/glr.cc, data/java-skel.m4, data/java.m4:
6231 * data/lalr1.cc, data/lalr1.java, data/location.cc:
6232 * data/push.c, data/yacc.c, data/m4sugar/m4sugar.m4:
6233 * djgpp/Makefile.maint, djgpp/README.in, djgpp/config.bat:
6234 * djgpp/config.sed, djgpp/config.site, djgpp/config_h.sed:
6235 * djgpp/djunpack.bat, djgpp/subpipe.c, djgpp/subpipe.h:
6236 * djgpp/testsuite.sed, doc/Makefile.am, doc/bison.texinfo:
6237 * doc/fdl.texi, doc/refcard.tex, etc/Makefile.am, etc/README:
6238 * etc/bench.pl.in, examples/Makefile.am, examples/extexi:
6239 * examples/calc++/Makefile.am, lib/Makefile.am, lib/abitset.c:
6240 * lib/abitset.h, lib/bbitset.h, lib/bitset.c, lib/bitset.h:
6241 * lib/bitset_stats.c, lib/bitset_stats.h, lib/bitsetv-print.c:
6242 * lib/bitsetv-print.h, lib/bitsetv.c, lib/bitsetv.h:
6243 * lib/ebitset.c, lib/ebitset.h, lib/get-errno.c:
6244 * lib/get-errno.h, lib/lbitset.c, lib/lbitset.h:
6245 * lib/libiberty.h, lib/main.c, lib/subpipe.c, lib/subpipe.h:
6246 * lib/timevar.c, lib/timevar.def, lib/timevar.h:
6247 * lib/vbitset.c, lib/vbitset.h, lib/yyerror.c:
6248 * m4/c-working.m4, m4/cxx.m4, m4/m4.m4, m4/subpipe.m4:
6249 * m4/timevar.m4, src/LR0.c, src/LR0.h, src/Makefile.am:
6250 * src/assoc.c, src/assoc.h, src/closure.c, src/closure.h:
6251 * src/complain.c, src/complain.h, src/conflicts.c:
6252 * src/conflicts.h, src/derives.c, src/derives.h, src/files.c:
6253 * src/files.h, src/flex-scanner.h, src/getargs.c:
6254 * src/getargs.h, src/gram.c, src/gram.h, src/graphviz.c:
6255 * src/lalr.c, src/lalr.h, src/location.c, src/location.h:
6256 * src/main.c, src/muscle_tab.c, src/muscle_tab.h:
6257 * src/nullable.c, src/nullable.h, src/output.c, src/output.h:
6258 * src/parse-gram.c, src/parse-gram.h, src/parse-gram.y:
6259 * src/print.c, src/print.h, src/print_graph.c:
6260 * src/print_graph.h, src/reader.c, src/reader.h, src/reduce.c:
6261 * src/reduce.h, src/relation.c, src/relation.h:
6262 * src/revision.h, src/scan-code.h, src/scan-code.l:
6263 * src/scan-gram.h, src/scan-gram.l, src/scan-skel.h:
6264 * src/scan-skel.l, src/state.c, src/state.h, src/symlist.c:
6265 * src/symlist.h, src/symtab.c, src/symtab.h, src/system.h:
6266 * src/tables.c, src/tables.h, src/uniqstr.c, src/uniqstr.h:
6267 * tests/Makefile.am, tests/actions.at, tests/c++.at:
6268 * tests/calc.at, tests/conflicts.at, tests/cxx-type.at:
6269 * tests/existing.at, tests/glr-regression.at:
6270 * tests/headers.at, tests/input.at, tests/java.at:
6271 * tests/local.at, tests/output.at, tests/push.at:
6272 * tests/reduce.at, tests/regression.at, tests/sets.at:
6273 * tests/skeletons.at, tests/synclines.at, tests/testsuite.at:
6274 * tests/torture.at:
6275 Update to GPLv3.
6276
6277 2007-08-11 Joel E. Denny <jdenny@ces.clemson.edu>
6278
6279 Get rid of broken %no-parser, -n, and --no-parser implementation and
6280 documentation.
6281 * TODO: Don't mention them.
6282 * doc/bison.1: Likewise.
6283 * doc/bison.texinfo (Decl Summary): Likewise.
6284 (Bison Options): Likewise.
6285 (Option Cross Key): Likewise.
6286 * src/getargs.c (no_parser_flag): Remove global variable.
6287 (usage): Don't print description of -n and --no-parser.
6288 (long_options): Remove --no-parser entry here.
6289 (getargs): Remove -n case in the switch here.
6290 * src/getargs.h (no_parser_flag): Remove extern.
6291 * tests/regression.at (Web2c Actions): Remove comment that mentions
6292 --no-parser.
6293
6294 2007-08-11 Joel E. Denny <jdenny@ces.clemson.edu>
6295
6296 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Do not
6297 name user variables starting with `yy'. Just pass NULL instead of a
6298 dummy local &yylval to yypush_parse.
6299 * tests/torture.at (AT_DATA_STACK_TORTURE): Do not name user variables
6300 starting with `yy'.
6301
6302 2007-08-03 Joel E. Denny <jdenny@ces.clemson.edu>
6303
6304 * data/yacc.c (yyexhaustedlab): Define it when YYERROR_VERBOSE is
6305 true since it's then always used regardless of whether yyoverflow is
6306 defined. Reported by Christian Burger at
6307 <http://lists.gnu.org/archive/html/bug-bison/2007-07/msg00031.html>.
6308 * THANKS: Add Christian Burger.
6309
6310 * ChangeLog: For changes in doc/bison.texinfo, consistently reference
6311 node names: say "Decl Summary" not "Bison Declaration Summary".
6312
6313 2007-07-28 Joel E. Denny <jdenny@ces.clemson.edu>
6314
6315 * src/muscle_tab.c (muscle_percent_define_flag_if): In order to
6316 determine whether this function has already complained about an invalid
6317 value for a %define boolean variable, don't check whether Bison has
6318 ever examined the value. As written, the check was a tautology.
6319 Instead, record and check for this complaint using a separate muscle.
6320
6321 2007-07-27 Joel E. Denny <jdenny@ces.clemson.edu>
6322
6323 Fix push parsing memory leak reported by Brandon Lucia at
6324 <http://lists.gnu.org/archive/html/bug-bison/2007-07/msg00032.html>.
6325 * THANKS: Add Brandon Lucia.
6326 * data/push.c (yypstate_delete): Free the stack if it was reallocated
6327 but the parse never completed and thus freed it.
6328 * tests/Makefile.am (TESTSUITE_AT): Add push.at.
6329 * tests/testsuite.at: Include push.at.
6330 * test/push.at: New.
6331 (Push Parsing: Memory Leak for Early Deletion): New test case.
6332
6333 2007-07-17 Joel E. Denny <jdenny@ces.clemson.edu>
6334
6335 Improve handling of multiple S/R conflicts in the same state and of S/R
6336 conflicts involving multiple reductions.
6337 * src/conflicts.c (resolve_sr_conflict): Don't assign the error action
6338 set for a state here or Bison will abort if it is reassigned on a
6339 later conflicted reduction in the same state.
6340 Similarly, don't finalize and assign the solved conflicts report here
6341 or it will be lost if it is reassigned on a later conflicted reduction
6342 in the same state.
6343 (set_conflicts): Instead, assign them both here after all S/R conflicts
6344 in the state have been fully examined.
6345 * src/print.c (shift_set): Rename to...
6346 (no_reduce_set): ... this.
6347 (print_reductions): Update for rename, and add %nonassoc error action
6348 tokens to no_reduce_set so that, when printing the first remaining
6349 reduction on an error action token, the reduction is enclosed in
6350 brackets.
6351 (print_results): Update for rename.
6352 * tests/conflicts.at (Solved conflicts report for multiple reductions
6353 in a state): New test case.
6354 (%nonassoc error actions for multiple reductions in a state): New test
6355 case.
6356
6357 * src/main.c (main): Don't depend on C99 features.
6358
6359 2007-07-16 Joel E. Denny <jdenny@ces.clemson.edu>
6360
6361 * build-aux/.cvsignore: Add compile.
6362 * lib/.cvsignore: Add charset.alias, ref-add.sed, ref-del.sed, and
6363 uniwidth.
6364
6365 2007-07-10 Joel E. Denny <jdenny@ces.clemson.edu>
6366
6367 * bootstrap (slurp): Create target directories that don't exist.
6368 Specifically, we need lib/uniwidth/ because of recent Gnulib changes.
6369
6370 2007-07-09 Joel E. Denny <jdenny@ces.clemson.edu>
6371
6372 * LR0.c (new_itemsets): Fix wording in comments: say item index rather
6373 than item number.
6374 * closure.c (closure): Likewise.
6375 * state.h (reductions): Comment sorting of rules.
6376 (state): Comment sorting of items.
6377
6378 2007-07-02 Joel E. Denny <jdenny@ces.clemson.edu>
6379
6380 Fix C++ test cases after recent Gnulib changes. Discussed starting at
6381 <http://lists.gnu.org/archive/html/bug-bison/2007-07/msg00000.html>.
6382 * examples/calc++/Makefile.am (DEFAULT_INCLUDES): Override Automake's
6383 definition in order to avoid Gnulib headers since we don't use config.h
6384 here.
6385 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): Use AT_DATA_GRAMMAR
6386 rather than AT_DATA so that config.h is included.
6387
6388 2007-07-01 Joel E. Denny <jdenny@ces.clemson.edu>
6389
6390 * data/glr.c (yy_yypstack, yypstates, yypdumpstack): Use YYFPRINTF
6391 instead of fprintf. Guard these functions with #if YYDEBUG instead of
6392 #ifdef YYDEBUG for consistency with all other uses of YYDEBUG in Bison
6393 and so that YYFPRINTF is guaranteed to be defined here.
6394
6395 2007-05-29 Joel E. Denny <jdenny@ces.clemson.edu>
6396
6397 * src/muscle_tab.c (muscle_percent_define_invalid_value): Replace
6398 with...
6399 (muscle_percent_define_check_values): ... this more helpful function.
6400 Again, it's not used yet, but it will be.
6401 * src/muscle_tab.h: Likewise.
6402
6403 Improve some comments in parser table construction.
6404 * src/LR0.c (new_itemsets): Explain sorting of itemset and kernel_base.
6405 (generate_states): Don't mention ruleset, which is internal to closure.
6406 * src/closure.c (closure): Explain sorting of core and itemset, which
6407 is required for this function to behave correctly.
6408 * src/closure.h (closure): Mention sorting.
6409
6410 2007-05-28 Joel E. Denny <jdenny@ces.clemson.edu>
6411
6412 * src/lalr.c (state_lookahead_tokens_count): For code readability,
6413 move the check for disabled transitions to an aver since conflict
6414 resolution hasn't happened yet.
6415
6416 * src/lalr.c (state_lookahead_tokens_count): Remove the check that
6417 labels a state as inconsistent just because it has error transitions.
6418 The original form of this check appeared in revision 1.1 of lalr.c,
6419 which was committed on 1991-12-21. Now (at least), changing the
6420 consistency label on such a state appears to have no useful effect in
6421 any of the places it is examined, which I enumerate below. The key
6422 point to understanding each item in this enumeration is that a state
6423 with an error transition is labelled consistent in the first place only
6424 if it has no rules, so the check cannot matter for states that have
6425 rules. (1) Labelling a state as inconsistent will cause set_conflicts
6426 to try to identify its conflicts, and a state must have *rules* to have
6427 conflicts. (2) Labelling a state as inconsistent will affect how
6428 action_row sets the default *rule* for the state. (3) Labelling a
6429 state as inconsistent will cause build_relations to add lookback edges
6430 to *rules* in that state.
6431 * src/state.h (struct state): Word the comment for member consistent
6432 more carefully.
6433
6434 2007-05-27 Joel E. Denny <jdenny@ces.clemson.edu>
6435
6436 Don't depend on C99 features.
6437 * src/conflicts.c (conflicts_update_state_numbers): Fix for-loop.
6438 * src/lalr.c (lalr_update_state_numbers): Fix for-loop.
6439 * src/reader.c (check_and_convert_grammar): Fix for-loop.
6440 * src/state.c (state_mark_reachable_states): Fix for-loop.
6441 (state_remove_unreachable_states): Fix for-loop.
6442
6443 Don't widen struct state with member reachable just to temporarily
6444 record reachability. Instead, use a local bitset.
6445 * src/state.h (struct state): Remove member.
6446 * src/state.c (state_new): Don't initialize it.
6447 (state_mark_reachable_states): Rename to...
6448 (state_record_reachable_states): ... this, and use bitset.
6449 (state_remove_unreachable_states): Use bitset.
6450
6451 2007-05-26 Joel E. Denny <jdenny@ces.clemson.edu>
6452
6453 * src/Makefile.am (yacc): Quote target action commands properly so
6454 that the yacc script isn't corrupt. Reported by Hans Aberg at
6455 <http://lists.gnu.org/archive/html/bug-bison/2007-05/msg00003.html>.
6456
6457 * data/glr.c (yylval): As in yacc.c, don't extern in the header for
6458 the case of pure parsers. Reported by Frans Englich at
6459 <http://lists.gnu.org/archive/html/help-bison/2007-05/msg00018.html>.
6460 * THANKS: Add Frans Englich.
6461
6462 * NEWS (2.3a+): In the %code entry, reference section `Bison
6463 Declaration Summary' from the manual now since the %code summary has
6464 moved there.
6465 * doc/bison.texinfo (Prologue Alternatives): Mention that directives
6466 in the rules section must be terminated by semicolons.
6467
6468 2007-05-20 Joel E. Denny <jdenny@ces.clemson.edu>
6469
6470 Extend the front-end API for %define variables to more completely
6471 mirror the back-end. This will be useful in the future.
6472 * data/bison.m4 (b4_percent_define_get, b4_percent_define_ifdef):
6473 Update comments to mention the new front-end counterparts of these
6474 macros.
6475 * src/muscle_tab.c (MUSCLE_COMMON_DECODE): New macro with common code
6476 for muscle_string_decode and muscle_location_decode.
6477 (muscle_string_decode): New static function.
6478 (muscle_location_decode): Use MUSCLE_COMMON_DECODE.
6479 (muscle_percent_define_get, muscle_percent_define_ifdef): New
6480 functions.
6481 (muscle_percent_define_flag_if): Use muscle_percent_define_ifdef and
6482 muscle_percent_define_get to mimic the b4_percent_define_flag_if
6483 implementation more closely.
6484 (muscle_percent_define_invalid_value): New function.
6485 * src/muscle_tab.h (muscle_percent_define_get,
6486 muscle_percent_define_ifdef, muscle_percent_define_invalid_value):
6487 Prototype.
6488
6489 2007-05-07 Joel E. Denny <jdenny@ces.clemson.edu>
6490
6491 * NEWS (2.3a+): Mention yesterday's state-removal change.
6492 (2.3a): Remove the %language entry, which was added after 2.3a.
6493 * src/LR0.c, src/closure.c, src/closure.h, src/conflicts.c,
6494 src/conflicts.h, src/lalr.c, src/lalr.h, src/print.c,
6495 src/print_graph.c, src/state.c, src/state.h, tests/conflicts.at,
6496 tests/existing.at: Update copyright date.
6497
6498 2007-05-06 Joel E. Denny <jdenny@ces.clemson.edu>
6499
6500 If conflict resolution makes states unreachable, remove those states,
6501 report rules that are then unused, and don't report conflicts in those
6502 states.
6503 * src/conflicts.c, src/conflicts.h (conflicts_update_state_numbers):
6504 New global function.
6505 * src/lalr.c, src/lalr.h (lalr_update_state_numbers): New global
6506 function.
6507 * src/main.c (main): After conflict resolution, remove the unreachable
6508 states and update all data structures that reference states by number.
6509 * src/state.c (state_new): Initialize each state's reachable member to
6510 false.
6511 (state_mark_reachable_states): New static function.
6512 (state_remove_unreachable_states): New global function.
6513 * src/state.h (struct state): Add member bool reachable.
6514 (state_remove_unreachable_states): Prototype.
6515 * tests/conflicts.at (Unreachable States After Conflict Resolution):
6516 New test case.
6517 * tests/existing.at (GNU pic Grammar): Update test case output now that
6518 an unused rule is discovered.
6519
6520 2007-05-06 Joel E. Denny <jdenny@ces.clemson.edu>
6521
6522 Minor code cleanup in parser table construction.
6523 * src/LR0.c (new_itemsets): Use item_number_is_symbol_number.
6524 (new_itemsets, save_reductions): Update for rename to nitemset.
6525 * src/closure.c (nritemset): Rename to...
6526 (nitemset): ... this since the "r" appears to meaningless and isn't
6527 used in the comments.
6528 (closure): Update for rename.
6529 * src/closure.h (nritemset): Update extern to...
6530 (nitemset): ... this.
6531 * src/lalr.c (LA): Fix a typo in comments.
6532 * src/print.c (print_core): Update for rename to nitemset.
6533 * src/print_graph.c (print_graph): Likewise.
6534 * src/state.h: Fix some typos in header comments.
6535
6536 2007-04-04 Paul Eggert <eggert@cs.ucla.edu>
6537
6538 * THANKS: Use ASCII for Sebastien Fricker's name. Bison source
6539 still sticks to ASCII. Sorry!
6540
6541 * README-hacking: New file, taken mostly from coreutils, with changes
6542 for Bison. Contains much of the contents of:
6543 * README-cvs: Remove.
6544 * bootstrap: Sync from gnulib.
6545 * build-aux/.cvsignore: Remove *.t, mkinstalldirs.
6546 * lib/.cvsignore: Add wchar.h, wctype.h. Remove exit.h.
6547
6548 2007-03-10 Joel E. Denny <jdenny@ces.clemson.edu>
6549
6550 * doc/bison.texinfo (Destructor Decl): Fix typo reported by Sebastian
6551 Setzer.
6552 (Java Differences): Fix some typos.
6553 * THANKS: Add Sebastian Setzer.
6554
6555 2007-03-07 Paolo Bonzini <bonzini@gnu.org>
6556
6557 * data/java.m4 (b4_single_class_if): Remove.
6558 (b4_abstract_if): Look at "%define abstract".
6559 (b4_lexer_if): New.
6560 (b4_union_name): Rename...
6561 (b4_yystype): ... to this. Map to "%define stype".
6562 (b4_rhs_value, b4_parse_param_decl, b4_lex_param_decl,
6563 b4_maybe_throws): Fix quoting.
6564 (b4_lex_param_call): Move below to keep b4_*_param_decl close.
6565 * data/lalr1.java (Lexer interface): Always define.
6566 (Lexer interface within parser class): Remove.
6567 (YYLexer class): New, used when "%code lexer" is present.
6568 (constructor): When "%code lexer" is used, pass %lex-param
6569 to the lexer constructor.
6570 (yylex, yyparse): Remove %lex-param from method invocations
6571 (YYStack, yyaction, yyparse): Rename b4_union_name to b4_yystype.
6572
6573 * doc/bison.texinfo (Java Bison Interface): Mention "%define
6574 abstract". Rename "%define union_name" to "%define stype".
6575 Rename method names according to previous patch.
6576 (Java Scanner Interface): Describe "%code lexer" instead of
6577 "%pure-parser" and "%define single_class".
6578 (Java Differences): Mention "%code lexer".
6579
6580 * tests/java.at (_AT_DATA_JAVA_CALC_Y): Remove final argument.
6581 Include scanner here, using macros from tests/local.at.
6582 (AT_DATA_CALC_Y): Remove final argument.
6583 (_AT_CHECK_JAVA_CALC): Likewise.
6584 (AT_CHECK_JAVA_CALC): Likewise. Test all four combinations
6585 of %locations and %error-verbose.
6586 (main): Test with and without %lex-param.
6587 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Push AT_LEXPARAM_IF.
6588 (AT_BISON_OPTION_POPDEFS): Pop it.
6589
6590 2007-03-07 Juan Manuel Guerrero <juan.guerrero@gmx.de>
6591
6592 DJGPP spefic issue. Inhibit the use of disallowed characters for
6593 file name genertion on Win98, WinXP, etc. These are |<>":?*\
6594 and concern testsuite case 46.
6595 * Makefile.am: djgpp/testsuite.sed added to EXTRA_DIST
6596 * djgpp/testsuite.sed: Inhibit the use of disallowed characters.
6597 * djgpp/config.bat: Inhibit the use of disallowed characters.
6598
6599 2007-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
6600
6601 Miscellaneous %define and %code cleanup.
6602 * data/bison.m4 (b4_percent_define_flag_if): Correct comments on how
6603 values are interpreted.
6604 * doc/bison.texinfo (Decl Summary): Clean up and extend %define
6605 documentation a little more.
6606 * src/muscle_tab.c (MUSCLE_USER_NAME_CONVERT,
6607 muscle_percent_define_insert, muscle_percent_code_grow): New
6608 functions/macros.
6609 * src/muscle_tab.h (muscle_percent_define_insert,
6610 muscle_percent_code_grow): Prototype.
6611 * src/parse-gram.y (prologue_declaration): Use
6612 muscle_percent_define_insert and muscle_percent_code_grow when parsing
6613 %define and %code directives.
6614
6615 Make it easy to share %define boolean variables between the front-end
6616 and back-end. Though not used yet, this will be useful in the future.
6617 * data/bison.m4 (b4_check_user_names): Rewrite comments to talk about
6618 Bison uses of names rather than just skeleton uses of names.
6619 (b4_percent_define_get, b4_percent_define_ifdef): Rename
6620 b4_percent_define_skeleton_variables(VARIABLE) to
6621 b4_percent_define_bison_variables(VARIABLE).
6622 (b4_percent_code_get, b4_percent_code_ifdef): Rename
6623 b4_percent_code_skeleton_qualifiers(QUALIFIER) to
6624 b4_percent_code_bison_qualifiers(QUALIFIER).
6625 (b4_check_user_names_wrap): Update for renames.
6626 * src/muscle_tab.c, src/muscle_tab.h (muscle_percent_define_flag_if,
6627 muscle_percent_define_default): New functions mimicking
6628 b4_percent_define_flag_if and b4_percent_define_default.
6629
6630 For %define variables, report locations for invalid values and
6631 redefinitions.
6632 * data/bison.m4 (b4_percent_define_flag_if): Read
6633 b4_percent_define_loc(VARIABLE) to report the location of an invalid
6634 value for VARIABLE.
6635 (b4_percent_define_default): Save a special location in
6636 b4_percent_define_loc(VARIABLE) in case the default value for VARIABLE
6637 must later be reported as invalid.
6638 * src/muscle_tab.c (muscle_location_grow, muscle_location_decode): New
6639 functions.
6640 (muscle_percent_define_insert): Record the location of VARIABLE in
6641 muscle percent_define_loc(VARIABLE), and use it to report the previous
6642 location for a redefinition.
6643 (muscle_percent_define_flag_if): Update like b4_percent_define_flag_if.
6644 (muscle_percent_define_default): Update like b4_percent_define_default.
6645 (muscle_grow_user_name_list): Rename to...
6646 (muscle_user_name_list_grow): ... this for consistency and use
6647 muscle_location_grow.
6648 * src/muscle_tab.h (muscle_location_grow): Prototype.
6649 * tests/input.at (%define errors): Update expected output.
6650 * tests/skeletons.at (%define boolean variables: invalid skeleton
6651 defaults): New test case.
6652
6653 2007-02-28 Joel E. Denny <jdenny@ces.clemson.edu>
6654
6655 * src/print.c (lookahead_set, state_default_rule): Remove.
6656 (print_reductions): Replace state_default_rule invocation with
6657 equivalent use of yydefact, which was computed in token_actions in
6658 tables.c.
6659 (print_results): Don't allocate lookahead_set.
6660
6661 2007-02-27 Paolo Bonzini <bonzini@gnu.org>
6662
6663 * data/lalr1.java: Prefix all private members with yy.
6664
6665 2007-02-24 Joel E. Denny <jdenny@ces.clemson.edu>
6666
6667 Use YYFPRINTF instead of fprintf where appropriate. Reported by
6668 Sebastien Fricker at
6669 <http://lists.gnu.org/archive/html/bug-bison/2007-02/msg00035.html>.
6670 * THANKS: Add Sebastien Fricker.
6671 * data/glr.c, data/push.c, data/yacc.c (yy_reduce_print): Implement.
6672 * doc/bison.texinfo (Tracing): Make it clearer that YYFPRINTF must
6673 accept a variable number of arguments.
6674
6675 2007-02-19 Joel E. Denny <jdenny@ces.clemson.edu>
6676
6677 * bootstrap: Remove occurrences of .#bootmp from lib/Makefile.
6678
6679 2007-02-13 Juan Manuel Guerrero <juan.guerrero@gmx.de>
6680
6681 * djgpp/config.bat: Adjustments concerning the use of autoconf 2.61.
6682 * djgpp/config.sed: Adjustments concerning the use of autoconf 2.61.
6683 * djgpp/config.site: Adjustments concerning the use of autoconf 2.61.
6684
6685 2007-02-11 Paul Eggert <eggert@cs.ucla.edu>
6686
6687 Undo my 2007-02-07 change, switching back to the c-strcase module
6688 introduced in the 2007-02-03 change. Bruno Haible reported that
6689 the 2007-02-07 change would be dangerous in Turkish if we add a
6690 language whose name contains "i", since "i" is not lowercase "I"
6691 in Turkish.
6692 * bootstrap.conf (gnulib_modules): Add c-strcase. Remove strcase.
6693 * lib/.cvsignore: Add c-ctype.c, c-ctype.h, c-strcase.h,
6694 c-strcasecomp.c, c-strncasecmp.c. Remove strcasecmp.c, strncasecmp.c.
6695 * m4/.cvsignore: Remove strcase.m4.
6696 * src/getargs.c: Revert 2007-02-07 change, as follows.
6697 Include c-strcase.h.
6698 (language_argmatch): Use c_strcasecmp rather than strcasecmp.
6699
6700 2007-02-11 Bruno Haible <bruno@clisp.org>
6701
6702 Enable the Java related testsuite tests when the only Java compiler
6703 found is a gcj < 4.3. Discussed at
6704 <http://lists.gnu.org/archive/html/bug-bison/2007-02/msg00016.html>.
6705 * configure.ac (gt_JAVACOMP): Don't specify a target_version.
6706
6707 2007-02-11 Joel E. Denny <jdenny@ces.clemson.edu>
6708
6709 * data/Makefile.am: Update copyright date.
6710 * data/push.c (yypull_parse): Report memory exhaustion and return 2 if
6711 yypstate_new returns NULL.
6712 (yypstate_new): Return NULL if malloc does.
6713 * src/reader.c (packgram): Move translation of rule actions from the
6714 beginning of packgram to...
6715 (check_and_convert_grammar): ... here right before packgram is invoked
6716 so it's easier to write more complete comments, and remove redundant
6717 code.
6718
6719 2007-02-10 Joel E. Denny <jdenny@ces.clemson.edu>
6720
6721 As in semantic actions, make @$ in %initial-action, %destructor, and
6722 %printer imply %locations.
6723 * src/scan-code.l (SC_SYMBOL_ACTION): Set locations_flag = true when
6724 scanning @$.
6725 * tests/actions.at (AT_CHECK_ACTION_LOCATIONS): New macro supporting...
6726 (@$ in %initial-action implies %locations,
6727 @$ in %destructor implies %locations,
6728 @$ in %printer implies %locations): ... these new test cases.
6729
6730 2007-02-07 Paul Eggert <eggert@cs.ucla.edu>
6731
6732 Undo most of the 2007-02-03 change, switching to the strcase module
6733 now that gnulib strcase has been fixed.
6734 * bootstrap.conf (gnulib_modules): Remove c-strcase. Add strcase.
6735 * lib/.cvsignore: Remove c-ctype.c, c-ctype.h, c-strcase.h,
6736 c-strcasecomp.c, c-strncasecmp.c. Add strcasecmp.c, strncasecmp.c
6737 * m4/.cvsignore: Add strcase.m4.
6738 * src/getargs.c: Revert 2007-02-03 change, as follows.
6739 Don't include c-strcase.h.
6740 (language_argmatch): Use strcasecmp rather than c_strcasecmp.
6741 strcasecmp has "unspecified behavior" outside the POSIX locale,
6742 but it works fine in practice if at least one argument is ASCII,
6743 as is the case in Bison.
6744
6745 2007-02-07 Paolo Bonzini <bonzini@gnu.org>
6746
6747 * tests/java.at: Skip tests if only one of javac/java is present.
6748 Reported by Joel E. Denny.
6749 * tests/atlocal.in: Adjust copyright years.
6750
6751 2007-02-05 Paolo Bonzini <bonzini@gnu.org>
6752
6753 * data/lalr1.java (Stack): Work around old verifiers that disallow
6754 access to the private fields of an inner class, from the outer class.
6755 We can make Stack's fields public because user code doesn't have access
6756 to the instance of Stack used by parse(). Reported by Paul Eggert.
6757
6758 2007-02-03 Paul Eggert <eggert@cs.ucla.edu>
6759
6760 * .cvsignore: Add javacomp.sh, javaexec.sh. Is this really
6761 the right spot for these files?
6762 * bootstrap.conf (gnulib_modules): Add c-strcase.
6763 * lib/.cvsignore: Add c-ctype.c c-ctype.h, c-strcasecomp.c,
6764 c-strncasecmp.c.
6765 * src/getargs.c: Include c-strcase.h.
6766 (language_argmatch): Use c_strcasecmp rather than strcasecmp,
6767 to avoid unspecified behavior.
6768
6769 2007-02-01 Joel E. Denny <jdenny@ces.clemson.edu>
6770
6771 * doc/bison.texinfo (Decl Summary): Correct typo.
6772
6773 2007-01-30 Paolo Bonzini <bonzini@gnu.org>
6774
6775 * data/bison.m4 (b4_percent_define_flag_if): Don't treat 0 as false.
6776 Complain if the value does not match empty, "true" or "false".
6777 * data/c++.m4: Adjust default definitions of %define variables.
6778 * data/java.m4: Adjust default definitions of %define variables.
6779 * doc/bison.texinfo (Decl Summary): Adjust the %define entry according
6780 to above behavior.
6781 * tests/input.at (Boolean %define variables): Test new behavior.
6782
6783 2007-01-29 Paolo Bonzini <bonzini@gnu.org>
6784
6785 * NEWS: Mention java.
6786 * TODO: Remove things that are done.
6787 * bootstrap.conf: Add javacomp-script and javaexec-script.
6788 * configure.ac: Invoke gt_JAVACOMP and gt_JAVAEXEC.
6789
6790 * data/Makefile.am: Add new files.
6791 * data/java-skel.m4: New.
6792 * data/java.m4: New.
6793 * data/lalr1.java: New.
6794
6795 * doc/bison.texinfo: Put "A Complete C++ Example" under
6796 C++ Parsers. Add Java Parsers. Put C++ Parsers and Java Parsers
6797 under Other Languages.
6798
6799 * src/getargs.c (valid_languages): Add Java.
6800 * src/getargs.h (struct bison_language): Update size of string fields.
6801
6802 * tests/Makefile.am: Add java.at.
6803 * tests/atlocal.in: Add CONF_JAVA and CONF_JAVAC.
6804 * tests/java.at: New.
6805 * tests/testsuite.at: Include it.
6806
6807 2007-01-28 Joel E. Denny <jdenny@ces.clemson.edu>
6808
6809 Clean up.
6810 * src/scan-skel.l (at_directive_perform): Add at_directive_argc and
6811 at_directive_argv arguments so these no longer have to be global
6812 variables. Also, update the implementation for the following changes.
6813 (fail_for_at_directive_too_many_args,
6814 fail_for_at_directive_too_few_args): Add at_directive_name argument.
6815 (at_directive_name): Remove as at_directive_argv[0] will be used for
6816 this now.
6817 (AT_DIRECTIVE_ARGC_MAX): Increment to make space in at_directive_argv
6818 for the directive name.
6819 (at_directive_argc, at_directive_argv): Make these local within
6820 skel_lex instead of global.
6821 (INITIAL): Update directive start action for above changes.
6822 (SC_AT_DIRECTIVE_ARG): Rename to...
6823 (SC_AT_DIRECTIVE_ARGS): ... this, and update for above changes.
6824 (SC_AT_DIRECTIVE_SKIP_WS): Update.
6825 (scan_skel): Move yylex_destroy to...
6826 (skel_scanner_free): ... here.
6827 * tests/skeletons.at (installed skeleton file name): Rename to...
6828 (installed skeleton file names): ... this.
6829
6830 2007-01-27 Joel E. Denny <jdenny@ces.clemson.edu>
6831
6832 * ChangeLog: For changes in doc/bison.texinfo, consistently reference
6833 node names: say "Table of Symbols" not "Bison Symbols", and say "Decl
6834 Summary" not "Directives".
6835 * doc/bison.texinfo (Decl Summary, Calc++ Parser): Cross-reference the
6836 %code entry in "Decl Summary" rather than the one in "Table of Symbols"
6837 since the former is now the more complete one.
6838 (Prologue Alternatives): Likewise and do the same for %defines.
6839 (Table of Symbols): Add summary of %code, add summary of %define, and
6840 move full %code documentation to...
6841 (Decl Summary): ... here for consistency with other entries in these
6842 sections.
6843 Move %define entry in order to keep this list alphabetized.
6844 Reword %define entry a little to put less emphasis on the skeleton
6845 concept, which most users shouldn't have to think about.
6846
6847 2007-01-26 Paul Eggert <eggert@cs.ucla.edu>
6848
6849 Adjust to recent gnulib changes.
6850 * lib/.cvsignore: Remove stpcpy.h, strndup.h, strnlen.h.
6851 Add string.h, string_.h, unistd_.h, wchar_.h.
6852 * m4/.cvsignore: Add gnulib-common.m4, string_h.m4, wchar.m4.
6853 * src/system.h: Don't include <stpcpy.h>; this is now done by
6854 <string.h>.
6855
6856 2007-01-23 Paolo Bonzini <bonzini@gnu.org>
6857
6858 Simplify implementation of unqualified %code, implement macros for
6859 uniform treatment of boolean %define flags. Document %define.
6860 * data/bison.m4 (b4_percent_define_ifdef, b4_percent_define_flag_if,
6861 b4_percent_code_ifdef): New.
6862 (b4_percent_code_get): Map unqualified %code to b4_percent_code().
6863 * data/c++.m4: Define default value for global_tokens_and_yystype.
6864 * data/glr.cc: Likewise.
6865 * data/location.cc: Use b4_percent_define_flag_if.
6866
6867 * doc/bison.texinfo (Decl Summary): Document %define.
6868
6869 * src/parse-gram.y (Unqualified %code): Change muscle name to
6870 b4_percent_code().
6871 (content.opt): Default to empty.
6872
6873 2007-01-17 Joel E. Denny <jdenny@ces.clemson.edu>
6874
6875 Implement support for relative and absolute skeleton file names.
6876 Discussed starting at
6877 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00071.html>.
6878 * doc/bison.texinfo (Decl Summary): Document in %skeleton entry.
6879 (Bison Options): Document in --skeleton entry.
6880 * src/output.c (output_skeleton): Use strncpy rather than strcpy since
6881 full_skeleton can't necessarily hold all of pkgdatadir.
6882 If the specified skeleton file name contains a `/', don't prepend
6883 pkgdatadir.
6884 * src/parse-gram.y (prologue_declaration): If the specified skeleton
6885 file name contains a `/', prepend the grammar file directory.
6886 * tests/Makefile.am (TESTSUITE_AT): Add skeletons.at.
6887 * skeletons.at: New file.
6888 (relative skeleton file names): New test case.
6889 (installed skeleton file names): New test case.
6890 * tests/testsuite.at: Include skeletons.at.
6891
6892 * bootstrap: Update copyright to 2007.
6893
6894 2007-01-17 Paolo Bonzini <bonzini@gnu.org>
6895
6896 * bootstrap: Remove occurrences of .#bootmp from the files.
6897
6898 2007-01-17 Akim Demaille <akim@epita.fr>
6899
6900 * doc/bison.texinfo (Calc++ Parser): Don't try to alias
6901 nonterminals.
6902 Use per-type %printer.
6903
6904 2007-01-17 Joel E. Denny <jdenny@ces.clemson.edu>
6905
6906 * NEWS, data/c++-skel.m4, data/c++.m4, data/c-skel.m4, data/c.m4,
6907 data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
6908 djgpp/config.site, src/files.c, src/files.h, src/main.c,
6909 src/muscle_tab.c, src/muscle_tab.h, src/parse-gram.y, src/reader.h,
6910 src/scan-skel.h, src/scan-skel.l, tests/actions.at, tests/calc.at,
6911 tests/glr-regression.at, tests/input.at, tests/local.at,
6912 tests/output.at, tests/torture.at: Update copyright to 2007.
6913
6914 2007-01-16 Akim Demaille <akim@epita.fr>
6915
6916 * doc/bison.texinfo (Calc++ Parsing Driver): Let "parse" return an
6917 error code.
6918 (Calc++ Scanner): Exit with failure if we can't open the input
6919 file.
6920 Accept "-" standing for stdin.
6921 (Calc++ Top Level): Print the result only if the parsing was
6922 successful.
6923
6924 2007-01-16 Akim Demaille <akim@epita.fr>
6925
6926 * data/lalr1.cc (yy_reduce_print_): Add a missing end-of-line.
6927
6928 2007-01-15 Paolo Bonzini <bonzini@gnu.org>
6929 and Joel E. Denny <jdenny@ces.clemson.edu>
6930
6931 Clean up %define and %code implementation in M4 some. Most
6932 importantly, rename all related macros to be in the b4_percent_define
6933 and b4_percent_code namespaces. Also, complete support for `.' in
6934 %define variable names and %code qualifiers.
6935 * data/bison.m4 (b4_check_user_names): Check for special
6936 "SKELETON-NAMESPACE(name)" macros instead of using two nested
6937 m4_foreach loops.
6938 (b4_get_percent_define, b4_get_percent_code): Rename to...
6939 (b4_percent_define_get, b4_percent_code_get): ... these.
6940 Extend documentation with examples.
6941 For SKELETON-NAMESPACE (as documented for b4_check_user_names), use
6942 b4_percent_define_skeleton_variables and
6943 b4_percent_code_skeleton_qualifiers.
6944 Expect any value for the %define variable `foo' to be stored in the
6945 macro named `b4_percent_define(foo)'; expect any %code blocks for the
6946 qualifier `foo' to be stored in a macro named `b4_percent_code(foo)';
6947 expect any unqualified %code blocks to be stored in a macro named
6948 `b4_percent_code_unqualified'.
6949 Use m4_indir so that %define variable names and %code qualifiers can
6950 contain `.', which is allowed by the grammar parser.
6951 (b4_percent_define_default): New macro to set a default value for a
6952 %define variable.
6953 (m4_wrap): Update wrapped code, and fix some underquoting.
6954 (b4_check_user_names_wrap): Update and define outside the m4_wrap.
6955 Expect grammar uses of %define variables and %code qualifiers to be
6956 defined in b4_percent_define_user_variables and
6957 b4_percent_code_user_qualifiers.
6958 * data/c++.m4: Use b4_percent_define_default rather than
6959 m4_define_default. Fix some underquoting. Skeleton usage of %define
6960 variable define_location_comparison now implies skeleton usage of
6961 %define variable filename_type.
6962 * data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
6963 data/push.c, data/yacc.c: Update macro names.
6964 * src/parse-gram.y (prologue_declaration, grammar_declaration): Update
6965 muscle names.
6966
6967 2007-01-14 Juan Manuel Guerrero <juan.guerrero@gmx.de>
6968
6969 DJGPP specific issues.
6970
6971 * djgpp/config.site: Set ac_cv_path_mkdir to a sane DJGPP specific
6972 default. Set gl_cv_absolute_wctype_h to a sane DJGPP specific default.
6973
6974 2007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
6975
6976 * tests/glr-regression.at: Use AT_PARSER_CHECK rather than AT_CHECK to
6977 run parsers in all tests so that Valgrind is invoked during
6978 maintainer-check-valgrind.
6979 (Duplicate representation of merged trees): Free all semantic values.
6980 (Duplicated user destructor for lookahead): Likewise.
6981
6982 2007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
6983
6984 * tests/local.at (AT_PARSER_CHECK): Add a PRE argument to specify a
6985 command-line prefix.
6986 * tests/torture.at (Exploding the Stack Size with Alloca): Stderr is
6987 ignored, so use that PRE to set --log-fd=1 in VALGRIND_OPTS so we don't
6988 miss Valgrind messages.
6989 (Exploding the Stack Size with Malloc): Likewise.
6990
6991 2007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
6992
6993 Ignore YYSTACK_USE_ALLOCA for push parsers since the stacks can't be
6994 locals. Reported by Juan Manuel Guerrero at
6995 <http://lists.gnu.org/archive/html/bug-bison/2007-01/msg00000.html>.
6996 * data/push.c: Enclose the #ifdef YYSTACK_USE_ALLOCA in b4_push_if.
6997 Fix some indentation also.
6998 * tests/torture.at (Exploding the Stack Size with Alloca): Add comment
6999 explaining this issue.
7000
7001 2007-01-09 Paolo Bonzini <bonzini@gnu.org>
7002 and Joel E. Denny <jdenny@ces.clemson.edu>
7003
7004 Simplify union and prologue handling, and escape union and lex/parse
7005 params with digraphs.
7006 * data/bison.m4 (b4_pre_prologue, b4_post_prologue): Set their default
7007 values to the empty string since these are no longer guaranteed
7008 initialized by the front-end.
7009 * data/glr.c, data/glr.cc, data/lalr1.cc, data/push.c, data/yacc.c: Add
7010 braces around b4_user_stype since this is no longer done by the
7011 front-end.
7012 * src/files.c, src/files.h (pre_prologue_obstack,
7013 post_prologue_obstack): Remove.
7014 * src/muscle_tab.c (muscle_pair_list_grow): Don't duplicate header
7015 comments here. Use MUSCLE_OBSTACK_SGROW so that values are escaped
7016 with digraphs. This fixes lex params and parse params.
7017 * src/muscle_tab.h (muscle_pair_list_grow): Update comments.
7018 * src/output.c (prepare): Remove muscle insertion of the prologues.
7019 (output): Remove freeing of pre_prologue_obstack and
7020 post_prologue_obstack.
7021 * src/parse-gram.y (prologue_declaration): Use muscle_code_grow rather
7022 than prologue_augment for prologue parsing so you don't need prologue
7023 obstacks.
7024 (grammar_declaration): For %union RHS, use `braceless' instead of
7025 "{...}" so that braces are already stripped and code is escaped with
7026 digraphs.
7027 * src/reader.c (prologue_augment): Remove.
7028 (reader): Remove initialization of pre_prologue_obstack and
7029 post_prologue_obstack.
7030 * src/reader.h (prologue_augment): Remove.
7031
7032 * data/c.m4: Remove stray parenthesis.
7033
7034 2007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
7035
7036 Remove quotes from variables names in %define directives and from
7037 qualifiers in %code directives, and restrict the characters that are
7038 allowed in them to M4-friendly ones. For %define, continue to support
7039 the quoted form as a deprecated feature. Discussed starting at
7040 <http://lists.gnu.org/archive/html/bison-patches/2007-01/msg00023.html>.
7041 * NEWS (2.3a+): Add entry for the change to %define. Update entry for
7042 %code.
7043 * doc/bison.texinfo (Prologue Alternatives): Update.
7044 (Decl Summary): In %defines entry, update mention of `%code requires'
7045 and `%code provides'.
7046 (C++ Location Values): Update %define uses.
7047 (Calc++ Parser Interface): Likewise.
7048 (Calc++ Parser): Likewise, and update `%code requires' uses.
7049 (Table of Symbols): Update %code documentation.
7050 * src/parse-gram.y (prologue_declaration): For %define variables, use
7051 `variable' instead of `STRING'.
7052 (grammar_declaration): For %code qualifiers, use `ID' instead of
7053 `STRING'.
7054 (variable): New nonterminal that takes an `ID' or a `STRING'.
7055 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Update %code
7056 and %define uses.
7057 * tests/calc.at (_AT_DATA_CALC_Y): Update %define use.
7058 * tests/input.at (Reject unused %code qualifiers): Update %code uses.
7059 (%define errors): Update %define uses.
7060
7061 2007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
7062
7063 * src/parse-gram.y (prologue_declaration): Use MUSCLE_INSERT_STRING
7064 instead of muscle_insert for %define values so that M4-special
7065 characters are replaced with digraphs.
7066 * tests/input.at (%define errors): Extend to check weird values.
7067
7068 2007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
7069
7070 Instead of having skeletons declare all valid %define variables and
7071 %code qualifiers, provide macros that retrieve the associated values
7072 and build these lists automatically. Thus Bison will now warn when a
7073 variable or qualifier is not used by the skeleton in the current
7074 invocation regardless of whether it might sometimes be used by that
7075 skeleton in other invocations. Also, move all %define value macros to
7076 the b4_percent_define_ namespace, and remove the %define "NAME" {CODE}
7077 form, which is replaced by %code.
7078 * data/bison.m4 (b4_check_for_unrecognized_names): Rename to...
7079 (b4_check_user_names): ... this, and change the series of valid name
7080 arguments to a single list argument for names used in the skeleton
7081 similar to the existing list argument for names used in the grammar.
7082 Warn instead of complaining.
7083 (b4_get_percent_define, b4_get_percent_code): New to retrieve %define
7084 values and %code code, to format %code code properly, and to build
7085 lists of all %define variables and %code qualifiers used in the
7086 skeleton: b4_skeleton_percent_define_variables and
7087 b4_skeleton_percent_code_qualifiers.
7088 (b4_check_percent_define_variables, b4_check_percent_code_qualifiers):
7089 Remove, and...
7090 (m4_wrap): ... m4_wrap b4_check_user_names invocations instead so that
7091 the skeleton names lists can finish building first. In place of
7092 b4_used_percent_define_variables and b4_used_percent_code_qualifiers,
7093 expect the lists b4_user_percent_define_variables and
7094 b4_user_percent_code_qualifiers.
7095 * data/c++.m4: Where setting default values for b4_parser_class_name,
7096 b4_location_type, b4_filename_type, b4_namespace, and
7097 b4_define_location_comparison, update their names to the
7098 b4_percent_define_ namespace.
7099 * data/glr.c: Don't use b4_check_percent_define_variables and
7100 b4_check_percent_code_qualifiers. Use b4_get_percent_code.
7101 * data/glr.cc, data/lalr1.cc: Likewise, and use b4_get_percent_define.
7102 (b4_parser_class_name, b4_namespace): Define these using
7103 b4_get_percent_define for parser_class_name and namespace.
7104 * data/location.cc: Use b4_get_percent_define.
7105 * data/push.c: Don't use b4_check_percent_define_variables and
7106 b4_check_percent_code_qualifiers. Use b4_get_percent_code.
7107 * data/yacc.c: Likewise, and don't call m4_exit in
7108 b4_use_push_for_pull_if or m4_wrap code will never execute.
7109 * src/muscle_tab.c, src/muscle_tab.h (muscle_grow_used_name_list):
7110 Rename to...
7111 (muscle_grow_user_name_list): ... this for consistency with the
7112 terminology used in bison.m4.
7113 * src/parse-gram.y (prologue_declaration): Prepend "percent_define_" to
7114 %define variable names, and rename muscle used_percent_define_variables
7115 to user_percent_define_variables.
7116 (grammar_declaration): Rename muscle used_percent_code_qualifiers to
7117 user_percent_code_qualifiers.
7118 (content): Remove.
7119 (content.opt): Replace content RHS with STRING RHS so %define "NAME"
7120 {CODE} form is no longer accepted.
7121 * tests/input.at (Reject bad %code qualifiers): Rename to...
7122 (Reject unused %code qualifiers): ... this, and update test output.
7123 (%define error): Update test output.
7124
7125 2007-01-07 Joel E. Denny <jdenny@ces.clemson.edu>
7126
7127 Check for unrecognized %define variables similar to checking for
7128 unrecognized %code qualifiers. Check for redefined %define variables.
7129 * data/bison.m4 (b4_check_for_unrecognized_names): New macro that
7130 generalizes...
7131 (b4_check_percent_code_qualifiers): ... this, which now wraps it.
7132 (b4_check_percent_define_variables): New, also wraps it.
7133 * data/glr.c: Unless glr.cc is wrapping glr.c, declare no valid %define
7134 variables using b4_check_percent_define_variables.
7135 * data/glr.cc, data/lalr1.cc: Declare the valid %define variables as
7136 all those exercised in the test suite and all those listed in the
7137 `Default values' section of c++.m4. Are there others?
7138 * data/push.c, data/yacc.c: Declare no valid %define variables.
7139 * src/muscle_tab.c, src/muscle_tab.h (muscle_find_const): New function,
7140 similar to muscle_find, but it works even when the muscle stores a
7141 const value.
7142 (muscle_grow_used_name_list): New function for constructing the used
7143 name list muscles that b4_check_for_unrecognized_names requires.
7144 * src/parse-gram.y (prologue_declaration): Warn if a variable is
7145 %define'd more than once. Define the b4_used_percent_define_variables
7146 muscle with muscle_grow_used_name_list.
7147 (grammar_declaration): Abbreviate %code code with
7148 muscle_grow_used_name_list.
7149 * tests/input.at (%define errors): New.
7150
7151 2007-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
7152
7153 Provide warn_at, complain_at, and fatal_at function callbacks to the
7154 skeletons, and use this for %code qualifier complaints.
7155 * data/bison.m4 (b4_error_at): New, invoked by...
7156 (b4_warn_at, b4_complain_at, b4_fatal_at): ... these new macros to wrap
7157 the skeleton scanner's new @warn_at(...@), @complain_at(...@), and
7158 @fatal_at(...@) directives.
7159 (b4_check_percent_code_qualifiers): Rewrite to expect locations for
7160 qualifiers in b4_used_percent_code_qualifiers and to use
7161 b4_complain_at.
7162 * src/location.c, src/location.h (boundary_set_from_string): New global
7163 function.
7164 * src/muscle_tab.c, src/muscle_tab.h (muscle_boundary_grow): New global
7165 function.
7166 * src/parse-gram.y (grammar_declaration): Add locations for qualifiers
7167 to b4_used_percent_code_qualifiers.
7168 * src/scan-skel.l (fail_for_at_directive_too_few_args): New static
7169 function.
7170 (AT_DIRECTIVE_ARGC_MAX): Increase for boundary arguments.
7171 (lineno): Rename to...
7172 (out_lineno): ... this so I don't misunderstand it again.
7173 (SC_AT_DIRECTIVE_SKIP_WS): Don't increment out_lineno for newlines
7174 here; these newlines are in the input but not the output file.
7175 (SC_AT_DIRECTIVE_ARG): Likewise. Extract directive execution to...
7176 (at_directive_perform): ... this new static function, and add handling
7177 of new @warn_at(...@), @complain_at(...@), and @fatal_at(...@)
7178 directives.
7179 * tests/input.at (Reject bad %code qualifiers): Update test output with
7180 locations and extend.
7181
7182 * tests/output.at (Output file name: [, Output file name: ]): Remove
7183 bogus comment about these tests failing.
7184
7185 2007-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
7186
7187 Clean up b4_check_percent_code_qualifiers a little.
7188 * data/bison.m4 (b4_check_percent_code_qualifiers): Expect qualifiers
7189 in b4_used_percent_code_qualifiers to be double-M4-quoted. Rewrite
7190 documentation and add examples.
7191 * src/parse-gram.y (grammar_declaration): Double-M4-quote those
7192 qualifiers here.
7193
7194 2007-01-05 Joel E. Denny <jdenny@ces.clemson.edu>
7195
7196 Don't use m4_divert since it makes m4_divert_push and m4_divert_pop
7197 unreliable -- especially when they're hidden inside another macro.
7198 * data/bison.m4, data/c++-skel.m4, data/c++.m4, data/c-skel.m4,
7199 data/c.m4: Remove m4_divert(-1).
7200 * data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
7201 data/push.c, data/yacc.c: Likewise, and replace m4_divert(0) with
7202 m4_divert_push(0) and m4_divert_pop(0).
7203 * src/output.c (output_skeleton): Don't add an m4_divert_push(0) and
7204 an m4_wrap([m4_divert_pop(0)]) to the M4. Diversion -1, which is
7205 pushed and popped by m4sugar, should be first on the stack.
7206
7207 Provide warn, complain, and fatal function callbacks to the skeletons.
7208 This provides more flexibility than m4_fatal, improves the error
7209 message format, and captures messages for translation. Discussed
7210 starting at
7211 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00063.html>.
7212 * data/bison.m4 (b4_error): New, invoked by...
7213 (b4_warn, b4_complain, b4_fatal): ... these new macros to wrap the
7214 skeleton scanner's new @warn(...@), @complain(...@), and @fatal(...@)
7215 directives. Because these M4 macros might be called when the current
7216 diversion is -1 or 0, m4_divert_push and m4_divert_pop is used; thus
7217 the previous removal of uses of m4_divert, which caused trouble.
7218 (b4_check_percent_code_qualifiers): Use b4_complain instead of
7219 m4_fatal to report unrecognized %code qualifiers.
7220 * data/c++-skel.m4: Use b4_complain instead of m4_fatal to report C++
7221 push parser requests.
7222 * data/glr.c: Use b4_complain instead of m4_fatal to report
7223 non-deterministic push parser requests.
7224 Update @output usage to @output(...@) form.
7225 * data/glr.cc, data/lalr1.cc: Use b4_fatal instead of m4_fatal to
7226 report missing %defines. Update @output usage to @output(...@) form.
7227 * data/location.cc, data/push.c, data/yacc.c: Update @output usage to
7228 @output(...@) form.
7229 * src/main.c (main): Invoke skel_scanner_free.
7230 * src/scan-skel.h (skel_scanner_free): Prototype new function.
7231 * src/scan-skel.l (FLEX_NO_OBSTACK): Don't define; we now need the
7232 obstack_for_string from flex-scanner.h.
7233 (YY_DECL): Use to declare skel_lex static.
7234 (decode_at_digraphs): Remove; now handled in the new
7235 SC_AT_DIRECTIVE_ARG start condition.
7236 (fail_for_at_directive_too_many_args, fail_for_invalid_at): New static
7237 functions.
7238 (at_directive_name, AT_DIRECTIVE_ARGC_MAX, at_directive_argc,
7239 at_directive_argv): New static globals.
7240 (INITIAL): Use fail_for_invalid_at.
7241 Don't parse `@output file_name\n' or `@basename(...@)'. Instead,
7242 recognize the start of a generalized `@directive(...@)' form and
7243 start...
7244 (SC_AT_DIRECTIVE_ARG): ... this new start condition to parse the
7245 directive args (using the new obstack_for_string), to decode the
7246 contained @ diagraphs, and to perform the directive. It recognizes
7247 @basename(...@), @warn(...@), @complain(...@), @fatal(...@), and
7248 @output(...@).
7249 (SC_AT_DIRECTIVE_SKIP_WS): New start condition started by
7250 SC_AT_DIRECTIVE_ARG to skip whitespace after the argument delimiter,
7251 `@,'.
7252 (scan_skel): Initialize obstack_for_string on the first call.
7253 (skel_scanner_free): New function to free obstack_for_string.
7254 * tests/input.at (Reject bad %code qualifiers): Update test output.
7255
7256 2007-01-04 Joel E. Denny <jdenny@ces.clemson.edu>
7257
7258 Consolidate the 4 prologue alternative directives (%code, %requires,
7259 %provides, and %code-top) into a single %code directive with an
7260 optional qualifier field. Discussed at
7261 <http://lists.gnu.org/archive/html/bison-patches/2007-01/msg00012.html>.
7262 * NEWS (2.3a+): Rewrite the existing entry for the prologue
7263 alternatives.
7264 * doc/bison.texinfo (Prologue Alternatives): Update.
7265 (Decl Summary): Update to %code "requires" and %code "provides".
7266 (Calc++ Parser): Update to %code "requires".
7267 (Table of Symbols): Remove entries for %requires, %provides, and
7268 %code-top. Rewrite %code entry, and add a %code "QUALIFIER" entry.
7269 * data/bison.m4 (b4_user_provides, b4_user_requires): Remove as these
7270 are replaced by b4_percent_code_provides and b4_percent_code_requires,
7271 which are skeleton-specific.
7272 (b4_check_percent_code_qualifiers): New. A skeleton can use this to
7273 declare what %code qualifiers it supports and to complain if any other
7274 qualifiers were used in the grammar.
7275 * data/glr.cc: Update to use b4_user_code([b4_percent_code_requires])
7276 and b4_user_code([b4_percent_code_provides]) in place of
7277 b4_user_requires and b4_user_provides.
7278 * data/glr.c, data/lalr1.cc, data/push.c, data/yacc.c: Likewise.
7279 Add b4_user_code([b4_percent_code_top]) and
7280 b4_user_code([b4_percent_code]).
7281 Invoke b4_check_percent_code_qualifiers.
7282 * src/parse-gram.y (PERCENT_CODE_TOP, PERCENT_PROVIDES,
7283 PERCENT_REQUIRES): Remove.
7284 (grammar_declaration): Remove RHS's for %code-top, %provides, and
7285 %requires. Rewrite the %code RHS as the unqualified form defining the
7286 muscle b4_percent_code. Add another RHS for the qualified %code form,
7287 which defines muscles of the form b4_percent_code_QUALIFIER and the
7288 b4_used_percent_code_qualifiers muscle.
7289 * src/scan-gram.l (PERCENT_CODE_TOP, PERCENT_PROVIDES,
7290 PERCENT_REQUIRES): Remove.
7291 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Update to use
7292 %code "requires" and %code "provides".
7293 * tests/input.at (Reject bad %code qualifiers): New.
7294
7295 2007-01-03 Joel E. Denny <jdenny@ces.clemson.edu>
7296
7297 Use the new code_props interface for destructors and printers.
7298 * src/symtab.h (symbol, semantic_type): Remove destructor_location and
7299 printer_location members, and change the type of the destructor and
7300 printer members to code_props.
7301 (symbol_destructor_set, symbol_destructor_get, symbol_printer_set,
7302 symbol_printer_get, semantic_type_destructor_set,
7303 semantic_type_printer_set, default_tagged_destructor_set,
7304 default_tagless_destructor_set, default_tagged_printer_set,
7305 default_tagless_printer_set): Use code_props in arguments and return
7306 types in place of char const * and location.
7307 (symbol_destructor_location_get, symbol_printer_location_get): Remove
7308 since the locations are now contained in the return of
7309 symbol_destructor_get and symbol_printer_get.
7310 * src/output.c (symbol_destructors_output, symbol_printers_output):
7311 Replace with...
7312 (symbol_code_props_output): ... this to eliminate duplicate code.
7313 (output_skeleton): Update to use symbol_code_props_output.
7314 * src/reader.c (symbol_should_be_used): Update use of
7315 symbol_destructor_get.
7316 * src/symlist.c (symbol_list_destructor_set, symbol_list_printer_set):
7317 Update uses of the various _destructor_set and _printer_set functions.
7318 * src/symtab.c: (default_tagged_destructor_location,
7319 default_tagless_destructor_location, default_tagged_printer_location,
7320 default_tagless_printer_location): Remove since we...
7321 (default_tagged_destructor, default_tagless_destructor,
7322 default_tagged_printer, default_tagless_printer): ... change the type
7323 of these to code_props.
7324 (symbol_new, semantic_type_new, symbol_destructor_set,
7325 semantic_type_destructor_set, symbol_destructor_get,
7326 symbol_printer_set, semantic_type_printer_set, symbol_printer_get,
7327 symbol_check_alias_consistency, default_tagged_destructor_set,
7328 default_tagless_destructor_set, default_tagged_printer_set,
7329 default_tagless_printer_set): Update.
7330 (symbol_destructor_location_get, symbol_printer_location_get): Remove.
7331 (SYMBOL_CODE_PRINT): New similar to SYMBOL_ATTR_PRINT but for
7332 code_props members.
7333 (symbol_print): Use SYMBOL_CODE_PRINT.
7334
7335 2007-01-03 Joel E. Denny <jdenny@ces.clemson.edu>
7336
7337 Use the new code_props interface for rule actions.
7338 * src/symlist.h (symbol_list): Replace action, action_location, and
7339 used members with a code_props action_props member.
7340 * src/reader.c (symbol_should_be_used, grammar_rule_check,
7341 grammar_midrule_action, grammar_current_rule_merge_set,
7342 grammar_current_rule_symbol_append, packgram): Update.
7343 * src/scan-code.h (translate_rule_action): Remove, no longer used.
7344 * src/scan-code.l (handle_action_dollar): Update.
7345 (translate_rule_action): Remove, no longer used.
7346 * src/symlist.c (symbol_list_sym_new, symbol_list_syms_print): Update.
7347
7348 2007-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
7349
7350 Use the new code_props interface in parse-gram.y.
7351 * src/parse-gram.y (prologue_declaration, braceless, epilogue.opt):
7352 Update all uses of translate_* functions to use the new code_props
7353 interface and to use gram_scanner_last_string_free and
7354 code_scanner_last_string_free where possible.
7355 (grammar_declaration): symbol_list_destructor_set and
7356 symbol_list_printer_set now perform the translation, so don't do it
7357 here. Use gram_scanner_last_string_free where possible.
7358 * src/scan-code.h, src/scan-code.l (translate_symbol_action,
7359 translate_code): Remove, no longer used.
7360 * src/symlist.h, src/symlist.c (symbol_list_destructor_set,
7361 symbol_list_printer_set): Perform code translation here rather than
7362 depending on the caller to do so.
7363
7364 * src/symlist.h (struct symbol_list): Correct some documentation typos.
7365 * src/scan-gram.h (gram_last_string): Remove declaration.
7366 * src/scan-gram.l (last_string): Declare it static.
7367
7368 2007-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
7369
7370 Encapsulate code properties and related functionality for the various
7371 destructors, printers, and actions into a code_props structure and
7372 interface. This patch merely implements code_props in scan-code.h and
7373 scan-code.l. Future patches will rewrite other modules to use it.
7374 Discussed starting at
7375 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00020.html>.
7376 * src/location.h (EMPTY_LOCATION_INIT): Define so that it's easier to
7377 consistently initialize const structs that have an empty location
7378 field.
7379 * src/location.c (empty_location): Initialize with EMPTY_LOCATION_INIT
7380 to ensure consistency.
7381 * src/scan-code.h (code_props): New structure.
7382 (code_props_none_init, CODE_PROPS_NONE_INIT, code_props_none): New
7383 function, macro, and const global variable for initializing a
7384 code_props with no code.
7385 (code_props_plain_init, code_props_symbol_action_init,
7386 code_props_rule_action_init, code_props_translate_code): The rest of
7387 the new code_props functional interface. Among other things, the init
7388 functions set the code_props kind field so that
7389 code_props_translate_code will know whether to behave like
7390 translate_symbol_action, translate_rule_action, or translate_code.
7391 These old translate functions must remain until all other modules are
7392 updated to use the new code_props interface.
7393 (code_scanner_last_string_free): New function similar to
7394 gram_scanner_last_string_free.
7395 (code_scanner_free): Add documentation.
7396 * src/scan-code.l: Implement the new interface.
7397 (code_lex): Make it static, add a code_props* argument, and remove the
7398 rule argument.
7399 (last_string): New static global similar to the one in scan-gram.l.
7400 (SC_RULE_ACTION): Update to use the code_props* argument to code_lex
7401 instead of rule.
7402 (SC_SYMBOL_ACTION): For $$, set the is_value_used member of the
7403 code_props since Bison may one day use this information for destructors
7404 and printers.
7405 (<*><<EOF>>): Use STRING_FINISH so that last_string is set.
7406 (handle_action_dollar): Use symbol_list_n_get and set used flag
7407 directly since symbol_list_n_used_set is removed.
7408 (translate_action): Add a code_props* argument and remove the rule,
7409 action, and location arguments. Pass the code_props* on to code_lex.
7410 (translate_rule_action, translate_symbol_action, translate_code):
7411 Rewrite as wrappers around the new code_props interface.
7412 * src/symlist.h, src/symlist.c (symbol_list_n_used_set): Remove since
7413 it would eventually need to break the encapsulation of code_props.
7414
7415 2007-01-01 Joel E. Denny <jdenny@ces.clemson.edu>
7416
7417 * etc/.cvsignore: New.
7418
7419 2007-01-01 Joel E. Denny <jdenny@ces.clemson.edu>
7420
7421 Add maintainer-push-check to run maintainer-check using push parsing in
7422 place of pull parsing where available.
7423 * Makefile.am (maintainer-push-check): New.
7424 * data/bison.m4 (b4_use_push_for_pull_if): New.
7425 * data/push.c: Redefine b4_push_if and b4_use_push_for_pull_if
7426 appropriately based on their existing values.
7427 (yypush_parse): Don't print push-parser-specific diagnostics if push
7428 parsing is being used in place of pull parsing.
7429 * data/yacc.c: If push parsing should replace pull parsing, redirect to
7430 push.c.
7431 * src/output.c (prepare): Check BISON_USE_PUSH_FOR_PULL environment
7432 variable, and insert b4_use_push_for_pull_flag into muscles.
7433 * tests/Makefile.am (maintainer-push-check): New.
7434
7435 2006-12-31 Joel E. Denny <jdenny@ces.clemson.edu>
7436
7437 * data/push.c (yypush_parse): Set yynew = 1 at the end of a parse
7438 (whether successful or failed) so that yypush_parse can be invoked
7439 again to start a new parse using the same yypstate.
7440 * tests/torture.at (AT_DATA_STACK_TORTURE): For push mode, extend to
7441 check multiple yypull_parse invocations on the same yypstate. For pull
7442 mode, extend to check multiple yyparse invocations.
7443 (Exploding the Stack Size with Alloca): Extend to try with
7444 %push-pull-parser.
7445 (Exploding the Stack Size with Malloc): Likewise.
7446
7447 * tests/calc.at (Simple LALR Calculator): Don't specify
7448 %skeleton "push.c" since %push-pull-parser implies that now.
7449 * tests/headers.at (export YYLTYPE): Don't check for the push
7450 declarations. Otherwise, this test case can't be used to see if push
7451 mode can truly emulate pull mode.
7452 * tests/input.at (Torturing the Scanner): Likewise.
7453 * tests/local.at (AT_YACC_OR_PUSH_IF, AT_PUSH_IF): Remove.
7454 (AT_YYERROR_SEES_LOC_IF): Rather than AT_YACC_OR_PUSH_IF, use
7455 AT_YACC_IF, which now includes the case of push mode since %skeleton
7456 need not be used for push mode. This will be more intuitive once
7457 push.c is renamed to yacc.c.
7458
7459 2006-12-31 Joel E. Denny <jdenny@ces.clemson.edu>
7460
7461 For push mode, convert yyparse from a macro to a function, invoke yylex
7462 instead of passing a yylexp argument to yypull_parse, and don't
7463 generate yypull_parse or yyparse unless %push-pull-parser is declared.
7464 Discussed starting at
7465 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00163.html>.
7466 * data/bison.m4 (b4_pull_if): New.
7467 * data/c.m4 (b4_identification): Define YYPULL similar to YYPUSH.
7468 * data/push.c: Improve M4 quoting a little.
7469 (b4_generate_macro_args, b4_parenthesize): Remove.
7470 (yyparse): If there's a b4_prefix, #define this to b4_prefix[parse]
7471 any time a pull parser is requested.
7472 Don't #define this as a wrapper around yypull_parse. Instead, when
7473 both push and pull are requested, make it a function that does that
7474 same thing.
7475 (yypull_parse): If there's a b4_prefix, #define this to
7476 b4_prefix[pull_parse] when both push and pull are requested.
7477 Don't define this as a function unless both push and pull are
7478 requested.
7479 Remove the yylexp argument and hard-code yylex invocation instead.
7480 * etc/bench.pl.in (bench_grammar): Use %push-pull-parser instead of
7481 %push-parser.
7482 * src/getargs.c (pull_parser): New global initialized to true.
7483 * getargs.h (pull_parser): extern it.
7484 * src/output.c (prepare): Insert pull_flag muscle.
7485 * src/parse-gram.y (PERCENT_PUSH_PULL_PARSER): New token.
7486 (prologue_declaration): Set both push_parser and pull_parser = true for
7487 %push-pull-parser. Set push_parser = true and pull_parser = false for
7488 %push-parser.
7489 * src/scan-gram.l: Don't accept %push_parser as an alternative to
7490 %push-parser since there's no backward-compatibility concern here.
7491 Scan %push-pull-parser.
7492 * tests/calc.at (Simple LALR(1) Calculator): Use %push-pull-parser
7493 instead of %push-parser.
7494 * tests/headers.at (export YYLTYPE): Make yylex static, and don't
7495 prototype it in the module that calls yyparse.
7496 * tests/input.at (Torturing the Scanner): Likewise.
7497 * tests/local.at (AT_PUSH_IF): Check for %push-pull-parser as well.
7498
7499 2006-12-26 Joel E. Denny <jdenny@ces.clemson.edu>
7500
7501 Update etc/bench.pl. Optimize push mode a little (the yyn change
7502 deserves most of the credit).
7503 * Makefile.am (SUBDIRS): Add etc subdirectory.
7504 * configure.ac (AC_CONFIG_FILES): Add etc/bench.pl and etc/Makefile.
7505 * data/push.c (b4_declare_parser_state_variables): Move yyn, yyresult,
7506 yytoken, yyval, and yyloc declarations to...
7507 (yyparse or yypush_parse): ... here to improve performance. For
7508 yypush_parse invocations after the first, be sure to assign yyn its old
7509 value again.
7510 (yypstate_new): Don't bother initializing the yyresult field since the
7511 initial value isn't used.
7512 (yyn, yyresult, yytoken, yyval, yyloc): For each NAME in this list,
7513 remove the #define that, in push mode, set it to yyps->NAME.
7514 * etc/Makefile.am: New.
7515 * etc/bench.pl: Remove and build it instead from...
7516 * etc/bench.pl.in: ... this new file. Use @abs_top_builddir@ to invoke
7517 "tests/bison" from the build directory by default rather than just
7518 invoking "bison" from $PATH.
7519 (calc_grammar): Update push parser code: don't declare yylval globally,
7520 don't define yyparse_wrapper, and don't #define yyparse.
7521 (bench_grammar): Update to check all working combinations of yacc.c,
7522 push.c, impure, pure, pull, and push.
7523
7524 2006-12-25 Joel E. Denny <jdenny@ces.clemson.edu>
7525
7526 For push mode, add pull wrappers around yypush_parse.
7527 * data/push.c: (b4_generate_macro_args, b4_parenthesize): New macros.
7528 (yypull_parse): New function wrapping yypush_parse.
7529 (yyparse): New #define wrapping yypull_parse.
7530 * tests/calc.at (_AT_DATA_CALC_Y): Call yyparse even when %push-parser
7531 is declared.
7532 * tests/headers.at (export YYLTYPE): Make yylex global. For push mode,
7533 prototype yylex in the module that calls yyparse, and don't prototype
7534 yyparse there. Otherwise, the yyparse expansion won't compile.
7535 * tests/input.at (Torturing the Scanner): Likewise.
7536
7537 2006-12-25 Joel E. Denny <jdenny@ces.clemson.edu>
7538
7539 Enable push parsers to operate in impure mode. Thus, %push-parser no
7540 longer implies %pure-parser. The point of this change is to move
7541 towards being able to test the push parser code by running the entire
7542 test suite as if %push-parser had been declared.
7543 * data/push.c (yypush_parse): For impure mode, remove the
7544 yypushed_char, yypushed_val, and yypushed_loc arguments.
7545 Instead, declare these as local variables initialized to the global
7546 yychar, yylval, and yylloc.
7547 For the first yypush_parse invocation only, restore the initial values
7548 of these global variables when it's time to read a token since they
7549 have been overwritten.
7550 * src/parse-gram.y (prologue_declaration): Don't set pure_parser for
7551 %push-parser.
7552 * tests/calc.at (Simple LALR(1) Calculator): Always declare
7553 %pure-parser along with %push-parser since this test case was designed
7554 for pure push parsers.
7555 * tests/local.at (AT_PURE_OR_PUSH_IF): Remove unused.
7556 (AT_YACC_OR_PUSH_IF): New.
7557 (AT_YYERROR_SEES_LOC_IF): Fix enough that the test suite passes, but
7558 add a note that it's still wrong for some cases (as it has been for a
7559 while).
7560 (AT_PURE_LEX_IF): Use AT_PURE_IF instead of AT_PURE_OR_PUSH_IF since
7561 %push-parser no longer implies %pure-parser.
7562
7563 2006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
7564
7565 Remove some unnecessary differences between the pull parser code and
7566 the push parser code. This patch enables yynerrs in push mode.
7567 * data/push.c: Reformat M4 a little.
7568 (b4_yyerror_range): Remove and convert all uses to just yyerror_range.
7569 (b4_declare_scanner_communication_variables): Don't omit yynerrs just
7570 because push mode is on. Instead, if pure mode is on, move yynerrs
7571 to...
7572 (b4_declare_parser_state_variables): ... here.
7573 (yynerrs, yyerror_range): For push mode, #define each NAME in this list
7574 to yyps->NAME so it can be used in yypush_parse.
7575 (yypush_parse): Don't omit uses of yynerrs in push mode.
7576
7577 2006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
7578
7579 Fix bug such that the first pushed token's value and location are
7580 sometimes overwritten (sometimes by %initial-action) before being used.
7581 * data/push.c (yypush_parse): Rename arguments yynchar, yynlval, and
7582 yynlloc to yypushed_char, yypushed_val, and yypushed_loc for clarity.
7583 For the first yypush_parse invocation, initialize yychar to YYEMPTY to
7584 more closely mimic the pull parser logic.
7585 Don't copy the pushed token to yychar, yylval, and yylloc until it's
7586 time to read a token, which is after any initialization of yylval and
7587 yylloc.
7588 (gottoken): Rename label to...
7589 (yyread_pushed_token): ... for clarity and to avoid infringing on the
7590 user namespace.
7591
7592 2006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
7593
7594 Rearrange initialization of the parser state variables so that the
7595 skeleton doesn't have to have a copy for pull mode and another for push
7596 mode. This patch also fixes at least a bug such that yylloc was not
7597 initialized (with b4_location_initial_line and
7598 b4_location_initial_column) upon calling yypush_parse. However, that
7599 initialization now overwrites the first token's location;
7600 %initial-action assigning @$ already did the same thing, and both bugs
7601 will be fixed in a later patch.
7602 * data/push.c (b4_yyssa): Remove and convert all uses to just yyssa.
7603 (b4_declare_parser_state_variables): Remove initialization of yytoken,
7604 yyss, yyvs, yyls, and yystacksize.
7605 (yypstate_new): Remove initialization of some yypstate fields: yystate,
7606 yyerrstatus, yytoken, yyss, yyvs, yyls, yystacksize, yyssp, yyvsp, and
7607 yylsp.
7608 (yyssa, yyvsa, yylsa): For push mode, #define each NAME in this list to
7609 yyps->NAME so it can be used in yypush_parse.
7610 (yyparse or yypush_parse): For yypush_parse, don't print the
7611 "Starting parse" diagnostic for invocations after the first.
7612 Add initialization of yytoken, yyss, yyvs, yyls, and yystacksize; for
7613 yypush_parse, only do it for the first invocation.
7614 Allow yystate, yyerrstatus, yyssp, yyvsp, yylsp, and yylloc
7615 initialization to occur in yypush_parse but only on the first
7616 invocation.
7617
7618 2006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
7619
7620 * data/push.c: Add CPP guards around push parser declarations in both
7621 the header and the code file.
7622 In the code file, move the push parser declarations to the same place
7623 they appear in the header file.
7624 Clean up the M4 some, especially the inconsistent underquoting in
7625 some b4_c_function_def and b4_c_function_decl uses.
7626
7627 2006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
7628
7629 Encapsulate the push parser state variables into an M4 macro so the
7630 push skeleton doesn't have to list them again for pull mode's yyparse.
7631 For push mode, remove yypush_parse's local equivalents of these
7632 variables to eliminate unnecessary copying between the two sets at
7633 run-time. This patch also fixes at least a bug related to multiple
7634 %initial-action invocations in push mode.
7635 * data/push.c (b4_declare_parser_variables): Rename to...
7636 (b4_declare_scanner_communication_variables): ... this for clarity and
7637 update both uses.
7638 (b4_declare_yyparse_variables): Remove and move its contents to the one
7639 spot where it was invoked.
7640 (b4_declare_parser_state_variables): New macro containing the parser
7641 state variables required by push mode.
7642 (struct yypstate): Replace all fields but yynew with
7643 b4_declare_parser_state_variables.
7644 (yystate, yyn, yyresult, yyerrstatus, yytoken, yyss, yyssp, yyvs,
7645 yyvsp, yyls, yylsp, yystacksize, yyval, yyloc): For push mode, #define
7646 each NAME in this list to yyps->NAME so it can be used in yypush_parse.
7647 (yyparse or yypush_parse): For yyparse in pull mode, replace local
7648 parser state variable declarations with
7649 b4_declare_parser_state_variables.
7650 Don't initialize parser state variables when calling yypush_parse since
7651 yypstate_new already does that.
7652 Invoke the user's initial action only upon the first yypush_parse
7653 invocation.
7654 Remove all code that copies between the local parser state variables
7655 and the yypstate.
7656
7657 2006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
7658
7659 * data/push.c (union yyalloc): Rename yyss, yyvs, and yyls fields to
7660 prevent a name collision in a future patch where these names will
7661 sometimes be #define'd.
7662 (YYSTACK_RELOCATE): Add an argument to select a union yyalloc field
7663 since it no longer has the same name as the existing argument.
7664 (yyparse or yypush_parse): Update all uses of YYSTACK_RELOCATE.
7665
7666 2006-12-19 Paolo Bonzini <bonzini@gnu.org>
7667 and Joel E. Denny <jdenny@ces.clemson.edu>
7668
7669 * doc/bison.texinfo (Decl Summary): In the %language entry, mention
7670 that the argument is case-insensitive, and there's no `=' here.
7671 For the %skeleton entry, mention that %language is better.
7672 (Bison Options): Likewise for --language and --skeleton. Move the
7673 --skeleton entry so that the `Tuning the parser' section is sorted
7674 alphabetically on long options.
7675 (C++ Bison Interface): Don't use the word skeleton. Don't explain the
7676 %language directive in detail here; cross-reference the %language
7677 documentation instead.
7678 (Calc++ Parser): Use `%require "@value{VERSION}"' rather than
7679 `%require "2.3b"' so that the example is always up-to-date.
7680 (Table of Symbols): Add entries for %language and %skeleton.
7681 * examples/extexi (normalize): Instead of replacing every %require
7682 argument with the current Bison version, just substitute for
7683 `@value{VERSION}'. This guarantees that we're testing what actually
7684 appears in the documentation.
7685 * examples/calc++/Makefile.am ($(calc_extracted)): Use `$(VERSION)'
7686 rather than `@VERSION@'.
7687
7688 2006-12-18 Paul Eggert <eggert@cs.ucla.edu>
7689
7690 * NEWS: Reword the %language news a bit, and put it earlier.
7691
7692 * src/getargs.c (skeleton_arg): Last arg is now location const *.
7693 Rewrite to simplify the logic.
7694 (language_argmatch): Likewise.
7695 (program_name): We now own this var.
7696 * src/getargs.h (struct bison_language): Use char[] rather than
7697 const char *.
7698
7699 * doc/bison.texinfo (Decl Summary, Bison Options): Don't claim
7700 Java is supported.
7701 * src/complain.c (program_name): Remove decl; no longer needed.
7702 * src/main.c (program_name): Remove; now belongs to getargs.
7703
7704 2006-12-18 Paolo Bonzini <bonzini@gnu.org>
7705
7706 * NEWS: Document %language.
7707
7708 * data/Makefile.am (dist_pkgdata_DATA): Add c-skel.m4, c++-skel.m4.
7709
7710 * data/c-skel.m4, data/c++-skel.m4: New files.
7711 * data/glr.c: Complain on push parsers.
7712
7713 * doc/bison.texinfo (C++ Parser Interface): Prefer %language
7714 over %skeleton.
7715 (Decl Summary): Document %language and %skeleton.
7716 (Command line): Document -L.
7717
7718 * examples/extexi: Rewrite %require directive.
7719 * examples/calc++/Makefile.am: Pass VERSION to extexi.
7720
7721 * src/files.c (compute_exts_from_gc): Look in language structure
7722 for .y extension.
7723 (compute_file_name_parts): Check whether .tab should be added.
7724 * src/getargs.c (valid_languages, skeleton_prio, language_prio):
7725 (language, skeleton_arg, language_argmatch): New.
7726 (long_options): Add --language.
7727 (getargs): Use skeleton_arg, add -L/--language.
7728 * src/getargs.h: Include location.h.
7729 (struct bison_language, language, skeleton_arg, language_argmatch): New.
7730 * src/output.c (prepare): Pick default skeleton from struct language.
7731 Don't dispatch C skeletons here.
7732 * src/parse-gram.y (PERCENT_LANGUAGE): New.
7733 (prologue_declaration): Add "%language" rule, use skeleton_arg.
7734 * src/scan-gram.l ("%language"): New rule.
7735
7736 * tests/calc.at: Test %skeleton and %language.
7737 * tests/local.at (AT_SKEL_CC_IF): Look for %language.
7738 (AT_GLR_IF): Look for %skeleton "glr.cc".
7739 (AT_LALR1_CC_IF, AT_GLR_CC_IF): Rewrite.
7740 (AT_YACC_IF): Reject %language.
7741
7742 2006-12-18 Paul Eggert <eggert@cs.ucla.edu>
7743
7744 * src/symtab.h (struct semantic_type): Remove the tag 'semantic_type',
7745 since it wasn't used; only the typedef name 'semantic_type' is needed.
7746 Also, omit trailing white space.
7747
7748 * bootstrap: Sync from coreutils.
7749 (gnulib_extra_files): Add build-aux/announce.gen.
7750 (slurp): Adjust .gitignore files like .cvsignore files.
7751 * build-aux/announce-gen: Remove from CVS, since bootstrap
7752 now creates this.
7753
7754 2006-12-16 Joel E. Denny <jdenny@ces.clemson.edu>
7755
7756 Make %push-parser imply %pure-parser. This fixes several bugs; see
7757 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00148.html>.
7758 * src/parse-gram.y (prologue_declaration): For %push-parser, also set
7759 pure_parser = true.
7760 * data/push.c: Don't bother testing b4_push_if when deciding whether
7761 to expand b4_declare_parser_variables globally.
7762 (yypush_parse): Likewise in here.
7763
7764 * data/push.c (yypush_parse): Add b4_parse_param to arguments.
7765 (yy_reduce_print): Reformat M4 for readability.
7766
7767 2006-12-15 Bob Rossi <bob@brasko.net>
7768 and Joel Denny <jdenny@ces.clemson.edu>
7769
7770 * data/push.c (yypstate): Add typedef, and update all uses of
7771 struct yypstate to just yypstate.
7772 * tests/calc.at (_AT_DATA_CALC_Y): Update here as well.
7773
7774 2006-12-14 Bob Rossi <bob@brasko.net>
7775
7776 * data/push.c (yypush_parse): Declare prototype regardless of
7777 %locations option.
7778
7779 2006-12-14 Bob Rossi <bob@brasko.net>
7780
7781 * data/push.c (yyparse): Remove the prototype and the #define when in
7782 push-parser mode.
7783
7784 2006-12-13 Bob Rossi <bob@brasko.net>
7785
7786 * data/push.c (yypstate_init): Rename to...
7787 (yypstate_new): ... this and use b4_c_function_def.
7788 (yypstate_delete): New.
7789 (yypush_parse): Change parameters yynval and yynlloc to be const.
7790 * tests/calc.at (_AT_DATA_CALC_Y): Use new yypstate_new and
7791 yypstate_delete functions.
7792
7793 2006-12-13 Joel E. Denny <jdenny@ces.clemson.edu>
7794
7795 * configure.ac (AC_PREREQ): Require Autoconf 2.61 because of our
7796 strange test case titles. Reported by Bob Rossi.
7797
7798 2006-12-13 Paul Eggert <eggert@cs.ucla.edu>
7799
7800 * TODO: Add pointer to Sylvain Schmitz's work on static detection
7801 of potential ambiguities in GLR grammers.
7802
7803 2006-12-12 Joel E. Denny <jdenny@ces.clemson.edu>
7804
7805 * tests/testsuite.at (AT_CHECK): When checking if $1 starts with
7806 `bison ', use m4_index instead of m4_substr since chopping up a string
7807 containing M4-special characters causes problems here.
7808
7809 Fix a couple of bugs related to special characters in user-specified
7810 file names, and make it easier for skeletons to compute output file
7811 names with the same file name prefix as Bison-computed output file
7812 names.
7813 * data/glr.cc, data/push.c, data/yacc.c: In @output, use
7814 b4_parser_file_name and b4_spec_defines_file instead of
7815 @output_parser_name@ and @output_header_name@, which are now redundant.
7816 * data/glr.c, data/lalr1.cc: Likewise. Also, in header #include's, use
7817 b4_parser_file_name, b4_spec_defines_file, and the new
7818 @basename(FILENAME@) instead of @output_parser_name@ and
7819 @output_header_name@, which inappropriately escaped the file names as
7820 C string literals.
7821 * src/files.c (all_but_ext): Remove static qualifier.
7822 (compute_output_file_names): Move `free (all_but_ext)' to...
7823 (output_file_names_free): ... here since all_but_ext is needed later.
7824 * src/files.h (all_but_ext): Extern.
7825 * src/muscle_tab.h (MUSCLE_INSERT_STRING_RAW): New macro that does
7826 exactly what MUSCLE_INSERT_STRING used to do.
7827 (MUSCLE_INSERT_STRING): Use MUSCLE_OBSTACK_SGROW so that M4-special
7828 characters are escaped properly.
7829 * src/output.c (prepare): Define muscle file_name_all_but_ext as
7830 all_but_ext.
7831 For pkgdatadir muscle, maintain previous functionality by using
7832 MUSCLE_INSERT_STRING_RAW instead of MUSCLE_INSERT_STRING. The problem
7833 is that b4_pkgdatadir is used inside m4_include in the skeletons, so
7834 digraphs would never be expanded. Hopefully no one has M4-special
7835 characters in his Bison installation path.
7836 * src/scan-skel.l: Don't parse @output_header_name@ and
7837 @output_parser_name@ anymore since they're now redundant.
7838 In @output, use decode_at_digraphs.
7839 Parse a new @basename command that invokes last_component.
7840 (decode_at_digraphs): New.
7841 (BASE_QPUTS): Remove unused.
7842 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): New macro.
7843 (Output file name): New tests.
7844
7845 2006-12-09 Joel E. Denny <jdenny@ces.clemson.edu>
7846
7847 Warn about output files that are generated by the skeletons and that
7848 conflict with other output files.
7849 * data/glr.c: Don't generate the header file here when glr.cc does.
7850 * src/files.c (file_names, file_names_count): New static globals.
7851 (compute_output_file_names): Invoke output_file_name_check for files
7852 not generated by the skeletons and remove existing checks.
7853 (output_file_name_check): New function that warns about conflicting
7854 output file names.
7855 (output_file_names_free): Free file_names.
7856 * src/files.h (output_file_name_check): Declare.
7857 * src/scan-skel.l: Invoke output_file_name_check for files generated by
7858 the skeletons.
7859 * tests/output.at (AT_CHECK_CONFLICTING_OUTPUT): New.
7860 (Conflicting output files): New tests.
7861
7862 2006-12-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
7863
7864 * doc/bison.texinfo: Fix a couple of typos.
7865
7866 2006-12-08 Bob Rossi <bob@brasko.net>
7867
7868 * data/push.c: (yypvarsinit, yypvars, struct yypvars, yypushparse):
7869 Rename to...
7870 (yypstate_init, yypstate, struct yypstate, yypush_parse): ... these and
7871 update all uses.
7872 (b4_yyssa, b4_yyerror_range, yypstate_init): Rename pv to yyps.
7873 (yypush_parse): Rename yypvars argument to yyps and remove redundant
7874 local pv.
7875 (yypstate_init, yypush_parse): Declare in Bison-generated header file.
7876 * tests/calc.at (_AT_DATA_CALC_Y): Use newly named functions.
7877
7878 2006-12-07 Bob Rossi <bob@brasko.net>
7879 and Joel Denny <jdenny@ces.clemson.edu>
7880
7881 * data/push.c (yypvarsinit): Change return type from void* to struct
7882 yypvars*. No longer cast to void* on return.
7883 (struct yypvars): Remove yylen since it need not be remembered between
7884 yypushparse invocations.
7885 (yypushparse): Don't copy between yylen and pv->yylen.
7886
7887 2006-12-05 Bob Rossi <bob@brasko.net>
7888
7889 * data/push.c (yychar_set, yylval_set, yylloc_set): Delete.
7890 (yypushparse): Add yynchar, yynlval, yynlloc parameters.
7891 (b4_declare_parser_variables): Do not declare yynerrs for push mode.
7892 (struct yypvars): Remove b4_declare_parser_variables.
7893 (yypvarsinit): Remove init code for removed variables.
7894 (global scope): Do not declare b4_declare_parser_variables if
7895 push or pure mode.
7896 (yypushparse): Add b4_declare_parser_variables.
7897 Init new local variables, and remove init code for removed
7898 yypvars variables.
7899 (yyparse): Delete.
7900 * tests/calc.at (_AT_DATA_CALC_Y): Call yypushparse for push mode
7901 and yyparse for other modes.
7902 (AT_CHECK_CALC_LALR): Added '%skeleton "push.c"' for push tests.
7903 * tests/local.at (AT_PUSH_IF, AT_PURE_OR_PUSH_IF): Added.
7904 (AT_YYERROR_SEES_LOC_IF): push-parser makes this false.
7905 (AT_PURE_LEX_IF): True if pure or push parser.
7906
7907 2006-12-05 Joel E. Denny <jdenny@ces.clemson.edu>
7908
7909 Document Yacc prologue alternatives and default %destructor's and
7910 %printer's as experimental. Don't mention Java yet. Discussed at
7911 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00002.html>.
7912 * NEWS (2.3a+): Say they're experimental. Remove any mention of Java.
7913 (2.3a): Annotate this entry to say the old forms of these features were
7914 also experimental.
7915 * doc/bison.texinfo (Prologue Alternatives, Freeing Discarded Symbols,
7916 Table of Symbols): Say they're experimental. Comment out any mention
7917 of Java (we'll want this back eventually).
7918
7919 2006-12-01 Joel E. Denny <jdenny@ces.clemson.edu>
7920
7921 Support a file name argument to %defines. Deprecate `=' in
7922 %file-prefix, %name-prefix, and %output. Discussed at
7923 <http://lists.gnu.org/archive/html/help-bison/2006-09/msg00001.html>.
7924 * NEWS (2.3a+): Mention.
7925 * doc/bison.texinfo (Decl Summary, Table of Symbols): Add entry for new
7926 form of %defines, and remove `=' from entries for %file-prefix,
7927 %name-prefix, and %output.
7928 * src/parse-gram.y (prologue_declaration): Implement.
7929 * tests/calc.at (Simple LALR Calculator, Simple GLR Calculator, Simple
7930 LALR1 C++ Calculator, Simple GLR C++ Calculator): Remove the `=' from
7931 all but one occurrence of %name-prefix.
7932 * tests/headers.at (export YYLTYPE): Remove the `=' from %name-prefix.
7933 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Likewise.
7934 * tests/output.at (AT_CHECK_OUTPUT): Remove the `=' from all but one
7935 occurrence of each of %file-prefix and %output. Add check for %defines
7936 with argument.
7937 * tests/reduce.at (Useless Terminals, Useless Nonterminals,
7938 Useless Rules, Reduced Automaton, Underivable Rules, Empty Language):
7939 Remove the `=' from %output.
7940
7941 2006-11-21 Joel E. Denny <jdenny@ces.clemson.edu>
7942
7943 Don't escape $ in test case titles since Autoconf 2.61 now does that
7944 correctly.
7945 * tests/actions.at (Default %printer and %destructor are not for error
7946 or $undefined): Here.
7947 (Default %printer and %destructor are not for $accept): Here.
7948 * tests/input.at (Invalid $n and @n): Here.
7949
7950 2006-11-20 Joel E. Denny <jdenny@ces.clemson.edu>
7951
7952 Rename <!> to <>. Discussed starting at
7953 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00039.html>.
7954 * NEWS (2.3a+): Update.
7955 * doc/bison.texinfo (Freeing Discarded Symbols, Table of Symbols):
7956 Update.
7957 * src/parse-gram.y (TYPE_TAG_NONE, generic_symlist_item): Implement.
7958 * src/scan-gram.l (INITIAL): Implement.
7959 * src/symlist.c (symbol_list_default_tagless_new): Update comment.
7960 * src/symlist.h (symbol_list, symbol_list_default_tagless_new): Update
7961 comment.
7962 * tests/actions.at (Default tagless %printer and %destructor,
7963 Default tagged and per-type %printer and %destructor,
7964 Default %printer and %destructor are not for error or $undefined,
7965 Default %printer and %destructor are not for $accept,
7966 Default %printer and %destructor for mid-rule values): Update.
7967 * tests/input.at (Default %printer and %destructor redeclared,
7968 Unused values with default %destructor): Update.
7969
7970 2006-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
7971
7972 Don't let %prec take a nonterminal.
7973 * src/reader.c (grammar_current_rule_prec_set): Make the %prec symbol a
7974 token.
7975 * tests/input.at (%prec takes a token): New test checking that %prec
7976 won't take a nonterminal.
7977
7978 2006-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
7979
7980 * tests/testsuite.at (AT_CHECK): Don't miss an exit value of 0 because
7981 it was double-quoted.
7982 * src/Makefile.am (YACC): Use --warnings=all,error so that Bison's own
7983 grammar is maintained with Bison's highest standards.
7984 * src/getargs.c: Fix some typos in Doxygen comments.
7985
7986 2006-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
7987
7988 Fix memory leaks in scanners generated by at least Flex 2.5.9 and
7989 later. Reported by Paul Eggert in
7990 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00014.html>.
7991 * src/flex-scanner.h (yylex_destroy): Define for Flex before 2.5.9.
7992 * src/scan-code.l (translate_action): Don't bother invoking
7993 yy_delete_buffer (YY_CURRENT_BUFFER) before creating the first buffer.
7994 (code_scanner_free): Instead of invoking
7995 yy_delete_buffer (YY_CURRENT_BUFFER) directly, invoke yylex_destroy,
7996 which frees more.
7997 * src/scan-gram.l (gram_scanner_free): Likewise.
7998 * src/scan-skel.l (scan_skel): Likewise.
7999
8000 2006-11-09 Joel E. Denny <jdenny@ces.clemson.edu>
8001
8002 * src/files.c (tr): Change return type to void.
8003 * src/muscle_tab.c (muscle_insert): Free storage in case muscle_grow
8004 has been called previously for the same key.
8005 (muscle_find): Return storage instead of value so that
8006 --enable-gcc-warnings doesn't produce warnings that the return discards
8007 const. aver that the value and storage are the same since storage
8008 could potentially be NULL when value is not.
8009 * tests/testsuite.at (AT_CHECK): Treat an unspecified exit value the
8010 same as 0.
8011
8012 2006-11-08 Paul Eggert <eggert@cs.ucla.edu>
8013
8014 * bootstrap.conf (excluded_files): Exclude m4/codeset.m4 (undoing
8015 the earlier change today), m4/intl.m4, m4/intldir.m4. This gives
8016 us a slightly cleaner distribution, and also works.
8017 * m4/.cvsignore: Add inline.m4, wint_t.m4 to accommodate recent
8018 gnulib changes.
8019
8020 2006-11-08 Joel E. Denny <jdenny@ces.clemson.edu>
8021 and Paul Eggert <eggert@cs.ucla.edu>
8022
8023 Don't let Bison leak memory except when it complains.
8024 * src/files.h (parser_file_name, spec_verbose_file, spec_graph_file):
8025 (spec_defines_file, dir_prefix): Now char *, not const char *,
8026 since they are freed.
8027 * src/files.c: Likewise.
8028 (all_but_ext, all_but_tab_ext, src_extension, header_extension):
8029 Likewise.
8030 (tr): Now operates in-place. All uses changed.
8031 (compute_exts_from_gf, compute_exts_from_src): Don't leak temporary
8032 values.
8033 (compute_file_name_parts, compute_output_file_names): Don't store
8034 read-only data in variables that will be freed.
8035 (compute_output_file_names): Free all_but_ext, all_but_tab_ext,
8036 src_extension, and header_extension.
8037 (output_file_names_free): New public function to free
8038 spec_verbose_file, spec_graph_file, spec_defines_file,
8039 parser_file_name, and dir_prefix.
8040 * src/getargs.c (getargs): Don't store read-only data in variables that
8041 will be freed.
8042 * src/main.c (main): Invoke output_file_names_free, code_scanner_free
8043 (which previously existed but was unused), and quotearg_free.
8044 * src/muscle_tab.h (muscle_insert): value arg is now a `char const *'.
8045 * src/muscle_tab.c: Likewise.
8046 (muscle_entry): Make the value char const *,
8047 and add a new storage member that is char * and can be freed.
8048 (muscle_entry_free): New private function.
8049 (muscle_init): Use it instead of free.
8050 (muscle_insert, muscle_grow): Update and use new storage member.
8051 (muscle_code_grow): Free the string passed to muscle_grow
8052 since it's not needed anymore.
8053 * src/parse-gram.y (%union): Make `chars' member a `char const *', and
8054 add a new `char *code' member.
8055 ("{...}"): Declare semantic type as code.
8056 * src/scan-code.h (translate_rule_action):
8057 (translate_symbol_action, translate_code, translate_action): Return
8058 `char const *' rather than `char *' since external code should not free
8059 these strings.
8060 * src/scan-code.l: Likewise.
8061 * src/scan-gram.l (<SC_BRACED_CODE>): Use val->code for BRACED_CODE,
8062 which is "{...}" in the parser.
8063 * tests/Makefile.am (maintainer-check-valgrind): Set
8064 VALGRIND_OPTS='--leak-check=full --show-reacheable=yes' before invoking
8065 Valgrind.
8066 * tests/calc.at (_AT_DATA_CALC_Y): fclose the FILE* so Valgrind doesn't
8067 complain.
8068 * tests/testsuite.at (AT_CHECK): Redefine so that running Bison and
8069 expecting a non-zero exit status sets --leak-check=summary and
8070 --show-reachable=no for Valgrind. Bison unabashedly leaks memory in
8071 this case, and we don't want to hear about it.
8072
8073 2006-11-08 Paul Eggert <eggert@cs.ucla.edu>
8074
8075 * bootstrap (runtime-po/Makevars): Derive from po/Makevars
8076 instead of from the template, to simplify configuration a bit.
8077 * bootstrap.conf (excluded_files): Don't exclude m4/codeset.m4
8078 and m4/wint_t.m4, as they are needed with the latest gnulib.
8079
8080 2006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
8081
8082 Disable unset/unused mid-rule value warnings by default, and recognize
8083 --warnings=midrule-values to enable them. Discussed starting at
8084 <http://lists.gnu.org/archive/html/help-bison/2006-10/msg00030.html>.
8085 * NEWS (2.3a+): Mention.
8086 * src/getargs.c, src/getargs.h (warnings_args, warnings_types, enum
8087 warnings): Add entry for midrule-values subargument.
8088 * src/reader.c (symbol_should_be_used): Don't return true just because
8089 the value is a set/used mid-rule value unless
8090 --warnings=midrule-values was specified.
8091 * tests/input.at (Unused values, Unused values before symbol
8092 declarations): Run tests with and without --warnings=midrule-values.
8093
8094 * src/reader.c (check_and_convert_grammar): Use symbol_list_free rather
8095 than LIST_FREE directly.
8096
8097 2006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
8098
8099 Finish implementing --warnings=error, which should not be implied by
8100 --warnings=all (or by its synonyms -W and --warnings without
8101 subarguments).
8102 * src/complain.c (set_warning_issued): New function to report that
8103 warnings are being treated as errors and to record an error if so.
8104 Invoke...
8105 (warn_at, warn): ... here.
8106 * src/getargs.c (warnings_args, warnings_types): Reorder so that
8107 "error - warnings are errors" does not appear above "all - all of the
8108 above".
8109 (getargs): For -W and --warnings without subarguments, don't let
8110 FLAGS_ARGMATCH set warnings_error in warnings_flag.
8111 * src/getargs.h (enum warnings): Unset warnings_error in warnings_all.
8112
8113 2006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
8114
8115 * src/getargs.c (flags_argmatch): Don't cause segmentation fault for
8116 empty subargument list. For example: `bison --warnings= parser.y'.
8117
8118 2006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
8119
8120 * data/push.c, data/yacc.c: Make sure there's a newline at the end of
8121 the parser header file so that gcc doesn't warn.
8122
8123 2006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
8124
8125 Split the default %destructor/%printer into two kinds: <*> and <!>.
8126 Discussed starting at
8127 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00060.html>.
8128 * NEWS (2.3a+): Mention.
8129 * doc/bison.texinfo (Freeing Discarded Symbols): Document this and the
8130 previous change today related to mid-rules.
8131 (Table of Symbols): Remove %symbol-default and add <*> and <!>.
8132 * src/parse-gram.y (PERCENT_SYMBOL_DEFAULT): Remove.
8133 (TYPE_TAG_ANY): Add as <*>.
8134 (TYPE_TAG_NONE): Add as <!>.
8135 (generic_symlist_item): Remove RHS for %symbol-default and add RHS's
8136 for <*> and <!>.
8137 * src/scan-gram.l (PERCENT_SYMBOL_DEFAULT): Remove.
8138 (TYPE_TAG_ANY, TYPE_TAG_NONE): Add.
8139 * src/symlist.c (symbol_list_default_new): Split into tagged and
8140 tagless versions.
8141 (symbol_list_destructor_set, symbol_list_printer_set): Split
8142 SYMLIST_DEFAULT case into SYMLIST_DEFAULT_TAGGED and
8143 SYMLIST_DEFAULT_TAGLESS.
8144 * src/symlist.h: Update symbol_list_default*_new prototypes.
8145 (symbol_list.content_type): Split enum value SYMLIST_DEFAULT into
8146 SYMLIST_DEFAULT_TAGGED and SYMLIST_DEFAULT_TAGLESS.
8147 * src/symtab.c (default_destructor, default_destructor_location,
8148 default_printer, default_printer_location): Split each into tagged and
8149 tagless versions.
8150 (symbol_destructor_get, symbol_destructor_location_get,
8151 symbol_printer_get, symbol_printer_location_get): Implement tagged
8152 default and tagless default cases.
8153 (default_destructor_set, default_printer_set): Split each into tagged
8154 and tagless versions.
8155 * src/symtab.h: Update prototypes.
8156 * tests/actions.at (Default %printer and %destructor): Rename to...
8157 (Default tagless %printer and %destructor): ... this, and extend.
8158 (Per-type %printer and %destructor): Rename to...
8159 (Default tagged and per-type %printer and %destructor): ... this, and
8160 extend.
8161 (Default %printer and %destructor for user-defined end token): Extend.
8162 (Default %printer and %destructor are not for error or $undefined):
8163 Update.
8164 (Default %printer and %destructor are not for $accept): Update.
8165 (Default %printer and %destructor for mid-rule values): Extend.
8166 * tests/input.at (Default %printer and %destructor redeclared): Extend.
8167 (Unused values with default %destructor): Extend.
8168
8169 2006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
8170
8171 Don't apply the default %destructor/%printer to an unreferenced midrule
8172 value. Mentioned at
8173 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00104.html>.
8174 * src/symtab.c (dummy_symbol_get): Name all dummy symbols initially
8175 like $@n instead of just @n so that the default %destructor/%printer
8176 logic doesn't see them as user-defined symbols.
8177 (symbol_is_dummy): Check for both forms of the name.
8178 * src/reader.c (packgram): Remove the `$' from each midrule symbol
8179 name for which the midrule value is referenced in any action.
8180 * tests/actions.at (Default %printer and %destructor for mid-rule
8181 values): New test.
8182 * tests/regression.at (Rule Line Numbers, Web2c Report): Update output
8183 for change to dummy symbol names.
8184
8185 2006-10-20 Joel E. Denny <jdenny@ces.clemson.edu>
8186
8187 Warn about unset midrule $$ if the corresponding $n is used.
8188 * src/reader.c (symbol_should_be_used): Check midrule parent rule for
8189 $n usage.
8190 (packgram): Before invoking grammar_rule_check on any rule, make sure
8191 all actions have already been scanned in order to set `used' flags.
8192 Otherwise, checking that a midrule's $$ is set will not always work
8193 properly because the midrule check must forward-reference the midrule's
8194 parent rule.
8195 * tests/input.at (AT_CHECK_UNUSED_VALUES): Extend to check the new
8196 warning.
8197
8198 2006-10-20 Joel E. Denny <jdenny@ces.clemson.edu>
8199
8200 More improvements to the documentation of the prologue alternatives:
8201 * NEWS (2.3a+): Mention the new `Prologue Alternatives' section in the
8202 Bison manual.
8203 * doc/bison.texinfo (Prologue Alternatives): Correct some errors. Add
8204 some text to clarify the relative importance of the new directives and
8205 to show how these directives may be viewed as code labels.
8206
8207 2006-10-16 Joel E. Denny <jdenny@ces.clemson.edu>
8208
8209 Similar to the recently removed %before-header, add %code-top as the
8210 alternative to the pre-prologue. Mentioned at
8211 <http://lists.gnu.org/archive/html/bison-patches/2006-10/msg00063.html>.
8212 Also, let the prologue alternatives appear in the grammar section.
8213 * src/parse-gram.y (PERCENT_CODE_TOP): New token.
8214 (prologue_declaration): Move the existing prologue alternatives to...
8215 (grammar_declaration): ... here and add %code-top.
8216 * src/scan-gram.l (PERCENT_CODE_TOP): New token.
8217
8218 Clean up and extend documentation for the prologue alternatives.
8219 * NEWS (2.3a+): Describe prologue alternatives.
8220 * doc/bison.texinfo (Prologue): Move discussion of prologue
8221 alternatives to...
8222 (Prologue Alternatives): ... this new section, and extend it to discuss
8223 all 4 directives in detail.
8224 (Table of Symbols): Clean up discussion of prologue alternatives and
8225 add %code-top.
8226
8227 2006-10-16 Juan Manuel Guerrero <juan.guerrero@gmx.de>
8228
8229 DJGPP specific issues.
8230
8231 * djgpp/config.bat: config.hin has been moved to lib. Adjust
8232 config.bat accordingly.
8233 * djgpp/config.sed: Adjust config.sed for the use of autoconf 2.60.
8234 * djgpp/config.site: Likewise.
8235
8236 2006-10-16 Paolo Bonzini <bonzini@gnu.org>
8237
8238 Replace %*-header with %provides, %requires, %code. See discussion at
8239 http://lists.gnu.org/archive/html/bison-patches/2006-10/msg00002.html
8240
8241 * data/bison.m4 (b4_user_requires, b4_user_provides): New.
8242 (b4_user_start_header): Remove.
8243 * data/glr.c: Use new macros instead of b4_*start_header
8244 and b4_*end_header.
8245 * data/glr.cc: Likewise.
8246 * data/lalr1.cc: Likewise.
8247 * data/push.c: Likewise.
8248 * data/yacc.c: Likewise.
8249
8250 * doc/bison.texinfo: Remove %before-header, rename
8251 %{start,end,after}-header to %requires, %provides, %code.
8252
8253 * src/parse-gram.y: Likewise (also rename token names accordingly).
8254 * src/scan-gram.l: Likewise.
8255 * tests/actions.at: Likewise.
8256
8257 2006-10-14 Paul Eggert <eggert@cs.ucla.edu>
8258
8259 * lib/Makefile.am (AM_CFLAGS): Remove $(WERROR_CFLAGS).
8260 Problem reported by Joel E. Denny.
8261
8262 2006-10-14 Jim Meyering <jim@meyering.net>
8263
8264 (Sync from coreutils.)
8265 Work also when the working directory (with e.g. coreutils sources)
8266 is version controlled with git, rather than CVS.
8267 * bootstrap (CVS_only_file): Test for the existence of README-cvs,
8268 rather than CVS.
8269 In messages and comments, say e.g., "checked-out sources",
8270 rather than "CVS sources".
8271 (version_controlled_file): New function. Work for git as well as
8272 for CVS. Don't use grep's -q option.
8273 (slurp): Call it here, in place of CVS-specific code.
8274
8275 2006-10-14 Joel E. Denny <jdenny@ces.clemson.edu>
8276
8277 Fix testsuite for ./configure --enable-gcc-warnings:
8278 * configure.ac (gcc-warnings): Move -Wall before -Wno-sign-compare.
8279 Otherwise, gcc 4.1.0 (at least) warns about sign comparisons in
8280 __AT_CHECK_PRINTER_AND_DESTRUCTOR in tests/actions.at.
8281 * test/input.at (Torturing the Scanner): #include <stdlib.h> for abort.
8282 * test/regression.at (Diagnostic that expects two alternatives):
8283 Likewise.
8284
8285 2006-10-12 Paul Eggert <eggert@cs.ucla.edu>
8286
8287 * bootstrap.conf (gnulib_modules): Add config-h.
8288 * djgpp/subpipe.c: Include <config.h> unconditionally; don't
8289 worry about HAVE_CONFIG_H.
8290 * lib/abitset.c: Likewise.
8291 * lib/bitset.c: Likewise.
8292 * lib/bitset_stats.c: Likewise.
8293 * lib/bitsetv-print.c: Likewise.
8294 * lib/bitsetv.c: Likewise.
8295 * lib/ebitset.c: Likewise.
8296 * lib/get-errno.c: Likewise.
8297 * lib/lbitset.c: Likewise.
8298 * lib/subpipe.c: Likewise.
8299 * lib/timevar.c: Likewise.
8300 * lib/vbitset.c: Likewise.
8301 * lib/bitset.c: Include "bitset.h" first, to test interface.
8302 * lib/bitset_stats.c: Include "bitset_stats.h" first.
8303 * lib/bitsetv-print.c: Include "bitsetv-print.h" first.
8304 * lib/bitsetv.c: Include "bitsetv.h" first.
8305 * lib/get-errno.c: Include "get-errno.h" first.
8306 * m4/.cvsignore: Add config-h.m4.
8307 * tests/actions.at (Default %printer and %destructor for ...):
8308 Adjust expected line numbers in output to reflect removal of #if
8309 HAVE_CONFIG_H lines.
8310 * tests/glr-regression.at (Missed %merge type warnings when ...):
8311 Likewise.
8312 * tests/regression.at (Braced code in declaration in rules section):
8313 Likewise.
8314 * tests/atlocal.in (CPPFLAGS): Don't define HAVE_CONFIG_H.
8315 * tests/local.at (AT_DATA_GRAMMAR_PROLOGUE):
8316 Include <config.h> unconditionally.
8317
8318 * bootstrap: Sync from coreutils, as follows:
8319
8320 2006-10-11 Paul Eggert <eggert@cs.ucla.edu>
8321
8322 * bootstrap (symlink_to_gnulib): Fix bug: the dot_dots shell
8323 variable was sometimes used without being initialized. This
8324 messed up the installation of the INSTALL file in some cases.
8325
8326 2006-10-09 Paul Eggert <eggert@cs.ucla.edu>
8327
8328 * bootstrap (usage, main program, symlink_to_gnulib): Add option
8329 --copy. Inspired by a suggestion from Bruno Haible.
8330
8331 2006-10-03 Jim Meyering <jim@meyering.net>
8332
8333 * bootstrap: Undo last change to this file, since now gnulib-tool
8334 sticks with the automake default in generating dependencies.
8335
8336 2006-10-12 Paul Eggert <eggert@cs.ucla.edu>
8337
8338 * configure.ac: Use AC_PROG_CC_STDC; this is more modern than
8339 the old AC_PROG_CC / AM_PROG_CC_STDC combination.
8340
8341 * doc/bison.1: Add copyright notice.
8342
8343 * data/glr.c: Don't include <stdarg.h>; not used.
8344
8345 * NEWS: The -g and --graph options now output graphs in Graphviz
8346 DOT format, not VCG format.
8347 * doc/bison.1: Likewise.
8348 * doc/bison.texinfo (Understanding, Bison Options): Likewise.
8349 * THANKS: Add Satya Kiran Popuri, who proposed the initial version
8350 of this change in
8351 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00158.html>.
8352 * TODO: Remove Graphviz entry.
8353 * src/Makefile.am (bison_SOURCES): Add graphviz.c and graphviz.h;
8354 remove vcg.c, vcg.h, vcg_defaults.h.
8355 * src/vcg.c, src/vcg.h, src/vcg_defaults.h: Remove.
8356 * src/graphviz.c, src/graphviz.h: New files.
8357 * src/files.c (compute_output_file_names): Output .dot, not .vcg.
8358 * src/files.h: Make comment more generic.
8359 * src/main.c (main): Likewise.
8360 * src/print_graph.h: Likewise.
8361 * src/getargs.c (usage): Make usage description more generic.
8362 * src/print_graph.c: Include graphviz.h rather than vcg.h.
8363 (static_graph, fgraph): Remove. All uses changed to pass
8364 arguments instead of sharing a static var.
8365 (print_core, print_actions, print_state, print_graph):
8366 Output graphviz format rather than VCG format.
8367 * tests/.cvsignore: Remove *.vcg; add *.dot.
8368 * tests/output.at: Expect *.dot files, not *.vcg files.
8369
8370 * data/Makefile.am (dist_pkgdata_DATA): Add bison.m4; this
8371 accommodates the 2006-10-08 change.
8372
8373 2006-10-11 Bob Rossi <bob@brasko.net>
8374
8375 * data/push.c (yypushparse, yypvarsinit, yypvars): Wrap in b4_push_if.
8376 (b4_yyssa, b4_yyerror_range): New macros.
8377 (struct yypvars): Remove yyssa_ptr and yyerror_range_ptr fields.
8378 (yypvarsinit): Remove init of removed fields.
8379 (yypushparse): Remove use of removed fields; use new macros instead.
8380
8381 2006-10-11 Paul Eggert <eggert@cs.ucla.edu>
8382
8383 * data/push.c (yypushparse): Fix memory leak if yymsg is malloced
8384 in a push parser. Reindent slightly to match yacc.c better.
8385
8386 2006-10-11 Bob Rossi <bob@brasko.net>
8387
8388 * data/push.c (struct yypvars): Remove yymsgbuf, yymsgbuf_ptr, yymsg,
8389 yymsg_alloc fields.
8390 (yypvarsinit, yypushparse): Remove init of removed fields.
8391 (yypushparse): Use yymsgbuf instead of yymsgbuf_ptr.
8392
8393 2006-10-09 Paul Eggert <eggert@cs.ucla.edu>
8394
8395 * THANKS: Add Paolo Bonzini and Bob Rossi.
8396
8397 2006-10-08 Paolo Bonzini <bonzini@gnu.org>
8398
8399 * data/c.m4 (b4_copyright, b4_epilogue, b4_location_initial_column,
8400 b4_location_initial_line, p4_parse_param, b4_ints_in, b4_flag_if,
8401 b4_define_flag_if and uses, b4_basename, b4_syncline, b4_user_code,
8402 b4_define_user_cde and uses): Remove.
8403 (b4_comment, b4_prefix, b4_sync_start): New.
8404 * data/bison.m4: New file, with most of the content removed from c.m4.
8405 * src/muscle_tab.h: Use "do {...} while(0)" throughout.
8406 * src/output.c (output_skeleton): Pass bison.m4.
8407 (prepare): Pass glr_flag and nondeterministic_flag. Pass prefix
8408 only if specified.
8409
8410 2006-10-05 Paul Eggert <eggert@cs.ucla.edu>
8411
8412 Fix test failure reported by Tom Lane in
8413 <http://lists.gnu.org/archive/html/bug-bison/2006-10/msg00000.html>
8414 and try to make such failures easier to catch in the future.
8415 * data/glr.c (YYTRANSLATE): Don't check for nonpositive arg;
8416 that's now the caller's responsibility.
8417 (yyprocessOneStack, yyrecoverSyntaxError, yyparse):
8418 Set yychar = YYEOF if it's negative.
8419 * tests/actions.at (yylex): Abort if asked to read past EOF.
8420 * tests/conflicts.at (yylex): Likewise.
8421 * tests/cxx-type.at (yylex): Likewise.
8422 * tests/glr-regression.at (yylex): Likewise.
8423 * tests/input.at (yylex): Likewise.
8424 * tests/regression.at (yylex): Likewise.
8425 * tests/torture.at (yylex): Likewise.
8426
8427 2006-10-01 Paul Eggert <eggert@cs.ucla.edu>
8428
8429 Fix problems with translating English-language diagnostics.
8430 * bootstrap: Fix bug introduced in recent bootstrap changes, with
8431 respect to bison-runtime pot generation. The YY_ stuff
8432 wasn't being captured.
8433 * bootstrap.conf (XGETTEXT_OPTIONS_RUNTIME): New var.
8434 * po/POTFILES.in: Add src/location.c, src/scan-code.l.
8435 * runtime-po/POTFILES.in: Add data/push.c.
8436
8437 2006-09-29 Paul Eggert <eggert@cs.ucla.edu>
8438
8439 Merge bootstrap changes from coreutils.
8440
8441 2006-09-28 Jim Meyering <jim@meyering.net>
8442
8443 Automatically generated dependencies are important even
8444 when all of the sources in a directory come from gnulib.
8445 * bootstrap (gnulib_tool): Remove the "no-dependencies" automake
8446 option that gnulib-tool adds to what becomes our lib/gnulib.mk.
8447
8448 2006-09-23 Jim Meyering <jim@meyering.net>
8449
8450 * bootstrap (gnulib_tool_options): Add "--local-dir gl".
8451
8452 2006-09-20 Paul Eggert <eggert@cs.ucla.edu>
8453
8454 * bootstrap: Add support for --force.
8455 (usage): New function. Describe usage less tersely.
8456 (CVS_only_file): New var.
8457
8458 2006-09-21 Paul Eggert <eggert@cs.ucla.edu>
8459
8460 * data/push.c (YYPUSH_MORE): Make it an enum instead.
8461 (yypushparse): Use YYPUSH_MORE instead of the mystery constant.
8462 Adjust white space and comments to match GNU style better.
8463
8464 2006-09-20 Bob Rossi <bob@brasko.net>
8465
8466 * data/push.c (yyresult_get): Remove function.
8467 (YYPUSH_MORE): Add #define.
8468 (yypushparse): Modify return value.
8469
8470 2006-09-20 Paul Eggert <eggert@cs.ucla.edu>
8471
8472 * stamp-h.in: Remove; no longer needed.
8473 * .cvsignore: Replace autom4te.cache and config.cache with *.cache.
8474 Remove config.h, config.hin, intl (no longer created).
8475 * lib/.cvsignore: Add config.h, config.hin, configmake.h, inttypes.h,
8476 stamp-h1.
8477
8478 Sync bootstrap from coreutils, as follows:
8479
8480 2006-09-18 Paul Eggert <eggert@cs.ucla.edu>
8481
8482 * bootstrap (symlink_to_gnulib): New function.
8483 (cp_mark_as_generated): Use it, to prefer symlinks-to-gnulib
8484 to copies-of-gnulib.
8485 (cp_mark_as_generated, slurp, gnulib_files):
8486 Avoid making a copy if it's the same as the old version.
8487 (gnulib_files): Add support for this variable (used by Bison).
8488
8489 2006-09-20 Paul Eggert <eggert@cs.ucla.edu>
8490
8491 * src/getargs.c (usage): Rework to use conventions similar to
8492 coreutils, to make translation a bit easier and the code a bit
8493 smaller. Problem reported by Tim Van Holder.
8494
8495 2006-09-15 Paul Eggert <eggert@cs.ucla.edu>
8496
8497 Use some of gnulib's new modules, taken from coreutils.
8498
8499 * bootstrap: Sync from coreutils, except add support for gnulib_files.
8500 * bootstrap.conf: New file.
8501 (gnulib_modules): Add configmake, inttypes, unistd.
8502 (XGETTEXT_OPTIONS): Add complain, complain_at,
8503 fatal, fatal_at, warn, warn_at, unexpected_end.
8504 * configure.ac (AC_CONFIG_HEADERS): config.h is now in lib, not here.
8505 (gl_USE_SYSTEM_EXTENSIONS): Remove; gl_EARLY now does this.
8506 (gl_EARLY): Add.
8507 (AM_STDBOOL_H): Remove; gl_INIT now dows this.
8508 (gl_INIT): Add
8509 (GNULIB_AUTOCONF_SNIPPET): Remove.
8510 (AM_GNU_GETTEXT): Add; require formatstring macros since that's
8511 the pickiest.
8512 * lib/.cvsignore: Add inttypes_.h.
8513 * lib/Makefile.am: Include gnulib.mk first so we can append to it.
8514 (AM_CFLAGS): Add WERROR_CFLAGS, to be more like coreutils.
8515 (BUILT_SOURCES, EXTRA_DIST, MOSTLYCLEANFILES): Remove
8516 no-longer-necessary initializations.
8517 (lib_SOURCES): Remove, replacing by libbison_a_SOURCES.
8518 * lib/subpipe.c: Include <unistd.h> unconditionally, now that we
8519 use the unistd module.
8520 * src/system.h: Likewise.
8521 * m4/.cvsignore: Remove *_gl.m4, gnulib.m4, inttypes_h.m4, uintmax_t.m4,
8522 ulonglong.m4. Add gettext.m4, gnulib-cache.m4, gnulib-comp.m4,
8523 gnulib-tool.m4, inttypes-h.m4, inttypes-pri.m4, inttypes.m4.
8524 * src/Makefile.am (DEFS): Remove, since configmake does this for us.
8525 (AM_CPPFLAGS): Remove -I../lib, since Automake does that for us.
8526 * src/system.h: Include inttypes.h unconditionally, now that we
8527 use the inttypes module. Don't bother to include stdint.h, since
8528 inttypes.h now does that for us.
8529 (LOCALEDIR): Remove, now that we use the configmake module.
8530 * src/getargs.c: Include configmake.h.
8531 * src/main.c: Likewise.
8532 * src/output.c: Likewise.
8533 * tests/atlocal.in (CPPFLAGS): Include from $abs_top_builddir/lib,
8534 not from $abs_top_builddir, since config.h moved.
8535
8536
8537 Port to GCC 2.95. First two problems reported by Michael Deutschmann in
8538 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00018.html>.
8539
8540 * src/parse-gram.y (symbol_declaration): Don't put statements
8541 before declarations; it's not portable to C89.
8542 * src/scan-code.l (handle_action_at): Likewise.
8543
8544 * src/scan-code.l: Always initialize braces_level; the old code
8545 left it uninitialized and therefore had undefined behavior.
8546
8547 Don't attempt to redefine 'assert', since it runs afoul of
8548 systems where standard headers (mistakenly) include <assert.h>.
8549 Instead, define and use our own alternative, called 'aver'.
8550 * src/reader.c: Don't include assert.h, since we no longer
8551 use assert.
8552 * src/scan-code.l: Likewise.
8553 * src/system.h (assert): Remove, replacing with....
8554 (aver): New function, taking a bool arg. All uses changed.
8555 * src/tables.c (pack_vector): Ensure that aver arg is bool,
8556 not merely an integer.
8557
8558 2006-09-15 Bob Rossi <bob@brasko.net>
8559
8560 Add support for push parsing. Based on the original work of
8561 Odd Arild Olsen <oao@fibula.no>.
8562 * data/Makefile.am (dist_pkgdata_DATA): Add push.c.
8563 * data/c.m4 (YYPUSH): New.
8564 (b4_push_if): New macro. Use it instead of #ifdef YYPUSH.
8565 * data/push.c: New file.
8566 * src/getargs.c (push_parser): New var.
8567 * src/getargs.h (push_parser): New declaration.
8568 * src/output.c (prepare): Add macro insertion of `push_flag'.
8569 * src/parse-gram.y (PERCENT_PUSH_PARSER): New token.
8570 (prologue_declaration): Parse %push-parser.
8571 * src/scan-gram.l: Scan new PERCENT_PUSH_PARSER token.
8572 * tests/calc.at (_AT_CHECK_CALC_ERROR): Add "Return" and "Now" to
8573 list of removed lines from the traces observed.
8574 (AT_CHECK_CALC_LALR): Added push parser tests.
8575
8576 2006-09-13 Paul Eggert <eggert@cs.ucla.edu>
8577
8578 * NEWS: Version 2.3a.
8579 * configure.ac (AC_INIT): Likewise.
8580
8581 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Remove
8582 "#define YYSTYPE int" that caused "make maintainer-check" to fail
8583 due to header ordering dependencies. I don't know why the #define
8584 was there.
8585
8586 Fix glr.cc and lalr1.cc's use of YYDEBUG so that there's zero
8587 runtime cost when YYDEBUG is not defined, and so that some tests
8588 that used to fail now work. Problem and initial suggestion by
8589 Paolo Bonzini.
8590 * data/c++.m4 (b4_parse_param_cons): Omit leading ','.
8591 * data/glr.cc (b4_parser_class_name):
8592 Initialize yycdebug_ only if YYDEBUG. Also, initialize yydebug_.
8593 (debug_level, set_debug_level): Affect yydebug_, not ::yydebug.
8594 (yydebug_) [YYDEBUG]: New member.
8595 (yycdebug_): Now defined only if YYDEBUG.
8596 * data/lalr1.cc (yydebug_, yycdebug_): Now defined only if YYDEBUG.
8597 (YYCDEBUG) [!YYDEBUG]: Don't use yydebug_ and yycdebug_.
8598 (b4_parser_class_name): Initialize yydebug_ and yycdebug_ only
8599 if YYYDEBUG.
8600 (debug_stream, set_debug_stream, debug_level, set_debug_level):
8601 Define only if YYDEBUG.
8602 * tests/calc.at (_AT_DATA_CALC_Y) [!YYDEBUG]: Omit call to
8603 set_debug_level.
8604 * tests/regression.at (_AT_DATA_DANCER_Y) [!YYDEBUG]: Likewise.
8605 * tests/calc.at (AT_CHECK_CALC_GLR_CC): Uncomment calls to
8606 AT_CHECK_CALC_GLR_CC that are working now.
8607
8608 2006-09-12 Paul Eggert <eggert@cs.ucla.edu>
8609
8610 * data/glr.cc (YYERROR_VERBOSE, YYTOKEN_TABLE): Remove.
8611 We don't need them in glr.cc, and glr.c defines them.
8612 Defining YYERROR_VERBOSE to 0 here breaks glr.c, since glr.c
8613 assumes that defining it to anything is the same as defining
8614 it to 1. Problem reported by Paolo Bonzini.
8615
8616 2006-09-12 Paolo Bonzini <bonzini@gnu.org> (tiny change)
8617
8618 * data/c.m4 (b4_null, b4_case): Define.
8619 * src/output.c (prepare_symbols): Use b4_null.
8620 (user_actions_output): Use b4_case.
8621
8622 2006-09-11 Paul Eggert <eggert@cs.ucla.edu>
8623
8624 * data/glr.c (b4_shared_declarations): Put start-header first,
8625 before any #includes that we generate, so that feature-test
8626 macros work. Problem reported by Michael Deutschmann in
8627 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00004.html>.
8628 * data/lalr1.cc: Likewise.
8629 * doc/bison.texinfo (Prologue): Document that feature-test macros
8630 should be defined before any Bison declarations.
8631 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Put defns
8632 that depend on location.hh after, not before, Bison decls, since
8633 we now include location.hh after the first user prologue.
8634
8635 * doc/bison.texinfo (Calc++ Parser): Fix memory leak reported by
8636 Sander Brandenburg in
8637 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00002.html>.
8638 Also, fix minor white space and comment issues.
8639 (Prologue): Mention that it's better to define feature-test macros
8640 before Bison declarations. Problem reported by Michael Deutschmann.
8641
8642 * README-cvs: Fix typo: "&" should be "&&". Problem reported
8643 by Jim Meyering.
8644 * m4/.cvsignore: Add argmatch.m4. Remove obstack.m4, strerror_r.m4.
8645 This adjusts to recent gnulib changes.
8646
8647 2006-09-04 Joel E. Denny <jdenny@ces.clemson.edu>
8648
8649 Finish implementation of per-type %destructor/%printer. Discussed
8650 starting at
8651 <http://lists.gnu.org/archive/html/bison-patches/2006-02/msg00064.html>
8652 and
8653 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00091.html>.
8654 * NEWS (2.3+): Add a description of this feature to the default
8655 %destructor/%printer description.
8656 * doc/bison.texinfo (Freeing Discarded Symbols): Likewise.
8657 * src/symlist.c (symbol_list_destructor_set, symbol_list_printer_set):
8658 Invoke semantic_type_destructor_set or semantic_type_printer_set when a
8659 list node contains a semantic type.
8660 * src/symtab.c, src/symtab.h: Extend with a table that associates
8661 semantic types with their %destructor's and %printer's.
8662 (semantic_type_from_uniqstr, semantic_type_get,
8663 semantic_type_destructor_set, semantic_type_printer_set): New functions
8664 composing the public interface of that table.
8665 (symbol_destructor_get, symbol_destructor_location_get,
8666 symbol_printer_get, symbol_printer_location_get): If there's no
8667 per-symbol %destructor/%printer, look up the per-type before trying
8668 the default.
8669 * tests/actions.at (Per-type %printer and %destructor): New test case.
8670 * tests/input.at (Default %printer and %destructor redeclared):
8671 Extend to check that multiple occurrences of %symbol-default in a
8672 single %destructor/%printer declaration is an error.
8673 (Per-type %printer and %destructor redeclared, Unused values with
8674 per-type %destructor): New test cases.
8675
8676 2006-09-04 Joel E. Denny <jdenny@ces.clemson.edu>
8677
8678 Require default %destructor/%printer to be declared using
8679 %symbol-default instead of an empty symbol list, and start working on
8680 new per-type %destructor/%printer. Discussed at
8681 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00007.html>.
8682 * NEWS (2.3+): Add %symbol-default to example.
8683 * bison.texinfo (Freeing Discarded Symbols): Likewise.
8684 (Table of Symbols): Add entry for %symbol-default.
8685 * src/parse-gram.y (PERCENT_SYMBOL_DEFAULT): New token.
8686 (generic_symlist, generic_symlist_item): New nonterminals for creating
8687 a list in which each item is a symbol, semantic type, or
8688 %symbol-default.
8689 (grammar_declaration): Use generic_symlist in %destructor and %printer
8690 declarations instead of symbols.1 or an empty list.
8691 (symbol_declaration, precedence_declaration, symbols.1): Update actions
8692 for changes to symbol_list.
8693 * src/reader.c: Update for changes to symbol_list.
8694 * src/scan-code.l: Likewise.
8695 * src/scan-gram.l: Scan new PERCENT_SYMBOL_DEFAULT token.
8696 * src/symlist.c, src/symlist.h: Extend such that a list node may
8697 represent a semantic type or a %symbol-default in addition to just an
8698 ordinary symbol. Add switched functions for setting %destructor's and
8699 %printer's.
8700 * tests/actions.at, tests/input.at: Add %symbol-default to all default
8701 %destructor/%printer declarations.
8702
8703 2006-08-23 Joel E. Denny <jdenny@ces.clemson.edu>
8704
8705 Whether the default %destructor/%printer applies to a particular symbol
8706 isn't a question of whether the user *declares* that symbol (in %token,
8707 for example). It's a question of whether the user by any means
8708 *defines* the symbol at all (by simply using a char token, for
8709 example). $end is defined by Bison whereas any other token with token
8710 number 0 is defined by the user. The error token is always defined by
8711 Bison regardless of whether the user declares it with %token, but we
8712 may one day let the user define error as a nonterminal instead.
8713 * NEWS (2.3+): Say "user-defined" instead of "user-declared".
8714 * doc/bison.texinfo (Freeing Discarded Symbols): Likewise, and document
8715 the meaning of "user-defined".
8716 * tests/actions.at (Default %printer and %destructor for user-declared
8717 end token): Rename to...
8718 (Default %printer and %destructor for user-defined end token): ...
8719 this.
8720
8721 * src/symtab.c (symbol_destructor_get, symbol_printer_get): In the
8722 computation of whether to apply the default, don't maintain a list of
8723 every Bison-defined symbol. Instead, just check for a first character
8724 of '$', which a user symbol cannot have, and check for the error token.
8725
8726 2006-08-21 Joel E. Denny <jdenny@ces.clemson.edu>
8727
8728 Don't apply the default %destructor or %printer to the error token,
8729 $undefined, or $accept. This change fits the general rule that the
8730 default %destructor and %printer are only for user-declared symbols,
8731 and it solves several difficulties that are described in the new test
8732 cases listed below.
8733 * src/symtab.c (symbol_destructor_get, symbol_printer_get): Implement.
8734 * tests/actions.at (Default %printer and %destructor are not for error
8735 or $undefined, Default %printer and %destructor are not for $accept):
8736 New test cases.
8737
8738 2006-08-19 Joel E. Denny <jdenny@ces.clemson.edu>
8739
8740 Allow %start after the first rule.
8741 * src/reader.c (grammar_current_rule_begin): Don't set the start symbol
8742 when parsing the first rule.
8743 (check_and_convert_grammar): Search for it here after all grammar
8744 declarations have been parsed. Skip midrules, which have dummy LHS
8745 nonterminals.
8746 * src/symtab.c (symbol_is_dummy): New function.
8747 * src/symtab.h (symbol_is_dummy): Declare it.
8748 * tests/input.at (%start after first rule): New test.
8749
8750 2006-08-18 Joel E. Denny <jdenny@ces.clemson.edu>
8751
8752 Redo some of the previous commit: add back the ability to use
8753 non-aliased/undeclared string literals since it might be useful to
8754 those declaring %token-table.
8755 * src/reader.c (check_and_convert_grammar): Undo changes in previous
8756 commit: don't worry about complaints from symbols_pack.
8757 * src/symtab.c (symbol_new, symbol_class_set,
8758 symbol_check_alias_consistency): Undo changes in previous commit: count
8759 each string literal as a new symbol and token, assign it a symbol
8760 number, and don't complain about non-aliased string literals.
8761 (symbols_pack): Since symbol_make_alias still does not decrement symbol
8762 and token counts but does still set aliased tokens to the same number,
8763 symbol_pack_processor now leaves empty slots in the symbols array.
8764 Remove those slots.
8765 * tests/regression.at (Undeclared string literal): Remove test case
8766 added in previous commit since non-aliased string literals are allowed
8767 again.
8768 (Characters Escapes, Web2c Actions): Undo changes in previous commit:
8769 remove unnecessary string literal declarations.
8770 * tests/sets.at (Firsts): Likewise.
8771
8772 2006-08-18 Joel E. Denny <jdenny@ces.clemson.edu>
8773
8774 Don't allow an undeclared string literal, but allow a string literal to
8775 be used before its declaration.
8776 * src/reader.c (check_and_convert_grammar): Don't invoke packgram if
8777 symbols_pack complained.
8778 * src/symtab.c (symbol_new): Don't count a string literal as a new
8779 symbol.
8780 (symbol_class_set): Don't count a string literal as a new token, and
8781 don't assign it a symbol number since symbol_make_alias does that.
8782 (symbol_make_alias): It's not necessary to decrement the symbol and
8783 token counts anymore. Don't assume that an alias declaration occurs
8784 before any uses of the identifier or string, and thus don't assert that
8785 one of them has the highest symbol number so far.
8786 (symbol_check_alias_consistency): Complain if there's a string literal
8787 that wasn't declared as an alias.
8788 (symbols_pack): Bail if symbol_check_alias_consistency failed since
8789 symbol_pack asserts that every token has been assigned a symbol number
8790 although undeclared string literals have not.
8791 * tests/regression.at (String alias declared after use, Undeclared
8792 string literal): New test cases.
8793 (Characters Escapes, Web2c Actions): Declare string literals as
8794 aliases.
8795 * tests/sets.at (Firsts): Likewise.
8796
8797 2006-08-14 Joel E. Denny <jdenny@ces.clemson.edu>
8798
8799 In the grammar scanner, STRING_FINISH unclosed constructs and return
8800 them to the parser in order to improve error messages.
8801 * src/scan-gram.l (SC_ESCAPED_STRING, SC_ESCAPED_CHARACTER,
8802 SC_BRACED_CODE, SC_PROLOGUE): Implement.
8803 * tests/input.at (Unclosed constructs): New test case.
8804 * tests/regression.at (Invalid inputs): Update now that unclosed %{ is
8805 seen.
8806
8807 * src/scan-gram.h, src/scan-gram.l (gram_last_braced_code_loc): Remove
8808 unused global.
8809
8810 2006-08-13 Joel E. Denny <jdenny@ces.clemson.edu>
8811
8812 Handle string aliases for character tokens correctly.
8813 * src/symtab.c (symbol_user_token_number_set): If the token has an
8814 alias, check and set its alias's user token number instead of its own,
8815 which is set to indicate the alias. Previously, every occurrence of
8816 the character token in the grammar overwrote that alias indicator with
8817 the character code.
8818 * tests/input.at (String aliases for character tokens): New test.
8819
8820 2006-08-12 Joel E. Denny <jdenny@ces.clemson.edu>
8821
8822 * src/parse-gram.y: Add `%expect 0' so we don't overlook conflicts.
8823
8824 2006-08-11 Paul Eggert <eggert@cs.ucla.edu>
8825
8826 * bootstrap: Put in need-ngettext argument to AM_GNU_GETTEXT,
8827 to prevent failures when building on older platforms.
8828 Check for autopoint failure.
8829 Set XGETTEXT_OPTIONS to values that check for C format strings,
8830 so that translators are warned about them (this also helps
8831 prevent core dumps).
8832
8833 * lib/subpipe.c (create_subpipe): Use new gnulib pipe_safer
8834 function, since it simplifies our code a bit.
8835
8836 * configure.ac (AC_ARG_ENABLE): Use -Wextra -Wno-sign-compare
8837 rather than -W, so we don't get bogus warnings about sign comparisons.
8838 Add -Wpointer-arith, since that warning is useful (it reports code
8839 that does not conform to C89 and that some compilers reject).
8840 * data/c.m4, data/glr.c, data/lalr1.cc, data/yacc.c: Undo latest change,
8841 since it's no longer needed.
8842
8843 2006-08-10 Joel E. Denny <jdenny@ces.clemson.edu>
8844
8845 Clean up scanners a bit.
8846 * src/flex-scanner.h (FLEX_NO_OBSTACK): New macro that blocks obstack
8847 definitions so gcc won't warn when obstack_for_string is unused.
8848 * src/scan-code.l: config.h and system.h are already #include'd by
8849 scan-code-c.c, so get rid of them here.
8850 * src/scan-gram.l: Likewise.
8851 * src/scan-skel.l: Likewise, and use flex-scanner.h without obstack
8852 definitions rather than duplicating the rest of it.
8853 * src/scan-gram-c.c, scan-skel-c.c: #include "system.h".
8854
8855 2006-08-09 Joel E. Denny <jdenny@ces.clemson.edu>
8856
8857 Suppress signed/unsigned comparison warnings for yycheck.
8858 * data/c.m4 (b4_safest_int_type): New macro.
8859 * data/glr.c, data/lalr1.cc: Wherever you compare yycheck[i] against
8860 a signed int type, cast it to b4_safest_int_type first.
8861 * data/yacc.c: Likewise.
8862 (b4_safest_int_type): Overwrite the one from c.m4 since b4_int_type is
8863 also overwritten.
8864
8865 2006-08-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de> (tiny change)
8866
8867 * doc/bison.texinfo: Fix some typos.
8868
8869 2006-08-02 Paul Eggert <eggert@cs.ucla.edu>
8870
8871 * m4/.cvsignore: Add inttypes_h.m4,lib-ld.m4, lib-prefix.m4,
8872 po.m4, stdint_h.m4, uintmax_t.m4, ulonglong.m4, warning.m4.
8873
8874 * bootstrap (gnulib_tool): Stop using --assume-autoconf;
8875 the latest gnulib does this a different way.
8876 (get_translations): Sharuzzaman Ahmat Raslan reported that the ms
8877 translation was patched, so stop omitting it.
8878
8879 2006-07-29 Joel E. Denny <jdenny@ces.clemson.edu>
8880
8881 Enable declaration of default %printer/%destructor. Make the parser
8882 use these for all user-declared grammar symbols for which the user does
8883 not declare a specific %printer/%destructor. Thus, the parser uses it
8884 for token 0 if the user declares it but not if Bison generates it as
8885 $end. Discussed starting at
8886 <http://lists.gnu.org/archive/html/bison-patches/2006-02/msg00064.html>,
8887 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00091.html>,
8888 and
8889 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00019.html>.
8890 * NEWS (2.3+): Mention.
8891 * doc/bison.texinfo (Actions in Mid-Rule): It's no longer impossible to
8892 declare a %destructor for a mid-rule's semantic value. It's just
8893 impossible to declare one specific to it.
8894 (Freeing Discarded Symbols): Mention that @$ can be used in %destructor
8895 code. Describe default %destructor form.
8896 * src/parse-gram.y (grammar_declaration): Parse default
8897 %printer/%destructor declarations.
8898 * src/output.c (symbol_destructors_output): Use symbol_destructor_get
8899 and symbol_destructor_location_get rather than accessing the destructor
8900 and destructor_location members of struct symbol.
8901 (symbol_printers_output): Likewise but for %printer's.
8902 * src/reader.c (symbol_should_be_used): Likewise but for %destructor's
8903 again.
8904 * src/symtab.c (default_destructor, default_destructor_location,
8905 default_printer, default_printer_location): New static global
8906 variables to record the default %destructor and %printer.
8907 (symbol_destructor_get, symbol_destructor_location_get,
8908 symbol_printer_get, symbol_printer_location_get): New functions to
8909 compute the appropriate %destructor and %printer for a symbol.
8910 (default_destructor_set, default_printer_set): New functions to set the
8911 default %destructor and %printer.
8912 * src/symtab.h: Prototype all those new functions.
8913 * tests/actions.at (Default %printer and %destructor): New test to
8914 check that the right %printer and %destructor are called, that they're
8915 not called for $end, and that $$ and @$ work correctly.
8916 (Default %printer and %destructor for user-declared end token): New
8917 test to check that the default %printer and %destructor are called for
8918 a user-declared end token.
8919 * tests/input.at (Default %printer and %destructor redeclared, Unused
8920 values with default %destructor): New tests to check related grammar
8921 warnings and errors.
8922
8923 2006-07-29 Joel E. Denny <jdenny@ces.clemson.edu>
8924
8925 Clean up handling of %destructor for the end token (token 0).
8926 Discussed starting at
8927 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00019.html>
8928 and
8929 <http://lists.gnu.org/archive/html/help-bison/2006-07/msg00013.html>.
8930
8931 Make the skeletons consistent in how they pop the end token and invoke
8932 its %destructor.
8933 * data/glr.c (yyrecoverSyntaxError, yyparse): Don't pop the start
8934 state, which has token number 0, since this would invoke the
8935 %destructor for the end token.
8936 * data/lalr1.cc (yy::parser::parse): Don't check for the final state
8937 until after shifting the end token, or else it won't be popped.
8938 * data/yacc.c (yyparse): Likewise.
8939
8940 * data/glr.c (yyparse): Clear the lookahead after shifting it even when
8941 it's the end token. Upon termination, destroy an unshifted lookahead
8942 even when it's the end token.
8943 * data/lalr1.cc (yy::parser::parse): Likewise.
8944 * data/yacc.c (yyparse): Likewise.
8945
8946 * src/reader.c (packgram): Don't check rule 0. This suppresses unused
8947 value warnings for the end token when the user gives the end token a
8948 %destructor.
8949
8950 * tests/actions.at (Printers and Destructors): Test all the above.
8951
8952 2006-07-24 Paul Eggert <eggert@cs.ucla.edu>
8953
8954 Update to latest gnulib and gettext versions.
8955 * bootstrap (gnulib-modules): Remove hard-locale, stdio-safer.
8956 Add fopen-safer.
8957 (gnulib_files): Add m4/warning.m4. Don't worry about files
8958 overwritten by autopoint.
8959 Replace gt_INTL_SUBDIR_CORE with an empty body in m4/gettext_gl.m4.
8960 Suppress "id", "ms", "tr" translations for now, since gettext 0.15
8961 rejects them.
8962 Don't use autoreconf; instead, invoke autopoint etc. by hand,
8963 so that we can remove the intl files at a better time.
8964 (intl_files_to_remove): Remove aclocal.m4, since it gets
8965 rebuilt anyway. Remove m4/inttypes_h.m4, m4/inttypes.m4,
8966 m4/isc-posix.m4, m4/lib-ld.m4, m4/lib-prefix.m4, m4/po.m4,
8967 m4/stdint_h.m4, m4/uintmax_t.m4, m4/ulonglong.m4.
8968 Add m4/inttypes-h.m4, m4/lock.m4, m4/visibility.m4.
8969 Remove datarootdir hack; no longer needed.
8970 * configure.ac: Use gl_WARNING_CFLAGS rather than BISON_WARNING.
8971 (AM_GNU_GETTEXT_VERSION): Bump from 0.12 to 0.15.
8972 * lib/.cvsignore: Remove hard-locale.c, hard-locale.h, strdup.c,
8973 strdup.h.
8974 * m4/.cvsignore: Remove hard-locale.m4, strdup.m4.
8975 * m4/warning.m4: Remove from CVS, since we now use gnulib's version.
8976
8977 2006-07-20 Paul Eggert <eggert@cs.ucla.edu>
8978
8979 * bootstrap: Adjust to today's change to gnulib-tool by invoking
8980 it with --assume-autoconf='latest-stable'.
8981
8982 2006-07-13 Joel E. Denny <jdenny@ces.clemson.edu>
8983
8984 * src/parse-gram.y (grammar_declaration): Don't confuse Doxygen (at
8985 least 1.4.7 and 1.4.4) by putting a #line between `typedef union
8986 YYSTYPE' and `{'.
8987 * src/muscle_tab.h (muscle_grow): Replace the header comments with
8988 those from muscle_tab.c since the old ones are misleading.
8989
8990 2006-07-13 Akim Demaille <akim@epita.fr>
8991
8992 Support %define "KEY" {VALUE}.
8993 * src/scan-code.h, src/scan-code.l (translate_action)
8994 (translate_rule_action, translate_symbol_action, translate_code):
8995 Return char *, not const char *.
8996 * src/parse-gram.y (declaration): Rename as...
8997 (prologue_declaration): this.
8998 (string_content): Remove this nonterminal, use STRING.
8999 (braceless, content, content.opt): New nonterminal.
9000 Use them.
9001 (%define): Now accept content.opt, i.e., accept also BRACED_CODE
9002 as value.
9003 * src/scan-gram.l (getargs.h): Don't include it.
9004
9005 2006-07-12 Paul Eggert <eggert@cs.ucla.edu>
9006
9007 * data/lalr1.cc (YYCDEBUG): Use 'if (yydebug_) (*yycdebug_)'
9008 rather than a for-loop that declares a local bool variable. This
9009 should work around a compatibility problem with a Cray x1e C++
9010 compiler reported by Hung Nguyen in
9011 <http://lists.gnu.org/archive/html/help-bison/2006-07/msg00022.html>.
9012 The for-loop was introduced in the 2004-11-17 change but I don't
9013 know why it was needed.
9014
9015 2006-07-12 Akim Demaille <akim@epita.fr>
9016
9017 * data/c.m4: Comment changes.
9018
9019 2006-07-10 Akim Demaille <akim@lrde.epita.fr>
9020
9021 * src/complain.c (error_message, ERROR_MESSAGE): New.
9022 To factor...
9023 (fatal_at, fatal, warn_at, warn, complain_at, complain): these.
9024 * src/complain.h, src/complain.c (warning_issued): Remove, unused.
9025
9026 2006-07-09 Paul Eggert <eggert@cs.ucla.edu>
9027
9028 * NEWS: Instead of %union, you can define and use your own union type
9029 YYSTYPE if your grammar contains at least one <type> tag.
9030 Your YYSTYPE need not be a macro; it can be a typedef.
9031 * doc/bison.texinfo (Value Type, Multiple Types, Location Type):
9032 (Union Decl, Decl Summary): Document this.
9033 * data/glr.c (YYSTYPE): Implement this.
9034 * data/glr.cc (YYSTYPE): Likewise.
9035 * data/lalr1.cc (YYSTYPE): Likewise.
9036 * data/yacc.c (YYSTYPE): Likewise.
9037 * src/output.c (prepare): Output tag_seen_flag.
9038 * src/parse-gram.y (declaration, grammar_declaration):
9039 Use 'union_seen' rather than 'typed' to determine whether
9040 %union has been seen, since grammars can now be typed without
9041 %union.
9042 (symbol_declaration, type.opt, symbol_def):
9043 Keep track of whether a tag has been seen.
9044 * src/reader.c (union_seen, tag_seen): New vars.
9045 (typed): remove.
9046 * src/reader.h (union_seen, tag_seen, typed): Likewise.
9047 * src/scan-code.l (untyped_var_seen): New variable.
9048 (handle_action_dollar): Adjust to above changes.
9049 (handle_action_dollar, handle_action_at):
9050 Improve overflow checking for outlandish numbers.
9051 * tests/input.at (AT_CHECK_UNUSED_VALUES): Redo test to
9052 avoid new diagnostics generated by above changes.
9053 * tests/regression.at (YYSTYPE typedef): Add test to check
9054 for type tags without %union.
9055
9056 * src/symlist.c (symbol_list_length): Return int, not unsigned
9057 int, since callers expect int. This may need to get revisited
9058 once we have proper integer overflow checking.
9059
9060 * src/scan-gram.h (gram_scanner_cursor): Remove decl, since this
9061 object is now static.
9062
9063 * src/getargs.c (flags_argmatch): Return void, not int,
9064 to pacify ./configure --enable-gcc-warnings.
9065
9066 * src/flex-scanner.h (STRING_FREE): Don't use FLEX_PREFIX (last_string)
9067 since last_string is already defined to FLEX_PREFIX (last_string).
9068
9069 2006-07-09 Akim Demaille <akim@lrde.epita.fr>
9070
9071 Implement --warnings/-W.
9072 * src/getargs.c (report_argmatch, trace_argmatch): Remove,
9073 replaced by...
9074 (flags_argmatch, FLAGS_ARGMATCH): this new function and macro.
9075 Adjust callers.
9076 * src/getargs.h, src/getargs.c (warnings, warnings_flags)
9077 (warnings_args, warnings_types): New.
9078 (getargs, short_options, long_options): Accept -W/--warnings.
9079 Sort the options by alphabetical order, upper case letter right
9080 before its lower case.
9081
9082 2006-07-09 Joel E. Denny <jdenny@ces.clemson.edu>
9083
9084 Change %merge result type clash warnings to errors. Discussed at
9085 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00026.html>.
9086 * src/reader.c (record_merge_function_type): Use complain_at.
9087 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
9088 declared later): Update test case results.
9089
9090 2006-07-09 Akim Demaille <akim@lrde.epita.fr>
9091
9092 * src/getargs.h, src/getargs.c: Swap --report and --trace handling
9093 to be in alphabetical order.
9094 (trace_args): Spelling fixes.
9095
9096 2006-07-09 Paul Eggert <eggert@cs.ucla.edu>
9097
9098 * data/yacc.c (YYID, yy_stack_print): Prefix local vars with "yy"
9099 so they don't collide with user-defined macros.
9100 (yy_stack_print): Don't assume that yytype_int16 promotes to int;
9101 this was never guaranteed, and now that we're using gnulib stdint,
9102 which defines int_fast16_t to long int, the problem is exposed.
9103
9104 2006-07-08 Paul Eggert <eggert@cs.ucla.edu>
9105
9106 * data/c.m4 (b4_basename): Simplify a bit, since we don't
9107 need the full POSIX semantics (and weren't implementing them
9108 anyway).
9109
9110 Adjust to Autoconf 2.60 and today's gnulib.
9111 * bootstrap (gnulib_modules): Add stdint.
9112 Remove special case for m4/onceonly_2_57.m4, since gnulib-tool
9113 no longer copies it.
9114 (intl_files_to_remove): Remove m4/longlong.m4 and m4/wchar_t.m4,
9115 since stdint needs the former and wcwidth (which is now required
9116 by mbswidth) needs the latter.
9117 Append 'datarootdir = @datarootdir@' to po/Makefile.in.in, to
9118 work around a compatibility glitch between gettext 0.14.6 and
9119 Autoconf 2.60.
9120 * configure.ac (AC_PREREQ): Require Autoconf 2.60.
9121 Do not check for uintptr_t, since new stdint module does the right
9122 thing.
9123 * lib/.cvsignore: Remove alloca.c, alloca.h, alloca_.h.
9124 Add stdint.h, stdint_.h, wcwidth.h.
9125 * m4/.cvsignore: Remove alloca.m4, onceonly.m4.
9126 Add absolute-header.m4, double-slash-root.m4, longlong.m4,
9127 stdint.m4, wchar_t.m4, wcwidth.m4.
9128 * src/files.c: Include <dirname.h> and <stdio-safer.h> in the
9129 usual order for ../lib/*.h files.
9130 (file_name_split): Use last_component, not base_name, to adjust
9131 to gnulib changes.
9132 * src/parse-gram.h: Include <strverscmp.h> in the usual order
9133 for ../lib/*.h files.
9134 (YYTYPE_INT16, YYTYPE_INT8, YYTYPE_UINT16, YYTYPE_UINT8):
9135 Define unconditionally, since we now assume the stdint module.
9136 * src/scan-skel.l: Include <dirname.h>.
9137 (BASE_QPUTS): Use last_component, not base_name.
9138 * src/system.h: Include <unlocked-io.h> in the usual order
9139 for ../lib/*.h files. Include <stdint.h> unconditionally,
9140 since we now use the stdint module.
9141 (uintptr_t): Declare if UINTPTR_MAX is not defined, not
9142 HAVE_UINTPTR_T, since we now use the stdint module.
9143 (base_name): Remove decl, since files now include <dirname.h>
9144 to get the decl.
9145
9146 2006-07-08 Akim Demaille <akim@lrde.epita.fr>
9147
9148 * data/c.m4 (b4_location_initial_column, b4_location_initial_line):
9149 New, default to 1.
9150 * data/yacc.c, data/glr.c, data/location.cc: Use them.
9151 * NEWS, doc/bison.texinfo: The initial column and line are 1 by
9152 default.
9153 * tests/calc.at: Adjust.
9154
9155 2006-07-08 Akim Demaille <akim@lrde.epita.fr>
9156
9157 * data/c.m4 (b4_basename): New.
9158 (b4_syncline): Also output the location of its invocation (from
9159 the skeleton).
9160 (b4_user_action, b4_define_user_action, b4_user_actions)
9161 (b4_user_initial_action, b4_user_post_prologue, b4_user_start_header)
9162 (b4_user_stype): New.
9163 * data/yacc.c, data/glr.c, data/lalr1.cc, data/glr.cc: Use them.
9164
9165 2006-07-07 Joel E. Denny <jdenny@ces.clemson.edu>
9166
9167 In the grammar file, the first column is 1 not 0 on the first line as
9168 on every other line.
9169 * src/parse-gram.y (%initial-action): Initialize @$ correctly.
9170 * tests/input.at (Torturing the Scanner): Update output.
9171
9172 * src/scan-gram.l (scanner_cursor): Declare it static.
9173
9174 2006-07-07 Joel E. Denny <jdenny@ces.clemson.edu>
9175
9176 In warnings, say "previous declaration" rather than "first
9177 declaration".
9178 * src/symtab.c (redeclaration): Do that here.
9179 * src/reader.c (record_merge_function_type): In the case of a result
9180 type clash, report the previous declaration rather than the very first
9181 one in the grammar file.
9182 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
9183 declared later): Add a third declaration to check this behavior.
9184 * tests/input.at (Incompatible Aliases): Update output.
9185
9186 2006-06-27 Akim Demaille <akim@epita.fr>
9187
9188 * doc/Doxyfile.in: New.
9189 * doc/Makefile.am: Use it.
9190 * src/lalr.h, src/symtab.h: Initial doxygenation.
9191
9192 2006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
9193
9194 Don't miss %merge result type warnings just because the LHS types are
9195 declared after the %merge. This continues the effort of the previous
9196 patch.
9197 * src/reader.c (get_merge_function): Don't set the merger type yet.
9198 (record_merge_function_type): New function for setting the merger type
9199 and checking for clashes.
9200 (grammar_current_rule_merge_set): Set the location of the %merge for
9201 the current rule.
9202 (packgram): Invoke record_merge_function_type for each rule now that
9203 all symbol type declarations have been parsed.
9204 * src/reader.h (merger_list.type_declaration_location): New member
9205 storing the location of the first %merge from which the type for this
9206 merging function was derived.
9207 * src/symlist.h (symbol_list.merger_declaration_location): New member
9208 storing the location of a rule's %merge, if any.
9209 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
9210 declared later): New test to catch the error fixed by the above patch.
9211
9212 2006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
9213
9214 Get action warnings (grammar_rule_check) right even when symbol
9215 declarations appear after the rules. Discussed at
9216 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00108.html>
9217 and
9218 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00151.html>.
9219 Don't mistake the type of $$ in a midrule to be that of its parent
9220 rule's $$.
9221 * src/reader.c (grammar_current_rule_end): Don't invoke
9222 grammar_rule_check yet since not all symbol declarations may have been
9223 parsed yet.
9224 (grammar_midrule_action): Likewise.
9225 Don't record whether the midrule's $$ has been used yet since actions
9226 haven't been translated yet.
9227 Record the midrule's parent rule and its RHS index within the parent
9228 rule.
9229 (grammar_current_rule_action_append): Don't translate the action yet
9230 since not all symbol declarations may have been parsed yet and, thus,
9231 warnings about types for $$, $n, @$, and @n can't be reported yet.
9232 (packgram): Translate the action and invoke grammar_rule_check now that
9233 all symbol declarations have been parsed.
9234 * src/scan-code.l (handle_action_dollar): Now that this is invoked
9235 after parsing the entire grammar file, the symbol list here in the case
9236 of a midrule is actually the midrule's empty RHS, so reference its
9237 parent rule's RHS where necessary.
9238 On the other hand, now that you can already know it's a midrule, you
9239 aren't forced to think $$ has the same type as its parent rule's $$.
9240 (handle_action_at): In the case of a midrule, reference the parent rule
9241 where necessary.
9242 * src/symlist.c (symbol_list_new): Initialize new midrule-related
9243 members.
9244 (symbol_list_length): Now that this is invoked after all rules have
9245 been parsed, a NULL symbol (rather than a NULL symbol list node)
9246 terminates a rule. symbol_list_print already does this correctly.
9247 * src/symlist.h (symbol_list.midrule_parent_rule,
9248 symbol_list.midrule_parent_rhs_index): New members so that midrules can
9249 remember their relationships with their parents.
9250 * tests/input.at (Type Clashes): Extend to catch the midrule $$ error
9251 fixed by the above patch.
9252 (_AT_UNUSED_VALUES_DECLARATIONS, AT_CHECK_UNUSED_VALUES): New m4 macros
9253 implementing...
9254 (Unused values): ... this old test case and...
9255 (Unused values before symbol declarations): ... this new test case.
9256 This one is the same as `Unused values' except that all symbol
9257 declarations appear after the rules in order to catch the rest of the
9258 errors fixed by the above patch.
9259
9260 2006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
9261
9262 More cleanup.
9263 * src/reader.c (current_rule): Declare it static since it's no longer
9264 used outside this file.
9265 (grammar_current_rule_action_append): Remove redundant arguments from
9266 translate_rule_action invocation.
9267 * src/reader.h (current_rule): Remove this unused extern.
9268 * src/scan-code.h (translate_rule_action): Remove redundant arguments.
9269 * src/scan-code.l (translate_rule_action): Likewise.
9270
9271 2006-06-25 Joel E. Denny <jdenny@ces.clemson.edu>
9272
9273 Clean up yesterday's patch.
9274 * parse-gram.y (rhs): Move grammar_midrule_action invocation from here
9275 to...
9276 * src/reader.c (grammar_current_rule_action_append): ... here for
9277 consistency with grammar_current_rule_symbol_append.
9278 * tests/regression.at (Braced code in declaration in rules section):
9279 Make yyerror and yylex static as usual.
9280
9281 2006-06-24 Joel E. Denny <jdenny@ces.clemson.edu>
9282
9283 Fix bug that mistakes braced code in a declaration in the rules section
9284 to be a rule action. Mentioned at
9285 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00105.html>.
9286 * src/scan-gram.l: Move midrule action detection from the start of the
9287 scanning of any braced code to...
9288 * src/parse-gram.y (rhs): ... the parsing of braced code as a rule
9289 action. For readability, use $2 and @2 rather than the equivalent
9290 global variables.
9291 * tests/regression.at (Braced code in declaration in rules section):
9292 New test to catch the error fixed by the above patch.
9293
9294 Work on code readability some.
9295 * src/scan-code.l (current_rule): Get rid of this misleading and
9296 redundant declaration: it's actually extern'ed in reader.h.
9297 (YY_DECL, code_lex, handle_action_dollar, handle_action_at,
9298 translate_action): Add a rule argument and use it instead of the global
9299 current_rule.
9300 (translate_rule_action): This already receives current_rule through an
9301 argument, so pass it on to translate_action instead of assigning
9302 current_rule to current_rule.
9303 (translate_symbol_action, translate_code): Pass rule = NULL to
9304 translate_action.
9305
9306 2006-06-23 Joel E. Denny <jdenny@ces.clemson.edu>
9307
9308 Rename %before-definitions to %start-header and %after-definitions to
9309 %end-header. Don't use these declarations to separate pre-prologue
9310 blocks from post-prologue blocks. Add new order-independent
9311 declarations %before-header and %after-header as alternatives to the
9312 traditional Yacc pre-prologue and post-prologue blocks. Discussed at
9313 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00110.html>.
9314 * NEWS (2.3+): Update for these changes.
9315 * data/glr.c (b4_before_definitions): Update to...
9316 (b4_start_header): ... this.
9317 (b4_after_definitions): Update to...
9318 (b4_end_header): ... this.
9319 * data/glr.cc: Likewise.
9320 * data/lalr1.cc: Likewise.
9321 * data/yacc.c: Likewise.
9322 * doc/bison.texinfo (The prologue): Update names, and replace remaining
9323 prologue blocks with %*-header declarations.
9324 (Calc++ Parser): Likewise.
9325 (Decl Summary): Update names.
9326 (Table of Symbols): Update description.
9327 * src/parse-gram.y (PERCENT_AFTER_DEFINITIONS): Update to...
9328 (PERCENT_END_HEADER): ... this.
9329 (PERCENT_BEFORE_DEFINITIONS): Update to...
9330 (PERCENT_START_HEADER): ... this.
9331 (PERCENT_AFTER_HEADER, PERCENT_BEFORE_HEADER): New tokens.
9332 (declaration): Update token names and m4 macro names.
9333 When parsing %end-header and %start-header, invoke translate_code
9334 before muscle_code_grow, and no longer set global booleans to remember
9335 whether these declarations have been seen.
9336 Parse new %after-header and %before-header.
9337 * src/reader.c (before_definitions, after_definitions): Remove.
9338 (prologue_augment): Accept a new bool argument to specify whether to
9339 augment the pre-prologue or post-prologue.
9340 * src/reader.h (before_definitions, after_definitions): Remove these
9341 extern's.
9342 (prologue_augment): Add new bool argument.
9343 * src/scan-gram.l (PERCENT_AFTER_DEFINITIONS): Update to...
9344 (PERCENT_END_HEADER): ... this.
9345 (PERCENT_BEFORE_DEFINITIONS): Update to...
9346 (PERCENT_START_HEADER): ... this.
9347 (PERCENT_AFTER_HEADER, PERCENT_BEFORE_HEADER): New tokens.
9348 * tests/actions.at (Printers and Destructors): Update names.
9349
9350 2006-06-22 Joel E. Denny <jdenny@ces.clemson.edu>
9351
9352 Add comparison operators for C++ location classes. Discussed at
9353 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00092.html>.
9354 * data/c++.m4 (b4_define_location_comparison): New boolean %define
9355 declaration indicating whether filename_type has an operator==. If
9356 filename_type is `std::string', it defaults to `1', `0' otherwise.
9357 * data/location.cc: Iff b4_define_location_comparison is `1', add
9358 operator== and operator!= for class position and for class location.
9359
9360 Some minor fixes.
9361 * src/scan-action.l: Remove unused file.
9362 * src/symtab.c (symbol_printer_set): Use printer_location not
9363 destructor_location.
9364 * src/symtab.h (struct symbol): Replace incorrect source comment for
9365 printer members.
9366 * tests/input.at (Incompatible Aliases): Update output with correct
9367 printer location.
9368
9369 2006-06-20 Joel E. Denny <jdenny@ces.clemson.edu>
9370
9371 Don't put the pre-prologue in the header file. For the yacc.c code
9372 file and the glr.c header and code files, move the pre-prologue before
9373 the token definitions. Add new %before-definitions and
9374 %after-definitions to declare code that will go in both the header file
9375 and code file. Discussed at
9376 <http://lists.gnu.org/archive/html/bison-patches/2005-12/msg00000.html>,
9377 <http://lists.gnu.org/archive/html/bison-patches/2006-01/msg00016.html>,
9378 and
9379 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00055.html>.
9380 * NEWS (2.3+): Describe these changes.
9381 * data/glr.c (b4_pre_prologue): Move from within to before...
9382 (b4_shared_declarations): ... this.
9383 Add new b4_before_definitions before b4_token_enums.
9384 Add new b4_after_definitions at the end.
9385 * data/glr.cc (b4_pre_prologue): Replace with...
9386 (b4_before_definitions): ... this in the header file.
9387 (b4_after_definitions): New near the end of the header file.
9388 * data/lalr1.cc (b4_pre_prologue): Move from the header file to the
9389 code file right before including the header file.
9390 (b4_before_definitions): New in the previous position of
9391 b4_pre_prologue in the header file.
9392 (b4_after_definitions): New near the end of the header file.
9393 * data/yacc.c: Clean up some m4 quoting especially in the header file.
9394 (b4_token_enums_defines): In the code file, move to right before
9395 YYSTYPE for consistency with the header file.
9396 (b4_before_definitions): New right before b4_token_enums_defines in
9397 both the header and code file.
9398 (b4_after_definitions): New right after YYLTYPE and yylloc in both the
9399 header and code file.
9400 * doc/bison.texinfo (Prologue): Show use of %before-definitions instead
9401 of prologues for %union dependencies.
9402 (Decl Summary): In %defines description, mention the effect of
9403 %before-definitions and %after-definitions on the header file.
9404 (Calc++ Parser): Forward declare driver in a %before-definitions rather
9405 than in the pre-prologue so that make check succeeds.
9406 (Table of Symbols): Add entries for %before-definitions and
9407 %after-definitions.
9408 * src/parse-gram.y (PERCENT_BEFORE_DEFINITIONS): New token for
9409 %before-definitions.
9410 (PERCENT_AFTER_DEFINITIONS): New token for %after-definitions.
9411 (declaration): Parse those declarations and append to
9412 b4_before_definitions and b4_after_definitions, respectively.
9413 * src/reader.c (before_definitions, after_definitions): New bools to
9414 track whether those declarations have been seen.
9415 (prologue_augment): Add to the post-prologue if %union,
9416 %before-definitions, or %after-definitions has been seen.
9417 * src/reader.h (before_definitions, after_definitions): New extern's.
9418 * src/scan-gram.l: Scan the new declarations.
9419 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Place the second
9420 prologue block in a %before-definitions or a %after-definitions based
9421 on whether the %union is declared.
9422 * tests/regression.at (Early token definitions with --yacc, Early token
9423 definitions without --yacc): Move tests for token definitions into the
9424 post-prologue since token names are no longer defined in the
9425 pre-prologue.
9426
9427 2006-06-20 Akim Demaille <akim@epita.fr>
9428
9429 * src/symtab.h, src/symtab.c (symbol_from_uniqstr): New.
9430 (symbol_get): Use it.
9431 * src/parse-gram.y: Use it.
9432
9433 2006-06-19 Joel E. Denny <jdenny@ces.clemson.edu>
9434
9435 * src/scan-gram.l: Remove unused declaration of last_string_1 so the
9436 build succeeds when configured with --enable-gcc-warnings.
9437
9438 2006-06-19 Paul Eggert <eggert@cs.ucla.edu>
9439
9440 * src/parse-gram.y (char_name): New function.
9441 (CHAR, STRING, string_content): For %printer, properly escape.
9442 (ID): Prefer fputs to fprintf.
9443 (id): Reindent to be consistent with other rules.
9444 Properly quote char.
9445
9446 The Translation Project changed its way of publishing translations
9447 to maintainers. I haven't received any responses to my request
9448 for supporting the old way, or for documenting the new way. I
9449 have modified 'bootstrap' to use screen scraping
9450 (in this case, HTML scraping). This is unreliable and inelegant,
9451 but I don't see any better way. Yuck.
9452 * bootstrap (TP_URL, WGET_COMMAND): New vars.
9453 (get_translations): New function, which uses HTML scraping to
9454 deduce locations of latest translations.
9455 Use this function to grab both bison and bison-runtime .po files.
9456 Don't bother priming the pump for the runtime-po domain any more,
9457 as it's now translated better than bison is.
9458
9459 2006-06-19 Akim Demaille <akim@epita.fr>
9460
9461 * src/scan-gram.l: No longer "parse" things after `%union' until
9462 `{'. Rather, return a single "%union" token.
9463 No longer make symbols: return strings, and leave the conversion
9464 to symbols to the parser.
9465 (SC_PRE_CODE, token_type): Remove.
9466 * src/parse-gram.y (%union): New field `character'.
9467 Sort tokens.
9468 (CHAR): New token.
9469 (ID, ID_COLON): Now that the scanner no longer makes them
9470 identifiers, adjust all uses to invoke symbol_get.
9471 (id_colon): New, wraps the conversion from string to symbol.
9472 (%union): Accept a possible union_name.
9473 (symbol): Now can be a char.
9474 * data/c.m4 (b4_union_name): Leave a default value.
9475 * data/glr.c, data/yacc.c: Use it.
9476
9477 2006-06-11 Joel E. Denny <jdenny@ces.clemson.edu>
9478
9479 For associating token numbers with token names for "yacc.c", don't use
9480 #define statements unless `--yacc' is specified; always use enum
9481 yytokentype. Most important discussions start at:
9482 <http://lists.gnu.org/archive/html/bison-patches/2005-09/msg00053.html>,
9483 <http://lists.gnu.org/archive/html/bison-patches/2005-12/msg00052.html>,
9484 and
9485 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00043.html>.
9486 * NEWS (2.3+): Mention.
9487 * data/c.m4 (b4_yacc_if): New.
9488 (b4_token_enums_defines): Use b4_yacc_if to decide whether to add the
9489 token #define's.
9490 * doc/bison.texinfo (Bison Options): Describe the effect of `--yacc'
9491 on token name definitions.
9492 * src/getargs.c (usage): Capitalize `Yacc' in English.
9493 * src/output.c (prepare): Define b4_yacc_flag.
9494 * tests/regression.at (Early token definitions): Test that tokens names
9495 are defined before the pre-prologue not just before the post-prologue.
9496 Remove this test case and copy to...
9497 (Early token definitions with --yacc): ... this to test #define's.
9498 (Early token definitions without --yacc): ... and this to test enums.
9499
9500 2006-06-11 Paul Eggert <eggert@cs.ucla.edu>
9501
9502 * NEWS: Reword the post-2.3 change to not be so optimistic about
9503 removing the old "look-ahead" spelling.
9504 Update previous look-ahead/lookahead change reports.
9505 * REFERENCES: look-ahead -> lookahead (since that's
9506 what he actually wrote).
9507 * doc/refcard.tex: look ahead -> lookahead,
9508 look-ahead -> lookahead
9509
9510 2006-06-09 Joel E. Denny <jdenny@ces.clemson.edu>
9511
9512 For consistency, use `lookahead' instead of `look-ahead' or
9513 `look_ahead'. Discussed starting at
9514 <http://lists.gnu.org/archive/html/bison-patches/2006-01/msg00049.html>
9515 and then at
9516 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00017.html>.
9517 * NEWS: For the next release, note the change to `--report'.
9518 * TODO, doc/bison.1: Update English.
9519 * doc/bison.texinfo: Update English.
9520 (Understanding Your Parser, Bison Options): Document as
9521 `--report=lookahead' rather than `--report=look-ahead'.
9522 * src/conflicts.c: Update English in comments.
9523 (lookahead_set): Rename from look_ahead_set.
9524 (flush_reduce): Rename argument look_ahead_tokens to lookahead_tokens.
9525 (resolve_sr_conflict): Rename local look_ahead_tokens to
9526 lookahead_tokens, and update other uses.
9527 (flush_shift, set_conflicts, conflicts_solve, count_sr_conflicts,
9528 count_rr_conflicts, conflicts_free): Update uses.
9529 * src/getargs.c (report_args): Move "lookahead" before alternate
9530 spellings.
9531 (report_types): Update uses.
9532 (usage): For `--report' usage description, state `lookahead' spelling
9533 rather than `look-ahead'.
9534 * src/getargs.h (report.report_lookahead_tokens): Rename from
9535 report_look_ahead_tokens.
9536 * src/lalr.c: Update English in comments.
9537 (compute_lookahead_tokens): Rename from compute_look_ahead_tokens.
9538 (state_lookahead_tokens_count): Rename from
9539 state_look_ahead_tokens_count.
9540 Rename local n_look_ahead_tokens to n_lookahead_tokens.
9541 (lookahead_tokens_print): Rename from look_ahead_tokens_print.
9542 Rename local n_look_ahead_tokens to n_lookahead_tokens.
9543 Update other uses.
9544 Update English in output.
9545 (add_lookback_edge, initialize_LA, lalr, lalr_free): Update uses.
9546 * src/print.c: Update English in comments.
9547 (lookahead_set): Rename from look_ahead_set.
9548 (print_reduction): Rename argument lookahead_token from
9549 look_ahead_token.
9550 (print_core, state_default_rule, print_reductions, print_results):
9551 Update uses.
9552 * src/print_graph.c: Update English in comments.
9553 (print_core): Update uses.
9554 * src/state.c: Update English in comments.
9555 (reductions_new): Update uses.
9556 (state_rule_lookahead_tokens_print): Rename from
9557 state_rule_look_ahead_tokens_print, and update other uses.
9558 * src/state.h: Update English in comments.
9559 (reductions.lookahead_tokens): Rename from look_ahead_tokens.
9560 (state_rule_lookahead_tokens_print): Rename from
9561 state_rule_look_ahead_tokens_print.
9562 * src/tables.c: Update English in comments.
9563 (conflict_row, action_row): Update uses.
9564 * tests/glr-regression.at
9565 (Incorrect lookahead during deterministic GLR,
9566 Incorrect lookahead during nondeterministic GLR): Rename
9567 print_look_ahead to print_lookahead.
9568 * tests/torture.at: Update English in comments.
9569 (AT_DATA_LOOKAHEAD_TOKENS_GRAMMAR): Rename from
9570 AT_DATA_LOOK_AHEAD_TOKENS_GRAMMAR.
9571 (Many lookahead tokens): Update uses.
9572 * data/glr.c: Update English in comments.
9573 * lalr1.cc: Likewise.
9574 * yacc.c: Likewise.
9575 * src/conflicts.h: Likewise.
9576 * src/lalr.h: Likewise.
9577 * src/main.c: Likewise.
9578 * src/output.c: Likewise.
9579 * src/parse-gram.c: Likewise.
9580 * src/tables.h: Likewise.
9581 * tests/calc.at: Likewise.
9582
9583 2006-06-08 Joel E. Denny <jdenny@ces.clemson.edu>
9584
9585 * src/flex-scanner.h (yytext): Remove stray `*/' in #define.
9586
9587 2006-06-07 Paul Eggert <eggert@cs.ucla.edu>
9588
9589 * TODO: Add request from Nelson H. F. Beebe to be able to install
9590 Bison without installing the yacc script.
9591
9592 2006-06-07 Joel E. Denny <jdenny@ces.clemson.edu>
9593
9594 * src/flex-scanner.h: For the sake of Flex 2.5.4, don't #define yyleng
9595 and yytext if they're already #define'd.
9596 * src/flex-scanner.h, src/location.h: Move #include "system.h" to...
9597 * src/scan-code-c.c: ... here.
9598 * src/scan-code.l, src/scan-gram.l: ... and here. Also #include
9599 <config.h>.
9600
9601 2006-06-07 Joel E. Denny <jdenny@ces.clemson.edu>
9602
9603 Get Bison to build again when configured with --enable-gcc-warnings.
9604 * src/location.c, src/location.h, src/main.c, src/scan-code.l: Add some
9605 missing #include's.
9606 * src/scan-code.l (handle_action_dollar, handle_action_at): Rename
9607 loc argument as it shadows a global.
9608 * src/scan-gram.l: Remove stray comma that prevents boundary_set
9609 invocation.
9610
9611 * src/.cvsignore: Add scan-code.c.
9612
9613 2006-06-07 Akim Demaille <akim@epita.fr>
9614
9615 * src/scan-gram.l: Move the "add a trailing ; to actions" code
9616 to...
9617 * src/scan-code.l: here.
9618 * tests/input.at (Torturing the Scanner): Fix another location
9619 error.
9620
9621 2006-06-07 Akim Demaille <akim@epita.fr>
9622
9623 * src/Makefile.am (BUILT_SOURCES): Fix the trailing backslash.
9624
9625 2006-06-06 Akim Demaille <akim@epita.fr>
9626
9627 Extract the parsing of user actions from the grammar scanner.
9628 As a consequence, the relation between the grammar scanner and
9629 parser is much simpler. We can also split "composite tokens" back
9630 into simple tokens.
9631 * src/gram.h (ITEM_NUMBER_MAX, RULE_NUMBER_MAX): New.
9632 * src/scan-gram.l (add_column_width, adjust_location): Move to and
9633 rename as...
9634 * src/location.h, src/location.c (add_column_width)
9635 (location_compute): these.
9636 Fix the column count: the initial column is 0.
9637 (location_print): Be robust to ending column being 0.
9638 * src/location.h (boundary_set): New.
9639 * src/main.c: Adjust to scanner_free being renamed as
9640 gram_scanner_free.
9641 * src/output.c: Include scan-code.h.
9642 * src/parse-gram.y: Include scan-gram.h and scan-code.h.
9643 Use boundary_set.
9644 (PERCENT_DESTRUCTOR, PERCENT_PRINTER, PERCENT_INITIAL_ACTION)
9645 (PERCENT_LEX_PARAM, PERCENT_PARSE_PARAM): Remove the {...} part,
9646 which is now, again, a separate token.
9647 Adjust all dependencies.
9648 Whereever actions with $ and @ are used, use translate_code.
9649 (action): Remove this nonterminal which is now useless.
9650 * src/reader.c: Include assert.h, scan-gram.h and scan-code.h.
9651 (grammar_current_rule_action_append): Use translate_code.
9652 (packgram): Bound check ruleno, itemno, and rule_length.
9653 * src/reader.h (gram_in, gram__flex_debug, scanner_cursor)
9654 (last_string, last_braced_code_loc, max_left_semantic_context)
9655 (scanner_initialize, scanner_free, scanner_last_string_free)
9656 (gram_out, gram_lineno, YY_DECL_): Move to...
9657 * src/scan-gram.h: this new file.
9658 (YY_DECL): Rename as...
9659 (GRAM_DECL): this.
9660 * src/scan-code.h, src/scan-code.l, src/scan-code-c.c: New.
9661 * src/scan-gram.l (gram_get_lineno, gram_get_in, gram_get_out):
9662 (gram_get_leng, gram_get_text, gram_set_lineno, gram_set_in):
9663 (gram_set_out, gram_get_debug, gram_set_debug, gram_lex_destroy):
9664 Move these declarations, and...
9665 (obstack_for_string, STRING_GROW, STRING_FINISH, STRING_FREE):
9666 these to...
9667 * src/flex-scanner.h: this new file.
9668 * src/scan-gram.l (rule_length, rule_length_overflow)
9669 (increment_rule_length): Remove.
9670 (last_braced_code_loc): Rename as...
9671 (gram_last_braced_code_loc): this.
9672 Adjust to the changes of the parser.
9673 Move all the handling of $ and @ into...
9674 * src/scan-code.l: here.
9675 * src/scan-gram.l (handle_dollar, handle_at): Remove.
9676 (handle_action_dollar, handle_action_at): Move to...
9677 * src/scan-code.l: here.
9678 * src/Makefile.am (bison_SOURCES): Add flex-scanner.h,
9679 scan-code.h, scan-code-c.c, scan-gram.h.
9680 (EXTRA_bison_SOURCES): Add scan-code.l.
9681 (BUILT_SOURCES): Add scan-code.c.
9682 (yacc): Be robust to white spaces.
9683
9684 * tests/conflicts.at, tests/input.at, tests/reduce.at,
9685 * tests/regression.at: Adjust the column numbers.
9686 * tests/regression.at: Adjust the error message.
9687
9688 2006-06-06 Joel E. Denny <jdenny@ces.clemson.edu>
9689
9690 * src/getargs.c (usage): Mention GLR not just LALR(1) in --help output.
9691 Use Akim's wording from
9692 <http://lists.gnu.org/archive/html/bison-patches/2006-05/msg00056.html>.
9693
9694 2006-06-06 Joel E. Denny <jdenny@ces.clemson.edu>
9695
9696 Between Bison releases, manually append `+' to the previous Bison
9697 release number, and use that as a signal to automatically print the
9698 ChangeLog's CVS Id keyword from --version. Discussed starting at
9699 <http://lists.gnu.org/archive/html/bison-patches/2006-05/msg00028.html>.
9700 * ChangeLog: Add Id header.
9701 * configure.ac (AC_INIT): Append `+' to `2.3'.
9702 * src/.cvsignore: Add revision.c.
9703 * src/Makefile.am (bison_SOURCES): Add revision.c and revision.h.
9704 (BUILT_SOURCES): Add revision.c.
9705 (revision.c): New target rule. This file defines a new global variable
9706 named revision. It initializes it with either the Id from ChangeLog
9707 or, if VERSION doesn't contain `+', with the empty string.
9708 * src/getargs.c (version): Print the value of revision.
9709 * src/revision.h: Extern revision.
9710
9711 2006-06-05 Paul Eggert <eggert@cs.ucla.edu>
9712
9713 * NEWS: Version 2.3.
9714 * configure.ac (AC_INIT): Likewise.
9715
9716 2006-05-30 Paul Eggert <eggert@cs.ucla.edu>
9717
9718 * data/glr.c (YYRECOVERING): Define to be a function-like macro
9719 with no arguments, not as an object-like macro. This is for
9720 compatibility with data/yacc.c. Problem reported by John P. Hartmann in
9721 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00059.html>.
9722 * doc/bison.texinfo (Action Features, Error Recovery, Table of Symbols):
9723 Document this.
9724
9725 2006-05-30 Joel E. Denny <jdenny@ces.clemson.edu>
9726
9727 * src/getargs.c (usage): Back out yesterday's modification of the
9728 --help output so that we don't have to wait for translation before
9729 releasing 2.3.
9730
9731 2006-05-29 Paul Eggert <eggert@cs.ucla.edu>
9732
9733 * doc/bison.texinfo (Introduction): Don't say "GLR grammar".
9734 Problem reported by Akim Demaille.
9735
9736 2006-05-29 Joel E. Denny <jdenny@ces.clemson.edu>
9737
9738 * src/getargs.c (usage): Mention GLR not just LALR(1) in --help output.
9739
9740 2006-05-26 Paul Eggert <eggert@cs.ucla.edu>
9741
9742 * data/yacc.c (yy_reduce_print): Omit trailing white space in
9743 generated source code. Problem reported by Frans Englich in
9744 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00049.html>.
9745
9746 2006-05-22 Paul Eggert <eggert@cs.ucla.edu>
9747
9748 * Makefile.maint (gzip_rsyncable, GZIP_ENV): Compute within the
9749 shell, not within 'make', so that 'make' by an ordinary builder
9750 (using GNU make) does not worry about configuring gzip. This also
9751 works around a bug reported independently by Keith Thompson and by
9752 Georg Schwarz, whereby gzip 1.2.4 --help would output usage on
9753 stderr rather than stdout, messing up the build logs.
9754
9755 2006-05-21 Joel E. Denny <jdenny@ces.clemson.edu>
9756
9757 * data/yacc.c (yyparse): Wrap the final return from yyparse inside YYID
9758 to make sure that YYID will never be unused. This fixes a 'make
9759 maintainer-check' failure caused by the recent changes to the 'Trivial
9760 grammars' test case, which caused g++ 4.1.0 to complain that YYID was
9761 not used.
9762 * data/glr.c (yyparse): Wrap yyparse's return inside YYID just in case.
9763
9764 2006-05-21 Joel E. Denny <jdenny@ces.clemson.edu>
9765
9766 * data/glr.c (yyresolveLocations): Remove bogus YYASSERT that the
9767 state before an empty RHS is always resolved here. Only the location
9768 of that state is guaranteed to be resolved, and that's enough. This
9769 fixes the remaining bug reported by Derek M. Jones in
9770 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00027.html>.
9771 * tests/glr-regression.at (Uninitialized location when reporting
9772 ambiguity): Test the above case.
9773 Also, the embedded comments in this test case claim it checks the case
9774 of an empty RHS that has inherited the initial location. However, the
9775 corresponding LHS was already resolved, so yyresolveLocations didn't
9776 actually have reason to modify it. Fix this by forcing
9777 nondeterministic operation at the beginning of the parse.
9778
9779 2006-05-20 Paul Eggert <eggert@cs.ucla.edu>
9780
9781 * data/c.m4 (b4_yy_symbol_print_generate):
9782 (b4_yy_symbol_print_generate): Use 'YYSTYPE const' rather than
9783 'const YYSTYPE', and similarly for YYLTYPE. This fixes one
9784 of the bugs reported today by Derek M Jones in
9785 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00027.html>.
9786 * doc/bison.texinfo (Value Type): Document that YYSTYPE must be
9787 defined to be a type name without parens or brackets.
9788 (Location Type): Similarly for YYLTYPE.
9789 * tests/regression.at (Trivial grammars): Put in a test for this
9790 bug that will be caught by 'make maintainer-check' (though not,
9791 alas, by 'make check' unless your compiler is picky).
9792
9793 2006-05-19 Paul Eggert <eggert@cs.ucla.edu>
9794
9795 * NEWS: Version 2.2.
9796 * configure.ac (AC_INIT): Likewise.
9797
9798 2006-05-17 Joel E. Denny <jdenny@ces.clemson.edu>
9799
9800 * data/glr.c (yyreportTree): Make room in yystates for the state
9801 preceding the RHS. This fixes the segmentation fault reported by Derek
9802 M. Jones in
9803 <http://lists.gnu.org/archive/html/help-bison/2006-05/msg00035.html>.
9804 (yyreportTree, yypdumpstack): Subtract 1 from yyrule before printing
9805 to the user. Reported for yyreportTree by Derek M. Jones later in the
9806 same thread.
9807 * THANKS: Add Derek M. Jones.
9808 Update my email address.
9809 Fix typo in Steve Murphy's name.
9810
9811 2006-05-14 Paul Eggert <eggert@cs.ucla.edu>
9812
9813 * data/glr.c (yyreportSyntaxError): Fix off-by-one error in
9814 checking against YYLAST that caused the parser to miss a potential
9815 alternative in its diagnostic.
9816 Problem reported by Maria Jose Moron Fernandez in
9817 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00024.html>.
9818 * data/lalr1.cc (yysyntax_error_): Likewise.
9819 * data/yacc.c (yysyntax_error): Likewise.
9820 * tests/regression.at (_AT_DATA_DANCER_Y): Use static array for
9821 tokens, in case we run into an older C compiler.
9822 (_AT_DATA_EXPECT2_Y, AT_CHECK_EXPECT2): New macros.
9823 Use them to check for the off-by-one error fixed above.
9824
9825 * data/yacc.c (yytnamerr): Fix typo: local var should be of type
9826 YYSIZE_T, not size_t.
9827 * tests/regression.at (Trivial grammars): New test, to catch
9828 the error fixed by the above patch.
9829
9830 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
9831
9832 * doc/bison.texinfo (C++ Bison Interface): Clarify the naming
9833 scheme.
9834 Reported by Steve Murphy.
9835
9836 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
9837
9838 * data/glr.cc, data/lalr1.cc: Using %defines is mandatory.
9839 * data/glr.cc: b4_location_flag is now b4_locations_flag.
9840
9841 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
9842
9843 Implement --trace=m4.
9844 * src/getargs.c (trace_types, trace_args): Accept trace_m4.
9845 * src/output.c (output_skeleton): When set, pass -dV to m4.
9846
9847 Factor the handling of flags in m4.
9848 * src/output.c (prepare): Rename the muscle names debug, defines,
9849 error_verbose to debug_flag, defines_flag, error_verbose_flag.
9850 * data/c.m4: Adjust.
9851 (_b4_define_flag_if, b4_define_flag_if, b4_defines_if): New.
9852 Use b4_define_flag_if to define other b4_FLAG_if macros.
9853 (b4_location_if): As a consequence, rename as...
9854 (b4_locations_if): this, for consistency.
9855 Adjust all the skeletons.
9856
9857 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
9858
9859 * etc/bench.pm: Shorten bench names.
9860
9861 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
9862
9863 * src/output.h, src/output.c (error_verbose): Move to...
9864 * src/getargs.h, src/getargs.c: here.
9865 Sort the flags.
9866 Adjust dependencies.
9867
9868 2006-05-13 Paul Eggert <eggert@cs.ucla.edu>
9869
9870 * data/c.m4 (b4_copyright): Put the special exception for Bison
9871 skeletons here, so we don't have to put it in each skeleton. All
9872 uses changed. Suggested by Akim Demaille. Also, wrap the
9873 copyright notice, in case it is longer than 80 columns. Replace
9874 comma by newline after title.
9875
9876 2006-05-11 Paul Eggert <eggert@cs.ucla.edu>
9877
9878 * doc/bison.texinfo (Calc++ Scanner): The flex behavior is an
9879 incompatibility, not a bug. Mention that it wasn't fixed as of
9880 flex 2.5.33.
9881
9882 2006-05-11 Akim Demaille <akim@lrde.epita.fr>
9883
9884 * examples/extexi: Enforce the precedence of concatenation over
9885 >>.
9886 Reported by Tommy Nordgren.
9887
9888 2006-05-11 Akim Demaille <akim@lrde.epita.fr>
9889
9890 * data/lalr1.cc (yytranslate_): Rename token as t to avoid clashes
9891 with the member "token".
9892 Reported by Martin Nylin.
9893
9894 2006-05-08 Paul Eggert <eggert@cs.ucla.edu>
9895
9896 * data/glr.c: Switch to Bison 2.2 special-exception language in
9897 the copyright notice. Use more-regular format for titles and
9898 copyright notices.
9899 * data/glr.cc: Likewise.
9900 * data/location.cc: Likewise.
9901 * data/yacc.cc: Likewise.
9902 * doc/bison.texinfo (Conditions): Document this.
9903 * NEWS: likewise. Upgrade version to 2.2.
9904
9905 2006-04-27 Akim Demaille <akim@lrde.epita.fr>
9906
9907 * data/glr.cc: Remove dead code.
9908
9909 2006-04-25 Paul Eggert <eggert@cs.ucla.edu>
9910
9911 * bootstrap: Comment out the AM_CPPFLAGS line, since we don't use
9912 that variable and the line breaks the bootstrap. Problem reported
9913 by Juan M. Guerrero.
9914
9915 2006-04-24 Akim Demaille <akim@lrde.epita.fr>
9916
9917 * doc/bison.texinfo (Multiple start-symbols): New.
9918
9919 2006-04-24 Akim Demaille <akim@lrde.epita.fr>
9920
9921 * etc/README, etc/bench.pl: New.
9922
9923 2006-04-03 Akim Demaille <akim@lrde.epita.fr>
9924
9925 * src/scan-gram.l: Be robust to BRACED_CODE appearing before any
9926 rule.
9927 Reported by Mickael Labau.
9928 * tests/input.at (Torturing the Scanner): Test it.
9929
9930 2006-03-16 Paul Eggert <eggert@cs.ucla.edu>
9931
9932 * doc/bison.texinfo (Decl Summary): Don't mention yylloc twice.
9933 Problem reported by Bob Rossi.
9934
9935 2006-03-13 Paul Eggert <eggert@cs.ucla.edu>
9936
9937 * doc/bison.texinfo: Remove @shorttitlepage stuff; it wasn't used
9938 and didn't really work.
9939 For the index, use @ifnotinfo, not @iftex.
9940 Minor cleanups of spacing and terminology.
9941
9942 2006-03-12 Akim Demaille <akim@lrde.epita.fr>
9943
9944 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Fix the definition
9945 of AT_NAME_PREFIX when %name-prefix is not used.
9946
9947 2006-03-12 Akim Demaille <akim@lrde.epita.fr>
9948
9949 Apply --prefix to C++ skeletons too: they change the namespace.
9950 The test suite already exercize these cases.
9951 * data/c++.m4 (b4_namespace): New.
9952 * data/lalr1.cc, data/glr.cc, data/location.cc: Use it instead of `yy'.
9953 * data/lalr1.cc (yytnameerr_): Move its definition into the namespace.
9954 * data/yacc.c, data/glr.c: Remove a useless `[]'.
9955 * doc/bison.texinfo: Document it.
9956 (Option Cross Key): Use @multitable in all formats. It looks
9957 nicer, even in TeX outputs.
9958 (Rules): Use the same code whatever the output type is.
9959 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS)
9960 (_AT_BISON_OPTION_POPDEFS): Support AT_NAME_PREFIX.
9961 * tests/calc.at: Use it, instead of hard coding `yy'.
9962
9963 2006-03-10 Akim Demaille <akim@lrde.epita.fr>
9964
9965 * TODO: Remove dead items.
9966
9967 2006-03-10 Akim Demaille <akim@lrde.epita.fr>
9968
9969 * doc/FAQ: Remove, merged into...
9970 * doc/bison.texinfo (FAQ): this.
9971 * doc/Makefile.am (EXTRA_DIST): Adjust.
9972
9973 2006-03-10 Akim Demaille <akim@lrde.epita.fr>
9974
9975 * data/c.m4 (b4_token_enum): Always define the enum of tokens,
9976 even if empty.
9977 * data/lalrl1.cc, data/glr.cc (parser::token_type): New.
9978 * doc/bison.texinfo (Calc++ Scanner): Use it.
9979
9980 2006-03-09 Paul Eggert <eggert@cs.ucla.edu>
9981
9982 Fix two nits reported by twlevo, plus one more that I discovered.
9983
9984 * src/assoc.h (assoc_to_string): Give a name to the arg, as
9985 this is the usual Bison style.
9986 * src/location.h (location_print): Likewise.
9987
9988 * src/reader.h (token_name): Likewise.
9989
9990 2006-03-08 Paul Eggert <eggert@cs.ucla.edu>
9991
9992 Fix some nits reported by twlevo.
9993 * doc/FAQ: Remove ancient Y2K FAQ, replacing it with "secure"
9994 and "POSIX". Use more-modern syntax for URLs. Mention C++
9995 and ask for Java. Don't hardwire OS version numbers. Add
9996 copyright notice.
9997 * m4/.cvsignore: Add unistd_h.m4, for latest gnulib.
9998 * src/conflicts.c (solved_conflicts_obstack): Now static.
9999
10000 2006-03-08 Joel E. Denny <jdenny@ces.clemson.edu>
10001
10002 * doc/bison.texinfo (Introduction): Mention GLR and C++ as on the web
10003 page. Say "you can use it" not "you may use it" as on the web page;
10004 we're describing capabilities not granting permission.
10005
10006 2006-03-06 Paul Eggert <eggert@cs.ucla.edu>
10007
10008 * data/glr.c (yyresolveLocations): Rename local variables to avoid
10009 shadowing warnings. Use usual patter for iterating through RHS.
10010 * tests/glr-regression.at
10011 (Uninitialized location when reporting ambiguity):
10012 Modify yylex so that it uses its argument, rather than trying
10013 to rely on ARGSUSED (which doesn't work for gcc with warnings).
10014 const char -> char const.
10015
10016 * tests/Makefile.am ($(srcdir)/package.m4, maintainer-check-valgrind):
10017 Don't use tabs inside commands; it messes up 'ps'.
10018 Problem reported by twlevo.
10019
10020 2006-03-06 Joel E. Denny <jdenny@ces.clemson.edu>
10021
10022 * tests/glr-regression.at (Uninitialized location when reporting
10023 ambiguity): New test case.
10024 * data/glr.c (yyresolveLocations): New function, which uses
10025 YYLLOC_DEFAULT.
10026 (yyresolveValue): Invoke yyresolveLocations before reporting an
10027 ambiguity.
10028 * doc/bison.texinfo (Default Action for Locations): Note
10029 YYLLOC_DEFAULT's usage for ambiguity locations.
10030 (GLR Semantic Actions): Cross-reference those notes.
10031
10032 2006-03-04 Joel E. Denny <jdenny@ces.clemson.edu>
10033
10034 * tests/glr-regression.at (Leaked semantic values when reporting
10035 ambiguity): Remove unnecessary union and type declarations.
10036 (Leaked lookahead after nondeterministic parse syntax error): New test
10037 case.
10038 * data/glr.c (yyparse): Check for zero stacks remaining before
10039 attempting to shift the lookahead so that you don't lose it.
10040
10041 2006-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
10042
10043 Avoid memory leaks by not invoking longjmp in yyreportAmbiguity.
10044 * tests/glr-regression.at (Leaked semantic values when reporting
10045 ambiguity): New test case.
10046 * data/glr.c (yyreportAmbiguity): Invoke yyyerror directly and return
10047 yyabort rather than invoking yyFail, which invokes longjmp. Remove the
10048 now unnecessary yystackp parameter.
10049 (yyresolveValue): Return yyreportAmbiguity's result. Now the necessary
10050 destructors can be called.
10051
10052 * tests/glr-regression.at: Don't invoke bison with `-t' unnecessarily
10053 in existing testcases.
10054
10055 2006-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
10056
10057 Don't leak semantic values for parent RHS when a user action cuts the
10058 parser, and clean up related code a bit.
10059 * tests/glr-regression.at (Leaked merged semantic value if user action
10060 cuts parse): Rename to...
10061 (Leaked semantic values if user action cuts parse): ... this. Add check
10062 for leaked parent RHS values.
10063 * data/glr.c (yydestroyGLRState): In debugging output, distinguish
10064 between an unresolved state (non-empty chain of semantic options) and
10065 an incomplete one (signaled by an empty chain).
10066 (yyresolveStates): Document the interface. Move all manipulation of a
10067 successfully or unsuccessfully resolved yyGLRState to...
10068 (yyresolveValue): ... here so that yyresolveValue always leaves a
10069 yyGLRState with consistent data and thus is easier to understand.
10070 Remove the yyvalp and yylocp parameters since they are always just
10071 taken from the yys parameter. When reporting a discarded merged value
10072 in debugging output, note that it is incompletely merged. Document the
10073 interface.
10074 (yyresolveAction): If resolving any of the RHS states fails, destroy
10075 them all rather than leaking them. Thus, as long as user actions are
10076 written to clean up the RHS correctly, yyresolveAction always cleans up
10077 the RHS of a semantic option. Document the interface.
10078
10079 2006-02-27 Paul Eggert <eggert@cs.ucla.edu>
10080
10081 * data/glr.c (yyexpandGLRStack): Catch an off-by-one error that
10082 led to a segmentation fault in GNU Pascal. Problem reported
10083 by Waldek Hebisch.
10084
10085 2006-02-21 Joel E. Denny <jdenny@ces.clemson.edu>
10086
10087 * doc/bison.texinfo (Mid-Rule Actions): Explain how to bury a
10088 mid-rule action inside a nonterminal symbol in order to declare a
10089 destructor for its semantic value.
10090
10091 2006-02-16 Paul Eggert <eggert@cs.ucla.edu>
10092
10093 * data/yacc.c [(! defined yyoverflow || YYERROR_VERBOSE) && !
10094 YYSTACK_USE_ALLOCA && ! defined YYSTACK_ALLOC && defined
10095 __cplusplus && ! defined _STDLIB_H && !
10096 ((defined YYMALLOC || defined malloc) && (defined YYFREE ||
10097 defined free))]: Include <stdlib.h> rather than rolling our own
10098 declarations of malloc and free, to avoid problems with
10099 incompatible declarations (using 'throw') C++'s stdlib.h. This
10100 should fix Debian bug 340012
10101 <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=340012>,
10102 reported by Guillaume Melquiond.
10103
10104 2006-02-13 Paul Eggert <eggert@cs.ucla.edu>
10105
10106 * NEWS: Clarify symbols versus types in unused-value warnings.
10107
10108 * configure.ac (AC_INIT): Bump version number.
10109
10110 2006-02-13 Paul Eggert <eggert@cs.ucla.edu>
10111
10112 * NEWS: Version 2.1a.
10113 * tests/headers.at (AT_TEST_CPP_GUARD_H): Declare yyerror and yylex,
10114 since C99 requires this.
10115
10116 2006-02-11 Paul Eggert <eggert@cs.ucla.edu>
10117
10118 * m4/c-working.m4: New file.
10119 * configure.ac (BISON_TEST_FOR_WORKING_C_COMPILER): Use it.
10120
10121 2006-02-10 Paul Eggert <eggert@cs.ucla.edu>
10122
10123 * Makefile.maint: Merge from coreutils.
10124
10125 2006-02-09 Paul Eggert <eggert@cs.ucla.edu>
10126
10127 More portability fixes for problems summarized by Nelson H. F. Beebe.
10128
10129 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Catch a
10130 configuration screwup "./configure CC=/opt/SUNWspro/bin/c89
10131 CFLAGS="-xarch=generic64" CXX=/opt/SUNWspro/bin/CC
10132 LDFLAGS="-xarch=generic64" with Sun C 5.7 on Solaris 10; this
10133 messes up because C++ code is compiled in 32-bit mode but linked
10134 in 64-bit mode.
10135
10136 2006-02-08 Paul Eggert <eggert@cs.ucla.edu>
10137
10138 More portability fixes for problems summarized by Nelson H. F. Beebe.
10139
10140 * doc/bison.texinfo (Calc++ Scanner): Work around a bug in flex
10141 2.5.31. This resembles the 2005-10-10 patch to src/scan-skel.l.
10142
10143 * examples/calc++/Makefile.am (check_PROGRAMS): Renamed from
10144 nodist_PROGRAMS, since we don't need to actually compile the
10145 example if we're just doing a plain 'make'. This avoids bothering
10146 the installer unnecessarily about problems due to weird C++
10147 compilers.
10148
10149 2006-02-06 Paul Eggert <eggert@cs.ucla.edu>
10150
10151 More portability fixes for problems summarized by Nelson H. F. Beebe.
10152
10153 * tests/headers.at (AT_TEST_CPP_GUARD_H): Use #include <...> rather
10154 than #include "...", and compile with -I'.'. The old method was
10155 not portable, according to Posix and the C standard, and it does
10156 not work with Sun C 5.7, where previous #line directives affect
10157 the working directory used in later #include "..." directives.
10158
10159 2006-02-06 Juan Manuel Guerrero <juan.guerrero@gmx.de>
10160
10161 Various DJGGP specific issues in /djgpp
10162
10163 2006-02-02 Paul Eggert <eggert@cs.ucla.edu>
10164
10165 More portability fixes for problems summarized by Nelson H. F. Beebe.
10166
10167 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check that
10168 '#include <map>' works and that you can apply ++ to iterators.
10169
10170 2006-02-01 Paul Eggert <eggert@cs.ucla.edu>
10171
10172 Work around portability problems summarized by Nelson H. F. Beebe in
10173 <http://lists.gnu.org/archive/html/bug-bison/2005-09/msg00021.html>.
10174
10175 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check
10176 that '#include <string>' works.
10177
10178 * data/lalr1.cc (yytranslate_): No longer inline, to work around a
10179 porting problem to g++ 3.4.3 on Darwin 7.9.0, where g++ complained
10180 "warning: sorry: semantics of inline function static data `const
10181 unsigned char translate_table[262]' are wrong (you'll wind up with
10182 multiple copies)".
10183
10184 * lib/bbitset.h (struct bitset_vtable): Rename members not, and,
10185 or, xor to not_, and_, or_, and xor_, respectively. This works
10186 around a bug in GCC 3.4.3 on Irix 6.5, which apparently has a
10187 random system header somewhere that includes the equivalent of
10188 <iso646.h>.
10189
10190 * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that "$CC
10191 -E" works; it apparently doesn't work with PathScale EKO Compiler
10192 Suite Version 2.0.
10193
10194 2006-01-30 Joel E. Denny <jdenny@ces.clemson.edu>
10195
10196 During deterministic GLR operation, user actions should be able to
10197 influence the parse by changing yychar. To make this easier to fix and
10198 to make glr.c easier to evolve in general, don't maintain yytoken in
10199 parallel with yychar; just compute yytoken when needed.
10200 * tests/glr-regression.at (Incorrect lookahead during deterministic
10201 GLR): Check that setting yychar in a user action has the intended
10202 effect.
10203 * data/glr.c (yyGLRStack): Remove yytokenp member.
10204 (yyclearin): Don't set *yytokenp.
10205 (yyprocessOneStack, yyreportSyntaxError, yyrecoverSyntaxError): Examine
10206 yychar rather than *yytokenp to determine the current lookahead.
10207 Compute yytoken locally when needed.
10208 (yyparse): Likewise. Remove the local yytoken that yytokenp used to
10209 point to.
10210
10211 * doc/bison.texinfo (Bison Options): Remove stray sentence fragment
10212 after `--report' documentation.
10213
10214 2006-01-30 Paul Eggert <eggert@cs.ucla.edu>
10215
10216 * src/parse-gram.y (grammar_declaration): Location of printer
10217 symbol is @1, not list->location. Bug reported by twlevo.
10218 * tests/input.at (Incompatible Aliases): Adjust to above change.
10219
10220 2006-01-29 Paul Eggert <eggert@cs.ucla.edu>
10221
10222 * tests/input.at (AT_CHECK_UNUSED_VALUES): Remove. Instead, do
10223 all the test at once. This makes the output easier to read in the
10224 normal case.
10225
10226 Fix a longstanding bug uncovered by bro-0.9a9/src/parse.y, which I
10227 got from <http://bro-ids.org/download.html>. The bug is that
10228 when two actions appeared in succession, the second one was
10229 scanned before the first one was added to the grammar rule
10230 as a midrule action. Bison then output the incorrect warning
10231 "parse.y:905.17-906.36: warning: unused value: $3".
10232 * src/parse-gram.y (BRACED_CODE, action): These are no longer
10233 associated with a value.
10234 (rhs): Don't invoke grammar_current_rule_action_append.
10235 (action): Invoke it here instead.
10236 * src/reader.c (grammar_midrule_action): Now extern.
10237 (grammar_current_rule_action_append): Don't invoke
10238 grammar_midrule_action; that is now the scanner's job.
10239 * src/reader.h (last_string, last_braced_code_loc):
10240 (grammar_midrule_action): New decls.
10241 * src/scan-gram.l (last_string): Now extern, sigh.
10242 (last_braced_code_loc): New extern variable.
10243 (<INITIAL>"{"): Invoke grammar_midrule_action if the current
10244 rule already has an action.
10245 (<SC_BRACED_CODE>"}"): Set last_braced_code_loc before returning.
10246 * tests/input.at (AT_CHECK_UNUSED_VALUES):
10247 Add some tests to check that the above changes fixed the bug.
10248
10249 2006-01-27 Paul Eggert <eggert@cs.ucla.edu>
10250
10251 * src/reader.c (symbol_should_be_used): Renamed from symbol_typed_p.
10252 All used changed. Check whether the symbol has a destructor,
10253 not whether it is typed.
10254 * tests/input.at (AT_CHECK_UNUSED_VALUES): Add a destructor, so
10255 that the values are still reported as unused. All line numbers
10256 adjusted.
10257
10258 2006-01-23 Paul Eggert <eggert@cs.ucla.edu>
10259
10260 Work around a bug in bro 0.8, which underparenthesizes its
10261 definition of YYLLOC_DEFAULT.
10262 * data/glr.c: Change all uses of YYLLOC_DEFAULT to parenthesize
10263 their arguments.
10264 * data/lalr1.cc: Likewise.
10265 * data/yacc.cc: Likewise.
10266
10267 2006-01-22 Paul Eggert <eggert@cs.ucla.edu>
10268
10269 Work around a bug in Pike 7.0, and give the Pike folks a
10270 better way to override the usual int widths.
10271 * data/yacc.c (b4_int_type): Use yytype_uint8, etc., so that the
10272 user can override the types.
10273 (short): #undef, to work around a bug in Pike 7.0.
10274 (yytype_uint8, yytype_int8, yytype_uint16, yytype_int16): New types.
10275 (union yyalloc.yyss): Use yytype_int16 rather than short.
10276 All uses changed.
10277 (yysigned_char): Remove.
10278 * src/parse-gram.y (YYTYPE_UINT8, YYTYPE_INT8, YYTYPE_UINT16):
10279 (YYTYPE_INT16): New macros, to test the new facility in yacc.c.
10280 * tests/regression.at (Web2c Actions): Adjust to above changes.
10281
10282 * src/reader.c (check_and_convert_grammar): New function.
10283 (reader): Close the input file even if something went wrong during
10284 parsing. Minor file descriptor leak reported by twlevo.
10285
10286 * src/assoc.c (assoc_to_string): Use a default: abort (); case
10287 to pacify gcc -Wswitch-default.
10288 * src/scan-gram.l (adjust_location): Use a default: break; case
10289 to pacify gcc -Wswitch-default.
10290 * src/scan-skel.h (skel_get_lineno, skel_get_in, skel_get_out):
10291 (skel_get_leng, skel_get_text, skel_set_lineno, skel_set_in):
10292 (skel_set_out, skel_get_debug, skel_set_debug, skel_lex_destroy):
10293 Move these decls to scan-skel.l, since they don't need to be
10294 visible elsewhere.
10295 * src/scan-skel.l: Accept the above decls.
10296 (skel_lex): New decl, to pacify GCC when unpatched flex 2.5.31
10297 is used.
10298
10299 2006-01-21 Paul Eggert <eggert@cs.ucla.edu>
10300
10301 * Makefile.cfg (local-checks-to-skip): Add changelog-check,
10302 since we don't want to insist on a version number at the start
10303 of the changelog every time.
10304 * Makefile.maint: Sync from coreutils a bit better.
10305 (sc_trailing_blank): Renamed from sc_trailing_space.
10306 All uses changed.
10307 (sc_no_if_have_config_h, sc_require_config_h):
10308 (sc_prohibit_assert_without_use): New rules.
10309 (sc_obsolete_symbols): Don't catch Makefile.maint itself.
10310 (sc_dd_max_sym_length): Fix leading spaces in rule.
10311 (sc_system_h_headers): Prefix with @.
10312 (sc_useless_cpp_parens, m4-check): Output line numbers.
10313 (changelog-check): Allow version only in head.
10314 * data/c.m4: Use "defined FOO" instead of "defined (FOO)", to
10315 satisfy new Makefile.maint rule.
10316 * data/glr.c: Likewise.
10317 * data/glr.cc: Likewise.
10318 * data/lalr1.cc: Likewise.
10319 * data/yacc.c: Likewise.
10320 * lib/ebitsetv.c: Likewise.
10321 * lib/lbitset.c: Likewise.
10322 * lib/subpipe.c: Likewise.
10323 * lib/timevar.c: Likewise.
10324 * src/system.h: Likewise.
10325 * data/yacc.c (YYSTYPE): Don't generate trailing spaces in output.
10326 * djgpp/Makefile.maint: Add copyright notice.
10327 * djgpp/README.in: Likewise.
10328 * djgpp/config.bat: Likewise.
10329 * djgpp/config.site: Likewise.
10330 * djgpp/config_h.sed: Likewise.
10331 * djgpp/djunpack.bat: Likewise.
10332 * djgpp/config.sed: Fix copyright notice to match standard format.
10333 * djgpp/subpipe.h: Likewise.
10334 * lib/bitsetv-print.c: Likewise.
10335 * lib/bitsetv.c: Likewise.
10336 * lib/subpipe.h: Likewise.
10337 * lib/timevar.c: Likewise.
10338 * lib/timevar.h: Likewise.
10339 * djgpp/subpipe.c: Use standard recipe for config.h.
10340 * lib/abitset.c: Likewise.
10341 * lib/bitset.c: Likewise.
10342 * lib/bitset_stats.c: Likewise.
10343 * lib/bitsetv-print.c: Likewise.
10344 * lib/bitsetv.c: Likewise.
10345 * lib/ebitsetv.c: Likewise.
10346 * lib/get-errno.c: Likewise.
10347 * lib/lbitset.c: Likewise.
10348 * lib/subpipe.c: Likewise.
10349 * lib/timevar.c: Likewise.
10350 * lib/vbitset.c: Likewise.
10351 * tests/local.at: Likewise.
10352 * src/scan-gram.l: Don't include verify.h, since system.h does
10353 that for us.
10354 * .x-sc_require_config_h: New file.
10355 * .x-sc_unmarked_diagnostics: New file.
10356
10357 2006-01-20 Paul Eggert <eggert@cs.ucla.edu>
10358
10359 Be a bit more systematic about using 'abort'.
10360 * lib/abitset.c (abitset_test): Remove ATTRIBUTE_UNUSED; not needed.
10361 * lib/bitset.c (bitset_bytes, bitset_init, bitset_op4_cmp):
10362 Put 'default: abort ();' before some other case, to satisfy older
10363 pedantic compilers.
10364 * lib/bitset_stats.c (bitset_stats_init): Likewise.
10365 * lib/ebitset.c (ebitset_elt_find, ebitset_op3_cmp): Likewise.
10366 * lib/lbitset.c (lbitset_elt_find, lbitset_op3_cmp): Likewise.
10367 * src/conflicts.c (resolve_sr_conflict): Likewise.
10368 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str):
10369 (get_decision_str, get_orientation_str, get_node_alignment_str):
10370 (get_arrow_mode_str, get_crossing_type_str, get_view_str):
10371 (get_linestyle_str, get_arrowstyle_str): Likewise.
10372 * src/conflicts.c (resolve_sr_conflict):
10373 Use a default case rather than one for the one remaining enum
10374 value, to catch invalid enum values as well.
10375 * src/lalr.c (set_goto_map, map_goto):
10376 Prefer "assert (FOO);" to "if (!FOO) abort ();".
10377 * src/nullable.c (nullable_compute, token_definitions_output):
10378 Likewise.
10379 * src/reader.c (packgram, reader): Likewise.
10380 * src/state.c (transitions_to, state_new, state_reduction_find):
10381 Likewise.
10382 * src/symtab.c (symbol_user_token_number_set, symbol_make_alias):
10383 (symbol_pack): Likewise.
10384 * src/tables.c (conflict_row, pack_vector): Likewise.
10385 * src/scan-skel.l (QPUTS): Remove unnecessary parens.
10386 (BASE_QPUTS, "@output ".*\n): Remove unnecessary asserts.
10387 * src/system.h: Don't include <assert.h>.
10388 (assert): New macro.
10389
10390 * doc/bison.texinfo (Prologue, Rules, Actions, Union Decl, Action Decl):
10391 (Destructor Decl, Parser Function, Pure Calling):
10392 Describe rules for braces inside C code more carefully.
10393
10394 2006-01-19 Paul Eggert <eggert@cs.ucla.edu>
10395
10396 Fix some porting glitches found by Nelson H. F. Beebe.
10397 * lib/abitset.c (abitset_resize): Rewrite to avoid warnings from
10398 compilers that don't understand that abort () does not return.
10399 * src/state.c (transitions_to): Likewise.
10400 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check
10401 that '#include <cstdlib>' works.
10402 * src/system.h (INT8_MIN, INT16_MIN, INT32_MIN, INT8_MAX):
10403 (INT16_MAX, UINT8_MAX, INT32_MAX, UINT16_MAX, UINT32_MAX):
10404 #undef if ! defined __STDC_VERSION__ || __STDC_VERSION__ < 199901,
10405 for the benefit of some pre-C99 compilers.
10406
10407 * bootstrap: Undo changes to gnulib files that autoreconf made.
10408
10409 Minor fixups to get 'make maintainer-check' to work.
10410 * configure.ac: Don't use -Wnested-externs, as it's incompatible
10411 with the new verify.h implementation.
10412 * data/c.m4 (b4_yy_symbol_print_generate): YYUSE (yyoutput).
10413 * data/glr.c (YYUSE): Depend on __GNUC__ as well.
10414 * data/yacc.c (YYUSE): Likewise.
10415 * data/lalr1.cc (yysyntax_error_): YYUSE (yystate).
10416 * lib/subpipe.c (end_of_output_subpipe): The args are unused.
10417 * src/parse-gram.y (declaration): Don't pass a string constant
10418 to a function that expects char *, since GCC might complain
10419 about the constant value.
10420 * src/reader.c (symbol_typed_p): Add parens to pacify GCC.
10421 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): #undef yylloc and yylval
10422 before #defining them.
10423 * tests/glr-regression.at
10424 (Incorrectly initialized location for empty right-hand side in GLR):
10425 In yyerror, use the msg arg.
10426 (Corrupted semantic options if user action cuts parse):
10427 (Incorrect lookahead during deterministic GLR):
10428 (Incorrect lookahead during nondeterministic GLR):
10429 Don't name a local var 'index'; it shadows string.h's 'index'.
10430
10431 2006-01-19 Akim Demaille <akim@epita.fr>
10432
10433 * tests/calc.at (_AT_DATA_CALC_Y): Initialize the whole initial
10434 location, not just parts of it.
10435
10436 2006-01-18 Paul Eggert <eggert@cs.ucla.edu>
10437
10438 * NEWS: Document the fact that multiple %unions are now allowed.
10439 * doc/bison.texinfo (Union Decl): Likewise.
10440 * TODO: This feature is now implemented, so remove it from
10441 the wishlist.
10442
10443 * Makefile.maint: Merge with coreutils Makefile.maint.
10444 (CVS_LIST): Use build-aux version if available.
10445 (VERSION_REGEXP): New macro.
10446 (syntax-check-rules): Add sc_no_if_have_config_h,
10447 sc_prohibit_assert_without_use, sc_require_config_h,
10448 sc_useless_cpp_parens.
10449 (sc_obsolete_symbols): Check for O_NDELAY.
10450 (sc_dd_max_sym_length): Track coreutils.
10451 (sc_unmarked_diagnostics): Look in all files, not just *.c.
10452 (sc_useless_cpp_parens): New rule.
10453 (news-date-check): Look for version or today's date.
10454 (changelog-check): Don't require version number near head.
10455 (copyright-check): Use current year instead of hardwiring 2005.
10456 (my-distcheck): Depend on $(release_archive_dir)/$(prev-tgz).
10457 (announcement): Add --gpg-key-ID.
10458
10459 * djgpp/config.sed: Add copyright notice, and replace "filesystem"
10460 with "file system".
10461
10462 Avoid undefined behavior that addressed just before the start of an
10463 array. Problem reported by twlevo.
10464 * src/reader.c (packgram): Prepend a new sentinel before ritem.
10465 * src/lalr.c (build_relations): Rely on new sentinel.
10466 * src/gram.c (gram_free): Adjust to new sentinel.
10467
10468 2006-01-12 Joel E. Denny <jdenny@ces.clemson.edu>
10469
10470 * data/glr.c (yyGLRStateSet): Rename yylookaheadStatuses to
10471 yylookaheadNeeds. All uses updated.
10472 (yysplitStack): Rename local yynewLookaheadStatuses to
10473 yynewLookaheadNeeds.
10474 * data/glr-regression.at (Incorrect lookahead during nondeterministic
10475 GLR): In comments, change `lookahead status' to `lookahead need'.
10476
10477 2006-01-11 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
10478
10479 * data/glr.c (yysplitStack): A little stylistic rewrite.
10480
10481 2006-01-11 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
10482
10483 * data/glr.c (yyaddDeferredAction): Flesh out the comment.
10484
10485 2006-01-11 Joel E. Denny <jdenny@ces.clemson.edu>
10486
10487 * doc/bison.texinfo: Fix some typos.
10488 (GLR Semantic Actions): New subsection discussing special
10489 considerations because GLR semantic actions might be deferred.
10490 (Actions): Mention look-ahead usage of yylval.
10491 (Actions and Locations): Mention look-ahead usage of yylloc.
10492 (Special Features for Use in Actions): Add YYEOF entry and mention it
10493 in the yychar entry.
10494 In the yychar entry, remove mention of the local yychar case (pure
10495 parser) since this is irrelevant information when writing semantic
10496 actions and since it's already discussed in `Table of Symbols' where
10497 yychar is otherwise described as an external variable.
10498 In the yychar entry, don't call it the `current' look-ahead since it
10499 isn't when semantic actions are deferred.
10500 In the yychar and yyclearin entries, add note about deferred semantic
10501 actions.
10502 Add yylloc and yylval entries discussing look-ahead usage.
10503 (Look-Ahead Tokens): When discussing yychar, don't call it the
10504 `current' look-ahead, and do mention yylval and yylloc.
10505 (Error Recovery): Cross-reference `Action Features' when mentioning
10506 yyclearin.
10507 (Table of Symbols): In the yychar entry, don't call it the `current'
10508 look-ahead.
10509 In the yylloc and yylval entries, mention look-ahead usage.
10510
10511 2006-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
10512
10513 * tests/glr-regression.at: Update copyright year to 2006.
10514
10515 2006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
10516
10517 * data/glr.c (yyGLRStateSet): Add yybool* yylookaheadStatuses member to
10518 use during nondeterministic operation to track which stacks have
10519 actually needed the current lookahead.
10520 (yyinitStateSet, yyfreeStateSet, yyremoveDeletes, yysplitStack):
10521 Allocate, deallocate, resize, and otherwise shuffle space for
10522 yylookaheadStatuses in parallel with yystates member of yyGLRStateSet.
10523 (yysplitStack, yyprocessOneStack, yyparse): Set lookahead status
10524 appropriately during nondeterministic operation.
10525 (yySemanticOption): Add int yyrawchar, YYSTYPE yyval, and YYLTYPE yyloc
10526 members to store the current lookahead to be used by the deferred
10527 user action.
10528 (yyaddDeferredAction): Add size_t yyk parameter specifying the stack
10529 from which the RHS is taken. Set the lookahead members of the new
10530 yySemanticOption according to the lookahead status for stack yyk.
10531 (yyglrShiftDefer, yyglrReduce): Pass yyk parameter on to
10532 yyaddDeferredAction.
10533 (yyresolveAction): Set yychar, yylval, and yylloc to the lookahead
10534 members of yySemanticOption before invoking yyuserAction, and then set
10535 them back to their current values afterward.
10536 (yyparse): Set yychar = YYEMPTY where yytoken = YYEMPTY.
10537 (yyreportAmbiguity): Add /*ARGSUSED*/ to pacify lint.
10538 * tests/glr-regression.at: Remove `.' from the ends of recent test case
10539 titles for consistency.
10540 (Leaked merged semantic value if user action cuts parse): In order to
10541 suppress lint warnings, use arguments in merge function, and assign
10542 char value < 128 in main.
10543 (Incorrect lookahead during deterministic GLR): New test case.
10544 (Incorrect lookahead during nondeterministic GLR): New test case.
10545
10546 2006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
10547
10548 * data/c.m4 (b4_yy_symbol_print_generate): In yy_symbol_print, accept
10549 !yyvaluep as signal that no semantic value is available to print.
10550 * data/glr.c (yydestroyGLRState): If state is not resolved, don't try
10551 to print a semantic value.
10552
10553 2006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
10554
10555 * tests/glr-regression.at: For consistency with my newer test cases,
10556 don't thank myself.
10557
10558 2006-01-05 Joel E. Denny <jdenny@ces.clemson.edu>
10559
10560 * data/glr.c (yyresolveValue): When merging semantic options, if at
10561 least one user action succeeds but a later one cuts the parse, then
10562 destroy the semantic value before returning rather than leaking it.
10563 (yyresolveStates): If a user action cuts the parse and thus
10564 yyresolveValue fails, ignore the (unset) semantic value rather than
10565 corrupting the yyGLRState, and empty the semantic options list since
10566 the user actions should have called all necessary destructors.
10567 Simplify code with YYCHK.
10568 * tests/glr-regression.at (Corrupted semantic options if user action
10569 cuts parse): New test case.
10570 (Undesirable destructors if user action cuts parse): New test case.
10571 Before applying any of this patch, this test case never actually failed
10572 for me... but only because the corrupted semantic options usually
10573 masked this bug.
10574 (Leaked merged semantic value if user action cuts parse): New test
10575 case.
10576
10577 2006-01-05 Akim Demaille <akim@epita.fr>
10578
10579 * src/reader.c, src/symlist.h, src/symlist.c: s/mid_rule/midrule/.
10580
10581 2006-01-04 Paul Eggert <eggert@cs.ucla.edu>
10582
10583 * data/c.m4 (b4_c_modern): New macro, with a new provision for
10584 _MSC_VER. Problem reported by Cenzato Marco.
10585 (b4_c_function_def): Use it.
10586 * data/yacc.c (YYMODERN_C): Remove. All uses replaced by
10587 b4_c_modern.
10588 (yystrlen, yystpcpy, yyparse): Use b4_c_function... macros rather
10589 than rolling our own.
10590
10591 2006-01-04 Akim Demaille <akim@epita.fr>
10592
10593 Also warn about non-used mid-rule values.
10594 * src/symlist.h, src/symlist.c (symbol_list): Add a mid_rule
10595 member.
10596 (symbol_list_new): Adjust.
10597 * src/reader.c (symbol_typed_p): New.
10598 (grammar_rule_check): Use it.
10599 (grammar_midrule_action): Bind a mid-rule LHS to its rule.
10600 Check its rule.
10601 * tests/input.at (AT_CHECK_UNUSED_VALUES): New.
10602 Use it.
10603 * tests/actions.at (Exotic Dollars): Adjust.
10604
10605 2006-01-04 Akim Demaille <akim@epita.fr>
10606
10607 * src/reader.c (grammar_midrule_action): If $$ is set in a
10608 mid-rule, move the `used' bit to its lhs.
10609 * tests/input.at (Unused values): New.
10610 * tests/actions.at (Exotic Dollars): Adjust: exp is not typed.
10611
10612 2006-01-03 Paul Eggert <eggert@cs.ucla.edu>
10613
10614 * doc/bison.texinfo (Bison Options): Say more accurately what
10615 --yacc does.
10616 * src/parse-gram.y (rules_or_grammar_declaration): Don't complain
10617 about declarations in the grammar when in Yacc mode, as POSIX does
10618 not require a diagnostic when the grammar uses extensions.
10619
10620 * src/reduce.c (reduce_grammar): Remove unnecessary cast to bool.
10621
10622 Warn about dubious constructions like "%token T T".
10623 Reported by twlevo.
10624 * src/symtab.h (struct symbol.declared): New member.
10625 * src/symtab.c (symbol_new): Initialize it to false.
10626 (symbol_class_set): New arg DECLARING, specifying whether
10627 this is a declaration that we want to warn about, if there
10628 is more than one of them. All uses changed.
10629
10630 * data/glr.c, data/glr.cc, data/lalr1.cc, data/yacc.c:
10631 Allow multiple %union directives, whose contents concatenate.
10632 * src/parse-gram.y (grammar_declaration): Likewise.
10633 Use muscle_code_grow, so that we don't need stype_line any more.
10634 All uses changed.
10635
10636 * src/muscle_tab.c (muscle_grow): Fix comment.
10637
10638 * ChangeLog, data/c.m4, data/glr.c, data/glr.cc, data/location.cc:
10639 * data/yacc.c, src/getargs.c, src/output.c, tests/cxx-type.at:
10640 Update copyright year to 2006.
10641
10642 2006-01-03 Akim Demaille <akim@epita.fr>
10643
10644 Have glr.cc pass (some of) the calc.at tests.
10645 * data/glr.cc (b4_parse_param_orig): New.
10646 (b4_parse_param): Improve its definition, and bound it more
10647 clearly in the skeleton.
10648 (b4_epilogue): Append, instead of prepending, in order to keep
10649 #line consistency.
10650 Simplify the generation of auxiliary functions: locations and
10651 purity are mandated.
10652 (b4_global_tokens_and_yystype): Honor it.
10653 * data/location.cc (c++.m4): Don't include it.
10654 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Define AT_GLR_CC_IF
10655 and AT_SKEL_CC_IF.
10656 * tests/calc.at (AT_CHECK_CALC): Rely on AT_SKEL_CC_IF instead of
10657 AT_LALR1_CC_IF.
10658 Be sure to initialize the first position's filename.
10659 (AT_CHECK_CALC_LALR1_CC): Add %location and %defines, they are
10660 mandated anyway.
10661 (AT_CHECK_CALC_GLR_CC): New.
10662 Use it to exercise glr.cc as a lalr1.cc drop-in replacement.
10663
10664 2006-01-02 Akim Demaille <akim@epita.fr>
10665
10666 * src/output.c (output_skeleton): Don't hard wire the inclusion of
10667 c.m4.
10668 * data/c++.m4, data/glr.c, data/yacc.c: Include c.m4.
10669 * data/glr.cc: Do not include stack.hh.
10670
10671 2006-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
10672
10673 * data/glr.c: Reformat whitespace with tabs.
10674 (b4_lpure_formals): Remove this unused m4 macro.
10675 * tests/cxx-type.at: Reformat whitespace with tabs.
10676 (_AT_TEST_GLR_CXXTYPES): In union Node, rename node_info to nodeInfo
10677 since it's a member. Rename type to isNterm for clarity.
10678
10679 2005-12-29 Akim <akim@sulaco.local>
10680
10681 Let glr.cc catch up with symbol_value_print.
10682 * data/glr.cc (b4_yysymprint_generate): Replace by...
10683 (b4_yy_symbol_print_generate): this.
10684 (yy_symbol_print, yy_symbol_value_print): Declare them.
10685
10686 2005-12-28 Paul Eggert <eggert@cs.ucla.edu>
10687
10688 * src/location.h (boundary): Note that a line or column equal
10689 to INT_MAX indicates an overflow.
10690 * src/scan-gram.l: Include verify.h. Don't include get-errno.h.
10691 (rule_length_overflow, increment_rule_length, add_column_width):
10692 New functions.
10693 (<INITIAL>{id}, <SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'"):
10694 (<SC_BRACED_CODE>"}"):
10695 Use increment_rule_length rather than incrementing it by hand.
10696 (adjust_location, handle_syncline): Diagnose overflow.
10697 (handle_action_dollar, handle_action_at):
10698 Fix bug with monstrosities like $-2147483648.
10699 Remove now-unnecessary checks.
10700 (scan_integer): Verify assumptions and remove now-unnecessary checks.
10701 (convert_ucn_to_byte): Verify assumptions.
10702 (handle_syncline): New arg LOC. All callers changed.
10703 Don't store through a value derived from char const * pointer.
10704
10705 * src/reader.c (grammar_rule_check): Rewrite slightly to avoid
10706 GCC warnings.
10707
10708 2005-12-27 Paul Eggert <eggert@cs.ucla.edu>
10709
10710 * src/reader.c (grammar_midrule_action, grammar_symbol_append):
10711 Remove unnecessary forward static decls.
10712
10713 2005-12-27 Akim Demaille <akim@epita.fr>
10714
10715 * src/reader.c (grammar_current_rule_check): Also check that $$
10716 is used.
10717 Take the rule to check as argument, hence rename as...
10718 (grammar_rule_check): this.
10719 * src/reader.h, src/reader.c (grammar_rule_begin, grammar_rule_end):
10720 Rename as...
10721 (grammar_rule_begin, grammar_rule_end): these, for consistency.
10722 (grammar_midrule_action, grammar_symbol_append): Now static.
10723 * tests/torture.at (input): Don't rely on the default action
10724 being always performed.
10725 * tests/calc.at: "Set" $$ even when the action is "cut" with
10726 YYERROR or other.
10727 * tests/actions.at (Exotic Dollars): Instead of using unused
10728 values, check that the warning is issued.
10729
10730 2005-12-22 Paul Eggert <eggert@cs.ucla.edu>
10731
10732 * NEWS: Improve wording for unused-value warnings.
10733
10734 2005-12-22 Akim Demaille <akim@epita.fr>
10735
10736 * data/lalr1.cc, data/yacc.c, data/glr.c, data/c.m4
10737 (b4_yysymprint_generate): Rename as...
10738 (b4_yy_symbol_print_generate): this.
10739 Generate yy_symbol_print instead of yysymprint.
10740 Generate also yy_symbol_value_print, and use it.
10741
10742 2005-12-22 Akim Demaille <akim@epita.fr>
10743
10744 * NEWS: Warn about unused values.
10745 * src/symlist.h, src/symlist.c (symbol_list, symbol_list_new): Add
10746 a `used' member.
10747 (symbol_list_n_get, symbol_list_n_used_set): New.
10748 (symbol_list_n_type_name_get): Use symbol_list_n_get.
10749 * src/scan-gram.l (handle_action_dollar): Flag used symbols.
10750 * src/reader.c (grammar_current_rule_check): Check that values are
10751 used.
10752 * src/symtab.c (symbol_print): Accept 0.
10753 * tests/existing.at: Remove the type information.
10754 Empty the actions.
10755 Remove useless actions (beware of mid-rule actions: perl -000
10756 -pi -e 's/\s*\{\}(?=[\n\s]*[|;])//g').
10757 * tests/actions.at (Exotic Dollars): Use unused values.
10758 * tests/calc.at: Likewise.
10759 * tests/glr-regression.at (No users destructors if stack 0 deleted):
10760 Likewise.
10761
10762 * src/gram.c (rule_useful_p, rule_never_reduced_p): Use
10763 rule_useful_p.
10764
10765 2005-12-21 Paul Eggert <eggert@cs.ucla.edu>
10766
10767 Undo 2005-12-01 tentative license wording change. The wording is
10768 still being reviewed by the lawyers, and we don't want to wait for
10769 them before publishing a test release. For now, revert to the
10770 previous wording.
10771 * NEWS: Undo 2005-12-01 change.
10772 * data/glr.c: Revert to previous license wording.
10773 * data/glr.cc: Likewise.
10774 * data/lalr1.cc: Likewise.
10775 * data/location.cc: Likewise.
10776 * data/yacc.c: Likewise.
10777
10778 * NEWS: Reword %destructor vs YYABORT etc.
10779 * data/glr.c: Use American spacing, for consistency.
10780 * data/glr.cc: Likewise.
10781 * data/lalr1.cc: Likewise.
10782 * data/yacc.c: Likewise.
10783 * data/yacc.c: Reformat comments slightly.
10784 * doc/bison.texinfo: Replace "non-" with "non" when that makes sense,
10785 for consistency. Fix some spelling errors and reword recently-included
10786 text slightly.
10787 * tests/cxx-type.at: Cast results of malloc, for C++.
10788
10789 2005-12-21 Joel E. Denny <address@hidden>
10790
10791 * tests/cxx-type.at: Construct a tree, count the parents of shared
10792 nodes, and free each node once and only once. Previously, the memory
10793 for semantic values was leaked instead.
10794
10795 2005-12-21 Joel E. Denny <address@hidden>
10796
10797 * data/glr.c (struct yyGLRStack): If pure, add yyval and yyloc members.
10798 (yylval, yylloc): If pure, #define to yystackp->yyval and
10799 yystackp->yyloc similar to yychar and yynerrs.
10800 (yyparse): If pure, remove local yylval and yylloc. Add local
10801 yystackp to accommodate pure definitions of yylval and yylloc.
10802 (b4_lex_param, b4_lyyerror_args, b4_lpure_args): If pure, change
10803 yylvalp and yyllocp to &yylval and &yylloc.
10804 (nerrs, char, lval, lloc): If pure, add #define's for b4_prefix[]
10805 namespace. Previously, nerrs and char were missing, but lval and lloc
10806 weren't necessary.
10807 (yyprocessOneStack, yyreportSyntaxError, yyrecoverSyntaxError): Remove
10808 yylvalp and yyllocp parameters since, if pure, these are now always
10809 accessible through yystackp. If not pure, they are still accessible
10810 globally.
10811 * data/glr.c, data/yacc.c (YYLLOC_DEFAULT): Change `if (N)' to
10812 `if (YYID (N))' to pacify lint.
10813
10814 2005-12-21 Akim Demaille <akim@epita.fr>
10815
10816 YYACCEPT, YYERROR, and YYABORT, as user actions, should not
10817 destroy the RHS symbols of a rule.
10818 * data/yacc.c (yylen): Initialize to 0.
10819 Keep its value to the number of items to possibly shift.
10820 In particular, a regular successful parse that ends on YYFINAL by
10821 a (internal) YYACCEPT must not have yylen != 0.
10822 (yyerrorlab, yyreturn): Pop the RHS.
10823 Reorder a bit to emphasize the `shifting' bits of code.
10824 (YYPOPSTACK): Now accept a number of items to pop.
10825 * data/lalr1.cc: Likewise.
10826 * data/glr.c: Formatting changes.
10827 Use goto instead of fall through.
10828 * doc/bison.texinfo (Destructor Decl): Complete.
10829
10830 2005-12-20 Juan Manuel Guerrero <juan.guerrero@gmx.de>
10831
10832 * Makefile.am: DJGPP specific files added to EXTRA_DIST.
10833 * djgpp/Makefile.maint: Fix PACKAGE variable computation.
10834 * djgpp/config.bat: Replace every occurence of the file name
10835 scan-gram-c.c with c-scan-gram.c. The same for scan-skel-c.c with
10836 c-scan-skel.c to conform with the 8.3 file name restriction on MSDOS.
10837 * djgpp/config.sed: Replace every occurence of the file name
10838 scan-gram-c.c with c-scan-gram.c. The same for scan-skel-c.c with
10839 c-scan-skel.c to conform with the 8.3 file name restriction on MSDOS.
10840 * djgpp/djunpack.bat: DJGPP specific file.
10841 * djgpp/fnchange.lst: DJGPP specific file.
10842 * djgpp/README.in: Add new information about how to unpack the bison
10843 source on MSDOS and other systems which have 8.3 file name restrictions
10844 using djunpack.bat and fnchange.lst.
10845
10846 2005-12-12 Paul Eggert <eggert@cs.ucla.edu>
10847
10848 * bootstrap (build_cvs_prefix): Remove; unused.
10849 (CVS_PREFIX): Adjust to yesterday's Savannah reorganization
10850 when getting gnulib.
10851
10852 2005-12-12 "Joel E. Denny" <jdenny@ces.clemson.edu>
10853
10854 * data/glr.c: Reorder typedef declarations for structs to match order
10855 of struct declarations.
10856 Rename yystack everywhere to yystackp except in yyparse where it's not
10857 a pointer.
10858 (yyglrShift): Change parameter YYSTYPE yysval to YYSTYPE* yyvalp for
10859 consistency.
10860 (yyis_table_ninf): Change 0 to YYID (0) to pacify lint.
10861 (yyreportSyntaxError): Add /*ARGSUSED*/ to pacify lint.
10862 (yyparse): Change while (yytrue) to while ( YYID (yytrue)) to pacify
10863 lint.
10864
10865 2005-12-09 Paul Eggert <eggert@cs.ucla.edu>
10866
10867 * tests/sets.at (Accept): Fix typos in regular expression used to
10868 sed out the final state number.
10869
10870 Work around portability problem on Solaris 10: flex-generated
10871 files include <stdio.h> before <config.h>, which messes up
10872 because the latter defines __EXTENSIONS__. Address the problem
10873 by creating two new little files that include <config.h> first,
10874 then include the flex-generated files. Rewrite everyone else
10875 to include <config.h> first, as well.
10876 * lib/timevar.c: Always include "config.h".
10877 * src/Makefile.am (bison_SOURCES): Replace scan-gram.l with
10878 scan-gram-c.c, and scan-skel.l with scan-skel-c.c.
10879 (EXTRA_bison_SOURCES): New macro.
10880 * src/scan-gram-c.c, src/scan-skel-c.c: New files.
10881 * src/system.h: Don't include config.h.
10882 * src/LR0.c: Include <config.h> first.
10883 * src/assoc.c: Likewise.
10884 * src/closure.c: Likewise.
10885 * src/complain.c: Likewise.
10886 * src/conflicts.c: Likewise.
10887 * src/derives.c: Likewise.
10888 * src/files.c: Likewise.
10889 * src/getargs.c: Likewise.
10890 * src/gram.c: Likewise.
10891 * src/lalr.c: Likewise.
10892 * src/location.c: Likewise.
10893 * src/main.c: Likewise.
10894 * src/muscle_tab.c: Likewise.
10895 * src/nullable.c: Likewise.
10896 * src/output.c: Likewise.
10897 * src/parse-gram.y: Likewise.
10898 * src/print.c: Likewise.
10899 * src/print_graph.c: Likewise.
10900 * src/reader.c: Likewise.
10901 * src/reduce.c: Likewise.
10902 * src/relation.c: Likewise.
10903 * src/state.c: Likewise.
10904 * src/symlist.c: Likewise.
10905 * src/symtab.c: Likewise.
10906 * src/tables.c: Likewise.
10907 * src/uniqstr.c: Likewise.
10908 * src/vcg.c: Likewise.
10909
10910 * src/parse-gram.y: Fix minor problems uncovered by lint.
10911 (current_lhs, current_lhs_location): Now static.
10912 (current_assoc): Remove unused variable.
10913
10914 Cleanups so that Bison-generated parsers have less lint.
10915 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate):
10916 Prepend /*ARGSUSED*/, for lint's sake.
10917 * data/glr.c (YYUSE): Properly parenthesize, and use an alternate
10918 definition if 'lint' is defined.
10919 (YYID): New macro (or function, if lint).
10920 All uses of /*CONSTCOND*/0 replaced by YYID(0).
10921 * data/yacc.c: Likewise.
10922 * data/glr.c (yyuserAction, yyuserMerge, yy_reduce_print):
10923 (yyrecoverSyntaxError): Prepend /*ARGSUSED*/.
10924 * data/glr.cc (YYLLOC_DEFAULT): Omit /*CONSTCOND*/ since this code
10925 is C++ only.
10926 * data/lalr1.cc (YYUSE): Just use a cast, since this code is C++ only.
10927 * data/yacc.c (YYSTACK_FREE) [defined YYSTACK_ALLOC]:
10928 Use YYID(0) rather than 0, for lint.
10929 (yystrlen): Rewrite to avoid lint warning about ptrdiff_t overflow.
10930 (yysyntax_error): Rewrite to avoid lint warnings about parenthesization.
10931
10932 2005-12-07 Paul Eggert <eggert@cs.ucla.edu>
10933
10934 * tests/glr-regression.at
10935 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
10936 Close memory leak reported by twlevo.
10937
10938 2005-12-06 "Joel E. Denny" <jdenny@ces.clemson.edu>
10939
10940 * data/glr.c (yyprocessOneStack, yyparse): Synchronize the shift for
10941 all stacks.
10942 (yyparse): Iterate another stack in order to call user destructors.
10943 * tests/glr-regression.at (No users destructors if stack 0 deleted):
10944 New test case.
10945 (Duplicated user destructor for lookahead): This test now is expected
10946 to succeed.
10947
10948 2005-12-01 Paul Eggert <eggert@cs.ucla.edu>
10949
10950 * NEWS: Document the following change.
10951 * data/yacc.c: Say "parser skeleton" rather than "file", since
10952 it's no longer just a file.
10953 * data/glr.c: Grant a special exception for C GLR parsers, that
10954 reads like the already-existing exception for C LALR(1) parsers.
10955 * data/glr.cc: Likewise.
10956 * data/lalr1.cc: Likewise.
10957 * data/location.cc: Likewise.
10958 * data/yacc.c: Reword the "written by" statement to clarify that
10959 it was the parser skeleton, not the entire output file.
10960 * data/glr.c: Written by Paul Hilfinger.
10961 * data/glr.cc: Written by Akim Demaille.
10962 * data/lalr1.cc: Likewise.
10963
10964 2005-11-18 Paul Eggert <eggert@cs.ucla.edu>
10965
10966 * data/yacc.c (yy_reduce_print, YY_REDUCE_PRINT):
10967 Fix typos in previous change that broke 'make check'.
10968 YY_REDUCE_PRINT cannot be a pseudo-varargs macro; that isn't
10969 supported in C.
10970 * tests/calc.at (_AT_CHECK_CALC,_AT_CHECK_CALC_ERROR):
10971 Don't check NUM-STDERR-LINES, since the output format is fluctuating.
10972 We can revert this once things settle down.
10973
10974 * src/conflicts.c (conflicts_print): Don't print file name twice
10975 when %expect fails because there were no conflicts.
10976 * doc/bison.texinfo (Expect Decl): Tighten up wording in previous
10977 change.
10978 * tests/conflicts.at (%expect not enough, %expect too much):
10979 (%expect with reduce conflicts): Adjust to new behavior.
10980
10981 2005-11-18 Akim Demaille <akim@epita.fr>
10982
10983 * src/conflicts.c (conflicts_print): Unsatisfied %expectation are
10984 errors.
10985 * NEWS: Document this.
10986 * doc/bison.texinfo (Expect Decl): Likewise.
10987
10988 2005-11-16 Akim Demaille <akim@epita.fr>
10989
10990 Generalize the display of semantic values and locations in traces.
10991 * data/glr.c (yy_reduce_print): Fix indices (again).
10992 * data/c++.m4 (b4_rhs_value, b4_rhs_location): Don't expect
10993 literal integers.
10994 * data/lalr1.cc (yyreduce_print): Rename as...
10995 (yy_reduce_print): this.
10996 Display values and locations.
10997 * data/yacc.c (yy_reduce_print): Likewise.
10998 (YY_REDUCE_PRINT): Adjust to pass the required arguments.
10999 (yysymprint): Move higher to be visible from yy_reduce_print).
11000 (yyparse): Adjust.
11001 * tests/calc.at: Adjust the expected length of the traces.
11002
11003 2005-11-14 Akim Demaille <akim@epita.fr>
11004
11005 * data/glr.c (yy_reduce_print): The loop was quite wrong: type are
11006 from 1 to N, while values and location start at 0.
11007 (b4_rhs_location, b4_rhs_value): Add parens around $1 and $2.
11008
11009 2005-11-14 Akim Demaille <akim@epita.fr>
11010
11011 * data/glr.c (yy_reduce_print): Fix the $ number.
11012
11013 2005-11-14 Akim Demaille <akim@epita.fr>
11014
11015 "Use" parse parameters.
11016 * data/c.m4 (b4_parse_param_for, b4_parse_param_use): New.
11017 * data/glr.c, data/glr.cc: Use them.
11018 * data/glr.c (YYUSE): Have a C++ definition that supports
11019 non-pointer types.
11020
11021 2005-11-14 Akim Demaille <akim@epita.fr>
11022
11023 * data/glr.c (yyexpandGLRStack): Declare only if defined.
11024
11025 2005-11-14 Akim Demaille <akim@epita.fr>
11026
11027 * data/glr.cc: New.
11028 * data/m4sugar/m4sugar.m4 (m4_prepend): New.
11029
11030 2005-11-12 Akim Demaille <akim@epita.fr>
11031
11032 Let position and location be PODs.
11033 * data/location.cc (position::initialize, location::initialize): New.
11034 (position::position, location::location): Define only if
11035 b4_location_constructors is defined.
11036 * data/lalr1.cc (b4_location_constructors): Define it for backward
11037 compatibility.
11038 * doc/bison.texinfo (Initial Action Decl): Use initialize.
11039
11040 2005-11-12 Akim Demaille <akim@epita.fr>
11041
11042 * data/lalr1.cc: Move the body of the ctor and dtor into the
11043 parser file (instead of the header).
11044 Wrap the implementations in a "namespace yy".
11045
11046 2005-11-12 Akim Demaille <akim@epita.fr>
11047
11048 Have glr.c include its header file when created.
11049 * data/glr.c (b4_shared_declarations): New.
11050 Output them verbatim in the parser if !%defines, otherwise
11051 output then in the header file, and include it instead.
11052
11053 2005-11-11 Akim Demaille <akim@epita.fr>
11054
11055 * data/glr.c: Comment changes.
11056
11057 2005-11-11 Akim Demaille <akim@epita.fr>
11058
11059 When yydebug, report semantic and location values for reductions.
11060 * data/glr.c (yy_reduce_print): Report the semantic values and the
11061 locations.
11062 (YY_REDUCE_PRINT): Adjust.
11063 (yyglrReduce): Use them.
11064 (b4_rhs_value, b4_rhs_location): Remove m4_eval invocations.
11065 * data/c.m4 (b4_yysymprint_generate): Specify the const arguments.
11066 * tests/calc.at (_AT_CHECK_CALC_ERROR): Remove the reduction
11067 traces.
11068
11069 2005-11-10 Akim Demaille <akim@epita.fr>
11070
11071 * data/glr.c (yynewGLRStackItem, YY_RESERVE_GLRSTACK): New.
11072 (yyaddDeferredAction, yyglrShift, yyglrShiftDefer): Use them.
11073 (yyexpandGLRStack, YYRELOC): Define only when YYSTACKEXPANDABLE.
11074
11075 2005-11-09 Albert Chin-A-Young <china@thewrittenword.com>
11076
11077 * m4/cxx.m4, examples/Makefile.am: Don't build
11078 examples/calc++ if no C++ compiler is available. (trivial change)
11079
11080 2005-11-09 Akim Demaille <akim@epita.fr>
11081
11082 * src/scan-skel.l: Use a couple of asserts.
11083
11084 2005-11-03 Akim Demaille <akim@epita.fr>
11085
11086 In some (weird) cases, the final state number is incorrect.
11087 Reported by Alexandre Duret-Lutz.
11088 * src/LR0.c (state_list_append): Remove the computation of
11089 final_state.
11090 (save_reductions): Do it here.
11091 (get_state): Alpha conversion.
11092 (generate_states): Use a for loop.
11093 * src/gram.h (item_number_is_rule_number)
11094 (item_number_is_symbol_number): New.
11095 * src/state.c: Use assert.
11096 * src/system.h: Include assert.h.
11097 * tests/sets.at (Accept): New.
11098
11099 2005-10-30 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
11100
11101 * data/glr.c (yyfill): Adjust comment.
11102 (yyresolveAction): Initialize default location properly
11103 for empty right-hand sides.
11104 (yydoAction): Ditto.
11105 Add comment explaining apparently dead code.
11106 * tests/glr-regression.at
11107 (Incorrectly initialized location for empty right-hand side in GLR):
11108 New test.
11109
11110 2005-10-30 Paul Eggert <eggert@cs.ucla.edu>
11111
11112 * bootstrap (cleanup_gnulib): New function. Use it to clean up
11113 gnulib when interrupted. This fixes some race conditions and
11114 works around some portability problems (one noted by Paul
11115 Hilfinger).
11116
11117 2005-10-22 Akim <akim@epita.fr>
11118
11119 * Makefile.cfg: Adjust to config -> build-aux.
11120 Reported by twledo.
11121
11122 2005-10-21 Akim Demaille <akim@epita.fr>
11123
11124 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate): Pass
11125 the %parse-params.
11126 * data/glr.c (YY_SYMBOL_PRINT, yydestroyGLRState): Adjust.
11127 * data/yacc.c (b4_Pure_if): Rename as...
11128 (b4_yacc_pure_if): this.
11129 (YY_SYMBOL_PRINT, yyparse): Adjust.
11130 * doc/bison.texinfo: Formatting changes.
11131
11132 2005-10-21 Akim Demaille <akim@epita.fr>
11133
11134 Finish the transition config -> build-aux.
11135 * configure.ac, Makefile.am: Use build-aux.
11136 * config/prev-version, config/announce-gen, config/Makefile.am:
11137 Move to...
11138 * build-aux/prev-version, build-aux/announce-gen,
11139 * build-aux/Makefile.am: here.
11140
11141 2005-10-14 Akim Demaille <akim@epita.fr>
11142
11143 * examples/calc++/test: Use set -x only when VERBOSE.
11144
11145 2005-10-13 Paul Eggert <eggert@cs.ucla.edu>
11146
11147 * NEWS: Bison now warns if it finds a stray `$' or `@' in an action.
11148 * src/scan-gram.l (<SC_BRACED_CODE>[$@]): Implement this.
11149
11150 2005-10-13 Akim Demaille <akim@epita.fr>
11151
11152 * src/scan-skel.l: Output the base name parts of the parser and
11153 header file names.
11154 * tests/output.at (AT_CHECK_OUTPUT): Support subdirectories, and
11155 additional checks.
11156 Use this to exercise C++ outputs in subdirs.
11157 Reported by Oleg Smolsky.
11158
11159 2005-10-12 Paul Eggert <eggert@cs.ucla.edu>
11160
11161 * data/c.m4 (b4_c_function_def): Look at __C99_FUNC__, not at
11162 __STDC_VERSION__, as IBM cc 7.0 doesn't define the latter either.
11163 Problem reported by John P. Hartmann.
11164 * data/yacc.c (YYMODERN_C): Likewise. Don't define if the user has
11165 already defined it.
11166
11167 2005-10-12 Akim Demaille <akim@epita.fr>
11168
11169 * src/parse-gram.y (version_check): Exit 63 to please missing
11170 (stands for "version mismatch).
11171 * tests/input.at, doc/bison.texinfo: Adjust.
11172
11173 2005-10-10 Paul Eggert <eggert@cs.ucla.edu>
11174
11175 Work around portability problems with Visual Age C compiler
11176 (xlc and xlC_r) reported by John P. Hartmann.
11177 * data/location.cc (initial_column, initial_line): Remove.
11178 All uses replaced by 0 and 1.
11179 * src/scan-gram.l (gram_wrap): Redefine to avoid bug in flex 2.5.31
11180 that xlc complains about.
11181 * src/scan-skel.l (skel_wrap): Likewise.
11182 * data/c.m4 (b4_c_function_def): Look at __STDC_VERSION__ as well
11183 as __STDC__.
11184 * data/yacc.c (YYMODERN_C): New macro, which also looks at
11185 __STDC_VERSION__. Use it everywhere instead of looking at
11186 __STDC__ and __cplusplus.
11187
11188 2005-10-10 Akim Demaille <akim@epita.fr>
11189
11190 * examples/calc++/test: Be quiet unless VERBOSE.
11191
11192 2005-10-05 Paul Eggert <eggert@cs.ucla.edu>
11193
11194 * data/c.m4 (yydestruct, yysymprint):
11195 Use YYUSE instead of casting to void.
11196 * data/glr.c (YYUSE): New macro.
11197 (yyuserMerge, yyreportAmbiguity, yyreportSyntaxError):
11198 Use it instead of rolling our own.
11199 (YYLLOC_DEFAULT, YYCHK, YYDPRINTF, YY_SYMBOL_PRINT, YY_REDUCE_PRINT):
11200 (YYCHK1):
11201 Use /*CONSTCOND*/ to suppress lint warnings.
11202 * data/lalr1.cc (YYLLOC_DEFAULT, YY_SYMBOL_PRINT, YY_REDUCE_PRINT):
11203 (YY_STACK_PRINT): Use 'false' not '0'.
11204 (YYUSE): New macro.
11205 (yysymprint_, yydestruct_): Use it instead of rolling our own.
11206 * data/yacc.c (YYUSE): New macro.
11207 (YYCOPY, YYSTACK_RELOCATE, YYBACKUP, YYLLOC_DEFAULT):
11208 (YYDPRINTF, YY_SYMBOL_PRINT, YY_STACK_PRINT, YY_REDUCE_PRINT):
11209 (yyerrorlab): Use /*CONSTCOND*/ to suppress lint warnings.
11210
11211
11212 * data/m4sugar/m4sugar.m4 (_m4_map): New macro.
11213 (m4_map, m4_map_sep): Use it. Handle the empty list correctly.
11214
11215 2005-10-04 Paul Eggert <eggert@cs.ucla.edu>
11216
11217 Undo the parts of the unlocked-I/O change that substituted
11218 putc or puts for printf. This might hurt performance a bit,
11219 but some people prefer the printf style.
11220 * data/c.m4 (yysymprint): Prefer printf to puts and putc.
11221 * data/glr.c (YYFPUTC, YYFPUTS, YYDPUTS): Remove.
11222 All uses replaced by YYFPRINTF and YYDPRINTF.
11223 * data/yacc.c: Likewise.
11224 * lib/bitset.c (bitset_print): Likewise.
11225 * lib/bitsetv.c (bitsetv_dump, debug-bitsetv): Prefer printf to
11226 putc and puts.
11227 * lib/lbitset.c (debug_lbitset): Likewise.
11228 * src/closure.c (print_firsts, print_fderives): Likewise.
11229 * src/gram.c (grammar_dump): Likewise.
11230 * src/lalr.c (look_ahead_tokens_print): Likewise.
11231 * src/output.c (escaped_output): Likewise.
11232 (user_actions_output): Break apart two printfs.
11233 * src/parse-gram.y (%printer): Prefer printf to putc and puts.
11234 * src/reduce.c (reduce_print): Likewise.
11235 * src/state.c (state_rule_look_ahead_tokens_print): Likewise.
11236 * src/system.h: Include unlocked-io.h rathe than stdio.h.
11237
11238 * data/glr.c (yyuserMerge, yyreportAmbiguity, yyreportSyntaxError):
11239 Use assignments rather than casts-to-void to suppress
11240 unused-variable warnings. This pacifies 'lint'.
11241 * data/lalr1.cc (yysymprint_, yydestruct_): Use a call to suppress
11242 unused-variable warnings.
11243
11244 2005-10-03 Juan Manuel Guerrero <juan.guerrero@gmx.de>
11245
11246 * Makefile.am: DJGPP specific files added to EXTRA_DIST.
11247
11248 2005-10-02 Paul Eggert <eggert@cs.ucla.edu>
11249
11250 Use unlocked I/O for a minor performance improvement on hosts like
11251 GNU/Linux and Solaris that support unlocked I/O. The basic idea
11252 is to use the gnlib unlocked-io module, and to prefer putc and
11253 puts to printf when either will work (since the latter doesn't
11254 come in an unlocked flavor).
11255 * bootstrap (gnulib_modules): Add unlocked-io.
11256 * data/c.m4 (yysymprint): Prefer puts and putc to printf.
11257 * data/glr.c (YYFPUTC, YYFPUTS, YYDPUTS): New macros.
11258 Prefer them to YYFPRINTF and YYDPRINTF if either will do,
11259 and similarly for puts and putc and printf.
11260 * data/yacc.c: Likewise.
11261 * lib/bitset.c (bitset_print): Likewise.
11262 * lib/bitset.h [USE_UNLOCKED_IO]: Include unlocked-io.h.
11263 * lib/bitsetv.c (bitsetv_dump, debug-bitsetv): Prefer putc and puts
11264 to printf.
11265 * lib/lbitset.c (debug_lbitset): Likewise.
11266 * src/closure.c (print_firsts, print_fderives): Likewise.
11267 * src/gram.c (grammar_dump): Likewise.
11268 * src/lalr.c (look_ahead_tokens_print): Likewise.
11269 * src/output.c (escaped_output): Likewise.
11270 (user_actions_output): Coalesce two printfs.
11271 * src/parse-gram.y (%printer): Prefer putc and puts to printf.
11272 * src/reduce.c (reduce_print): Likewise.
11273 * src/state.c (state_rule_look_ahead_tokens_print): Likewise.
11274 * src/system.h: Include unlocked-io.h rather than stdio.h.
11275
11276 * data/lalr1.cc: Don't put an unmatched ' in a dnl comment, as
11277 this confuses xgettext.
11278
11279 2005-10-02 Akim Demaille <akim@epita.fr>
11280
11281 * bootstrap (gnulib_modules): Add strverscmp.
11282 * lib/.cvsignore: Add strverscmp.c, strverscmp.h.
11283 * m4/.cvsignore: Add strverscmp.m4.
11284 * src/parse-gram.y (%require): New token, new rule.
11285 (version_check): New.
11286 * src/scan-gram.l (%require): Adjust.
11287 * tests/input.at (AT_REQUIRE): New.
11288 Use it.
11289 * doc/bison.texinfo (Require Decl): New.
11290 (Calc++ Parser): Use %require.
11291
11292 2005-10-02 Akim Demaille <akim@epita.fr>
11293
11294 * data/location.cc: New.
11295
11296 2005-10-02 Paul Eggert <eggert@cs.ucla.edu>,
11297 Akim Demaille <akim@epita.fr>
11298
11299 Make sure -odir/foo.cc creates dir/location.hh etc.
11300 * src/files.h (spec_outfile, parser_file_name, spec_name_prefix)
11301 (spec_file_prefix, spec_verbose_file, spec_graph_file)
11302 (spec_defines_file): Now const.
11303 (dir_prefix): New.
11304 (short_base_name): Remove.
11305 * src/files.c: Adjust.
11306 (dirname.h): Include.
11307 (base_name): Don't prototype it.
11308 (finput): Remove, duplicates gram_in.
11309 (full_base_name, short_base_name): Replace by...
11310 (all_but_ext, all_but_tab_ext): these.
11311 (compute_base_names): Rename as...
11312 (compute_file_name_parts): this.
11313 Update to compute the new variables, including dir_prefix.
11314 Adjust dependencies.
11315 * src/output.c (prepare): Output them.
11316 * src/reader.c: Adjust to use gram_in, not finput.
11317 * src/scan-skel.l (@dir_prefix@): New.
11318
11319 2005-10-02 Juan Manuel Guerrero <juan.guerrero@gmx.de>
11320
11321 * lib/subpipe.c: New function end_of_output_subpipe() added
11322 to allow support for non-posix systems. This is a no-op function
11323 for posix systems.
11324
11325 * lib/subpipe.h: New function end_of_output_subpipe() added
11326 to allow support for non-posix systems. This is a no-op function
11327 for posix systems.
11328
11329 * src/output.c (output_skeleton): Use end_of_output_subpipe() to
11330 handle the lack of pipe/fork functionality on non-posix systems.
11331
11332 * djgpp/Makefile.maint: DJGPP specific file.
11333
11334 * djgpp/README.in: DJGPP specific file.
11335
11336 * djgpp/config.bat: DJGPP specific configuration file.
11337
11338 * djgpp/config.sed: DJGPP specific configuration file.
11339
11340 * djgpp/config.site: DJGPP specific configuration file.
11341
11342 * djgpp/config_h.sed: DJGPP specific configuration file.
11343
11344 * djgpp/subpipe.c: DJGPP specific replacement file for lib/subpipe.c.
11345
11346 * djgpp/subpipe.h: DJGPP specific replacement file for lib/subpipe.h.
11347
11348 2005-10-02 Akim Demaille <akim@epita.fr>
11349
11350 * data/location.cc: New, extract from...
11351 * data/lalr1.cc: here.
11352 (location.hh): Include it after the user prologue, in case the
11353 filename type is defined by the user.
11354 Forward declation location and position before the pre-prologue.
11355 (yyresult_): Rename as...
11356 (yyresult): this, it's a local variable, not an attribute.
11357 * data/Makefile.am (dist_pkgdata_DATA): Adjust.
11358
11359 2005-10-01 Akim Demaille <akim@epita.fr>
11360
11361 * examples/extexi: Restore the #line generation.
11362
11363 2005-09-30 Akim Demaille <akim@epita.fr>,
11364 Alexandre Duret-Lutz <adl@gnu.org>
11365
11366 Move the token type and YYSTYPE in the parser class.
11367 * data/lalr1.cc (stack.hh, location.hh): Include earlier.
11368 (parser::token): New, from the moved free definition of tokens.
11369 (parser::semantic_value): Now a full definition instead of an
11370 indirection to YYSTYPE.
11371 (b4_post_prologue): No longer included in the header file, but
11372 in the implementation file.
11373 * doc/bison.texi (C+ Language Interface): Update.
11374 * src/parse-gram.y: Support unary %define.
11375 * tests/actions.at: Define global_tokens_and_yystype for backward
11376 compatibility until we update the tests.
11377 * tests/calc.at: Idem.
11378 (first_line, first_column, last_line, last_column): Define for lalr1.cc
11379 to simplify the code.
11380
11381 2005-09-29 Paul Eggert <eggert@cs.ucla.edu>
11382
11383 Port to SunOS 4.1.4, which lacks strtoul and strerror.
11384 Ah, the good old days! Problem reported by Peter Klein.
11385 * bootstrap (gnulib_modules): Add strerror, strtoul.
11386 * lib/.cvsignore: Add strerror.c, strtol.c, strtoul.c
11387 * m4/.cvsignore: Add strerror.m4, strtol.m4, strtoul.m4.
11388
11389 2005-09-29 Akim Demaille <akim@epita.fr>
11390
11391 * data/c.m4 (b4_error_verbose_if): New.
11392 * data/lalr1.cc: Use it.
11393 (YYERROR_VERBOSE_IF): Remove.
11394 (yyn_, yylen_, yystate_, yynerrs_, yyerrstatus_): Remove as
11395 parser members, replaced by...
11396 (yyn, yylen, yystate, yynerss, yyerrstatus): these parser::parse
11397 local variables.
11398 (yysyntax_error_): Takes the state number as argument.
11399 (yyreduce_print_): Use the argument yyrule, not the former
11400 attribute yyn_.
11401
11402 2005-09-26 Paul Eggert <eggert@cs.ucla.edu>
11403
11404 * bootstrap (gnulib_modules): Add verify.
11405 * lib/.cvsignore: Add verify.h.
11406 * src/getargs.c: Use ARGMATCH_VERIFY rather than verify.
11407 * src/system.h (verify): Remove.
11408 Include verify.h instead.
11409 * src/tables.c (tables_generate): Use new API for 'verify'.
11410
11411 2005-09-21 Paul Eggert <eggert@cs.ucla.edu>
11412
11413 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Do not use
11414 local variables whose names begin with 'yy'.
11415 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
11416 Trivial changes from Joel E. Denny.
11417
11418 * bootstrap (gnulib_modules): Remove alloca. Bison doesn't need
11419 it itself.
11420 * src/main.c (main) [C_ALLOCA]: Don't flush alloca'ed memory; we
11421 don't use alloca any more.
11422
11423 * data/yacc.c [YYSTACK_USE_ALLOCA && !defined __GNUC__ && ! defined
11424 __BUILTIN_VA_ARG_INCR && ! defined _AIX && ! defined _MSC_VER &&
11425 defined _ALLOCA_H]: Don't include <stdlib.h>; not needed in this case.
11426 * tests/torture.at (Exploding the Stack Size with Alloca): Adjust
11427 to match yacc.c, to test more hosts.
11428
11429 2005-09-20 Paul Eggert <eggert@cs.ucla.edu>
11430
11431 * data/yacc.c (YYSIZE_T): Reindent to make it clearer. This
11432 doesn't affect behavior.
11433 (YYSTACK_ALLOC) [YYSTACK_USE_ALLOCA]: Improve support for
11434 Solaris, AIX, MSC.
11435 (_STDLIB_H): Renamed from YYINCLUDED_STDLIB_H. All uses changed.
11436 This works a bit better with glibc, if user code has already included
11437 stdlib.h.
11438 * doc/bison.texinfo (Bison Parser): Document that users can't
11439 arbitrarily use malloc and free for other purposes. Document
11440 that <alloca.h> and <malloc.h> might be included.
11441 (Table of Symbols): Under YYSTACK_USE_ALLOCA, Don't claim that the
11442 user must declare alloca.
11443
11444 * HACKING (release): Forwarn the Translation Project about
11445 stable releses.
11446
11447 2005-09-20 Akim Demaille <akim@epita.fr>
11448
11449 * data/glr.c: Use b4_token_enums, not b4_token_enums_defines.
11450
11451 2005-09-19 Paul Eggert <eggert@cs.ucla.edu>
11452
11453 * data/yacc.c (YYSIZE_MAXIMUM): New macro.
11454 (YYSTACK_ALLOC_MAXIMUM): Use it.
11455 (yysyntax_error): New function.
11456 (yyparse) [YYERROR_VERBOSE]: Don't leak memory indefinitely if
11457 multiple syntax errors are reported, and alloca is being used.
11458 Instead, reallocate buffers twice as big each time, so that
11459 we waste at most half the allocated memory. Start with a small
11460 (128-byte) buffer that will suffice in most cases anyway.
11461 Use yysyntax_error to do most of the work.
11462
11463 * doc/bison.texinfo (Error Reporting, Table of Symbols):
11464 yynerrs is the number of errors reported, not the number of
11465 errors encountered.
11466
11467 * tests/glr-regression.at (Duplicated user destructor for lookahead):
11468 Mark it as expected to fail.
11469 Cast result of malloc; problem reported by twlevo@xs4all.nl.
11470 * tests/actions.at, tests/calc.at, tests/glr-regression.at:
11471 Don't start user-code symbols with "yy", to avoid name space problems.
11472
11473 2005-09-19 Akim Demaille <akim@epita.fr>
11474
11475 Remove the traits, failed experiment.
11476 It never proved useful, and anyway because of the current
11477 definition, it was not possible to have several specialization of
11478 this traits, making it useless.
11479 * data/lalr1.cc (yy:traits): Remove.
11480 Inline its definitions in the parser class.
11481
11482 2005-09-19 Akim Demaille <akim@epita.fr>
11483
11484 * tests/atlocal.in (LIBS): Pass INTLLIBS to address failures on at
11485 least Mac OSX with a /usr/local install of gettext.
11486
11487 2005-09-19 Akim Demaille <akim@epita.fr>
11488
11489 * data/lalr1.cc (yyparse): Rename yylooka and yyilooka as yychar
11490 and yytoken for similarity with the other skeletons.
11491
11492 2005-09-19 Akim Demaille <akim@epita.fr>
11493
11494 * NEWS, configure.ac: update version number to 2.1a.
11495
11496 2005-09-16 Paul Eggert <eggert@cs.ucla.edu>
11497
11498 * NEWS: Version 2.1.
11499
11500 * NEWS: Remove notice of yytname change, since it was never in an
11501 official release.
11502 * data/glr.c (yydestroyGLRState): Rename local var to avoid shadowing
11503 diagnostic.
11504 * src/output.c (prepare): Likewise.
11505 * data/lalr1.cc (YYERROR_VERBOSE_IF): New macro.
11506 (yysyntax_error_): Use it to avoid GCC warning when YYERROR_VERBOSE
11507 is not defined. This is an awful hack, but it's enough for now.
11508 All callers changed.
11509 * tests/glr-regression-at (make_value): Args are const pointers now,
11510 to avoid GCC warning.
11511 (Duplicated user destructor for lookahead): New test. Currently
11512 skipped. It fails on my host but I'm not sure it'll always fail.
11513
11514 2005-09-16 Akim Demaille <akim@epita.fr>
11515
11516 * src/symtab.h (struct symbol): Declare the printer and destructor
11517 as const, to avoid accidental calls to free.
11518 (symbol_destructor_set, symbol_printer_set): Adjust.
11519 * src/symtab.c: Adjust.
11520
11521 2005-09-16 Akim Demaille <akim@epita.fr>
11522
11523 * data/c.m4 (b4_token_enums): New.
11524 (b4_token_defines): Rename as...
11525 (b4_token_enums_defines): this.
11526 (b4_token_defines): New, output only the #defines.
11527 * data/yacc.c, data/glr.c: Adjust.
11528 * data/lalr1.cc: Use b4_token_enums instead of b4_token_enums_defines.
11529 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate): Define
11530 as default values.
11531
11532 2005-09-16 Akim Demaille <akim@epita.fr>
11533
11534 * data/lalr1.cc (yylex_): Remove, inline its code.
11535 (yyreport_syntax_error_): Remove, replaced by...
11536 (yysyntax_error_): this which returns a string and leaves to the
11537 caller the call to the users' error function.
11538 (yylooka_, yyilooka_, yylval, yylloc, yyerror_range_, yyval, yyloc):
11539 Move from members of the parser object...
11540 (yylooka, yyilooka, yylval, yylloc, yyerror_range, yyval, yyloc):
11541 to local variables of the parse function.
11542
11543 2005-09-16 Akim Demaille <akim@epita.fr>
11544
11545 * doc/bison.texinfo (Calc++ Parser): Don't promote defining YYEOF
11546 since it's in Bison's name space.
11547
11548 2005-09-15 Paul Eggert <eggert@cs.ucla.edu>
11549
11550 * data/glr.c (yyresolveValue): Add default case to pacify
11551 gcc -Wswitch-default. Problem reported by twlevo@xs4all.nl.
11552
11553 * NEWS: Document when yyparse started to return 2.
11554 * doc/bison.texinfo (Parser Function): Document when yyparse
11555 returns 2.
11556
11557 * data/lalr1.cc: Revert part of previous change, as it's incompatible.
11558 (b4_filename_type): Renamed back from b4_file_name_type. All uses
11559 changed.
11560 (class position): file_name -> filename (reverting). All uses changed.
11561
11562 2005-09-14 Paul Eggert <eggert@cs.ucla.edu>
11563
11564 * examples/calc++/Makefile.am ($(calc_sources_generated)): Don't
11565 do anything if $@ exists. This reverts part of the 2005-07-07
11566 patch.
11567
11568 2005-09-11 Paul Eggert <eggert@cs.ucla.edu>
11569
11570 * Makefile.am (EXTRA_DIST): Do not distribute REFERENCES; it
11571 contains obsolete information and isn't worth distributing as a
11572 separate file anyway.
11573 * data/glr.c [defined YYSETJMP]: Don't include <setjmp.h>.
11574 (YYJMP_BUF, YYSETJMP, YYLONGJMP) [!defined YYSETJMP]: New macros.
11575 All uses of jmp_buf, setjmp, longjmp changed to use these instead.
11576 (yyparse): Abort if user code uses longjmp to throw an unexpected
11577 value.
11578
11579 2005-09-09 Paul Eggert <eggert@cs.ucla.edu>
11580
11581 * data/c.m4 (b4_identification): Define YYBISON_VERSION.
11582 Suggested by twlevo@xs4all.nl.
11583
11584 * data/glr.c (YYCHK1): Do not assume YYE is in range.
11585 This avoids a diagnostic from gcc -Wswitch-enum.
11586 Problem reported by twlevo@xs4all.nl.
11587
11588 * doc/bison.texinfo: Don't use "filename", as per GNU coding
11589 standards. Use "file name" or "file" or "name", depending on
11590 the context.
11591 (Invocation): The output of "bison hack/foo.y" goes to foo.tab.c,
11592 not to hack/foo.tab.c.
11593 (Calc++ Top Level): 2nd arg of main is not const.
11594 * data/glr.c: b4_filename -> b4_file_name.
11595 * data/lalr1.cc: Likewise. Also, b4_filename_type -> b4_file_name_type.
11596 All uses changed.
11597 (class position): filename -> file_name. All uses changed.
11598 * data/yacc.c: b4_filename -> b4_file_name.
11599 * lib/bitset.h: filename -> file_name in local vars.
11600 * lib/bitset_stats.c: Likewise.
11601 * src/files.c: Likewise.
11602 * src/scan-skel.l ("@output ".*\n): Likewise.
11603 * src/files.c (file_name_split): Renamed from filename_split.
11604 * src/muscle_tab.c (muscle_init): Output b4_file_name, not b4_filename.
11605
11606 2005-09-08 Paul Eggert <eggert@cs.ucla.edu>
11607
11608 * lib/.cvsignore: Add pipe-safer.c, stdio--.h, unistd--.h,
11609 to accommodate latest gnulib.
11610
11611 * tests/glr-regression.at (Duplicate representation of merged trees):
11612 Add casts to pacify g++. Problem reported by twlevo@xs4all.nl.
11613
11614 * bootstrap: Add comment as to why the AM_LANGINFO_CODESET hack is
11615 needed.
11616
11617 2005-08-26 Paul Eggert <eggert@cs.ucla.edu>
11618
11619 * data/glr.c (yydestroyGLRState): Renamed from yydestroyStackItem.
11620 All uses changed. Invoke user destructor after an error during a
11621 split parse (trivial change from Joel E. Denny).
11622
11623 * tests/glr-regression.at
11624 (User destructor after an error during a split parse): New test case.
11625 Problem reported by Joel E. Denny in:
11626 http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00029.html
11627
11628 2005-08-25 Paul Eggert <eggert@cs.ucla.edu>
11629
11630 * README-cvs: Give URLs for recommended tools.
11631 Mention Gzip version problem, and bootstrapping issues.
11632 Remove troubleshooting section, as it's somewhat obsolete.
11633
11634 * bootstrap (no_cache): New var, to accommodate different wget
11635 variants. Use it instead of '-C off'. Problem reported by
11636 twlevo@xs4all.nl.
11637
11638 * data/glr.c (yydestroyStackItem): New function.
11639 (yyrecoverSyntaxError, yyreturn): Use it to improve quality of
11640 debugging information. Problem reported by Joel E. Denny.
11641
11642 2005-08-25 Akim Demaille <akim@epita.fr>
11643
11644 * tests/local.at (AT_COMPILE_CXX): Pass $LINKS too.
11645
11646 2005-08-24 Paul Eggert <eggert@cs.ucla.edu>
11647
11648 * data/glr.c (yyrecoverSyntaxError, yyreturn):
11649 Don't invoke destructor on unresolved entries.
11650 * tests/glr-regression.at
11651 (User destructor for unresolved GLR semantic value): New test case.
11652 Problem reported by Joel E. Denny in:
11653 http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00016.html
11654
11655 2005-08-21 Paul Eggert <eggert@cs.ucla.edu>
11656
11657 * lib/.cvsignore: Remove realloc.c, strncasecmp.c, xstrdup.c.
11658 Add strnlen.c.
11659 * m4/.cvsignore: Remove codeset.m4, gettext.m4, lib-ld.m4,
11660 lib-prefix.m4, po.m4.
11661
11662 * data/glr.c (yyreturn): Use "Cleanup:" rather than "Error:"
11663 in yydestruct diagnostic, since it might not be an error.
11664 Problem reported by Joel Denny near end of
11665 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00040.html>.
11666 * data/lalr1.cc (yyerturn): Likewise.
11667 * data/yacc.c (yyreturn): Likewise.
11668 * tests/calc.at (_AT_CHECK_CALC_ERROR): Adjust to the above change.
11669
11670 * src/files.c: Remove obsolete FIXME comment.
11671
11672 * data/glr.c (YY_SYMBOL_PRINT): Append a newline, for consistency
11673 with the other templates, and to fix bogus run-on messages such
11674 as the one reported at the end of
11675 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00040.html>.
11676 All callers changed to avoid the newline.
11677 (yyprocessOneStack): Output two lines rather than one, to accommodate
11678 the above change. This changes the debug output format slightly.
11679
11680 * data/glr.c (yyresolveValue): Fix redundant parse tree problem
11681 reported by Joel E. Denny in
11682 <http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00004.html>
11683 (trivial change).
11684 * tests/glr-regression.at (Duplicate representation of merged trees):
11685 New test, from Joel E. Denny in:
11686 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00013.html>.
11687 * THANKS: Add Joel E. Denny.
11688
11689 * configure.ac (AC_INIT): Bump to 2.0c.
11690
11691 2005-07-24 Paul Eggert <eggert@cs.ucla.edu>
11692
11693 * NEWS: Version 2.0b.
11694
11695 * Makefile.am (SUBDIRS): Put examples before tests, so that
11696 "make check" doesn't finish with "All 1 tests passed".
11697
11698 * tests/regression.at (Token definitions): Don't rely on
11699 AT_PARSER_CHECK for data that contains backslashes. It currently
11700 uses 'echo', and 'echo' isn't portable if its argument contains
11701 backslashes. Problem found on OpenBSD 3.4. Also, do not assume
11702 that the byte '\0xff' is not printable in the C locale; it is,
11703 under OpenBSD 3.4 (!). Luckily, '\0x80' through '\0x9e' are
11704 not printable, so use '\0x81' to test.
11705
11706 * data/glr.c (YYOPTIONAL_LOC): Define even if it's not a recent
11707 version of GCC, since the macro is used with non-GCC compilers.
11708
11709 Fix core dump reported by Pablo De Napoli in
11710 <http://lists.gnu.org/archive/html/bug-bison/2005-07/msg00053.html>.
11711 * tests/regression.at (Invalid inputs with {}): New test.
11712 * src/parse-gram.y (token_name): Translate type before using
11713 it as an index.
11714
11715 * data/glr.c (ATTRIBUTE_UNUSED): Remove, since it infringes on
11716 the user's name space. All uses changed to __attribute__
11717 ((__unused__)).
11718 (yyFail, yyMemoryExhausted, yyreportAmbiguity):
11719 Add __attribute__ ((__noreturn__)).
11720
11721 * etc/clcommit: Remove. We weren't using it, and it failed
11722 "make maintainer-distcheck".
11723 * Makefile.maint: Merge from coreutils.
11724 (CVS_LIST, CVS_LIST_EXCEPT): New macros.
11725 (syntax-check-rules): Change list of rules as described below.
11726 (sc_cast_of_alloca_return_value, sc_dd_max_sym_length):
11727 (sc_file_system, sc_obsolete_symbols, sc_prohibit_atoi_atof):
11728 (sc_prohibit_jm_in_m4, sc_root_tests, sc_tight_scope):
11729 (sc_trailing_space): New rules.
11730 (sc_xalloc_h_in_src): Remove.
11731 (sc_cast_of_argument_to_free, sc_cast_of_x_alloc_return_value):
11732 (sc_space_tab, sc_error_exit_success, sc_changelog):
11733 (sc_system_h_headers, sc_sun_os_names, sc_unmarked_diagnostics):
11734 (makefile-check, po-check, author_mark_check):
11735 (makefile_path_separator_check, copyright-check):
11736 Use grep -n, to make it easier to find violations.
11737 Use CVS_LIST and CVS_LIST_EXCEPT.
11738 (header_regexp, h_re): Remove.
11739 (dd_c): New macro.
11740 (sc_dd_max_sym_length, .re-list, news-date-check): New rules.
11741 (my-distcheck): Use more-modern GCC flags.
11742 (signatures, %.asc): Remove.
11743 (rel-files, announcement): Remove signatures.
11744 Restore old updating code, even though we don't use it, so
11745 that we're the same as coreutils.
11746 (alpha, beta, major): Depend on news-date-check.
11747 Make the upload commands.
11748
11749 * data/c.m4, data/lalr1.cc, data/yacc.c: Normalize white space.
11750 * lib/abitset.h, lib/bbitset.h, lib/bitset.h: Likewise.
11751 * lib/bitset_stats.c, lib/ebitset.h, lib/lbitset.c: Likewise.
11752 * lib/libitset.h, lib/timevar.c, lib/vbitset.h: Likewise.
11753 * src/Makefile.am, src/gram.c, src/muscle_tab.h: Likewise.
11754 * src/parse-gram.y, src/system.h, src/tables.c, src/vcg.c: Likewise.
11755 * src/vcg_defaults.h, tests/cxx-type.at, tests/existing.at: Likewise.
11756 * tests/sets.at: Likewise.
11757
11758 * data/m4sugar/m4sugar.m4: Sync from Autoconf, except that
11759 we comment out the Autoconf version number.
11760 * doc/bison.texinfo (Calc++ Scanner): Don't use atoi, as
11761 it's error-prone and "make maintainer-distcheck" rejects it.
11762
11763 * lib/subpipe.c: Include <fcntl.h> without checking for HAVE_FCNTL_H.
11764 Indent calls to "error" to pacify "make maintainer-distcheck",
11765 when the calls are not intended to be translated.
11766 * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't check for fcntl.h.
11767
11768 * src/Makefile.am (DEFS): Use +=, to pacify
11769 "make maintainer-distcheck".
11770 (bison_SOURCES): Add scan-skel.h.
11771 (sc_tight_scope): New rule, from coreutils.
11772
11773 * src/files.c (src_extension, header_extension):
11774 Now static, not extern.
11775 * src/getargs.c (short_options): Likewise.
11776 * src/muscle_tab.c (muscle_table): Likewise.
11777 * src/parse-gram.y (current_class, current_type, current_prec):
11778 Likewise.
11779 * src/reader.c (grammar_end, previous_rule_end): Likewise.
11780 * src/getargs.h: Redo comments to pacify "make maintainer-distcheck".
11781 * src/main.c (main): Cast bindtextdomain and textdomain calls to
11782 void, to avoid warning when NLS is disabled.
11783 * src/output.c: Include scan-skel.h.
11784 (scan_skel): Remove decl, since scan-skel.h does this.
11785 (output_skeleton):
11786 Indent calls to "error" to pacify "make maintainer-distcheck".
11787 * src/print_graph.c: Don't include <obstack.h>, as system.h does this.
11788 * src/reader.h (gram_end, gram_lineno): New decls to pacify
11789 "make maintainer-distcheck".
11790 * src/scan-skel.l (skel_lex, skel_get_lineno, skel_get_in):
11791 (skel_get_out, skel_get_leng, skel_get_text, skel_set_lineno):
11792 (skel_set_in, skel_set_out, skel_get_debug, skel_set_debug):
11793 (skel_lex_destroy, scan_skel): Move these decls to...
11794 * src/scan-skel.h: New file.
11795 * src/uniqstr.c (uniqstr_assert):
11796 Indent calls to "error" to pacify "make maintainer-distcheck".
11797
11798 * tests/Makefile.am ($(srcdir)/package.m4): Use $(VAR),
11799 not @VAR@.
11800
11801 * tests/torture.at: Revamp to avoid misuse of atoi that
11802 "make maintainer-distcheck" complained about.
11803
11804 * examples/extexi (message): Don't print a message more than once,
11805 and omit line-number decoration that makes Emacs compile think
11806 that informative messages are worth worrying about.
11807
11808 2005-07-22 Paul Eggert <eggert@cs.ucla.edu>
11809
11810 * configure.ac: Update version number.
11811
11812 * Makefile.am (SUBDIRS): Add examples; somehow this got removed
11813 accidentally.
11814 * examples/calc++/calc++-parser.yy: Remove from CVS, as it's
11815 autogenerated by the maintainer.
11816 * examples/calc++/.cvsignore: Add *.yy.
11817
11818 * lib/bitset.c (bitset_alloc): Don't cast xcalloc result.
11819 * lib/bitset_stats.c (bitset_stats_init): Likewise.
11820 * lib/bitsetv.c (bitsetv_alloc): Likewise.
11821
11822 * po/POTFILES.in: Add lib/xalloc-die.c; remove lib/xmalloc.c.
11823
11824 * src/relation.c (relation_transpose): Rewrite to avoid bogus complaint
11825 from maintainer-distcheck about casting the argument of 'free'.
11826
11827 * NEWS: Mention recent yytname changes.
11828 * THANKS: Add Anthony Heading, twlevo@xs4all.nl.
11829
11830 * bootstrap: For translations that have not yet been upgraded to
11831 the new runtime-po domain, prime the pump by extracting the
11832 relevant strings from the obsolete translations. This code can be
11833 removed once the bison-runtime domain has been translated by each
11834 team.
11835
11836 * src/scan-gram.l (<SC_PRE_CODE>.): Don't double-quote token names,
11837 now that token names are already quoted.
11838
11839 Fix problem reported by Anthony Heading.
11840 * data/glr.c (YYTOKEN_TABLE): New macro.
11841 (yytname): Define if YYTOKEN_TABLE.
11842 * data/yacc.c (YYTOKEN_TABLE, yytname): Likewise.
11843 * data/lalr1.cc (YYTOKEN_TABLE, yytname_): Likewise.
11844 (YYERROR_VERBOSE): Define the same way the other skeletons do.
11845 * src/output.c (prepare_symbols): Output token_table_flag.
11846
11847 2005-07-21 Paul Eggert <eggert@cs.ucla.edu>
11848
11849 * data/glr.c (yyinitGLRStack, yyreturn): Don't call malloc
11850 again if the first call fails.
11851
11852 * data/glr.c (yytnamerr): New function.
11853 (yyreportSyntaxError): Use it to dequote most string literals.
11854 * data/lalr1.c (yytname_): Renamed from yyname_, for compatibility
11855 with other skeletons. All uses changed.
11856 (yytnameerr_): New function.
11857 (yyreport_syntax_error): Use it to dequote most string literals.
11858 * data/yacc.c (yytnamerr): New function.
11859 (yyerrlab): Use it to decode most string literals.
11860 * doc/bison.texinfo (Decl Summary, Calling Convention):
11861 Clarify quoting convention of yytname.
11862 * src/output.c (prepare_symbols): Quote all names. This undoes
11863 the 2005-04-17 change, which is now accomplished (mostly) via
11864 changes in the parsers as described above.
11865 * tests/regression.at (Token definitions, Web2c Actions):
11866 Undo most 2005-04-17 change here, too.
11867
11868 2005-07-20 Paul Eggert <eggert@cs.ucla.edu>
11869
11870 Fix more problems reported by twlevo@xs4all.nl.
11871 * tests/cxx-type.at: Don't pipe output of ./types through sed to
11872 remove trailing spaces. This loses the exit status of ./types,
11873 and isn't needed since ./types shouldn't be emitting trailing
11874 spaces.
11875 * data/glr.c (yyreturn): Don't pop stack if yyinitStateSet failed,
11876 as the stack isn't valid in that case.
11877
11878 * src/scan-gram.l (gram_get_lineno, gram_get_in, gram_get_out):
11879 (gram_get_leng, gram_get_text, gram_set_lineno, gram_set_in):
11880 (gram_set_out, gram_get_debug, gram_set_debug, gram_lex_destroy):
11881 Add declarations to pacify "gcc -Wmissing-prototypes" when flex 2.5.31
11882 is used.
11883 * src/scan-skel.l (skel_get_lineno, skel_get_in, skel_get_out):
11884 (skel_get_leng, skel_get_text, skel_set_lineno, skel_set_in):
11885 (skel_set_out, skel_get_debug, skel_set_debug, skel_lex_destroy):
11886 Likewise.
11887
11888 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Work even with
11889 overly-picky compilers that reject 'char *foo = "bar";'.
11890
11891 * src/symtab.c (SYMBOL_ATTR_PRINT, symbol_print): Direct output
11892 to FILE * parameter, not to stderr. This fixes a typo introduced
11893 in the 2005-07-12 change.
11894
11895 * lib/subpipe.c (create_subpipe): Rewrite slightly to avoid
11896 warnings from GCC 4.
11897
11898 * data/glr.c (yyexpandGLRStack, yyaddDeferredAction, yyexpandGLRStack):
11899 (yyglrShiftDefer, yysplitStack):
11900 Remove unused parameters b4_pure_formals. All uses changed.
11901 (yyglrShift): Remove unused parameters b4_user_formals.
11902 All uses changed.
11903 (yyglrReduce): Removed unused parameter yylocp. All uses changed.
11904
11905 2005-07-18 Paul Eggert <eggert@cs.ucla.edu>
11906
11907 Destructor cleanups and regularization among the three skeletons.
11908 * NEWS: Document the behavior changes.
11909 * data/glr.c (yyrecoverSyntaxError): Don't bother to pop the
11910 stack before failing, as the cleanup code will do it for us now.
11911 * data/lalr1.cc (yyerrlab): Likewise.
11912 * data/glr.c (yyparse): Pop everything off the stack before
11913 freeing it, so that destructors get called properly.
11914 * data/lalr1.cc (yyreturn): Likewise.
11915 * data/yacc.c (yyreturn): Pop and destroy the start symbol, too.
11916 This is more consistent.
11917 * doc/bison.texinfo (Destructor Decl): Mention more reasons
11918 why destructors might be called. 1.875 -> 2.1.
11919 (Destructor Decl, Decl Summary, Table of Symbols):
11920 Some English-language cleanups for %destructor.
11921 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
11922 Add output line for destructor of start symbol.
11923 * tests/calc.at (AT_CHECK_CALC): Add one to line counts,
11924 because of that same extra output line.
11925
11926 * NEWS: Document minor wording changes in diagnostics of
11927 Bison-generated parsers.
11928 * data/glr.c (yyMemoryExhausted): Renamed from yyStackOverflow.
11929 Remove unused formals. All uses changed.
11930 (yyreportAmbiguity): "ambiguity detected" -> "syntax is ambiguous".
11931 (yyparse): Rename yyoverflowlab to yyexhaustedlab.
11932 * data/yacc.c (yyparse): "parser stack overflow" -> "memory exhausted".
11933 Rename yyoverflowab to yyexhaustedlab.
11934 When memory exhaustion occurs during syntax-error reporting,
11935 report it separately rather than in a single diagnostic; this
11936 eases translation.
11937 * doc/bison.texinfo (Memory Management): Renamed from Stack Overflow.
11938 (Memory Exhausted): Renamed from Parser Stack Overflow.
11939 Revamp wording slightly to prefer "memory exhaustion".
11940 * tests/actions.at: "parser stack overflow" -> "memory exhausted".
11941
11942 * data/c.m4 (b4_yysymprint_generate): Use YYFPRINTF, not fprintf.
11943
11944 Add i18n support to the GLR skeleton. Partially fix the C++
11945 skeleton; a C++ expert needs to finish this. Remove debugging
11946 msgids; there's little point to having them translated, since they
11947 can be understood only by someone who can read the
11948 (English-language) source code.
11949
11950 Generate runtime-po/bison-runtime.pot automatically, so that we
11951 don't have to worry about garbage getting in that file. We'll
11952 make sure after the next official release that old msgids don't
11953 get lost. See
11954 <http://lists.gnu.org/archive/html/bison-patches/2005-07/msg00119.html>.
11955
11956 * runtime-po/Makefile.in.in, runtime-po/bison-runtime.pot: Remove.
11957 Now auto-generated.
11958 * PACKAGING: Don't claim that Gawk, GCC, Perl use this method yet.
11959 Fix typos in explanations of the runtime file.
11960 * bootstrap: Change gettext keyword from YYI18N to YY_.
11961 Use standard Makefile.in.in in runtime-po, since we'll arrange
11962 for backward-compatible bison-runtime.po files in a different way.
11963 * data/glr.c (YY_): New macro, from yacc.c.
11964 (yyuserAction, yyreportAmbiguity, yyreportSyntaxError, yyparse):
11965 Translate messages intended for users.
11966 (yyreportSyntaxError): Change "virtual memory" to "memory" to match
11967 the wording in the other skeletons. We don't know that the memory
11968 is virtual.
11969 * data/lalr1.cc (YY_): Renamed from _. All uses changed.
11970 Use same method that yacc.c uses.
11971 Don't translate debugging messages.
11972 (yy::yyreport_syntax_error): Put in a FIXME for the i18n stuff;
11973 it doesn't work (yet), and requires C++ expertise to fix.
11974 * data/yacc.c (YY_): Renamed from YY18N. All uses changed.
11975 Move defn to a more logical place, to be consistent with other
11976 skeletons.
11977 Don't translate debugging messages.
11978 Don't assume line numbers fit in unsigned int; use unsigned long fmts.
11979 * doc/bison.texinfo: Mention <libintl.h>. Change glibc cross reference
11980 to gettext cross reference. Add indexing terms. Mention YYENABLE_NLS.
11981 * runtime-po/POTFILES.in: Add data/glr.c, data/lalr1.cc.
11982
11983 Fix yyerror / yylex test glitches noted by twlevo@xs4all.nl.
11984 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Have yyerror return
11985 void, not int.
11986 * tests/glr-regression.at (Badly Collapsed GLR States):
11987 Likewise.
11988 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
11989 yylex should return 0 at EOF rather than aborting.
11990
11991 Improve tests for stack overflow in GLR parser.
11992 Problem reported by twlevo@xs4all.nl.
11993 * data/glr.c (struct yyGLRStack): Remove yyerrflag member.
11994 All uses removed.
11995 (yyStackOverflow): Just longjmp, but with value 2 so that caller
11996 can handle the problem.
11997 (YYCHK1): Use goto (a la yacc.c) rather than setting a flag.
11998 (yyparse): New local variable yyresult to record the result.
11999 Use result of setjmp to set it, rather than storing itinto
12000 struct.
12001 (yyDone): Remove label.
12002 (yyacceptlab, yyabortlab, yyoverflowlab, yyreturn): New labels,
12003 to mimic yacc.c. Do not discard lookahead if it's EOF (possible
12004 if YYABORT is used).
12005 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Exit with
12006 yyparse status; put status > 1 into diagnostic.
12007 Check that status==2 works.
12008 * tests/calc.at, tests/cxx-type.at, tests/glr-regression.at:
12009 Use exit status 3 for failure to open (which shouldn't happen).
12010
12011 2005-07-17 Paul Eggert <eggert@cs.ucla.edu>
12012
12013 * tests/conflicts.at (%nonassoc and eof): Don't exit with status
12014 1 on syntax error; just let yyparse do its thing.
12015 * tests/glr-regression.at (Badly Collapsed GLR States): Likewise.
12016 * tests/torture.at (AT_DATA_STACK_TORTURE): Likewise.
12017 (Exploding the Stack Size with Alloca):
12018 (Exploding the Stack Size with Malloc):
12019 Expect exit status 2, not 1, since the parser is supposed to blow
12020 its stack. Problem reported by twlevo@xs4all.nl.
12021
12022 * data/glr.c (yyparse): Don't assume that the initial calls
12023 to YYMALLOC succeed; in that case, yyparse incorrectly returned 0.
12024 Print a stack-overflow message and fail instead.
12025 Initialize the line-number information before creating the stack,
12026 so that the stack-overflow message can report line zero safely.
12027
12028 2005-07-14 Paul Eggert <eggert@cs.ucla.edu>
12029
12030 Fix problems reported by twlevo@xs4all.nl.
12031 * data/glr.c (YYSTACKEXPANDABLE): Don't define if already defined.
12032 (yyuserMerge): Provide a default case if b4_mergers is empty.
12033 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Define YYSTACKEXPANDABLE.
12034 * tests/glr-regression.at
12035 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
12036 Add casts to pacify C++ compilers.
12037 * tests/glr-regression.at (Improper merging of GLR delayed action
12038 sets): Declare yylex before using it.
12039 * tests/Makefile.am (maintainer-check-g++): Fix a stray
12040 $(GXX) that escaped the renaming of GXX to CXX. Remove bogus
12041 test for valgrind; valgrind is independent of g++.
12042 (maintainer-check-posix): Add _POSIX2_VERSION=200112, to check
12043 for compatibility with POSIX 1003.1-2001 (if running coreutils).
12044 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Port to stricter C++.
12045 Use a destructor, so that we can expand the stack. Change
12046 YYSTYPE to char * so that we can free it. Cast result of malloc.
12047
12048 2005-07-13 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
12049
12050 * data/glr.c (yyuserAction): Fix uninitialized variable that caused
12051 a valgrind failure. Problem reported by twlevo@xs4all.nl.
12052
12053 2005-07-13 Paul Eggert <eggert@cs.ucla.edu>
12054
12055 * PACKAGING: New file, suggested by Bruno Haible and taken from
12056 similar wording in gettext's PACKAGING file.
12057 * NEWS: Mention PACKAGING.
12058 * Makefile.am (EXTRA_DIST): Add PACKAGING.
12059
12060 2005-07-12 Paul Eggert <eggert@cs.ucla.edu>
12061
12062 * NEWS: Document recent i18n improvements.
12063 * bootstrap: Get runtime translations into runtime-po.
12064 Create runtime-po files automatically, if possible.
12065 * configure.ac: Invoke BISON_I18N, so that we eat our own dog food.
12066 * data/yacc.c: Rewrite inclusion of <libintl.h> so that ENABLE_NLS
12067 does not infringe on the user's name space.
12068 (YYENABLE_NLS): Renamed from ENABLE_BISON_NLS.
12069 * doc/bison.texinfo (Internationalization): Revamp the English
12070 and Texinfo syntax a bit, to try to make it clearer.
12071 (Bison Options, Option Cross Key): Mention --print-localedir.
12072 * m4/bison-i18n.m4 (BISON_I18N): Rename ENABLE_BISON_NLS to
12073 YYENABLE_NLS. Quote a bit more.
12074 * runtime-po/.cvsignore: New file.
12075 * runtime-po/Makefile.in.in (mostlyclean): Remove *.old.pot.
12076 * runtime-po/Rules-quot: Remove; now created by bootstrap.
12077 * runtime-po/quot.sed: Likewise.
12078 * runtime-po/boldquot.sed: Likewise.
12079 * runtime-po/en@quot.header: Likewise.
12080 * runtime-po/en@boldquot.header: Likewise.
12081 * runtime-po/insert-header.sin: Likewise.
12082 * runtime-po/remove-potcdate.sin: Likewise.
12083 * runtime-po/Makevars: Likewise.
12084 * runtime-po/LINGUAS: Likewise.
12085 * runtime-po/de.po: Likewise; we will rely on the translation project
12086 to maintain this, so "bootstrap" should get it.
12087 * src/getarg.c (PRINT_LOCALEDIR_OPTION): Let the C compiler determine
12088 its value.
12089 * src/main.c (main): Bind the bison-runtime domain, too.
12090
12091 2005-07-12 Bruno Haible <bruno@clisp.org>
12092
12093 * data/yacc.c: Include <libintl.h> when NLS is enabled.
12094 (YYI18N): Renamed from _. Use dgettext when NLS is enabled.
12095 * po/POTFILES.in: Remove autogenerated file src/parse-gram.c.
12096 * runtime-po: New directory.
12097 * runtime-po/Makefile.in.in: New file, copied from po/, with modified
12098 $(DOMAIN).pot-update rule, so that old messages are never dropped.
12099 * runtime-po/Rules-quot: New file, copied from po/.
12100 * runtime-po/quot.sed: Likewise.
12101 * runtime-po/boldquot.sed: Likewise.
12102 * runtime-po/en@quot.header: Likewise.
12103 * runtime-po/en@boldquot.header: Likewise.
12104 * runtime-po/insert-header.sin: Likewise.
12105 * runtime-po/remove-potcdate.sin: Likewise.
12106 * runtime-po/Makevars: New file.
12107 * runtime-po/POTFILES.in: New file.
12108 * runtime-po/LINGUAS: New file.
12109 * runtime-po/bison-runtime.pot: New file.
12110 * runtime-po/de.po: New file.
12111 * m4/bison.m4: New file.
12112 * Makefile.am (SUBDIRS): Add runtime-po.
12113 (aclocaldir, aclocal_DATA): New variables.
12114 * configure.ac: Add AC_CONFIG_FILES of runtime-po/Makefile.in.
12115 Define aclocaldir.
12116 * src/getargs.c (usage): Document --print-localedir option.
12117 (PRINT_LOCALEDIR_OPTION): New enum item.
12118 (long_options): Add --print-localedir option.
12119 (getargs): Handle --print-localedir option.
12120 * doc/bison.texinfo (Bison Parser): Remove paragraph about _().
12121 (Internationalization): New section.
12122
12123 2005-07-12 Akim Demaille <akim@epita.fr>
12124
12125 * src/symtab.h, src/symtab.c (symbol_print): Swap the arguments,
12126 for consistency with the rest of the code.
12127 * src/symlist.h, src/symlist.c (symbol_list_print): Ditto.
12128 Add separators.
12129
12130 2005-07-12 Akim Demaille <akim@epita.fr>
12131
12132 * src/parse-gram.y: Use %printer instead of YYPRINT.
12133
12134 2005-07-12 Akim Demaille <akim@epita.fr>
12135
12136 * src/symtab.h, src/symtab.c (symbol_print): New.
12137 * src/symlist.h, src/symlist.c (symbol_list_print): New.
12138 * src/symlist.c (symbol_list_n_type_name_get): Report the culprit.
12139
12140 2005-07-12 Akim Demaille <akim@epita.fr>
12141
12142 * data/glr.c (b4_syncline): Fix (swap) the definitions of
12143 b4_at_dollar and b4_dollar_dollar.
12144
12145 2005-07-11 Paul Eggert <eggert@cs.ucla.edu>
12146
12147 * doc/bison.texinfo (Mystery Conflicts): Add reference to DeRemer
12148 and Pennello's paper.
12149
12150 2005-07-09 Paul Eggert <eggert@cs.ucla.edu>
12151
12152 * data/yacc.c (yyparse): Undo previous patch. Instead,
12153 set yylsp[0] and yyvsp[0] only if the initial action
12154 sets yylloc and yylval, respectively.
12155
12156 * data/yacc.c (yyparse): In the initial action, set
12157 yylsp[0] and yyvsp[0] rather than yylloc and yylval.
12158 This avoids the use of undefined variables if the initial
12159 action does not set yylloc and/or yylval.
12160
12161 2005-07-07 Paul Eggert <eggert@cs.ucla.edu>
12162
12163 * examples/calc++/calc++-driver.cc, examples/calc++/calc++-driver.hh:
12164 * examples/calc++/calc++-scanner.ll, examples/calc++/calc++.cc:
12165 Remove from CVS. These files are automatically generated.
12166 * examples/extexi: Clarify that this file is now part of Bison,
12167 not GNU M4, and that it works with any POSIX-compatible Awk.
12168 * examples/calc++/Makefile.am (run_extexi): Remove; not used.
12169 ($(calc_extracted)): Renamed from $(calc_sources_extracted),
12170 so that we also get calc++-parser.yy. Geneate it.
12171 Use $(AWK), not gawk, since any conforming Awk will do.
12172 Put comment before action, since older 'make' can't handle comment
12173 in action.
12174 $(BUILT_SOURCES): List all built sources, not just some of them.
12175 $(MAINTAINERCLEANFILES): Remove *.stamp, and all built sources.
12176 $($(srcdir)/calc++-parser.stamp): Work even if POSIXLY_CORRECT.
12177 $($(calc_sources_generated)): Remove unnecessary test for existence
12178 of target. (This had a shell syntax error anyway; a stray "x".)
12179 (calc_extracted): List $(srcdir)/calc++-parser.yy, not
12180 calc++-parser.yy.
12181 * examples/.cvsignore, examples/calc++/.cvsignore: New files.
12182
12183 * bootstrap (gnulib_modules): Add gettext, now that it's no longer
12184 implied by the other modules.
12185
12186 2005-07-06 Akim Demaille <akim@epita.fr>
12187
12188 Bind examples/calc++ to the package.
12189 * examples/calc++/Makefile: Remove, replaced by...
12190 * examples/calc++/Makefile.am: ... this new file.
12191 * examples/calc++/test: Remove input.
12192 * examples/calc++/compile: Remove.
12193 * examples/Makefile.am: New.
12194 * configure.ac, Makefile.am: Adjust.
12195 * doc/Makefile.am (clean-local): New, for more recent texi2dvis.
12196
12197 2005-07-05 Paul Eggert <eggert@cs.ucla.edu>
12198
12199 * data/glr.c (yyFail): Drastically simplify; since the format argument
12200 never had any % directives, we can simply pass it to yyerror.
12201 (yyparse): Use "t a; a=b;" rather than "t a = b;" when a will
12202 be modified later, as that is the usual style in glr.c.
12203 Problems reported by Paul Hilfinger.
12204
12205 Rewrite GLR parser to catch more buffer overrun, storage exhaustion,
12206 and size overflow errors.
12207 * data/glr.c: Include <stdio.h> etc. after user prolog, not before,
12208 in case the user prolog sets feature-test macros like _GNU_SOURCE.
12209 (YYSIZEMAX): New macro.
12210 (yystpcpy): New function, taken from yacc.c.
12211 (struct yyGLRStack.yyspaceLeft): Now size_t, not int.
12212 (yyinitGLRStack, yyfreeGLRstack): Remove unnecessary forward decls,
12213 so that we don't have to maintain their signatures.
12214 (yyFail): Check for buffer overflow, by using vsnprintf rather
12215 than vsprintf. Allocate a bigger buffer if possible.
12216 Report an error if buffer allocation fails.
12217 (yyStackOverflow): New function.
12218 (yyinitStateSet, yyinitGLRStack): Return a boolean indicating whether
12219 the initialization was successful. It might fail if storage was
12220 exhausted.
12221 (yyexpandGLRStack): Add more checks for storage allocation failure.
12222 Use yyStackOverflow to report failures.
12223 (yymarkStackDeleted, yyglrShift, yyglrShiftDefer, yydoAction):
12224 (yysplitStack, yyprocessOneStack, yyparse, yypstack):
12225 Don't assume stack number fits in int.
12226 (yysplitStack): Check for storage allocation failure.
12227 (yysplitStack, yyprocessOneStack): Add pure_formals, so that we
12228 can print diagnostics on storage allocation failure. All callers
12229 changed.
12230 (yyresolveValue): Use yybool for boolean.
12231 (yyreportSyntaxError): Check for size-calculation overflow.
12232 This code is taken from yacc.c.
12233 (yyparse): Check for storage allocation errors when allocating
12234 the initial stack.
12235
12236 2005-07-05 Akim Demaille <akim@epita.fr>
12237
12238 Extract calc++ from the documentation.
12239 * doc/bison.texinfo (Calc++): Add the extraction marks.
12240 * examples/extexi: New, from the aborted GNU Programming 2E.
12241 Separate the different paragraph of a file with empty lines.
12242 * examples/Makefile: Use it to extract the whole calc++ example.
12243
12244 2005-06-24 Akim Demaille <akim@epita.fr>
12245
12246 * doc/bison.texinfo (C++ Parser Interface): Use defcv to define
12247 class typedefs.
12248
12249 2005-06-22 Akim Demaille <akim@epita.fr>
12250
12251 * doc/bison.texinfo (C++ Language Interface): First stab.
12252 (C++ Parsers): Remove.
12253
12254 2005-06-22 Akim Demaille <akim@epita.fr>
12255
12256 * data/lalr1.cc (yylex_): Honor %lex-param.
12257
12258 2005-06-22 Akim Demaille <akim@epita.fr>
12259
12260 Start a set of simple examples.
12261 * examples/calc++/Makefile, examples/calc++/calc++-driver.cc,
12262 * examples/calc++/calc++-driver.hh,
12263 * examples/calc++/calc++-parser.yy,
12264 * examples/calc++/calc++-scanner.ll, examples/calc++/calc++.cc,
12265 * examples/calc++/compile, examples/calc++/test: New.
12266
12267 2005-06-09 Paul Eggert <eggert@cs.ucla.edu>
12268
12269 * data/yacc.c (malloc, free) [defined __cplusplus]: Wrap inside
12270 extern "C" {}. This fixes a problem reported by Paul Hilfinger,
12271 which stems from the 2005-05-27 patch.
12272
12273 2005-06-06 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
12274
12275 * data/glr.c: Modify treatment of unused parameters to permit use
12276 of g++ (which doesn't allow __attribute__ ((unused)) for parameters).
12277
12278 2005-05-30 Paul Eggert <eggert@cs.ucla.edu>
12279
12280 Fix infringement on user name space reported by Janos Zoltan Szabo.
12281 * data/yacc.c (yyparse): strlen -> yystrlen.
12282
12283 2005-05-30 Akim Demaille <akim@epita.fr>
12284
12285 * data/lalr1.cc (_): New.
12286 Translate the various messages.
12287
12288 2005-05-27 Paul Eggert <eggert@cs.ucla.edu>
12289
12290 Fix infringement on user name space reported by Bruno Haible.
12291 * data/yacc.c (YYSIZE_T): Define first, so that later decls can use it.
12292 Prefer GCC's __SIZE_TYPE__ if available, so that we don't infringe on
12293 the user's name space.
12294 (alloca): Include <stdlib.h> to get it, if it's not built in.
12295 (YYMALLOC, YYFREE): Define only if needed.
12296 (malloc, free): Declare, but only if needed, as this infringes on
12297 the user name space.
12298
12299 2005-05-25 Paul Eggert <eggert@cs.ucla.edu>
12300
12301 Fix BeOS, FreeBSD, MacOS porting problems reported by Bruno Haible.
12302 * lib/bitset.c (bitset_print): Don't assume size_t can be printed
12303 with %d format.
12304 * lib/ebitset.c (min, max): Undef before defining.
12305 * lib/vbitset.c (min, max): Likewise.
12306 * lib/subpipe.c (create_subpipe): Save local variables in case
12307 vfork clobbers them.
12308
12309 2005-05-24 Bruno Haible <bruno@clisp.org>
12310
12311 * tests/synclines.at (AT_SYNCLINES_COMPILE): Add support for the
12312 error message syntax used by gcc-4.0.
12313
12314 2005-05-23 Paul Eggert <eggert@cs.ucla.edu>
12315
12316 * README: Mention m4 1.4.3. Remove obsolete advice about
12317 Sun Forte Developer 6 update 2, VMS, and MS-DOS.
12318
12319 * bootstrap: Remove workaround for problem I encountered with
12320 gettext 0.14.1; it seems to be fixed now.
12321
12322 2005-05-22 Paul Eggert <eggert@cs.ucla.edu>
12323
12324 * NEWS: Version 2.0a.
12325
12326 * src/files.c: Include "stdio-safer.h"; this fixes a typo in
12327 the previous change.
12328
12329 Various maintainer cleanups.
12330 * .cvsignore: Add a.exe, a.out, b.out,, conf[0-9]*, confdefs*,
12331 conftest*, for benefit of CVS commands run at the same time as
12332 "configure". Add build-aux, since "bootstrap" now creates it and
12333 its subfiles.
12334 * Makefile.cfg (move_if_change): Remove.
12335 * Makefile.maint: Remove the update stuff; we now use "bootstrap".
12336 (ftp-gnu, www-gnu, move_if_change, local_updates, update):
12337 (po_repo, do-po-update, po-update, wget_files, get-targets):
12338 (config.guess-url_prefix, config.sub-url_prefix):
12339 (ansi2knr.c-url_prefix, texinfo.tex-url_prefix):
12340 (standards.texi-url_prefix, make-stds.texi-url_prefix, taget, url):
12341 ($(get-targets), cvs-files, automake_repo, wget-update, cvs-update):
12342 Remove.
12343 * configure.ac (AC_CONFIG_AUX_DIR): Change from config to build-aux;
12344 this is now the recommended name.
12345 * config/.cvsignore: Remove config.guess, config.rpath, config.sub,
12346 depcomp, install-sh, mdate-sh, missing, mkinstalldirs, texinfo.tex,
12347 ylwrap. These files now go into build-aux.
12348 * config/move-if-change: Remove.
12349 * config/prev-version.txt: Bump from 1.75 to 2.0.
12350
12351 * bootstrap: Add stdio-safer, unistd-safer modules.
12352 Remove m4/glibc2.m4 (introduced by latest gnulib, but
12353 we don't need it).
12354 * lib/.cvsignore: Add dup-safer.c, fd-safer.c,
12355 fopen-safer.c, stdio-safer.h, unistd-safer.h.
12356 * lib/subpipe.c: Include "unistd-safer.h".
12357 (create_subpipe): Make sure all the newly-created
12358 file descriptors are > 2, so that diagnostics don't
12359 get sent down them (which might cause Bison to hang, in theory).
12360 * m4/.cvsignore: Add stdio-safer.m4, unistd-safer.m4.
12361 * src/files.c (xfopen): Use fopen_safer, not fopen.
12362
12363 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Port
12364 yesterday's yacc.c fix.
12365
12366 2005-05-21 Paul Eggert <eggert@cs.ucla.edu>
12367
12368 * data/glr.c, data/lalr1.cc: Update copyright date.
12369
12370 Fix a destructor bug reported by Wolfgang Spraul in
12371 <http://lists.gnu.org/archive/html/bug-bison/2005-05/msg00042.html>.
12372 * data/yacc.c (yyabortlab): Don't call destructor, and
12373 don't set yychar to EMPTY.
12374 (yyoverflowlab): Don't call destructor.
12375 (yyreturn): Call destructor, if yychar is neither YYEOF nor YYEMPTY.
12376 * tests/calc.at (AT_CHECK_CALC): Expect one fewer output lines,
12377 since we no longer output the message "discarding lookahead token
12378 end of input ()".
12379
12380 2005-05-20 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
12381
12382 * data/glr.c (YY_SYMBOL_PRINT): Don't print newline at end to
12383 fix a small glitch in debugging output.
12384 (yyprocessOneStack, yyrecoverSyntaxError, yyparse): Print newline
12385 after YY_SYMBOL_PRINT where needed.
12386
12387 (struct yyGLRState): Add some comments.
12388 (struct yySemanticOption): Add some comments.
12389 (union yyGLRStackItem): Add comment.
12390
12391 (yymergeOptionSets): Correct this to properly perform the union,
12392 avoiding infinite reported by Michael Rosien.
12393 Update comment.
12394
12395 * tests/glr-regression.at: Add test for GLR merging error reported
12396 by M. Rosien.
12397
12398 2005-05-13 Paul Eggert <eggert@cs.ucla.edu>
12399
12400 * COPYING, ChangeLog, GNUmakefile, HACKING, Makefile.am,
12401 Makefile.cfg, Makefile.maint, NEWS, README, README-alpha,
12402 README-cvs, TODO, bootstrap, configure.ac, data/Makefile.am,
12403 data/README, data/c.m4, data/glr.c, data/lalr1.cc, data/yacc.c,
12404 data/m4sugar/m4sugar.m4, doc/Makefile.am, doc/bison.texinfo,
12405 doc/fdl.texi, doc/gpl.texi, doc/refcard.tex, lib/Makefile.am,
12406 lib/abitset.c, lib/abitset.h, lib/bbitset.h, lib/bitset.c,
12407 lib/bitset.h, lib/bitset_stats.c, lib/bitset_stats.h,
12408 lib/bitsetv-print.c, lib/bitsetv-print.h, lib/bitsetv.c,
12409 lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/get-errno.c,
12410 lib/get-errno.h, lib/lbitset.c, lib/lbitset.h, lib/libiberty.h,
12411 lib/main.c, lib/subpipe.c, lib/subpipe.h, lib/timevar.c,
12412 lib/timevar.def, lib/timevar.h, lib/vbitset.c, lib/vbitset.h,
12413 lib/yyerror.c, m4/cxx.m4, m4/m4.m4, m4/subpipe.m4, m4/timevar.m4,
12414 m4/warning.m4, src/LR0.c, src/LR0.h, src/Makefile.am, src/assoc.c,
12415 src/assoc.h, src/closure.c, src/closure.h, src/complain.c,
12416 src/complain.h, src/conflicts.c, src/conflicts.h, src/derives.c,
12417 src/derives.h, src/files.c, src/files.h, src/getargs.c,
12418 src/getargs.h, src/gram.c, src/gram.h, src/lalr.c, src/lalr.h,
12419 src/location.c, src/location.h, src/main.c, src/muscle_tab.c,
12420 src/muscle_tab.h, src/nullable.c, src/nullable.h, src/output.c,
12421 src/output.h, src/parse-gram.c, src/parse-gram.h,
12422 src/parse-gram.y, src/print.c, src/print.h, src/print_graph.c,
12423 src/print_graph.h, src/reader.c, src/reader.h, src/reduce.c,
12424 src/reduce.h, src/relation.c, src/relation.h, src/scan-gram.l,
12425 src/scan-skel.l, src/state.c, src/state.h, src/symlist.c,
12426 src/symlist.h, src/symtab.c, src/symtab.h, src/system.h,
12427 src/tables.c, src/tables.h, src/uniqstr.c, src/uniqstr.h,
12428 src/vcg.c, src/vcg.h, src/vcg_defaults.h, tests/Makefile.am,
12429 tests/actions.at, tests/c++.at, tests/calc.at, tests/conflicts.at,
12430 tests/cxx-type.at, tests/existing.at, tests/glr-regression.at,
12431 tests/headers.at, tests/input.at, tests/local.at, tests/output.at,
12432 tests/reduce.at, tests/regression.at, tests/sets.at,
12433 tests/synclines.at, tests/testsuite.at, tests/torture.at:
12434 Update FSF postal mail address.
12435
12436 2005-05-11 Paul Eggert <eggert@cs.ucla.edu>
12437
12438 * tests/local.at (AT_COMPILE_CXX): Treat LDFLAGS like AT_COMPILE does.
12439 Problem reported by Ralf Menzel.
12440
12441 2005-05-01 Paul Eggert <eggert@cs.ucla.edu>
12442
12443 * tests/actions.at: Test that stack overflow invokes destructors.
12444 From Marcus Holland-Moritz.
12445 * data/yacc.c (yyerrlab): Move the code that destroys the stack
12446 from here....
12447 (yyreturn): to here. That way, destructors are called properly
12448 even if the stack overflows, or the user calls YYACCEPT or
12449 YYABORT. Stack-overflow problem reported by Marcus Holland-Moritz.
12450 (yyoverflowlab): Destroy the lookahead.
12451
12452 2005-04-24 Paul Eggert <eggert@cs.ucla.edu>
12453
12454 * data/yacc.c (YYSTACK_ALLOC_MAXIMUM): Add more-descriptive comment.
12455
12456 2005-04-17 Paul Eggert <eggert@cs.ucla.edu>
12457
12458 * NEWS: Bison-generated C parsers no longer quote literal strings
12459 associated with tokens.
12460 * src/output.c (prepare_symbols): Don't escape strings,
12461 since users don't want to see C escapes.
12462 * tests/calc.at (AT_CHECK_CALC): Adjust to lack of quotes
12463 in diagnostics.
12464 * tests/input.at (Torturing the Scanner): Likewise.
12465 * tests/regression.at (Token definitions, Web2c Actions): Likewise.
12466
12467 2005-04-16 Paul Eggert <eggert@cs.ucla.edu>
12468
12469 * tests/torture.at (AT_INCREASE_DATA_SIZE): Skip the test if
12470 the data size is known to be too small and we can't increase it.
12471 This works around an HP-UX 11.00 glitch reported by Andrew Benham.
12472
12473 2005-04-15 Paul Eggert <eggert@cs.ucla.edu>
12474
12475 * src/parse-gram.y: Include quotearg.h.
12476 (string_as_id): Quote $1 before using it as a key, since the
12477 lexer no longer quotes it for us.
12478 (string_content): Don't strip quotes, since lexer no longer
12479 quotes it for us.
12480 * src/scan-gram.l: Include quotearg.h.
12481 ("\""): Omit quote.
12482 ("'"<SC_ESCAPED_CHARACTER>): Quote symbol before using it as
12483 a key, since the rest of the lexer doesn't quote it.
12484 * src/symtab.c (symbol_get): Don't quote symbol; caller does it now.
12485 * tests/regression.at (Token definitions): Check for backslashes
12486 in token strings.
12487
12488 * data/yacc.c (YYSTACK_ALLOC_MAXIMUM): New macro.
12489 (YYSIZE_T): Define to unsigned long int when using an older compiler.
12490 (yyparse): Revamp code to generate long syntax error message, to
12491 make it easier to translate, and to avoid problems with arithmetic
12492 overflow. Change "virtual memory" to "memory" in diagnostic, since
12493 we don't know whether the memory is virtual.
12494
12495 2005-04-13 Paul Eggert <eggert@cs.ucla.edu>
12496
12497 * NEWS: Bison-generated C parsers now use the _ macro to
12498 translate strings.
12499 * data/yacc.c (_) [!defined _]: New macro.
12500 All English strings wrapped inside this macro.
12501 * doc/bison.texinfo (Bison Parser): Document _.
12502 * po/POTFILES.in: Include src/parse-gram.c, since it now
12503 includes translateable strings that parse-gram.y doesn't.
12504
12505 2005-04-12 Paul Eggert <eggert@cs.ucla.edu>
12506
12507 * src/symtab.c (symbol_make_alias): Call symbol_type_set,
12508 reverting the 2004-10-11 change to this function.
12509 (symbol_check_alias_consistency): Don't call symbol_type_set
12510 if the type name is already correct.
12511 * tests/input.at (Typed symbol aliases): New test, from Tim Van Holder.
12512
12513 2005-03-25 Paul Eggert <eggert@cs.ucla.edu>
12514
12515 * tests/regression.at (Token definitions): Don't use a token named
12516 c, as that generates a "#define c ..." that runs afoul of buggy
12517 stdlib.h that uses the identifier c as a member of struct
12518 drand48_data. Problem reported by Horst Wente.
12519
12520 2005-03-21 Paul Eggert <eggert@cs.ucla.edu>
12521
12522 * bootstrap: Change translation URL from
12523 http://www2.iro.umontreal.ca/~gnutra/po/maint/bison/ to
12524 http://www.iro.umontreal.ca/translation/maint/bison/ to avoid
12525 redirection glitches. Problem reported by twlevo@xs4all.nl.
12526
12527 2005-03-20 Paul Eggert <eggert@cs.ucla.edu>
12528
12529 * tests/local.at (AT_COMPILE, AT_COMPILE_CXX): Don't put options
12530 after operands; POSIX says this isn't portable for the c99 command.
12531
12532 2005-03-18 Paul Eggert <eggert@cs.ucla.edu>
12533
12534 * tests/glr-regression.at (glr-regr2a.y): Try to dump core
12535 immediately if a data overrun has occurred; this may help us track
12536 down what may be a spurious failure on MacOS.
12537
12538 2005-03-17 Paul Eggert <eggert@cs.ucla.edu>
12539
12540 Respond to problems reported by twlevo@xs4all.nl.
12541
12542 * bootstrap: Use "trap - 0" rather than the unportable "trap 0".
12543
12544 * src/vcg.h: Comment fix.
12545 * src/vcg_defaults.h: Parenthesize macro bodies to make them safe.
12546 (G_CMAX): Change to -1 instead of INT_MAX.
12547
12548 * data/yacc.c (yyparse): Omit spaces before #line.
12549
12550 2005-03-15 Paul Eggert <eggert@cs.ucla.edu>
12551
12552 * src/tables.c (state_number_to_vector_number): Put it inside an
12553 "#if 0", since it's not currently used. Problem reported by
12554 Roland McGrath.
12555
12556 2005-03-06 Paul Eggert <eggert@cs.ucla.edu>
12557
12558 * src/output.c (escaped_output): Renamed from
12559 escaped_file_name_output, since we now use it for symbol tags as
12560 well. All uses changed.
12561 (symbol_destructors_output, symbol_printers_output):
12562 Escape symbol tags too.
12563 Problem reported by Matyas Forstner in
12564 <http://lists.gnu.org/archive/html/bug-bison/2005-03/msg00009.html>.
12565
12566 * src/muscle_tab.c (muscle_code_grow): Don't quote numbers; it's
12567 not needed.
12568 * src/output.c (user_actions_output, token_definitions_output,
12569 symbol_destructors_output, symbol_printers_output): Likewise.
12570 * src/reader.c (prologue_augment): Likewise.
12571 * src/scan-gram.l (handle_action_dollar, handle_action_at): Likewise.
12572
12573 * src/vcg.c (output_edge): Don't quote linestyle arg.
12574 Problem reported by twlevo@xs4all.nl.
12575
12576 2005-02-28 Paul Eggert <eggert@cs.ucla.edu>
12577
12578 * doc/bison.texinfo (Semantic Tokens): Fix scoping problem in
12579 example, reported by Derek M Jones. Also, make the example even
12580 more outrageous, to better illustrate how bad the problem is.
12581
12582 2005-02-24 Paul Eggert <eggert@cs.ucla.edu>
12583
12584 * doc/bison.texinfo (Mfcalc Symtab): Correct the prototype for
12585 putsym. Typo reported by Sebastian Piping.
12586
12587 2005-02-23 Paul Eggert <eggert@cs.ucla.edu>
12588
12589 * doc/bison.texinfo (Language and Grammar): some -> same
12590 (Epilogue): int he -> in the
12591 Typos reported by Sebastian Piping via Justin Pence.
12592
12593 2005-02-07 Paul Eggert <eggert@cs.ucla.edu>
12594
12595 * tests/glr-regression.at (Improper handling of embedded actions
12596 and dollar(-N) in GLR parsers): Renamed from "Improper handling of
12597 embedded actions and $-N in GLR parsers", work around an Autoconf bug
12598 with dollar signs in test names.
12599 * tests/input.at (Invalid dollar-n): Renamed from "Invalid \$n",
12600 for a similar reason.
12601
12602 2005-01-28 Paul Eggert <eggert@cs.ucla.edu>
12603
12604 * src/vcg.c (output_graph): G_VIEW -> normal_view in case someone
12605 wants to redefine G_VIEW.
12606
12607 2005-01-27 Paul Eggert <eggert@cs.ucla.edu>
12608
12609 * src/vcg.c (get_view_str): Remove case for normal_view.
12610 Problem reported by twlevo@xs4all.nl.
12611
12612 2005-01-24 Paul Eggert <eggert@cs.ucla.edu>
12613
12614 * configure.ac (O0CFLAGS, O0CXXFLAGS): Fix quoting bug.
12615 Problem reported by twlevo@xs4all.nl.
12616
12617 * doc/bison.texinfo: Change @dircategory from "GNU programming
12618 tools" to "Software development". Requested by Richard Stallman
12619 via Karl Berry.
12620
12621 2005-01-23 Paul Eggert <eggert@cs.ucla.edu>
12622
12623 * tests/c++.at (AT_CHECK_DOXYGEN): Don't use options after operands.
12624 Problem reported by twlevo@xs4all.nl.
12625
12626 2005-01-21 Paul Eggert <eggert@cs.ucla.edu>
12627
12628 * data/yacc.c (YYCOPY, yystpcpy, yyparse): Remove "register"
12629 keyword; it's not needed with modern compilers, and it doesn't
12630 affect correctness with older compilers. Suggested by
12631 twlevo@xs4all.nl.
12632
12633 2005-01-17 Paul Eggert <eggert@cs.ucla.edu>
12634
12635 * data/glr.c (yyuserAction): Add "default: break;" case to pacify
12636 gcc -Wswitch-default.
12637 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
12638 * data/yacc.c (yyparse): Likewise.
12639
12640 2005-01-12 Paul Eggert <eggert@cs.ucla.edu>
12641
12642 * src/system.h (OUTPUT_EXT, TAB_EXT): Define only if not defined
12643 already. Let config.h define any nonstandard values.
12644
12645 2005-01-10 Paul Eggert <eggert@cs.ucla.edu>
12646
12647 * tests/calc.at (_AT_DATA_CALC_Y): Use alarm (100), not alarm (10),
12648 for the benefit of slower hosts. Problem reported by
12649 Nelson H. F. Beebe.
12650
12651 2005-01-07 Paul Eggert <eggert@cs.ucla.edu>
12652
12653 * data/yacc.c (yyparse): Pacify non-GCC compilers about yyerrorlab
12654 being defined and not used.
12655 * data/lalr1.cc (yyparse): Likewise.
12656 Use "if (false)" rather than "if (0)".
12657
12658 2005-01-05 Paul Eggert <eggert@cs.ucla.edu>
12659
12660 * TODO: Mention that we should allow NUL bytes in tokens.
12661
12662 2005-01-02 Paul Eggert <eggert@cs.ucla.edu>
12663
12664 * src/scan-skel.l (<<EOF>>): Don't close standard output.
12665 Problem reported by Hans Aberg.
12666
12667 2005-01-01 Paul Eggert <eggert@cs.ucla.edu>
12668
12669 * src/getargs.c (version): Happy new year; update overall
12670 program copyright date from 2004 to 2005.
12671
12672 * src/scan-skel.l ("@output ".*\n): Don't close standard output.
12673 Problem reported by Hans Aberg.
12674 * tests/output.at (AT_CHECK_OUTPUT): New arg SHELLIO.
12675 (Output file names.): Add a test for the case when standard output
12676 is closed.
12677
12678 2004-12-26 Paul Eggert <eggert@cs.ucla.edu>
12679
12680 * doc/bison.texinfo (@copying): Update FDL version number to 1.2,
12681 to fix an oversight in the Bison 2.0 manual.
12682
12683 2004-12-25 Paul Eggert <eggert@cs.ucla.edu>
12684
12685 * NEWS: Version 2.0. Reformat the existing news items since
12686 1.875, so that related items are grouped together.
12687 * configure.ac (AC_INIT): Bump version to 2.0.
12688 * src/parse-gram.c, src/parse-gram.h: Regenerate with 2.0.
12689
12690 * tests/torture.at (Exploding the Stack Size with Alloca): Set
12691 YYSTACK_USE_ALLOCA to 1 if __GNUC__ or alloca are defined;
12692 otherwise, we're not testing alloca. Unfortunately there's no
12693 simple way to consult HAVE_ALLOCA here.
12694
12695 * data/lalr1.cc (yydestruct_): Pacify unused variable warning
12696 for yymsg, too.
12697
12698 * src/LR0.c (new_itemsets): Use memset rather than zeroing by
12699 hand. This avoids a warning about comparing int to size_t when
12700 GCC warnings are enabled.
12701
12702 2004-12-22 Paul Eggert <eggert@cs.ucla.edu>
12703
12704 * NEWS: Bison-generated parsers no longer default to using the
12705 alloca function (when available) to extend the parser stack, due
12706 to widespread problems in unchecked stack-overflow detection.
12707 * data/glr.c (YYMAXDEPTH): Remove undef when zero. It's the user's
12708 responsibility to set it to a positive value. This lets the user
12709 specify a value that is not a preprocessor constant.
12710 * data/yacc.c (YYMAXDEPTH): Likewise.
12711 (YYSTACK_ALLOC): Define only if YYSTACK_USE_ALLOCA is nonzero.
12712 * doc/bison.texinfo (Stack Overflow): YYMAXDEPTH no longer needs
12713 to be a compile-time constant. However, explain the constraints on it.
12714 Also, explain the constraints on YYINITDEPTH.
12715 (Table of Symbols): Explain that alloca is no longer the default.
12716 Explain the user's responsibility if they define YYSTACK_USE_ALLOCA
12717 to 1.
12718
12719 * doc/bison.texinfo (Location Default Action): Mention that n must
12720 be zero when k is zero. Suggested by Frank Heckenbach.
12721
12722 2004-12-22 Akim Demaille <akim@epita.fr>
12723
12724 * data/lalr1.cc (parser::token_number_type, parser::rhs_number_type)
12725 (parser::state_type, parser::semantic_type, parser::location_type):
12726 Private, not public.
12727 (parser::parse): Return ints, not bool.
12728 Returning a bool introduces a problem: 0 corresponds to false, and
12729 it seems weird to return false on success. Returning true changes
12730 the conventions for yyparse.
12731 Alternatively we could return void and send an exception.
12732 There is no clear consensus (yet?).
12733 (state_stack, semantic_stack, location_stack): Rename as...
12734 (state_stack_type, semantic_stack_type, location_stack_type): these.
12735 Private, not public.
12736 * tests/c++.at: New.
12737 * tests/testsuite.at, tests/Makefile.am: Adjust.
12738
12739 2004-12-21 Akim Demaille <akim@epita.fr>
12740
12741 * data/lalr1.cc (parser::parse): Return a bool instead of an int.
12742
12743 2004-12-21 Akim Demaille <akim@epita.fr>
12744
12745 Don't impose std::string for filenames.
12746
12747 * data/lalr1.cc (b4_filename_type): New.
12748 (position::filename): Use it.
12749 (parser.hh): Move the inclusion of stack.hh and location.hh below
12750 the user code, so that needed headers for the filename type can be
12751 included first.
12752 Forward declare them before the user code.
12753 * tests/Makefile.am (check-local, installcheck-local): Pass
12754 TESTSUITEFLAGS to the TESTSUITE.
12755
12756 2004-12-20 Akim Demaille <akim@epita.fr>
12757
12758 Use more STL like names: my_class instead of MyClass.
12759
12760 * data/lalr1.cc (LocationStack, LocationType, RhsNumberType)
12761 (SemanticStack, SemanticType, StateStack, StateType)
12762 (TokenNumberType, Stack, Slice, Traits, Parser::location)
12763 (Parser::value): Rename as...
12764 (location_stack, location_type, rhs_number_type, semantic_stack)
12765 (semantic_type, state_stack, state_type, token_number_type, stack)
12766 (slice, traits, parser::yylloc, parser::yylval): these.
12767
12768 * tests/calc.at, tests/regression.at, tests/actions.at: Adjust.
12769
12770 2004-12-19 Paul Eggert <eggert@cs.ucla.edu>
12771
12772 * data/glr.c (YYLLOC_DEFAULT): Use GNU spacing conventions.
12773 * data/yacc.c (YYLLOC_DEFAULT): Likewise.
12774
12775 2004-12-17 Paul Eggert <eggert@cs.ucla.edu>
12776
12777 Remove uses of 'short int' and 'unsigned short int'. This raises
12778 some arbitrary limits. It uses more memory but nowadays that's
12779 not much of an issue.
12780
12781 This change does not affect the generated parsers; that's a different
12782 task, as some users will want to conserve memory there.
12783
12784 Ideally we should use size_t to represent all object counts, and
12785 something like ptrdiff_t to represent signed differences of object
12786 counts; but that will require more code-cleanup than I have the
12787 time to do right now.
12788
12789 * src/LR0.c (allocate_itemsets, new_itemsets, save_reductions):
12790 Use size_t, not int or short int, to count objects.
12791 * src/closure.c (nritemset, closure): Likewise.
12792 * src/closure.h (nritemset, closure): Likewise.
12793 * src/nullable.c (nullable_compute): Likewise.
12794 * src/print.c (print_core): Likewise.
12795 * src/print_graph.c (print_core): Likewise.
12796 * src/state.c (state_compare, state_hash): Likewise.
12797 * src/state.h (struct state): Likewise.
12798 * src/tables.c (default_goto, goto_actions): Likewise.
12799
12800 * src/gram.h (rule_number, rule): Use int, not short int.
12801 * src/output.c (prepare_rules): Likewise.
12802 * src/state.h (state_number, STATE_NUMBER_MAXIMUM, transitions,
12803 errs, reductions): Likewise.
12804 * src/symtab.h (symbol_number, SYMBOL_NUMBER_MAXIMUM, struct symbol):
12805 Likewise.
12806 * src/tables.c (vector_number, tally, action_number,
12807 ACTION_NUMBER_MINIMUM): Likewise.
12808 * src/output.c (muscle_insert_short_int_table): Remove.
12809
12810 2004-12-17 Akim Demaille <akim@epita.fr>
12811
12812 * data/lalr1.cc: Extensive Doxygenation.
12813 (error_): Rename as...
12814 (error): this, since it is visible to the user.
12815 Adjust callers.
12816 (Parser::message): Now an automatic variable from...
12817 (Parser::yyreport_syntax_error_): here.
12818 * tests/actions.at, tests/calc.at, tests/regression.at: Adjust to
12819 Parser::error.
12820 * tests/input.at: Escape $.
12821
12822 2004-12-16 Paul Eggert <eggert@cs.ucla.edu>
12823
12824 * data/glr.c (b4_lhs_value, b4_rhs_value, b4_rhs-location):
12825 Parenthesize rhs to avoid obscure problems with mistakes like
12826 "foo$$bar = foo$1bar;". Problem reported by twlevo at xs4all.
12827 * data/lalr1.cc (b4_lhs_value, b4_rhs_value, b4_lhs_location,
12828 b4_rhs_location): Likewise.
12829 * data/yacc.c (b4_lhs_value, b4_rhs_value, b4_lhs_location,
12830 b4_rhs_location): Likewise.
12831
12832 2004-12-16 Akim Demaille <akim@epita.fr>
12833
12834 * data/lalr1.cc (yyreport_syntax_error_): Catch up with glr.c and
12835 yacc.c: be sure to stay within yycheck_.
12836 * tests/actions.at: Re-enable C++ tests.
12837
12838 2004-12-16 Akim Demaille <akim@epita.fr>
12839
12840 * src/print_graph.c (print_graph): Remove layoutalgorithm uses for
12841 real.
12842
12843 2004-12-16 Akim Demaille <akim@epita.fr>
12844
12845 Use #define to handle the %name-prefix.
12846
12847 * data/glr.c, data/yacc.c: Comment changes.
12848 * data/lalr1.cc (yylex): Use #define to select the name of yylex,
12849 so that one can refer to yylex in the parser file, and have it
12850 renamed, as is the case with other skeletons.
12851
12852 2004-12-16 Akim Demaille <akim@epita.fr>
12853
12854 Move lalr1.cc internals into yy*.
12855
12856 * data/lalr1.cc (semantic_stack_, location_stack_, state_stack_)
12857 (semantic_stack_, location_stack_, pact_, pact_ninf_, defact_)
12858 (pgoto_, defgoto_, table_, table_ninf_, check_, stos_, r1_, r2_)
12859 (name_, rhs_, prhs_, rline_, token_number_, eof_, last_, nnts_)
12860 (empty_, final_, terror_, errcode_, ntokens_)
12861 (user_token_number_max_, undef_token_, n_, len_, state_, nerrs_)
12862 (looka_, ilooka_, error_range_, nerrs_):
12863 Rename as...
12864 (yysemantic_stack_, yylocation_stack_, yystate_stack_)
12865 (yysemantic_stack_, yylocation_stack_, yypact_, yypact_ninf_)
12866 (yydefact_, yypgoto_, yydefgoto_, yytable_, yytable_ninf_)
12867 (yycheck_, yystos_, yyr1_, yyr2_, yyname_, yyrhs_, yyprhs_)
12868 (yyrline_, yytoken_number_, yyeof_, yylast_, yynnts_, yyempty_)
12869 (yyfinal_, yyterror_, yyerrcode_, yyntokens_)
12870 (yyuser_token_number_max_, yyundef_token_, yyn_, yylen_, yystate_)
12871 (yynerrs_, yylooka_, yyilooka_, yyerror_range_, yynerrs_):
12872 these.
12873
12874 2004-12-15 Paul Eggert <eggert@cs.ucla.edu>
12875
12876 Fix some problems reported by twlevo at xs4all.
12877 * src/symtab.c (symbol_new): Report an error if the input grammar
12878 contains too many symbols. This is better than calling abort() later.
12879 * src/vcg.h (enum layoutalgorithm): Remove. All uses removed.
12880 (struct node, struct graph):
12881 Rename member expand to stretch. All uses changed.
12882 (struct graph): Remove member layoutalgorithm. All uses removed.
12883 * src/vcg.c (get_layoutalgorithm_str): Remove. All uses removed.
12884 * src/vcg_defaults.h (G_STRETCH): Renamed from G_EXPAND.
12885 All uses changed.
12886 (N_STRETCH): Rename from N_EXPAND. All uses changed.
12887
12888 2004-12-15 Akim Demaille <akim@epita.fr>
12889
12890 * data/lalr1.cc: Normalize /** \brief ... */ to ///.
12891 Add more Doxygen comments.
12892 (symprint_, stack_print_, reduce_print_, destruct_, pop)
12893 (report_syntax_error_, translate_): Rename as...
12894 (yysymprint_, yystack_print_, yyreduce_print_, yydestruct_)
12895 (yypop_, yyreport_syntax_error_, yytranslate_): this.
12896
12897 2004-12-15 Akim Demaille <akim@epita.fr>
12898
12899 * data/lalr1.cc (lex_): Rename as...
12900 (yylex_): this.
12901 Move the trace here.
12902 Take the %name-prefix into account.
12903 Reported by Alexandre Duret-Lutz.
12904
12905 2004-12-15 Akim Demaille <akim@epita.fr>
12906
12907 Simplify the C++ parser constructor.
12908
12909 * data/lalr1.cc (debug_): Rename as...
12910 (yydebug_): so that the parser's internals are always in the yy*
12911 pseudo namespace.
12912 Adjust uses.
12913 (b4_parse_param_decl): Remove the leading comma as it is now only
12914 called as unique argument list.
12915 (Parser::Parser): Remove the constructor accepting a location and
12916 an initial debugging level.
12917 Remove from the other ctor the argument for the debugging level.
12918 (debug_level_type, debug_level, set_debug_level): New.
12919
12920 * tests/actions.at, tests/calc.at, tests/regression.at: Adjust
12921 constructor calls.
12922
12923 2004-12-15 Akim Demaille <akim@epita.fr>
12924
12925 Remove b4_root related material: failure experiment
12926 (which goal was to allow to derive from a class).
12927
12928 * data/lalr1.cc (b4_root, b4_param, b4_constructor): Remove
12929 definitions and uses.
12930
12931 2004-12-14 Paul Eggert <eggert@cs.ucla.edu>
12932
12933 * data/glr.c (struct yyGLRStack): yyerror_range now has 3 items,
12934 not 2, since it's not portable to subtract 1 from the start of an
12935 array. The new item 0 is never set or used. All uses changed.
12936
12937 (yyrecoverSyntaxError): Use YYLLOC_DEFAULT instead of assuming
12938 the default definition of YYLLOC_DEFAULT. Problem reported
12939 by Frank Heckenbach.
12940
12941 2004-12-12 Paul Eggert <eggert@cs.ucla.edu>
12942
12943 * data/glr.c (YYRHSLOC): Don't have two definitions, one for
12944 the normal case and one for the error case. Just use the
12945 first one uniformly. Problem reported by Frank Heckenbach.
12946 (YYLLOC_DEFAULT): Use the conventions of yacc.c, so we can
12947 use exactly the same macro in both places.
12948 (yyerror_range): Now of type yyGLRStackItem, not YYLTYPE,
12949 so that the normal-case YYRHSLOC works for the error case too.
12950 All uses changed.
12951 * data/yacc.c (YYRHSLOC): New macro, taken from glr.c.
12952 (YYLLOC_DEFAULT): Use the same macro as glr.c.
12953 * doc/bison.texinfo (Location Default Action): Don't claim that
12954 we have an array of locations. Use the same macro for both glr
12955 and lalr parsers. Mention YYRHSLOC. Mention what happens when
12956 the index is 0.
12957
12958 2004-12-10 Paul Eggert <eggert@cs.ucla.edu>
12959
12960 * HACKING: Update email addresses to send announcements to.
12961
12962 * configure.ac (AC_INIT): Bump version to 1.875f.
12963
12964 2004-12-10 Paul Eggert <eggert@cs.ucla.edu>
12965
12966 * NEWS: Version 1.875e.
12967 * src/parse-gram.c, src/parse-gram.h: Regenerate with 1.875e.
12968
12969 * src/scan-skel.l: Include "complain.h", for "fatal".
12970
12971 * src/relation.h (relation_print, relation_digraph):
12972 Relation sizes are of type relation_node, not size_t (this is
12973 merely a doc fix, since the two types are equivalent).
12974 (relation_transpose): Relation sizes are of type relation_node,
12975 not int.
12976 * src/relation.c: Likewise.
12977 (top, infinity): Now of type relation_node, not int.
12978 (traverse, relation_transpose): Use relation_node, not int.
12979
12980 * data/glr.c (yyuserAction, yyrecoverSyntaxError): Mark args
12981 with ATTRIBUTE_UNUSED if they're not used, to avoid GCC warning.
12982 (yyparse): Remove unused local introduced in 2004-10-25 patch.
12983
12984 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): New arg
12985 specifying whether the test should be skipped. Use it tp
12986 specify that the [%defines %skeleton "lalr1.cc"] tests currently
12987 fail on some hosts, and should be skipped.
12988
12989 2004-12-08 Paul Eggert <eggert@cs.ucla.edu>
12990
12991 * src/system.h (CALLOC, MALLOC, REALLOC): Remove. All callers
12992 changed to use xcalloc, xnmalloc, xnrealloc, respectively,
12993 unless otherwise specified below.
12994
12995 * src/LR0.c (allocate_itemsets): Use xnmalloc, not xcalloc,
12996 to allocate kernel_base, kernel_items, kernel_size, since
12997 they needn't be initialized to 0.
12998 (allocate_storgae): Likewise, for shiftset, redset, shift_symbol.
12999 * src/closure.c (new_closure): Likewise, for itemset.
13000 * src/derives.c (derives_compute): Likewise, for delts, derives, q.
13001 * src/lalr.c (set_goto_map): Likewise, for temp_map.
13002 (initialize_F): Likewise, for reads, edge, reads[i], includes[i].
13003 (build_relations): Likewise for edge, states1, includes.
13004 * src/nullable.c (nullable_compute): Likewise, for squeue, relts.
13005 * src/reader.c (packgram): Likewise, for ritem, rules.
13006 * src/reduce.c (nonterminals_reduce): Likewise for nontermmap.
13007 * src/relation.c (relation_digraph): Likewise for VERTICES.
13008 (relation_transpose): Likewise for new_R, end_R.
13009 * src/symtab.c (symbols_token_translations_init): Likewise for
13010 token_translations.
13011 * src/tables.c (save_row): Likewise for froms, tos, conflict_tos.
13012 (token_actions): Likewise for yydefact, actrow, conflrow,
13013 conflict_list.
13014 (save_column): Likewise for froms[symno], tos[symno].
13015 (goto_actions): Likewise for state_count.
13016 (pack_table): Likewise for base, pos, check.
13017 (tables_generate): Likewise for width.
13018
13019 * src/LR0.c (set_states): Don't reuse kernel_size and kernel_base
13020 for initial core. Just have a separate core, so we needn't worry
13021 about whether kernel_size and kernel_base are initialized.
13022
13023 * src/LR0.c (shift_symbol, redset, shiftset, kernel_base,
13024 kernel_size, kernel_items): Remove unnecessary initialization.
13025 * src/conflicts.c (conflicts): Likewise.
13026 * src/derives.c (derives): Likewise.
13027 * src/muscle_tablc (muscle_insert): Likewise.
13028 * src/relation.c (relation_digraph): Likewise.
13029 * src/tables.c (froms, tos, conflict_tos, tally, width, actrow, order,
13030 conflrow, conflict_table, conflict_list, table, check):
13031 Likewise.
13032
13033 * src/closure.c (new_closure): Arg is of type unsigned int, not int.
13034 This is because all callers pass unsigned int.
13035 * src/closure.h (new_closure): Likewise.
13036
13037 * src/lalr.c (initialize_F): Initialize reads[i] in all cases.
13038 (build_relations): Initialize includes[i] in all cases.
13039 * src/reader.c (packgram): Always initialize rules[ruleno].prec
13040 and rules[ruleno].precsym. Initialize members in order.
13041 * src/relation.c (relation_transpose): Always initialize new_R[i]
13042 and end_R[i].
13043 * src/table.c (conflict_row): Initialize 0 at end of conflict_list.
13044
13045 * src/output.c (prepare_actions): Pass 0 instead of conflict_list[0];
13046 conflict_list[0] was always 0, but now it isn't initialized.
13047
13048 * src/table.c (table_grow): When conflict_table grew, the grown
13049 area wasn't cleared. Fix this.
13050
13051 * lib/.cvsignore: Add strdup.c, strdup.h.
13052 * m4/.cvsignore: Add strdup.m4.
13053
13054 2004-12-07 Paul Eggert <eggert@cs.ucla.edu>
13055
13056 * src/lalr.h (GOTO_NUMBER_MAXIMUM): New macro.
13057 * src/lalr.c (set_goto_map): Don't allow ngotos to equal
13058 GOTO_NUMBER_MAXIMUM, since we occasionally compute
13059 ngotos + 1 without checking for overflow.
13060 (build_relations): Use END_NODE, not -1, to denote end of edges.
13061 * src/lalr.c (set_goto_map, map_goto, initialize_F, add_loopback_edge,
13062 build_relations): Use goto_number, not int, for goto numbers.
13063 * src/tables.c (save_column, default_goto): Likewise.
13064
13065 2004-11-23 Akim Demaille <akim@epita.fr>
13066
13067 * data/lalr1.cc (YYSTYPE): Define it as is done for C, instead
13068 of #defining from yystype.
13069 Don't typedef yystype, C++ does not need it.
13070 This lets it possible to forward declare it as union.
13071
13072 2004-11-23 Paul Eggert <eggert@cs.ucla.edu>
13073
13074 * bootstrap (gnulib_modules): Add extensions.
13075 Problem reported by Jim Meyering.
13076
13077 2004-11-22 Paul Eggert <eggert@cs.ucla.edu>
13078
13079 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c,
13080 src/lalr.c, src/nullable.c, src/relation.c, src/scan-skel.l,
13081 src/system.h, src/tables.c: XFREE -> free, to accommodate
13082 recent change to gnulib xalloc.h.
13083 Problem reported by Jim Meyering.
13084
13085 2004-11-17 Akim Demaille <akim@epita.fr>
13086
13087 * data/lalr1.cc (symprint_): Use cdebug_ to avoid warnings.
13088
13089 2004-11-17 Akim Demaille <akim@epita.fr>,
13090 Alexandre Duret-Lutz <adl@gnu.org>
13091
13092 * data/lalr1.cc (Parser::yycdebug_): New, a pointer, to allow
13093 changes.
13094 (YYCDEBUG): Adjust.
13095 Use it instead of cdebug_.
13096 (Parser::debug_stream, Parser::set_debug_stream): New.
13097 (Parser::symprint_): Define cdebug_ for temporary backward
13098 compatibility.
13099 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use
13100 debug_stream ().
13101
13102 2004-11-17 Akim Demaille <akim@epita.fr>
13103
13104 * data/lalr1.cc (Parser:print_): Remove, use %printer instead.
13105 * tests/regression.at (_AT_DATA_DANCER_Y): Adjust.
13106 * tests/calc.at (_AT_DATA_CALC_Y): Ditto.
13107 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
13108
13109 2004-10-27 Paul Eggert <eggert@cs.ucla.edu>
13110
13111 * data/glr.c (yyloc_default): Remove; not used.
13112 Problem reported by Frank Heckenbach.
13113
13114 2004-10-25 Akim Demaille <akim@epita.fr>
13115
13116 * data/glr.c (YYRHSLOC): Move its definition next to its uses.
13117 Introduce another definition to address simple location arrays.
13118 (yyGLRStack): New member: yyerror_range.
13119 (yyrecoverSyntaxError, yyparse): Update it.
13120 (yyrecoverSyntaxError): Use it when shifting the error token to
13121 have an accurate range, equivalent to the one computed by both
13122 yacc.c and lalr1.cc.
13123 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Change its yylex so
13124 that column numbers start at column 0, as per GNU Coding
13125 Standards, the others tests, and the doc.
13126 (_AT_RESOLVED_GLR_OUTPUT_WITH_LOC, _AT_AMBIG_GLR_OUTPUT_WITH_LOC):
13127 Adjust to the above change (first column is 0).
13128 And adjust the location of the "<error>", now covering the whole
13129 line.
13130
13131 2004-10-22 Akim Demaille <akim@epita.fr>
13132 and Paul Eggert <eggert@cs.ucla.edu>
13133
13134 Remove some arbitrary limits on goto numbers and relations.
13135 * src/lalr.c (goto_map, ngotos, from_state, to_state): Omit
13136 initial values, since they're never used.
13137 (set_goto_map): ngotos is now unsigned, so test for overflow
13138 by seeing whether it wraps around to zero.
13139 * src/lalr.h (goto_number): Now size_t, not short int.
13140 (GOTO_NUMBER_MAXIMUM): Remove.
13141 * src/relation.c (relation_print, traverse, relation_transpose):
13142 Check for END_NODE rather than looking at sign.
13143 * src/relation.h (END_NODE): New macro.
13144 (relation_node): Now size_t, not short int.
13145
13146 2004-10-22 Paul Eggert <eggert@cs.ucla.edu>
13147
13148 * doc/bison.texinfo (Language and Grammar): In example, "int" is a
13149 keyword, not an identifier. Problem reported by Baron Schwartz in
13150 <http://lists.gnu.org/archive/html/bug-bison/2004-10/msg00017.html>.
13151
13152 2004-10-11 Akim Demaille <akim@epita.fr>
13153
13154 * src/symtab.c (symbol_check_alias_consistency): Also check
13155 type names, destructors, and printers.
13156 Reported by Alexandre Duret-Lutz.
13157 Recode the handling of associativity and precedence in terms
13158 of symbol_precedence_set.
13159 Accept no redeclaration at all, not even equal to the previous
13160 value.
13161 (redeclaration): New.
13162 Use it to factor redeclaration complaints.
13163 (symbol_make_alias): Don't set the type of the alias, let
13164 symbol_check_alias_consistency do it as for other features.
13165 * src/symtab.h (symbol): Add new member prec_location, and
13166 type_location.
13167 * src/symtab.c (symbol_precedence_set, symbol_type_set): Set them.
13168 * tests/input.at (Incompatible Aliases): New.
13169
13170 2004-10-09 Paul Eggert <eggert@cs.ucla.edu>
13171
13172 .cvsignore fixes to accommodate gnulib changes,
13173 and the practice of naming build directories "_build".
13174 * .cvsignore: Add "_*". Sort.
13175 * lib/.cvsignore: Add getopt_.h, xalloc-die.c.
13176 * m4/.cvsignore: Add "*_gl.m4".
13177
13178 2004-10-06 Akim Demaille <akim@epita.fr>
13179
13180 * src/parse-gram.y (add_param): Fix the truncation of trailing
13181 spaces.
13182
13183 2004-10-05 Akim Demaille <akim@epita.fr>
13184
13185 In Bison 1.875's yacc.c, YYLLOC_DEFAULT was called regardless
13186 whether the reducion was empty or not. This leaves room to
13187 improve the use of YYLLOC_DEFAULT in such a case.
13188 lalr1.cc is still experimental, so changing this is acceptable.
13189 And finally, there are probably not many users who changed the
13190 handling of locations in GLR, so changing is admissible too.
13191
13192 * data/glr.c, data/lalr1.cc, data/yacc.c (YYLLOC_DEFAULT): On an
13193 empty reduction, set @$ to an empty location ending the previously
13194 stacked symbol.
13195 Adjust uses to make sure the code is triggered on empty
13196 reductions.
13197 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust the
13198 expected output: empty reductions have empty locations.
13199
13200 2004-09-29 Akim Demaille <akim@epita.fr>
13201
13202 * data/lalr1.cc: Move towards a more standard C++ coding style
13203 for templates: Class < T > -> Class<T>.
13204
13205 2004-09-29 Akim Demaille <akim@epita.fr>
13206
13207 * data/lalr1.cc: Reinstall the former ctor, for sake of
13208 compatibility, but warn it will be removed.
13209 Move towards a more standard C++ coding style (i.e., type *var ->
13210 type* var).
13211
13212 2004-09-27 Paul Eggert <eggert@cs.ucla.edu>
13213
13214 * src/parse-gram.y (add_param): Rewrite to avoid strchr,
13215 since it's less likely to work if NULs are involved in the future.
13216
13217 2004-09-27 Akim Demaille <akim@epita.fr>
13218
13219 * data/yacc.c (YY_LOCATION_PRINT): Fix its default declaration.
13220
13221 2004-09-27 Akim Demaille <akim@epita.fr>
13222
13223 * data/lalr1.cc (b4_parse_param_decl_1): New.
13224 (b4_parse_param_decl): Use it to have different names between attribute
13225 and argument names.
13226 (b4_cc_constructor_call): Likewise.
13227
13228 2004-09-24 Akim Demaille <akim@epita.fr>
13229
13230 * src/parse-gram.y (add_param): Strip the leading and trailing
13231 blanks from a formal argument declaration.
13232 (YY_LOCATION_PRINT): New.
13233
13234 2004-09-24 Akim Demaille <akim@epita.fr>
13235
13236 * data/c.m4 (b4_yysymprint_generate): Move the YYINPUT invocation
13237 after the location.
13238
13239 2004-09-24 Akim Demaille <akim@epita.fr>
13240
13241 * doc/bison.texinfo (Table of Symbols): Sort.
13242
13243 2004-09-21 Akim Demaille <akim@epita.fr>
13244
13245 * data/yacc.c, data/glr.c (b4_at_dollar, b4_dollar_dollar): Remove
13246 the useless parentheses.
13247 Suggested by Paul Eggert.
13248
13249 2004-09-20 Akim Demaille <akim@epita.fr>
13250
13251 Let the initial-action act on the look-ahead, and use it for the
13252 "initial push" (corresponding to an hypothetical beginning-of-file).
13253 And let lalr1.cc honor %initial-action.
13254
13255 * doc/bison.texinfo (Initial Action Decl): Clarify, and add an
13256 example.
13257 * data/lalr1.cc (Parser::initlocation_): Remove, bad experiment.
13258 (Parser::Parser): Remove the ctor that used to initialize it.
13259 (Parser::parse): Like in the other skeletons, issue the "starting
13260 parse" message before any action.
13261 Honor %initial-action.
13262 Initialize the stacks with the lookahead.
13263 * data/yacc.c: Let $$ and @$ in %initial-action designate the
13264 look-ahead.
13265 Push them in the stacks.
13266 * tests/actions.at, tests/calc.at: Adjust the C++ ctor invocations.
13267
13268 2004-09-20 Akim Demaille <akim@epita.fr>
13269
13270 * doc/bison.texinfo (Initial Action Decl): New.
13271
13272 2004-09-20 Akim Demaille <akim@epita.fr>
13273
13274 * data/yacc.c (YY_LOCATION_PRINT): Use YYLTYPE_IS_TRIVIAL as a
13275 clearer criterion to define it.
13276 (parse): Initialize the initial location when YYLTYPE_IS_TRIVIAL.
13277 When reducing on an empty RHS, use the latest stacked location as
13278 location.
13279 yylloc is not always available.
13280 * data/glr.c: Likewise.
13281 Also, honor initial-actions.
13282
13283 2004-09-20 Akim Demaille <akim@epita.fr>
13284
13285 * data/yacc.c (YY_LOCATION_PRINT): New.
13286 Define when we know YYLTYPE's structure, i.e., when the default
13287 YYLLOC_DEFAULT is used.
13288 * data/c.m4 (b4_yysymprint_generate): Use it.
13289 * data/lalr1.cc (YYLLOC_DEFAULT): Stop relying on the initial
13290 value of the result.
13291 (error_start_): Replace with...
13292 (error_range_): this location array.
13293 This allows to replace code relying on the implementation of
13294 locations by portable code.
13295 * data/yacc.c (yylerrsp): Replace with...
13296 (yyerror_range): this.
13297 Every time a token is popped, update yyerror_range[0], to have an
13298 accurate location for the error token.
13299 * data/glr.c (YY_LOCATION_PRINT): New.
13300 (yyprocessOneStack): Fix an invocation of YY_SYMBOL_PRINT:
13301 deference a pointer.
13302 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): No longer
13303 report the location in %printers.
13304
13305 * src/scan-skel.l: Instead of abort, report error messages to ease
13306 understanding skeleton scanning failures.
13307
13308 2004-09-16 Akim Demaille <akim@epita.fr>
13309
13310 * data/lalr1.cc (Stack::Iterator, Stack::ConstIterator): Rename as...
13311 (iterator, const_iterator): these, to be more in the C++ spirit.
13312 Also, return reverse iterators so that when displaying the stack
13313 we display its bottom first.
13314 (Parser::stack_print_, Parser::reduce_print_): Match the messages
13315 from yacc.c.
13316 We should probably use vector here though.
13317
13318 2004-09-16 Akim Demaille <akim@epita.fr>
13319
13320 Have more complete shift traces.
13321
13322 * data/yacc.c, data/lalr1.c, data/glr.c: Use YY_SYMBOL_PRINT
13323 to report Shifts instead of ad hoc YYDPRINTF invocations,
13324 including for the error token.
13325 * data/lalr1.cc (symprint_): Output the location.
13326 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): In C++, don't
13327 output the location within the %printer.
13328 Activate GLR tests, at least to make sure they compile properly.
13329 They still don't pass though.
13330 * tests/calc.at: Adjust expect verbose output, since now "Entering
13331 state..." is on a different line than the "Shifting" message.
13332
13333 2004-09-08 Akim Demaille <akim@epita.fr>
13334
13335 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Move the
13336 Bison directive from the Bison file to the invocation of this
13337 macro, so that these directives are passed to
13338 AT_BISON_OPTION_PUSHDEFS to get correct help macros.
13339 Use these helping macros (e.g., AT_LOC, AT_VAL and so forth).
13340 Move the AT_SETUP/AT_CLEANUP outside, to report as test title
13341 the extra Bison directives instead of the whole series.
13342 Change the grammar so that there are recoverable errors, and
13343 unrecoverable errors. Now we can have the parser give up before
13344 consuming the whole input. As a result we now can observe that
13345 the lookahead is freed when needed.
13346 Change the parser source to parse argv[1] instead of a hard coded
13347 string.
13348 Simplify yylex, and give a value and location to EOF.
13349 Simplify some invocations of AT_CHECK_PRINTER_AND_DESTRUCTOR that
13350 passed directives already coded in the file.
13351 Add some tests to check the location of "error".
13352 For some tests, the C++ parser is correct, and not yacc.c.
13353 For other tests, they provide different, but unsatisfying, values,
13354 so keep the C++ value so that at least one parser is "correct"
13355 according to the test suite.
13356 (Actions after errors): Remove, this is subsumed by the
13357 AT_CHECK_PRINTER_AND_DESTRUCTOR series.
13358
13359 2004-09-06 Akim Demaille <akim@epita.fr>
13360
13361 * data/lalr1.cc: Adjust the indentation of the labels.
13362 (Parser::pop): New.
13363 Use it.
13364
13365 2004-09-06 Akim Demaille <akim@epita.fr>
13366
13367 * data/yacc.cc, data/glr.cc (yydestruct): Accept an additional
13368 argument, an informative message.
13369 Call YY_SYMBOL_PRINT.
13370 Adjust all callers: integrate the associated YY_SYMBOL_PRINT.
13371 * data/lalr1.cc (destruct_): Likewise.
13372 In addition, no longer depend on b4_yysymprint_generate and
13373 b4_yydestruct_generate to generate these functions, do it "by
13374 hand".
13375
13376 2004-09-03 Akim Demaille <akim@epita.fr>
13377
13378 * data/glr.c, data/lalr1.cc, data/yacc.c: When YYABORT was
13379 invoked, yydestruct the lookahead.
13380 * tests/calc.at (Calculator $1): Update the expected lengths of
13381 traces: there is an added line for the discarded lookahead.
13382 * doc/bison.texinfo (Destructor Decl): Some rewording.
13383 Define "discarded" symbols.
13384
13385 2004-09-02 Akim Demaille <akim@epita.fr>
13386
13387 * data/lalr1.cc (translate_, destruct_): No reason to be static.
13388
13389 2004-09-02 Akim Demaille <akim@epita.fr>
13390
13391 * data/glr.c, yacc.c (YYDSYMPRINT): Remove, not used.
13392 (YYDSYMPRINTF): Rename as...
13393 (YY_SYMBOL_PRINT): this.
13394 * data/lalr1.cc (YY_SYMBOL_PRINT): New, modeled after the previous
13395 two.
13396 Use it instead of direct symprint_ calls.
13397 (yybackup): Tweak the "Now at end of input" case to match yacc.c's
13398 one.
13399
13400 2004-09-02 Akim Demaille <akim@epita.fr>
13401
13402 * data/lalr1.cc (b4_yysymprint_generate): New.
13403 (symprint_): New member function, defined when YYDEBUG.
13404 Use it consistently instead of token/nterm debugging output by
13405 hand.
13406 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust
13407 %printer calls to use cdebug_ when using lalr1.cc.
13408
13409 2004-08-30 Florian Krohm <florian@edamail.fishkill.ibm.com>
13410
13411 * data/glr.c: Guard the declarations of yypstack and yypdumpstack
13412 with #ifdef YYDEBUG.
13413
13414 2004-08-26 Akim Demaille <akim@epita.fr>
13415
13416 * doc/bison.texinfo (Implementing Loops): Rename as...
13417 (Implementing Gotos/Loops): this.
13418
13419 2004-08-13 Paul Eggert <eggert@cs.ucla.edu>
13420
13421 Adjust to latest gnulib.
13422 * bootstrap (gnulib_modules): Add xalloc-die.
13423 Set LC_ALL=C so that file names sort consistently.
13424 Prefer the gnulib copies of gettext.m4, glibc21.m4,
13425 inttypes_h.m4, lib-ld.m4, lib-prefix.m4, po.m4, stdint_h.m4,
13426 uintmax_t.m4, ulonglong.m4.
13427 (intl_files_to_remove): Add gettext.m4, lib-ld.m4, lib-prefix.m4,
13428 po.m4 since we are now using _gl.m4 instead.
13429
13430 2004-08-10 Florian Krohm <florian@edamail.fishkill.ibm.com>
13431
13432 * src/scan-action.l: Remove. Scanning of semantic actions is
13433 handled in scan-gram.l.
13434
13435 2004-08-07 Florian Krohm <florian@edamail.fishkill.ibm.com>
13436
13437 * src/scan-gram.l (handle_syncline): Use uniqstr_new not xstrdup.
13438
13439 * src/location.h (struct): The file member is a uniqstr.
13440 (equal_boundaries): Use UNIQSTR_EQ for comparison.
13441
13442 2004-07-22 Paul Eggert <eggert@cs.ucla.edu>
13443
13444 Fix bug with non-%union parsers that have printers or destructors,
13445 which led to a Bison core dump. Reported by Peter Fales in
13446 <http://lists.gnu.org/archive/html/bug-bison/2004-07/msg00014.html>.
13447
13448 * data/c.m4 (b4_symbol_actions): Don't assume %union was used.
13449 * data/lalr1.cc (yystype) [defined YYSTYPE]: Define to YYSTYPE,
13450 not to our own type.
13451 * src/output.c (symbol_destructors_output, symbol_printers_output):
13452 Don't assume %union.
13453 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR,
13454 AT_CHECK_PRINTER_AND_DESTRUCTOR): New argument
13455 UNION-FLAG. All callers changed.
13456 (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Don't assume %union.
13457 Use type char, not unsigned int, when declaring an array of char;
13458 this lets us remove a cast.
13459 (Printers and Destructors): Add non-%union test cases.
13460
13461 2004-06-21 Paul Eggert <eggert@cs.ucla.edu>
13462
13463 * doc/bison.texinfo: Minor editorial changes, mostly to the new
13464 GLR writeups. E.g., avoid frenchspacing and the future tense,
13465 change "lookahead" to "look-ahead", and change "wrt" to "with
13466 respect to".
13467
13468 2004-06-21 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
13469
13470 * doc/bison.texinfo (Merging GLR Parses, Compiler Requirements):
13471 New sections, split off from the GLR Parsers section. Put the new
13472 Simple GLR Parser near the start of the GLR section, for clarity.
13473 Rewrite connective text.
13474
13475 2004-06-21 Frank Heckenbach <frank@g-n-u.de>
13476
13477 * doc/bison.texinfo (Simple GLR Parsers): New section.
13478
13479 2004-06-21 Paul Eggert <eggert@cs.ucla.edu>
13480
13481 * NEWS, TODO, doc/bison.texinfo:
13482 Use "look-ahead" instead of "lookahead", to be consistent.
13483 * REFERENCES: Fix incorrect reference to DeRemer and Pennello,
13484 while we're fixing "look-ahead".
13485 * src/conflicts.c (shift_set): Renamed from shiftset.
13486 (look_ahead_set): Renamed from lookaheadset.
13487 * src/print.c: Likewise.
13488 * src/getargs.c (report_args): Add "look-ahead" as the new canonical
13489 name for "lookahead".
13490 (report_types, usage): Likewise.
13491 * src/getargs.h (report_look_ahead_tokens): Renamed from
13492 report_lookaheads.
13493 * src/lalr.c (compute_look_ahead_tokens): Renamed from
13494 compute_lookaheads.
13495 (state_look_ahead_tokens_count): Renamed from state_lookaheads_count.
13496 (look_ahead_tokens_print): Renamed from lookaheads_print.
13497 * src/state.c (state_rule_look_ahead_tokens_print): Renamed from
13498 state_rule_lookaheads_print.
13499 * src/state.h: Likewise.
13500 (reductions.look_ahead_tokens): Renamed from lookaheads.
13501 * tests/torture.at (AT_DATA_LOOK_AHEAD_TOKENS_GRAMMAR): Renamed from
13502 AT_DATA_LOOKAHEADS_GRAMMAR.
13503
13504 2004-06-03 Paul Eggert <eggert@cs.ucla.edu>
13505
13506 * README: Update location of patched M4 distribution.
13507
13508 2004-05-30 Albert Chin-A-Young <china@thewrittenword.com>
13509
13510 Don't assume the C++ compiler takes the same arguments as the C compiler
13511 (trivial change).
13512 * configure.ac (O0CXXFLAGS): New var.
13513 * tests/atlocal.in (CXXFLAGS): Use it.
13514
13515 2004-05-29 Paul Eggert <eggert@cs.ucla.edu>
13516
13517 Fix some "make check" problems with C++ reported by
13518 Albert Chin-A-Young for Tru64 C++ in this thread:
13519 http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00049.html
13520
13521 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check for std::cerr.
13522 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
13523 Output to a .cc file for C++, not to a .c file.
13524 * tests/calc.at (AT_CHECK_CALC): Likewise.
13525 * tests/regression.at (AT_CHECK_DANCER): Likewise.
13526 * tests/local.at (AT_COMPILE_CXX): Default to OUTPUT.cc, not OUTPUT.c.
13527
13528 2004-05-28 Albert Chin-A-Young <china@thewrittenword.com>
13529
13530 * tests/calc.at, tests/actions.at: Workaround for SGI
13531 C++ compiler. (trivial change)
13532
13533 2004-05-27 Paul Eggert <eggert@cs.ucla.edu>
13534
13535 Spent a few hours checking out which prerequisite versions the
13536 current sources actually require. I went all the way back to
13537 Gettext 0.10.40, Automake 1.4, and Autoconf 2.57 and investigated
13538 a seemingly endless set of combinations of versions more recent
13539 than that. The bottom line is that the current sources require
13540 fairly recent versions of the build tools, and it'll be some work
13541 to change this.
13542 * configure.ac (AC_PREREQ): Increase from 2.58 to 2.59.
13543 (AM_INIT_AUTOMAKE): Increase from 1.7 to 1.8.
13544 (AM_GNU_GETTEXT_VERSION): Increase from 0.11.5 to 0.12.
13545 Add comments explaining why those particular versions are
13546 currently needed.
13547
13548 * src/parse-gram.y (lloc_default): Rewrite to avoid compiler bug
13549 in SGI MIPSpro 7.4.1m. Problem reported by Albert Chin-A-Young in
13550 <http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00037.html>.
13551
13552 * configure.ac (AC_PREREQ): Bump to 2.58, since 2.57 doesn't work
13553 (it fails with a Autoconf-without-aclocal-m4 diagnostic).
13554
13555 2004-05-26 Paul Eggert <eggert@cs.ucla.edu>
13556
13557 * configure.ac (AM_GNU_GETTEXT_VERSION): Lower it from 0.14.1 to
13558 0.11.5. Suggested by Bruno Haible.
13559 * bootstrap: Remove gettext version checking.
13560
13561 * doc/bison.texinfo (Decl Summary): Also mention that %union
13562 can depend on prerequisite types. Problem reported by Tim
13563 Van Holder.
13564
13565 2004-05-25 Paul Eggert <eggert@cs.ucla.edu>
13566
13567 * README: Mention GNU m4 1.4 bugs and Akim's patched version.
13568 * README-alpha: Don't tell people not to package this.
13569
13570 * bootstrap: Don't assume $(...) works; use `...` instead.
13571 Problem reported by Paul Hilfinger. Also, diagnose non-GNU
13572 gettext better.
13573
13574 * doc/bison.texinfo (Decl Summary, Bison Options): Clarify what's
13575 put into the -d output file, and mention what to do if YYSTYPE is
13576 defined as a macro.
13577
13578 2004-05-24 Paul Eggert <eggert@cs.ucla.edu>
13579
13580 Undo change made earlier today: it caused autopoint to not bring
13581 in ABOUT-NLS. Ouch. Instead, substitute our own diagnostic for
13582 autopoint's.
13583
13584 * bootstrap: Check that gettext version matches what's in
13585 configure.ac. Warn users to ignore robots.txt ERROR 404.
13586 * bootstrap: Undo today's earlier change (logged below).
13587 * configure.ac (AM_GNU_GETTEXT_VERSION): Likewise.
13588
13589 The gettext version checking is causing more trouble than it's
13590 curing; remove it. Problem reported by Paul Hilfinger.
13591
13592 * bootstrap: Issue a warning that one can expect a message
13593 'AM_GNU_GETTEXT is used, but not AM_GNU_GETTEXT_VERSION'.
13594 * configure.ac (AM_GNU_GETTEXT_VERSION): Remove.
13595
13596 2004-05-23 Paul Eggert <eggert@cs.ucla.edu>
13597
13598 Ensure that the C++ compiler used for testing actually works on a
13599 simple test program; if not, skip the C++-related tests. Problem
13600 reported by Vin Shelton in:
13601 http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00026.html
13602
13603 * m4/cxx.m4: New file.
13604 * configure.ac (BISON_TEST_FOR_WORKING_CXX_COMPILER): Add.
13605 * tests/atlocal.in (BISON_CXX_WORKS): Add.
13606 * tests/local.at (AT_COMPILE_CXX): Use it.
13607
13608 2004-05-21 Paul Eggert <eggert@cs.ucla.edu>
13609
13610 * data/glr.c (yylloc): Output this macro even if locations are not
13611 being generated, as the GLR parser needs it even in that case.
13612 Problem reported by Troy A. Johnson
13613 <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=195946>.
13614
13615 * configure.ac (AC_INIT): Update to 1.875e.
13616
13617 2004-05-21 Paul Eggert <eggert@cs.ucla.edu>
13618
13619 * NEWS: Version 1.875d.
13620 * configure.ac (AC_INIT): Likewise.
13621 * src/parse-gram.c, src/parse-gram.h: Regenerate with 1.875d.
13622
13623 * configure.ac (--enable-gcc-warnings): Do not enable -Wshadow,
13624 -Wmissing-prototypes, or -Wstrict-prototypes for C++. The current
13625 lalr1.cc runs afoul of the first, and the last two are no longer
13626 supported by GCC 3.4.0.
13627 * README: Mention GNU m4 1.4 or later; mention m4 patches.
13628 * HACKING: Use ./bootstrap, not "make update" to import foreign files.
13629
13630 2004-05-06 Paul Eggert <eggert@cs.ucla.edu>
13631
13632 * src/muscle_tab.c (hash_muscle): Accept and return size_t, not
13633 unsigned int, for compatibility with latest gnulib hash module.
13634 * src/state.c (state_hash, state_hasher): Likewise.
13635 * src/symtab.c (hash_symbol, hash_symbol_hasher): Likewise.
13636 * src/uniqstr.c (hash_uniqstr): Likewise.
13637
13638 2004-05-03 Paul Eggert <eggert@cs.ucla.edu>
13639
13640 * NEWS: Unescaped newlines are no longer allowed in char & strings.
13641
13642 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER,
13643 SC_CHARACTER,SC_STRING>): Reject unescaped newlines in
13644 character and string literals.
13645 (unexpected_end): New function.
13646 (unexpected_eof): Use it.
13647 (unexpected_newline): New function.
13648 (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>): Coalesce duplicate
13649 actions.
13650
13651 * NEWS: Document %expect-rr.
13652
13653 * bootstrap (--gnulib-srcdir=*, --cvs-user=*):
13654 Fix typo by replacing $1 with $option.
13655 Remove more 'intl'-related files.
13656 Don't DEFUN AM_INTL_SUBDIR twice.
13657
13658 * lib/.cvsignore: Add strndup.h. Remove memchr.c, memcmp.c,
13659 memrchr.c, strcasecmp.c, strchr.c, strrchr.c, strspn.c, strtol.c,
13660 strtoul.c.
13661 * m4/.cvsignore: Add exitfail.m4, extensions.m4, gnulib.m4,
13662 hard-locale.m4, mbstate_t.m4, strerror_r.m4, strndup.m4,
13663 xstrndup.m4. Remove glibc21.m4, intdiv0.m4, inttypes-pri.m4,
13664 inttypes.m4, inttypes_h.m4, isc-posix.m4, lcmessage.m4,
13665 stdint_h.m4, uintmax_t.m4, ulonglong.m4.
13666 * src/.cvsignore: Add *.output.
13667
13668 * src/parse-gram.y: Put copyright notice inside %{ %} so it
13669 gets copied to the output file.
13670
13671 2004-04-28 Paul Eggert <eggert@twinsun.com>
13672
13673 Get files from the gnulib and po repositories, instead of relying
13674 on them being in our CVS. Upgrade to latest versions of gnulib
13675 and Automake.
13676
13677 * Makefile.am (SUBDIRS): Remove m4; Automake now does m4.
13678 * bootstrap: Bootstrap from gnulib and po repositories.
13679 Much of this code was stolen from GNU diff and GNU tar's bootstrap.
13680 * README-cvs: Document these changes. Remove version numbers from
13681 mentions of build tools, since they change so often. Mention Flex.
13682
13683 * configure.ac (AC_CONFIG_MACRO_DIR): Add, with m4 as arg.
13684 (gl_USE_SYSTEM_EXTENSIONS): Add.
13685 (AC_GNU_SOURCE, AC_AIX, AC_MINIX):
13686 Remove; no longer needed, as gl_USE_SYSTEM_EXTENSIONS
13687 does this for us.
13688 (AC_ISC_POSIX): Remove; we no longer support this
13689 ancient OS, as it gets in the way of latest Autoconf & gnulib.
13690 (AC_HEADER_STDC): Remove: we now assume C89 or better.
13691 (AC_CHECK_HEADERS_ONCE): Use instead of AC_CHECK_HEADERS.
13692 Do not check for C89 headers, except for locale.h which is used
13693 by the Yacc library and must port to K&R hosts.
13694 (AC_CHECK_FUNCS_ONCE): Use instead of AC_CHECK_FUNCS.
13695 Do not check for C89 functions, except for setlocale which is
13696 used by the Yacc library.
13697 (AC_CHECK_DECLS, AC_REPLACE_FUNCS): Remove; no longer needed.
13698 (gl_DIRNAME, gl_ERROR, gl_FUNC_ALLOCA, gl_FUNC_MEMCHR,
13699 gl_FUNC_MEMRCHR, gl_FUNC_STPCPY, gl_FUNC_STRNLEN, gl_FUNC_STRTOL,
13700 gl_GETOPT, gl_HASH, gl_MBSWIDTH, gl_OBSTACK, gl_QUOTE,
13701 gl_QUOTEARG, gl_XALLOC, jm_FUNC_GLIBC_UNLOCKED_IO, jm_FUNC_MALLOC,
13702 AM_GNU_GETTEXT): Remove; now done by:
13703 (GNULIB_AUTOCONF_SNIPPET): Add. "bootstrap" builds this for us.
13704 (AC_CONFIG_FILES): Remove m4/Makefile, as Automake now does this
13705 for us.
13706
13707 * lib/Makefile.am: Include gnulib.mk, built for us by "bootstrap".
13708 (BUILT_SOURCES, EXTRA_DIST, MOSTLYCLEANFILES):
13709 Define to empty, as gnulib.mk will do the rest for us.
13710 ($(libbison_a_OBJECTS), stdbool.h): Remove, as gnulib.mk does this
13711 for us.
13712 (libbison_a_SOURCES): Define to $(lib_SOURCES) now.
13713 (lib_SOURCES): New symbol, containing only the non-gnulib libs.
13714
13715 * src/files.c: Include gnulib's xstrndup.h.
13716
13717 * src/system.h (MALLOC): Use xnmalloc, for better overflow checking.
13718 (REALLOC): Use xnrealloc, for likewise.
13719 (xstrndup, stpcpy): Remove decls, as gnulib does this for us now.
13720 (strnlen, memrchr): Remove decls; functions no longer used.
13721 Include <stpcpy.h>.
13722
13723 * config/depcomp, config/install-sh, lib/alloca.c, lib/argmatch.c,
13724 lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
13725 lib/error.c, lib/error.h, lib/getopt.c, lib/getopt.h,
13726 lib/getopt1.c, lib/gettext.h, lib/hash.c, lib/hash.h,
13727 lib/malloc.c, lib/mbswidth.c, lib/mbswidth.h, lib/memchr.c,
13728 lib/memcmp.c, lib/memrchr.c, lib/obstack.c, lib/obstack.h,
13729 lib/quote.c, lib/quote.h, lib/quotearg.c, lib/quotearg.h,
13730 lib/realloc.c, lib/stdbool_.h, lib/stpcpy.c, lib/strcasecmp.c,
13731 lib/strchr.c, lib/strncasecmp.c, lib/strnlen.c, lib/strrchr.c,
13732 lib/strspn.c, lib/strtol.c, lib/strtoul.c, lib/unlocked-io.h,
13733 lib/xalloc.h, lib/xmalloc.c, lib/xstrdup.c, lib/xstrndup.c,
13734 m4/Makefile.am, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
13735 m4/error.m4, m4/getopt.m4, m4/hash.m4, m4/malloc.m4,
13736 m4/mbrtowc.m4, m4/mbswidth.m4, m4/memchr.m4, m4/memcmp.m4,
13737 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/prereq.m4,
13738 m4/quote.m4, m4/quotearg.m4, m4/realloc.m4, m4/stdbool.m4,
13739 m4/stpcpy.m4, m4/strnlen.m4, m4/strtol.m4, m4/strtoul.m4,
13740 m4/unlocked-io.m4, m4/xalloc.m4, po/LINGUAS, po/Makefile.in.in,
13741 po/Makevars, po/da.po, po/de.po, po/es.po, po/et.po, po/fr.po,
13742 po/hr.po, po/id.po, po/it.po, po/ja.po, po/ms.po, po/nl.po,
13743 po/pt_BR.po, po/ro.po, po/ru.po, po/sv.po, po/tr.po:
13744 Remove, as these files are now generated automatically
13745 by bootstrap or automake.
13746
13747 * po/ChangeLog: Remove: all but one entry was a duplicate
13748 of this file, and I moved that 2000-11-02 entry here.
13749
13750 * config/.cvsignore: Add Makefile, depcomp, install-sh.
13751 * lib/.cvsignore: Add alloca.c, alloca.h, alloca_.h, argmatch.c,
13752 argmatch.h, basename.c, dirname.c, dirname.h, error.c, error.h,
13753 exit.h, exitfail.c, exitfail.h, getopt.c, getopt.h, getopt1.c,
13754 getopt_int.h, gettext.h, gnulib.mk, hard-locale.c, hard-locale.h,
13755 hash.c, hash.h, malloc.c, mbswidth.c, mbswidth.h, memchr.c,
13756 memcmp.c, memrchr.c, obstack.c, obstack.h, quote.c, quote.h,
13757 quotearg.c, quotearg.h, realloc.c, stdbool_.h, stpcpy.c, stpcpy.h,
13758 strcasecmp.c, strchr.c, stripslash.c, strncasecmp.c, strndup.c,
13759 strnlen.c, strrchr.c, strspn.c, strtol.c, strtoul.c,
13760 unlocked-io.h, xalloc.h, xmalloc.c, xstrdup.c, xstrndup.c,
13761 xstrndup.h.
13762 * m4/.cvsignore: Remove Makefile, Makefile.in. Add alloca.m4,
13763 dirname.m4, dos.m4, error.m4, getopt.m4, hash.m4, mbrtowc.m4,
13764 mbswidth.m4, obstack.m4, onceonly.m4, quote.m4, quotearg.m4,
13765 stdbool.m4, stpcpy.m4, strnlen.m4, unlocked-io.m4, xalloc.m4.
13766 * po/.cvsignore: Add *.po, LINGUAS, Makefile.in.in, Makevars.
13767 * src/.cvsignore: Remove *_.c.
13768
13769
13770 * Makefile.maint (GZIP_ENV): Don't use --rsyncable if gzip doesn't
13771 support it. (The latest stable gzip doesn't.)
13772
13773 2004-04-27 Paul Eggert <eggert@twinsun.com>
13774
13775 * data/lalr1.cc (Parser::stos_) [! YYDEBUG]: Define even in this
13776 case, as stos_ is now used by destructors due to the 2004-02-09
13777 change.
13778
13779 Remove more K&R C support.
13780 * lib/libiberty.y (PARAMS): Remove. All uses removed.
13781 * lib/subpipe.c (errno): Remove decl.
13782 Include <stdlib.h> unconditionally.
13783 (EXIT_FAILURE): Remove macro.
13784 * src/complain.c (vfprintf, strerror): Remove.
13785 * src/system.h: Include limits.h, stdlib.h, string.h, locale.h
13786 unconditionally.
13787 (EXIT_FAILURE, EXIT_SUCCESS, setlocale): Remove defns.
13788 Use latest Autoconf recommendations for including inttypes.h, stdint.h.
13789 (strchr, strspn, memchr): Remove decls.
13790 * tests/calc.at (_AT_DATA_CALC_Y): Include stdlib.h, string.h
13791 unconditionally. Do not declare perror.
13792 * tests/conflicts.at (%nonassoc and eof): Include stdlib.h
13793 unconditionally.
13794
13795 * src/complain.c (_): Remove useless defn, as system.h defines this.
13796
13797 * lib/bitset.h (__INT_TO_PTR): Remove; workaround no longer needed
13798 with latest obstack.h.
13799 * lib/ebitset.c (ebitset_elt_alloc): Don't bother to cast args
13800 to procedure types, as obstack.h now does that for us.
13801 * lib/lbitset.c (lbitset_elt_alloc): Likewise.
13802
13803 * lib/subpipe.h [HAVE_SYS_TYPES_H]: Include <sys/types.h>,
13804 so that this include file can stand alone.
13805 * lib/subpipe.c: Do not include <sys/types.h>, as subpipe.h
13806 does this now. Include subpipe.h first after config.h, to
13807 test whether it can stand alone.
13808
13809 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Don't
13810 declare yyerror when using lalr.cc, as GCC 3.4.0 warns about the
13811 unused declaration.
13812
13813 * tests/synclines.at (%union synch line): Put a dummy member in
13814 the union, because empty unions aren't allowed in C. Caught
13815 by GCC 3.4.0.
13816
13817 2004-04-13 Jim Meyering <jim@meyering.net>
13818
13819 * src/conflicts.c (conflicts_print): Correct format string typo:
13820 use `%%' to produce literal `%'. (trivial change)
13821
13822 2004-03-30 Paul Eggert <eggert@twinsun.com>
13823
13824 * src/getargs.c (version): Update copyright year to 2004.
13825
13826 * data/c.m4 (b4_int_type): Use 'short int' rather than
13827 'short', and similarly for 'long', 'unsigned', etc.
13828 * data/glr.c (YYTRANSLATE, yyconfl, yySymbol, yyItemNum,
13829 yygetLRActions, yyprocessOneStack, yyrecoverSyntaxError,
13830 yy_yypstack, yydumpstack): Likewise.
13831 * data/lalr1.cc (user_token_number_max_, user_token_number_max_,
13832 translate_, seq_, [], pop, Slice, range_, operator+, operator+=):
13833 Likewise.
13834 * data/yacc.c (b4_int_type, yyss, YYSTACK_BYTES, yysigned_char,
13835 yy_stack_print, yyparse): Likewise.
13836 * doc/bison.texinfo (Prologue, Multiple Types): Likewise.
13837 * lib/bbitset.h (bitset_word, BITSET_WORD_BITS): Likewise.
13838 * lib/bitset.c (bitset_print): Likewise.
13839 * lib/bitset_stats.c (bitste_log_histogram_print): Likewise.
13840 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
13841 * lib/bitsetv.c (bitsetv_dump): Likewise.
13842 * lib/ebitset.c (EBITSET_ELT_BITS, ebitset_elt_alloc): Likewise.
13843 * lib/lbitset.c (LBITSET_ELT_BITS, lbitset_elt_alloc, debug_lbitset):
13844 Likewise.
13845 * src/LR0.c (allocate_itemsets): Likewise.
13846 * src/gram.h (rule_number, rule): Likewise.
13847 * src/lalr.h (goto_number): Likewise.
13848 * src/nullable.c (nullable_compute): Likewise.
13849 * src/output.c (prepare_rules): Likewise.
13850 * src/relation.c (relation_print, relation_digraph): Likewise.
13851 * src/relation.h (relation_node): Likewise.
13852 * src/state.h (state_number, transitions, errs, reductions,
13853 struct state): Likewise.
13854 * src/symtab.h (symbol_number, struct symbol): Likewise.
13855 * src/tables.c (vector_number, tally, action_number,
13856 default_goto, goto_actions): Likewise.
13857 * tests/existing.at (GNU Cim Grammar): Likewise.
13858 * tests/regression.at (Web2c Actions): Likewise.
13859
13860 * src/output.c (muscle_insert_short_int_table): Renamed from
13861 muscle_insert_short_table. All uses changed.
13862
13863 2004-03-25 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
13864
13865 * src/parse-gram.y: Define PERCENT_EXPECT_RR.
13866 (declaration): Replace expected_conflicts with expected_sr_conflicts.
13867 Add %expect-rr rule.
13868
13869 * src/scan-gram.l: Recognize %expect-rr.
13870
13871 * src/conflicts.h (expected_sr_conflicts): Rename from
13872 expected_conflicts.
13873 (expected_rr_conflicts): Declare.
13874
13875 * src/conflicts.c (expected_sr_conflicts): Rename from
13876 expected_conflicts.
13877 (expected_rr_conflicts): Define.
13878 (conflicts_print): Check r/r conflicts against expected_rr_conflicts
13879 for GLR parsers.
13880 Use expected_sr_conflicts in place of expected_conflicts.
13881 Warn if expected_rr_conflicts used in non-GLR parser.
13882
13883 * doc/bison.texinfo: Add documentation for %expect-rr.
13884
13885 2004-03-08 Paul Eggert <eggert@gnu.org>
13886
13887 Add support for hex token numbers. Suggested by Odd Arild Olsen in
13888 <http://lists.gnu.org/archive/html/bison-patches/2004-03/msg00000.html>.
13889
13890 * NEWS: Document hexadecimal tokens, no NUL bytes, %destructor
13891 in lalr1.cc.
13892 * doc/bison.texinfo (Token Decl): Add hexadecimal token numbers.
13893 * src/scan-gram.l (scan_integer): New function.
13894 ({int}): Use it.
13895 (0[xX][0-9abcdefABCDEF]+): New pattern, to support hex numbers.
13896 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>, \\x[0-9abcdefABCDEF]+,
13897 handle_action_dollar, handle_action_at, convert_ucn_to_byte):
13898 Say "long int", not "long", for uniformity with GNU style.
13899
13900 2004-02-25 Paul Eggert <eggert@twinsun.com>
13901
13902 * tests/local.at (AT_COMPILE, AT_COMPILE_CXX): Ignore stdout from
13903 compilers. This fixes a problem with Intel's C++ compiler being
13904 chatty, reported by Guido Trentalancia in
13905 <http://lists.gnu.org/archive/html/bug-bison/2004-02/msg00030.html>.
13906
13907 2004-02-09 Alexandre Duret-Lutz <adl@gnu.org>
13908
13909 Support %destructor and merge error locations in lalr1.cc.
13910
13911 * data/lalr1.cc (b4_cxx_destruct_def): New macro.
13912 (Parser::stos_): Define unconditionally.
13913 (Parser::destruct_): New method. Generate its body with
13914 b4_yydestruct_generate.
13915 (Parser::error_start_): New attribute.
13916 (Parser::parse) <yyerrlab, yyerrlab1>: Call destruct_ on erroneous
13917 token which are discarded.
13918 (Parser::parse) <yyerrlab, yyerrorlab, yyerrlab1>: Update
13919 error_start_ when erroneous token are discarded.
13920 (Parser::parse) <yyerrlab1>: Compute the location of the error
13921 token so that it covers all the discarded tokens.
13922 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust so
13923 it can be called with `%skeleton "lalr1.cc"', and do that.
13924
13925 2004-02-02 Paul Eggert <eggert@twinsun.com>
13926
13927 * src/Makefile.am (AM_CPPFLAGS): New macro. It mentions
13928 $(top_srcdir)/lib and ../lib. This fixes a bug reported
13929 by Paul Hilfinger; the old INCLUDES value didn't mention ../lib.
13930 There's no need to mention top_builddir since Automake does that
13931 for us.
13932 (INCLUDES): Remove, as Automake says it's obsolescent.
13933 Contents migrated into AM_CPPFLAGS as described above.
13934 * lib/Makefile.am (INCLUDES): Remove; obsolescent.
13935
13936 2004-01-14 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
13937
13938 * data/glr.c (yytokenName): Bullet-proof against YYEMPTY token.
13939 (yyreportSyntaxError): Handle case where lookahead token is
13940 YYEMPTY.
13941
13942 2004-01-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
13943
13944 * data/glr.c: Put casts on uses of YYREALLOC and YYMALLOC so that
13945 resulting parsers are compilable with C++.
13946
13947 2003-12-23 Paul Eggert <eggert@twinsun.com>
13948
13949 * config/depcomp, config/install-sh: Sync with Automake 1.8.
13950 * src/output.c (output_skeleton): Rename local var.
13951 * tests/input.at (Torturing the Scanner): Don't use \x0 or \0 in
13952 Bison tokens, as this runs afoul of the 2003-10-07 change that
13953 disallowed NUL bytes in character constants or string literals.
13954
13955 * tests/local.at: Require Autoconf 2.59's Autotest.
13956 * tests/testsuite.at: Don't include local.at, since we now assume
13957 Autoconf 2.59 or later. Autoconf 2.59 had some problems with
13958 including it.
13959 * tests/Makefile.am ($(TESTSUITE)): Remove warning about ignoring
13960 multiple inclusion warnings.
13961
13962 2003-12-02 Akim Demaille <akim@epita.fr>
13963
13964 * doc/bison.texinfo (How Can I Reset the Parser): More about start
13965 conditions.
13966 From Bruno Haible.
13967
13968 2003-11-18 Alexandre Duret-Lutz <adl@gnu.org>
13969
13970 * doc/bison.texinfo (Bison Options): Escape `@' in `$@'.
13971
13972 2003-10-07 Paul Eggert <eggert@twinsun.com>
13973
13974 * tests/Makefile.am (clean-local): Don't run 'testsuite --clean'
13975 if testsuite doesn't exist.
13976
13977 * doc/bison.texinfo (Symbols): NUL bytes are not allowed in string
13978 literals, unfortunately.
13979 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>):
13980 Complain about NUL bytes in character constants or string literals.
13981
13982 2003-10-05 Paul Eggert <eggert@twinsun.com>
13983
13984 * NEWS: Don't document %no-default-prec, as it's still
13985 too experimental.
13986 * doc/bison.texinfo: Document %no-default-prec only if
13987 the defaultprec flag is set. Normally it's not.
13988
13989 2003-10-04 Paul Eggert <eggert@twinsun.com>
13990
13991 * data/glr.c (b4_rhs_value, b4_rhs_location): Yield a
13992 non-modifiable lvalue, instead of a modifiable one.
13993 * doc/bison.texinfo (Actions): Document that $$ can
13994 be assigned to. Do not claim that $$ and $N are
13995 array element references: user code should not rely on this.
13996
13997 2003-10-01 Paul Eggert <eggert@twinsun.com>
13998
13999 * src/parse-gram.h (PERCENT_NO_DEFAULT_PREC): New token.
14000 (grammar_declaration): Use it.
14001 * src/scan-gram.l: New token %no-default-prec.
14002 * tests/conflicts.at: Revamp tests to use %no-default-prec.
14003 * NEWS, doc/bison.texinfo: Document the above.
14004
14005 2003-10-01 Akim Demaille <akim@epita.fr>
14006
14007 VCG no longer supports long_straight_phase.
14008
14009 * src/vcg.c, src/vcg.h: Remove the handling of long_straight_phase.
14010 * src/print_graph.c (print_graph): Adjust.
14011
14012 2003-09-30 Frank Heckenbach <frank@g-n-u.de>
14013 and Paul Eggert <eggert@twinsun.com>
14014
14015 * doc/bison.texinfo (Decl Summary, Contextual Precedence,
14016 Table of Symbols): Document %default-prec.
14017 * src/parse-gram.y (PERCENT_DEFAULT_PREC): New token.
14018 (grammar_declaration): Set default_prec on %default-prec.
14019 * src/scan-gram.l (%default-prec): New token.
14020 * src/reader.h (default_prec): New flag.
14021 * src/reader.c: Likewise.
14022 (packgram): Handle it.
14023 * tests/conflicts.at (%default-prec without %prec,
14024 %default-prec with %prec, %default-prec 1): New tests.
14025
14026 2003-09-30 Paul Eggert <eggert@twinsun.com>
14027
14028 * tests/testsuite.at: Include local.at, not input.at, fixing
14029 a typo in the 2003-08-25 patch.
14030
14031 2003-08-27 Akim Demaille <akim@epita.fr>
14032
14033 * data/lalr1.cc (yyparse) [__GNUC__]: "Use" yyerrorlab to pacify
14034 GCC warnings.
14035
14036 2003-08-26 Akim Demaille <akim@epita.fr>
14037
14038 * config/announce-gen (print_changelog_deltas): Neutralize "<#" as
14039 "<\#" to avoid magic from Gnus when posting parts of this script.
14040
14041 2003-08-26 Akim Demaille <akim@epita.fr>
14042
14043 * data/lalr1.cc (Parser::report_syntax_error_): New, extracted from
14044 (Parser::parse): here.
14045 Adjust: nerrs and errstatus is now replaced by...
14046 (Parser::nerrs_, Parser::errstatus_): New.
14047
14048 2003-08-25 Akim Demaille <akim@epita.fr>
14049
14050 * config/announce-gen, Makefile.cfg: New.
14051 * Makefile.am: Adjust.
14052 * GNUmakefile, Makefile.maint: Update from CVS Autoconf, but
14053 keeping local WGET and WGETFLAGS modifications from Paul Eggert.
14054
14055 2003-08-25 Akim Demaille <akim@epita.fr>
14056
14057 When reducing initial empty rules, Bison parser read an initial
14058 location that is not defined. This results in garbage, and that
14059 affects Bison's own parser. Therefore we need (i) to extend Bison
14060 to support a means to initialize this location, and (ii) to use
14061 this CVS Bison to fix CVS Bison's parser.
14062
14063 * src/reader.h, reader.c (epilogue_augment): Remove, replace
14064 with...
14065 * src/muscle_tab.h, src/muscle_tab.c (muscle_code_grow): this.
14066 * src/parse-gram.y: Adjust.
14067 (%initial-action): New.
14068 (%error-verbose): Since we require CVS Bison, there is no reason
14069 not to use it.
14070 * src/scan-gram.l: Adjust.
14071 * src/Makefile.am (YACC): New, to make sure we use our own parser.
14072 * data/yacc.c (yyparse): Use b4_initial_action.
14073
14074 2003-08-25 Akim Demaille <akim@epita.fr>
14075
14076 * doc/bison.texinfo: Don't promote stdout for error messages.
14077
14078 2003-08-25 Akim Demaille <akim@epita.fr>
14079
14080 * data/lalr1.cc (Parser::reduce_print_): Remove unused yyi.
14081 From Alexandre Duret-Lutz.
14082
14083 2003-08-25 Akim Demaille <akim@epita.fr>
14084
14085 Version 1.875c.
14086
14087 2003-08-25 Akim Demaille <akim@epita.fr>
14088
14089 * data/lalr1.cc (Parser::stack_print_, YY_STACK_PRINT): New.
14090 Use them.
14091
14092 2003-08-25 Akim Demaille <akim@epita.fr>
14093
14094 * data/lalr1.cc (Parser::reduce_print_): New.
14095 Use it.
14096
14097 2003-08-25 Akim Demaille <akim@epita.fr>
14098
14099 Have lalr1.cc catch with Paul Eggert's patch to fix the infinite
14100 error recovery loops. This patch is based on
14101 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00000.html>.
14102 Also, augment the similarity between lalr1.cc and yacc.c.
14103 Note: the locations of error recovery rules are not correct yet.
14104
14105 * data/lalr1.cc: Comment changes to augment the similarity between
14106 lalr1.cc and yacc.c.
14107 (YYERROR): Goto to yyerrorlab, not yyerrlab1.
14108 (yyerrlab1): Remove, but where it used to be (now the bottom part of
14109 yyerrlab), when hitting EOF, pop the whole stack here instead of
14110 merely falling thru the default error handling mechanism.
14111 (yyerrorlab): New label, with the old contents of YYERROR,
14112 plus the following change: pop the stack of rhs corresponding
14113 to the production that invoked YYERROR. That is how Yacc
14114 behaves (required by POSIX).
14115 * tests/calc.at (AT_CHECK_CALC_LALR1_CC): No longer expected to
14116 fail.
14117
14118 2003-08-25 Akim Demaille <akim@epita.fr>
14119
14120 Tune local.at so that people can "autom4te -l autotest calc.at -o
14121 calc" for instance, to extract a sub test suite.
14122
14123 * tests/testsuite.at: Move the initialization, Autotest version
14124 requirement, and AT_TESTED invocation into...
14125 * tests/local.at: here.
14126 * tests/testsuite.at: Include it for compatibility with Autoconf
14127 2.57.
14128 * tests/Makefile.am ($(TESTSUITE)): Report that the warning should
14129 be ignore.
14130
14131 2003-08-04 Paul Eggert <eggert@twinsun.com>
14132
14133 Rework code slightly to avoid gcc -Wtraditional warnings.
14134 * data/glr.c (yyuserMerge): Return void, not YYSTYPE.
14135 The returned value is now stored in *YY0. All callers changed.
14136 * src/output.c (merge_output): Adjust to the above change.
14137
14138 2003-07-26 Paul Eggert <eggert@twinsun.com>
14139
14140 * data/glr.c (YYASSERT): New macro.
14141 (yyfillin, yydoAction, yyglrReduce, yysplitStack,
14142 yyresolveStates, yyprocessOneStack):
14143 Use `YYASSERT (FOO);' rather than `if (! (FOO)) abort ();'.
14144 Derived from a suggestion by Frank Heckenbach.
14145
14146 2003-07-25 Paul Eggert <eggert@twinsun.com>
14147
14148 * data/glr.c (yyglrReduce): Don't use C89 string concatenation,
14149 for portability to K&R C (after ansi2knr, presumably). See
14150 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>
14151 by Frank Heckenbach, though I have omitted the structure-initialization
14152 part of his glr-knr.diff patch since I recall that the Portable
14153 C Compiler didn't require that change.
14154
14155 Let the user specify how to allocate and free memory.
14156 Derived from a suggestion by Frank Heckenbach in
14157 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>.
14158 * data/glr.c (YYFREE, YYMALLOC, YYREALLOC): New macros.
14159 All uses of free, malloc, realloc changed to use these macros,
14160 and unnecessary casts removed.
14161 * data/yacc.c (YYFREE, YYMALLOC): Likewise.
14162
14163 2003-07-06 Matthias Mann <MatthiasMann@gmx.de>
14164
14165 * data/lalr1.cc (operator<<(std::ostream&, const Position&)):
14166 use s.empty() rather than s == "" to test for empty string; see
14167 <http://lists.gnu.org/archive/html/bison-patches/2003-07/msg00003.html>
14168 (trivial change)
14169
14170 2003-06-25 Akim Demaille <akim@epita.fr>
14171
14172 * config/depcomp, config/install-sh: Update from masters.
14173
14174 2003-06-20 Paul Eggert <eggert@twinsun.com>
14175
14176 * data/glr.c (YYLLOC_DEFAULT): Parenthesize arguments as needed,
14177 and return properly parenthesized result.
14178 * data/lalar1.cc (YYLLOC_DEFAULT): Likewise.
14179 * data/yacc.c (YYLLOC_DEFAULT): Likewise.
14180 Remove unnecessary parentheses from uses.
14181 * doc/bison.texinfo (Location Default Action): Describe the
14182 conventions for parentheses.
14183
14184 2003-06-19 Paul Eggert <eggert@twinsun.com>
14185
14186 * data/glr.c (yyremoveDeletes, yy_reduce_print, yyglrReduce,
14187 yyreportTree): Do not assume that size_t is the same width as int,
14188 when printing sizes. Print sizes using an unsigned format.
14189 Problem reported by Frank Heckenbach in
14190 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00035.html>.
14191
14192 Port to Forte Developer 7 C compiler.
14193 * data/glr.c (struct YYLTYPE): If locations are not being used,
14194 declare a single dummy member, as empty structs do not conform
14195 to the C standard.
14196 (YYERROR, YYBACKUP): Do not use "do { ...; return foo; } while (0)";
14197 the Forte Developer 7 C compiler complains that end-of-loop
14198 code is not reached.
14199
14200 2003-06-17 Paul Eggert <eggert@twinsun.com>
14201
14202 * lib/libiberty.h (PARAMS): Spell argument as Args, not as X, to
14203 avoid warnings from picky compilers about redefinition of PARAMS.
14204
14205 2003-06-17 Paul Eggert <eggert@twinsun.com>
14206
14207 Version 1.875b.
14208
14209 * NEWS: Document 1.875b.
14210
14211 * lib/bbitset.h: Do not include config.h; that's the includer's job.
14212 Do not include <sys/types.h>; shouldn't be needed on a C89 host.
14213 * lib/bitset.h (bitset_compatible_p): Indent as per GNU standard.
14214 Don't use 'index' in comments, as it's a builtin fn on some hosts.
14215 * lib/bitset_stats.c: Include gettext.h unconditionally, as
14216 per recent gettext manual's suggestion.
14217 * lib/ebitset.c (ebitset_resize, ebitset_unused_clear):
14218 Use prototypes, not old-style definitions.
14219 * lib/lbitset.c (lbitset_unused_clear): Likewise.
14220 * lib/vbitset.c (vbitset_resize, vbitset_ones, vbitset_zero,
14221 vbitset_empty_p, vbitset_copy1, vbitset_not, vbitset_equal_p,
14222 vbitset_subset_p, vbitset_disjoint_p, vbitset_and, vbitset_and_cmp,
14223 vbitset_andn, vbitset_andn_cmp, vbitset_or, vbitset_or_cmp,
14224 vbitset_xor, vbitset_xor_cmp, vbitset_and_or, vbitset_and_or_cmp,
14225 vbitset_andn_or, vbitset_andn_or_cmp, vbitset_or_and,
14226 vbitset_or_and_cmp, vbitset_copy): Likewise.
14227
14228 * lib/libiberty.h: Do not include config.h; that's the includer's job.
14229 Do not include <stdlib.h>.
14230 (PARAMS): Define unconditionally for C89.
14231 (ATTRIBUTE_NORETURN): Remove.
14232 (ATTRIBUTE_UNUSED): Define unconditionally.
14233
14234 Upgrade to 2003-06-08 libbitset, submitted by Michael Hayes in:
14235 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00005.html>
14236 * lib/Makefile.am (bitsets_sources): Add vbitset.c, vbitset.h.
14237 * lib/vbitset.c, lib/vbitset.h: New files.
14238 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
14239 lib/bitset_stats.c, lib/ebitset.c, lib/lbitset.c: Import
14240 from libbitset.
14241
14242 * doc/bison.texinfo (How Can I Reset the Parser): Renamed from
14243 `How Can I Reset @code{yyparse}', since texinfo does not allow
14244 arbitrary @ in node names.
14245
14246 * m4/Makefile.am (EXTRA_DIST): Add the following files, which
14247 shouldn't be needed according to the gettext 0.12.1 documentation
14248 but which seem to be needed anyway: codeset.m4 glibc21.m4
14249 intdiv0.m4 inttypes-pri.m4 inttypes.m4 inttypes_h.m4 isc-posix.m4
14250 lcmessage.m4 nls.m4 po.m4 stdint_h.m4 uintmax_t.m4 ulonglong.m4.
14251 * po/Makefile.in.in: Upgrade to gettext 0.12.1 version.
14252
14253 * lib/.cvsignore: Add stdbool.h.
14254 * m4/.cvsignore: Add nls.m4, po.m4.
14255
14256 Upgrade to CVS gnulib.
14257 * stdbool_.h: File renamed from stdbool.h.in.
14258 * configure.ac (AM_STDBOOL_H): Invoke this instead of
14259 AC_HEADER_STDBOOL.
14260 (AM_GNU_GETTEXT): Put brackets around args, as latest manual suggests.
14261 (AM_GNU_GETTEXT_VERSION): Update to 0.12.1.
14262 * lib/Makefile.am (EXTRA_DIST): Add stdbool_.h.
14263 (MOSTLYCLEANFILES): New var.
14264 ($(libbison_a_OBJECTS)): Depend on $(STDBOOL_H).
14265 (stdbool.h): New rule.
14266 * lib/dirname.c, lib/dirname.h, lib/hash.c, lib/hash.h,
14267 lib/malloc.c, lib/obstack.h, lib/quote.c, lib/realloc.c,
14268 lib/strcasecmp.c, lib/xalloc.h, m4/alloca.m4, m4/onceonly.m4,
14269 m4/quote.m4: Upgrade to today's gnulib.
14270
14271 * tests/calc.at (AT_CHECK_CALC): New option EXPECTED-TO-FAIL.
14272 (AT_CHECK_CALC_LALR1_CC): Use it, since the C++ LALR parser fails
14273 the tests right now.
14274 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Ensure yylex and
14275 yyerror are declared before use; C99 requires this.
14276
14277 2003-06-09 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
14278
14279 * data/glr.c (YYERROR): Update definition to reset yyerrState to 0
14280 first.
14281 (yyrecoverSyntaxError): Correct the logic for setting and testing
14282 yyerrState.
14283 Correct comment on handling EOF.
14284 Allow states with only a default reduction, rather than failing
14285 (I can't quite reconstruct why these were not allowed before).
14286
14287 Fixes to avoid problem that $-N rules in GLR parsers can cause
14288 buffer overruns, corrupting state.
14289
14290 * src/output.c (prepare_rules): Output max_left_semantic_context
14291 definition.
14292 * src/reader.h (max_left_semantic_context): New variable declaration.
14293 * src/scan-gram.l (max_left_semantic_context): Define.
14294 (handle_action_dollar): Update max_left_semantic_context.
14295 * data/glr.c (YYMAXLEFT): New definition.
14296 (yydoAction): Increase size of yyrhsVals by YYMAXLEFT.
14297 (yyresolveAction): Ditto.
14298
14299 Fixes to problems with location handling in GLR parsers reported by
14300 Frank Heckenbach (2003/06/05).
14301
14302 * data/glr.c (YYLTYPE): Make trivial if locations not used.
14303 (YYRHSLOC): Add parentheses, and define only if locations used.
14304 (YYLLOC_DEFAULT): Add parentheses, and give trivial definition if
14305 locations not used.
14306 (yyuserAction): Use YYLLOC_DEFAULT to set *yylocp.
14307 (yydoAction): Remove redundant initialization of *yyvalp and *yylocp.
14308
14309 * tests/cxx-type.at: Exercise location information; update tests
14310 to differentiate output with and without locations.
14311 Remove forward declarations of yylex and yyerror---caused errors
14312 because default YYLTYPE not yet defined.
14313 Change semantic actions to compute strings, rather than printing
14314 them directly (to test proper passing of semantics values). Change
14315 output to prefix notation and update test data and expected results.
14316 (yylex): Track locations.
14317 (stmtMerge): Return value rather than printing, and include arguments
14318 in value.
14319
14320 2003-06-03 Paul Eggert <eggert@twinsun.com>
14321
14322 Avoid warnings generated by GCC 2.95.4 when Bison is
14323 configured with --enable-gcc-warnings.
14324 * data/lalr1.cc (yy::]b4_parser_class_name[::parse,
14325 yy::]b4_parser_class_name[::translate_,
14326 yy::Stack::operator[] (unsigned),
14327 yy::Stack::operator[] (unsigned) const,
14328 yy::Slice::operator[] (unsigned),
14329 yy::Slice::operator[] (unsigned) const):
14330 Rename local vars to avoid warnings.
14331 * tests/glr-regression.at (Improper handling of embedded actions
14332 and $-N in GLR parsers): Remove unused local variable from yylex.
14333 * tests/regression.at (_AT_DATA_DANCER_Y): Declare yylex to take
14334 (void) as arg when not pure, since we now assume C89 when building
14335 Bison. Pacify GCC by using parameter.
14336
14337 2003-06-02 Paul Eggert <eggert@twinsun.com>
14338
14339 * data/lalr1.cc (yy::Position::lines, yy::Position::columns,
14340 yy::Location::lines, yy::Location::columns): Rename arguments
14341 to avoid shadowing; this removes a warning generated by GCC 3.3.
14342
14343 2003-06-01 Paul Eggert <eggert@twinsun.com>
14344
14345 Don't pass C-only warning optins (e.g., -Wmissing-declarations)
14346 to g++, as GCC 3.3 complains if you do it.
14347 * configure.ac (WARNING_CXXFLAGS): New subst. Set it to
14348 everything that WARNING_CFLAGS has, except omit warnings
14349 not suitable for C++.
14350 (AC_PROG_CXX): Use this instead of AC_CHECK_PROGS([CXX], [g++]).
14351 * tests/atlocal.in (CXXFLAGS): New var.
14352 * tests/local.at (AT_COMPILE_CXX): Use it instead of CFLAGS.
14353
14354 Fix a GLR parser bug I reported in February; see
14355 <http://lists.gnu.org/archive/html/bison-patches/2003-02/msg00008.html>.
14356 The problem was that GLR parsers did not conform to the C standard,
14357 because actions like { $1 = $2 + $3; } expanded to expressions
14358 that invoked YYFILL in separate subexpressions, and YYFILL assigned
14359 to a local variable. The C standard says that expressions
14360 like (var = f ()) + (var = f ()) have undefined behavior.
14361 Another problem was that GCC sometimes issues warnings that
14362 yyfill and its parameters are unused.
14363
14364 * data/glr.c (yyfillin): Renamed from the old yyfill. Mark
14365 as possibly unused.
14366 (yyfill): New function.
14367 (YYFILL): Use it.
14368 (yyuserAction): Change type of yynormal to bool, so that it matches
14369 the new yyfill signature. Mark it as possibly unused.
14370
14371
14372 Follow up on a bug I reported in February, where a Bison-generated
14373 parser can loop. Provide a test case and a fix for yacc.c. I
14374 don't have a fix for lalr1.cc or for glr.c, unfortunately.
14375 The original bug report is in:
14376 <http://lists.gnu.org/archive/html/bison-patches/2003-02/msg00044.html>
14377
14378 * data/yacc.c (YYERROR): Now just 'goto yyerrorlab', since the
14379 macro's size was becoming unwieldy.
14380 (yyerrlab): Do not discard an empty lookahead symbol, as this
14381 might destroy garbage.
14382 (yyerrorlab): New label, with the old contents of YYERROR,
14383 plus the following change: pop the stack of rhs corresponding
14384 to the production that invoked YYERROR. That is how Yacc
14385 behaves, and POSIX requires this behavior.
14386 (yyerrlab1): Use YYPOPSTACK instead of its definiens.
14387 * tests/calc.at (_AT_DATA_CALC_Y): Include unistd.h if available.
14388 Define 'alarm' to do nothing if unistd.h is not available.
14389 Add a new rule "exp: '-' error;" to test the above change to
14390 data/yacc.c. Use 'alarm' to abort any test taking longer than
14391 10 seconds, as it's probably looping.
14392 (AT_CHECK_CALC): Test recovery from error in new grammar rule.
14393 Also, the new yacc.c generates two fewer diagnostics for an
14394 existing test.
14395
14396 2003-05-24 Paul Eggert <eggert@twinsun.com>
14397
14398 * data/glr.c (YYSTACKEXPANDABLE): Do not evaluate
14399 YYSTYPE_IS_TRIVIAL or YYSTYPE_IS_TRIVIAL unless they are defined.
14400 This fixes a problem reported by John Bowman when the Compaq/HP
14401 Alpha cxx compiler happy (e.g. using cxx -D__USE_STD_IOSTREAM
14402 -ansi -Wall -gall).
14403 * data/yacc.c (union yyalloc): Likewise.
14404 (YYCOPY): Do not evaluate __GNUC__ unless it is defined.
14405
14406 Switch from 'int' to 'bool' where that makes sense.
14407
14408 * lib/abitset.c (abitset_test, abitset_empty_p, abitset_equal_p,
14409 abitset_subset_p, abitset_disjoint_p, abitset_and_cmp,
14410 abitset_andn_cmp, abitset_or_cmp, abitset_xor_cmp, abitset_and_or,
14411 abitset_and_or_cmp, abitset_andn_or_cmp, abitset_or_and_cmp):
14412 Return or accept bool, not int. All callers changed.
14413 * lib/bbitset.h: (bitset_toggle_, bitset_copy_, bitset_and_or_cmp_,
14414 bitset_andn_or_cmp_, bitset_or_and_cmp_): Likewise.
14415 * lib/bitset.c (bitset_only_set_p, bitset_print, bitset_toggle_,
14416 bitset_copy_, bitset_op4_cmp, bitset_and_or_cmp_, bitset_andn_or_cmp_,
14417 bitset_or_and_cmp_): Likewise.
14418 * lib/bitset.h (bitset_test, bitset_only_set_p): Likewise.
14419 * lib/bitset_stats.c (bitset_stats_print, bitset_stats_toggle,
14420 bitset_stats_test, bitset_stats_empty_p, bitset_stats_disjoint_p,
14421 bitset_stats_equal_p, bitset_stats_subset_p, bitset_stats_and_cmp,
14422 bitset_stats_andn_cmp, bitset_stats_or_cmp, bitset_stats_xor_cmp,
14423 bitset_stats_and_or_cmp, bitset_stats_andn_or_cmp,
14424 bitset_stats_or_and_cmp): Likewise.
14425 * lib/ebitset.c (ebitset_elt_zero_p, ebitset_equal_p, ebitset_copy_cmp,
14426 ebitset_test, ebitset_empty_p, ebitset_subset_p, ebitset_disjoint_p,
14427 ebitset_op3_cmp, ebitset_and_cmp, ebitset_andn_cmp, ebitset_or_cmp,
14428 ebitset_xor_cmp): Likewise.
14429 * lib/lbitset.c (lbitset_elt_zero_p, lbitset_equal_p, lbitset_copy_cmp,
14430 lbitset_test, lbitset_empty_p, lbitset_subset_p, lbitset_disjoint_p,
14431 lbitset_op3_cmp, lbitset_and_cmp, lbitset_andn_cmp, lbitset_or_cmp,
14432 lbitset_xor_cmp): Likewise.
14433 * lib/bbitset.h: Include <stdbool.h>.
14434 (struct bitset_vtable): The following members now return bool, not
14435 int: toggle, test, empty_p, disjoint_p, equal_p, subset_p,
14436 and_cmp, andn_cmp, or_cmp, xor_cmp, and_or_cmp, andn_or_cmp,
14437 or_and_cmp).
14438 * src/conflicts.c (count_rr_conflicts): Likewise.
14439 * lib/bitset_stats.h (bitset_stats_enabled): Now bool, not int.
14440 All uses changed.
14441 * lib/ebitset.c (ebitset_obstack_init): Likewise.
14442 * lib/lbitset.c (lbitset_obstack_init): Likewise.
14443 * src/getargs.c (debug_flag, defines_flag, locations_flag,
14444 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
14445 graph_flag): Likewise.
14446 * src/getargs.h (debug_flag, defines_flag, locations_flag,
14447 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
14448 graph_flag): Likewise.
14449 * src/output.c (error_verbose): Likewise.
14450 * src/output.h (error_verbose): Likewise.
14451 * src/reader.c (start_flag, typed): Likewise.
14452 * src/reader.h (typed): Likewise.
14453 * src/getargs.c (LOCATIONS_OPTION): New constant.
14454 (long_options, getargs): Use it.
14455 * src/lalr.c (build_relations): Use bool, not int.
14456 * src/nullable.c (nullable_compute): Likewise.
14457 * src/print.c (print_reductions): Likewise.
14458 * src/tables.c (action_row, pack_vector): Likewise.
14459 * src/muscle_tab.h (MUSCLE_INSERT_BOOL): New macro.
14460 * src/output.c (prepare): Use it.
14461 * src/output.c (token_definitions_output,
14462 symbol_destructors_output, symbol_destructors_output): Use string,
14463 not boolean integer, to keep track of whether to output separator.
14464 * src/print_graph.c (print_core): Likewise.
14465 * src/state.c (state_rule_lookaheads_print): Likewise.
14466
14467 * config/install-sh: Sync from automake 1.7.5.
14468
14469 2003-05-14 Paul Eggert <eggert@twinsun.com>
14470
14471 * src/parse-gram.y (rules_or_grammar_declaration): Require a
14472 semicolon after a grammar declaration, in the interest of possible
14473 future changes to the Bison input language.
14474 Do not allow a stray semicolon at the start of the grammar.
14475 (rhses.1): Allow one or more semicolons after any rule, including
14476 just before "|" as required by POSIX.
14477 * tests/input.at (Torturing the Scanner): Add tests for ";|" in a
14478 grammar.
14479
14480 2003-05-14 Alexandre Duret-Lutz <adl@gnu.org>
14481
14482 %parse-param support for lalr1.cc.
14483
14484 * data/lalr1.cc (b4_parse_param_decl, b4_parse_param_cons,
14485 b4_cc_constructor_calls, b4_cc_constructor_call,
14486 b4_parse_param_vars, b4_cc_var_decls, b4_cc_var_decl): New m4
14487 definitions.
14488 (yy::b4_parser_class_name::b4_parser_class_name): Take extra
14489 parse-param arguments.
14490 (yy::b4_parser_class_name): Declare instance variables to
14491 hold parse-param arguments.
14492 * tests/calc.at: s/value/semantic_value/ because value clashes
14493 with a member of yy::b4_parser_class_name. Adjust C++ code
14494 to handle %parse-param. Enable %parse-param test in C++.
14495
14496 2003-05-12 Paul Eggert <eggert@twinsun.com>
14497
14498 * doc/bison.texinfo (How Can I Reset @code{yyparse}): Reword the
14499 English a bit. Fix fclose typo. Change "const char" to "char
14500 const", and use ANSI C rather than K&R for "main". Suggest
14501 YY_FLUSH_BUFFER over yyrestart (as that is what Flex recommends)
14502 and suggest yy_switch_to_buffer.
14503
14504 2003-05-05 Paul Eggert <eggert@twinsun.com>
14505
14506 * lib/bitset.h (__INT_TO_PTR): Define to a value that presumes
14507 C89. This avoids a diagnostic on compilers that define __STDC__
14508 to 0, fixing a problem with Tru64 cc reported by Martin Mokrejs in
14509 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
14510
14511 2003-05-03 Paul Eggert <eggert@twinsun.com>
14512
14513 * lib/bitset.h (BITSET_FOR_EACH, BITSET_FOR_EACH_REVERSE):
14514 Do not overrun array bounds.
14515 This should fix a bug reported today by Olatunji Oluwabukunmi in
14516 <http://lists.gnu.org/archive/html/bug-bison/2003-05/msg00004.html>.
14517
14518 2003-04-29 Akim Demaille <akim@epita.fr>
14519
14520 * src/gram.h, src/gram.c (pure_parser, glr_parser): Move to...
14521 * src/getargs.c, src/getargs.h: here, as bool, not int.
14522 (nondeterministic_parser): New.
14523 * src/parse-gram.y, src/scan-gram.l: Support
14524 %nondeterministic-parser.
14525 * src/output.c (prepare): Use nondeterministic_parser instead
14526 of glr_parser where appropriate.
14527 * src/tables.c (conflict_row, action_row, save_row)
14528 (token_actions, token_actions, pack_vector): Ditto.
14529
14530 2003-04-29 Akim Demaille <akim@epita.fr>
14531
14532 * doc/bison.texinfo (C++ Parsers, Implementing Loops): New.
14533
14534 2003-04-29 Akim Demaille <akim@epita.fr>
14535
14536 * tests/calc.at: Also test yacc.c and glr.c (but not lalr1.cc yet)
14537 with %pure-parser and %locations to exercise the patch from Yakov
14538 Markovitch below.
14539
14540 2003-04-28 Tim Van Holder <tim.van.holder@pandora.be>
14541
14542 * data/yacc.c: (b4_lex_param): Corrected for the case where
14543 %lex-param is provided and %pure-parser isn't.
14544
14545 2003-04-27 Paul Eggert <eggert@twinsun.com>
14546
14547 Avoid gcc -Wundef warnings reported by Gerald Pfeifer in
14548 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00044.html>.
14549 * data/yacc.c (YYSTACK_ALLOC): Don't evaluate YYSTACK_USE_ALLOCA
14550 if it is not defined.
14551 (YYMAXDEPTH): Don't evaluate YYMAXDEPTH if it is not defined.
14552
14553 2003-04-26 Paul Eggert <eggert@twinsun.com>
14554
14555 * data/lalr1.cc (yy::Parser::pact_ninf_, yy::Parser::table_ninf_):
14556 Declare to be of type suitable for the ninf value itself, not of
14557 type suitable for the corresponding table, since the latter might
14558 be unsigned but the ninf value might be negative. This fixes a
14559 bug reported by Alexandre Duret-Lutz in
14560 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00017.html>.
14561
14562 * configure.ac (AC_FUNC_ERROR_AT_LINE): Remove, since gl_ERROR
14563 invokes it. We shouldn't invoke it twice because it will attempt
14564 to put error.o in the archive twice. This fixes a glitch reported
14565 by Martin Mokrejs in
14566 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
14567
14568 2003-04-21 Paul Eggert <eggert@twinsun.com>
14569
14570 * m4/error.m4: Update from Bruno Haible's 2003-04-14 patch
14571 to gnulib.
14572
14573 2003-04-21 Yakov Markovitch <Markovitch@iso.ru>
14574
14575 * data/glr.c (yyexpandGLRStack) [!YYSTACKEXPANDABLE]:
14576 Fix obvious typo that results in uncompilable GLR parsers
14577 when both %pure-parser and %locations are used. (trivial change)
14578
14579 2003-04-17 Paul Eggert <eggert@twinsun.com>
14580
14581 * src/scan-gram.l: Add %option nounput, since we no longer use unput.
14582 (unexpected_eof): Renamed from unexpected_end_of_file, for brevity.
14583 Do not insert the expected token via unput, as this runs afoul
14584 of a POSIX-compatibility bug in flex 2.5.31.
14585 All uses changed to BEGIN the parent state,
14586 since we no longer insert the expected token via unput.
14587 * tests/regression.at (Invalid inputs): Remove cascaded diagnostic
14588 that is no longer emitted after the above change.
14589
14590 * src/conflicts.c (set_conflicts): Resolve all conflicts, not just
14591 the first one. This change is from Paul Hilfinger, and it fixes
14592 regression reported by Werner Lemberg in
14593 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00026.html>.
14594
14595 (resolve_sr_conflict): Don't invoke state_errs_set
14596 unless one or more tokens have been explicitly made errors.
14597 Otherwise, the above change causes Bison to abort.
14598
14599 * tests/existing.at (GNU pic Grammar): New test case, taken from
14600 Lemberg's email.
14601
14602 2003-03-31 Akim Demaille <akim@epita.fr>
14603
14604 * doc/Makefile.am (AM_MAKEINFOFLAGS): Don't split the info file.
14605
14606 2003-03-31 Akim Demaille <akim@epita.fr>
14607
14608 * src/output.c (prepare_symbols): Avoid trailing spaces in the
14609 output.
14610
14611 2003-03-31 Akim Demaille <akim@epita.fr>
14612
14613 * doc/bison.texinfo (Strings are Destroyed): s/losses/loses/.
14614 From Paul Hilfinger.
14615
14616 2003-03-29 Akim Demaille <akim@epita.fr>
14617
14618 * m4/error.m4: Do not put under dynamic conditions some code which
14619 expansion is under static control.
14620
14621 2003-03-29 Akim Demaille <akim@epita.fr>
14622
14623 * doc/bison.texinfo (How Can I Reset @code{yyparse}): New.
14624
14625 2003-03-29 Akim Demaille <akim@epita.fr>
14626
14627 * doc/bison.texinfo (Strings are Destroyed): New.
14628
14629 2003-03-13 Paul Eggert <eggert@twinsun.com>
14630
14631 * .cvsignore: Add configure.lineno.
14632 * src/.cvsignore: Add yacc.
14633 * tests/.cvsignore: Add testsuite.log.
14634 * doc/fdl.texi: Sync with latest FSF version.
14635
14636 2003-03-12 Paul Eggert <eggert@twinsun.com>
14637
14638 * scan-gram.l (YY_USER_INIT): Initialize code_start, too.
14639 (<INITIAL><<EOF>>, <SC_PRE_CODE><<EOF>>): Set *loc to the scanner
14640 cursor, instead of leaving it undefined. This fixes a bug
14641 reported by Tim Van Holder in
14642 <http://lists.gnu.org/archive/html/bug-bison/2003-03/msg00023.html>.
14643 * tests/input.at (Torturing the Scanner): Test the scanner on
14644 an empty input file, which was Tim Van Holder's test case.
14645
14646 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): When checking whether
14647 <sys/resource.h> can be included, include sys/time.h and
14648 sys/times.h first, if available. This works around the SunOS
14649 4.1.4 porting bug reported by Bruce Becker in
14650 <http://lists.gnu.org/archive/html/bug-bison/2003-03/msg00018.html>.
14651
14652 * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't
14653 AC_CHECK_HEADERS([sys/wait.h]), as this interferes with
14654 AC_HEADER_SYS_WAIT.
14655
14656 Merge changes from gnulib. This was prompted because the CVS
14657 snapshot didn't build on Solaris 7 due to strnlen problems.
14658
14659 These changes need to be merged back into gnulib:
14660 * lib/hash.c: Include <stdbool.h> unconditionally.
14661 * m4/onceonly.m4 (m4_quote): New macro.
14662 (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE, AC_CHECK_DECLS_ONCE):
14663 Quote AC_FOREACH variable-expansions properly.
14664 The 2003-01-03 obstack.h change also needs merging.
14665 {end of changes requiring merging}
14666
14667 * lib/stdbool.h.in, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
14668 m4/getopt.m4, m4/hash.m4, m4/malloc.m4, m4/memchr.m4,
14669 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/quote.m4,
14670 m4/quotearg.m4, m4/realloc.m4, m4/stpcpy.m4, m4/strnlen.m4,
14671 m4/strtol.m4, m4/strtoul.m4, m4/unlocked-io.m4, m4/xalloc.m4:
14672 New files, imported from gnulib.
14673 * m4/Makefile.am (EXTRA_DIST): Add the new m4/*.m4 files mentioned
14674 above.
14675
14676 * lib/mbswidth.c, m4/error.m4, m4/mbrtowc.m4, m4/mbswidth.m4,
14677 m4/memcmp.m4, m4/prereq.m4, m4/stdbool.m4: Update to current
14678 gnulib sources.
14679
14680 * configure.ac (gl_DIRNAME, gl_GETOPT, gl_HASH, gl_QUOTE, gl_XALLOC):
14681 Add.
14682 (gl_ERROR): New, replacing jm_PREREQ_ERROR.
14683 (gl_FUNC_ALLOCA): New, replacing AC_FUNC_ALLOCA.
14684 (gl_FUNC_STPCPY): New, replacing AC_REPLACE_FUNCS(stpcpy).
14685 (gl_FUNC_STRNLEN): New, replacing AC_FUNC_STRNLEN.
14686 (gl_MBSWIDTH): New, replacing jm_PREREQ_MBSWIDTH.
14687 (gl_OBSTACK): New, replacing AC_FUNC_OBSTACK.
14688 (gl_QUOTEARG): New, replacing jm_PREREQ_QUOTEARG.
14689 (jm_FUNC_GLIBC_UNLOCKED_IO, gl_FUNC_STPCPY, gl_FUNC_STRTOL): New.
14690 (jm_FUNC_MALLOC): New, replacing AC_FUNC_MALLOC.
14691 (jm_FUNC_REALLOC): New, replacing AC_FUNC_REALLOC.
14692 (jm_PREREQ_ARGMATCH): Remove.
14693 (AC_REPLACE_FUNCS): Remove memchr, memrchr, stpcpy, strtol, strtoul.
14694 * lib/Makefile.am (libbison_a_SOURCES): Add argmatch.c, argmatch.h.
14695
14696 * src/system.h: Include <stdbool.h> unconditionally.
14697
14698 * lib/bbitset.h: Include <limits.h> unconditionally. We have been
14699 assuming at least C89 in the bitset code for some time now.
14700
14701 2003-03-03 Akim Demaille <akim@epita.fr>
14702
14703 * ro.po: New.
14704
14705 2003-03-02 Akim Demaille <akim@epita.fr>
14706
14707 * doc/bison.texinfo (Table of Symbols): Reactivate the
14708 documentation for %lex-param, and %parse-param.
14709
14710 2003-03-02 Akim Demaille <akim@epita.fr>
14711
14712 * data/yacc.c, data/glr.c, data/lal1.cc: Use similar code to
14713 generate verbose error messages.
14714 Use the number of tokens as an upper bound in yytname, as it
14715 cannot be a non terminal.
14716
14717 2003-03-02 Akim Demaille <akim@epita.fr>
14718
14719 * tests/regression.at (_AT_DATA_DANCER_Y): Fix the expected error
14720 message.
14721
14722 2003-03-02 Akim Demaille <akim@epita.fr>
14723
14724 * tests/regression.at (_AT_DATA_DANCER_Y, AT_CHECK_DANCER): New.
14725 Use them to exercise yycheck overrun.
14726 Based on Andrew Suffield's grammar.
14727
14728 2003-03-02 Akim Demaille <akim@epita.fr>
14729
14730 Create tests/local.at for Bison generic testing macros.
14731
14732 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Move to...
14733 * tests/local.at (AT_BISON_OPTION_PUSHDEFS, AT_BISON_OPTION_POPDEFS):
14734 This new file.
14735 * tests/calc.at (AT_CHECK_CALC): Adjust.
14736 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR)
14737 (AT_COMPILE, AT_COMPILE_CXX, AT_PARSER_CHECK): Move to...
14738 * tests/local.at: here.
14739 (AT_COMPILE_CXX): Tags the tests using it as c++.
14740 Ignore the test if CXX is not functional.
14741
14742 2003-03-01 Paul Eggert <eggert@twinsun.com>
14743
14744 * src/scan-gram.l (code_start): Initialize it to scanner_cursor,
14745 not loc->end, since loc->end might contain garbage and this leads
14746 to undefined behavior on some platforms.
14747 (id_loc, token_start): Use (IF_LINTed) initial values that do not
14748 depend on *loc, so that the reader doesn't give the the false
14749 impression that *loc is initialized.
14750 (<INITIAL>"%%"): Do not bother setting code_start, since its value
14751 does not survive the return.
14752
14753 2003-03-01 Akim Demaille <akim@epita.fr>
14754
14755 * src/scan-gram.l (code_start): Always initialize it when entering
14756 into yylex, as SC_EPILOGUE is activated *before* the corresponding
14757 yylex invocation. An alternative would be making it static, but
14758 then it starts with the second %%'s beginning, instead of its end.
14759
14760 2003-02-28 Paul Eggert <eggert@twinsun.com>
14761
14762 * lib/mbswidth.c: Include <wchar.h> before "mbswidth.h", to work
14763 around a UnixWare 7.1.1 porting bug reported by John Hughes in
14764 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00030.html>.
14765
14766 2003-02-26 Paul Eggert <eggert@twinsun.com>
14767
14768 * README: Mention compiler bug in Sun Forte Developer 6 update 2.
14769 Remove Sequent/Pyramid discussion (nobody uses them any more).
14770 Merge VMS and MS-DOS discussion; these ports may well be dead
14771 but let's keep mentioning them for now. Put <> around email
14772 addresses. Add copyright notice.
14773
14774 2003-02-24 Paul Eggert <eggert@twinsun.com>
14775
14776 * data/glr.c (yy_reduce_print): yylineno -> yylno,
14777 to avoid collision with flex use of yylineno.
14778 Problem reported by Bruce Lilly in
14779 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00016.html>.
14780 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
14781 * data/yacc.c (yy_reduce_print): Likewise.
14782
14783 * config/depcomp: Sync with Automake 1.7.3.
14784
14785 2003-02-21 Akim Demaille <akim@epita.fr>
14786
14787 * data/lalr1.cc: Use temporary variables instead of casts to
14788 change integer types.
14789 Suggested by Paul Eggert.
14790
14791 2003-02-21 Akim Demaille <akim@epita.fr>
14792
14793 * doc/bison.texinfo: Use "location" consistently to refer to @n,
14794 to avoid confusions with lalr1.cc's notion of Position.
14795 Suggested by Paul Eggert.
14796
14797 2003-02-20 Akim Demaille <akim@epita.fr>
14798
14799 * data/lalr1.cc (position.hh): Make sure "columns" never pushes
14800 before initial_columns.
14801 (location.hh): Use consistent variable names when defining the
14802 operator<<.
14803 Use "last" so that we subtract from Positions, not from unsigned.
14804
14805 2003-02-20 Akim Demaille <akim@epita.fr>
14806
14807 * data/lalr1.cc (position.hh): New subfile, including the extended
14808 and Doxygen'ed documentation of class Position.
14809 (location.hh): Use it.
14810 Document a` la Doxygen.
14811 With the help of Benoit Perrot.
14812
14813 2003-02-20 Akim Demaille <akim@epita.fr>
14814
14815 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Define
14816 AT_YACC_IF.
14817 Redefine AT_YYERROR_SEES_LOC_IF using it.
14818 (_AT_DATA_CALC_Y): Don't declare yyerror when lalr1.cc, as it is
14819 not defined.
14820 Don't use the location in yy::Parser::error_ and
14821 yy::Parser::print_ when not %locations.
14822 Activate more lalr1.cc tests.
14823
14824 2003-02-19 Akim Demaille <akim@epita.fr>
14825
14826 * data/lalr1.cc: When displaying a line number, be sure to make it
14827 an int.
14828
14829 2003-02-19 Akim Demaille <akim@epita.fr>
14830
14831 * data/lalr1.cc (b4_stack_depth_init, yy::Parser::initdepth_):
14832 Remove, useless.
14833 (YYABORT, YYACCEPT, YYERROR): New.
14834 * tests/calc.at: Renable the lalr1.cc test.
14835
14836 2003-02-19 Akim Demaille <akim@epita.fr>
14837
14838 * tests/calc.at (AT_CHECK_CALC): Check different scenarios of
14839 error recovery, mixing with/without pops and discarding of the
14840 lookahead.
14841 Exercise YYERROR.
14842 Disable the lalr1.cc tests as currently it doesn't support YYERROR.
14843
14844 2003-02-17 Paul Eggert <eggert@twinsun.com>
14845
14846 * tests/atlocal.in (LDFLAGS, LIBS): New vars.
14847 * tests/testsuite.at (AT_COMPILE): Use them.
14848 This fixes the testsuite problem reported by Robert Lentz in
14849 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00011.html>.
14850
14851 2003-02-12 Paul Eggert <eggert@twinsun.com>
14852
14853 * data/yacc.c (yyerrlab) [YYERROR_VERBOSE]:
14854 Avoid subscript error in yycheck. Bug reported by Andrew Suffield in
14855 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00003.html>.
14856 * data/glr.c (yyreportSyntaxError) [YYERROR_VERBOSE]: Likewise.
14857 Check for malloc failure, for consistency with yacc.c.
14858 (yytname_size): Remove, for consistency with yacc.c.
14859
14860 The bug still remains in data/lalr1.cc, as I didn't have time
14861 to fix it there.
14862
14863 2003-02-06 Akim Demaille <akim@epita.fr>
14864
14865 * configure.ac (GXX): Rename as...
14866 (CXX): this, to keep the original Autoconf semantics.
14867 Require 2.57.
14868 * data/lalr1.cc: Fix b4_copyright invocations.
14869 If YYDEBUG is not defined, don't depend upon name_ being defined.
14870 (location.hh): Include string and iostream.
14871 (Position::filename): New member.
14872 (Position::Position ()): New.
14873 (operator<< (Position)): New.
14874 (operator- (Position, int)): New.
14875 (Location::first, Location::last): Rename as...
14876 (Location::begin, Location::end): these, to mock the conventional
14877 iterator names.
14878 (operator<< (Location)): New.
14879 * tests/atlocal.in (CXX): New.
14880 * tests/testsuite.at (AT_COMPILE_CXX): New.
14881 * tests/calc.at (_AT_DATA_CALC_Y): Adjust yyerror to report the
14882 locations in a more synthetic way.
14883 (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF is positive if
14884 lalr1.cc is used.
14885 Adjust the C locations to match those from Emacs: first column is
14886 column 0.
14887 Change all the expected results.
14888 Conform to the GCS: simplify the locations when applicable.
14889 (LOC, VAL, YYLLOC_FORMAL, YYLLOC_ARG, USE_YYLLOC, LEX_FORMALS)
14890 (LEX_ARGS, USE_LEX_ARGS, LEX_PRE_FORMALS, LEX_PRE_ARGS): Replace
14891 these CPP macros with the m4 macros new defined by...
14892 (AT_CHECK_PUSHDEFS): this, i.e.:
14893 (AT_LALR1_CC_IF, AT_PURE_LEX_IF, AT_LOC, AT_VAL, AT_LEX_FORMALS)
14894 (AT_LEX_ARGS, AT_USE_LEX_ARGS, AT_LEX_PRE_FORMALS, AT_LEX_PRE_ARGS)
14895 New macros.
14896 (AT_CHECK_POPDEFS): Undefine them.
14897 (AT_CHECK_CALC_LALR1_CC): New.
14898 Use it for the first lalr1.cc test.
14899
14900 2003-02-04 Akim Demaille <akim@epita.fr>
14901
14902 * data/lalr1.cc (YYLLOC_DEFAULT): Fix its definition: be based on
14903 Location as is defined.
14904
14905 2003-02-04 Akim Demaille <akim@epita.fr>
14906
14907 * data/lalr1.cc: If YYDEBUG is not defined, don't depend upon
14908 name_ being defined.
14909
14910 2003-02-03 Paul Eggert <eggert@twinsun.com>
14911
14912 * src/gram.h (start_symbol): Remove unused decl.
14913
14914 Use more-consistent naming conventions for local vars.
14915
14916 * src/derives.c (derives_compute): Change type of local var from
14917 int to rule_number.
14918 * src/gram.c (grammar_rules_partial_print): Likewise.
14919 * src/print.c (print_core): Likewise.
14920 * src/reduce.c (reduce_grammar_tables): Likewise.
14921
14922 * src/gram.c (grammar_dump): Change name of item_number *
14923 local var from r to rp.
14924 * src/nullable.c (nullable_compute): Likewise.
14925
14926 * src/gram.h (ISTOKEN, ISVAR): Use i, not s, for int var.
14927
14928 * src/gram.h (symbol_number_as_item_number): Use sym, not s,
14929 for symbol or symbol_number var.
14930 * src/reader.c (grammar_start_symbol_set): Likewise.
14931 * src/reader.h (grammar_start_symbol_set, grammar_symbol_append):
14932 Likewise.
14933 * src/state.c (transitions_to): Likewise.
14934 * src/state.h: Likewise.
14935 * src/tables.c (symbol_number_to_vector_number): Likewise.
14936
14937 * src/muscle_tab.h (MUSCLE_OBSTACK_SGROW): Use p, not s, for
14938 char * var.
14939
14940 * src/parse-gram.y (lloc_default): Use loc, not r, for YYLTYPE
14941 var.
14942
14943 * src/scan-gram.l (no_cr_read): Use bytes_read, not s, for size
14944 var.
14945
14946 * src/system.h (xstrndup, strchr, strspn, strnlen, memchr, memrchr):
14947 Use str, not s, for char * var. Use ch, not c, for character var.
14948 Use size for size var.
14949
14950 * src/uniqstr.c (uniqstr_new, uniqstr_assert): Use str, not s, for
14951 char * var.
14952 (uniqstr_print, uniqst_print_processor): Use ustr, not s, for
14953 uniqstr var.
14954 * src/uniqstr.h: Likewise.
14955
14956 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
14957 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
14958 get_node_alignment_str, get_arrow_mode_str, get_crossing_type_str,
14959 get_view_str, get_linestyle_str, get_arrowstyle_str): Rename
14960 param to have same name as that of enum, so that we don't use
14961 "s" to stand for a non-state.
14962
14963 2003-02-02 Akim Demaille <akim@epita.fr>
14964
14965 * src/scan-skel.l: Scan more than one inert character per yylex
14966 invocation.
14967
14968 2003-02-01 Paul Eggert <eggert@twinsun.com>
14969
14970 Version 1.875a.
14971
14972 * po/LINGUAS: Add ms.
14973
14974 2003-01-30 Akim Demaille <akim@epita.fr>
14975
14976 * doc/Makefile.am (CLEANFILES): Add bison.fns for distcheck.
14977
14978 2003-01-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
14979
14980 * tests/cxx-type.at: Correct apparent typo in Bison input: $$ instead
14981 of $1.
14982
14983 Changes in response to error report by S. Eken: GLR mode does not
14984 handle negative $ indices or $ indices in embedded rules correctly.
14985 See <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00076.html>.
14986
14987 * data/glr.c (b4_rhs_value): Change to use YYFILL macro.
14988 (b4_rhs_location): Ditto.
14989 (yyfill): New function to copy from stack tree into array
14990 incrementally.
14991 (yyuserAction): Modify to allow incremental move of semantic values
14992 to rhs array when in GLR mode.
14993 Define YYFILL to use in user-defined actions to fill semantic array
14994 as needed.
14995 Remove dummy use of yystack, as there is now a guaranteed use.
14996 (yydoAction): Modify to allow incremental move of semantic values
14997 to rhs array when in GLR mode.
14998 (yyresolveAction): Ditto.
14999 (yyglrShiftDefer): Update comment.
15000 (yyresolveStates): Use X == NULL for pointers, not !X.
15001 (yyglrReduce): Ditto.
15002 (yydoAction): Ditto
15003
15004 * tests/glr-regr1.at: Rename to ...
15005 * tests/glr-regression.at: Add new regression test for the problems
15006 described above (adapted from S. Eken).
15007 Update copyright notice.
15008 * tests/testsuite.at: Rename glr-regr1.at to glr-regression.at.
15009 * tests/Makefile.am: Ditto.
15010
15011 2003-01-28 Paul Eggert <eggert@twinsun.com>
15012
15013 * data/lalr1.cc: Do not use @output_header_name@ unless
15014 b4_defines_flag is set. This fixes two bugs reported by
15015 Tim Van Holder in
15016 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00071.html>
15017 and <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00073.html>.
15018
15019 2003-01-21 Paul Eggert <eggert@twinsun.com>
15020
15021 * data/yacc.c (YYERROR): Move code from yyerrlab1 to here, so that
15022 we don't need to worry about yyerrlab1 being reported as an
15023 "unused label" by non-GCC C compilers. The downside is that if
15024 locations are used then a couple of statements are duplicated each
15025 time YYERROR is invoked, but the upside is that the warnings
15026 should vanish.
15027 (yyerrlab1): Move code to YERROR.
15028 (yyerrlab2): Remove. Change uses back to yyerrlab1.
15029 This reverts some of the 2002-12-27 change.
15030
15031 2003-01-17 Paul Eggert <eggert@twinsun.com>
15032
15033 * src/output.c (symbol_printers_output): Fix typo that led
15034 to core dump. Problem reported by Antonio Rus in
15035 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00058.html>.
15036
15037 2003-01-13 Akim Demaille <akim@epita.fr>,
15038 Quoc Peyrot <chojin@lrde.epita.fr>,
15039 Robert Anisko <anisko_r@lrde.epita.fr>
15040
15041 * data/lalr1.cc (parse::yyerrlab1): When popping the stack, stop
15042 when the stacks contain one element, as the loop would otherwise
15043 free the last state, and then use the top state (the one we just
15044 popped). This means that the initial elements will not be freed
15045 explicitly, as is the case in yacc.c; it is not a problem, as
15046 these elements have fake values.
15047
15048 2003-01-11 Paul Eggert <eggert@twinsun.com>
15049
15050 * NEWS: %expect-violations are now just warnings, reverting
15051 to Bison 1.30 and 1.75 behavior. This fixes the GCC 3.2
15052 bootstrapping problem reported by Matthias Klose; see
15053 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00053.html>.
15054 * src/conflicts.c (conflicts_print): Likewise.
15055 * tests/conflicts.at (%expect not enough, %expect too much,
15056 %expect with reduce conflicts): Likewise.
15057 * doc/bison.texinfo (Expect Decl): Document this. Also mention
15058 that the warning is enabled if the number of conflicts changes
15059 (not necessarily increases).
15060
15061 * src/getargs.c (version): Update copyright year.
15062
15063 2003-01-09 Akim Demaille <akim@epita.fr>
15064
15065 * src/Makefile.am, lib/Makefile.am: Use $(VAR) instead of @VAR@.
15066
15067 2003-01-08 Paul Eggert <eggert@twinsun.com>
15068
15069 * Makefile.maint (WGETFLAGS):
15070 New macro, containing "-C off" to disable proxy caches.
15071 All uses of $(WGET) changed to $(WGET) $(WGETFLAGS).
15072 (rel-check): Use $(WGET) instead of wget.
15073
15074 2003-01-06 Paul Eggert <eggert@twinsun.com>
15075
15076 * doc/bison.texinfo (Generalized LR Parsing): Add a reference to
15077 the GLR paper of Scott, Johnstone and Hussain.
15078
15079 2003-01-04 Paul Eggert <eggert@twinsun.com>
15080
15081 * configure.ac (AC_ARG_ENABLE): Add --disable-yacc.
15082 (YACC_SCRIPT, YACC_LIBRARY): New vars to AC_SUBST.
15083 * lib/Makefile.am (lib_LIBRARIES): liby.a -> @YACC_LIBRARY@.
15084 (EXTRA_LIBRARIES): New var, for liby.a.
15085 * src/Makefile.am (bin_SCRIPTS): yacc -> @YACC_SCRIPT@.
15086 (EXTRA_SCRIPTS): New var, for yacc.
15087
15088 * data/yacc.c (yyerrlab1): Omit attribute if __cplusplus is defined,
15089 since GNU C++ (as of 3.2.1) does not allow attributes on labels.
15090 Problem reported by Nelson H. F. Beebe.
15091
15092 2003-01-03 Paul Eggert <eggert@twinsun.com>
15093
15094 * lib/obstack.h (__INT_TO_PTR) [__STDC__]: Cast result to
15095 (void *) to avoid diagnostic with native c89 on SGI IRIX 6.5
15096 when compiling Bison 1.875's `bitset bset = obstack_alloc
15097 (bobstack, bytes);'. Problem reported by Nelson H. F. Beebe.
15098
15099 * src/scan-skel.l (QPUTS): Omit redundant `;' from macro definition.
15100 ([^@\n]): Renamed from [^@\n]+ so that the token buffer does not
15101 grow to a huge size with typical invocation.
15102
15103 * lib/hash.c (_Bool, bool, false, true, __bool_true_false_are_defined):
15104 Use the pattern recommended by Autoconf 2.57, except also protect
15105 against double-definition.
15106 * src/system.h: Likewise.
15107 Portability issues reported by Nelson H. F. Beebe.
15108
15109 * data/glr.c (yybool): Renamed from bool, to avoid collisions in C.
15110 All uses changed. Provide a definition in both C and C++.
15111 (yytrue, yyfalse): Define even if defined (__cplusplus).
15112
15113 * lib/bitset_stats.c (bitset_stats_list): Remove unused var.
15114 Reported by Nelson H. F. Beebe.
15115
15116 * src/scan-skel.l ("@oline@"): Output lineno+1, not lineno.
15117
15118 2003-01-02 Paul Eggert <eggert@twinsun.com>
15119
15120 * data/yacc.c (yyerrlab1): Append `;' after attribute, to
15121 pacify the buggy "smart preprocessor" in MacOS 10.2.3.
15122 Bug reported by Nelson H. F. Beebe.
15123
15124 2003-01-01 Paul Eggert <eggert@twinsun.com>
15125
15126 * Version 1.875.
15127
15128 2002-12-30 Paul Eggert <eggert@twinsun.com>
15129
15130 * src/scan-gram.l (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>","):
15131 Moved here from...
15132 (<INITIAL>","): Here. This causes stray "," to be treated
15133 more uniformly.
15134
15135 * src/scan-gram.l (<SC_BRACED_CODE>"}"): Output ";" before the
15136 last brace in braced code when not in Yacc mode, for compatibility
15137 with Bison 1.35. This resurrects the 2001-12-15 patch to
15138 src/reader.c.
15139
15140 * src/reader.h (YYDECL): Use YYSTYPE, not its deprecated alias
15141 yystype. This follows up the 2002-12-24 YYSTYPE bug fix.
15142
15143 2002-12-28 Paul Eggert <eggert@twinsun.com>
15144
15145 * src/symtab.c (symbol_make_alias): Set type of SYMVAL to be
15146 that of SYM's type. This fixes Debian bug 168069, reported by
15147 Thomas Olsson.
15148
15149 2002-12-28 Paul Eggert <eggert@twinsun.com>
15150
15151 Version 1.75f.
15152
15153 Switch back to the Yacc style of conflict reports, undoing some
15154 of the 2002-07-30 change.
15155 * doc/bison.texinfo (Understanding): Use Yacc style for
15156 conflict reports. Also, use new way of locating rules.
15157 * src/conflicts.c (conflict_report):
15158 Renamed from conflict_report_yacc, removing the old
15159 'conflict_report'. Translate the entire conflict report at once,
15160 so that we don't assume that "," has the same interpretation in
15161 all languages.
15162 (conflicts_output): Use Yacc-style conflict report for each state,
15163 instead of our more-complicated style.
15164 (conflicts_print): Use Yacc-style conflict report, except print
15165 the input file name when not emulating Yacc.
15166 * tests/conflicts.at (Unresolved SR Conflicts, Defaulted
15167 Conflicted Reduction, %expect not enough, %expect too much,
15168 %expect with reduce conflicts): Switch to Yacc-style conflict reports.
15169 * tests/existing.at (GNU Cim Grammar): Likewise.
15170 * tests/glr-regr1.at (Badly Collapsed GLR States): Likewise.
15171
15172 * src/complain.c (warn_at, warn, complain_at, complain, fatal_at,
15173 fatal): Don't invoke fflush; it's not needed and it might even be
15174 harmful for stdout, as stdout might not be open.
15175 * src/reduce.c (reduce_print): Likewise.
15176
15177 2002-12-27 Paul Eggert <eggert@twinsun.com>
15178
15179 Fix a bug where error locations were not being recorded correctly.
15180 This problem was originally reported by Paul Hilfinger in
15181 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00086.html>.
15182
15183 * data/yacc.c (yyparse): New local var yylerrsp, to record the
15184 top of the location stack's error locations.
15185 (yyerrlab): Set it. When discarding a token, push its location
15186 onto yylerrsp so that we don't lose track of the error's end.
15187 (yyerrlab1): Now is only the target of YYERROR, so that we can
15188 properly record the location of the action that failed. For GCC
15189 2.93 and later, insert an __attribute__ ((__unused__)) to avoid
15190 GCC warning about yyerrlab1 being unused if YYERROR is unused.
15191 (yyerrlab2): New label, which yyerrlab now falls through to.
15192 Compute the error's location by applying YYLLOC_DEFAULT to
15193 the locations of all the symbols that went into the error.
15194 * doc/bison.texinfo (Location Default Action): Mention that
15195 YYLLOC_DEFAULT is also invoked for syntax errors.
15196 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
15197 Error locations include the locations of all the tokens that were
15198 discarded, not just the last token.
15199
15200 2002-12-26 Paul Eggert <eggert@twinsun.com>
15201
15202 * src/files.c: Include quote.h.
15203 (compute_output_file_names): Warn if we detect conflicting
15204 outputs to the same file. This should catch the misunderstanding
15205 exemplified by Debian Bug 165349, reported by Bruce Stephens..
15206
15207 * src/conflicts.c (conflicts_print): If the user specifies
15208 "%expect N", report an error if there are any reduce/reduce
15209 conflicts. This is what the manual says should happen.
15210 This fixes Debian bug 130890, reported by Anthony DeRobertis.
15211 * tests/conflicts.at (%expect with reduce conflicts): New test.
15212
15213 Don't use m4_include on relative file names, as it doesn't work as
15214 desired if there happens to be a file with that name under ".".
15215
15216 * m4sugar/version.m4: Remove; it was included but it wasn't used.
15217 * data/Makefile.am (dist_m4sugar_DATA): Remove m4sugar/version.m4.
15218 * data/m4sugar/m4sugar.m4: Don't include m4sugar/version.m4.
15219 * data/glr.c, data/lalr1.cc, data/yacc.c: Don't include c.m4.
15220 * src/output.c (output_skeleton): Use full path names when
15221 specifying a file to include; don't rely on include path, as
15222 it's unreliable when the working file contains a file with
15223 that name.
15224
15225 2002-12-25 Paul Eggert <eggert@twinsun.com>
15226
15227 Remove obsolete references to bison.simple and bison.hairy.
15228 Problem mentioned by Aubin Mahe in
15229 <http://lists.gnu.org/archive/html/help-bison/2002-12/msg00010.html>.
15230 * data/glr.c: Comment fix.
15231 * doc/bison.1: Remove references. Also, mention "yacc".
15232
15233 * src/getargs.c (getargs) [MSDOS]: Don't assume optarg != NULL
15234 with -g option.
15235
15236 * src/parse-gram.y (declaration): Use enum "report_states" rather
15237 than its numeric value 1.
15238
15239 * src/scan-skel.l ("@output ".*\n): Close any old yyout before
15240 opening a new one. This fixes Debian bug 165349, reported by
15241 Bruce Stephens.
15242
15243 2002-12-24 Paul Eggert <eggert@twinsun.com>
15244
15245 Version 1.75e.
15246
15247 * Makefile.maint (cvs-update): Don't assume that the shell
15248 supports $(...), as Solaris sh doesn't.
15249
15250 * src/parse-gram.y (lloc_default): Remove test for empty
15251 nonterminals at the end, since it didn't change the result.
15252
15253 2002-12-24 Paul Eggert <eggert@twinsun.com>
15254
15255 If the user does not define YYSTYPE as a macro, Bison now declares it
15256 using typedef instead of defining it as a macro. POSIX requires this.
15257 For consistency, YYLTYPE is also declared instead of defined.
15258
15259 %union directives can now have a tag before the `{', e.g., the
15260 directive `%union foo {...}' now generates the C code
15261 `typedef union foo { ... } YYSTYPE;'; this is for Yacc compatibility.
15262 The default union tag is `YYSTYPE', for compatibility with Solaris 9
15263 Yacc. For consistency, YYLTYPE's struct tag is now `YYLTYPE'
15264 instead of `yyltype'.
15265
15266 `yystype' and `yyltype' are now obsolescent macros instead of being
15267 typedefs or tags; they are no longer documented and will be
15268 withdrawn in a future release.
15269
15270 * data/glr.c (b4_location_type): Remove.
15271 (YYSTYPE): Renamed from yystype.
15272 (YYSTYPE_IS_DECLARED): New macro, used to prevent double-typedef.
15273 (struct YYLTYPE): Renamed from struct yyltype.
15274 (YYLTYPE): Renamed from yyltype.
15275 (yyltype, yystype): New (and obsolescent) macros,
15276 for backward compatibility.
15277 * data/yacc.c: Likewise.
15278
15279 * data/yacc.c (YYSTYPE): Declare as union YYSTYPE if the user
15280 does not specify a union tag. This is for compatibility with
15281 Solaris 9 yacc.
15282
15283 * src/parse-gram.y (add_param): 2nd arg is now char * not char
15284 const *, since it is now modified by stripping surrounding { }.
15285 (current_braced_code): Remove.
15286 (PERCENT_DESTRUCTOR, PERCENT_PRINTER, PERCENT_UNION,
15287 PERCENT_LEX_PARAM, PERCENT_PARSE_PARAM): Change names to include
15288 trailing " {...}". Now of type <chars>.
15289 (grammar_declaration): Adjust to bundled tokens.
15290 (code_content): Remove; stripping is now done by add_param.
15291 (print_token_value): Print contents of bundled tokens.
15292 (token_name): New function.
15293
15294 * src/reader.h (braced_code, current_braced_code): Remove.
15295 (token_name): New decl.
15296
15297 * src/scan-gram.l (handle_dollar, handle_at): Now takes int
15298 token_type, not braced_code code_kind. All uses changed.
15299 (SC_PRE_CODE): New state, for scanning after a keyword that
15300 has (or usually has) an immediately-following braced code.
15301 (token_type): New local var, to keep track of which token type
15302 to return when scanning braced code.
15303 (<INITIAL>"%destructor", <INITIAL>"%lex-param",
15304 <INITIAL>"%parse-param", <INITIAL>"%printer",
15305 <INITIAL>"%union"): Set token type and BEGIN SC_PRE_CODE
15306 instead of returning a token type immediately.
15307 (<INITIAL>"{"): Set token type.
15308 (<SC_BRACED_CODE>"}"): Use it.
15309 (handle_action_dollar, handle_action_at): Now returns bool
15310 indicating success. Fail if ! current_rule; this prevents a core dump.
15311 (handle_symbol_code_dollar, handle_symbol_code_at):
15312 Remove; merge body into caller.
15313 (handle_dollar, handle_at): Complain in invalid contexts.
15314
15315 * NEWS, doc/bison.texinfo: Document the above.
15316 * NEWS: Fix years and program names in copyright notice.
15317
15318 2002-12-17 Paul Eggert <eggert@twinsun.com>
15319
15320 * NEWS, doc/bison.texinfo (Parser Function, Pure Calling, Error
15321 Reporting, Table of Symbols): Omit mentions of %lex-param and
15322 %parse-param from the documentation for now.
15323
15324 2002-12-15 Paul Eggert <eggert@twinsun.com>
15325
15326 Undo most of the 2002-11-12 yychar -> yytoken patch, as it broke
15327 GCC 3.2.1 (which depends on yychar == YYEMPTY when there is no
15328 lookahead symbol, and which sets yychar in parser actions) and it
15329 disagreed with the Bison documentation. Bug
15330 reported by Andrew Walrond.
15331
15332 * data/yacc.c (YYTRANSLATE): Don't check for negative argument,
15333 as the caller now does that.
15334 (yyclearin, YYBACKUP, yyparse): Use yychar, not yytoken.
15335 (YYEMPTY): Parenthesize right hand side, since others use it.
15336 (yyparse): Don't assume that our generated code is the only code
15337 that sets yychar.
15338
15339 2002-12-13 Paul Eggert <eggert@twinsun.com>
15340
15341 Version 1.75d.
15342
15343 POSIX requires a "yacc" command.
15344 * src/Makefile.am (bin_SCRIPTS): New macro, for yacc.
15345 (MOSTLYCLEANFILES): Add yacc.
15346 (yacc): New rule.
15347 * doc/bison.texinfo (Invocation, Bison Options): Mention yacc
15348 as an alias for bison y.
15349
15350 * po/LINGUAS: Add da.
15351
15352 * src/getargs.c (__GNU_LIBRARY__) [lint]: Define to work around
15353 problem with latest <getopt.h>.
15354 (HACK_FOR___GNU_LIBRARY___PROTOTYPE): New macro.
15355
15356 * doc/fdl.texi: Upgrade to 1.2.
15357 * lib/alloca.c, lib/error.c, lib/getopt.c, lib/getopt.h
15358 lib/getopt1.c, lib/gettext.h, lib/memrchr.c, lib/obstack.c,
15359 lib/obstack.h, lib/strnlen.c, lib/unlocked-io.h: Sync with
15360 gnulib.
15361 * config/install-sh: Sync with autotools.
15362
15363 Fix a bad interaction with flex 2.5.23 reported by Bruce Lilly in
15364 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
15365 * data/yacc.c (YYLTYPE, struct yyltype): Do not define unless
15366 locations are requested.
15367 (union yyalloc): Do not depend on YYLTYPE_IS_TRIVIAL unless
15368 locations are requested.
15369
15370 2002-12-12 Paul Eggert <eggert@twinsun.com>
15371
15372 Remove unportable casts and storage allocation tricks.
15373 While we're at it, remove almost all casts, since they
15374 usually aren't needed and are a sign of trouble.
15375
15376 * configure.ac (AC_CHECK_TYPES): Check for uintptr_t.
15377
15378 * src/derives.c (derives_compute): Do not subtract NTOKENS from
15379 the pointer DSET returned by malloc; this isn't portable.
15380 Instead, always use DSET[i - NTOKENS] rather than DSET[i].
15381 Similarly for DERIVES.
15382 * src/lalr.c (set_goto_map): Likewise, for GOTO_MAP and TEMP_MAP.
15383 * src/nullable.c (nullable_compute): Likewise, for RSETS and NULLABLE.
15384 * src/reduce.c (reduce_grammar_tables): Likewise, for nontermmap
15385
15386 * src/derives.c (derives_compute): Do not bother invoking
15387 int_of_rule_number, since rule numbers are integers.
15388
15389 * src/files.c (concat2, tr, compute_base_name): Use xmalloc (N)
15390 rather than XMALLOC (char, N).
15391
15392 * src/files.c (filename_split): Rewrite to avoid cast.
15393
15394 * src/gram.h (symbol_number_as_item_number,
15395 item_number_as_symbol_number, rule_number_as_item_number,
15396 item_number_as_rule_number):
15397 Now inline functions rather than macros, to avoid casts.
15398 * src/state.h (state_number_as_int): Likewise.
15399 * src/tables.c (state_number_to_vector_number,
15400 symbol_number_to_vector_number): Likewise.
15401
15402 * src/gram.h (int_of_rule_number): Remove; no longer used.
15403
15404 * src/lalr.c (add_lookback_edge): Use malloc rather than calloc,
15405 since the resulting storage is always stored into.
15406
15407 * src/main.c (alloca) [C_ALLOCA]: Add decl here, the only place
15408 where it's needed.
15409
15410 * src/muscle_tab.c (muscle_m4_output):
15411 Now inline. Return bool, not int.
15412 * src/state.c (state_compare): Likewise.
15413 * src/symtab.c (symbol_check_defined,
15414 symbol_check_alias_consistency, symbol_pack, symbol_translation,
15415 hash_compare_symbol, hash_symbol):
15416 Likewise.
15417 * src/uniqstr.c (uniqstr_print): Likewise.
15418 * src/muscle_tab.c (muscle_m4_output_processor):
15419 New function, to avoid casts.
15420 * src/state.c (state_comparator, stage_hasher): Likewise.
15421 * src/symtab.c (symbol_check_defined_processor,
15422 symbol_check_alias_consistency_processor, symbol_pack_processor,
15423 symbol_translation_processor, hash_symbol_comparator,
15424 hash_symbol_hasher): Likewise.
15425 * src/uniqstr.c (uniqstr_print_processor): Likewise.
15426 * src/muscle_tab.c (muscles_m4_output):
15427 Use new functions instead of casting old functions unportably.
15428 * src/state.c (state_hash_new): Likewise.
15429 * src/symtab.c (symbols_new, symbols_do, symbols_check_defined,
15430 symbols_token_translations_init):
15431 Likewise.
15432 * src/uniqstr.c (uniqstrs_new, hash_initialize, uniqstrs_do): Likewise.
15433
15434 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): Use long local
15435 var instead of casting to long, to avoid casts.
15436 (prepare_states): Use MALLOC rather than alloca, so that we don't
15437 have to worry about alloca.
15438 * src/state.c (state_hash_lookup): Likewise.
15439
15440 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>"'"): Use unsigned char
15441 local var instead of casting to unsigned char, to avoid casts.
15442
15443 * src/state.c (TRANSITIONS_ALLOC, ERRS_ALLOC, REDUCTIONS_ALLOC,
15444 STATE_ALLOC): Remove.
15445 (transitions_new, errs_new, reductions_new, state_new): Use malloc
15446 rather than calloc, and use offsetof to avoid allocating slightly
15447 too much storage.
15448 (state_new): Initialize all members.
15449
15450 * src/state.c (state_hash): Use unsigned accumulator, not signed.
15451
15452 * src/symtab.c (symbol_free): Remove; unused.
15453 (symbol_get): Remove cast in lhs of assignment.
15454 (symbols_do): Now static. Accept generic arguments, not
15455 hashing-related ones.
15456
15457 * src/symtab.h: (NUMBER_UNDEFINED): Remove unnecessary cast.
15458 (symbol_processor): Remove.
15459 (symbols_do): Remove decl; now static.
15460
15461 * src/system.h (alloca): Remove; decl no longer needed.
15462 (<stddef.h>): Include, for offsetof.
15463 (<inttypes.>, <stdint.h>): Include if available.
15464 (uintptr_t): New type, if system lacks it.
15465 (CALLOC, MALLOC, REALLOC): New macros.
15466 All uses of XCALLOC, XMALLOC, and XREALLOC changed to use these
15467 new macros.
15468
15469 * src/tables.c (table_size): Now int, to pacify GCC.
15470 (table_grow, table_ninf_remap): Use signed table size.
15471 (save_row): Don't bother initializing locals when not needed.
15472 (default_goto, goto_actions, pack_vector): Remove unnecessary casts.
15473 * src/uniqstr.c (hash_compare_uniqstr): Likewise.
15474
15475 * src/vcg.h: Correct misspellings.
15476
15477 * src/vcg_defaults.h (G_CMAX): Now INT_MAX.
15478
15479
15480 * src/getargs.c (getargs): Don't assume EOF == -1.
15481
15482 2002-12-09 Paul Eggert <eggert@twinsun.com>
15483
15484 Change identifier spellings to avoid collisions with names
15485 that are reserved by POSIX.
15486
15487 Don't use names ending in _t, since POSIX reserves them.
15488 For consistency, remove _e and _s endings -- they're weren't
15489 needed to remove ambiguity. All uses changed.
15490 * src/uniqstr.h (uniqstr): Renamed from uniqstr_t, which in
15491 turn was just renamed from struniq_t.
15492 * src/uniqstr.c (uniqstr_processor): Renamed from struniq_processor,
15493 which in turn was just renamed from struniq_processor_t.
15494 (hash_compare_uniqstr): Renamed from hash_compare_struniq, which
15495 in turn was renamed from hash_compare_struniq_t.
15496 * src/LR0.c (struct state_list): Renamed from struct state_list_s.
15497 (state_list): Renamed from state_list_t.
15498 * src/assoc.h (assoc): Renamed from assoc_t.
15499 * src/conflicts.c (enum conflict_resolution): Renamed from
15500 enum conflict_resolution_e.
15501 * src/derives.c (struct rule_list): Renamed from struct rule_list_s.
15502 (rule_list): Renamed from rule_list_t.
15503 * src/getargs.h (enum trace): Renamed from enum trace_e.
15504 (enum report): Renamed from enum report_e.
15505 * src/gram.h (item_number): Renamed from item_number_t.
15506 (rule_number): Renamed from rule_number_t.
15507 (struct rule_s): Remove the "rule_s" part; not used.
15508 (rule): Renamed from rule_t.
15509 (rule_filter): Renamed from rule_filter_t.
15510 * src/lalr.c (struct goto_list): Renamed from struct goto_list_s.
15511 (goto_list): Renamed from goto_list_t.
15512 * src/lalr.h (goto_number): Renamed from goto_number_t.
15513 * src/location.h (location): Renamed from location_t.
15514 * src/muscle_tab.c (muscle_entry): Renamed from muscle_entry_t,
15515 and moved here from:
15516 * src/muscle_tab.h (muscle_entry_t): here.
15517 * src/nullable.c (struct rule_list): Renamed from struct rule_list_s.
15518 (rule_list): Renamed from rule_list_t.
15519 * src/print_graph.c (static_graph): Renamed from graph.
15520 * src/reader.h (braced_code): Renamed from braced_code_t.
15521 Remove brace_code_e tag.
15522 * src/relation.h (relation_node): Renamed from relation_node_t.
15523 (relation_nodes): Renamed from relation_nodes_t.
15524 (relation): Renamed from relation_t.
15525 * src/state.h (state_number): Renamed from state_number_t.
15526 (struct state): Renamed from struct state_s.
15527 (state): Renamed from state_t.
15528 (transitions): Renamed from transitions_t. Unused (and
15529 misspelled) transtion_s tag removed.
15530 (errs): Renamed from errs_t. Unused errs_s tag removed.
15531 (reductions): Renamed from reductions_t. Unused tag
15532 reductions_s removed.
15533 * src/symlist.h (symbol_list): Renamed from symbol_list_t.
15534 (struct symbol_list): Renamed from struct symbol_list_s.
15535 * src/symtab.h (symbol_number): Renamed from symbol_number_t.
15536 (struct symbol): Renamed from struct symbol_s.
15537 (symbol): Renamed from symbol_t.
15538 * src/tables.c (vector_number): Renamed from vector_number_t.
15539 (action_number): Renamed from action_t.
15540 * src/tables.h (base_number): Renamed from base_t.
15541 * src/vcg.h (enum color): Renamed from enum color_e.
15542 (enum textmode): Renamed from enum textmode_e.
15543 (enum shape): Renamed from enum shape_e.
15544 (struct colorentry): Renamed from struct colorentry_s.
15545 (struct classname): Renamed from struct classname_s.
15546 (struct infoname): Renamed from struct infoname_s.
15547 (enum layoutalgorithm): Renamed from enum layoutalgorithm_e.
15548 (enum decision): Renamed from enum decision_e.
15549 (enum orientation): Renamed from enum orientation_e.
15550 (enum alignment): Renamed from enum alignment_e.
15551 (enum arrow_mode): Renamed from enum arrow_mode_e.
15552 (enum crossing_type): Renamed from enum crossing_type_e.
15553 (enum view): Renamed from enum view_e.
15554 (struct node): Renamed from struct node_s.
15555 (node): Renamed from node_t.
15556 (enum linestyle): Renamed from enum linestyle_e.
15557 (enum arrowstyle): Renamed from enum arrowstyle_e.
15558 (struct edge): Renamed from struct edge.
15559 (edge): Renamed from edge_t.
15560 (struct graph): Renamed from struct graph_s.
15561 (graph): Renamed from graph_t.
15562 * tests/calc.at (_AT_DATA_CALC_Y, Simple LALR Calculator):
15563 Rename value_t -> value.
15564 * tests/input.at (Torturing the Scanner): Rename value_t -> value,
15565 value_t_as_yystype -> value_as_yystype.
15566
15567 Don't include <errno.h> in the mainstream code, since it
15568 reserves E[A-Z0-9]* and we want to use symbols like 'EQUALS'.
15569 * lib/get-errno.c, lib/get-errno.h: New files.
15570 * lib/Makefile.am (libbison_a_SOURCES): Add get-errno.h,
15571 get-errno.c.
15572 * src/files.c (xfopen, xfclose): Use get_errno instead of errno.
15573 * src/output.c (output_skeleton): Likewise.
15574 * src/scan-gram.l (<INITIAL>{int}): Use set_errno and get_errno
15575 instead of errno.
15576 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>\\x[0-9abcdefABCDEF]+):
15577 Likewise.
15578 (handle_action_dollar, handle_action_at): Likewise.
15579 * src/system.h: Do not include <errno.h>.
15580 (TAB_EXT): Renamed from EXT_TAB.
15581 (OUTPUT_EXT): Renamed from EXT_OUTPUT.
15582
15583 Avoid str[a-z]*, since <string.h> reserves that name space.
15584 Change all instances of "struniq" in names to "uniqstr", and
15585 likewise for "STRUNIQ" and "UNIQSTR".
15586 * src/uniqstr.c: Renamed from src/struniq.c.
15587 * src/uniqstr.h: Renamed from src/struniq.h.
15588 * src/Makefile.am (bison_SOURCES): Adjust to these renamings.
15589 * src/files.c (strsuffix): Remove; unused.
15590 (concat2): Renamed from stringappend. Now static.
15591 * src/files.h (strsuffix, stringappend): Remove; unused.
15592 * src/parse-gram.y (<chars>): Renamed from <string>.
15593 (<uniqstr>): Renamed from <struniq>.
15594 * src/scan-gram.l (obstack_for_string): Renamed from string_obstack.
15595 * src/vcg.h (struct node_s.expand): Renamed from struct node_s.stretch.
15596 (struct graph_s.expand): Renamed from struct graph_s.stretch.
15597 * src/vcg_defaults.h (G_EXPAND): Renamed from G_STRETCH.
15598 (G_LONG_STRAIGHT_PHASE): Renamed from G_STRAIGHT_PHASE.
15599 (N_EXPAND): Renamed from N_STRETCH.
15600
15601 Avoid *_MAX and *_MIN, since <limits.h> reserves that name space.
15602 * data/yacc.c (YYSTACK_GAP_MAXIMUM): Renamed from YYSTACK_GAP_MAX.
15603 * src/gram.h (ITEM_NUMBER_MAX, ITEM_NUMBER_MIN, RULE_NUMBER_MAX):
15604 Remove; unused.
15605 * src/lalr.h (GOTO_NUMBER_MAXIMUM): Renamed from GOTO_NUMBER_MAX.
15606 * src/state.h (STATE_NUMBER_MAXIMUM): Renamed from STATE_NUMBER_MAX.
15607 * src/symtab.h (SYMBOL_NUMBER_MAXIMUM): Renamed from SYMBOL_NUMBER_MAX.
15608 * src/tables.c (VECTOR_NUMBER_MAX, VECTOR_NUMBER_MIN): Remove; unused.
15609 (BASE_MAXIMUM): Renamed from BASE_MAX.
15610 (BASE_MINIMUM): Renamed from BASE_MIN.
15611 (ACTION_MAX): Remove; unused.
15612 (ACTION_NUMBER_MINIMUM): Renamed from ACTION_MIN.
15613 Unnecessary casts removed from above defines.
15614
15615
15616 Fix misspelling in names.
15617 * src/vcg.h (enum_alignment_e): Renamed from enum_alignement_e.
15618 * src/vcg_defaults.h (G_NODE_ALIGNMENT): Renamed from
15619 G_NODE_ALIGNEMENT.
15620
15621
15622 * lib/timevar.c (timevar_report): Renamed from time_report,
15623 for consistency with other names.
15624 * lib/timevar.h (timevar_report): New decl.
15625 * src/system.h (time_report): Remove; decl is now in lib/timevar.h.
15626
15627
15628 Sort include-file uses.
15629
15630 Reorder all include files under src to be in the order "system.h".
15631 then the ../lib include files in angle brackets (alphabetized),
15632 then the . include files in double-quotes (alphabetized). Fix
15633 dependency breakages encountered in this process, as follows:
15634 * src/closure.h, src/derives.h, src/state.h: Include "gram.h".
15635 * src/complain.c: Don't include stdlib.h, string.h _LIBC stuff.
15636 * src/state.h: Include "symtab.h".
15637
15638 2002-12-08 Paul Eggert <eggert@twinsun.com>
15639
15640 * data/glr.c, data/lalr1.cc, data/yacc.c: Do not use __file__,
15641 since this causes problems when __file__ contains character
15642 sequences like "@" that are treated specially by src/scan-skel.l.
15643 Instead, just use the file's basename. This fixes the bug
15644 reported by Martin Mokrejs in
15645 <http://lists.gnu.org/archive/html/bug-bison/2002-12/msg00007.html>.
15646
15647 2002-12-06 Paul Eggert <eggert@twinsun.com>
15648
15649 Add support for rules that do not have trailing semicolons, as
15650 POSIX requires. Improve the quality of locations in Bison
15651 diagnostics.
15652
15653 * src/location.c: Include <quotearg.h>.
15654 (empty_location): Now const.
15655 (location_print): New function. Follow the recommendation of the
15656 GNU Coding Standards for locations that span file boundaries.
15657 * src/location.h: Do not include <quotearg.h>; no longer needed.
15658 (boundary): New type.
15659 (location_t): Use it. This allows locations to span file boundaries.
15660 All member uses changed: file -> start.file or end.file (as needed),
15661 first_line -> start.line, first_column -> start.column,
15662 last_line -> end.line, last_column -> end.column.
15663 (equal_boundaries): New function.
15664 (LOCATION_RESET, LOCATION_STEP): Remove.
15665 (LOCATION_PRINT): Remove. All callers changed to use location_print.
15666 (empty_location): Now const.
15667 (location_print): New decl.
15668 * src/parse-gram.y (lloc_default): New function, which handles
15669 empty locations more accurately.
15670 (YYLLOC_DEFAULT): Use it.
15671 (%token COLON): Remove.
15672 (%token ID_COLON): New token.
15673 (rules): Use it.
15674 (declarations, rules): Remove trailing semicolon.
15675 (declaration, rules_or_grammar_declaration):
15676 Allow empty (";") declaration.
15677 (symbol_def): Remove empty actions; no longer needed.
15678 (rules_or_grammar_declaration): Remove trailing semicolon.
15679 (semi_colon.opt): Remove.
15680 * src/reader.h: Include location.h.
15681 (scanner_cursor): New decl.
15682 * src/reduce.c (nonterminals_reduce): Use warn_at rather than
15683 rolling our own.
15684 * src/scan-gram.l (YY_USER_INIT): Initialize scanner_cursor instead
15685 of *loc.
15686 (STEP): Remove. No longer needed, now that adjust_location does
15687 the work. All uses removed.
15688 (scanner_cursor): New var.
15689 (adjust_location): Renamed from extend_location. It now sets
15690 *loc and adjusts the scanner cursor. All uses changed.
15691 Don't bother testing for CR.
15692 (handle_syncline): Remove location arg; now updates scanner cursor.
15693 All callers changed.
15694 (unexpected_end_of_file): Now accepts start boundary of token or
15695 comment, not location. All callers changed. Update scanner cursor,
15696 not the location.
15697 (SC_AFTER_IDENTIFIER): New state.
15698 (context_state): Renamed from c_context. All uses changed.
15699 (id_loc, code_start, token_start): New local vars.
15700 (<INITIAL,SC_AFTER_IDENTIFIER>): New initial context. Move all
15701 processing of Yacc white space and equivalents here.
15702 (<INITIAL>{id}): Save id_loc. Begin state SC_AFTER_IDENTIFIER
15703 instead of returning ID immediately, since we need to search for
15704 a subsequent colon.
15705 (<INITIAL>"'", "\""): Save token_start.
15706 (<INITIAL>"%{", "{", "%%"): Save code_start.
15707 (<SC_AFTER_IDENTIFIER>): New state, looking for a colon.
15708 (<SC_YACC_COMMENT>, <SC_COMMENT>, <SC_LINE_COMMENT>):
15709 BEGIN context_state at end, not INITIAL.
15710 (<SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'",
15711 <SC_BRACED_CODE>"}", <SC_PROLOGUE>"%}", <SC_EPILOGUE><<EOF>>):
15712 Return correct token start.
15713 (<SC_BRACED_CODE,SC_PROLOGUE,SC_EPILOGUE>): Save start boundary when
15714 the start of a character, string or multiline comment is found.
15715 * tests/conflicts.at (S/R in initial, Defaulted Conflicted
15716 Reduction): Adjust reported locations to match the more-precise
15717 results now expected.
15718 * tests/input.at (Invalid $n, Invalid @n, Type Clashes): Likewise.
15719 * tests/reduce.at (Useless Rules, Reduced Automaton,
15720 Underivable Rules): Likewise.
15721 * tests/regression.at (Invalid inputs): No longer `expecting ";"
15722 or "|"' now that so many other tokens are allowed by the new grammar.
15723
15724 * src/complain.h (current_file): Remove duplicate decl;
15725 current_file is now owned by files.h.
15726 * src/complain.c, src/scan-gram.l: Include files.h.
15727
15728 2002-12-06 Paul Eggert <eggert@twinsun.com>
15729
15730 * data/glr.c (yy_reduce_print): Don't assume that yyrline[yyrule]
15731 promotes to int; it might be unsigned int.
15732 * data/yacc.c (yy_reduce_print): Likewise.
15733
15734 * doc/bison.texinfo (Table of Symbols): YYERROR_VERBOSE should
15735 be #defined in the prologue, not in the Bison declarations.
15736 This fixes Debian Bug 102878, reported by Shaul Karl.
15737
15738 2002-12-02 Paul Eggert <eggert@twinsun.com>
15739
15740 * configure.ac (AC_REPLACE_FUNCS): Add strtoul.
15741 * lib/strtoul.c: New file, from gnulib.
15742 This fixes a porting bug reported by Peter Klein in
15743 <http://lists.gnu.org/archive/html/bug-bison/2002-12/msg00000.html>.
15744
15745 2002-11-30 Paul Eggert <eggert@twinsun.com>
15746
15747 * src/scan-gram.l (no_cr_read, extend_location): Move to epilogue,
15748 and put only a forward declaration in the prologue. This is for
15749 consistency with the other scanner helper functions.
15750
15751 Type clashes now generate warnings, not errors, since it
15752 appears that POSIX may allow some grammars with type clashes.
15753 * src/reader.c (grammar_current_rule_check): Warn about
15754 type clashes instead of complaining.
15755 * tests/input.at (Type Clashes): Expect warnings, not complaints.
15756
15757 Add Yacc library, since POSIX requires it.
15758 * doc/bison.texinfo (Yacc Library): New node. Regenerate top menu.
15759 * lib/Makefile.am (lib_LIBRARIES, liby_a_SOURCES): New macros.
15760 * lib/main.c, lib/yyerror.c: New files.
15761
15762 gram_error can be static; it need not be extern.
15763 * src/reader.h (gram_error): Remove decl.
15764 * src/parse-gram.y (gram_error): Now static. Add static decl.
15765 (print_token_value): Omit parameter names from forward decl,
15766 for consistency.
15767
15768 2002-11-29 Paul Eggert <eggert@twinsun.com>
15769
15770 * doc/bison.texinfo: Emphasize that yylex and yyerror must
15771 be declared before being used. E.g., one should typically
15772 declare them in the prologue. Use GNU coding style in examples.
15773 Put "const" consistently after the type it modifies. Mention
15774 that C99 supports "inline". Mention that yyerror traditionally
15775 returns "int".
15776
15777 %parse-param and %lex-param now take just one argument, the
15778 declaration; the argument name is deduced from the declaration.
15779
15780 * doc/bison.texinfo (Parser Function, Pure Calling, Error
15781 Reporting, Table of Symbols): Document this.
15782 * src/parse-gram.y (add_param): New function.
15783 (COMMA): Remove.
15784 (declaration): Implement new rule for %parse-param and %lex-param.
15785 * src/scan-gram.l: "," now elicits a warning, rather than being
15786 a token; this is more compatible with byacc.
15787 * tests/calc.at (Simple LALR Calculator): Adopt new convention.
15788
15789 2002-11-27 Paul Eggert <eggert@twinsun.com>
15790
15791 Rename identifiers to avoid real and potential collisions.
15792
15793 * data/c.m4 (b4_yysymprint_generate): yyout -> yyoutput,
15794 to avoid collision with lex macro described by Bruce Lilly in
15795 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
15796 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
15797 * doc/bison.texinfo (Prologue, Tracing): yyprint -> print_token_value.
15798 * src/parse-gram.y (print_token_value): Renamed from yyprint.
15799 All uses changed.
15800 (YYPARSE_PARAM, YYLEX_PARAM, yycontrol): Remove. All uses changed.
15801 The name "yycontrol" violates the name space rules, and this stuff
15802 wasn't being used anyway.
15803 (input): Remove action; this stuff wasn't being used.
15804 (gram_error): Rename local variable yylloc -> loc.
15805 * src/reader.h (struct gram_control_s, gram_control_t): Remove.
15806 (YY_DECL): Don't use "yy" at start of local variables.
15807 All uses changed, e.g., yylloc -> loc.
15808 * src/scan-gram.l (STEP): Renamed from YY_STEP. All uses changed.
15809 (STRING_GROW): Renamed from YY_OBS_GROW. All uses changed.
15810 (STRING_FINISH): Renamed from YY_OBS_FINISH. All uses changed.
15811 (STRING_FREE): Renamed from YY_OBS_FREE. All uses changed.
15812
15813 * src/parse-gram.y (gram_error): loc is now const *.
15814 * src/reader.h (gram_error): Likewise.
15815
15816 2002-11-24 Paul Eggert <eggert@twinsun.com>
15817
15818 Version 1.75c.
15819
15820 * tests/actions.at (Actions after errors): Use an output format
15821 more similar to that of the Printers and Destructors test.
15822 Test the position of the ';' token too.
15823 (Printers and Destructors): Likewise.
15824 (Printers and Destructors: %glr-parser): Remove for now, to avoid
15825 unnecessarily alarming people when the test fails.
15826
15827 * data/yacc.c (yyerrlab1): Move this label down, so that the
15828 parser does not discard the lookahead token if the user code
15829 invokes YYERROR. This change is required for POSIX conformance.
15830
15831 * lib/error.c: Sync with gnulib.
15832
15833 2002-11-22 Paul Eggert <eggert@twinsun.com>
15834
15835 * lib/quotearg.c, lib/quotearg.h: Sync with gnulib.
15836 * lib/mbswidth.c, lib/mbswidth.h: Likewise.
15837 * lib/xmalloc.c: Likewise.
15838
15839 2002-11-20 Paul Eggert <eggert@twinsun.com>
15840
15841 * lib/argmatch.c, lib/argmatch.h: Sync with gnulib.
15842
15843 2002-11-20 Paul Eggert <eggert@twinsun.com>
15844
15845 Avoid use of <assert.h>, as the GNU Coding Standards hint that one
15846 should use `if (! x) abort ();' rather than `assert (x);', and
15847 anyway it's one less thing to worry about configuring.
15848
15849 * data/glr.c, lib/hash.c, src/system.h: Do not include <assert.h>.
15850 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise,
15851 and replace all instances of assert with abort.
15852 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
15853 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Likewise.
15854
15855 * data/glr.c (yydoAction, yyglrReduce, yysplitStack, yyresolveStates,
15856 yyresolveAction, yyprocessOneStack): Use abort rather than assert.
15857 * lib/hash.c (hash_lookup, hash_get_first, hash_get_next,
15858 hash_find_entry, hash_rehash, hash_insert): Likewise.
15859 * src/conflicts.c (resolve_sr_conflict): Likewise.
15860 * src/lalr.c (set_goto_map, map_goto): Likewise.
15861 * src/nullable.c (nullable_compute): Likewise.
15862 * src/output.c (prepare_rules, token_definitions_output): Likewise.
15863 * src/reader.c (packgram, reader): Likewise.
15864 * src/state.c (state_new, state_free, state_transitions_set,
15865 state_reduction_find): Likewise.
15866 * src/symtab.c (symbol_user_token_number_set, symbol_make_alias,
15867 symbol_pack): Likewise.
15868 * src/tables.c (conflict_row, pack_vector): Likewise.
15869 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
15870 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
15871 get_node_alignement_str, get_arrow_mode_str, get_crossing_type_str,
15872 get_view_str, get_linestyle_str, get_arrowstyle_str): Likewise.
15873
15874 * lib/argmatch.h (ARRAY_CARDINALITY): Do not bother to #undef.
15875 (ARGMATCH_CONSTRAINT): New macro.
15876 (ARGMATCH_ASSERT): Use it.
15877
15878 * src/system.h (verify): New macro.
15879 * src/getargs.c (trace_argmatch, report_argmatch): Use verify
15880 rather than assert.
15881 * src/tables.c (tables_generate): Likewise.
15882
15883 * src/struniq.c (struniq_assert): Now returns void, and aborts
15884 if the assertion is false.
15885 (struniq_assert_p): Remove.
15886 * src/struniq.h: Likewise.
15887
15888 2002-11-18 Paul Eggert <eggert@twinsun.com>
15889
15890 * data/glr.c (yygetLRActions): Replace `yyindex' with
15891 `yytable[yyindex]' to fix typo introduced in my 2002-11-09 patch.
15892 This fixes the regression with Sun ONE Studio 7 cc that I reported in
15893 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00077.html>.
15894
15895 2002-11-18 Akim Demaille <akim@epita.fr>
15896
15897 * doc/bison.texinfo (Tracing): `yyprint' shouldn't prepend a
15898 space.
15899 From Tim Van Holder.
15900
15901 2002-11-17 Paul Eggert <eggert@twinsun.com>
15902
15903 Pacify Sun ONE Studio 7 lint. Also, rename "ParseError"
15904 to "SyntaxError" for consistency with my 2002-11-15 change.
15905
15906 * data/glr.c (YYDPRINTF, YYDSYMPRINT, YYDSYMPRINTF) [!YYDEBUG]: Do
15907 not define to {}, since this breaks the common use of `YYDPRINTF
15908 ((...));' if a single statement is desired (e.g. before `else').
15909 Work around GCC warnings by surrounding corresponding calls with
15910 {} if needed.
15911 (yyhasResolvedValue): Remove unused function.
15912 (yymergeOptionSets, yyresolvStack): Use `continue;' for empty
15913 loop body.
15914 (yyreportSyntaxError): Renamed from yyreportParseError.
15915 (yyrecoverSyntaxError): Renamed from yyrecoverParseError.
15916 All uses changed.
15917 * tests/calc.at (_AT_DATA_CALC_Y): Make vars static instead of
15918 extern when possible. Remove unused initializations.
15919
15920 2002-11-16 Akim Demaille <akim@epita.fr>
15921
15922 Augment the similarity between GLR and LALR traces.
15923
15924 * data/yacc.c (yy_stack_print, YY_STACK_PRINT, yy_reduce_print)
15925 (YY_REDUCE_PRINT): New.
15926 (yyparse): Use them.
15927 * data/glr.c (yy_reduce_print): Use YYFPRINTF, no need for
15928 YYDPRINT here.
15929 (yyglrReduce, yyrecoverParseError, yyparse): Don't report the
15930 state reached after the reduction/recovery, since...
15931 (yyparse, yyprocessOneStack): Report the state we are entering in.
15932
15933 2002-11-16 Akim Demaille <akim@epita.fr>
15934
15935 * src/getargs.h, src/getargs.c (trace_e, trace_args, trace_types):
15936 Add support for --trace=skeleton.
15937 * src/scan-skel.l: %option debug.
15938 Scan strings of non-@ or \n instead of character by character.
15939 (scan_skel): Handle trace_skeleton.
15940 (QPUTS): New.
15941 (@output_parser_name@, @output_header_name@): ``Restore'' their
15942 support (used to be M4 macros).
15943 * data/yacc.c: Quote larger chunks, a la glr.c.
15944 * data/lalr1.cc: Likewise.
15945 The header guards are no longer available, so use some other
15946 string than `YYLSP_NEEDED'.
15947
15948 2002-11-16 Akim Demaille <akim@epita.fr>
15949
15950 Make the ``Printers and Destructors'' test more verbose, taking
15951 `yacc.c''s behavior as (possibly wrong) reference.
15952
15953 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use printf
15954 instead of fprint on stdout.
15955 Set and report the last_line of the symbols.
15956 Consistently display values and locations.
15957
15958 2002-11-16 Paul Eggert <eggert@twinsun.com>
15959
15960 * data/yacc.c: Avoid over-quoting of __line__ and __file__.
15961
15962 2002-11-15 Paul Eggert <eggert@twinsun.com>
15963
15964 * tests/actions.at (Actions after errors): New test case.
15965
15966 * data/glr.c, data/lalr1.cc, data/yacc.cc, doc/bison.texinfo,
15967 src/conflicts.c, src/parse-gram.y, src/tables.c, src/tables.h,
15968 tests/action.at, tests/calc.at, tests/conflicts.at,
15969 tests/cxx-type.at, tests/regression.at:
15970 "parse error" -> "syntax error" for POSIX compatibility.
15971 "parsing stack overflow..." -> "parser stack overflow" so
15972 that code matches Bison documentation.
15973
15974 2002-11-15 Akim Demaille <akim@epita.fr>
15975
15976 * src/parse-gram.y (declaration): Have %parse-param and %lex-param
15977 take two BRACED_CODE, not two string_content.
15978 Free the scanner's obstack when we are done.
15979 (code_content): New.
15980 * tests/calc.at: Adjust.
15981 * doc/bison.texinfo: Adjust.
15982 Also, make sure to include the `,' for these declarations.
15983
15984 2002-11-15 Tim Van Holder <tim.van.holder@pandora.be>
15985
15986 * m4/prereq.m4: Removed the commented jm_PREREQ_HASH
15987 definition; avoids potential autoreconf problems.
15988
15989 2002-11-15 Akim Demaille <akim@epita.fr>
15990
15991 Always check the value returned by yyparse.
15992
15993 * tests/calc.at (_AT_DATA_CALC_Y): Have `main' exit with the value
15994 returned by yyparse.
15995 (_AT_CHECK_CALC_ERROR): Take the expected exit value as argument.
15996 Adjust calls.
15997 * tests/glr-regr1.at (glr-regr1.y): Have `main' exit with the value
15998 returned by yyparse.
15999
16000 2002-11-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16001
16002 * data/glr.c (yyFail): Always set yyerrflag. Corrects regression
16003 on input.at test.
16004
16005 2002-11-14 Paul Eggert <eggert@twinsun.com>
16006
16007 * src/output.c (output_skeleton): Call xfopen instead of
16008 duplicating xfopen's body.
16009
16010 Fix bugs reported by Nelson H. F. Beebe in
16011 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00078.html>.
16012
16013 * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that
16014 "$CC -E foo.h" is allowed, as this doesn't work with the Portland
16015 Group compiler. Instead, use "$CC -E bar.c". Include the .h
16016 file twice in the grammar, as an extra check.
16017
16018 * tests/input.at (Torturing the Scanner): Surround the
16019 backslash-newline tests with "#if 0", to make it less likely that
16020 we'll run into compiler bugs. Bring back solitary \ inside
16021 comment, but add a closing comment to work around HP C bug. Don't
16022 test backslash-newline in C character constant.
16023
16024 2002-11-14 Akim Demaille <akim@epita.fr>
16025
16026 * tests/synclines.at (AT_SYNCLINES_COMPILE): Ignore the exit
16027 status of the compiler.
16028 Calling `exit 1' is no longer needed.
16029 Reported by Nelson H. F. Beebe.
16030
16031 2002-11-14 Akim Demaille <akim@epita.fr>
16032
16033 * tests/atlocal.in (CPPFLAGS): We have config.h.
16034 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR):
16035 New.
16036 * tests/actions.at, tests/calc.at, tests/conflicts.at,
16037 * tests/cxx-type.at, tests/glr-regr1.at, tests/headers.at,
16038 * tests/regression.at, tests/torture.at: Use them for all the
16039 grammars that are to be compiled.
16040 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Rename as...
16041 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): this.
16042 * doc/bison.texinfo (GLR Parsers): Document `inline'.
16043
16044 2002-11-14 Akim Demaille <akim@epita.fr>
16045
16046 * doc/bison.texinfo: Various formatting changes (alignments in
16047 samples, additional @group/@end group, GCS in samples.
16048 Use @deffn instead of simple @table to define the directives,
16049 macros, variables etc.
16050
16051 2002-11-13 Paul Eggert <eggert@twinsun.com>
16052
16053 Fix some bugs reported by Albert Chin-A-Young in
16054 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00066.html>.
16055
16056 * tests/input.at (Torturing the Scanner): Don't invoke "cc a.c b.c
16057 -o c"; the HP C compiler chatters during compilation.
16058 Instead, invoke "cc -c a.c -o a.o; cc -c b.c -o b.o; cc a.o b.o -o c".
16059 * tests/headers.at (export YYLTYPE): Likewise.
16060
16061 * tests/input.at (Torturing the Scanner): Remove lines containing
16062 solitary backslashes, as they tickle a bug in the HP C compiler.
16063
16064 * tests/glr-regr1.at (Badly Collapsed GLR States): Avoid //
16065 comments, since they're not portable. Use GNU coding style.
16066
16067 2002-11-13 Akim Demaille <akim@epita.fr>
16068
16069 * data/yacc.c: Leave bigger chunks of quoted text.
16070 (YYDSYMPRINTF): New.
16071 Use it to report symbol activities.
16072 * data/glr.c (YYDSYMPRINTF): New.
16073 Use it.
16074
16075 2002-11-12 Paul Eggert <eggert@twinsun.com>
16076
16077 Version 1.75b.
16078
16079 * data/glr.c (yydoAction): Return YYRESULTTAG, not int.
16080 (yyglrReduce): Return yyok, not 0.
16081 This should avoid the enumerated-type warnings reported
16082 by Nelson H. F. Beebe in
16083 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00057.html>.
16084
16085 * lib/bbitset.h (BITSET_INLINE): Remove.
16086 * lib/bitset.h [! BITSET_INLINE]: Remove.
16087 (bitset_set, bitset_reset, bitset_test): Rename local vars
16088 to avoid shadowing warnings by GCC.
16089
16090 * data/glr.c (inline): Remove #define. It's the user's
16091 responsibility to #define it away, just like 'const'.
16092 This fixes one of the bugs reported by Nelson H. F. Beebe in
16093 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00058.html>.
16094
16095 * Makefile.maint (po-check): Scan .l and .y files instead of the
16096 .c and the .h files that they generate. This fixes the bug
16097 reported by Tim Van Holder in:
16098 <http://lists.gnu.org/archive/html/bison-patches/2002-11/msg00062.html>
16099 Look for N_ as well as for _. Try to avoid matching #define for
16100 N_ and _.
16101 * po/POTFILES.in: Remove src/parse-gram.c, src/scan-gram.c,
16102 src/system.h. Add src/parse-gram.y, src/scan-gram.l.
16103 * src/scan-gram.l: Revamp regular expressions so that " and '
16104 do not confuse xgettext.
16105
16106 * src/struniq.h (struniq_new): Do not declare the return type
16107 to be 'const'; this violates the C standard.
16108 * src/struniq.c (struniq_new): Likewise.
16109
16110 2002-11-12 Albert Chin-A-Young <china@thewrittenword.com>
16111
16112 * src/Makefile.am (LDADD): Link $(LIBINTL) last to avoid the
16113 duplicate definition of optind on Tru64 UNIX 4.0D with the Compaq
16114 linker.
16115
16116 2002-11-12 Akim Demaille <akim@epita.fr>
16117
16118 * Makefile.maint: Sync with Autoconf:
16119 (local_updates): New.
16120
16121 2002-11-12 Akim Demaille <akim@epita.fr>
16122
16123 * po/POTFILES.in (src/lalr.c, src/state.c): Remove
16124
16125 2002-11-12 Akim Demaille <akim@epita.fr>
16126
16127 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Display the
16128 locations.
16129
16130 2002-11-12 Akim Demaille <akim@epita.fr>
16131
16132 * data/c.m4 (b4_yysymprint_generate): Pass *yyvaluep to YYPRINT,
16133 not yyvalue.
16134
16135 2002-11-12 Akim Demaille <akim@epita.fr>
16136
16137 * tests/actions.at (AT_CHECK_PRINTER_AND_DESTRUCTOR): New.
16138 Use it to test the GLR parser.
16139
16140 2002-11-12 Akim Demaille <akim@epita.fr>
16141
16142 * tests/regression.at (input.y): s/YYEOF/MYEOF/, as the skeleton
16143 defines it.
16144 * data/glr.c (yystos): New.
16145 (b4_yysymprint_generate, b4_yydestruct_generate): Invoke.
16146 (YYDSYMPRINT): New.
16147 (yyval): Don't define it, it is handled via M4.
16148 (yyrecoverParseError): Free verbosely the discarded symbols.
16149 * data/yacc.c (yysymprint): Remove, rather...
16150 (b4_yysymprint_generate): invoke.
16151 * data/c.m4 (b4_yysymprint_generate): New.
16152 Accept pointers as arguments, as opposed to the version from
16153 yacc.c.
16154 (b4_yydestruct_generate): Likewise.
16155 * tests/cations.at (Printers and Destructors): Use Bison directives
16156 instead of CPP macros.
16157 Don't rely on internal details.
16158
16159 2002-11-12 Akim Demaille <akim@epita.fr>
16160
16161 * data/c.m4 (b4_yydestruct_generate, b4_symbol_actions): New.
16162 * data/yacc.c: Rename yychar1 as yytoken, as in glr.c.
16163 Don't work on yychar (i.e., do set it to YYEMPTY, don't match
16164 it against YYEMPTY and so forth), work on yytoken (i.e., set
16165 it to YYEMPTY etc.).
16166 (yydestruct): Replace with a b4_yydestruct_generate invocation.
16167 (b4_symbol_actions): Remove.
16168 * data/glr.c (YYTRANSLATE): As for yacc.c, if negative, it stands
16169 for 0, end-of-input.
16170
16171 2002-11-12 Akim Demaille <akim@epita.fr>
16172
16173 * doc/bison.texinfo (Destructor Decl): New.
16174
16175 2002-11-12 Akim Demaille <akim@epita.fr>
16176
16177 * src/tables.c (tables_generate): Use free for pointers that
16178 cannot be NULL, not XFREE.
16179 (pack_vector): Use assert, not fatal, for bound violations.
16180 * src/state.c (state_new): Likewise.
16181 * src/reader.c (reader): Likewise.
16182 * src/lalr.c (set_goto_map): Likewise.
16183 * src/location.h (LOCATION_PRINT): If first_line is 0, just issue
16184 the file name.
16185
16186 2002-11-12 Akim Demaille <akim@epita.fr>
16187
16188 * src/scan-gram.l, src/reader.h (scanner_last_string_free):
16189 Restore.
16190 * src/scan-gram.l (last_string): Is global to the file, not to
16191 yylex.
16192 * src/parse-gram.y (input): Don't append the epilogue here,
16193 (epilogue.opt): do it here, and free the scanner's obstack.
16194 * src/reader.c (epilogue_set): Rename as...
16195 (epilogue_augment): this.
16196 * data/c.m4 (b4_epilogue): Defaults to empty.
16197
16198 2002-11-12 Akim Demaille <akim@epita.fr>
16199
16200 * src/getargs.c (long_options): Remove duplicates.
16201 * src/vmsgetargs.c, src/build.com, src/bison.cld, src/vmshlp.mar:
16202 Remove.
16203 * doc/bison.rnh: Remove.
16204 * doc/bison.texinfo (VMS Invocation): Remove.
16205
16206 2002-11-12 Akim Demaille <akim@epita.fr>
16207
16208 * src/struniq.h, src/struniq.c (struniq_t): Is const.
16209 (STRUNIQ_EQ, struniq_assert, struniq_assert_p): New.
16210
16211 Use struniq for symbols.
16212
16213 * src/symtab.h (symbol_t): The tag member is a struniq.
16214 (symbol_type_set): Adjust.
16215 * src/symtab.c (symbol_new): Takes a struniq.
16216 (symbol_free): Don't free the tag member.
16217 (hash_compare_symbol_t, hash_symbol_t): Rename as...
16218 (hash_compare_symbol, hash_symbol): these.
16219 Use the fact that tags as struniqs.
16220 (symbol_get): Use struniq_new.
16221 * src/symlist.h, src/symlist.c (symbol_list_n_type_name_get):
16222 Returns a strniq.
16223 * src/reader.h (merger_list, grammar_currentmerge_set): The name
16224 and type members are struniqs.
16225 * src/reader.c (get_merge_function)
16226 (grammar_current_rule_merge_set): Adjust.
16227 (TYPE, current_type): Are struniq.
16228
16229 Use struniq for file names.
16230
16231 * src/files.h, src/files.c (infile): Split into...
16232 (grammar_file, current_file): these.
16233 * src/scan-gram.c (YY_USER_INIT, handle_syncline): Adjust.
16234 * src/reduce.c (reduce_print): Likewise.
16235 * src/getargs.c (getargs): Likewise.
16236 * src/complain.h, src/complain.c: Likewise.
16237 * src/main.c (main): Call struniqs_new early enough to use it for
16238 file names.
16239 Don't free the input file name.
16240
16241 2002-11-12 Akim Demaille <akim@epita.fr>
16242
16243 * src/symtab.c (symbol_free): Remove dead deactivated code:
16244 type_name are properly removed.
16245 Don't use XFREE to free items that cannot be NULL.
16246 * src/struniq.h, src/struniq.c: New.
16247 * src/main.c (main): Initialize/free struniqs.
16248 * src/parse-gram.y (%union): Add astruniq member.
16249 (yyprint): Adjust.
16250 * src/scan-gram.l (<{tag}>): Return a struniq.
16251 Free the obstack bit that used to store it.
16252 * src/symtab.h (symbol_t): The 'type_name' member is a struniq.
16253
16254 2002-11-11 Paul Eggert <eggert@twinsun.com>
16255
16256 Revamp to fix many (but not all) of the C- and M4-related quoting
16257 problems. Among other things, this fixes the Bison bug reported
16258 by Jan Hubicka when processing the Bash grammar; see:
16259 <http://lists.gnu.org/archive/html/bison-patches/2002-11/msg00039.html>
16260
16261 Use new @ escapes consistently. Represent brackets with @{ and @}
16262 rather than @<:@ and @:>@, since this works a bit better with dumb
16263 editors like vi. Represent @ with @@, since @ is now consistently
16264 an escape. Use @oline@ and @ofile@ rather than __oline__ and
16265 __ofile__, to avoid unexpected expansions. Similarly, use @output
16266 rather than #output.
16267
16268 * data/c.m4 (b4_copyright): Omit file name from comment, since
16269 the file name could contain "*/".
16270 (b4_synclines_flag): Don't quote the 2nd argument; it should already
16271 be quoted. All uses changed.
16272
16273 * data/glr.c: Use new @ escapes consistently.
16274 (b4_input_suffix, b4_output_parser_suffix, b4_output_parser_name,
16275 b4_output_header_suffix, b4_output_header_name, b4_header_guard):
16276 Remove, since they couldn't handle arbitrary characters in file
16277 names.
16278 * data/lalr1.cc: Likewise.
16279 * data/yacc.c: Likewise.
16280
16281 * src/files.c (output_infix): Remove; all uses removed.
16282 * src/files.h: Likewise.
16283
16284 * data/glr.c: Remove use of "#ifdef b4_header_guard", since it
16285 mishandled funny characters in file names, and anyway it isn't
16286 needed any more.
16287 * data/yacc.c: Likewise.
16288 * data/lalr1.cc: Use YYSLP_NEEDED instead of b4_header_guard.
16289
16290 * data/glr.c (YYSTYPE_IS_TRIVIAL): Define when the .h file would.
16291 * data/yacc.c: Likewise.
16292
16293 * src/muscle_tab.c: Include quotearg.h, since we need to quote C
16294 strings now.
16295 (muscle_init): Quote filename as a C string.
16296 * src/muscle_tab.h (MUSCLE_GROW_STRING_PAIR): Remove; unused.
16297 (MUSCLE_OBSTACK_SGROW, MUSCLE_INSERT_C_STRING): New macros.
16298 * src/output.c (escaped_file_name_output): New function.
16299 (prepare_symbols): Quote tokens for M4.
16300 (prepare): Don't insert output_infix, output_prefix,
16301 output_parser_name, output_header_name; this is now down by scan-skel.
16302 Insert skeleton as a C string.
16303
16304 * src/output.c (user_actions_output, symbol_destructors_output,
16305 symbol_printers_output): Quote filenames for C and M4.
16306 * src/reader.c (prologue_augment, epilogue_set): Likewise.
16307
16308 * src/scan-gram.l (<SC_CHARACTER>): Don't worry about any backslash
16309 escapes other than \\ and \'; this simplifies the code.
16310 (<SC_STRING>): Likewise, for \\ and \".
16311 (<SC_COMMENT,SC_LINE_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,
16312 SC_PROLOGUE,SC_EPILOGUE>): Escape $ and @, too.
16313 Use new escapes @{ and @} for [ and ].
16314
16315 * src/scan-skel.l (yylineno, yyoutname): Remove static vars, replacing
16316 them with auto vars.
16317 Switch to new escape scheme, where @ is the escape character uniformly.
16318 Abort if a stray escape character is found. Avoid unbounded input
16319 buffer when parsing non-escaped text.
16320
16321 * tests/input.at (Torturing the Scanner): Add tests that @oline@,
16322 __oline__, #output, $@, and @{ do not have unintended meanings.
16323
16324 2002-11-09 Paul Eggert <eggert@twinsun.com>
16325
16326 Fix the test failure due to GCC warnings described in
16327 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00000.html>.
16328 * data/glr.c (yyis_pact_ninf, yyis_table_ninf): New macros, which
16329 evaluate to 0 if it's impossible for NINF to be in the respective
16330 table.
16331 (yygetLRActions, yyrecoverParseError): Use them.
16332
16333 * src/scan-gram.l (unexpected_end_of_file): Fix bug: columns were
16334 counted in the token inserted at end of file. Now takes
16335 location_t *, not location_t, so that the location can be
16336 adjusted. All uses changed.
16337
16338 * tests/regression.at (Invalid inputs): Adjust wording in
16339 diagnostic to match the new behavior.
16340
16341 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR,
16342 AT_DATA_HORIZONTAL_GRAMMAR, AT_DATA_LOOKAHEADS_GRAMMAR,
16343 AT_DATA_STACK_TORTURE): Replace `assert (x);' with `if (! (x))
16344 abort ();'. This reduces the runtime of the "Many lookaheads"
16345 test from 27.6 to 2.7 minutes on a 440 MHz Ultrasparc III running
16346 GCC 3.2.
16347
16348 2002-11-07 Paul Eggert <eggert@twinsun.com>
16349
16350 * src/parse-gram.y (CHARACTER): Remove unused token.
16351 All uses removed.
16352
16353 * src/scan-gram.l: Remove stack option. We no longer use the
16354 stack, since the stack was never deeper than 1; instead, use the
16355 new auto var c_context to record the stacked value.
16356
16357 Remove nounput option. At an unexpected end of file, we now unput
16358 the minimal input necessary to end cleanly; this simplifies the
16359 code.
16360
16361 Avoid unbounded token sizes where this is easy.
16362
16363 (unexpected_end_of_file): New function.
16364 Use it to systematize the error message on unexpected EOF.
16365 (last-string): Now auto, not static.
16366 (YY_OBS_FREE): Remove unnecessary do while (0) wrapper.
16367 (scanner_last_string_free): Remove; not used.
16368 (percent_percent_count): Move decl to just before use.
16369 (SC_ESCAPED_CHARACTER): Return ID at unexpected end of file,
16370 not the (never otherwised-used) CHARACTER.
16371
16372 2002-11-07 Akim Demaille <akim@epita.fr>
16373
16374 Let yyerror always receive the msg as last argument, so that
16375 yyerror can be variadic.
16376
16377 * data/yacc.c (b4_yyerror_args): New.
16378 Use it when calling yyerror.
16379 * data/glr.c (b4_yyerror_args, b4_lyyerror_args): New.
16380 Use it when calling yyerror.
16381 * doc/bison.texinfo (Error Reporting): Adjust.
16382 * tests/calc.at (_AT_DATA_CALC_Y): Adjust.
16383 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Adjust.
16384
16385 2002-11-06 Akim Demaille <akim@epita.fr>
16386
16387 #line should have quoted strings.
16388 Ideally, this should be done by m4_quotearg.
16389
16390 * src/scan-skel.l: Include quotearg.h.
16391 Quote __ofile__.
16392 * src/output.c (symbol_printers_output)
16393 (symbol_destructors_output): Quote the file name.
16394
16395 2002-11-06 Akim Demaille <akim@epita.fr>
16396
16397 * tests/regression.at (Invalid inputs): Adjust to the recent
16398 messages.
16399
16400 2002-11-06 Akim Demaille <akim@epita.fr>
16401
16402 Restore --no-lines.
16403 Reported by Jim Kent.
16404
16405 * data/c.m4 (b4_syncline): New.
16406 * data/glr.c, data/yacc.c, data/lalr1.cc: Use it.
16407 * src/reader.c (prologue_augment, epilogue_set): Use b4_syncline.
16408 * src/output.c (user_actions_output): Likewise.
16409 (prepare): Define 'b4_synclines_flag'.
16410 * src/muscle_tab.c (muscle_init): Don't define b4_linef.
16411
16412 2002-11-06 Akim Demaille <akim@epita.fr>
16413
16414 * src/main.c (main): Free `infile'.
16415 * src/scan-gram.l (handle_syncline): New.
16416 Recognize `#line'.
16417 * src/output.c (user_actions_output, symbol_destructors_output)
16418 (symbol_printers_output): Use the location's file name, not
16419 infile.
16420 * src/reader.c (prologue_augment, epilogue_set): Likewise.
16421
16422 2002-11-05 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16423
16424 * src/tables.c (matching_state): Don't allow states to match if
16425 either has GLR conflict entries.
16426
16427 2002-11-05 Paul Eggert <eggert@twinsun.com>
16428
16429 * src/scan-gram.l: Use more accurate diagnostics, e.g.
16430 "integer out of range" rather than "invalid value".
16431 * tests/input.at (Invalid $n, Invalid @n): Change expected wording
16432 accordingly.
16433
16434 Scan <% and %> digraphs in C code as POSIX 1003.1-2001 requires.
16435 Also, remove one static variable in the scanner.
16436
16437 * src/scan-gram.l (braces_level): Now auto, not static.
16438 Initialize to zero if the compiler is being picky.
16439 (INITIAL): Clear braces_level instead of incrementing it.
16440 (SC_BRACED_CODE): Treat <% and %> as { and } when inside C code,
16441 as POSIX 1003.1-2001 requires.
16442 * src/system.h (IF_LINT): New macro, taken from coreutils.
16443 * configure.ac: Define "lint" if --enable-gcc-warnings.
16444
16445 2002-11-05 Akim Demaille <akim@epita.fr>
16446
16447 * src/scan-gram.l: When it starts with `%', complain about the
16448 whole directive, not just that `invalid character: %'.
16449
16450 2002-11-04 Akim Demaille <akim@epita.fr>
16451
16452 * Makefile.maint: Update from Autoconf.
16453 (update, cvs-update, po-update, do-po-update): New.
16454
16455 2002-11-04 Akim Demaille <akim@epita.fr>
16456
16457 * tests/glr-regr1.at (Badly Collapsed GLR States): Prototype yylex
16458 and yyerror.
16459 Have yyerror `use' its arguments.
16460 * tests/calc.at (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF
16461 returns true when location & yacc & pure & parse-param.
16462 (_AT_DATA_CALC_Y): Let yyerror ``use'' its arguments.
16463
16464 2002-11-04 Akim Demaille <akim@epita.fr>
16465
16466 * src/location.h (LOCATION_PRINT): Use quotearg slot 3 to avoid
16467 clashes.
16468 * src/scan-gram.l: Use [\'] instead of ['] to pacify
16469 font-lock-mode.
16470 Use complain_at.
16471 Use quote, not quote_n since LOCATION_PRINT no longer uses the
16472 slot 0.
16473
16474 2002-11-03 Paul Eggert <eggert@twinsun.com>
16475
16476 * src/reader.c (get_merge_function, grammar_current_rule_check):
16477 Use consistent diagnostics for reporting type name clashes.
16478 Quote the types with <>, for consistency with Yacc.
16479 * tests/input.at (Type Clashes): Adjust to diagnostic changes.
16480
16481 2002-11-03 Akim Demaille <akim@epita.fr>
16482
16483 * data/c.m4 (b4_identification, b4_user_args, b4_parse_param):
16484 New.
16485 * data/yacc.m4 (b4_pure_args, b4_Pure_args): New.
16486 (b4_parse_param): Remove.
16487 Use b4_identification.
16488 Propagate b4_pure_args where needed to pass them to yyerror.
16489 * data/glr.m4 (b4_parse_param): Remove.
16490 (b4_user_formals, b4_pure_args, b4_pure_formals, b4_lpure_args)
16491 (b4_lpure_formals): New.
16492 Use b4_identification.
16493 (YY_USER_FORMALS, YY_USER_ARGS): Remove, replaced by
16494 b4_user_formals and b4_user_args.
16495 (yyexpandGLRStack, yyFail, yyaddDeferredAction, yyglrShiftDefer)
16496 (yyreportAmbiguity): When using a pure parser, also need
16497 the location, and the parse-params.
16498 Adjust callers.
16499 (yyuserAction, yyglrShift, yyreportParseError, yyrecoverParseError):
16500 When using a pure parser, also need the parse-params.
16501 Adjust callers.
16502 * tests/calc.at: Test pure (%pure-parser) and absolutely pure
16503 (%pure-parser + %parse-param) LALR and GLR parsers.
16504 (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): New, define AT_PARAM_IF,
16505 AT_LOCATION_IF, AT_PURE_IF, AT_GLR_IF, AAT_PURE_AND_LOC_IF,
16506 AT_GLR_OR_PARAM_IF, AT_YYERROR_ARG_LOC_IF, AT_YYERROR_SEES_LOC_IF.
16507 (_AT_DATA_CALC_Y): Equip for purity of yyerror.
16508 (_AT_CHECK_CALC_ERROR): Use AT_YYERROR_SEES_LOC_IF.
16509 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Equip for yyerror purity.
16510 * doc/bison.texinfo: Untabify the whole file.
16511 (Parser Function): Document %parse-param, deprecate YYPARSE_PARAM.
16512 (Pure Calling): Document %lex-param, deprecate YYLEX_PARAM.
16513 (Error Reporting): Adjust to these new directives.
16514 Document %error-verbose, deprecate YYERROR_VERBOSE.
16515
16516 2002-11-03 Akim Demaille <akim@epita.fr>
16517
16518 * tests/calc.at: Change all the AT_CHECK_CALC_LALR and
16519 AT_CHECK_CALC_GLR invocations to use % directives, instead of
16520 command line options.
16521 * tests/cxx-type.at: Formatting changes.
16522
16523 2002-11-03 Paul Eggert <eggert@twinsun.com>
16524
16525 * src/scan-gram.l: Revamp to fix POSIX incompatibilities,
16526 to count columns correctly, and to check for invalid inputs.
16527
16528 Use mbsnwidth to count columns correctly. Account for tabs, too.
16529 Include mbswidth.h.
16530 (YY_USER_ACTION): Invoke extend_location rather than LOCATION_COLUMNS.
16531 (extend_location): New function.
16532 (YY_LINES): Remove.
16533
16534 Handle CRLF in C code rather than in Lex code.
16535 (YY_INPUT): New macro.
16536 (no_cr_read): New function.
16537
16538 Scan UCNs, even though we don't fully handle them yet.
16539 (convert_ucn_to_byte): New function.
16540
16541 Handle backslash-newline correctly in C code.
16542 (SC_LINE_COMMENT, SC_YACC_COMMENT): New states.
16543 (eols, blanks): Remove. YY_USER_ACTION now counts newlines etc.;
16544 all uses changed.
16545 (tag, splice): New EREs. Do not allow NUL or newline in tags.
16546 Use {splice} wherever C allows backslash-newline.
16547 YY_STEP after space, newline, vertical-tab.
16548 ("/*"): BEGIN SC_YACC_COMMENT, not yy_push_state (SC_COMMENT).
16549
16550 (letter, id): Don't assume ASCII; e.g., spell out a-z.
16551
16552 ({int}, handle_action_dollar, handle_action_at): Check for integer
16553 overflow.
16554
16555 (YY_STEP): Omit trailing semicolon, so that it's more like C.
16556
16557 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>): Allow \0 and \00
16558 as well as \000. Check for UCHAR_MAX, not 255.
16559 Allow \x with an arbitrary positive number of digits, as in C.
16560 Check for overflow here.
16561 Allow \? and UCNs, for compatibility with C.
16562
16563 (handle_symbol_code_dollar): Use quote_n slot 1 to avoid collision
16564 with quote slot used by complain_at.
16565
16566 * tests/input.at: Add tests for backslash-newline, m4 quotes
16567 in symbols, long literals, and funny escapes in strings.
16568
16569 * configure.ac (jm_PREREQ_MBSWIDTH): Add.
16570 * lib/Makefile.am (libbison_a_SOURCES): Add mbswidth.h, mbswidth.c.
16571 * lib/mbswidth.h, lib/mbswidth.c: New files, from GNU gettext.
16572 * m4/Makefile.am (EXTRA_DIST): Add mbswidth.m4.
16573 * m4/mbswidth.m4: New file, from GNU coreutils.
16574
16575 * doc/bison.texinfo (Grammar Outline): Document // comments.
16576 (Symbols): Document that trigraphs have no special meaning in Bison,
16577 nor is backslash-newline allowed.
16578 (Actions): Document that trigraphs have no special meaning.
16579
16580 * src/location.h (LOCATION_COLUMNS, LOCATION_LINES): Remove;
16581 no longer used.
16582
16583 2002-11-02 Paul Eggert <eggert@twinsun.com>
16584
16585 * src/reader.c: Don't include quote.h; not needed.
16586 (get_merge_function): Reword warning to be consistent with
16587 type clash diagnostic in grammar_current_rule_check.
16588
16589 * lib/quotearg.c (quotearg_buffer_restyled): Fix off-by-two
16590 bug in trigraph handling.
16591
16592 * src/output.c (prepare_symbols): When printing token names,
16593 escape "[" as "@<:@" and likewise for "]".
16594
16595 * src/system.h (errno): Remove declaration, as we are now
16596 assuming C89 or better, and C89 guarantees errno.
16597
16598 2002-10-30 Paul Eggert <eggert@twinsun.com>
16599
16600 * lib/bitset_stats.c (bitset_stats_read, bitset_stats_write):
16601 Check for close failures.
16602 * src/files.h (xfclose): Return void, not int, since it always
16603 returned zero.
16604 * src/files.c (xfclose): Likewise. Report I/O error if ferror
16605 indicates one.
16606 * src/output.c (output_skeleton): Use xfclose rather than fclose
16607 and ferror. xfclose now checks ferror.
16608
16609 * data/glr.c (YYLEFTMOST_STATE): Remove.
16610 (yyreportTree): Use a stack-based leftmost state. This avoids
16611 our continuing battles with bogus warnings about initializers.
16612
16613 2002-10-30 Akim Demaille <akim@epita.fr>
16614
16615 * src/system.h: Don't use #ifdef/#ifndef on HAVE_ values, only
16616 #if.
16617
16618 2002-10-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16619
16620 * tests/glr-regr1.at: New test for reported regressions.
16621 * tests/testsuite.at: Add glr-regr1.at test.
16622 * tests/Makefile.am: Add glr-regr1.at test.
16623
16624 2002-10-24 Paul Eggert <eggert@twinsun.com>
16625
16626 Version 1.75a.
16627
16628 * tests/calc.at (_AT_DATA_CALC_Y): Remove unused strcat declaration.
16629 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Include stdlib.h, since
16630 we use malloc. Don't assume 'A' through 'Z' are contiguous.
16631 Don't assume strdup exists; POSIX says its an XSI extension.
16632 Check for buffer overflow on input.
16633
16634 2002-10-24 Akim Demaille <akim@epita.fr>
16635
16636 * src/output.c (output_skeleton): Don't disable M4sugar comments
16637 too soon: it results in comments being expanded.
16638 * data/yacc.c, data/glr.c, data/lalr1.cc: Do it right before the
16639 first output.
16640
16641 2002-10-24 Akim Demaille <akim@epita.fr>
16642
16643 * data/yacc.c (m4_int_type): New.
16644 * data/c.m4 (m4_int_type): Don't use yysigned_char, but `signed
16645 char' as only yacc.c wants K&R portability.
16646 * data/glr.c (yysigned_char): Remove.
16647 * data/lalr1.cc: Rename the trailing b4_name as b4_parser_class_name.
16648 Reported by Quoc Peyrot.
16649
16650 2002-10-23 Paul Eggert <eggert@twinsun.com>
16651
16652 * src/main.c (main): With --trace=time, report times even if a
16653 non-fatal error occurs. Formerly, the times were reported in some
16654 such cases but not in others.
16655 * src/reader.c (reader): Just return if a complaint has been issued,
16656 instead of exiting, so that 'main' can report times.
16657
16658 2002-10-22 Akim Demaille <akim@epita.fr>
16659
16660 * src/system.h: Include sys/types.
16661 Reported by Bert Deknuydt.
16662
16663 2002-10-23 Paul Eggert <eggert@twinsun.com>
16664
16665 * configure.ac (AC_PROG_LEX): Use instead of AM_PROG_LEX.
16666 Suggested by Art Haas.
16667
16668 2002-10-22 Paul Eggert <eggert@twinsun.com>
16669
16670 * src/complain.c (exit) [! (STDC_HEADERS || _LIBC)]: Remove exit
16671 decl; not needed any more.
16672 * src/main.c (main): Use return to exit, undoing yesterday's change.
16673 The last OS that we could find where this wouldn't work is
16674 SunOS 3.5, and that's too old to worry about now.
16675
16676 * data/glr.c (struct yyltype): Define members even when not
16677 doing locations. This is more consistent with yacc.c, and it
16678 works around the following bug reports:
16679 http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00106.html
16680 http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00111.html
16681
16682 * doc/bison.texinfo: Minor spelling and typographical fixes. Use
16683 @acronym consistently. Standardize on "Yacc" instead of "YACC",
16684 "Algol" instead of "ALGOL". Give a bit more history about BNF.
16685
16686 2002-10-22 Akim Demaille <akim@epita.fr>
16687
16688 * data/README: New.
16689
16690 2002-10-21 Paul Eggert <eggert@twinsun.com>
16691
16692 Be consistent about 'bool'; the old code used an enum in one
16693 module and an int in another, and this violates the C standard.
16694 * m4/stdbool.m4: New file, from coreutils 4.5.3.
16695 * configure.ac (AC_HEADER_STDBOOL): Add.
16696 * m4/Makefile.am (EXTRA_DIST): Add stdbool.m4.
16697 * src/muscle_tab.c (hash_compare_muscles): (a ? FALSE : TRUE) -> (! a)
16698 * src/symtab.c (hash_compare_symbol_t): Likewise.
16699 * src/system.h (bool, false, true): Use a definition consistent
16700 with ../lib/hash.c. All uses changed.
16701
16702 * src/complain.c (warning_issued): Renamed from warn_message_count,
16703 so that we needn't worry about integer overflow (!).
16704 Now of type bool. All uses changed.
16705 (complaint_issued): Renamed from complain_message_count; likewise.
16706
16707 * src/main.c (main): Use exit to exit with failure.
16708
16709 * src/complain.c (fatal_at, fatal): Use EXIT_FAILURE and EXIT_SUCCESS
16710 rather than 1 and 0.
16711 * src/main.c (main): Likewise.
16712 * src/getargs.c (getargs): Likewise.
16713 * src/reader.c (reader): Likewise.
16714
16715 * src/getarg.c (getargs): Remove duplicate code for
16716 "Try `bison --help'".
16717
16718 * src/files.c (xfopen, xfclose): Use EXIT_FAILURE rather than 2.
16719 What was that "2" for?
16720
16721 * src/complain.h (fatal, fatal_at): Add __attribute__((__noreturn__)).
16722 * src/getargs.c (usage): Likewise.
16723
16724 * src/getargs.c (getargs): When there are too few operands, report
16725 the last one. When there are too many, report the first extra
16726 one. This is how diffutils does it.
16727
16728 2002-10-20 Paul Eggert <eggert@twinsun.com>
16729
16730 Remove K&R vestiges.
16731 * configure.ac (AC_C_CONST, AM_C_PROTOTYPES): Remove.
16732 * src/complain.c (VA_START): Remove. Assume prototypes.
16733 (vfprintf) [! (HAVE_VPRINTF || defined vfprintf)]: New macro.
16734 (private_strerror, warn_at, warn, complain_at, complain, fatal_at,
16735 fatal): Assume prototypes.
16736 * src/complain.h: Assume prototypes.
16737 * src/system.h (PARAMS): Remove.
16738 Include <limits.h> unconditionally, since it's guaranteeed even
16739 for a freestanding C89 compiler.
16740 (SHRT_MIN, SHRT_MAX): Remove, since C89 guarantees them.
16741 * src/vmsgetargs.c (getargs, cli_present, cli_get_value): Prototype.
16742
16743 2002-10-20 Akim Demaille <akim@epita.fr>
16744
16745 * src/muscle_tab.c (muscle_grow): Remove trailing debugging code.
16746 * data/glr.c (YY_USER_FORMALS, YY_USER_ARGS): New.
16747 (yyuserAction, yydoAction, yyglrReduce, yyresolveValue)
16748 (yyresolveStates, yyresolveAction, yyresolveStack)
16749 (yyprocessOneStack): Use them.
16750 (yy_reduce_print): New.
16751 * tests/calc.at (_AT_DATA_CALC_Y): Exercise %parse-param.
16752
16753 2002-10-20 Akim Demaille <akim@epita.fr>
16754
16755 * data/c.m4 (b4_c_ansi_args): Recognize functions with no
16756 arguments and output `void'.
16757 (b4_c_function): Rename as...
16758 (b4_c_function_def): this.
16759 (b4_c_function_decl, b4_c_ansi_function_def)
16760 (b4_c_ansi_function_decl): New.
16761 Change the interpretation of the arguments: before `int, foo', now
16762 `int foo, foo'.
16763 * data/yacc.c (yyparse): Prototype and define thanks to these.
16764 Adjust b4_c_function_def uses.
16765 * data/glr.c (yyparse): Likewise, but ANSI only.
16766
16767 2002-10-20 Akim Demaille <akim@epita.fr>
16768
16769 * src/output.c (prepare): Move the definition of `tokens_number',
16770 `nterms_number', `undef_token_number', `user_token_number_max'
16771 to...
16772 (prepare_tokens): Here.
16773 (prepare_tokens): Rename as...
16774 (prepare_symbols): this.
16775 (prepare): Move the definition of `rules_number' to...
16776 (prepare_rules): here.
16777 (prepare): Move the definition of `last', `final_state_number',
16778 `states_number' to...
16779 (prepare_states): here.
16780 * data/yacc.c, data/lalr1.cc, data/glr.c: Normalize `>' into `<'.
16781
16782 2002-10-20 Akim Demaille <akim@epita.fr>
16783
16784 * src/tables.h, src/tables.c, src/output.c: Comment changes.
16785
16786 2002-10-20 Akim Demaille <akim@epita.fr>
16787
16788 * data/yacc.c, data/yacc.c (b4_location_if, b4_pure_if): Move to...
16789 * data/c.m4: here.
16790
16791 2002-10-20 Akim Demaille <akim@epita.fr>
16792
16793 * src/output.c (prepare): Use MUSCLE_INSERT_STRING.
16794 * src/muscle_tab.c (muscle_pair_list_grow): Rename `val as
16795 `pair'.
16796 (muscle_init): Move the `b4_ltype', `b4_maxdepth', `b4_initdepth',
16797 `name' to...
16798 * data/glr.c, data/lalr1.cc, data/yacc.c (b4_location_type)
16799 (b4_stack_depth_init, b4_stack_depth_max, b4_parser_class_name):
16800 These.
16801
16802 2002-10-19 Paul Eggert <eggert@twinsun.com>
16803
16804 Do not create a temporary file, as that involves security and
16805 cleanup headaches. Instead, use a pair of pipes.
16806 Derived from a suggestion by Florian Krohm.
16807 * lib/subpipe.c, lib/subpipe.h, m4/subpipe.m4: New files.
16808 * lib/mkstemp.c, lib/readpipe.c, lib/tempname.c, m4/mkstemp.m4: Remove.
16809 * configure.ac (UTILS_FUNC_MKSTEMP, jm_PREREQ_TEMPNAME): Remove.
16810 (BISON_PREREQ_SUBPIPE): Add.
16811 * lib/Makefile.am (libbison_a_SOURCES): Remove readpipe.c.
16812 Add subpipe.h, subpipe.c.
16813 * m4/Makefile.am (EXTRA_DIST): Remove mkstemp.m4. Add subpipe.m4.
16814 * po/POTFILES.in: Add lib/subpipe.c.
16815 * src/output.c: Include "subpipe.h".
16816 (m4_invoke): Remove decl.
16817 (scan_skel): New decl.
16818 (output_skeleton): Use pipe rather than temporary file for m4 input.
16819 Check that m4sugar.m4 is readable, to avoid deadlock.
16820 Check for pipe I/O error.
16821 * src/scan-skel.l (readpipe): Remove decl.
16822 (scan_skel): New function, to be used in place of m4_invoke.
16823 Read from stream rather than file.
16824
16825 * lib/timevar.c (TICKS_TO_MSEC, CLOCKS_TO_MSEC): Do not cast to
16826 float, as this generates a warning on Solaris 8 + GCC 3.2 with
16827 --enable-gcc-warnings. Instead, divide into 1.0 rather than 1;
16828 this generates a more-accurate value anyway.
16829
16830 * lib/timevar.c (timervar_accumulate): Rename locals to
16831 avoid confusion with similarly-named more-global.
16832 * src/muscle_tab.c (muscle_pair_list_grow): Likewise.
16833
16834 * src/output.c (prepare): Use xstrdup to convert char const *
16835 to char *, to avoid GCC warning.
16836
16837 2002-10-19 Akim Demaille <akim@epita.fr>
16838
16839 * tests/calc.at (_AT_DATA_CALC_Y): Define VAL, LOC, LEX_FORMALS,
16840 LEX_PRE_FORMALS, LEX_ARGS, LEX_PRE_ARGS, USE_LEX_ARGS.
16841 Use them to have `calc.y' ready for %pure-parser.
16842 * data/yacc.c (YYLEX): Pass a yylex return type to
16843 b4_c_function_call.
16844
16845 2002-10-19 Akim Demaille <akim@epita.fr>
16846
16847 Prototype support of %lex-param and %parse-param.
16848
16849 * src/parse-gram.y: Add the definition of the %lex-param and
16850 %parse-param tokens, plus their rules.
16851 Drop the `_' version of %glr-parser.
16852 Add the "," token.
16853 * src/scan-gram.l (INITIAL): Scan them.
16854 * src/muscle_tab.c: Comment changes.
16855 (muscle_insert, muscle_find): Rename `pair' as `probe'.
16856 * src/muscle_tab.h (MUSCLE_INSERT_PREFIX): Remove unused.
16857 (muscle_entry_s): The `value' member is no longer const.
16858 Adjust all dependencies.
16859 * src/muscle_tab.c (muscle_init): Adjust: use
16860 MUSCLE_INSERT_STRING.
16861 Initialize the obstack earlier.
16862 * src/muscle_tab.h, src/muscle_tab.c (muscle_grow)
16863 (muscle_pair_list_grow): New.
16864 * data/c.m4 (b4_c_function_call, b4_c_args): New.
16865 * data/yacc.c (YYLEX): Use b4_c_function_call to honor %lex-param.
16866 * tests/calc.at: Use %locations, not --locations.
16867 (AT_CHECK_CALC_GLR): Use %glr-parser, not %glr_parser.
16868
16869 2002-10-19 Akim Demaille <akim@epita.fr>
16870
16871 * src/getargs.c (usage): Take status as argument and exit
16872 accordingly.
16873 Report the traditional `Try ... --help' message when status != 0.
16874 (usage, version): Don't take a FILE * as arg, it is pointless.
16875 (getargs): When there is an incorrect number of arguments, make it
16876 an error, and report it GNUlically thanks to `usage ()'.
16877
16878 2002-10-18 Paul Eggert <eggert@twinsun.com>
16879
16880 * data/glr.c (yyreportParseError): Don't assume that sprintf
16881 yields the length of the printed string, as this is not true
16882 on SunOS 4.1.4. Reported by Peter Klein.
16883
16884 * tests/calc.at (_AT_DATA_CALC_Y): #undef memcmp and realloc.
16885 * tests/conflicts.at (%nonassoc and eof): Likewise.
16886 Fixes SunOS 4.1.4 test failure reported by Peter Klein.
16887
16888 2002-10-17 Akim Demaille <akim@epita.fr>
16889
16890 * src/getargs.h (trace_e): Add trace_scan, and trace_parse.
16891 * src/getargs.c (trace_types, trace_args): Adjust.
16892 * src/reader.c (grammar_current_rule_prec_set)
16893 (grammar_current_rule_dprec_set, grammar_current_rule_merge_set):
16894 Standardize error messages.
16895 And s/@prec/%prec/!
16896 (reader): Use trace_flag to enable scanner/parser debugging,
16897 instead of an adhoc scheme.
16898 * src/scan-gram.l: Remove trailing debugging code.
16899
16900 2002-10-16 Paul Eggert <eggert@twinsun.com>
16901
16902 * src/muscle_tab.h (MUSCLE_TAB_H_): Was misspelled as
16903 MUSCLE_TAB_H.
16904
16905 * NEWS: Officially drop support for building Bison with K&R C,
16906 since it didn't work anyway and it's not worth worrying about.
16907 * Makefile.maint (wget_files): Remove ansi2knr.c.
16908 (ansi2knr.c-url_prefix): Remove.
16909 * lib/.cvsignore: Remove ansi2knr, ansi2knr.*.
16910 * lib/Makefile.am (AUTOMAKE_OPTIONS): Remove.
16911 * src/Makefile.am (AUTOMAKE_OPTIONS): Remove.
16912
16913 2002-10-15 Paul Eggert <eggert@twinsun.com>
16914
16915 Stop using the "enum_" trick for K&R-style function definitions;
16916 it confused me, and I was the author! Instead, assume that people
16917 who want to use K&R C compilers (when using these modules in GCC,
16918 perhaps?) will run ansi2knr.
16919
16920 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): Remove.
16921 All uses of "enum_" changed to "enum ".
16922 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
16923 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
16924
16925 * lib/abitset.c (abitset_and, abitset_and_cmp, abitset_and_or,
16926 abitset_and_or_cmp, abitset_andn, abitset_andn_cmp,
16927 abitset_andn_or, abitset_andn_or_cmp, abitset_bytes, abitset_copy,
16928 abitset_copy1, abitset_disjoint_p, abitset_empty_p,
16929 abitset_equal_p, abitset_init, abitset_list, abitset_list_reverse,
16930 abitset_not, abitset_ones, abitset_or, abitset_or_and,
16931 abitset_or_and_cmp, abitset_or_cmp, abitset_reset, abitset_set,
16932 abitset_size, abitset_small_list, abitset_subset_p, abitset_test,
16933 abitset_unused_clear, abitset_xor, abitset_xor_cmp, abitset_zero):
16934 Use function prototypes; this removes the need for declaring
16935 static functions simply to provide their prototypes.
16936 * lib/bitset.c (bitset_alloc, bitset_and_or_, bitset_and_or_cmp_,
16937 bitset_andn_or_, bitset_andn_or_cmp_, bitset_bytes, bitset_copy_,
16938 bitset_count_, bitset_create, bitset_dump, bitset_first,
16939 bitset_free, bitset_init, bitset_last, bitset_next,
16940 bitset_obstack_alloc, bitset_obstack_free, bitset_only_set_p,
16941 bitset_op4_cmp, bitset_or_and_, bitset_or_and_cmp_, bitset_prev,
16942 bitset_print, bitset_release_memory, bitset_toggle_,
16943 bitset_type_choose, bitset_type_get, bitset_type_name_get,
16944 debug_bitset): Likewise.
16945 * lib/bitset.h (bitset_set, bitset_reset, bitset_test): Likewise.
16946 * lib/bitset_stats.c (bitset_log_histogram_print,
16947 bitset_percent_histogram_print, bitset_stats_and,
16948 bitset_stats_and_cmp, bitset_stats_and_or,
16949 bitset_stats_and_or_cmp, bitset_stats_andn, bitset_stats_andn_cmp,
16950 bitset_stats_andn_or, bitset_stats_andn_or_cmp, bitset_stats_copy,
16951 bitset_stats_count, bitset_stats_disable, bitset_stats_disjoint_p,
16952 bitset_stats_dump, bitset_stats_empty_p, bitset_stats_enable,
16953 bitset_stats_equal_p, bitset_stats_free, bitset_stats_init,
16954 bitset_stats_list, bitset_stats_list_reverse, bitset_stats_not,
16955 bitset_stats_ones, bitset_stats_or, bitset_stats_or_and,
16956 bitset_stats_or_and_cmp, bitset_stats_or_cmp, bitset_stats_print,
16957 bitset_stats_print_1, bitset_stats_read, bitset_stats_reset,
16958 bitset_stats_set, bitset_stats_size, bitset_stats_subset_p,
16959 bitset_stats_test, bitset_stats_toggle, bitset_stats_type_get,
16960 bitset_stats_write, bitset_stats_xor, bitset_stats_xor_cmp,
16961 bitset_stats_zero): Likewise.
16962 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
16963 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
16964 bitsetv_dump, debug_bitsetv): Likewise.
16965 * lib/ebitset.c (ebitset_and, ebitset_and_cmp, ebitset_andn,
16966 ebitset_andn_cmp, ebitset_bytes, ebitset_copy, ebitset_copy_,
16967 ebitset_copy_cmp, ebitset_disjoint_p, ebitset_elt_add,
16968 ebitset_elt_alloc, ebitset_elt_calloc, ebitset_elt_find,
16969 ebitset_elt_free, ebitset_elt_last, ebitset_elt_remove,
16970 ebitset_elt_zero_p, ebitset_elts_grow, ebitset_empty_p,
16971 ebitset_equal_p, ebitset_free, ebitset_init, ebitset_list,
16972 ebitset_list_reverse, ebitset_not, ebitset_ones, ebitset_op3_cmp,
16973 ebitset_or, ebitset_or_cmp, ebitset_release_memory, ebitset_reset,
16974 ebitset_set, ebitset_size, ebitset_subset_p, ebitset_test,
16975 ebitset_weed, ebitset_xor, ebitset_xor_cmp, ebitset_zero):
16976 Likewise.
16977 * lib/lbitset.c (debug_lbitset, lbitset_and, lbitset_and_cmp,
16978 lbitset_andn, lbitset_andn_cmp, lbitset_bytes, lbitset_copy,
16979 lbitset_copy_cmp, lbitset_disjoint_p, lbitset_elt_alloc,
16980 lbitset_elt_calloc, lbitset_elt_find, lbitset_elt_free,
16981 lbitset_elt_link, lbitset_elt_unlink, lbitset_elt_zero_p,
16982 lbitset_empty_p, lbitset_equal_p, lbitset_free, lbitset_init,
16983 lbitset_list, lbitset_list_reverse, lbitset_not, lbitset_ones,
16984 lbitset_op3_cmp, lbitset_or, lbitset_or_cmp, lbitset_prune,
16985 lbitset_release_memory, lbitset_reset, lbitset_set, lbitset_size,
16986 lbitset_subset_p, lbitset_test, lbitset_weed, lbitset_xor,
16987 lbitset_xor_cmp, lbitset_zero): Likewise.
16988
16989 2002-10-14 Akim Demaille <akim@epita.fr>
16990
16991 Version 1.75.
16992
16993 2002-10-14 Akim Demaille <akim@epita.fr>
16994
16995 * tests/Makefile.am (maintainer-check-posix): New.
16996
16997 2002-10-14 Akim Demaille <akim@epita.fr>
16998
16999 * data/glr.c [YYDEBUG] (YYLEFTMOST_STATE): Initialize the yyloc
17000 member.
17001
17002 2002-10-14 Akim Demaille <akim@epita.fr>
17003
17004 * src/tables.c (table_ninf_remap): base -> tab.
17005 Reported by Matt Rosing.
17006
17007 2002-10-14 Paul Eggert <eggert@twinsun.com>
17008
17009 * tests/action.at, tests/calc.at, tests/conflicts.at,
17010 tests/cxx-type.at, tests/headers.at, tests/input.at,
17011 tests/regression.at, tests/synclines.at, tests/torture.at:
17012 Say "bison -o foo.c foo.y", not "bison foo.y -o foo.c",
17013 so that the tests still work even if POSIXLY_CORRECT is set.
17014 * doc/bison.texinfo (Rpcalc Compile, Invocation): Likewise.
17015
17016 * data/c.m4 (b4_int_type): Use yysigned_char instead of signed char,
17017 for portability to K&R hosts. Fix typo: signed char is guaranteed
17018 only to 127, not to 128.
17019 * data/glr.c (yysigned_char): New type.
17020 * data/yacc.c (yysigned_char): Likewise.
17021 * tests/regression.at (Web2c Actions): signed char -> yysigned_char.
17022
17023 2002-10-13 Paul Eggert <eggert@twinsun.com>
17024
17025 * data/yacc.c (yyparse): Rewrite to avoid "comparison is always
17026 true due to limited range of data type" warning from GCC.
17027
17028 * data/c.m4 (b4_token_defines): Protect against double-inclusion
17029 by wrapping enum yytokentype's definition inside #ifndef
17030 YYTOKENTYPE. This undoes a bug I introduced on 2002-10-12.
17031
17032 2002-10-13 Akim Demaille <akim@epita.fr>
17033
17034 * data/glr.c (yyglrShiftDefer, yyaddDeferredAction, yydoAction):
17035 Un yy- yyrhs to avoid the name clash with the global YYRHS.
17036
17037 2002-10-13 Akim Demaille <akim@epita.fr>
17038
17039 * Makefile.maint: Update from Autoconf 2.54.
17040 * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Remove, shipped with 2.54.
17041
17042 2002-10-13 Akim Demaille <akim@epita.fr>
17043
17044 * src/print.c (print_state): Separate the list of solved conflicts
17045 from the other items.
17046 * tests/conflicts.at (Resolved SR Conflicts): Adjust.
17047
17048 2002-10-13 Akim Demaille <akim@epita.fr>
17049
17050 Let nondeterministic skeletons be usable with deterministic
17051 tables.
17052
17053 With the patch, GAWK compiled by GCC without -O2 passes its test
17054 suite using a GLR parser driven by LALR tables. It fails with -O2
17055 because `struct stat' gives two different answers on my machine:
17056 88 (definition of an auto var) and later 96 (memset on this var).
17057 Hence the stack is badly corrumpted. The headers inclusion is to
17058 blame: if I move the awk.h inclusion before GLR's system header
17059 inclusion, the two struct stat have the same size.
17060
17061 * src/tables.c (pack_table): Always create conflict_table.
17062 (token_actions): Always create conflict_list.
17063 * data/glr.c (YYFLAG): Remove, unused.
17064
17065 2002-10-13 Akim Demaille <akim@epita.fr>
17066
17067 * configure.ac (AC_GNU_SOURCE): Use it instead of hand written code.
17068 (O0FLAGS): New.
17069 (VALGRIND, GXX): New.
17070 * tests/atlocal.in (CFLAGS): Use O0FLAGS.
17071 * tests/bison.in: Run $PREBISON a pre-command.
17072 * tests/Makefile.am (maintainer-check, maintainer-check-valgrind)
17073 (maintainer-check-g++): New.
17074 * Makefile.am (maintainer-check): New.
17075
17076 2002-10-13 Akim Demaille <akim@epita.fr>
17077
17078 * data/glr.c: Formatting changes.
17079 Tweak some trace messages to match yacc.c's.
17080
17081 2002-10-13 Akim Demaille <akim@epita.fr>
17082
17083 GLR parsers sometimes raise parse errors instead of performing the
17084 default reduction.
17085 Reported by Charles-Henry de Boysson.
17086
17087 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Don't
17088 check the length of the traces when %glr.
17089 (_AT_CHECK_CALC_ERROR): Also skip `^Stack' lines, coming from
17090 GLR's traces.
17091 (AT_CHECK_CALC_LALR, AT_CHECK_CALC_GLR): New.
17092 Test GLR parsers.
17093 * data/glr.c (YYLEFTMOST_STATE): Fix its value.
17094 (yyltype): Remove the yy prefix from the member names.
17095 (yytable): Complete its comment.
17096 (yygetLRActions): Map error action number from YYTABLE from
17097 YYTABLE_NINF to 0.
17098 (yyisErrorAction): No longer compare YYACTION to YYPACT_NINF
17099 (which was a bug: it should have been YYTABEL_NINF, and yet it was
17100 not satisfying as we could compare an YYACTION computed from
17101 YYDEFACT to YYTABLE_NINF although they are unrelated): 0 is the
17102 only value for error actions.
17103 (yyreportParseError): In verbose parse error messages, don't issue
17104 `error' in the list of expected tokens.
17105 * data/yacc.c (yyparse) <yybackup>: Rewrite the decoding of the
17106 next action to perform to match glr.c's decoding.
17107 (yytable): Complete its comment.
17108
17109 2002-10-13 Paul Eggert <eggert@twinsun.com>
17110
17111 Fix problem reported by Henrik Grubbstroem in
17112 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00098.html>:
17113 "nonterm: { $$ = 123; } { $$ = $1; };" was wrongly rejected,
17114 because the Bison parser reads the second action before reducing
17115 the first one.
17116 * src/scan-gram.l (rule_length): New static var.
17117 Use it to keep track of the rule length in the scanner, since
17118 we can't expect the parser to be in lock-step sync with the scanner.
17119 (handle_action_dollar, handle_action_at): Use this var.
17120 * tests/actions.at (Exotic Dollars): Test for the problem.
17121
17122 2002-10-12 Paul Eggert <eggert@twinsun.com>
17123
17124 * lib/timevar.c [! IN_GCC && HAVE_SYS_TIME_H]: Include <sys/time.h>.
17125 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): Check for <sys/time.h>.
17126 Include <sys/time.h> when checking for clock_t and struct tms.
17127 Use same include order as source.
17128 This is for the SunOS 4.1.4 porting bug reported by Peter Klein in
17129 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00016.html>.
17130
17131 * lib/timevar.c: Update copyright date and clarify comments.
17132 (get_time) [IN_GCC]: Keep the GCC version for reference.
17133
17134 * lib/timevar.c, lib/timevar.h, lib/timevar.def: Import
17135 GCC version as of today, then merge Bison's changes.
17136 Change "GCC" to "Bison" in copyright notice. timevar.def's
17137 author is Akim, so change that too.
17138
17139 * src/reader.c (grammar_current_rule_check):
17140 Don't worry about the default action if $$ is untyped.
17141 Prevents bogus warnings reported by Jim Gifford in
17142 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00015.html>.
17143
17144 * data/c.m4 (b4_token_enum): Do not define YYTOKENTYPE.
17145 * data/glr.c, data/lalr1.cc, data/yacc.c:
17146 Output token definitions before the first part of user declarations.
17147 Fixes compatibility problem reported by Jim Gifford for kbd in
17148 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00014.html>.
17149
17150 2002-10-11 Paul Eggert <eggert@twinsun.com>
17151
17152 * data/yacc.c (yyreport_parse_error): Remove, putting its body into...
17153 (yyparse): here. This undoes some of the 2002-07-25 change.
17154 Compatibility problem reported by Ralf S. Engelschall with
17155 OSSP cfg <http://www.ossp.org/pkg/lib/cfg/>.
17156
17157 2002-10-11 Akim Demaille <akim@epita.fr>
17158
17159 * tests/regression.at Characters Escapes): New.
17160 * src/scan-gram.l (SC_ESCAPED_CHARACTER): Accept \' in strings and
17161 characters.
17162 Reported by Jan Nieuwenhuizen.
17163
17164 2002-10-11 Akim Demaille <akim@epita.fr>
17165
17166 * po/id.po: New.
17167
17168 2002-10-10 Paul Eggert <eggert@twinsun.com>
17169
17170 Portability fixes for bitsets; this also avoids several GCC
17171 warnings.
17172
17173 * lib/abitset.c: Include <stddef.h>, for offsetof.
17174 * lib/lbitset.c: Likewise.
17175
17176 * lib/abitset.c (abitset_bytes): Return a size that is aligned
17177 properly for vectors of objects. Do not assume that adding a
17178 header size to a multiple of a word size yields a value that is
17179 properly aligned for the whole union.
17180 * lib/bitsetv.c (bitsetv_alloc): Likewise.
17181
17182 * lib/bitset_stats.c (bitset_stats_bytes): Adjust to new,
17183 unique names for structures.
17184 * lib/ebitset.c (ebitset_bytes): Likewise.
17185 * lib/lbitset.c (lbitset_bytes): Likewise.
17186
17187 * lib/abitset.c (abitset_ones, abitset_zero, abitset_empty_p,
17188 abitset_copy1, abitset_not, abitset_equal_p, abitset_subset_p,
17189 abitset_disjoint_p, abitset_and, abitset_and_cmp, abitset_andn,
17190 abitset_andn_cmp, abitset_or, abitset_or_cmp, abitset_xor,
17191 abitset_xor_cmp, abitset_and_or, abitset_and_or_cmp,
17192 abitset_andn_or, abitset_andn_or_cmp, abitset_or_and,
17193 abitset_or_and_cmp, abitset_copy): Supply prototype decls,
17194 to improve the type-checking that GCC can do.
17195 * lib/bitset.c (bitset_op4_cmp): Likewise.
17196 * lib/bitset_stats.c (bitset_stats_count,
17197 bitset_stats_empty_p, bitset_stats_ones, bitset_stats_zero,
17198 bitset_stats_copy, bitset_stats_disjoint_p,
17199 bitset_stats_equal_p, bitset_stats_not, bitset_stats_subset_p,
17200 bitset_stats_and, bitset_stats_and_cmp, bitset_stats_andn,
17201 bitset_stats_andn_cmp, bitset_stats_or, bitset_stats_or_cmp,
17202 bitset_stats_xor, bitset_stats_xor_cmp, bitset_stats_and_or,
17203 bitset_stats_and_or_cmp, bitset_stats_andn_or,
17204 bitset_stats_andn_or_cmp, bitset_stats_or_and,
17205 bitset_stats_or_and_cmp): Likewise.
17206 * lib/lbitset.c (lbitset_and, lbitset_and_cmp, lbitset_andn,
17207 lbitset_andn_cmp, lbitset_or, lbitset_or_cmp, lbitset_xor,
17208 lbitset_xor_cmp, lbitset_empty_p, lbitset_ones, lbitset_not,
17209 lbitset_subset_p, lbitset_disjoint_p, debug_lbitset): Likewise.
17210
17211 * lib/abitset.h: Include bitset.h, not bbitset.h.
17212 * lib/ebitset.h: Likewise.
17213 * lib/lbitset.h: Likewise.
17214
17215 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): New types.
17216 All instances of parameters of type enum bitset_opts are now of
17217 type enum_bitset_opts, to conform to the C Standard, and similarly
17218 for enum_bitset_type.
17219 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
17220 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
17221
17222 Do not use "struct bitset_struct" to mean different things in
17223 different modules. Not only is this confusing, it violates
17224 the C Standard, which requires that structure types in different
17225 modules must be compatible if one is to be passed to the other.
17226 * lib/bbitset.h (bitset): Now points to a union, not to a struct.
17227 All instances of "struct bitset_struct *" replaced with "bitset".
17228 * lib/bitset.h (struct bitset_struct): Remove, replacing with....
17229 (union bitset_union, struct abitset_struct, struct ebitset_struct,
17230 struct lbitset_struct, struct bitset_stats_struct): New types.
17231 All uses of struct bitset_struct changed to union bitset_union,
17232 etc.
17233 * lib/abitset.c (struct abitset_struct, abitset,
17234 struct bitset_struct): Remove.
17235 * lib/bitset_stats.c (struct bitset_stats_struct, bitset_stats,
17236 struct bitset_struct): Remove.
17237 * lib/ebitset.c (struct ebitset_struct, ebitset, struct
17238 bitset_struct): Remove.
17239 * lib/lbitset.c (struct lbitset_struct, lbitset, bitset_struct):
17240 Likewise.
17241
17242 Do not call a function of type T using a call that assumes the
17243 function is of a different type U. Standard C requires that a
17244 function must be called with a type that is compatible with its
17245 definition.
17246 * lib/bbitset.h (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
17247 New decls.
17248 * lib/bitset.c (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
17249 New functions.
17250 * lib/ebitset.c (PFV): Remove.
17251 * lib/lbitset.c (PFV): Likewise.
17252 * lib/ebitset.c (ebitset_and, ebitset_andn, ebitset_or,
17253 ebitset_xor, ebitset_copy, ebitset_ones, ebitset_empty_p): New
17254 decls.
17255 (ebitset_and, ebitset_andn, ebitset_or, ebitset_xor): New functions.
17256 (ebitset_vtable): Use them.
17257 * lib/lbitset.c (lbitset_and, lbitset_andn, lbitset_or,
17258 lbitset_xor): New functions.
17259 (lbitset_vtable): Use them.
17260
17261 * lib/bitset.h (bitset_next, bitset_prev, bitset_only_set_p):
17262 Declare.
17263
17264 * lib/bitsetv.c (bitsetv_alloc): Add a cast to (void *) to avoid a
17265 GCC warning.
17266 * lib/lbitset.c (LBITSET_CURRENT1): Likewise.
17267 Use offsetof, for simplicity.
17268
17269 2002-10-06 Paul Eggert <eggert@twinsun.com>
17270
17271 * lib/bitset.h (bitset_reset): Do not assume that bitset_word is
17272 the same width as int. This reapplies a hunk of the 2002-08-12 patch
17273 <http://lists.gnu.org/archive/html/bison-patches/2002-08/msg00007.html>,
17274 which was inadvertently undone by the 2002-09-30 patch.
17275 * lib/lbitset.c (debug_lbitset): Do not assume that bitset_word is
17276 the same width as int.
17277
17278 2002-10-04 Paul Eggert <eggert@twinsun.com>
17279
17280 Version 1.50.
17281
17282 * configure.ac (AC_INIT), NEWS: Increment version number.
17283
17284 * doc/bison.texinfo: Minor spelling, grammar, and white space
17285 fixes.
17286 (Symbols): Mention that any negative value returned from yylex
17287 signifies end-of-input. Warn about negative chars. Mention
17288 the portable Standard C character set.
17289
17290 The GNU coding standard says CFLAGS and YFLAGS are reserved
17291 for the installer to set.
17292 * lib/Makefile.am (AM_CFLAGS): Renamed from CFLAGS.
17293 * src/Makefile.am (AM_CFLAGS): Likewise.
17294 (AM_YFLAGS): Renamed from YFLAGS.
17295
17296 Fix some MAX and MIN problems.
17297 * src/gram.h (ITEM_NUMBER_MIN): MIN_MAX -> INT_MIN.
17298 * src/lalr.h (GOTO_NUMBER_MAX): INT_MAX -> SHRT_MAX.
17299 * src/symtab.h (SYMBOL_NUMBER_MAX): New macro.
17300 * src/reader.c (reader): Use it.
17301
17302 * tests/regression.at (Braces parsing): Use grep, not fgrep, as
17303 POSIX 1003.1-2001 has removed fgrep.
17304
17305 2002-10-04 Michael Hayes <m.hayes@elec.canterbury.ac.nz>
17306
17307 * lib/bbitset.h (BITSET_WINDEX_MAX): Redefine so that it cannot be
17308 interpreted as signed.
17309 * lib/ebitset.c (ebitset_list): Fix bug.
17310
17311 2002-10-01 Paul Eggert <eggert@twinsun.com>
17312
17313 More fixes for 64-bit hosts and large bitsets.
17314
17315 * lib/abitset.c (struct abitset_struct.n_bits, abitset_small_list,
17316 abitset_size, abitset_list, abitset_list_reverse, abitset_list):
17317 Use bitset_bindex, not int or unsigned int or size_t, to count bits.
17318 * lib/bbitset.h (struct bitset_vtable.size, struct bitset_vtable.count,
17319 struct bitset_vtable.list, struct bitset_vtable.list_reverse,
17320 bitset_count_, bitset_next, bitset_prev, bitset_first, bitset_last,
17321 bitset_count_): Likewise.
17322 * lib/bitset.h (bitset_iterator.num, bitset_iterator.i,
17323 bitset_first, bitset_last): Likewise.
17324 * lib/bitset_stats.c (bitset_stats_size, bitset_stats_list,
17325 bitset_stats_list_reverse, bitset_stats_size,
17326 bitset_stats_count, bitset_stats_list, bitset_stat_list_reverse):
17327 Likewise.
17328 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
17329 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
17330 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
17331 bitsetv_reflexive_transitive_closure): Likewise.
17332 * lib/bitsetv.h (bitsetv_alloc, bitsetv_create): Likewise.
17333 * lib/ebitset.c (ebitset_size, ebitset_list, ebitset_list_reverse):
17334 Likewise.
17335 * lib/lbitset.c (lbitset_size, lbitset_list, lbitset_list_merge):
17336 Likewise.
17337
17338 * lib/abitset.c (abitset_ones, abitset_zero, abitset_bytes):
17339 Use size_t, not unsigned int, to count bytes.
17340 * lib/abitset.h (abitset_bytes): Likewise.
17341 * lib/bitset.c (bitset_bytes, bitset_alloc, bitset_obstack_alloc):
17342 Likewise.
17343 * lib/bitset.h (bitset_bytes): Likewise.
17344 * lib/bitset_stats.c (bitset_stats_bytes, bitset_stats_init): Likewise.
17345 * lib/bitset_stats.h (bitset_stats_bytes): Likewise.
17346 * lib/bitsetv.c (bitsetv_alloc): Likewise.
17347 * lib/ebitset.c (ebitset_bytes): Likewise.
17348 * lib/ebitset.h (ebitset_bytes): Likewise.
17349 * lib/lbitset.c (lbitset_bytes): Likewise.
17350 * lib/lbitset.h (lbitset_bytes): Likewise.
17351
17352 * lib/abitset.c (abitset_empty_p, abitset_not, abitset_equal_p,
17353 abitset_subset_p, abitset_disjoint_p, abitset_and,
17354 abitset_and_cmp, abitset_andn, abitset_andn_cmp, abitset_or,
17355 abitset_or_cmp, abitset_xor, abitset_xor_cmp, abitset_and_or,
17356 abitset_and_or_cmp, abitset_andn_or, abitset_andn_or_cmp,
17357 abitset_or_and, abitset_or_and_cmp):
17358 Use bitset_windex instead of unsigned int.
17359 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
17360 * lib/ebitset.c (struct ebitset_struct.size, ebitset_elts_grow,
17361 ebitset_elt_add, ebitset_elt_remove, ebitset_weed,
17362 ebitset_elt_find, ebitset_list_reverse, ebitset_list, ebitset_init):
17363 Likewise.
17364 * lib/lbitset.c (lbitset_ones, lbitset_not): Likewise.
17365
17366 * lib/bitset.c (bitset_print):
17367 Use proper printf formats for widths of integer types.
17368 * lib/bitset_stats.c (bitset_percent_histogram_print,
17369 bitset_log_histogram_print, bitset_stats_print_1): Likewise.
17370 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
17371 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
17372 * lib/lbitset.c (lbitset_bytes): Likewise.
17373
17374 * lib/bbitset.h (BITSET_BINDEX_MAX, BITSET_WINDEX_MAX,
17375 BITSET_SIZE_MAX): New macros.
17376 (BITSET_INDEX_MAX): Remove. It wasn't right, since it assumed that
17377 sizeof (bitset_word) == sizeof (bitset_windex). All uses changed
17378 to BITSET_WINDEX_MAX.
17379
17380 * lib/bitset.c (bitset_next, bitset_prev, bitset_first,
17381 bitset_last): Return BITSET_BINDEX_MAX (not -1) for no value,
17382 since we now return the bitset_bindex type (not int).
17383
17384 * lib/bitsetv.c (bitsetv_alloc): Check for arithmetic overflow
17385 when computing sizes.
17386 * lib/ebitset.c (ebitset_elts_grow): Likewise.
17387
17388 * lib/lbitset.c (lbitset_elt_find): Simplify windex calculation
17389 and avoid cast to unsigned.
17390
17391 2002-09-30 Akim Demaille <akim@epita.fr>
17392
17393 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
17394 * lib/bitset_stats.c, lib/bitsetv.c, lib/ebitset.c, lib/lbitset.c:
17395 Updates from Michael Hayes.
17396
17397 2002-09-30 Art Haas <ahaas@neosoft.com>
17398
17399 * configure.ac: Update AC_OUTPUT and AM_CONFIG_HEADER
17400 invocations.
17401 * tests/cxx-type.at (declarator): Don't rely on NDEBUG being not
17402 defined.
17403
17404 2002-09-27 Akim Demaille <akim@epita.fr>
17405
17406 Version 1.49c.
17407
17408 2002-09-27 Akim Demaille <akim@epita.fr>
17409
17410 * configure.ac (AM_INIT_AUTOMAKE): We _need_ 1.7.
17411 (Because of AC_LIBSOURCE).
17412
17413 2002-09-27 Akim Demaille <akim@epita.fr>
17414
17415 Playing with Autoscan.
17416
17417 * configure.ac: Remove the old LIBOBJ tweaks.
17418 (AC_REPLACE_FUNCS): Add strrchr and strtol.
17419 * lib/strrchr.c: New.
17420 * lib/strtol.c: New, from the Coreutils 4.5.1.
17421
17422 2002-09-27 Akim Demaille <akim@epita.fr>
17423
17424 Playing with Autoscan.
17425
17426 * m4/prereq.m4 (jm_PREREQ_ARGMATCH, jm_FUNC_ARGMATCH): New.
17427 * lib/Makefile.am (libbison_a_SOURCES): No longer include
17428 argmatch.c and argmatch.h, since they are AC_LIBSOURCE'd.
17429 * lib/strcasecmp.c, lib/strncasecmp.c, lib/memcmp.c: New, from the
17430 Coreutils 4.5.1.
17431
17432 2002-09-24 Akim Demaille <akim@epita.fr>
17433
17434 * doc/bison.texinfo (Stack Overflow): xref to Recursion.
17435 (Frequently Asked Questions, Parser Stack Overflow): New.
17436
17437 2002-09-13 Akim Demaille <akim@epita.fr>
17438
17439 Playing with autoscan.
17440
17441 * src/reader.c (get_merge_function): Use xstrdup, not strdup.
17442 * src/files.c (skeleton_find): Remove, unused.
17443 * m4/memcmp.m4: New, from the Coreutils 4.5.1.
17444 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Run jm_FUNC_MEMCMP.
17445
17446 2002-09-13 Akim Demaille <akim@epita.fr>
17447
17448 * configure.ac (AM_INIT_AUTOMAKE): Require Automake 1.6.3.
17449 * Makefile.am (AUTOMAKE_OPTIONS): Don't.
17450
17451 2002-09-13 Akim Demaille <akim@epita.fr>
17452
17453 * configure.ac: Require 2.54.
17454 s/jm_FUNC_MALLOC/AC_FUNC_MALLOC/.
17455 s/jm_FUNC_REALLOC/AC_FUNC_REALLOC/.
17456 * m4/c-bs-a.m4, m4/malloc.m4, m4/mbstate_t.m4, m4/realloc.m4:
17457 Remove, provided by Autoconf macros.
17458
17459 2002-09-12 Akim Demaille <akim@epita.fr>
17460
17461 * m4/prereq.m4: Update, from Coreutils 4.5.1.
17462
17463 2002-09-12 Akim Demaille <akim@epita.fr>
17464
17465 * m4/prereq.m4: Update, from Fileutils 4.1.5.
17466 * configure.ac (jm_PREREQ_TEMPNAME): Invoke it.
17467 Reported by Martin Mokrejs.
17468
17469 2002-09-10 Akim Demaille <akim@epita.fr>
17470
17471 * src/parse-gram.y: Associate a human readable string to each
17472 token type.
17473 * tests/regression.at (Invalid inputs): Adjust.
17474
17475 2002-09-10 Gary V. Vaughan <gary@gnu.org>
17476
17477 * tests/Makefile.am ($(srcdir)/package.m4): Bison now ships
17478 with an Autoconf-2.5x style configure.ac.
17479
17480 2002-09-06 Paul Eggert <eggert@twinsun.com>
17481
17482 * doc/bison.texinfo (Conditions): Make explicit that the GPL
17483 exception applies only to yacc.c. This is a modification of a
17484 patch originally suggested by Akim Demaille.
17485
17486 2002-09-06 Akim Demaille <akim@epita.fr>
17487
17488 * data/c.m4 (b4_copyright): Move the GPL exception comment from
17489 here to...
17490 * data/yacc.c: here.
17491
17492 * data/lalr1.cc (struct yyltype): Don't define it, since we use
17493 LocationType.
17494 (b4_ltype): Default to yy::Location from location.hh.
17495
17496 2002-09-04 Jim Meyering <jim@meyering.net>
17497
17498 * data/yacc.c: Guard the declaration of yytoknum also with
17499 `#ifdef YYPRINT', so it is declared only when used.
17500
17501 2002-09-04 Akim Demaille <akim@epita.fr>
17502
17503 * configure.in: Rename as...
17504 * configure.ac: this.
17505 Bump to 1.49c.
17506
17507 2002-09-04 Akim Demaille <akim@epita.fr>
17508
17509 * src/assoc.c, src/closure.c, src/gram.c, src/injections.c,
17510 * src/lalr.c, src/LR0.c, src/relation.c, src/tables.c: Don't
17511 translate maintainer only messages.
17512
17513 2002-08-12 Paul Eggert <eggert@twinsun.com>
17514
17515 Version 1.49b.
17516
17517 * Makefile.am (SUBDIRS): Remove intl.
17518 (DISTCLEANFILES): Remove.
17519 * NEWS: Mention that GNU M4 is now required. Clarify what is
17520 meant by "larger grammars". Mention the pt_BR translation.
17521 * configure.in (AC_CHECK_DECLS): Add getenv, getopt.
17522 (AM_GNU_GETTEXT_VERSION): New macro, replacing GETTEXT_VERSION var.
17523 Bump version from 0.11.2 to 0.11.5.
17524 (BISON_PREREQ_STAGE): Remove.
17525 (AM_GNU_GETTEXT): Use external gettext.
17526 (AC_OUTPUT): Remove intl/Makefile.
17527
17528 * config/depcomp, config/install-sh: Sync with Automake 1.6.3.
17529
17530 * data/glr.c: Include string.h, for strlen.
17531 (yyreportParseError): Use size_t for yysize.
17532 (yy_yypstack): No longer nested inside yypstates, as nested
17533 functions are not portable. Do not assume size_t is the
17534 same width as int.
17535 (yypstates): Do not assume that ptrdiff_t is the same width
17536 as int, and similarly for yyposn and YYINDEX.
17537
17538 * data/yacc.c: Fix comment about `$$ = $1': it can copy garbage.
17539
17540 * lib/Makefile.am (INCLUDES): Do not include from the intl
17541 directory, which has been removed.
17542 * src/Makefile.am (INCLUDES): Likewise.
17543
17544 * lib/Makefile.am (libbison_a_SOURCES): Add unlocked-io.h.
17545 (bitsets_sources, additional_bitsets_sources, timevars_sources):
17546 New vars.
17547
17548 * lib/Makefile.am (libbison_a_SOURCES): Avoid +=, a GNU make extension.
17549 * tests/Makefile.am (EXTRA_DIST): Likewise.
17550
17551 * lib/abitset.c (abitset_reverse_list, ebitset_reverse_list):
17552 Do not assume that bitset_windex is the same width as unsigned.
17553
17554 * lib/abitset.c (abitset_unused_clear): Do not assume that
17555 bitset_word is the same width as int.
17556 * lib/bbitset.h (BITSET_INDEX_MAX, BITSET_MSB): Likewise.
17557 * lib/bitset.h (bitset_set, bitset_reset): Likewise.
17558 * lib/bitset_stats.c (bitset_stats_set, bitset_stats_reset): Likewise.
17559 * lib/ebitset.c (ebitset_set, ebitset_reset): Likewise.
17560 * lib/lbitset.c (lbitset_set, lbitset_reset): Likewise.
17561
17562 * lib/abitset.c (abitset_op1): Use -1, not ~0, as memset arg (for
17563 portability to one's complement hosts!).
17564 * lib/ebitset.c (ebitset_op1): Likewise.
17565 * lib/lbitset.c (lbitset_op1): Likewise.
17566
17567 * lib/argmatch.c, lib/quotearg.c, quotearg.h: Sync with GNU tar.
17568 * lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
17569 lib/hash.c, lib/hash.h, lib/strnlen.c, lib/xmalloc.c:
17570 Sync with fileutils.
17571 * lib/error.c, lib/getopt.c, lib/getopt.h, lib/getopt1.c,
17572 lib/gettext.h: Sync with diffutils.
17573
17574 * lib/memrchr.c, lib/mkstemp.c, lib/strchr.c, lib/strnlen.c,
17575 lib/strspn.c, lib/tempname.c: Use GPL, not LGPL.
17576
17577 * lib/obstack.c, lib/obstack.h: Sync with fileutils, except use
17578 PROTOTYPES to check for prototypes, and "defined __STDC__" to
17579 check for void *.
17580
17581 * lib/bbitset.h (BITSET_WORD_BITS): Now of type unsigned, not
17582 size_t; the old version tried to do this but casted improperly.
17583 (bitset_bindex, bitset_windex): Now size_t, not unsigned long.
17584 (bitset_test): Now returns int, not unsigned long.
17585
17586 * lib/bitset_stats.c: Include "gettext.h".
17587 (_): New macro.
17588 (bitset_stats_set, bitset_stats_reset, bitset_stats_test): Don't
17589 name locals "index", as it generates unnecessary warnings on some
17590 hosts that have an "index" function.
17591
17592 * lib/bitset_stats.c (bitset_stats_print_1, bitset_stats_print,
17593 bitset_stats_read, bitset_stats_write): Wrap strings in _() if
17594 they need translation.
17595 * src/LR0.c (state_list_append, new_itemsets, get_state,
17596 append_states, generate_states): Likewise.
17597 * src/assoc.c (assoc_to_string): Likewise.
17598 * src/closure.c (print_closure, set_firsts, closure): Likewise.
17599 * src/gram.c (grammar_dump): Likewise.
17600 * src/injections.c (injections_compute): Likewise.
17601 * src/lalr.c (lookaheads_print): Likewise.
17602 * src/relation.c (relation_transpose): Likewise.
17603 * src/scan-gram.l: Likewise.
17604 * src/tables.c (table_grow, pack_vector): Likewise.
17605
17606 * m4/Makefile.am (EXTRA_DIST): Remove codeset.m4,
17607 glibc21.m4, isc-posix.m4 lcmessage.m4, stage.m4.
17608 * m4/malloc.m4, m4/realloc.m4: Sync with diffutils.
17609 * m4/mbstate_t.m4: Sync with fileutils.
17610 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): AC_MBSTATE_T -> AC_TYPE_MBSTATE_T.
17611
17612 * po/LINGUAS: Add pt_BR.
17613 * po/POTFILES.in: Add src/assoc.c, src/closure.c, src/gram.c,
17614 src/main.c, src/relation.c, src/state.c, lib/bitset_stats.c,
17615 lib/timevar.c.
17616 Use src/parse-gram.y instead of src/parse-gram.c, as the gettext
17617 manual recommends.
17618 Similarly, use src/scan-gram.l instead of src/scan-gram.c.
17619
17620 * src/complain.c (strerror_r): Remove decl; not needed.
17621 (strerror): Use same pattern as ../lib/error.c.
17622
17623 * src/files.c, src/files.h (compute_header_macro): Remove; unused.
17624
17625 * src/gram.c (grammar_dump): Do not assume ptrdiff_t fits in int.
17626
17627 * src/main.c (main): Cast result of bindtextdomain and textdomain
17628 to void, to avoid a GCC warning when --disable-nls is in effect.
17629
17630 * src/scan-gram.l: Use strings rather than escapes when possible,
17631 to minimize the number of warnings from xgettext.
17632 (handle_action_dollar, handle_action_at): Don't use isdigit,
17633 as it mishandles negative chars and it may not work as expected
17634 outside the C locale.
17635
17636 * src/symtab.c (symbol_get): Don't cast LHS of an assignment;
17637 this is a GCC extension and is not portable to other compilers.
17638
17639 * src/system.h (alloca): Use same pattern as ../lib/error.c.
17640 Do not include <ctype.h>; no longer needed.
17641 Do not include <malloc.h>; no longer needed (and generates
17642 warnings on OpenBSD 3.0).
17643
17644 * tests/cxx-type.at (yylex): Do not pass signed char to isupper;
17645 it's not portable.
17646
17647 * tests/regression.at: Do not use 'cc -c input.c -o input';
17648 Sun C rejects this. Instead, use 'cc -c input.c -o input.o'.
17649
17650 * tests/synclines.at (AC_SYNCLINES_COMPILE): Accept any nonzero
17651 exit status as failure, not just exit status 1. Sun C exits
17652 with status 2 sometimes.
17653
17654 * tests/torture.at (AT_INCREASE_DATA_SIZE): New macro.
17655 Use it for the two large tests.
17656
17657 2002-08-02 Akim Demaille <akim@epita.fr>
17658
17659 * src/conflicts.c (conflicts_output): Don't output rules never
17660 reduced here, since anyway that computation doesn't work.
17661 * src/gram.h, src/gram.h (rule_filter_t, rule_useful_p)
17662 (rule_useless_p, rule_never_reduced_p): New.
17663 (grammar_rules_partial_print): Use a filter instead of a range.
17664 Display the title only if needed.
17665 (grammar_rules_print): Adjust.
17666 (grammar_rules_never_reduced_report): New.
17667 * src/tables.c (action_row): Move the computation of rules never
17668 reduced to...
17669 (token_actions): here.
17670 * src/main.c (main): Make the parser before making the report, so
17671 that rules never reduced are computed.
17672 Call grammar_rules_never_reduced_report.
17673 * src/print.c (print_results): Report rules never reduced.
17674 * tests/conflicts.at, tests/reduce.at: Adjust.
17675
17676 2002-08-01 Akim Demaille <akim@epita.fr>
17677
17678 Instead of attaching lookaheads and duplicating the rules being
17679 reduced by a state, attach the lookaheads to the reductions.
17680
17681 * src/state.h (state_t): Remove the `lookaheads',
17682 `lookaheads_rule' member.
17683 (reductions_t): Add a `lookaheads' member.
17684 Use a regular array for the `rules'.
17685 * src/state.c (reductions_new): Initialize the lookaheads member
17686 to 0.
17687 (state_rule_lookaheads_print): Adjust.
17688 * src/state.h, src/state.c (state_reductions_find): New.
17689 * src/conflicts.c (resolve_sr_conflict, set_conflicts)
17690 (count_rr_conflicts): Adjust.
17691 * src/lalr.c (LArule): Remove.
17692 (add_lookback_edge): Adjust.
17693 (state_lookaheads_count): New.
17694 (states_lookaheads_initialize): Merge into...
17695 (initialize_LA): this.
17696 (lalr_free): Adjust.
17697 * src/main.c (main): Don't free nullable and derives too early: it
17698 is used by --verbose.
17699 * src/print.c, src/print_graph.c, src/tables.c: Adjust.
17700
17701 2002-08-01 Akim Demaille <akim@epita.fr>
17702
17703 * src/derives.h, src/derives.c (derives): A `rule_t***' instead of
17704 `rule_number_t**'.
17705 (set_derives, free_derives): Rename as...
17706 (derives_compute, derives_free): this.
17707 Adjust all dependencies.
17708 * src/nullable.c (set_nullable, free_nullable): Rename as...
17709 (nullable_compute, nullable_free): these.
17710 (rule_list_t): Store rule_t *, not rule_number_t.
17711 * src/state.c (state_rule_lookaheads_print): Directly compare rule
17712 pointers, instead of their numbers.
17713 * src/main.c (main): Call nullable_free, and derives_free earlier,
17714 as they were lo longer used.
17715
17716 2002-08-01 Akim Demaille <akim@epita.fr>
17717
17718 * lib/timevar.c (get_time): Include children time.
17719 * src/lalr.h (LA, LArule): Don't export them: used with the
17720 state_t.
17721 * src/lalr.c (LA, LArule): Static.
17722 * src/lalr.h, src/lalr.c (lalr_free): New.
17723 * src/main.c (main): Call it.
17724 * src/tables.c (pack_vector): Check whether loc is >= to the
17725 table_size, not >.
17726 (pack_tables): Don't free froms, tos, conflict_tos, and pos...
17727 (tables_generate): do it, since that's also it which allocates
17728 them.
17729 Don't free LA and LArule, main does.
17730
17731 2002-07-31 Akim Demaille <akim@epita.fr>
17732
17733 Separate parser tables computation and output.
17734
17735 * src/output.c (nvectors, base_t, base, base_ninf, conflict_table)
17736 (conflict_list, conflict_list_cnt, table, check, table_ninf)
17737 (yydefgoto, yydefact, high): Move to...
17738 * src/tables.h, src/tables.c: here.
17739 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
17740 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
17741 (symbol_number_to_vector_number, nvectors, BASE_MAX, BASE_MIN)
17742 (froms, tos, conflict_tos, tally, width, action_t, ACTION_MAX)
17743 (ACTION_MIN, actrow, order, nentries, pos, conflrow)
17744 (conflict_list_free, table_size, lowzero, table_grow, conflict_row)
17745 (action_row, save_row, token_actions, save_column, default_goto)
17746 (goto_actions, sort_actions, matching_state, pack_vector)
17747 (table_ninf_remap, pack_table, prepare_actions): Move to...
17748 * src/tables.c: here.
17749 * src/tables.h, src/tables.c(tables_generate, tables_free): New.
17750 * src/output.c (token_actions, output_base, output_conflicts)
17751 (output_check): Merge into...
17752 (prepare_actions): this.
17753 (actions_output): Rename as...
17754 (user_actions_output): this.
17755 * src/main.c (main): Call tables_generate and tables_free.
17756
17757 2002-07-31 Akim Demaille <akim@epita.fr>
17758
17759 Steal GCC's --time-report support.
17760
17761 * lib/timevar.c, lib/timevar.h, lib/timevar.def: New,
17762 stolen/adjusted from GCC.
17763 * m4/stage.m4: Remove time related checks.
17764 * m4/timevar.m4: New.
17765 * configure.in: Adjust.
17766 * src/system.h: Adjust to using timevar.h.
17767 * src/getargs.h, src/getargs.c: Support trace_time for
17768 --trace=time.
17769 * src/main.c (stage): Remove.
17770 (main): Replace `stage' invocations with timevar calls.
17771 * src/output.c: Insert pertinent timevar calls.
17772
17773 2002-07-31 Akim Demaille <akim@epita.fr>
17774
17775 Let --trace have arguments.
17776
17777 * src/getargs.h (enum trace_e): New.
17778 * src/getargs.c (trace_args, trace_types, trace_argmatch): New.
17779 (long_options, short_options): --trace/-T takes an optional
17780 argument.
17781 Change all the uses of trace_flag to reflect the new flags.
17782 * tests/sets.at (Firsts, Nullable, Broken Closure): Use --trace=sets.
17783
17784 Strengthen `stage' portability.
17785
17786 * m4/stage.m4 (BISON_PREREQ_STAGE): New.
17787 * configure.in: Use it.
17788 Don't check for malloc.h and sys/times.h.
17789 * src/system.h: Include them when appropriate.
17790 * src/main.c (stage): Compile only when mallinfo, struct mallinfo,
17791 times and struct tms are available.
17792
17793 2002-07-30 Akim Demaille <akim@epita.fr>
17794
17795 In verbose parse error message, don't report `error' as an
17796 expected token.
17797 * tests/actions.at (Printers and Destructors): Adjust.
17798 * tests/calc.at (Calculator $1): Adjust.
17799 * data/yacc.c, data/glr.c, data/lalr1.c: When making the verbose
17800 error message, do not report the parser accepts the error token in
17801 that state.
17802
17803 2002-07-30 Akim Demaille <akim@epita.fr>
17804
17805 Normalize conflict related messages.
17806
17807 * src/complain.h, src/complain.c (warn, complain): New.
17808 * src/conflicts.c (conflicts_print): Use them.
17809 (conflict_report_yacc): New, extracted from...
17810 (conflicts_print): here.
17811 * tests/conflicts.at, tests/existing.at: Adjust.
17812
17813 2002-07-30 Akim Demaille <akim@epita.fr>
17814
17815 Report rules which are never reduced by the parser: those hidden
17816 by conflicts.
17817
17818 * src/LR0.c (save_reductions): Don't make the final state too
17819 different: save its reduction (accept) instead of having a state
17820 without any action (no shift or goto, no reduce).
17821 Note: the final state is now a ``regular'' state, i.e., the
17822 parsers now contain `reduce 0' as default reduction.
17823 Nevertheless, since they decide to `accept' when yystate =
17824 final_state, they still will not reduce rule 0.
17825 * src/print.c (print_actions, print_reduction): Adjust.
17826 * src/output.c (action_row): Track reduced rules.
17827 (token_actions): Report rules never reduced.
17828 * tests/conflicts.at, tests/regression.at: Adjust.
17829
17830 2002-07-30 Akim Demaille <akim@epita.fr>
17831
17832 `stage' was accidently included in a previous patch.
17833 Initiate its autoconfiscation.
17834
17835 * configure.in: Look for malloc.h and sys/times.h.
17836 * src/main.c (stage): Adjust.
17837 Report only when trace_flag.
17838
17839 2002-07-29 Akim Demaille <akim@epita.fr>
17840
17841 * src/state.h, src/state.c (transitions_t): Holds state_t*'s, not
17842 state_number_t.
17843 (errs_t): symbol_t*, not symbol_number_t.
17844 (reductions_t): rule_t*, not rule_number_t.
17845 (FOR_EACH_SHIFT): New.
17846 * src/LR0.c, src/conflicts.c, src/lalr.c, src/output.c
17847 * src/print.c, src/print_graph.c: Adjust.
17848
17849 2002-07-29 Akim Demaille <akim@epita.fr>
17850
17851 Use $accept and $end, as BYacc and BTYacc do, instead of $axiom and $.
17852
17853 * src/symtab.h, src/symtab.c (eoftoken, axiom): Rename as...
17854 (endtoken, accept): these.
17855 * src/reader.c (reader): Set endtoken's default tag to "$end".
17856 Set undeftoken's tag to "$undefined" instead of "$undefined.".
17857 * doc/bison.texinfo (Table of Symbols): Mention $accept and $end.
17858 Adjust.
17859
17860 2002-07-29 Akim Demaille <akim@epita.fr>
17861
17862 * src/reduce.c (reduce_grammar): When the language is empty,
17863 complain about the start symbol, not the axiom.
17864 Use its location.
17865 * tests/reduce.at (Empty Language): New.
17866
17867 2002-07-26 Akim Demaille <akim@epita.fr>
17868
17869 * src/reader.h, src/reader.c (gram_error): ... can't get
17870 yycontrol without making too strong assumptions on the parser
17871 itself.
17872 * src/output.c (prepare_tokens): Use the real 0th value of
17873 token_translations instead of `0'.
17874 * src/parse-gram.y (yyerror): Don't rely on yycontrol being
17875 visible here.
17876 * data/yacc.c (yyreport_parse_error): Rename yylocation as yylloc
17877 for the time being: %locations ought to provide it to yyerror.
17878
17879 2002-07-25 Akim Demaille <akim@epita.fr>
17880
17881 * src/output.c (prepare_tokens): Go up to ntokens, not ntokens + 1.
17882 * doc/bison.texinfo (Decl Summary): s/$illegal/$undefined./.
17883 * tests/regression.at (Web2c Actions): Adjust.
17884
17885 2002-07-25 Akim Demaille <akim@epita.fr>
17886
17887 Stop storing rules from 1 to nrules + 1.
17888
17889 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c, src/lalr.c
17890 * src/nullable.c, src/output.c, src/print.c, src/reader.c
17891 * src/reduce.c: Allocate and free from &rules[0], not &rules[1].
17892 Iterate from 0 to nrules.
17893 Use rule_number_as_item_number and item_number_as_rule_number.
17894 Adjust to `derive' now containing possibly 0.
17895 * src/gram.h (rule_number_as_item_number, item_number_as_rule_number):
17896 Handle the `- 1' part in rule numbers from/to item numbers.
17897 * src/conflicts.c (log_resolution): Fix the message which reversed
17898 shift and reduce.
17899 * src/output.c (action_row): Initialize default_rule to -1.
17900 (token_actions): Adjust.
17901 * tests/sets.at (Nullable, Firsts): Fix the previously bogus
17902 expected output.
17903 * tests/conflicts.at (Resolved SR Conflicts): Likewise.
17904
17905 2002-07-25 Akim Demaille <akim@epita.fr>
17906
17907 * data/c.m4 (b4_c_function, b4_c_ansi_args, b4_c_ansi_arg)
17908 (b4_c_knr_arg_names, b4_c_knr_arg_name, b4_c_knr_arg_decls)
17909 (b4_c_knr_arg_decl): New.
17910 * data/yacc.c: Use it to define yysymprint, yydestruct, and
17911 yyreport_parse_error.
17912
17913 2002-07-25 Akim Demaille <akim@epita.fr>
17914
17915 * data/yacc.c (yyreport_parse_error): New, extracted from...
17916 (yyparse): here.
17917 (yydestruct, yysymprint): Move above yyparse.
17918 Be K&R compliant.
17919
17920 2002-07-25 Akim Demaille <akim@epita.fr>
17921
17922 * data/c.m4 (b4_ints_in, b4_int_type, b4_int_type_for): New,
17923 replace...
17924 (b4_sint_type, b4_uint_type): these.
17925 * data/yacc.c, data/glr.c, data/lalr1.cc: Use b4_int_type_for.
17926 * tests/regression.at (Web2c Actions): Adjust.
17927
17928 2002-07-25 Akim Demaille <akim@epita.fr>
17929
17930 * src/gram.h (TIEM_NUMBER_MAX): New.
17931 (item_number_of_rule_number, rule_number_of_item_number): Rename
17932 as...
17933 (rule_number_as_item_number, item_number_as_rule_number): these.
17934 Adjust dependencies.
17935 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
17936 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
17937 (symbol_number_to_vector_number): New.
17938 (order): Of vector_number_t* type.
17939 (base_t, BASE_MAX, BASE_MIN): New.
17940 (froms, tos, width, pos, check): Of base_t type.
17941 (action_number_t, ACTION_MIN, ACTION_MAX): New.
17942 (actrow): Of action_number_t type.
17943 (conflrow): Of unsigned int type.
17944 (table_ninf, base_ninf): New.
17945 (GENERATE_MUSCLE_INSERT_TABLE): Also output the `*_min' value.
17946 (muscle_insert_int_table, muscle_insert_base_table)
17947 (muscle_insert_rule_number_table): New.
17948 (prepare_tokens): Output `toknum' as int_table.
17949 (action_row): Returns a rule_number_t.
17950 Use ACTION_MIN, not SHRT_MIN.
17951 (token_actions): yydefact is rule_number_t*.
17952 (table_ninf_remap): New.
17953 (pack_table): Use it for `base' and `table'.
17954 * data/yacc.c, data/glr.c, data/lalr1.cc (YYFLAG): Remove,
17955 replaced with...
17956 (YYPACT_NINF, YYTABLE_NINF): these.
17957 (yypact, yytable): Compute their types instead of hard-coded
17958 `short'.
17959 * tests/regression.at (Web2c Actions): Adjust.
17960
17961 2002-07-19 Akim Demaille <akim@epita.fr>
17962
17963 * src/scan-gram.l (id): Can start with an underscore.
17964
17965 2002-07-16 Akim Demaille <akim@epita.fr>
17966
17967 * src/assoc.c, src/asssoc.h (assoc_t, assoc_to_string): New.
17968 Adjust all former `associativity' dependencies.
17969 * src/symtab.c (symbol_new): Default associativity is `undef', not
17970 `right'.
17971 (symbol_check_alias_consistence): Adjust.
17972
17973 2002-07-09 Akim Demaille <akim@epita.fr>
17974
17975 * doc/bison.texinfo: Properly set the ``header'' part.
17976 Use @dircategory ``GNU programming tools'' as per Texinfo's
17977 documentation.
17978 Use @copying.
17979
17980 2002-07-09 Akim Demaille <akim@epita.fr>
17981
17982 * lib/quotearg.h: Protect against multiple inclusions.
17983 * src/location.h (location_t): Add a `file' member.
17984 (LOCATION_RESET, LOCATION_PRINT): Adjust.
17985 * src/complain.c (warn_at, complain_at, fatal_at): Drop
17986 `error_one_per_line' support.
17987
17988 2002-07-09 Akim Demaille <akim@epita.fr>
17989
17990 * src/complain.h, src/complain.c (warn, complain): Remove, unused.
17991 * src/reader.c (lineno): Remove.
17992 Adjust all dependencies.
17993 (get_merge_function): Take a location and use complain_at.
17994 * src/symtab.h, src/symtab.c (symbol_make_alias): Likewise.
17995 * tests/regression.at (Invalid inputs, Mixing %token styles):
17996 Adjust.
17997
17998 2002-07-09 Akim Demaille <akim@epita.fr>
17999
18000 * src/parse-gram.y (rules_or_grammar_declaration): Add an error
18001 recovery rule, and forbid extensions when --yacc.
18002 (gram_error): Use complain_at.
18003 * src/reader.c (reader): Exit if there were parse errors.
18004
18005 2002-07-09 Akim Demaille <akim@epita.fr>
18006
18007 * tests/synclines.at (AT_SYNCLINES_COMPILE): New.
18008 (AT_TEST_SYNCLINE): Adjust to unusual GCC outputs.
18009 Reported by R Blake <blakers@mac.com>.
18010
18011 2002-07-09 Akim Demaille <akim@epita.fr>
18012
18013 * data/yacc.c: Output the copyright notive in the header.
18014
18015 2002-07-03 Akim Demaille <akim@epita.fr>
18016
18017 * src/output.c (froms, tos): Are state_number_t.
18018 (save_column): sp, sp1, and sp2 are state_number_t.
18019 (prepare): Rename `final' as `final_state_number', `nnts' as
18020 `nterms_number', `nrules' as `rules_number', `nstates' as
18021 `states_number', and `ntokens' as `tokens_number'. Remove `nsym',
18022 unused.
18023 * data/yacc.c, data/glr.c, data/lalr1.cc: Adjust.
18024 * data/lalr1.cc (nsym_): Remove, unused.
18025
18026 2002-07-03 Akim Demaille <akim@epita.fr>
18027
18028 * src/lalr.h, src/lalr.c (goto_number_t): New.
18029 * src/lalr.c (goto_list_t): New.
18030 Propagate them.
18031 * src/nullable.c (rule_list_t): New.
18032 Propagate.
18033 * src/types.h: Remove.
18034
18035 2002-07-03 Akim Demaille <akim@epita.fr>
18036
18037 * src/closure.c (print_fderives): Use rule_rhs_print.
18038 * src/derives.c (print_derives): Use rule_rhs_print.
18039 (rule_list_t): New, replaces `shorts'.
18040 (set_derives): Add comments.
18041 * tests/sets.at (Nullable, Firsts): Adjust.
18042
18043 2002-07-03 Akim Demaille <akim@epita.fr>
18044
18045 * src/output.c (prepare_actions): Free `tally' and `width'.
18046 (prepare_actions): Allocate and free `order'.
18047 * src/symtab.c (symbols_free): Free `symbols'.
18048 * src/scan-gram.l (scanner_free): Clear Flex's scanners memory.
18049 * src/output.c (m4_invoke): Move to...
18050 * src/scan-skel.l: here.
18051 (<<EOF>>): Close yyout, and free its name.
18052
18053 2002-07-03 Akim Demaille <akim@epita.fr>
18054
18055 Fix some memory leaks, and fix a bug: state 0 was examined twice.
18056
18057 * src/LR0.c (new_state): Merge into...
18058 (state_list_append): this.
18059 (new_states): Merge into...
18060 (generate_states): here.
18061 (set_states): Don't ensure a proper `errs' state member here, do it...
18062 * src/conflicts.c (conflicts_solve): here.
18063 * src/state.h, src/state.c: Comment changes.
18064 (state_t): Rename member `shifts' as `transitions'.
18065 Adjust all dependencies.
18066 (errs_new): For consistency, also take the values as argument.
18067 (errs_dup): Remove.
18068 (state_errs_set): New.
18069 (state_reductions_set, state_transitions_set): Assert that no
18070 previous value was assigned.
18071 (state_free): New.
18072 (states_free): Use it.
18073 * src/conflicts.c (resolve_sr_conflict): Don't use an `errs_t' as
18074 temporary storage: use `errs' and `nerrs' as elsewhere.
18075 (set_conflicts): Allocate and free this `errs'.
18076
18077 2002-07-02 Akim Demaille <akim@epita.fr>
18078
18079 * lib/libiberty.h: New.
18080 * lib: Update the bitset implementation from upstream.
18081 * src/closure.c, src/lalr.c, src/output.c, src/print_graph.c,
18082 * src/state.c: Use BITSET_FOR_EACH, not BITSET_EXECUTE.
18083 * src/main.c: Adjust bitset stats calls.
18084
18085 2002-07-01 Paul Eggert <eggert@twinsun.com>
18086
18087 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>): Convert to unsigned
18088 char, so that negative chars don't collide with $.
18089
18090 2002-06-30 Akim Demaille <akim@epita.fr>
18091
18092 Have the GLR tests be `warning' checked, and fix the warnings.
18093
18094 * data/glr.c (YYFPRINTF): Always define it, not only when YYDEBUG
18095 (yyuserAction, yyreportAmbiguity): `Use' all the arguments.
18096 (yyremoveDeletes): `yyi' and `yyj' are size_t.
18097 Use YYFPRINTF when under if (YYDEBUG) to avoid empty `if' bodies.
18098 (yyaddDeferredAction): static.
18099 (yyglrReduce): yyi, yyk, amd yyposn are size_t.
18100 (yyreportParseError): yyprefix is const.
18101 yytokenp is used only when verbose.
18102 (yy__GNUC__): Replace with __GNUC__.
18103 (yypdumpstack): yyi is size_t.
18104 (yypreference): Un-yy local variables and arguments, to avoid
18105 clashes with `yyr1'. Anyway, we are not in the user name space.
18106 (yytname_size): be an int, as is compared with ints.
18107 * tests/testsuite.at (AT_COMPILE, AT_PARSER_CHECK): New.
18108 Use them.
18109 * tests/cxx-gram.at: Use quotation to protect $1.
18110 Use AT_COMPILE to enable warnings hunts.
18111 Prototype yylex and yyerror.
18112 `Use' argc.
18113 Include `string.h', not `strings.h'.
18114 Produce and prototype stmtMerge only when used.
18115 yylex takes a location.
18116
18117 2002-06-30 Akim Demaille <akim@epita.fr>
18118
18119 We spend a lot of time in quotearg, in particular when --verbose.
18120
18121 * src/symtab.c (symbol_get): Store a quoted version of the key.
18122 (symbol_tag_get, symbol_tag_get_n, symbol_tag_print): Remove.
18123 Adjust all callers.
18124
18125 2002-06-30 Akim Demaille <akim@epita.fr>
18126
18127 * src/state.h (reductions_t): Rename member `nreds' as num.
18128 (errs_t): Rename members `nerrs' and `errs' as `num' and `symbols'.
18129 * src/state.c (ERRS_ALLOC, REDUCTIONS_ALLOC): Use the correct types.
18130
18131 2002-06-30 Akim Demaille <akim@epita.fr>
18132
18133 * src/state.h, src/state.c (shift_t, SHIFT_SYMBOL, SHIFT_IS_SHIFT)
18134 (SHIFT_IS_GOTO, SHIFT_IS_ERROR, SHIFT_DISABLE, SHIFT_IS_DISABLED)
18135 (shifts_to): Rename as...
18136 (transition_t, TRANSITION_SYMBOL, TRANSITION_IS_TRANSITION)
18137 (TRANSITION_IS_GOTO, TRANSITION_IS_ERROR, TRANSITION_DISABLE)
18138 (TRANSITION_IS_DISABLED, transitions_to): these.
18139
18140 2002-06-30 Akim Demaille <akim@epita.fr>
18141
18142 * src/print.c (print_shifts, print_gotos): Merge into...
18143 (print_transitions): this.
18144 (print_transitions, print_errs, print_reductions): Align the
18145 lookaheads columns.
18146 (print_core, print_transitions, print_errs, print_state,
18147 print_grammar): Output empty lines separator before, not after.
18148 (state_default_rule_compute): Rename as...
18149 (state_default_rule): this.
18150 * tests/conflicts.at (Defaulted Conflicted Reduction),
18151 (Unresolved SR Conflicts, Resolved SR Conflicts): Adjust.
18152 * tests/regression.at (Rule Line Numbers, Web2c Report): Adjust.
18153
18154 2002-06-30 Akim Demaille <akim@epita.fr>
18155
18156 Display items as we display rules.
18157
18158 * src/gram.h, src/gram.c (rule_lhs_print): New.
18159 * src/gram.c (grammar_rules_partial_print): Use it.
18160 * src/print.c (print_core): Likewise.
18161 * tests/conflicts.at (Defaulted Conflicted Reduction),
18162 (Unresolved SR Conflicts): Adjust.
18163 (Unresolved SR Conflicts): Adjust and rename as...
18164 (Resolved SR Conflicts): this, as was meant.
18165 * tests/regression.at (Web2c Report): Adjust.
18166
18167 2002-06-30 Akim Demaille <akim@epita.fr>
18168
18169 * src/print.c (state_default_rule_compute): New, extracted from...
18170 (print_reductions): here.
18171 Pessimize, but clarify the code.
18172 * tests/conflicts.at (Defaulted Conflicted Reduction): New.
18173
18174 2002-06-30 Akim Demaille <akim@epita.fr>
18175
18176 * src/output.c (action_row): Let default_rule be always a rule
18177 number.
18178
18179 2002-06-30 Akim Demaille <akim@epita.fr>
18180
18181 * src/closure.c (print_firsts, print_fderives, closure):
18182 Use BITSET_EXECUTE.
18183 * src/lalr.c (lookaheads_print): Likewise.
18184 * src/state.c (state_rule_lookaheads_print): Likewise.
18185 * src/print_graph.c (print_core): Likewise.
18186 * src/print.c (print_reductions): Likewise.
18187 * src/output.c (action_row): Likewise.
18188 Use SHIFT_IS_DISABLED, SHIFT_IS_SHIFT and SHIFT_SYMBOL.
18189
18190 2002-06-30 Akim Demaille <akim@epita.fr>
18191
18192 * src/print_graph.c: Use report_flag.
18193
18194 2002-06-30 Akim Demaille <akim@epita.fr>
18195
18196 * src/lalr.c (traverse, digraph, matrix_print, transpose): Move
18197 to...
18198 * src/relation.h, src/relation.c (traverse, relation_digraph)
18199 (relation_print, relation_transpose): New.
18200
18201 2002-06-30 Akim Demaille <akim@epita.fr>
18202
18203 * src/state.h, src/state.c (shifts_to): New.
18204 * src/lalr.c (build_relations): Use it.
18205
18206 2002-06-30 Akim Demaille <akim@epita.fr>
18207
18208 * src/gram.h (rule_number_t, RULE_NUMBER_MAX, int_of_rule_number)
18209 (item_number_of_rule_number, rule_number_of_item_number): New.
18210 * src/LR0.c, src/closure.c, src/derives.c, src/derives.h,
18211 * src/gram.c, src/lalr.c, src/nullable.c, src/output.c, src/print.c,
18212 * src/print_graph.c, src/reader.c, src/reduce.c, src/reduce.h:
18213 Propagate their use.
18214 Much remains to be done, in particular wrt `shorts' from types.h.
18215
18216 2002-06-30 Akim Demaille <akim@epita.fr>
18217
18218 * src/symtab.c (symbol_new): Initialize the `printer' member.
18219
18220 2002-06-30 Akim Demaille <akim@epita.fr>
18221
18222 * src/LR0.c (save_reductions): Remove, replaced by...
18223 * src/state.h, src/state.c (state_reductions_set): New.
18224 (reductions, errs): Rename as...
18225 (reductions_t, errs_t): these.
18226 Adjust all dependencies.
18227
18228 2002-06-30 Akim Demaille <akim@epita.fr>
18229
18230 * src/LR0.c (state_list_t, state_list_append): New.
18231 (first_state, last_state): Now symbol_list_t.
18232 (this_state): Remove.
18233 (new_itemsets, append_states, save_reductions): Take a state_t as
18234 argument.
18235 (set_states, generate_states): Adjust.
18236 (save_shifts): Remove, replaced by...
18237 * src/state.h, src/state.c (state_shifts_set): New.
18238 (shifts): Rename as...
18239 (shifts_t): this.
18240 Adjust all dependencies.
18241 * src/state.h (state_t): Remove the `next' member.
18242
18243 2002-06-30 Akim Demaille <akim@epita.fr>
18244
18245 * src/vcg.c (quote): Use slot 2, since we often pass symbol tag
18246 escaped in slot 0.
18247
18248 2002-06-30 Akim Demaille <akim@epita.fr>
18249
18250 Use hash.h for the state hash table.
18251
18252 * src/LR0.c (STATE_HASH_SIZE, state_hash): Remove.
18253 (allocate_storage): Use state_hash_new.
18254 (free_storage): Use state_hash_free.
18255 (new_state, get_state): Adjust.
18256 * src/lalr.h, src/lalr.c (states): Move to...
18257 * src/states.h (state_t): Remove the `link' member, no longer
18258 used.
18259 * src/states.h, src/states.c: here.
18260 (state_hash_new, state_hash_free, state_hash_lookup)
18261 (state_hash_insert, states_free): New.
18262 * src/states.c (state_table, state_compare, state_hash): New.
18263 * src/output.c (output_actions): Do not free states now, since we
18264 still need to know the final_state number in `prepare', called
18265 afterwards. Do it...
18266 * src/main.c (main): here: call states_free after `output'.
18267
18268 2002-06-30 Akim Demaille <akim@epita.fr>
18269
18270 * src/state.h, src/state.c (state_new): New, extracted from...
18271 * src/LR0.c (new_state): here.
18272 * src/state.h (STATE_ALLOC): Move to...
18273 * src/state.c: here.
18274 * src/LR0.h, src/LR0.c (nstates, final_state): Move to...
18275 * src/state.h, src/state.c: here.
18276
18277 2002-06-30 Akim Demaille <akim@epita.fr>
18278
18279 * src/reader.c (gensym): Rename as...
18280 * src/symtab.h, src/symtab.c (dummy_symbol_get): this.
18281 (getsym): Rename as...
18282 (symbol_get): this.
18283
18284 2002-06-30 Akim Demaille <akim@epita.fr>
18285
18286 * src/state.h (state_number_t, STATE_NUMBER_MAX): New.
18287 * src/LR0.c, src/LR0.h, src/conflicts.c, src/lalr.c, src/lalr.h,
18288 * src/output.c, src/print.c, src/print_graph.c: Propagate.
18289 * src/LR0.h, src/LR0.h (final_state): Is a state_t*.
18290
18291 2002-06-30 Akim Demaille <akim@epita.fr>
18292
18293 Make the test suite pass with warnings checked.
18294
18295 * tests/actions.at (Printers and Destructors): Improve.
18296 Avoid unsigned vs. signed issues.
18297 * tests/calc.at: Don't exercise the scanner here, do it...
18298 * tests/input.at (Torturing the Scanner): here.
18299
18300 2002-06-28 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
18301
18302 * data/glr.c: Correct typo in Emacs-mode directive. Slightly
18303 reorganize first lines parallel to yacc.c.
18304
18305 2002-06-28 Akim Demaille <akim@epita.fr>
18306
18307 * data/c.m4 (b4_copyright, b4_sint_type, b4_uint_type, b4_token_define)
18308 (b4_token_enum, b4_token_defines): New, factored from...
18309 * data/lalr1.cc, data/yacc.c, glr.c: here.
18310
18311 2002-06-28 Akim Demaille <akim@epita.fr>
18312
18313 * data/yacc.c (yydestruct, yysymprint): Pacify GCC warnings for
18314 unused variables.
18315 * src/output.c (merger_output): static.
18316
18317 2002-06-28 Akim Demaille <akim@epita.fr>
18318
18319 * src/reader.h: s/grammer_current_rule_merge_set/grammar_.../.
18320 * src/conflicts.c (conflicts_total_count): `i' is unsigned, to
18321 pacify GCC.
18322 * src/output.c (save_row): Initialize all the variables to pacify GCC.
18323
18324 2002-06-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
18325
18326 Accumulated changelog for new GLR parsing features.
18327
18328 * src/conflicts.c (count_total_conflicts): Change name to
18329 conflicts_total_count.
18330 * src/conflicts.h: Ditto.
18331 * src/output.c (token_actions): Use the new name.
18332 (output_conflicts): Change conflp => conflict_list_heads, and
18333 confl => conflict_list for better readability.
18334 * data/glr.c: Use the new names.
18335 * NEWS: Add self to GLR announcement.
18336
18337 * src/reader.c (free_merger_functions): Cleanup: XFREE->free.
18338
18339 * doc/bison.texinfo (GLR Parsers): Make corrections suggested by
18340 Akim Demaille.
18341
18342 * data/bison.glr: Change name to glr.c
18343 * data/glr.c: Renamed from bison.glr.
18344 * data/Makefile.am: Add glr.c
18345
18346 * src/getargs.c:
18347
18348 * src/symlist.h: Add dprec and merger fields to symbol_list_s.
18349 * src/symlist.c (symbol_list_new): Initialize dprec and merger fields.
18350
18351 Originally 2002-06-16 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
18352
18353 * data/bison.glr: Be sure to restore the
18354 current #line when returning to the skeleton contents after having
18355 exposed the input file's #line.
18356
18357 Originally 2002-06-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
18358
18359 * data/bison.glr: Bring up to date with changes to bison.simple.
18360
18361 Originally 2002-06-03 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
18362
18363 * data/bison.glr: Correct definitions that use b4_prefix.
18364 Various reformatting.
18365 (GLRStack): Make yychar (in YYPURE case) and yytokenp as part of stack.
18366 (yyreportParseError, yyrecoverParseError, yyprocessOneStack): remove
18367 yytokenp argument; now part of stack.
18368 (yychar): Define to behave as documented.
18369 (yyclearin): Ditto.
18370
18371 Originally 2002-05-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
18372
18373 * src/reader.h: Add declaration for free_merger_functions.
18374
18375 * src/reader.c (merge_functions): New variable.
18376 (get_merge_function): New function.
18377 (free_merger_functions): New function.
18378 (readgram): Check for %prec that is not followed by a symbol.
18379 Handle %dprec and %merge declarations.
18380 (packgram): Initialize dprec and merger fields in rules array.
18381
18382 * src/output.c (conflict_tos, conflrow, conflict_table, conflict_list,
18383 conflict_list_cnt, conflict_list_free): New variables.
18384 (table_grow): Also grow conflict_table.
18385 (prepare_rules): Output dprec and merger tables.
18386 (conflict_row): New function.
18387 (action_row): Output conflict lists for GLR parser. Don't use
18388 default reduction in conflicted states for GLR parser so that there
18389 are spaces for the conflict lists.
18390 (save_row): Also save conflict information.
18391 (token_actions): Allocate conflict list.
18392 (merger_output): New function.
18393 (pack_vector): Pack conflict table, too.
18394 (output_conflicts): New function to output yyconflp and yyconfl.
18395 (output_check): Allocate conflict_tos.
18396 (output_actions): Output conflict tables, also.
18397 (output_skeleton): Output b4_mergers definition.
18398 (prepare): Output b4_max_rhs_length definition.
18399 Use 'bison.glr' as default skeleton for GLR parsers.
18400
18401 * src/gram.c (glr_parser): New flag.
18402 (grammar_free): Call free_merger_functions.
18403
18404 * src/conflicts.c (count_rr_conflicts): Augment to optionally count
18405 all pairs of conflicting reductions, rather than just all tokens
18406 causing conflicts. Needed to size conflict tables.
18407 (conflicts_output): Modify call to count_rr_conflicts for new
18408 interface.
18409 (conflicts_print): Ditto.
18410 (count_total_conflicts): New function.
18411
18412 * src/reader.h (merger_list): New type.
18413 (merge_functions): New variable.
18414
18415 * src/lex.h (tok_dprec, tok_merge): New token types.
18416
18417 * src/gram.h (rule_s): Add dprec and merger fields.
18418 (glr_parser): New flag.
18419
18420 * src/conflicts.h (count_total_conflicts): New function.
18421
18422 * src/options.c (option_table): Add %dprec, %merge, and %glr-parser.
18423
18424 * doc/bison.texinfo (Generalized LR Parsing): New section.
18425 (GLR Parsers): New section.
18426 (Language and Grammar): Mention GLR parsing.
18427 (Table of Symbols): Add %dprec, %glr-parser, %merge, GLR
18428 Correct typo ("tge" -> "the").
18429
18430 * data/bison.glr: New skeleton for GLR parsing.
18431
18432 * tests/cxx-gram.at: New tests for GLR parsing.
18433
18434 * tests/testsuite.at: Include cxx-gram.at.
18435
18436 * tests/Makefile.am: Add cxx-gram.at.
18437
18438 * src/parse-gram.y:
18439
18440 * src/scan-gram.l: Add %dprec, %glr-parser, %merge.
18441
18442 * src/parse-gram.y: Grammar for %dprec, %merge, %glr-parser.
18443
18444 2002-06-27 Akim Demaille <akim@epita.fr>
18445
18446 * src/options.h, src/options.c: Remove.
18447 * src/getargs.c (short_options, long_options): New.
18448
18449 2002-06-27 Akim Demaille <akim@epita.fr>
18450
18451 * data/bison.simple, data/bison.c++: Rename as...
18452 * data/yacc.c, data/lalr1.cc: these.
18453 * doc/bison.texinfo (Environment Variables): Remove.
18454
18455 2002-06-25 Raja R Harinath <harinath@cs.umn.edu>
18456
18457 * src/getargs.c (report_argmatch): Initialize strtok().
18458
18459 2002-06-20 Akim Demaille <akim@epita.fr>
18460
18461 * data/bison.simple (b4_symbol_actions): New, replaces...
18462 (b4_symbol_destructor, b4_symbol_printer): these.
18463 (yysymprint): Be sure to call YYPRINT only for tokens, and using
18464 user token numbers.
18465
18466 2002-06-20 Akim Demaille <akim@epita.fr>
18467
18468 * data/bison.simple (yydestructor): Rename as...
18469 (yydestruct): this.
18470
18471 2002-06-20 Akim Demaille <akim@epita.fr>
18472
18473 * src/symtab.h, src/symtab.c (symbol_type_set)
18474 (symbol_destructor_set, symbol_precedence_set): The location is
18475 the last argument.
18476 Adjust all callers.
18477
18478 2002-06-20 Akim Demaille <akim@epita.fr>
18479
18480 * src/parse-gram.y (YYPRINT, yyprint): Don't mess with the parser
18481 internals.
18482 * src/reader.h, src/reader.c (grammar_current_rule_prec_set):
18483 Takes a location.
18484 * src/symtab.h, src/symtab.c (symbol_class_set)
18485 (symbol_user_token_number_set): Likewise.
18486 Adjust all callers.
18487 Promote complain_at.
18488 * tests/input.at (Type Clashes): Adjust.
18489
18490 2002-06-20 Akim Demaille <akim@epita.fr>
18491
18492 * data/bison.simple (YYLEX): Fix the declaration when
18493 %pure-parser.
18494
18495 2002-06-20 Akim Demaille <akim@epita.fr>
18496
18497 * data/bison.simple (yysymprint): Don't print the token number,
18498 just its name.
18499 * tests/actions.at (Destructors): Rename as...
18500 (Printers and Destructors): this.
18501 Also exercise %printer.
18502
18503 2002-06-20 Akim Demaille <akim@epita.fr>
18504
18505 * data/bison.simple (YYDSYMPRINT): New.
18506 Use it to remove many of the #if YYDEBUG/if (yydebug).
18507
18508 2002-06-20 Akim Demaille <akim@epita.fr>
18509
18510 * src/symtab.h, src/symtab.c (symbol_t): printer and
18511 printer_location are new members.
18512 (symbol_printer_set): New.
18513 * src/parse-gram.y (PERCENT_PRINTER): New token.
18514 Handle its associated rule.
18515 * src/scan-gram.l: Adjust.
18516 (handle_destructor_at, handle_destructor_dollar): Rename as...
18517 (handle_symbol_code_at, handle_symbol_code_dollar): these.
18518 * src/output.c (symbol_printers_output): New.
18519 (output_skeleton): Call it.
18520 * data/bison.simple (yysymprint): New. Cannot be named yyprint
18521 since there are already many grammar files with a user `yyprint'.
18522 Replace the calls to YYPRINT to calls to yysymprint.
18523 * tests/calc.at: Adjust.
18524 * tests/torture.at (AT_DATA_STACK_TORTURE): Remove YYPRINT: it was
18525 taking advantage of parser very internal details (stack size!).
18526
18527 2002-06-20 Akim Demaille <akim@epita.fr>
18528
18529 * src/scan-gram.l: Complete the scanner with the missing patterns
18530 to pacify Flex.
18531 Use `quote' and `symbol_tag_get' where appropriate.
18532
18533 2002-06-19 Akim Demaille <akim@epita.fr>
18534
18535 * tests/actions.at (Destructors): Augment to test locations.
18536 * data/bison.simple (yydestructor): Pass it the current location
18537 if locations are enabled.
18538 Prototype only when __STDC__ or C++.
18539 Change the argument names to move into the yy name space: there is
18540 user code here.
18541
18542 2002-06-19 Akim Demaille <akim@epita.fr>
18543
18544 * data/bison.simple (b4_pure_if): New.
18545 Use it instead of #ifdef YYPURE.
18546
18547 2002-06-19 Akim Demaille <akim@epita.fr>
18548
18549 * data/bison.simple (b4_location_if): New.
18550 Use it instead of #ifdef YYLSP_NEEDED.
18551
18552 2002-06-19 Akim Demaille <akim@epita.fr>
18553
18554 Prepare @$ in %destructor, but currently don't bind it in the
18555 skeleton, as %location use is not cleaned up yet.
18556
18557 * src/scan-gram.l (handle_dollar, handle_destructor_at)
18558 (handle_action_at): New.
18559 (handle_at, handle_action_dollar, handle_destructor_dollar): Take
18560 a braced_code_t and a location as additional arguments.
18561 (handle_destructor_dollar): Instead of requiring `b4_eval', just
18562 unquote one when outputting `b4_dollar_dollar'.
18563 Adjust callers.
18564 * data/bison.simple (b4_eval): Remove.
18565 (b4_symbol_destructor): Adjust.
18566 * tests/input.at (Invalid @n): Adjust.
18567
18568 2002-06-19 Zack Weinberg <zack@codesourcery.com>
18569
18570 * doc/bison.texinfo: Document ability to have multiple
18571 prologue sections.
18572
18573 2002-06-18 Akim Demaille <akim@epita.fr>
18574
18575 * src/files.c (compute_base_names): When computing the output file
18576 names from the input file name, strip the directory part.
18577
18578 2002-06-18 Akim Demaille <akim@epita.fr>
18579
18580 * data/bison.simple.new: Comment changes.
18581 Reported by Andreas Schwab.
18582
18583 2002-06-18 Matt Kraai <kraai@alumni.cmu.edu>
18584
18585 * data/bison.simple (yyoverflowlab): #ifndef yyoverflow, so that
18586 there are no `label `yyoverflowlab' defined but not used' warnings
18587 when yyoverflow is defined.
18588
18589 2002-06-18 Akim Demaille <akim@epita.fr>
18590
18591 * src/symtab.h, src/symtab.c (symbol_t): destructor_location is a
18592 new member.
18593 (symbol_destructor_set): Adjust.
18594 * src/output.c (symbol_destructors_output): Output the destructor
18595 locations.
18596 Output the symbol name.
18597 * data/bison.simple (b4_symbol_destructor): Adjust.
18598
18599 2002-06-18 Cris Bailiff <c.bailiff@awayweb.com>
18600 and Akim Demaille <akim@epita.fr>
18601
18602 * data/bison.simple.new (yyerrlab1): Be sure to pop and destroy
18603 what's left on the stack when the error recovery hits EOF.
18604 * tests/actions.at (Destructors): Complete to exercise this case.
18605
18606 2002-06-17 Akim Demaille <akim@epita.fr>
18607
18608 * data/m4sugar/m4sugar.m4 (m4_map): Recognize when the list of
18609 arguments is really empty, not only equal to `[]'.
18610 * src/symtab.h, src/symtab.c (symbol_t): `destructor' is a new
18611 member.
18612 (symbol_destructor_set): New.
18613 * src/output.c (symbol_destructors_output): New.
18614 * src/reader.h (brace_code_t, current_braced_code): New.
18615 * src/scan-gram.l (BRACED_CODE): Use it to branch on...
18616 (handle_dollar): Rename as...
18617 (handle_action_dollar): this.
18618 (handle_destructor_dollar): New.
18619 * src/parse-gram.y (PERCENT_DESTRUCTOR): New.
18620 (grammar_declaration): Use it.
18621 * data/bison.simple (yystos): Is always defined.
18622 (yydestructor): New.
18623 * tests/actions.at (Destructors): New.
18624 * tests/calc.at (_AT_CHECK_CALC_ERROR): Don't rely on egrep.
18625
18626 2002-06-17 Akim Demaille <akim@epita.fr>
18627
18628 * src/symlist.h, src/symlist.c (symbol_list_length): New.
18629 * src/scan-gram.l (handle_dollar, handle_at): Compute the
18630 rule_length only when needed.
18631 * src/output.c (actions_output, token_definitions_output): Output
18632 the full M4 block.
18633 * src/symtab.c: Don't access directly to the symbol tag, use
18634 symbol_tag_get.
18635 * src/parse-gram.y: Use symbol_list_free.
18636
18637 2002-06-17 Akim Demaille <akim@epita.fr>
18638
18639 * src/reader.h, src/reader.c (symbol_list, symbol_list_new)
18640 (symbol_list_prepend, get_type_name): Move to...
18641 * src/symlist.h, src/symlist.c (symbol_list_t, symbol_list_new)
18642 (symbol_list_prepend, symbol_list_n_type_name_get): here.
18643 Adjust all callers.
18644 (symbol_list_free): New.
18645 * src/scan-gram.l (handle_dollar): Takes a location.
18646 * tests/input.at (Invalid $n): Adjust.
18647
18648 2002-06-17 Akim Demaille <akim@epita.fr>
18649
18650 * src/reader.h, src/reader.c (symbol_list_new): Export it.
18651 (symbol_list_prepend): New.
18652 * src/parse-gram.y (%union): `list' is a new member.
18653 (symbols.1): New, replaces...
18654 (terms_to_prec.1, nterms_to_type.1): these.
18655 * src/symtab.h, src/symtab.c (symbol_type_set, symbol_precedence_set)
18656 Take a location as additional argument.
18657 Adjust all callers.
18658
18659 2002-06-15 Akim Demaille <akim@epita.fr>
18660
18661 * src/parse-gram.y: Move %token in the declaration section so that
18662 we don't depend upon CVS Bison.
18663
18664 2002-06-15 Akim Demaille <akim@epita.fr>
18665
18666 * src/state.h, src/state.c (state_rule_lookaheads_print): New.
18667 * src/print.c (print_core): Use it.
18668
18669 2002-06-15 Akim Demaille <akim@epita.fr>
18670
18671 * src/conflicts.c (log_resolution): Accept the rule involved in
18672 the sr conflicts instead of the lookahead number that points to
18673 that rule.
18674 (flush_reduce): Accept the current lookahead vector as argument,
18675 instead of the index in LA.
18676 (resolve_sr_conflict): Accept the current number of lookahead
18677 bitset to consider for the STATE, instead of the index in LA.
18678 (set_conflicts): Adjust.
18679 * src/lalr.c, src/lalr.h, src/state.h: Comment changes.
18680
18681 2002-06-15 Akim Demaille <akim@epita.fr>
18682
18683 * src/state.h (state_t): Replace the `lookaheadsp' member, a
18684 short, with `lookaheads' (bitsetv), `lookaheads_rule' (rule_t**).
18685 Adjust all dependencies.
18686 * src/lalr.c (initialize_lookaheads): Split into...
18687 (states_lookaheads_count, states_lookaheads_initialize): these.
18688 (lalr): Adjust.
18689
18690 2002-06-15 Akim Demaille <akim@epita.fr>
18691
18692 * src/gram.h, src/gram.c (grammar_rules_partial_print): New, eved
18693 out of...
18694 (grammar_rules_print): here.
18695 * src/reduce.c (reduce_output): Use it.
18696 * tests/reduce.at (Useless Rules, Reduced Automaton)
18697 (Underivable Rules): Adjust.
18698
18699 2002-06-15 Akim Demaille <akim@epita.fr>
18700
18701 Copy BYacc's nice way to report the grammar.
18702
18703 * src/gram.h, src/gram.c (grammar_rhs_print, grammar_rules_print):
18704 New.
18705 Don't print the rules' location, it is confusing and useless.
18706 (rule_print): Use grammar_rhs_print.
18707 * src/print.c (print_grammar): Use grammar_rules_print.
18708
18709 2002-06-15 Akim Demaille <akim@epita.fr>
18710
18711 Complete and rationalize `useless thing' warnings.
18712
18713 * src/symtab.h, src/symtab.c (symbol_tag_get, symbol_tag_get_n)
18714 (symbol_tag_print): New.
18715 Use them everywhere in place of accessing directly the tag member.
18716 * src/gram.h, src/gram.c (rule_print): New.
18717 Use it where a rule used to be printed `by hand'.
18718 * src/reduce.c (nonterminals_reduce): Report the use nonterminals.
18719 (reduce_grammar_tables): Report the useless rules.
18720 (reduce_print): Useless things are a warning, not an error.
18721 Report it as such.
18722 * tests/reduce.at (Useless Nonterminals, Useless Rules):
18723 (Reduced Automaton, Underivable Rules): Adjust.
18724 * tests/regression.at (Web2c Report, Web2c Report): Adjust.
18725 * tests/conflicts.at (Unresolved SR Conflicts)
18726 (Solved SR Conflicts): Adjust.
18727
18728 2002-06-15 Akim Demaille <akim@epita.fr>
18729
18730 Let symbols have a location.
18731
18732 * src/symtab.h, src/symtab.c (symbol_t): Location is a new member.
18733 (getsym): Adjust.
18734 Adjust all callers.
18735 * src/complain.h, src/complain.c (complain_at, fatal_at, warn_at):
18736 Use location_t, not int.
18737 * src/symtab.c (symbol_check_defined): Take advantage of the
18738 location.
18739 * tests/regression.at (Invalid inputs): Adjust.
18740
18741 2002-06-15 Akim Demaille <akim@epita.fr>
18742
18743 * src/parse-gram.y (YYLLOC_DEFAULT, current_lhs_location): New.
18744 (input): Don't try to initialize yylloc here, do it in the
18745 scanner.
18746 * src/scan-gram.l (YY_USER_INIT): Initialize yylloc.
18747 * src/gram.h (rule_t): Change line and action_line into location
18748 and action_location, of location_t type.
18749 Adjust all dependencies.
18750 * src/location.h, src/location.c (empty_location): New.
18751 * src/reader.h, src/reader.c (grammar_start_symbol_set)
18752 (grammar_symbol_append, grammar_rule_begin, grammar_rule_end)
18753 (grammar_current_rule_symbol_append)
18754 (grammar_current_rule_action_append): Expect a location as argument.
18755 * src/reader.c (grammar_midrule_action): Adjust to attach an
18756 action's location as dummy symbol location.
18757 * src/symtab.h, src/symtab.c (startsymbol_location): New.
18758 * tests/regression.at (Web2c Report, Rule Line Numbers): Adjust
18759 the line numbers.
18760
18761 2002-06-14 Akim Demaille <akim@epita.fr>
18762
18763 Grammar declarations may be found in the grammar section.
18764
18765 * src/parse-gram.y (rules_or_grammar_declaration): New.
18766 (declarations): Each declaration may end with a semicolon, not
18767 just...
18768 (grammar_declaration): `"%union"'.
18769 (grammar): Branch to rules_or_grammar_declaration.
18770
18771 2002-06-14 Akim Demaille <akim@epita.fr>
18772
18773 * src/main.c (main): Invoke scanner_free.
18774
18775 2002-06-14 Akim Demaille <akim@epita.fr>
18776
18777 * src/output.c (m4_invoke): Extracted from...
18778 (output_skeleton): here.
18779 Free tempfile.
18780
18781 2002-06-14 Akim Demaille <akim@epita.fr>
18782
18783 * src/parse-gram.y (directives, directive, gram)
18784 (grammar_directives, precedence_directives, precedence_directive):
18785 Rename as...
18786 (declarations, declaration, grammar, grammar_declaration)
18787 (precedence_declaration, precedence_declarator): these.
18788 (symbol_declaration): New.
18789
18790 2002-06-14 Akim Demaille <akim@epita.fr>
18791
18792 * src/files.c (action_obstack): Remove, unused.
18793 (output_obstack): Remove it, and all its dependencies, as it is no
18794 longer needed.
18795 * src/reader.c (epilogue_set): Build the epilogue in the
18796 muscle_obstack.
18797 * src/output.h, src/output.c (muscle_obstack): Move to...
18798 * src/muscle_tab.h, src/muscle_tab.h: here.
18799 (muscle_init): Initialize muscle_obstack.
18800 (muscle_free): New.
18801 * src/main.c (main): Call it.
18802
18803 2002-06-14 Akim Demaille <akim@epita.fr>
18804
18805 * src/location.h: New, extracted from...
18806 * src/reader.h: here.
18807 * src/Makefile.am (noinst_HEADERS): Merge into
18808 (bison_SOURCES): this.
18809 Add location.h.
18810 * src/parse-gram.y: Use location_t instead of Bison's.
18811 * src/reader.h, src/reader.c (prologue_augment, epilogue_set):
18812 Use location_t instead of ints.
18813
18814 2002-06-14 Akim Demaille <akim@epita.fr>
18815
18816 * data/bison.simple, data/bison.c++: Be sure to restore the
18817 current #line when returning to the skeleton contents after having
18818 exposed the input file's #line.
18819
18820 2002-06-12 Akim Demaille <akim@epita.fr>
18821
18822 * src/scan-gram.l (SC_BRACED_CODE): Don't use `<.*>', it is too
18823 eager.
18824 * tests/actions.at (Exotic Dollars): New.
18825
18826 2002-06-12 Akim Demaille <akim@epita.fr>
18827
18828 * src/scan-gram.l (SC_PROLOGUE): Don't eat characters amongst
18829 ['"/] too eagerly.
18830 * tests/input.at (Torturing the Scanner): New.
18831
18832 2002-06-11 Akim Demaille <akim@epita.fr>
18833
18834 * src/scan-gram.l (YY_OBS_INIT): Remove, replace with...
18835 [SC_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,SC_PROLOGUE]
18836 [SC_EPILOGUE]: Output the quadrigraphs only when not in a comment.
18837 * src/reader.h, src/scan-gram.l (scanner_initialize): this.
18838 * src/reader.c (reader): Use it.
18839
18840 2002-06-11 Akim Demaille <akim@epita.fr>
18841
18842 * src/scan-gram.l (YY_OBS_FINISH): Don't set yylval.
18843 Adjust all callers.
18844 (scanner_last_string_free): New.
18845
18846 2002-06-11 Akim Demaille <akim@epita.fr>
18847
18848 * src/scan-gram.l (YY_INIT, YY_GROW, YY_FINISH): Rename as...
18849 (YY_OBS_INIT, YY_OBS_GROW, YY_OBS_FINISH): these.
18850 (last_string, YY_OBS_FREE): New.
18851 Use them when returning an ID.
18852
18853 2002-06-11 Akim Demaille <akim@epita.fr>
18854
18855 Have Bison grammars parsed by a Bison grammar.
18856
18857 * src/reader.c, src/reader.h (prologue_augment): New.
18858 * src/reader.c (copy_definition): Remove.
18859
18860 * src/reader.h, src/reader.c (gram_start_symbol_set, prologue_augment)
18861 (grammar_symbol_append, grammar_rule_begin, grammar_midrule_action)
18862 (grammar_current_rule_prec_set, grammar_current_rule_check)
18863 (grammar_current_rule_symbol_append)
18864 (grammar_current_rule_action_append): Export.
18865 * src/parse-gram.y (symbol_list_new, symbol_list_symbol_append_
18866 (symbol_list_action_append): Remove.
18867 Hook the routines from reader.
18868 * src/scan-gram.l: In INITIAL, characters and strings are tokens.
18869 * src/system.h (ATTRIBUTE_NORETURN, ATTRIBUTE_UNUSED): Now.
18870
18871 * src/reader.c (read_declarations): Remove, unused.
18872
18873 * src/parse-gram.y: Handle the epilogue.
18874 * src/reader.h, src/reader.c (gram_start_symbol_set): Rename as...
18875 (grammar_start_symbol_set): this.
18876 * src/scan-gram.l: Be sure to ``use'' yycontrol to keep GCC quiet.
18877 * src/reader.c (readgram): Remove, unused.
18878 (reader): Adjust to insert eoftoken and axiom where appropriate.
18879
18880 * src/reader.c (copy_dollar): Replace with...
18881 * src/scan-gram.h (handle_dollar): this.
18882 * src/parse-gram.y: Remove `%thong'.
18883
18884 * src/reader.c (copy_at): Replace with...
18885 * src/scan-gram.h (handle_at): this.
18886
18887 * src/complain.h, src/complain.c (warn_at, complain_at, fatal_at):
18888 New.
18889
18890 * src/scan-gram.l (YY_LINES): Keep lineno synchronized for the
18891 time being.
18892
18893 * src/reader.h, src/reader.c (grammar_rule_end): New.
18894
18895 * src/parse.y (current_type, current_class): New.
18896 Implement `%nterm', `%token' support.
18897 Merge `%term' into `%token'.
18898 (string_as_id): New.
18899 * src/symtab.h, src/symtab.c (symbol_make_alias): Don't pass the
18900 type name.
18901
18902 * src/parse-gram.y: Be sure to handle properly the beginning of
18903 rules.
18904
18905 * src/parse-gram.y: Handle %type.
18906 * src/reader.c (grammar_rule_end): Call grammar_current_rule_check.
18907
18908 * src/parse-gram.y: More directives support.
18909 * src/options.c: No longer handle source directives.
18910
18911 * src/parse-gram.y: Fix %output.
18912
18913 * src/parse-gram.y: Handle %union.
18914 Use the prologue locations.
18915 * src/reader.c (parse_union_decl): Remove.
18916
18917 * src/reader.h, src/reader.c (epilogue_set): New.
18918 * src/parse-gram.y: Use it.
18919
18920 * data/bison.simple, data/bison.c++: b4_stype is now either not
18921 defined, then default to int, or to the contents of %union,
18922 without `union' itself.
18923 Adjust.
18924 * src/muscle_tab.c (muscle_init): Don't predefine `stype'.
18925
18926 * src/output.c (actions_output): Don't output braces, as they are
18927 already handled by the scanner.
18928
18929 * src/scan-gram.l (SC_CHARACTER): Set the user_token_number of
18930 characters to themselves.
18931
18932 * tests/reduce.at (Reduced Automaton): End the grammars with %% so
18933 that the epilogue has a proper #line.
18934
18935 * src/parse-gram.y: Handle precedence/associativity.
18936
18937 * src/symtab.c (symbol_precedence_set): Requires the symbol to be
18938 a terminal.
18939 * src/scan-gram.l (SC_BRACED_CODE): Catch strings and characters.
18940 * tests/calc.at: Do not use `%token "foo"' as it makes not sense
18941 at all to define terminals that cannot be emitted.
18942
18943 * src/scan-gram.l: Escape M4 characters.
18944
18945 * src/scan-gram.l: Working properly with escapes in user
18946 strings/characters.
18947
18948 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR)
18949 (AT_DATA_HORIZONTAL_GRAMMAR): Respect the `%token ID NUM STRING'
18950 grammar.
18951 Use more modest sizes, as for the time being the parser does not
18952 release memory, and therefore the process swallows a huge amount
18953 of memory.
18954
18955 * tests/torture.at (AT_DATA_LOOKAHEADS_GRAMMAR): Adjust to the
18956 stricter %token grammar.
18957
18958 * src/symtab.h (associativity): Add `undef_assoc'.
18959 (symbol_precedence_set): Do nothing when passed an undef_assoc.
18960 * src/symtab.c (symbol_check_alias_consistence): Adjust.
18961
18962 * tests/regression.at (Invalid %directive): Remove, as it is now
18963 meaningless.
18964 (Invalid inputs): Adjust to the new error messages.
18965 (Token definitions): The new grammar doesn't allow too many
18966 eccentricities.
18967
18968 * src/lex.h, src/lex.c: Remove.
18969 * src/reader.c (lastprec, skip_to_char, read_signed_integer)
18970 (copy_character, copy_string2, copy_string, copy_identifier)
18971 (copy_comment, parse_token_decl, parse_type_decl, parse_assoc_decl)
18972 (parse_muscle_decl, parse_dquoted_param, parse_skel_decl)
18973 (parse_action): Remove.
18974 * po/POTFILES.in: Adjust.
18975
18976 2002-06-11 Akim Demaille <akim@epita.fr>
18977
18978 * src/reader.c (parse_action): Don't store directly into the
18979 rule's action member: return the action as a string.
18980 Don't require `rule_length' as an argument: compute it.
18981 (grammar_current_rule_symbol_append)
18982 (grammar_current_rule_action_append): New, eved out from
18983 (readgram): here.
18984 Remove `action_flag', `rulelength', unused now.
18985
18986 2002-06-11 Akim Demaille <akim@epita.fr>
18987
18988 * src/reader.c (grammar_current_rule_prec_set).
18989 (grammar_current_rule_check): New, eved out from...
18990 (readgram): here.
18991 Remove `xaction', `first_rhs': useless.
18992 * tests/input.at (Type clashes): New.
18993 * tests/existing.at (GNU Cim Grammar): Adjust.
18994
18995 2002-06-11 Akim Demaille <akim@epita.fr>
18996
18997 * src/reader.c (grammar_midrule_action): New, Eved out from
18998 (readgram): here.
18999
19000 2002-06-11 Akim Demaille <akim@epita.fr>
19001
19002 * src/reader.c (grammar_rule_begin, previous_rule, current_rule):
19003 New.
19004 (readgram): Use them as replacement of inlined code, crule and
19005 crule1.
19006
19007 2002-06-11 Akim Demaille <akim@epita.fr>
19008
19009 * src/reader.c (grammar_end, grammar_symbol_append): New.
19010 (readgram): Use them.
19011 Make the use of `p' as local as possible.
19012
19013 2002-06-10 Akim Demaille <akim@epita.fr>
19014
19015 GCJ's parser requires the tokens to be defined before the prologue.
19016
19017 * data/bison.simple: Output the token definition before the user's
19018 prologue.
19019 * tests/regression.at (Braces parsing, Duplicate string)
19020 (Mixing %token styles): Check the output from bison.
19021 (Early token definitions): New.
19022
19023 2002-06-10 Akim Demaille <akim@epita.fr>
19024
19025 * src/symtab.c (symbol_user_token_number_set): Don't complain when
19026 assigning twice the same user number to a token, so that we can
19027 use it in...
19028 * src/lex.c (lex): here.
19029 Also use `symbol_class_set' instead of hand written code.
19030 * src/reader.c (parse_assoc_decl): Likewise.
19031
19032 2002-06-10 Akim Demaille <akim@epita.fr>
19033
19034 * src/symtab.c, src/symtab.c (symbol_class_set)
19035 (symbol_user_token_number_set): New.
19036 * src/reader.c (parse_token_decl): Use them.
19037 Use a switch instead of ifs.
19038 Use a single argument.
19039
19040 2002-06-10 Akim Demaille <akim@epita.fr>
19041
19042 Remove `%thong' support as it is undocumented, unused, duplicates
19043 `%token's job, and creates useless e-mail traffic with people who
19044 want to know what it is, why it is undocumented, unused, and
19045 duplicates `%token's job.
19046
19047 * src/reader.c (parse_thong_decl): Remove.
19048 * src/options.c (option_table): Remove "thong".
19049 * src/lex.h (tok_thong): Remove.
19050
19051 2002-06-10 Akim Demaille <akim@epita.fr>
19052
19053 * src/symtab.c, src/symtab.c (symbol_type_set)
19054 (symbol_precedence_set): New.
19055 * src/reader.c (parse_type_decl, parse_assoc_decl): Use them.
19056 (value_components_used): Remove, unused.
19057
19058 2002-06-09 Akim Demaille <akim@epita.fr>
19059
19060 Move symbols handling code out of the reader.
19061
19062 * src/reader.h, src/reader.c (errtoken, undeftoken, eoftoken)
19063 (axiom): Move to...
19064 * src/symtab.h, src/symtab.c: here.
19065
19066 * src/gram.c (start_symbol): Remove: use startsymbol->number.
19067 * src/reader.c (startval): Rename as...
19068 * src/symtab.h, src/symtab.c (startsymbol): this.
19069 * src/reader.c: Adjust.
19070
19071 * src/reader.c (symbol_check_defined, symbol_make_alias)
19072 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
19073 (token_translations_init)
19074 Move to...
19075 * src/symtab.c: here.
19076 * src/reader.c (packsymbols): Move to...
19077 * src/symtab.h, src/symtab.c (symbols_pack): here.
19078 * src/symtab.h, src/symtab.c (symbol_make_alias): Takes SYMVAL as
19079 argument.
19080
19081 2002-06-03 Akim Demaille <akim@epita.fr>
19082
19083 * src/muscle_tab.c (muscle_insert, muscle_find): Declarations,
19084 then statements.
19085
19086 2002-06-03 Akim Demaille <akim@epita.fr>
19087
19088 * src/muscle_tab.c (muscle_find, muscle_insert): Don't initialize
19089 structs with non literals.
19090 * src/scan-skel.l: never-interactive.
19091 * src/conflicts.c (enum conflict_resolution_e): No trailing
19092 comma.
19093 * src/getargs.c (usage): Split long literal strings.
19094 Reported by Hans Aberg.
19095
19096 2002-05-28 Akim Demaille <akim@epita.fr>
19097
19098 * data/bison.c++: Use C++ ostreams.
19099 (cdebug_): New member.
19100
19101 2002-05-28 Akim Demaille <akim@epita.fr>
19102
19103 * src/output.c (output_skeleton): Be sure to allocate enough room
19104 for `/' _and_ for `\0' in full_skeleton.
19105
19106 2002-05-28 Akim Demaille <akim@epita.fr>
19107
19108 * data/bison.c++: Catch up with bison.simple:
19109 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
19110 and Paul Eggert <eggert@twinsun.com>: `error' handing.
19111 2002-05-26 Akim Demaille <akim@epita.fr>: stos_, token_number_,
19112 and popping traces.
19113
19114 2002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
19115
19116 * src/output.c (output_skeleton): Put an explicit path in front of
19117 the skeleton file name, rather than relying on the -I directory,
19118 to partially alleviate effects of having a skeleton file lying around
19119 in the current directory.
19120
19121 2002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
19122
19123 * src/conflicts.c (log_resolution): Correct typo:
19124 obstack_printf should be obstack_fgrow1.
19125
19126 2002-05-26 Akim Demaille <akim@epita.fr>
19127
19128 * src/state.h (state_t): `solved_conflicts' is a new member.
19129 * src/LR0.c (new_state): Set it to 0.
19130 * src/conflicts.h, src/conflicts.c (print_conflicts)
19131 (free_conflicts, solve_conflicts): Rename as...
19132 (conflicts_print, conflicts_free, conflicts_solve): these.
19133 Adjust callers.
19134 * src/conflicts.c (enum conflict_resolution_e)
19135 (solved_conflicts_obstack): New, used by...
19136 (log_resolution): this.
19137 Adjust to attach the conflict resolution to each state.
19138 Complete the description with the precedence/associativity
19139 information.
19140 (resolve_sr_conflict): Adjust.
19141 * src/print.c (print_state): Output its solved_conflicts.
19142 * tests/conflicts.at (Unresolved SR Conflicts)
19143 (Solved SR Conflicts): Exercise --report=all.
19144
19145 2002-05-26 Akim Demaille <akim@epita.fr>
19146
19147 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
19148 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
19149 * src/reader.c, src/reduce.c, src/state.h, src/symtab.h
19150 (token_number_t, item_number_as_token_number)
19151 (token_number_as_item_number, muscle_insert_token_number_table):
19152 Rename as...
19153 (symbol_number_t, item_number_as_symbol_number)
19154 (symbol_number_as_item_number, muscle_insert_symbol_number_table):
19155 these, since it is more appropriate.
19156
19157 2002-05-26 Akim Demaille <akim@epita.fr>
19158
19159 * tests/calc.at (AT_CHECK_CALC): Adjust: there are now additional
19160 `Error:' lines.
19161 * data/bison.simple (yystos) [YYDEBUG]: New.
19162 (yyparse) [YYDEBUG]: Display the symbols which are popped during
19163 error recovery.
19164 * tests/regression.at (Web2c Actions): Adjust: yystos is output now.
19165
19166 2002-05-25 Akim Demaille <akim@epita.fr>
19167
19168 * doc/bison.texinfo (Debugging): Split into...
19169 (Tracing): this new section, its former contents, and...
19170 (Understanding): this new section.
19171 * src/getargs.h, src/getargs.c (verbose_flag): Remove, replaced
19172 by...
19173 (report_flag): this.
19174 Adjust all dependencies.
19175 (report_args, report_types, report_argmatch): New.
19176 (usage, getargs): Report/support -r, --report.
19177 * src/options.h
19178 (struct option_table_struct): Rename as..,
19179 (struct option_table_s): this.
19180 Rename the `set_flag' member to `flag' to match with getopt_long's
19181 struct.
19182 * src/options.c (option_table): Split verbose into an entry for
19183 %verbose, and another for --verbose.
19184 Support --report/-r, so remove -r from the obsolete --raw.
19185 * src/print.c: Attach full item sets and lookaheads reports to
19186 report_flag instead of trace_flag.
19187 * lib/argmatch.h, lib/argmatch.c: New, from Fileutils 4.1.
19188
19189 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
19190 and Paul Eggert <eggert@twinsun.com>
19191
19192 * data/bison.simple (yyparse): Correct error handling to conform to
19193 POSIX and yacc. Specifically, after syntax error is discovered,
19194 do not reduce further before shifting the error token.
19195 Clean up the code a bit by removing the labels yyerrdefault,
19196 yyerrhandle, yyerrpop.
19197 * NEWS: Document the above.
19198
19199 2002-05-20 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
19200
19201 * data/bison.simple (yyr1): Don't use yy_token_number_type as element
19202 type; it isn't always big enough, since it doesn't necessarily
19203 include non-terminals.
19204 (yytranslate): Expand definition of yy_token_number_type, so that
19205 the latter can be removed.
19206 (yy_token_number_type): Remove, only one use.
19207 * data/bison.c++ (r1_): Parallel change to yyr1 in bison.simple---
19208 don't use TokenNumberType as element type.
19209
19210 * tests/regression.at: Modify expected output to agree with change
19211 to yyr1 and yytranslate.
19212
19213 2002-05-13 Florian Krohm <florian@edamail.fishkill.ibm.com>
19214
19215 * src/reader.c (parse_action): Use copy_character instead of
19216 obstack_1grow.
19217
19218 2002-05-13 Akim Demaille <akim@epita.fr>
19219
19220 * tests/regression.at (Token definitions): Prototype yylex and
19221 yyerror.
19222
19223 2002-05-12 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
19224
19225 * src/scan-skel.l: Correct off-by-one error in handling of __oline__.
19226 * data/bison.simple (b4_sint_type, b4_uint_type): Correct to reflect
19227 32-bit arithmetic.
19228 * data/bison.c++ (b4_sint_type, b4_uint_type): Ditto.
19229
19230 2002-05-07 Akim Demaille <akim@epita.fr>
19231
19232 * tests/synclines.at: Be sure to prototype yylex and yyerror to
19233 avoid GCC warnings.
19234
19235 2002-05-07 Akim Demaille <akim@epita.fr>
19236
19237 Kill GCC warnings.
19238
19239 * src/reduce.c (nonterminals_reduce): Don't loop over RITEM: loop
19240 over the RHS of each rule.
19241 * src/gram.h, src/gram.c (nritems): Is `unsigned int', not int.
19242 * src/state.h (state_t): Member `nitems' is unsigned short.
19243 * src/LR0.c (get_state): Adjust.
19244 * src/reader.c (packgram): Likewise.
19245 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): `max' is of type
19246 `Type'.
19247 (muscle_insert_int_table): Remove, unused.
19248 (prepare_rules): Remove `max'.
19249
19250 2002-05-06 Akim Demaille <akim@epita.fr>
19251
19252 * src/closure.c (print_firsts): Display of the symbol tags.
19253 (bitmatrix_print): Move to...
19254 * lib/bitsetv-print.h, lib/bitsetv-print.c (bitsetv_matrix_dump):
19255 here.
19256 * tests/sets.at (Nullable, Broken Closure, Firsts): Adjust.
19257
19258 2002-05-06 Akim Demaille <akim@epita.fr>
19259
19260 * src/muscle_tab.c (muscle_m4_output): Must return TRUE for
19261 hash_do_for_each.
19262
19263 2002-05-06 Akim Demaille <akim@epita.fr>
19264
19265 * src/LR0.c (new_state, get_state): Instead of using the global
19266 `kernel_size' and `kernel_base', have two new arguments:
19267 `core_size' and `core'.
19268 Adjust callers.
19269
19270 2002-05-06 Akim Demaille <akim@epita.fr>
19271
19272 * src/reader.c (packgram): No longer end `ritem' with a 0
19273 sentinel: it is not used.
19274
19275 2002-05-05 Akim Demaille <akim@epita.fr>
19276
19277 New experimental feature: display the lookaheads in the report and
19278 graph.
19279
19280 * src/print (print_core): When --trace-flag, display the rules
19281 lookaheads.
19282 * src/print_graph.c (print_core): Likewise.
19283 Swap the arguments.
19284 Adjust caller.
19285
19286 2002-05-05 Akim Demaille <akim@epita.fr>
19287
19288 * tests/torture.at (Many lookaheads): New test.
19289
19290 2002-05-05 Akim Demaille <akim@epita.fr>
19291
19292 * src/output.c (GENERATE_OUTPUT_TABLE): Replace with...
19293 (GENERATE_MUSCLE_INSERT_TABLE): this.
19294 (output_int_table, output_unsigned_int_table, output_short_table)
19295 (output_token_number_table, output_item_number_table): Replace with...
19296 (muscle_insert_int_table, muscle_insert_unsigned_int_table)
19297 (muscle_insert_short_table, muscle_insert_token_number_table)
19298 (muscle_insert_item_number_table): these.
19299 Adjust all callers.
19300 (prepare_tokens): Don't free `translations', since...
19301 * src/reader.h, src/reader.c (grammar_free): do it.
19302 Move to...
19303 * src/gram.h, src/gram.c (grammar_free): here.
19304 * data/bison.simple, data/bison.c++: b4_token_number_max is now
19305 b4_translate_max.
19306
19307 2002-05-05 Akim Demaille <akim@epita.fr>
19308
19309 * src/output.c (output_unsigned_int_table): New.
19310 (prepare_rules): `i' is unsigned.
19311 `prhs', `rline', `r2' are unsigned int.
19312 Rename muscle `rhs_number_max' as `rhs_max'.
19313 Output muscles `prhs_max', `rline_max', and `r2_max'.
19314 Free rline and r1.
19315 * data/bison.simple, data/bison.c++: Adjust to use these muscles
19316 to compute types instead of constant types.
19317 * tests/regression.at (Web2c Actions): Adjust.
19318
19319 2002-05-04 Akim Demaille <akim@epita.fr>
19320
19321 * src/symtab.h (SALIAS, SUNDEF): Rename as...
19322 (USER_NUMBER_ALIAS, USER_NUMBER_UNDEFINED): these.
19323 Adjust dependencies.
19324 * src/output.c (token_definitions_output): Be sure not to output a
19325 `#define 'a'' when fed with `%token 'a' "a"'.
19326 * tests/regression.at (Token definitions): New.
19327
19328 2002-05-03 Paul Eggert <eggert@twinsun.com>
19329
19330 * data/bison.simple (b4_token_defines): Also define YYTOKENTYPE
19331 for K&R C.
19332
19333 2002-05-03 gettextize <bug-gnu-gettext@gnu.org>
19334
19335 * Makefile.am (SUBDIRS): Remove intl.
19336 (EXTRA_DIST): Add config/config.rpath.
19337
19338 2002-05-03 Akim Demaille <akim@epita.fr>
19339
19340 * data/bison.simple (m4_if): Don't output empty enums.
19341 And actually, output valid enum definitions :(.
19342
19343 2002-05-03 Akim Demaille <akim@epita.fr>
19344
19345 * configure.bat: Remove, completely obsolete.
19346 * Makefile.am (EXTRA_DIST): Adjust.
19347 Don't distribute config.rpath...
19348 * config/Makefile.am (EXTRA_DIST): Do it.
19349
19350 2002-05-03 Akim Demaille <akim@epita.fr>
19351
19352 * configure.in (GETTEXT_VERSION): New.
19353 Suggested by Bruno Haible for the forthcoming Gettext 0.10.3.
19354
19355 2002-05-03 Akim Demaille <akim@epita.fr>
19356
19357 * data/bison.simple (b4_token_enum): New.
19358 (b4_token_defines): Use it to output tokens both as #define and
19359 enums.
19360 Suggested by Paul Eggert.
19361 * src/output.c (token_definitions_output): Don't output spurious
19362 white spaces.
19363
19364 2002-05-03 Akim Demaille <akim@epita.fr>
19365
19366 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
19367
19368 2002-05-02 Robert Anisko <robert@lrde.epita.fr>
19369
19370 * data/bison.c++: Adapt expansion of $s and @s to the C++ parser.
19371 Update the stack class, give a try to deque as the default container.
19372
19373 2002-05-02 Akim Demaille <akim@epita.fr>
19374
19375 * data/bison.simple (yyparse): Do not implement @$ = @1.
19376 (YYLLOC_DEFAULT): Adjust to do it.
19377 * doc/bison.texinfo (Location Default Action): Fix.
19378
19379 2002-05-02 Akim Demaille <akim@epita.fr>
19380
19381 * src/reader.c (parse_braces): Merge into...
19382 (parse_action): this.
19383
19384 2002-05-02 Akim Demaille <akim@epita.fr>
19385
19386 * configure.in (ALL_LINGUAS): Remove.
19387 * po/LINGUAS, hr.po: New.
19388
19389 2002-05-02 Akim Demaille <akim@epita.fr>
19390
19391 Remove the so called hairy (semantic) parsers.
19392
19393 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove.
19394 * src/gram.h, src/gram.c (semantic_parser): Remove.
19395 (rule_t): Remove the guard and guard_line members.
19396 * src/lex.h (token_t): remove tok_guard.
19397 * src/options.c (option_table): Remove %guard and %semantic_parser
19398 support.
19399 * src/output.c, src/output.h (guards_output): Remove.
19400 (prepare): Adjust.
19401 (token_definitions_output): Don't output the `T'
19402 tokens (???).
19403 (output_skeleton): Don't output the guards.
19404 * src/files.c, src/files.c (attrsfile): Remove.
19405 * src/reader.c (symbol_list): Remove the guard and guard_line
19406 members.
19407 Adjust dependencies.
19408 (parse_guard): Remove.
19409 * data/bison.hairy: Remove.
19410 * doc/bison.texinfo (Environment Variables): Remove occurrences of
19411 BISON_HAIRY.
19412
19413 2002-05-02 Akim Demaille <akim@epita.fr>
19414
19415 * src/reader.c (copy_at, copy_dollarm parse_braces, parse_action)
19416 (parse_guard): Rename the formal argument `stack_offset' as
19417 `rule_length', which is more readable.
19418 Adjust callers.
19419 (copy_at, copy_dollar): Instead of outputting the hard coded
19420 values of $$, $n and so forth, output invocation to b4_lhs_value,
19421 b4_lhs_location, b4_rhs_value, and b4_rhs_location.
19422 Note: this patch partially drops `semantic-parser' support: it
19423 always does `rule_length - n', where semantic parsers ought to
19424 always use `-n'.
19425 * data/bison.simple, data/bison.c++ (b4_lhs_value)
19426 (b4_lhs_location, b4_rhs_value, and b4_rhs_location: New.
19427
19428 2002-05-02 Akim Demaille <akim@epita.fr>
19429
19430 * configure.in (AC_INIT): Bump to 1.49b.
19431 (AM_INIT_AUTOMAKE): Short invocation.
19432
19433 2002-05-02 Akim Demaille <akim@epita.fr>
19434
19435 Version 1.49a.
19436
19437 2002-05-01 Akim Demaille <akim@epita.fr>
19438
19439 * src/skeleton.h: Remove.
19440
19441 2002-05-01 Akim Demaille <akim@epita.fr>
19442
19443 * src/skeleton.h: Fix the #endif.
19444 Reported by Magnus Fromreide.
19445
19446 2002-04-26 Paul Eggert <eggert@twinsun.com>
19447
19448 * data/bison.simple (YYSTYPE_IS_TRIVIAL, YYLTYPE_IS_TRIVIAL):
19449 Define if we define YYSTYPE and YYLTYPE, respectively.
19450 (YYCOPY): Fix [] quoting problem in the non-GCC case.
19451
19452 2002-04-25 Robert Anisko <robert@lrde.epita.fr>
19453
19454 * src/scan-skel.l: Postprocess quadrigraphs.
19455
19456 * src/reader.c (copy_character): New function, used to output
19457 single characters while replacing `[' and `]' with quadrigraphs, to
19458 avoid troubles with M4 quotes.
19459 (copy_comment): Output characters with copy_character.
19460 (read_additionnal_code): Likewise.
19461 (copy_string2): Likewise.
19462 (copy_definition): Likewise.
19463
19464 * tests/calc.at: Exercise M4 quoting.
19465
19466 2002-04-25 Akim Demaille <akim@epita.fr>
19467
19468 * tests/sets.at (AT_EXTRACT_SETS): Sed portability issue: no space
19469 between `!' and the command.
19470 Reported by Paul Eggert.
19471
19472 2002-04-24 Robert Anisko <robert@lrde.epita.fr>
19473
19474 * tests/calc.at: Exercise prologue splitting.
19475
19476 * data/bison.simple, data/bison.c++: Use `b4_pre_prologue' and
19477 `b4_post_prologue' instead of `b4_prologue'.
19478
19479 * src/output.c (prepare): Add the `pre_prologue' and `post_prologue'
19480 muscles.
19481 (output): Free pre_prologue_obstack and post_prologue_obstack.
19482 * src/files.h, src/files.c (attrs_obstack): Remove.
19483 (pre_prologue_obstack, post_prologue_obstack): New.
19484 * src/reader.c (copy_definition): Add a parameter to specify the
19485 obstack to fill, instead of using attrs_obstack unconditionally.
19486 (read_declarations): Pass pre_prologue_obstack to copy_definition if
19487 `%union' has not yet been seen, pass post_prologue_obstack otherwise.
19488
19489 2002-04-23 Paul Eggert <eggert@twinsun.com>
19490
19491 * data/bison.simple: Remove unnecessary commentary and white
19492 space differences from 1_29-branch.
19493 Depend on YYERROR_VERBOSE, not defined (YYERROR_VERBOSE).
19494
19495 (union yyalloc, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYCOPY,
19496 YYSTACK_RELOCATE): Do not define if yyoverflow is defined, or
19497 if this is a C++ parser and YYSTYPE or YYLTYPE has nontrivial
19498 constructors or destructors.
19499
19500 (yyparse) [! defined YYSTACK_RELOCATE]: Do not relocate the stack.
19501
19502 2002-04-23 Akim Demaille <akim@epita.fr>
19503
19504 * tests/sets.at (AT_EXTRACT_SETS): Don't use 8 char long sed labels.
19505 * tests/synclines.at (AT_TEST_SYNCLINE): Be robust to GCC's
19506 location with columns.
19507 * tests/conflicts.at (%nonassoc and eof): Don't use `error.h'.
19508 All reported by Paul Eggert.
19509
19510 2002-04-22 Akim Demaille <akim@epita.fr>
19511
19512 * src/reduce.c (dump_grammar): Move to...
19513 * src/gram.h, src/gram.c (grammar_dump): here.
19514 Be sure to separate long item numbers.
19515 Don't read the members of a rule's prec if its nil.
19516
19517 2002-04-22 Akim Demaille <akim@epita.fr>
19518
19519 * src/output.c (table_size, table_grow): New.
19520 (MAXTABLE): Remove, replace uses with table_size.
19521 (pack_vector): Instead of dying when the table is too big, grow it.
19522
19523 2002-04-22 Akim Demaille <akim@epita.fr>
19524
19525 * data/bison.simple (yyr1): Its type is that of a token number.
19526 * data/bison.c++ (r1_): Likewise.
19527 * tests/regression.at (Web2c Actions): Adjust.
19528
19529 2002-04-22 Akim Demaille <akim@epita.fr>
19530
19531 * src/reader.c (token_translations_init): 256 is now the default
19532 value for the error token, i.e., it will be assigned another
19533 number if the user assigned 256 to one of her tokens.
19534 (reader): Don't force 256 to error.
19535 * doc/bison.texinfo (Symbols): Adjust.
19536 * tests/torture.at (AT_DATA_HORIZONTAL_GRAMMAR)
19537 (AT_DATA_TRIANGULAR_GRAMMAR): Number the tokens as 1, 2, 3
19538 etc. instead of 10, 20, 30 (which was used to `jump' over error
19539 (256) and undefined (2)).
19540
19541 2002-04-22 Akim Demaille <akim@epita.fr>
19542
19543 Propagate more token_number_t.
19544
19545 * src/gram.h (token_number_as_item_number)
19546 (item_number_as_token_number): New.
19547 * src/output.c (GENERATE_OUTPUT_TABLE): New.
19548 Use it to create output_item_number_table and
19549 output_token_number_table.
19550 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
19551 * src/lex.c, src/nullable.c, src/output.c, src/print.c,
19552 * src/print_graph.c, src/reader.c, src/reduce.c, src/state.h,
19553 * src/symtab.c, src/symtab.h: Use token_number_t instead of shorts.
19554
19555 2002-04-22 Akim Demaille <akim@epita.fr>
19556
19557 * src/output.h, src/output.c (get_lines_number): Remove.
19558
19559 2002-04-19 Akim Demaille <akim@epita.fr>
19560
19561 * doc/bison.texinfo (Actions): Make clear that `|' is not the same
19562 as Lex/Flex'.
19563 (Debugging): More details about enabling the debugging features.
19564 (Table of Symbols): Describe $$, $n, @$, and @n.
19565 Suggested by Tim Josling.
19566
19567 2002-04-19 Akim Demaille <akim@epita.fr>
19568
19569 * doc/bison.texinfo: Remove the uses of the obsolete @refill.
19570
19571 2002-04-10 Akim Demaille <akim@epita.fr>
19572
19573 * src/system.h: Rely on HAVE_LIMITS_H.
19574 Suggested by Paul Eggert.
19575
19576 2002-04-09 Akim Demaille <akim@epita.fr>
19577
19578 * tests/calc.at (_AT_CHECK_CALC_ERROR): Receive as argument the
19579 full stderr, and strip it according to the bison options, instead
19580 of composing the error message from different bits.
19581 This makes it easier to check for several error messages.
19582 Adjust all the invocations.
19583 Add an invocation exercising the error token.
19584 Add an invocation demonstrating a stupid error message.
19585 (_AT_DATA_CALC_Y): Follow the GCS: initial column is 1, not 0.
19586 Adjust the tests.
19587 Error message are for stderr, not stdout.
19588
19589 2002-04-09 Akim Demaille <akim@epita.fr>
19590
19591 * src/gram.h, src/gram.c (error_token_number): Remove, use
19592 errtoken->number.
19593 * src/reader.c (reader): Don't specify the user token number (2)
19594 for $undefined, as it uselessly prevents using it.
19595 * src/gram.h (token_number_t): Move to...
19596 * src/symtab.h: here.
19597 (state_t.number): Is a token_number_t.
19598 * src/print.c, src/reader.c: Use undeftoken->number instead of
19599 hard coded 2.
19600 (Even though this 2 is not the same as above: the number of the
19601 undeftoken remains being 2, it is its user token number which
19602 might not be 2).
19603 * src/output.c (prepare_tokens): Rename the `maxtok' muscle with
19604 `user_token_number_max'.
19605 Output `undef_token_number'.
19606 * data/bison.simple, data/bison.c++: Use them.
19607 Be sure to map invalid yylex return values to
19608 `undef_token_number'. This saves us from gratuitous SEGV.
19609
19610 * tests/conflicts.at (Solved SR Conflicts)
19611 (Unresolved SR Conflicts): Adjust.
19612 * tests/regression.at (Web2c Actions): Adjust.
19613
19614 2002-04-08 Akim Demaille <akim@epita.fr>
19615
19616 * data/bison.c++: s/b4_item_number_max/b4_rhs_number_max/.
19617 Adding #line.
19618 Remove the duplicate `typedefs'.
19619 (RhsNumberType): Fix the declaration and various other typos.
19620 Use __ofile__.
19621 * data/bison.simple: Use __ofile__.
19622 * src/scan-skel.l: Handle __ofile__.
19623
19624 2002-04-08 Akim Demaille <akim@epita.fr>
19625
19626 * src/gram.h (item_number_t): New, the type of item numbers in
19627 RITEM. Note that it must be able to code symbol numbers as
19628 positive number, and the negation of rule numbers as negative
19629 numbers.
19630 Adjust all dependencies (pretty many).
19631 * src/reduce.c (rule): Remove this `short *' pointer: use
19632 item_number_t.
19633 * src/system.h (MINSHORT, MAXSHORT): Remove.
19634 Include `limits.h'.
19635 Adjust dependencies to using SHRT_MAX and SHRT_MIN.
19636 (shortcpy): Remove.
19637 (MAXTABLE): Move to...
19638 * src/output.c (MAXTABLE): here.
19639 (prepare_rules): Use output_int_table to output rhs.
19640 * data/bison.simple, data/bison.c++: Adjust.
19641 * tests/torture.at (Big triangle): Move the limit from 254 to
19642 500.
19643 * tests/regression.at (Web2c Actions): Ajust.
19644
19645 Trying with bigger grammars shows various phenomena: at 3000 (28Mb
19646 of grammar file) bison is killed by my system, at 2000 (12Mb) bison
19647 passes, but produces negative #line number, once fixed, GCC is
19648 killed while compiling 14Mb, at 1500 (6.7 Mb of grammar, 8.2Mb of
19649 C), it passes.
19650 * src/state.h (state_h): Code input lines on ints, not shorts.
19651
19652 2002-04-08 Akim Demaille <akim@epita.fr>
19653
19654 * src/reduce.c (reduce_grammar): First reduce the nonterminals,
19655 and then the grammar.
19656
19657 2002-04-08 Akim Demaille <akim@epita.fr>
19658
19659 * src/system.h: No longer using strndup.
19660
19661 2002-04-07 Akim Demaille <akim@epita.fr>
19662
19663 * src/muscle_tab.h (MUSCLE_INSERT_LONG_INT): New.
19664 * src/output.c (output_table_data): Return the longest number.
19665 (prepare_tokens): Output `token_number_max').
19666 * data/bison.simple, data/bison.c++ (b4_sint_type, b4_uint_type):
19667 New.
19668 Use them to define yy_token_number_type/TokenNumberType.
19669 Use this type for yytranslate.
19670 * tests/torture.at (Big triangle): Push the limit from 124 to
19671 253.
19672 * tests/regression.at (Web2c Actions): Adjust.
19673
19674 2002-04-07 Akim Demaille <akim@epita.fr>
19675
19676 * tests/torture.at (Big triangle): New.
19677 (GNU AWK Grammar, GNU Cim Grammar): Move to...
19678 * tests/existing.at: here.
19679
19680 2002-04-07 Akim Demaille <akim@epita.fr>
19681
19682 * src/gram.h, src/gram.c (nitems): Remove, it is an alias of
19683 nritems.
19684 Adjust dependencies.
19685
19686 2002-04-07 Akim Demaille <akim@epita.fr>
19687
19688 * src/reader.c: Normalize increments to prefix form.
19689
19690 2002-04-07 Akim Demaille <akim@epita.fr>
19691
19692 * src/reader.c, symtab.c: Remove debugging code.
19693
19694 2002-04-07 Akim Demaille <akim@epita.fr>
19695
19696 Rename all the `bucket's as `symbol_t'.
19697
19698 * src/gram.c, src/gram.h, src/lex.c, src/lex.h, src/output.c,
19699 * src/reader.c, src/reader.h, src/reduce.c, src/state.h,
19700 * src/symtab.c, src/symtab.h (bucket): Rename as...
19701 (symbol_t): this.
19702 (symbol_list_new, bucket_check_defined, bucket_make_alias)
19703 (bucket_check_alias_consistence, bucket_pack, bucket_translation)
19704 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
19705 (buckets_new, buckets_free, buckets_do): Rename as...
19706 (symbol_list_new, symbol_check_defined, symbol_make_alias)
19707 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
19708 (symbol_new, symbol_free, hash_compare_symbol_t, hash_symbol_t)
19709 (symbols_new, symbols_free, symbols_do): these.
19710
19711 2002-04-07 Akim Demaille <akim@epita.fr>
19712
19713 Use lib/hash for the symbol table.
19714
19715 * src/gram.c (ntokens): Initialize to 1, to reserve a slot for
19716 EOF.
19717 * src/lex.c (lex): Set the `number' member of new terminals.
19718 * src/reader.c (bucket_check_defined, bucket_make_alias)
19719 (bucket_check_alias_consistence, bucket_translation): New.
19720 (reader, grammar_free, readgram, token_translations_init)
19721 (packsymbols): Adjust.
19722 (reader): Number the predefined tokens.
19723 * src/reduce.c (inaccessable_symbols): Just use hard coded numbers
19724 for predefined tokens.
19725 * src/symtab.h (bucket): Remove all the hash table related
19726 members.
19727 * src/symtab.c (symtab): Replace by...
19728 (bucket_table): this.
19729 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
19730 (buckets_new, buckets_do): New.
19731
19732 2002-04-07 Akim Demaille <akim@epita.fr>
19733
19734 * src/gram.c (nitems, nrules, nsyms, ntokens, nvars, nritems)
19735 (start_symbol, max_user_token_number, semantic_parser)
19736 (error_token_number): Initialize.
19737 * src/reader.c (grammar, start_flag, startval, typed, lastprec):
19738 Initialize.
19739 (reader): Don't.
19740 (errtoken, eoftoken, undeftoken, axiom): Extern.
19741
19742 2002-04-07 Akim Demaille <akim@epita.fr>
19743
19744 * src/gram.h (rule_s): prec and precsym are now pointers
19745 to the bucket giving the priority/associativity.
19746 Member `associativity' removed: useless.
19747 * src/reduce.c, src/conflicts.c: Adjust.
19748
19749 2002-04-07 Akim Demaille <akim@epita.fr>
19750
19751 * src/lalr.c, src/LR0.c, src/closure.c, src/gram.c, src/reduce.c:
19752 Properly escape the symbols' TAG when outputting them.
19753
19754 2002-04-07 Akim Demaille <akim@epita.fr>
19755
19756 * src/lalr.h (LA): Is a bitsetv, not bitset*.
19757
19758 2002-04-07 Akim Demaille <akim@epita.fr>
19759
19760 * src/lalr.h, src/lalr.c (LAruleno): Replace with...
19761 (LArule): this, which is an array to rule_t*.
19762 * src/print.c, src/conflicts.c: Adjust.
19763
19764 2002-04-07 Akim Demaille <akim@epita.fr>
19765
19766 * src/gram.h (rule_t): Rename `number' as `user_number'.
19767 `number' is a new member.
19768 Adjust dependencies.
19769 * src/reduce.c (reduce_grammar_tables): Renumber rule_t.number.
19770
19771 2002-04-07 Akim Demaille <akim@epita.fr>
19772
19773 As a result of the previous patch, it is no longer needed
19774 to reorder ritem itself.
19775
19776 * src/reduce.c (reduce_grammar_tables): Don't sort RITEM.
19777
19778 2002-04-07 Akim Demaille <akim@epita.fr>
19779
19780 Be sure never to walk through RITEMS, but use only data related to
19781 the rules themselves. RITEMS should be banished.
19782
19783 * src/output.c (output_token_translations): Rename as...
19784 (prepare_tokens): this.
19785 In addition to `translate', prepare the muscles `tname' and
19786 `toknum', which were handled by...
19787 (output_rule_data): this.
19788 Remove, and move the remainder of its outputs into...
19789 (prepare_rules): this new routines, which also merges content from
19790 (output_gram): this.
19791 (prepare_rules): Be sure never to walk through RITEMS.
19792 (output_stos): Rename as...
19793 (prepare_stos): this.
19794 (output): Always invoke prepare_states, after all, just don't use it
19795 in the output if you don't need it.
19796
19797 2002-04-07 Akim Demaille <akim@epita.fr>
19798
19799 * src/LR0.c (new_state): Display `nstates' as the name of the
19800 newly created state.
19801 Adjust to initialize first_state and last_state if needed.
19802 Be sure to distinguish the initial from the final state.
19803 (new_states): Create the itemset of the initial state, and use
19804 new_state.
19805 * src/closure.c (closure): Now that the initial state has its
19806 items properly set, there is no need for a special case when
19807 creating `ruleset'.
19808
19809 As a result, now the rule 0, reducing to $axiom, is visible in the
19810 outputs. Adjust the test suite.
19811
19812 * tests/conflicts.at (Solved SR Conflicts)
19813 (Unresolved SR Conflicts): Adjust.
19814 * tests/regression.at (Web2c Report, Rule Line Numbers): Idem.
19815 * tests/conflicts.at (S/R in initial): New.
19816
19817 2002-04-07 Akim Demaille <akim@epita.fr>
19818
19819 * src/LR0.c (allocate_itemsets): Don't loop over ritem: loop over
19820 the RHS of the rules.
19821 * src/output.c (output_gram): Likewise.
19822
19823 2002-04-07 Akim Demaille <akim@epita.fr>
19824
19825 * src/gram.h (rule_t): `lhs' is now a pointer to the symbol's
19826 bucket.
19827 Adjust all dependencies.
19828 * src/reduce.c (nonterminals_reduce): Don't forget to renumber the
19829 `number' of the buckets too.
19830 * src/gram.h: Include `symtab.h'.
19831 (associativity): Move to...
19832 * src/symtab.h: here.
19833 No longer include `gram.h'.
19834
19835 2002-04-07 Akim Demaille <akim@epita.fr>
19836
19837 * src/gram.h, src/gram.c (rules_rhs_length): New.
19838 (ritem_longest_rhs): Use it.
19839 * src/gram.h (rule_t): `number' is a new member.
19840 * src/reader.c (packgram): Set it.
19841 * src/reduce.c (reduce_grammar_tables): Move the useless rules at
19842 the end of `rules', and count them out of `nrules'.
19843 (reduce_output, dump_grammar): Adjust.
19844 * src/print.c (print_grammar): It is no longer needed to check for
19845 the usefulness of a rule, as useless rules are beyond `nrules + 1'.
19846 * tests/reduce.at (Reduced Automaton): New test.
19847
19848 2002-04-07 Akim Demaille <akim@epita.fr>
19849
19850 * src/reduce.c (inaccessable_symbols): Fix a buglet: because of a
19851 lacking `+ 1' to nrules, Bison reported as useless a token if it
19852 was used solely to set the precedence of the last rule...
19853
19854 2002-04-07 Akim Demaille <akim@epita.fr>
19855
19856 * data/bison.c++, data/bison.simple: Don't output the current file
19857 name in #line, to avoid useless diffs between two identical
19858 outputs under different names.
19859
19860 2002-04-07 Akim Demaille <akim@epita.fr>
19861
19862 * src/closure.c, src/print.c, src/reader.c, src/reduce.c:
19863 Normalize loops to using `< nrules + 1', not `<= nrules'.
19864
19865 2002-04-07 Akim Demaille <akim@epita.fr>
19866
19867 * TODO: Update.
19868
19869 2002-04-07 Akim Demaille <akim@epita.fr>
19870
19871 * src/output.c, src/reader.c, src/symtab.c, src/symtab.h: Rename
19872 bucket.value as bucket.number.
19873
19874 2002-04-07 Akim Demaille <akim@epita.fr>
19875
19876 * src/closure.c, src/derives.c, src/gram.h, src/lalr.c,
19877 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
19878 * src/reader.c, src/reduce.c: Let rule_t.rhs point directly to the
19879 RHS, instead of being an index in RITEMS.
19880
19881 2002-04-04 Paul Eggert <eggert@twinsun.com>
19882
19883 * doc/bison.texinfo: Update copyright date.
19884 (Rpcalc Lexer, Symbols, Token Decl): Don't assume ASCII.
19885 (Symbols): Warn about running Bison in one character set,
19886 but compiling and/or running in an incompatible one.
19887 Warn about character code 256, too.
19888
19889 2002-04-03 Paul Eggert <eggert@twinsun.com>
19890
19891 * src/bison.data (YYSTACK_ALLOC): Depend on whether
19892 YYERROR_VERBOSE is nonzero, not whether it is defined.
19893
19894 Merge changes from bison-1_29-branch.
19895
19896 2002-03-20 Paul Eggert <eggert@twinsun.com>
19897
19898 Merge fixes from Debian bison_1.34-1.diff.
19899
19900 * configure.in (AC_PREREQ): 2.53.
19901
19902 2002-03-20 Akim Demaille <akim@epita.fr>
19903
19904 * src/conflicts.c (log_resolution): Argument `resolution' is const.
19905
19906 2002-03-19 Paul Eggert <eggert@twinsun.com>
19907
19908 * src/bison.simple (YYCOPY): New macro.
19909 (YYSTACK_RELOCATE): Use it.
19910 Remove Type arg; no longer needed. All callers changed.
19911 (yymemcpy): Remove; no longer needed.
19912
19913 * Makefile.am (AUTOMAKE_OPTIONS): 1.6.
19914 * doc/Makefile.am (AUTOMAKE_OPTIONS): Remove.
19915
19916 2002-03-19 Akim Demaille <akim@epita.fr>
19917
19918 Test and fix the #line outputs.
19919
19920 * tests/atlocal.at (GCC): New.
19921 * tests/synclines.at (AT_TEST_SYNCLINE): New macro.
19922 (Prologue synch line, %union synch line, Postprologue synch line)
19923 (Action synch line, Epilogue synch line): New tests.
19924 * src/reader.c (parse_union_decl): Define the muscle stype_line.
19925 * data/bison.simple, data/bison.c++: Use it.
19926
19927 2002-03-19 Akim Demaille <akim@epita.fr>
19928
19929 * tests/regression.at (%nonassoc and eof, Unresolved SR Conflicts)
19930 (Solved SR Conflicts, %expect not enough, %expect right)
19931 (%expect too much): Move to...
19932 * tests/conflicts.at: this new file.
19933
19934 2002-03-19 Akim Demaille <akim@epita.fr>
19935
19936 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
19937 * data/bison.simple, data/bison.c++: Handle the `#define' part, so
19938 that we can move to enums for instance.
19939 * src/output.c (token_definitions_output): Output a list of
19940 `token-name, token-number' instead of the #define.
19941 (output_skeleton): Name this list `b4_tokens', not `b4_tokendefs'.
19942
19943 2002-03-14 Akim Demaille <akim@epita.fr>
19944
19945 Use Gettext 0.11.1.
19946
19947 2002-03-09 Robert Anisko <robert@lrde.epita.fr>
19948
19949 * data/bison.c++: Make the user able to add members to the generated
19950 parser by subclassing.
19951
19952 2002-03-05 Robert Anisko <robert@lrde.epita.fr>
19953
19954 * src/reader.c (read_additionnal_code): `c' should be an integer, not
19955 a character.
19956 Reported by Nicolas Tisserand and Nicolas Burrus.
19957
19958 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
19959
19960 * src/reader.c: Warn about lacking semi-colons, do not complain.
19961
19962 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
19963
19964 * data/bison.c++: Remove a debug line.
19965
19966 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
19967
19968 * data/bison.c++: Unmerge value as yylval and value as yyval. Unmerge
19969 location as yylloc and location as yyloc. Use YYLLOC_DEFAULT, and
19970 provide a default implementation.
19971
19972 2002-03-04 Akim Demaille <akim@epita.fr>
19973
19974 * tests/input.at (Invalid $n, Invalid @n): Add the ending `;'.
19975 * tests/output.at (AT_CHECK_OUTPUT): Likewise.
19976 * tests/headers.at (AT_TEST_CPP_GUARD_H): Ditto.
19977 * tests/semantic.at (Parsing Guards): Similarly.
19978 * src/reader.at (readgram): Complain if the last rule is not ended
19979 with a semi-colon.
19980
19981 2002-03-04 Akim Demaille <akim@epita.fr>
19982
19983 * src/warshall.h, src/warshall.c (bitmatrix_print): Move to...
19984 * src/closure.c: here.
19985 (set_firsts): Use bitsetv_reflexive_transitive_closure instead of
19986 RTC.
19987 * src/warshall.h, src/warshall.c: Remove.
19988 * tests/sets.at (Broken Closure): Adjust.
19989
19990 2002-03-04 Akim Demaille <akim@epita.fr>
19991
19992 * src/output.c (output_skeleton): tempdir is const.
19993 bytes_read is unused.
19994
19995 2002-03-04 Akim Demaille <akim@epita.fr>
19996
19997 * lib/bbitset.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
19998 * lib/bitsetv.h, lib/ebitset.c, lib/lbitset.c, lib/sbitset.c:
19999 Update.
20000 From Michael Hayes.
20001
20002 2002-03-04 Akim Demaille <akim@epita.fr>
20003
20004 * src/closure.c (closure): `r' is unused.
20005
20006 2002-03-04 Akim Demaille <akim@epita.fr>
20007
20008 * tests/sets.at (Broken Closure): Add the ending `;'.
20009 * src/reader.at (readgram): Complain if a rule is not ended with a
20010 semi-colon.
20011
20012 2002-03-04 Akim Demaille <akim@epita.fr>
20013
20014 * src/conflicts.c (set_conflicts): Use bitset_disjoint_p.
20015 (count_sr_conflicts): Use bitset_count.
20016 * src/reduce.c (inaccessable_symbols): Ditto.
20017 (bits_size): Remove.
20018 * src/warshall.h, src/warshall.c: Convert to bitsetv.
20019
20020 2002-03-04 Akim Demaille <akim@epita.fr>
20021
20022 * src/closure.c, src/conflicts.c, src/lalr.c, src/print.c,
20023 * src/reduce.c: Remove the `bitset_zero's following the
20024 `bitset_create's, as now it is performed by the latter.
20025
20026 2002-03-04 Akim Demaille <akim@epita.fr>
20027
20028 * lib/bitset.c, lib/bitset.h, lib/bitsetv.c, lib/bitsetv.h,
20029 * lib/ebitset.c, lib/ebitset.h, lib/lbitset.c, lib/lbitset.h,
20030 * lib/sbitset.c, lib/sbitset.h, lib/bbitset.h: Update from the
20031 latest sources from Michael.
20032
20033 2002-03-04 Akim Demaille <akim@epita.fr>
20034
20035 * src/output.c (output): Don't free the grammar.
20036 * src/reader.c (grammar_free): New.
20037 * src/main.c (main): Call it and don't free symtab here.
20038
20039 2002-03-04 Akim Demaille <akim@epita.fr>
20040
20041 * src/lex.c (parse_percent_token): Be sure to 0-end token_buffer
20042 before returning.
20043 Reported by Benoit Perrot.
20044
20045 2002-03-04 Akim Demaille <akim@epita.fr>
20046
20047 Use bitset operations when possible, not loops over bits.
20048
20049 * src/conflicts.c (set_conflicts, count_sr_conflicts): Use
20050 bitset_or.
20051 * src/print.c (print_reductions): Use bitset_and, bitset_andn.
20052 * src/reduce.c (useless_nonterminals): Formatting changes.
20053 * src/warshall.c (TC): Use bitset_or.
20054
20055 2002-03-04 Akim Demaille <akim@epita.fr>
20056
20057 * src/lalr.h, src/lalr.c (tokensetsize): Remove, unused.
20058 * src/system.h (BITS_PER_WORD, WORDSIZE, SETBIT, RESETBIT, BITISSET):
20059 Ditto.
20060
20061 2002-03-04 Akim Demaille <akim@epita.fr>
20062
20063 * src/lalr.c (F): Now a bitset*.
20064 Adjust all dependencies.
20065
20066 2002-03-04 Akim Demaille <akim@epita.fr>
20067
20068 * src/conflicts.c (shiftset, lookaheadset): Now bitset.
20069 Adjust all dependencies.
20070
20071 2002-03-04 Akim Demaille <akim@epita.fr>
20072
20073 * src/L0.c, src/LR0.h (nstates): Be size_t.
20074 Adjust comparisons (signed vs unsigned).
20075 * src/conflics.c, src/lalr.c, src/lalr.h, src/output.c (LA): Now a
20076 bitset*.
20077 Adjust all dependencies.
20078
20079 2002-03-04 Akim Demaille <akim@epita.fr>
20080
20081 * src/closure.c (firsts): Now, also a bitset.
20082 Adjust all dependencies.
20083 (varsetsize): Remove, now unused.
20084 * src/warshall.h, src/warshall.c: Now work on arrays of bitsets.
20085
20086 2002-03-04 Akim Demaille <akim@epita.fr>
20087
20088 * src/print.c: Convert to use bitset.h, not hand coded iterations
20089 over ints.
20090
20091 2002-03-04 Akim Demaille <akim@epita.fr>
20092
20093 * src/reduce.c: Convert to use bitset.h, not hand coded BSet.
20094
20095 2002-03-04 Akim Demaille <akim@epita.fr>
20096
20097 * src/closure.c (ruleset): Be a bitset.
20098 (rulesetsize): Remove.
20099
20100 2002-03-04 Akim Demaille <akim@epita.fr>
20101
20102 * lib/bitset-int.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
20103 * lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/lbitset.c,
20104 * lib/lbitset.h, lib/sbitset.c, lib/sbitset.h: New.
20105 * src/closure.c (fderives): Be an array of bitsets.
20106
20107 2002-02-28 Robert Anisko <robert@lrde.epita.fr>
20108
20109 * data/bison.c++: Merge the two generated headers. Insert a copyright
20110 notice in each output file.
20111
20112 2002-02-28 Akim Demaille <akim@epita.fr>
20113
20114 * data/bison.c++: Copy the prologue of bison.simple to fetch
20115 useful M4 definitions, such as b4_header_guard.
20116
20117 2002-02-25 Akim Demaille <akim@epita.fr>
20118
20119 * src/getargs.c (version): Give the name of the authors, and use a
20120 translator friendly scheme for the bgr
20121 copyright notice.
20122
20123 2002-02-25 Akim Demaille <akim@epita.fr>
20124
20125 * src/output.c (header_output): Remove, now handled completely via
20126 M4.
20127
20128 2002-02-25 Akim Demaille <akim@epita.fr>
20129
20130 * m4/m4.m4: New, from CVS Autoconf.
20131 * configure.in: Invoke it.
20132 * src/output.c (output_skeleton): Use its result instead of the
20133 hard coded name.
20134
20135 2002-02-25 Akim Demaille <akim@epita.fr>
20136
20137 * lib/tempname.c, lib/mkstemp.c, m4/mkstemp.m4: New, stolen from
20138 Fileutils 4.1.5.
20139 * configure.in: Invoke UTILS_FUNC_MKSTEMP.
20140 * src/output.c (output_skeleton): Use mkstemp to create a real
20141 temporary file.
20142 Move the filling of `skeleton' and its muscle to...
20143 (prepare): here.
20144 (output): Move the definition of the prologue muscle to...
20145 (prepare): here.
20146 * src/system.h (DEFAULT_TMPDIR): New.
20147
20148 2002-02-14 Paul Eggert <eggert@twinsun.com>
20149
20150 Remove the support for C++ namespace cleanliness; it was
20151 causing more problems than it was curing, since it didn't work
20152 properly on some nonstandard C++ compilers. This can wait
20153 for a proper C++ parser.
20154
20155 * NEWS: Document this.
20156 * doc/bison.texinfo (Bison Parser, Debugging): Remove special mention
20157 of C++, as it's treated like C now.
20158 * src/bison.simple (YYSTD): Remove.
20159 (YYSIZE_T, YYFPRINTF, YYPARSE_PARAM_ARG, YYPARSE_PARAM_DECL):
20160 Treat C++ just like Standard C instead of trying to support
20161 namespace cleanliness.
20162
20163 2002-02-14 Akim Demaille <akim@epita.fr>
20164
20165 * tests/regression.at (else): Adjust to Andreas' change.
20166
20167 2002-02-14 Akim Demaille <akim@epita.fr>
20168
20169 * lib/Makefile.am (EXTRA_DIST): Ship strnlen.c.
20170
20171 2002-02-13 Andreas Schwab <schwab@suse.de>
20172
20173 * src/output.c (output_rule_data): Don't output NULL, it might
20174 not be defined yet.
20175
20176 2002-02-11 Robert Anisko <robert@lrde.epita.fr>
20177
20178 * data/bison.c++ (YYDEBUG, YYERROR_VERBOSE): After the prologue.
20179 (Copyright notice): Update.
20180
20181 2002-02-11 Akim Demaille <akim@epita.fr>
20182
20183 * tests/regression.at (%nonassoc and eof): Don't include
20184 nonportable headers.
20185
20186 2002-02-08 Robert Anisko <robert@lrde.epita.fr>
20187
20188 * data/bison.c++: Correct error recovery. Make the user able to
20189 initialize the starting location.
20190
20191 2002-02-07 Akim Demaille <akim@epita.fr>
20192
20193 * tests/input.at: New.
20194
20195 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
20196
20197 * data/bison.c++: Replace some direct m4 expansions by constants. Be
20198 more consistent when naming methods and variables. Put preprocessor
20199 directives around tables only needed for debugging.
20200
20201 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
20202
20203 * data/bison.c++ (yy::b4_name::print_): New method, replaces yyprint in
20204 C++ parsers.
20205 (yy::b4_name::parse): Use print_.
20206
20207 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
20208
20209 * data/bison.c++ (yy::b4_name::parse): Error recovery is back.
20210
20211 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
20212
20213 * data/bison.c++ (yy::b4_name::error_): New method, replaces yyerror in
20214 C++ parsers.
20215 (yy::b4_name::parse): Build verbose error messages, and use error_.
20216
20217 2002-02-06 Robert Anisko <robert@lrde.epita.fr>
20218
20219 * data/bison.c++: Fix m4 quoting in comments.
20220
20221 2002-02-06 Robert Anisko <robert@lrde.epita.fr>
20222
20223 * data/bison.c++: Adjust the parser code. Fix some muscles that were
20224 not expanded by m4.
20225
20226 2002-02-05 Akim Demaille <akim@epita.fr>
20227
20228 * data/bison.c++: Adjust to the M4 back end.
20229 More is certainly needed.
20230
20231 2002-02-05 Akim Demaille <akim@epita.fr>
20232
20233 Give a try to M4 as a back end.
20234
20235 * lib/readpipe.c: New, from wdiff.
20236 * src/Makefile.am (DEFS): Define PKGDATADIR, not BISON_SIMPLE and
20237 BISON_HAIRY.
20238 * src/system.h (BISON_HAIRY, BISON_SIMPLE): Remove the DOS and VMS
20239 specific values. Now it is m4 that performs the lookup.
20240 * src/parse-skel.y: Remove.
20241 * src/muscle_tab.c, src/muscle_tab.h (muscles_m4_output): New.
20242 * src/output.c (actions_output, guards_output)
20243 (token_definitions_output): No longer keeps track of the output
20244 line number, hence remove the second argument.
20245 (guards_output): Check against the guard member of a rule, not the
20246 action member.
20247 Adjust callers.
20248 (output_skeleton): Don't look for the skeleton location, let m4 do
20249 that.
20250 Create `/tmp/muscles.m4'. This is temporary, a proper temporary
20251 file will be used.
20252 Invoke `m4' on m4sugar.m4, muscles.m4, and the skeleton.
20253 (prepare): Given that for the time being changesyntax is not
20254 usable in M4, rename the muscles using `-' to `_'.
20255 Define `defines_flag', `output_parser_name' and `output_header_name'.
20256 * src/output.h (actions_output, guards_output)
20257 (token_definitions_output): Adjust prototypes.
20258 * src/scan-skel.l: Instead of scanning the skeletons, it now
20259 processes the output of m4: `__oline__' and `#output'.
20260 * data/bison.simple: Adjust to be used by M4(sugar).
20261 * tests/Makefile.am: Use check_SCRIPTS to make sure `bison' is up
20262 to date.
20263 * tests/bison.in: Use the secrete envvar `BISON_PKGDATADIR'
20264 instead of the dead `BISON_SIMPLE' and `BISON_HAIRY'.
20265 * data/m4sugar/m4sugar.m4, data/m4sugar/version.m4: New,
20266 shamelessly stolen from CVS Autoconf.
20267
20268 2002-02-05 Akim Demaille <akim@epita.fr>
20269
20270 * lib/hash.c, lib/hash.h: Replace with Fileutils 4.1's version.
20271 * configure.in: Check for the declarations of free and malloc.
20272 * src/muscle_tab.c: Adjust.
20273
20274 2002-02-05 Akim Demaille <akim@epita.fr>
20275
20276 * src/muscle_tab.c (muscle_init): Don't default to NULL muscle
20277 which have no values.
20278
20279 2002-02-05 Akim Demaille <akim@epita.fr>
20280
20281 * src/bison.simple, src/bison.hairy, src/bison.c++: Move to...
20282 * data/: here.
20283
20284 2002-01-29 Paul Eggert <eggert@twinsun.com>
20285
20286 * src/bison.simple (YYSIZE_T): Do not define merely because
20287 YYSTACK_USE_ALLOCA is nonzero or alloca or _ALLOCA_H are defined.
20288 On some platforms, <alloca.h> does not declare YYSTD (size_t).
20289
20290 2002-01-27 Akim Demaille <akim@epita.fr>
20291
20292 Fix `%nonassoc and eof'.
20293
20294 * src/state.c (errs_dup): Aaaah! The failure was due to bytes
20295 which were not properly copied! Replace
20296 memcpy (res->errs, src->errs, src->nerrs);
20297 with
20298 memcpy (res->errs, src->errs, src->nerrs * sizeof (src->errs[0]));
20299 !!!
20300 * tests/regression.at (%nonassoc and eof): Adjust to newest
20301 Autotest: `.' is not in the PATH.
20302
20303 2002-01-27 Akim Demaille <akim@epita.fr>
20304
20305 * tests/sets.at (AT_EXTRACT_SETS): New.
20306 (Nullable): Use it.
20307 (Firsts): New.
20308
20309 2002-01-26 Akim Demaille <akim@epita.fr>
20310
20311 * tests/actions.at, tests/calc.at, tests/headers.at,
20312 * tests/torture.at: Adjust to the newest Autotest which no longer
20313 forces `.' in the PATH.
20314
20315 2002-01-25 Akim Demaille <akim@epita.fr>
20316
20317 * tests/regression.at (%nonassoc and eof): New.
20318 Suggested by Robert Anisko.
20319
20320 2002-01-24 Akim Demaille <akim@epita.fr>
20321
20322 Bison dumps core when trying to complain about broken input files.
20323 Reported by Cris van Pelt.
20324
20325 * src/lex.c (parse_percent_token): Be sure to set token_buffer.
20326 * tests/regression.at (Invalid input: 1, Invalid input: 2): Merge
20327 into...
20328 (Invalid inputs): Strengthen: exercise parse_percent_token.
20329
20330 2002-01-24 Robert Anisko <robert.anisko@epita.fr>
20331
20332 * src/Makefile.am: Add bison.c++.
20333 * src/bison.c++: New skeleton.
20334
20335 2002-01-21 Paolo Bonzini <bonzini@gnu.org>
20336
20337 * po/it.po: New.
20338
20339 2002-01-21 Kees Zeelenberg <kzlg@users.sourceforge.net>
20340
20341 * src/files.c (skeleton_find) [MSDOS]: Fix cp definition.
20342
20343 2002-01-20 Marc Autret <marc@gnu.org>
20344
20345 * src/files.c (compute_output_file_names): Fix
20346
20347 2002-01-20 Marc Autret <marc@gnu.org>
20348
20349 * tests/output.at: New test.
20350 * src/files.c (compute_base_names): Don't map extensions when
20351 the YACC flag is set, use defaults.
20352 Reported by Evgeny Stambulchik.
20353
20354 2002-01-20 Marc Autret <marc@gnu.org>
20355
20356 * src/system.h: Need to define __attribute__ away for non-GCC
20357 compilers as well (i.e., the vendor C compiler).
20358 Suggested by Albert Chin-A-Young.
20359
20360 2002-01-11 Tim Van Holder <tim.van.holder@pandora.be>
20361
20362 * lib/hash.h, lib/hash.c: Renamed __P to PARAMS and used the
20363 canonical definition.
20364 * src/system.h: Use the canonical definition for PARAMS (avoids
20365 a conflict with the macro from lib/hash.h).
20366
20367 2002-01-11 Akim Demaille <akim@epita.fr>
20368
20369 * configure.in: Use AC_FUNC_STRNLEN.
20370 Fixes the failures observed on AIX 4.3 by H.Merijn Brand.
20371
20372 2002-01-09 Akim Demaille <akim@epita.fr>
20373
20374 * src/files.c, src/files.h (output_infix): New.
20375 (tab_extension): Remove.
20376 (compute_base_names): Compute the former, drop the latter.
20377 * src/output.c (prepare): Insert the muscles `output-infix', and
20378 `output-suffix'.
20379 * src/parse-skel.y (string, string.1): New.
20380 (section.header): Use it.
20381 (section.yacc): Remove.
20382 (prefix): Remove too.
20383 * src/scan-skel.l: Adjust.
20384 * src/bison.simple, src/bison.hairy: Adjust.
20385
20386 2002-01-09 Akim Demaille <akim@epita.fr>
20387
20388 * configure.in (WERROR_CFLAGS): Compute it.
20389 * src/Makefile.am (CFLAGS): Pass it.
20390 * tests/atlocal.in (CFLAGS): Idem.
20391 * src/files.c: Fix a few warnings.
20392 (get_extension_index): Remove, unused.
20393
20394 2002-01-08 Akim Demaille <akim@epita.fr>
20395
20396 * src/getargs.c (AS_FILE_NAME): New.
20397 (getargs): Use it to convert DOSish file names.
20398 * src/files.c (base_name): Rename as full_base_name to avoid
20399 clashes with `base_name ()'.
20400 (filename_split): New.
20401 (compute_base_names): N-th rewrite, using filename_split.
20402
20403 2002-01-08 Akim Demaille <akim@epita.fr>
20404
20405 * lib/basename.c, lib/dirname.h, lib/dirname.c, lib/memrchr.c:
20406 New, stolen from the Fileutils 4.1.
20407 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
20408 * configure.in: Check for the presence of memrchr, and of its
20409 prototype.
20410
20411 2002-01-07 Tim Van Holder <tim.van.holder@pandora.be>
20412
20413 * lib/hash.h (__P): Added definition for this macro.
20414 * src/Makefile.am: Add parse-skel.c and scan-skel.c to
20415 BUILT_SOURCES, to ensure they are generated first.
20416 * src/parse-skel.y: Use YYERROR_VERBOSE instead of
20417 %error-verbose to allow bootstrapping with bison 1.30x.
20418
20419 2002-01-06 Akim Demaille <akim@epita.fr>
20420
20421 * src/reader.c (parse_braces): Don't fetch the next char, the
20422 convention is to fetch on entry.
20423 * tests/torture.at (GNU Cim Grammar): Reintroduce their weird
20424 'switch' without a following semicolon.
20425 * tests/regression.at (braces parsing): New.
20426
20427 2002-01-06 Akim Demaille <akim@epita.fr>
20428
20429 Bison is dead wrong in its RR conflict reports.
20430
20431 * tests/torture.at (GNU Cim Grammar): New.
20432 * src/conflicts.c (count_rr_conflicts): Fix.
20433
20434 2002-01-06 Akim Demaille <akim@epita.fr>
20435
20436 Creating package.m4 from configure.ac causes too many problems.
20437
20438 * tests/Makefile.am (package.m4): Create it by hand,
20439 AC_CONFIG_TESTDIR no longer does in the most recent CVS Autoconf.
20440
20441 2002-01-06 Akim Demaille <akim@epita.fr>
20442
20443 * src/Makefile.am (bison_SOURCES): Add parse-skel.h and
20444 skeleton.h.
20445
20446 2002-01-04 Paul Eggert <eggert@twinsun.com>
20447
20448 * doc/bison.texinfo (Debugging):
20449 Remove YYSTDERR; it's no longer defined or used.
20450 Also, s/cstdio.h/cstdio/.
20451
20452 2002-01-03 Akim Demaille <akim@epita.fr>
20453
20454 * tests/bison.in, tests/atlocal.in: Adjust to CVS Autoconf.
20455
20456 2002-01-03 Akim Demaille <akim@epita.fr>
20457
20458 * src/parse-skel.y (process_skeleton): Don't bind the parser's
20459 tracing code to --trace, wait for a better --trace option, with
20460 args.
20461
20462 2002-01-03 Akim Demaille <akim@epita.fr>
20463
20464 * src/bison.simple (YYSTDERR): Remove, replace `stderr'.
20465 The ISO C++ standard is extremely clear about it: stderr is
20466 considered a macro, not a regular symbol (see table 94 `Header
20467 <cstdio> synopsis', [lib.c.files] 27.8.2 C Library files).
20468 Therefore std:: does not apply to it. It still does with fprintf.
20469 Also, s/cstdio.h/cstdio/.
20470
20471 2002-01-03 Akim Demaille <akim@epita.fr>
20472
20473 * lib/quotearg.c: Use `#include "..."' instead of `#include <...>'
20474 for non system headers.
20475
20476 2002-01-02 Akim Demaille <akim@epita.fr>
20477
20478 Equip the skeleton chain with location tracking, runtime trace,
20479 pure parser and scanner.
20480
20481 * src/parse-skel.y: Request a pure parser, locations, and prefix
20482 renaming.
20483 (%union): Having several members with the same type does not help
20484 type mismatches, simplify.
20485 (YYPRINT, yyprint): New.
20486 (yyerror): ``Rename'' (there is a #define yyerror skel_error) as...
20487 (skel_error): this.
20488 Handle locations.
20489 * src/scan-skel.l: Adjust to these changes.
20490 * src/skeleton.h (LOCATION_RESET, LOCATION_LINES, LOCATION_STEP)
20491 (LOCATION_PRINT, skel_control_t): New.
20492
20493 2001-12-30 Akim Demaille <akim@epita.fr>
20494
20495 * src/parse-skel.y: Get rid of the shift/reduce conflict:
20496 replace `gb' with BLANKS.
20497 * src/scan-skel.l: Adjust.
20498
20499 2001-12-30 Akim Demaille <akim@epita.fr>
20500
20501 * src/system.h: We don't need nor want bcopy.
20502 Throw away MS-DOS crap: we don't need getpid.
20503 * configure.in: We don't need strndup. It was even causing
20504 problems: because Flex includes the headers *before* us,
20505 _GNU_SOURCE is not defined by config.h, and therefore strndup was
20506 not visible.
20507 * lib/xstrndup.c: New.
20508 * src/scan-skel.l: Use it.
20509 Be sure to initialize yylval.muscle member when scanning a MUSCLE.
20510 * src/parse-skel.y: Use %directives instead of #defines.
20511
20512 2001-12-30 Akim Demaille <akim@epita.fr>
20513
20514 * src/skeleton.h: New.
20515 * src/output.c (output_parser, output_master_parser): Remove, dead
20516 code.
20517 * src/output.h (get_lines_number, actions_output, guards_output)
20518 (token_definitions_output): Prototype them.
20519 * src/parse-skel.y: Add the license notice.
20520 Include output.h and skeleton.h.
20521 (process_skeleton): Returns void, and takes a single parameter.
20522 * src/scan-skel.l: Add the license notice.
20523 Include skeleton.h.
20524 Don't use %option yylineno: it seems that then Flex imagines
20525 REJECT has been used, and therefore it won't reallocate its
20526 buffers (which makes no other sense to me than a bug). It results
20527 in warnings for `unused: yy_flex_realloc'.
20528
20529 2001-12-30 Robert Anisko <robert.anisko@epita.fr>
20530
20531 * src/muscle_tab.h (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
20532 (MUSCLE_INSERT_PREFIX): ...to there.
20533 * src/output.c (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
20534 (MUSCLE_INSERT_PREFIX): Move from here...
20535
20536 * src/bison.hairy: Add a section directive. Put braces around muscle
20537 names. This parser skeleton is still broken, but Bison should not
20538 choke on a bad muscle 'syntax'.
20539 * src/bison.simple: Add a section directive. Put braces around muscle
20540 names.
20541
20542 * src/files.h (strsuffix, stringappend): Add declarations.
20543 (tab_extension): Add declaration.
20544 (short_base_name): Add declaration.
20545
20546 * src/files.c (strsuffix, stringappend): No longer static. These
20547 functions are used in the skeleton parser.
20548 (tab_extension): New.
20549 (compute_base_names): Use the computations done in this function
20550 to guess if the generated parsers should have '.tab' in their
20551 names.
20552 (short_base_name): No longer static.
20553
20554 * src/output.c (output_skeleton): New.
20555 (output): Disable call to output_master_parser, and give a try to
20556 a new skeleton handling system.
20557 (guards_output, actions_output): No longer static.
20558 (token_definitions_output, get_lines_number): No longer static.
20559
20560 * configure.in: Use AM_PROG_LEX and AC_PROG_YACC.
20561
20562 * src/Makefile.am (bison_SOURCES): Add scan-skel.l and
20563 parse-skel.y.
20564
20565 * src/parse-skel.y: New file.
20566 * src/scan-skel.l: New file.
20567
20568 2001-12-29 Akim Demaille <akim@epita.fr>
20569
20570 %name-prefix is broken.
20571
20572 * src/files.c (spec_name_prefix): Initialize to NULL, not to "yy".
20573 Adjust all dependencies.
20574 * tests/headers.at (export YYLTYPE): Strengthen this test: use
20575 %name-prefix.
20576
20577 Renaming yylval but not yylloc is not consistent. Now we do.
20578
20579 * src/bison.simple: Prefix yylloc if used.
20580 * doc/bison.texinfo (Decl Summary): Document that.
20581
20582 2001-12-29 Akim Demaille <akim@epita.fr>
20583
20584 * doc/bison.texinfo: Promote `%long-directive' over
20585 `%long_directive'.
20586 Remove all references to fixed-output-files, yacc is enough.
20587
20588 2001-12-29 Akim Demaille <akim@epita.fr>
20589
20590 * src/bison.simple: Define YYDEBUG and YYERROR_VERBOSE *after* the
20591 user prologue. These are defaults.
20592 * tests/actions.at (Mid-rule actions): Make sure the user can
20593 define YYDEBUG and YYERROR_VERBOSE.
20594
20595 2001-12-29 Akim Demaille <akim@epita.fr>
20596
20597 * src/output.c (header_output): Don't forget to export YYLTYPE and
20598 yylloc.
20599 * tests/headers.at (export YYLTYPE): New, make sure it does.
20600 * tests/regression.at (%union and --defines, Invalid CPP headers):
20601 Move to...
20602 * tests/headers.at: here.
20603
20604 2001-12-29 Akim Demaille <akim@epita.fr>
20605
20606 * src/gram.h (rule_s): Member `assoc' is of type `associativity'.
20607
20608 2001-12-29 Akim Demaille <akim@epita.fr>
20609
20610 * tests/actions.at (Mid-rule actions): Output on a single line
20611 instead of several.
20612
20613 2001-12-29 Akim Demaille <akim@epita.fr>
20614
20615 * doc/bison.texinfo: Formatting changes.
20616
20617 2001-12-29 Akim Demaille <akim@epita.fr>
20618
20619 Don't store the token defs in a muscle, just be ready to output it
20620 on command. Now possible via `symbols'. Fixes a memory leak.
20621
20622 * src/output.c (token_definitions_output): New.
20623 (output_parser, header_output): Use it.
20624 * src/reader.c (symbols_save): Remove.
20625
20626 2001-12-29 Akim Demaille <akim@epita.fr>
20627
20628 * src/bison.simple: Do not provide a default for YYSTYPE and
20629 YYLTYPE before the user's prologue. Otherwise it's hardly... a
20630 default.
20631
20632 2001-12-29 Akim Demaille <akim@epita.fr>
20633
20634 Mid-rule actions are simply... ignored!
20635
20636 * src/reader.c (readgram): Be sure to attach mid-rule actions to
20637 the empty-rule associated to the dummy symbol, not to the host
20638 rule.
20639 * tests/actions.at (Mid-rule actions): New.
20640
20641 2001-12-29 Akim Demaille <akim@epita.fr>
20642
20643 Memory leak.
20644
20645 * src/reader.c (reader): Free grammar.
20646
20647 2001-12-29 Akim Demaille <akim@epita.fr>
20648
20649 Memory leak.
20650
20651 * src/LR0.c (new_itemsets): Don't allocate `shift_symbol' here,
20652 since it allocates it for each state, although only one is needed.
20653 (allocate_storage): Do it here.
20654
20655 2001-12-29 Akim Demaille <akim@epita.fr>
20656
20657 * src/options.h, src/options.c (create_long_option_table): Rename
20658 as...
20659 (long_option_table_new): this, with a clearer prototype.
20660 (percent_table): Remove, unused,
20661 * src/getargs.c (getargs): Adjust.
20662
20663 2001-12-29 Akim Demaille <akim@epita.fr>
20664
20665 * src/LR0.c, src/conflicts.c, src/lalr.c, src/lalr.h, src/output.c
20666 * src/print.c, src/print_graph.c, src/state.h: Rename state_table
20667 as states.
20668
20669 2001-12-29 Akim Demaille <akim@epita.fr>
20670
20671 * src/lalr.c (build_relations): Rename `states' as `states1'.
20672 Sorry, I don't understand exactly what it is, no better name...
20673
20674 2001-12-29 Akim Demaille <akim@epita.fr>
20675
20676 * src/closure.c, src/conflicts.c, src/derives.c, src/gram.c
20677 * src/gram.h, src/lalr.c, src/nullable.c, src/output.c, src/print.c
20678 * src/print_graph.c, src/reader.c, src/reduce.c: Rename rule_table
20679 as rules.
20680
20681 2001-12-29 Akim Demaille <akim@epita.fr>
20682
20683 * src/gram.c (rprec, rprecsym, rassoc): Remove, unused since long
20684 ago.
20685
20686 2001-12-29 Akim Demaille <akim@epita.fr>
20687
20688 * src/reader.c, src/reader.h (user_toknums): Remove.
20689 Adjust all users to use symbols[i]->user_token_number.
20690
20691 2001-12-29 Akim Demaille <akim@epita.fr>
20692
20693 * src/gram.c, src/gram.h (sprec, sassoc): Remove.
20694 Adjust all users to use symbols[i]->prec or ->assoc.
20695
20696 2001-12-29 Akim Demaille <akim@epita.fr>
20697
20698 * src/reader.c, src/reader.h (tags): Remove.
20699 Adjust all users to use symbols[i]->tag.
20700
20701 2001-12-29 Akim Demaille <akim@epita.fr>
20702
20703 * src/gram.h, src/gram.c (symbols): New, similar to state_table
20704 and rule_table.
20705 * src/reader.c (packsymbols): Fill this table.
20706 Drop sprec.
20707 * src/conflicts.c (resolve_sr_conflict): Adjust.
20708 * src/reduce.c (reduce_grammar): Adjust: just sort symbols, a
20709 single table.
20710 Use symbols[i]->tag instead of tags[i].
20711
20712 2001-12-29 Akim Demaille <akim@epita.fr>
20713
20714 * tests/calc.at (_AT_DATA_CALC_Y): Also use %union.
20715 In addition, put a comment in there, to replace...
20716 * tests/regression.at (%union and C comments): Remove.
20717
20718 2001-12-29 Akim Demaille <akim@epita.fr>
20719
20720 * tests/regression.at (Web2c Actions): Blindly move the actual
20721 output as expected output. The contents *seem* right to me, but I
20722 can't pretend reading perfectly parser tables... Nonetheless, all
20723 the other tests pass correctly, the table look OK, even though the
20724 presence of `$axiom' is to be noted: AFAICS it is useless (but
20725 harmless).
20726
20727 2001-12-29 Akim Demaille <akim@epita.fr>
20728
20729 * src/reader.c (readgram): Don't add the rule 0 if there were no
20730 rules read. In other words, add it _after_ having performed
20731 grammar sanity checks.
20732 Fixes the `tests/regression.at (Invalid input: 1)' Failure.
20733
20734 2001-12-29 Akim Demaille <akim@epita.fr>
20735
20736 * tests/regression.at (Web2c Report): Catch up: the rule 0 is now
20737 visible, and some states have now a different number.
20738
20739 2001-12-29 Akim Demaille <akim@epita.fr>
20740
20741 * src/reader.c (readgram): Bind the initial rule's lineno to that
20742 of the first rule.
20743 * tests/regression.at (Rule Line Numbers, Unresolved SR Conflicts):
20744 (Solved SR Conflicts): Adjust rule 0's line number.
20745
20746 2001-12-29 Akim Demaille <akim@epita.fr>
20747
20748 Fix the `GAWK Grammar' failure.
20749
20750 * src/LR0.c (final_state): Initialize to -1 so that we do compute
20751 the reductions of the first state which was mistakenly confused
20752 with the final state because precisely final_state was initialized
20753 to 0.
20754 * tests/sets.at (Nullable): Adjust: state 0 does have lookaheads,
20755 now noticed by Bison.
20756 * tests/regression.at (Rule Line Numbers): Adjust: state 0 does
20757 have a reduction on $default.
20758
20759 2001-12-29 Akim Demaille <akim@epita.fr>
20760
20761 * src/gram.c (ritem_print): Be sure to subtract 1 when displaying
20762 rule line numbers.
20763 * src/closure.c (print_closure): Likewise.
20764 * src/derives.c (print_derives): Likewise.
20765 * tests/sets.at (Nullable): Adjust: the rule numbers are correct
20766 now.
20767
20768 2001-12-29 Akim Demaille <akim@epita.fr>
20769
20770 * src/lalr.c (lookaheads_print): New.
20771 (lalr): Call it when --trace-flag.
20772 * tests/sets.at (Nullable): Adjust: when tracing, the lookaheads
20773 are dumped.
20774
20775 2001-12-29 Akim Demaille <akim@epita.fr>
20776
20777 * src/derives.c (print_derives): Be sure to use `>= 0', not `> 0',
20778 when walking through ritem, even via rule->rhs.
20779 * src/reduce.c (dump_grammar, useful_production, reduce_output)
20780 (useful_production, useless_nonterminals): Likewise.
20781 (reduce_grammar_tables): Likewise, plus update nritems.
20782 * src/nullable.c (set_nullable): Likewise.
20783 * src/lalr.c (build_relations): Likewise.
20784 * tests/sets.at (Nullable): Adjust.
20785 Fortunately, now, the $axiom is no longer nullable.
20786
20787 2001-12-29 Akim Demaille <akim@epita.fr>
20788
20789 * src/LR0.c (generate_states): Use nritems, not nitems, nor using
20790 the 0-sentinel.
20791 * src/gram.c (ritem_longest_rhs): Likewise.
20792 * src/reduce.c (nonterminals_reduce): Likewise.
20793 * src/print_graph.c (print_graph): Likewise.
20794 * src/output.c (output_rule_data): Likewise.
20795 * src/nullable.c (set_nullable): Likewise.
20796
20797 2001-12-29 Akim Demaille <akim@epita.fr>
20798
20799 * src/output.c: Comment changes.
20800
20801 2001-12-27 Paul Eggert <eggert@twinsun.com>
20802
20803 * src/bison.simple (YYSTACK_ALLOC, YYSIZE_T): Remove special
20804 cases for non-GNU systems like AIX, HP-UX, SGI, Sun, and
20805 Sparc, as they were causing more porting problems than the
20806 (minor) performance improvement was worth.
20807
20808 Also, catch up with 1.31's YYSTD.
20809
20810 2001-12-27 Akim Demaille <akim@epita.fr>
20811
20812 * src/output.c (output_gram): Rely on nritems, not the
20813 0-sentinel. See below.
20814 Use -1 as separator, not 0.
20815 * src/bison.simple (yyparse): Subtract 1 to the rule numbers.
20816 Rely on -1 as separator in yyrhs, instead of 0.
20817 * tests/calc.at (AT_CHECK_CALC): Now, the parsers no longer issue
20818 twice `Now at end of input', therefore there are two lines less to
20819 expect.
20820
20821 2001-12-27 Akim Demaille <akim@epita.fr>
20822
20823 * tests/regression.at (Unresolved SR Conflicts):
20824 (Solved SR Conflicts, Rule Line Numbers): Adjust to the changes
20825 below.
20826
20827 2001-12-27 Akim Demaille <akim@epita.fr>
20828
20829 * src/LR0.c (new_state): Recognize the final state by the fact it
20830 is reached by eoftoken.
20831 (insert_start_shifting_state, insert_eof_shifting_state)
20832 (insert_accepting_state, augment_automaton): Remove, since now
20833 these states are automatically computed from the initial state.
20834 (generate_states): Adjust.
20835 * src/print.c: When reporting a rule number to the user, substract
20836 1, so that the axiom rule is rule 0, and the first user rule is 1.
20837 * src/reduce.c: Likewise.
20838 * src/print_graph.c (print_core): For the time being, just as for
20839 the report, depend upon --trace-flags to dump the full set of
20840 items.
20841 * src/reader.c (readgram): Once the grammar read, insert the rule
20842 0: `$axiom: START-SYMBOL $'.
20843 * tests/set.at: Adjust: rule 0 is now displayed, and since the
20844 number of the states has changed (the final state is no longer
20845 necessarily the last), catch up.
20846
20847 2001-12-27 Akim Demaille <akim@epita.fr>
20848
20849 Try to make the use of the eoftoken valid. Given that its value
20850 is 0 which was also used as a sentinel in ritem, (i) make sure >= 0
20851 is used instead of > 0 where appropriate, (ii), depend upon nritems
20852 instead of the 0-sentinel.
20853
20854 * src/gram.h, src/gram.c (nritems): New.
20855 Expected to be duplication of nitems, but for the time being...
20856 * src/reader.c (packgram): Assert nritems and nitems are equal.
20857 * src/LR0.c (allocate_itemsets, new_itemsets): Adjust.
20858 * src/closure.c (print_closure, print_fderives): Likewise.
20859 * src/gram.c (ritem_print): Likewise.
20860 * src/print.c (print_core, print_grammar): Likewise.
20861 * src/print_graph.c: Likewise.
20862
20863 2001-12-27 Akim Demaille <akim@epita.fr>
20864
20865 * src/main.c (main): If there are complains after grammar
20866 reductions, then output the report anyway if requested, then die.
20867 * src/symtab.c (bucket_new): Initialize `value' to -1, not 0.
20868 * src/reader.c (eoftoken): New.
20869 (parse_token_decl): If the token being defined has value `0', it
20870 is the eoftoken.
20871 (packsymbols): No longer hack `tags' to insert `$' by hand.
20872 Be sure to preserve the value of the eoftoken.
20873 (reader): Make sure eoftoken is defined.
20874 Initialize nsyms to 0: now eoftoken is created just like the others.
20875 * src/print.c (print_grammar): Don't special case the eof token.
20876 * src/regression.at: Adjust: `$' has value 0, not -1, which was a
20877 lie anyway, albeit pleasant.
20878 * tests/calc.at: Exercise error messages with eoftoken.
20879 Change the grammar so that empty input is invalid.
20880 Adjust expectations.
20881 When yyungeting, be sure to use a valid yylloc: use last_yylloc.
20882
20883 2001-12-27 Akim Demaille <akim@epita.fr>
20884
20885 * configure.in: Check the protos of strchr ans strspn.
20886 Replace strchr if needed.
20887 * src/system.h: Provide the protos of strchr, strspn and memchr if
20888 missing.
20889 * lib/strchr.c: New.
20890 * src/reader.c (symbols_save): Use strchr.
20891
20892 2001-12-27 Akim Demaille <akim@epita.fr>
20893
20894 * src/print.c, src/print_graph.c (escape): New.
20895 Use it to quote the TAGS outputs.
20896 * src/print_graph.c (print_state): Now errors are in red, and
20897 reductions in green.
20898 Prefer high to wide: output the state number on a line of its own.
20899
20900 2001-12-27 Akim Demaille <akim@epita.fr>
20901
20902 * src/state.h, src/state.c (reductions_new): New.
20903 * src/LR0.c (set_state_table): Let all the states have a
20904 `reductions', even if reduced to 0.
20905 (save_reductions): Adjust.
20906 * src/lalr.c (initialize_LA, initialize_lookaheads): Adjust.
20907 * src/print.c (print_reductions, print_actions): Adjust.
20908 * src/output.c (action_row): Adjust.
20909
20910 2001-12-27 Akim Demaille <akim@epita.fr>
20911
20912 * src/state.h, src/state.c (errs_new, errs_dup): New.
20913 * src/LR0.c (set_state_table): Let all the states have an errs,
20914 even if reduced to 0.
20915 * src/print.c (print_errs, print_reductions): Adjust.
20916 * src/output.c (output_actions, action_row): Adjust.
20917 * src/conflicts.c (resolve_sr_conflict): Adjust.
20918
20919 2001-12-27 Akim Demaille <akim@epita.fr>
20920
20921 * src/lalr.c (set_goto_map, initialize_F): Use SHIFT_SYMBOL.
20922
20923 2001-12-27 Akim Demaille <akim@epita.fr>
20924
20925 * src/conflicts.c, src/conflicts.h (print_reductions): Move to...
20926 * src/print.c: here.
20927 (lookaheadset, shiftset): New, used as additional storage by
20928 print_reductions.
20929 (print_results): Adjust.
20930 (print_shifts, print_gotos, print_errs): New, extracted from...
20931 (print_actions): here.
20932 * src/print_graph.c (print_actions): Remove dead code.
20933
20934 2001-12-27 Akim Demaille <akim@epita.fr>
20935
20936 * src/reader.c (copy_dollar, copy_at): Better checking of `n' in
20937 `$n' and `@n'.
20938
20939 2001-12-27 Akim Demaille <akim@epita.fr>
20940
20941 * src/lalr.c (add_lookback_edge): Use state_t instead of ints.
20942 (build_relations): Adjust.
20943
20944 2001-12-27 Akim Demaille <akim@epita.fr>
20945
20946 * src/lalr.c (set_goto_map): Remove a wrong but benign loop
20947 duplication.
20948
20949 2001-12-27 Akim Demaille <akim@epita.fr>
20950
20951 * src/reader.c (packgram): Catch nitems overflows.
20952
20953 2001-12-27 Akim Demaille <akim@epita.fr>
20954
20955 * src/files.c, src/files.h (guard_obstack): Remove.
20956 * src/output.c (output): Adjust.
20957 * src/reader.c (parse_braces): New, factoring...
20958 (copy_action, copy_guard): these two which are renamed as...
20959 (parse_action, parse_guard): these.
20960 As a voluntary consequence, using braces around guards is now
20961 mandatory.
20962
20963 2001-12-27 Akim Demaille <akim@epita.fr>
20964
20965 * src/gram.h (rule_t): `guard' and `guard_line' are new members.
20966 * src/reader.c (symbol_list): `guard' and `guard_line' are new
20967 members.
20968 (symbol_list_new): Adjust.
20969 (copy_action): action_line is the first line, not the last.
20970 (copy_guard): Just as for actions, store the `action' only, not
20971 the switch/case/break flesh.
20972 Don't parse the user action that might follow the guard, let...
20973 (readgram): do it, i.e., now, there can be an action after a
20974 guard.
20975 In other words the guard is just explicitly optional.
20976 (packgram): Adjust.
20977 * src/output.c (guards_output): New.
20978 (output_parser): Call it when needed.
20979 (output): Also free the guard and attrs obstacks.
20980 * src/files.c, src/files.h (obstack_save): Remove.
20981 (output_files): Remove.
20982 As a result, if one needs the former `.act' file, using an
20983 appropriate skeleton which requires actions and guards is now
20984 required.
20985 * src/main.c (main): Adjust.
20986 * tests/semantic.at: New.
20987 * tests/regression.at: Use `input.y' as input file name.
20988 Avoid 8+3 problems by requiring input.c when the test needs the
20989 parser.
20990
20991 2001-12-27 Akim Demaille <akim@epita.fr>
20992
20993 * src/reader.c (symbol_list_new): Be sure to initialize all the
20994 fields.
20995
20996 2001-12-27 Akim Demaille <akim@epita.fr>
20997
20998 All the hacks using a final pseudo state are now useless.
20999
21000 * src/LR0.c (set_state_table): state_table holds exactly nstates.
21001 * src/lalr.c (nLA): New.
21002 (initialize_LA, compute_lookaheads, initialize_lookaheads): Use it
21003 instead of lookaheadsp from the pseudo state (nstate + 1).
21004
21005 2001-12-27 Akim Demaille <akim@epita.fr>
21006
21007 * src/output.c (action_row, token_actions): Use a state_t instead
21008 of a integer, and nlookaheads instead of the following state's
21009 lookaheadsp.
21010
21011 2001-12-27 Akim Demaille <akim@epita.fr>
21012
21013 * src/conflicts.c (log_resolution, flush_shift)
21014 (resolve_sr_conflict, set_conflicts, solve_conflicts)
21015 (count_sr_conflicts, count_rr_conflicts, conflicts_output)
21016 (conflicts_print, print_reductions): Use a state_t instead of an
21017 integer when referring to a state.
21018 As much as possible, depend upon nlookaheads, instead of the
21019 `lookaheadsp' member of the following state (since lookaheads of
21020 successive states are successive, the difference between state n + 1
21021 and n served as the number of lookaheads for state n).
21022 * src/lalr.c (add_lookback_edge): Likewise.
21023 * src/print.c (print_core, print_actions, print_state)
21024 (print_results): Likewise.
21025 * src/print_graph.c (print_core, print_actions, print_state)
21026 (print_graph): Likewise.
21027 * src/conflicts.h: Adjust.
21028
21029 2001-12-27 Akim Demaille <akim@epita.fr>
21030
21031 * src/bison.hairy: Formatting/comment changes.
21032 ANSIfy.
21033 Remove `register' indications.
21034 Add plenty of `static'.
21035
21036 2001-12-27 Akim Demaille <akim@epita.fr>
21037
21038 * src/output.c (prepare): Drop the muscle `ntbase' which
21039 duplicates ntokens.
21040 * src/bison.simple: Formatting/comment changes.
21041 Use YYNTOKENS only, which is documented, but not YYNTBASE, which
21042 is an undocumented synonym.
21043
21044 2001-12-22 Akim Demaille <akim@epita.fr>
21045
21046 * src/output.c (output_table_data): Change the prototype to use
21047 `int' for array ranges: some invocations do pass an int, not a
21048 short.
21049 Reported by Wayne Green.
21050
21051 2001-12-22 Akim Demaille <akim@epita.fr>
21052
21053 Some actions of web2c.y are improperly triggered.
21054 Reported by Mike Castle.
21055
21056 * src/lalr.c (traverse): s/F (i)[k] = F (j)[k]/F (j)[k] = F (i)[k]/.
21057 * tests/regression.at (Web2c): Rename as...
21058 (Web2c Report): this.
21059 (Web2c Actions): New.
21060
21061 2001-12-22 Akim Demaille <akim@epita.fr>
21062
21063 Reductions in web2c.y are improperly reported.
21064 Reported by Mike Castle.
21065
21066 * src/conflicts.c (print_reductions): Fix.
21067 * tests/regression.at (Web2c): New.
21068
21069 2001-12-18 Akim Demaille <akim@epita.fr>
21070
21071 Some host fail on `assert (!"foo")', which expands to
21072 ((!"foo") ? (void)0 : __assert("!"foo."", __FILE__, __LINE__))
21073 Reported by Nelson Beebee.
21074
21075 * src/output.c, src/vcg.c: Replace `assert (!"it succeeded")' with
21076 `#define it_succeeded 0' and `assert (it_succeeded)'.
21077
21078 2001-12-17 Marc Autret <autret_m@epita.fr>
21079
21080 * src/bison.simple: Don't hard code the skeleton line and filename.
21081 * src/output.c (output_parser): Rename 'line' as 'output_line'.
21082 New line counter 'skeleton_line' (skeleton-line muscle).
21083
21084 2001-12-17 Paul Eggert <eggert@twinsun.com>
21085
21086 * NEWS, doc/bison.texinfo, doc/bison.1, doc/bison.rnh: Document that
21087 YYDEBUG must be defined to a nonzero value.
21088
21089 * src/bison.simple (yytname): Do not assume that the user defines
21090 YYDEBUG to a properly parenthesized expression.
21091
21092 2001-12-17 Akim Demaille <akim@epita.fr>
21093
21094 * src/state.h (state_t): Rename lookaheads as lookaheadsp.
21095 nlookaheads is a new member.
21096 Adjust all users.
21097 * src/lalr.h (nlookaheads): Remove this orphan declaration.
21098 * src/lalr.c (initialize_lookaheads): Set nlookaheads for each
21099 state.
21100
21101 2001-12-17 Akim Demaille <akim@epita.fr>
21102
21103 * src/files.h, src/files.c (open_files, close_files): Remove.
21104 * src/main.c (main): Don't open/close files, nor invoke lex_free,
21105 let...
21106 * src/reader.c (reader): Do it.
21107
21108 2001-12-17 Akim Demaille <akim@epita.fr>
21109
21110 * src/conflicts.c (print_reductions): Formatting changes.
21111
21112 2001-12-17 Akim Demaille <akim@epita.fr>
21113
21114 * src/conflicts.c (flush_shift): Also adjust lookaheadset.
21115 (flush_reduce): New.
21116 (resolve_sr_conflict): Adjust.
21117
21118 2001-12-17 Akim Demaille <akim@epita.fr>
21119
21120 * src/output.c (output_obstack): Be static and rename as...
21121 (format_obstack): this, to avoid any confusion with files.c's
21122 output_obstack.
21123 * src/reader.h (muscle_obstack): Move to...
21124 * src/output.h: here, since it's defined in output.c.
21125
21126 2001-12-17 Akim Demaille <akim@epita.fr>
21127
21128 * src/output.c (action_row, save_column, default_goto)
21129 (sort_actions, matching_state, pack_vector): Better variable
21130 locality.
21131
21132 2001-12-17 Akim Demaille <akim@epita.fr>
21133
21134 * src/output.c: Various formatting changes.
21135
21136 2001-12-17 Akim Demaille <akim@epita.fr>
21137
21138 * src/files.c (output_files): Free the output_obstack.
21139 * src/main.c (main): Call print and print_graph conditionally.
21140 * src/print.c (print): Work unconditionally.
21141 * src/print_graph.c (print_graph): Work unconditionally.
21142 * src/conflicts.c (log_resolution): Output only if verbose_flag.
21143
21144 2001-12-16 Marc Autret <autret_m@epita.fr>
21145
21146 * src/output.c (actions_output): Fix. When we use %no-lines,
21147 there is one less line per action.
21148
21149 2001-12-16 Marc Autret <autret_m@epita.fr>
21150
21151 * src/bison.simple: Remove a useless #line directive.
21152 s/#line %%line %%skeleton/#line %%line "%%parser-file-name"/'.
21153 * src/output.c (get_lines_number): New.
21154 (output_parser): Adjust, now takes care about the lines of a
21155 output muscles.
21156 Fix line numbering.
21157 (actions_output): Computes the number of lines taken by actions.
21158 (output_master_parser): Insert new skeleton which is the name of
21159 the output parser file name.
21160
21161 2001-12-15 Marc Autret <autret_m@epita.fr>
21162
21163 * src/bison.simple [YYERROR_VERBOSE]: Restore backward compatibility.
21164
21165 2001-12-15 Marc Autret <autret_m@epita.fr>
21166
21167 * src/output.c (output_gram): Keep track of the hairy one.
21168
21169 2001-12-15 Akim Demaille <akim@epita.fr>
21170
21171 Make `make distcheck' work.
21172
21173 * lib/Makefile.am (INCLUDES): Add top_srcdir/intl, since hash uses
21174 system.h which uses libgettext.h.
21175
21176 2001-12-15 Akim Demaille <akim@epita.fr>
21177
21178 * src/nullable.c (set_nullable): Useless rules must be skipped,
21179 otherwise, since we range over their symbols, we might look at a
21180 nonterminal which no longer ``exists'', i.e., it is not counted in
21181 `nvars', hence we overflow our arrays.
21182
21183 2001-12-15 Akim Demaille <akim@epita.fr>
21184
21185 The header can also be produced directly, without any obstack!
21186 Yahoo!
21187
21188 * src/files.c, src/files.h (defines_obstack): Remove.
21189 (compute_header_macro): Global.
21190 (defines_obstack_save): Remove.
21191 * src/reader.c (parse_union_decl): No longer output to
21192 defines_obstack: its content can be found in the `stype' muscle
21193 anyway.
21194 (output_token_translations): Merge into...
21195 (symbols_output): this.
21196 Rename as...
21197 (symbols_save): this.
21198 (reader): Adjust.
21199 * src/output.c (header_output): New.
21200 (output): Call it.
21201
21202 2001-12-15 Akim Demaille <akim@epita.fr>
21203
21204 * src/reader.c (parse_union_decl): Instead of handling two obstack
21205 simultaneously, use one to define the `stype' muscle, and use the
21206 value of the latter to fill defines_obstack.
21207 (copy_comment): Remove.
21208 (copy_comment2): Work for a single obstack.
21209 Rename as...
21210 (copy_comment): this.
21211
21212 2001-12-15 Akim Demaille <akim@epita.fr>
21213
21214 * src/lex.c, src/lex.h (xgetc): No longer static.
21215 * src/reader.c (parse_union_decl): Revamp.
21216
21217 2001-12-15 Akim Demaille <akim@epita.fr>
21218
21219 Still making progress in separating Bison into (i) input, (ii)
21220 process, (iii) output: now we can directly output the parser file
21221 without using table_obstack at all.
21222
21223 * src/files.c, src/files.h (table_obstack): Bye bye.
21224 (parser_file_name): New.
21225 * src/files.c (compute_output_file_names): Compute it.
21226 * src/output.c (actions_output, output_parser)
21227 (output_master_parser): To a file instead of an obstack.
21228
21229 2001-12-15 Akim Demaille <akim@epita.fr>
21230
21231 Attach actions to rules, instead of pre-outputting them to
21232 actions_obstack.
21233
21234 * src/gram.h (rule_t): action and action_line are new members.
21235 * src/reader.c (symbol_list): Likewise.
21236 (copy_action): Save the actions within the rule.
21237 (packgram): Save them in rule_table.
21238 * src/output.c (actions_output): New.
21239 (output_parser): Use it on `%%actions'.
21240 (output_rule_data): Don't free rule_table.
21241 (output): Do it.
21242 (prepare): Don't save the `action' muscle.
21243 * src/bison.simple: s/%%action/%%actions/.
21244
21245 2001-12-15 Akim Demaille <akim@epita.fr>
21246
21247 * src/reader.c (copy_action): When --yacc, don't append a `;'
21248 to the user action: let it fail if lacking.
21249 Suggested by Arnold Robbins and Tom Tromey.
21250
21251 2001-12-14 Akim Demaille <akim@epita.fr>
21252
21253 * src/lex.c (literalchar): Simply return the char you decoded, non
21254 longer mess around with obstacks and int pointers.
21255 Adjust all callers.
21256
21257 2001-12-14 Akim Demaille <akim@epita.fr>
21258
21259 * src/lex.c (literalchar): Don't escape the special characters,
21260 just decode them, and keep them as char (before, eol was output as
21261 the 2 char string `\n' etc.).
21262 * src/output.c (output_rule_data): Use quotearg to output the
21263 token strings.
21264
21265 2001-12-13 Paul Eggert <eggert@twinsun.com>
21266
21267 * src/bison.simple (YYSIZE_T, YYSTACK_ALLOC, YYSTACK_FREE):
21268 Do not infringe on the global user namespace when using C++.
21269 (YYFPRINTF, YYSTDERR): New macros, needed for the above.
21270 All uses of `fprintf' and `stderr' changed.
21271
21272 * doc/bison.texinfo: Document YYFPRINTF, YYSTDERR.
21273
21274 2001-12-13 Akim Demaille <akim@epita.fr>
21275
21276 The computation of nullable is broken: it doesn't handle empty
21277 RHS's properly.
21278
21279 * tests/torture.at (GNU AWK Grammar): New.
21280 * tests/sets.at (Nullable): New.
21281 * src/nullable.c (set_nullable): Instead of blindly looping over
21282 `ritems', loop over the rules, and then over their rhs's.
21283
21284 Work around Autotest bugs.
21285
21286 * src/warshall.c (bitmatrix_print): Don't use `+--+' as table
21287 frame, because Autotest understand lines starting with a `+' as
21288 traces from the shell. Then, they are not processed properly.
21289 Admittedly an Autotest bug, but we don't have time to wait for
21290 Autotest to catch up.
21291 * tests/regression.at (Broken Closure): Adjust to the new table
21292 frames.
21293 Move to...
21294 * tests/sets.at: here.
21295
21296 2001-12-13 Akim Demaille <akim@epita.fr>
21297
21298 * src/closure.c (closure): Use nrules instead of playing tricks
21299 with BITS_PER_WORD.
21300
21301 2001-12-13 Akim Demaille <akim@epita.fr>
21302
21303 * src/print.c (print_actions): Output the handling of `$' as the
21304 traces do: shifting the token EOF. Before EOF was treated as a
21305 nonterminal.
21306 * tests/regression.at: Adjust some tests.
21307 * src/print_graph.c (print_core): Complete the set of items via
21308 closure. The next-to-final and final states are still unsatisfying,
21309 but that's to be addressed elsewhere.
21310 No longer output the rule numbers, but do output the state number.
21311 A single loop for the shifts + gotos is enough, but picked a
21312 distinct color for each.
21313 (print_graph): Initialize and finalize closure.
21314
21315 2001-12-13 Akim Demaille <akim@epita.fr>
21316
21317 * src/reader.c (readgram): Remove dead code, an strip useless
21318 braces.
21319 (get_type): Remove, unused.
21320
21321 2001-12-12 Akim Demaille <akim@epita.fr>
21322
21323 * src/complain.h, src/complain.c: Remove error_one_per_line, rely
21324 on that of lib/error.c.
21325
21326 2001-12-12 Akim Demaille <akim@epita.fr>
21327
21328 Some hosts don't like `/' in includes.
21329
21330 * src/system.h: Include libgettext.h without qualifying the path.
21331 * src/Makefile.am (INCLUDES): Add $(top_srcdir)/intl, remove
21332 $(top_srcdir).
21333
21334 2001-12-11 Marc Autret <autret_m@epita.fr>
21335
21336 * src/output.c (output_parser): Remove useless muscle.
21337
21338 2001-12-11 Marc Autret <autret_m@epita.fr>
21339
21340 * src/bison.simple: Remove #line just before %%epilogue. It
21341 is now handled in ...
21342 * src/reader.c (read_additionnal_code): Add the output of a
21343 #line for the epilogue.
21344
21345 2001-12-10 Marc Autret <autret_m@epita.fr>
21346
21347 * src/reader.c (copy_definition): Re-use CPP-outed code which
21348 replace precedent remove.
21349 * src/bison.simple: Remove #line before %%prologue because
21350 %%input-line is wrong at this time.
21351
21352 2001-12-10 Marc Autret <autret_m@epita.fr>
21353
21354 * src/reader.c (symbols_output): Clean up.
21355 * src/output.c (output_gram, output): Clean up.
21356
21357 2001-12-10 Akim Demaille <akim@epita.fr>
21358
21359 * src/lalr.c (initialize_lookaheads): New. Extracted from...
21360 * src/LR0.c (set_state_table): here.
21361 * src/lalr.c (lalr): Call it.
21362
21363 2001-12-10 Akim Demaille <akim@epita.fr>
21364
21365 * src/state.h (shifts): Remove the `number' member: shifts are
21366 attached to state, hence no longer need to be labelled with a
21367 state number.
21368
21369 2001-12-10 Akim Demaille <akim@epita.fr>
21370
21371 Now that states have a complete set of members, the linked list of
21372 shifts is useless: just fill directly the state's shifts member.
21373
21374 * src/state.h (shifts): Remove the `next' member.
21375 * src/LR0.c (first_state, last_state): Remove.
21376 Adjust the callers.
21377 (augment_automaton): Don't look for the shifts that must be added
21378 a shift on EOF: it is those of the state we looked for! But now,
21379 since shifts are attached, it is no longer needed to looking
21380 merely by its id: its number.
21381
21382 2001-12-10 Akim Demaille <akim@epita.fr>
21383
21384 * src/LR0.c (augment_automaton): Better variable locality.
21385 Remove an impossible branch: if there is a state corresponding to
21386 the start symbol being shifted, then there is shift for the start
21387 symbol from the initial state.
21388
21389 2001-12-10 Akim Demaille <akim@epita.fr>
21390
21391 * src/LR0.c (augment_automaton): Call `insert_eof_shifting_state'
21392 only when appropriate: when insert_start_shifting_state' is not
21393 invoked.
21394 * tests/regression.at (Rule Line Numbers): Adjust.
21395
21396 2001-12-10 Akim Demaille <akim@epita.fr>
21397
21398 * src/LR0.c (augment_automaton): Now that all states have shifts,
21399 merge the two cases addition shifts to the initial state.
21400
21401 2001-12-10 Akim Demaille <akim@epita.fr>
21402
21403 * src/lalr.c (set_state_table): Move to...
21404 * src/LR0.c: here.
21405 * src/lalr.c (lalr): Don't call it...
21406 * src/LR0.c (generate_states): do it.
21407 * src/LR0.h (first_state): Remove, only the table is used.
21408
21409 2001-12-10 Akim Demaille <akim@epita.fr>
21410
21411 * src/LR0.h (first_shift, first_reduction): Remove.
21412 * src/lalr.c: Don't use first_shift: find shifts through the
21413 states.
21414
21415 2001-12-10 Akim Demaille <akim@epita.fr>
21416
21417 * src/LR0.c: Attach shifts to states as soon as they are
21418 computed.
21419 * src/lalr.c (set_state_table): Instead of assigning shifts to
21420 state, just assert that the mapping was properly done.
21421
21422 2001-12-10 Akim Demaille <akim@epita.fr>
21423
21424 * src/LR0.c (insert_start_shift): Rename as...
21425 (insert_start_shifting_state): this.
21426 (insert_eof_shifting_state, insert_accepting_state): New.
21427 (augment_automaton): Adjust.
21428 Better locality of the variables.
21429 When looking if the start_symbol is shifted from the initial
21430 state, using `while (... symbol != start_symbol ...)' sounds
21431 better than `while (... symbol < start_symbol ...)': If fail
21432 to see how the order between symbols could be relevant!
21433
21434 2001-12-10 Akim Demaille <akim@epita.fr>
21435
21436 * src/getargs.h: Don't declare `spec_name_prefix' and
21437 `spec_file_prefix', declared by src/files.h.
21438 * src/files.c, src/files.h: Default for spec_name_prefix is "yy".
21439 * src/muscle_tab.c (muscle_init): Default prefix to NULL.
21440 * src/output.c (prepare): Adjust.
21441 * src/reader.c (symbols_output): Likewise.
21442 * src/vmsgetargs.c: Vaguely adjust, but who cares?
21443
21444 2001-12-10 Akim Demaille <akim@epita.fr>
21445
21446 * src/muscle_tab.c (muscle_init): NULL is a better default than
21447 `"0"'.
21448
21449 2001-12-10 Akim Demaille <akim@epita.fr>
21450
21451 * src/reader.c (reader): Calling symbols_output once is enough.
21452
21453 2001-12-10 Akim Demaille <akim@epita.fr>
21454
21455 Now that states have a complete set of members, the linked list of
21456 reductions is useless: just fill directly the state's reductions
21457 member.
21458
21459 * src/state.h (struct reductions): Remove member `number' and
21460 `next'.
21461 * src/LR0.c (first_reduction, last_reduction): Remove.
21462 (save_reductions): Don't link the new reductions, store them in
21463 this_state.
21464 * src/lalr.c (set_state_table): No need to attach reductions to
21465 states, it's already done.
21466 * src/output.c (output_actions): No longer free the shifts, then
21467 the reductions, then the states: free all the states and their
21468 members.
21469
21470 2001-12-10 Akim Demaille <akim@epita.fr>
21471
21472 * src/options.c (OPTN, DRTV, BOTH): New.
21473 (option_table): Use them.
21474
21475 * src/muscle_tab.c: Don't include xalloc.h and string.h: that's
21476 the job of system.h.
21477 * src/options.c: Don't include stdio.h and xalloc.h for the same
21478 reasons.
21479
21480 2001-12-10 Akim Demaille <akim@epita.fr>
21481
21482 * src/output.c (output, prepare): Make sure the values of the
21483 muscles `action' and `prologue' are 0-terminated.
21484
21485 2001-12-10 Akim Demaille <akim@epita.fr>
21486
21487 Clean up GCC warnings.
21488
21489 * src/reader.c (copy_action): `buf' is not used.
21490 (parse_skel_decl): Be static.
21491 * src/muscle_tab.c (mhash1, mhash2, muscle_insert): Preserve `const'.
21492 * src/options.h (create_long_option_table): Have a real prototype.
21493 * lib/hash.c, lib/hash.h (hash_insert, hash_insert_at, hash_delete)
21494 (hash_delete_at): Return const void *.
21495 Adjust casts to preserve the const.
21496
21497 2001-12-10 Akim Demaille <akim@epita.fr>
21498
21499 * configure.in: Require 2.52g.
21500 M4 is not needed, but AUTOM4TE is.
21501 * m4/m4.m4: Remove.
21502 * tests/Makefile.am: Adjust.
21503
21504 2001-12-10 Akim Demaille <akim@epita.fr>
21505
21506 One structure for states is enough, even though theoretically
21507 there are LR(0) states and LALR(1) states.
21508
21509 * src/lalr.h (state_t): Remove.
21510 (state_table): Be state_t **, not state_t *.
21511 * src/state.h (core, CORE_ALLOC): Rename as...
21512 (state_t, STATE_ALLOC): this.
21513 Add the LALR(1) members: shifts, reductions, errs.
21514 * src/LR0.c (state_table): Rename as...
21515 (state_hash): this, to avoid name clashes with the global
21516 `state_table'.
21517 * src/print_graph.c, src/LR0.c, src/LR0.h, src/conflicts.c
21518 * src/lalr.c, src/lalr.h, src/output.c, src/print.c: Adjust.
21519
21520 2001-12-10 Akim Demaille <akim@epita.fr>
21521
21522 Bison dumps core on bash.y.
21523 Reported by Pascal Bart.
21524
21525 * src/warshall.c (bitmatrix_print): New.
21526 (TC): Use it.
21527 When performing a transitive closure R(i, j) && R(j, k) => R(i, k),
21528 j must be the outer loop.
21529 * tests/regression.at (Broken Closure): New.
21530
21531 2001-12-05 Akim Demaille <akim@epita.fr>
21532
21533 * tests/atlocal.in (CPPFLAGS): Do not leave a space between -I and
21534 its argument.
21535 Reported by Peter Hamorsky.
21536
21537 2001-12-05 Akim Demaille <akim@epita.fr>
21538
21539 * src/conflicts.c (err_table): Remove.
21540 (resolve_sr_conflict): Adjust.
21541 * src/lalr.h (state_t.reduction_table, state_t.shift_table):
21542 Rename as...
21543 (state_t.reductions, state_t.shifts): this.
21544
21545 2001-12-05 Akim Demaille <akim@epita.fr>
21546
21547 * src/reduce.c (reduce_grammar_tables): No longer disable the
21548 removal of useless rules via CPP but via `if (0)', so that the
21549 compiler still check the code is valid.
21550 For instance, it should have noticed `rline' no longer exists: use
21551 the `line' member of rule_t.
21552 * src/gram.c (dummy, rline): Remove, unused.
21553
21554 2001-12-05 Akim Demaille <akim@epita.fr>
21555
21556 * src/output.c (pack_vector): Use assert, not berror.
21557 * src/main.c (berror): Remove, unused.
21558
21559 2001-12-05 Akim Demaille <akim@epita.fr>
21560
21561 New experimental feature: if --verbose --trace output all the
21562 items of a state, not only its kernel.
21563
21564 * src/print.c (print_core): If `trace_flag', then invoke closure
21565 before outputting the items of the state (print_core is no longer
21566 a correct name them).
21567 (print_results): Invoke new_closure/free_closure if needed.
21568
21569 2001-12-05 Akim Demaille <akim@epita.fr>
21570
21571 * src/LR0.c (new_itemsets): Use nshifts only, not shiftcount.
21572 * src/closure.c, src/closure.h (itemsetsize): Rename as...
21573 (nitemset): for consistency with the rest of the project.
21574
21575 2001-12-05 Akim Demaille <akim@epita.fr>
21576
21577 * src/closure.c (print_closure): Improve.
21578 (closure): Use it for printing input and output.
21579
21580 2001-12-05 Akim Demaille <akim@epita.fr>
21581
21582 * src/closure.c (FIRSTS, FDERIVES): Adjust to reality: they are
21583 indexed by nonterminals.
21584
21585 2001-12-05 Akim Demaille <akim@epita.fr>
21586
21587 * src/warshall.c (TC, RTC): De-obsfucate (source reduced to 22% of
21588 what it was!).
21589 * src/warshall.h: Remove accidental duplication of the content.
21590
21591 2001-12-05 Akim Demaille <akim@epita.fr>
21592
21593 * src/closure.c (set_fderives): De-obfuscate.
21594
21595 2001-12-05 Akim Demaille <akim@epita.fr>
21596
21597 * src/closure.c (print_firsts, print_fderives): De-obfuscate.
21598
21599 2001-12-05 Akim Demaille <akim@epita.fr>
21600
21601 * src/closure.c (set_firsts): De-obfuscate.
21602
21603 2001-12-05 Akim Demaille <akim@epita.fr>
21604
21605 * src/output.c (action_row): De-obfuscate
21606 using the good o' techniques: arrays not pointers, variable
21607 locality, BITISSET, RESETBIT etc.
21608
21609 2001-12-05 Akim Demaille <akim@epita.fr>
21610
21611 Pessimize the code to simplify it: from now on, all the states
21612 have a valid SHIFTS, which NSHIFTS is possibly 0.
21613
21614 * src/LR0.c (shifts_new): Be global and move to..
21615 * src/state.c, src/state.h: here.
21616 * src/conflicts, src/lalr.c, src/output.c, src/print.c,
21617 * src/print_graph: Adjust.
21618
21619 2001-12-05 Akim Demaille <akim@epita.fr>
21620
21621 * src/state.h (SHIFT_DISABLE, SHIFT_IS_DISABLED): New.
21622 * src/conflicts.c: Use it.
21623 Restore a few missing `if (!SHIFT_IS_DISABLED)' which were
21624 incorrectly ``simplified''.
21625
21626 2001-12-05 Akim Demaille <akim@epita.fr>
21627
21628 * src/conflicts.c (flush_shift, resolve_sr_conflict): De-obfuscate
21629 using the good o' techniques: arrays not pointers, variable
21630 locality, BITISSET, RESETBIT etc.
21631
21632 2001-12-05 Akim Demaille <akim@epita.fr>
21633
21634 * src/state.h (SHIFT_SYMBOL): New.
21635 * src/conflicts.c: Use it to deobfuscate.
21636
21637 2001-12-05 Akim Demaille <akim@epita.fr>
21638
21639 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts)
21640 (print_reductions): De-obfuscate using the good o' techniques:
21641 arrays not pointers, variable locality, BITISSET.
21642
21643 2001-12-05 Akim Demaille <akim@epita.fr>
21644
21645 * src/conflicts.c (print_reductions): Arrays, not pointers.
21646 Use BITISSET.
21647
21648 2001-12-05 Akim Demaille <akim@epita.fr>
21649
21650 * src/conflicts.c (print_reductions): Pessimize, but clarify.
21651
21652 2001-12-05 Akim Demaille <akim@epita.fr>
21653
21654 * src/conflicts.c (print_reductions): Improve variable locality.
21655
21656 2001-12-05 Akim Demaille <akim@epita.fr>
21657
21658 * src/conflicts.c (print_reductions): Pessimize, but clarify.
21659
21660 2001-12-05 Akim Demaille <akim@epita.fr>
21661
21662 * src/conflicts.c (print_reductions): Improve variable locality.
21663
21664 2001-12-05 Akim Demaille <akim@epita.fr>
21665
21666 * src/state.h (SHIFT_IS_ERROR, SHIFT_IS_GOTO, SHIFT_IS_SHIFT): New.
21667 * src/lalr.c: Use them.
21668
21669 2001-12-05 Akim Demaille <akim@epita.fr>
21670
21671 * src/LR0.c (augment_automaton): Formatting changes.
21672 Better variable locality.
21673
21674 2001-12-05 Akim Demaille <akim@epita.fr>
21675
21676 * src/lalr.c (matrix_print): New.
21677 (transpose): Use it.
21678 Use arrays instead of pointers.
21679
21680 2001-12-05 Akim Demaille <akim@epita.fr>
21681
21682 * src/lalr.c (maxrhs): Move to...
21683 * src/gram.c, src/gram.h (ritem_longest_rhs): here.
21684 * src/lalr.c (build_relations): Adjust.
21685
21686 2001-12-05 Akim Demaille <akim@epita.fr>
21687
21688 * src/lalr.c (transpose): Free the memory allocated to the
21689 argument, as it is replaced by the results by the unique caller.
21690 (build_relations): Merely invoke transpose: it handles the memory
21691 deallocation.
21692 Improve variable locality.
21693 Avoid variables used as mere abbreviations.
21694 (compute_lookaheads): Use arrays instead of pointers.
21695
21696 2001-12-05 Akim Demaille <akim@epita.fr>
21697
21698 * src/lalr.c (initialize_F): Improve variable locality.
21699 Avoid variables used as mere abbreviations.
21700
21701 2001-12-05 Akim Demaille <akim@epita.fr>
21702
21703 * src/derives.c (print_derives): Display the ruleno.
21704 * src/lalr.c (initialize_F, transpose): Better variable locality
21705 to improve readability.
21706 Avoid variables used as mere abbreviations.
21707
21708 2001-12-05 Akim Demaille <akim@epita.fr>
21709
21710 * src/lalr.c (traverse): Use arrays instead of pointers.
21711
21712 2001-12-05 Akim Demaille <akim@epita.fr>
21713
21714 * src/nullable.c (set_nullable): Use a for loop to de-obfuscate
21715 the handling of squeue.
21716 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
21717
21718 2001-12-05 Akim Demaille <akim@epita.fr>
21719
21720 Because useless nonterminals are now kept alive (instead of being
21721 `destroyed'), we now sometimes examine them, and store information
21722 related to them. Hence we need to know their number, and adjust
21723 memory allocations.
21724
21725 * src/reduce.c, src/reduce.h (nuseless_nonterminals): No longer
21726 static.
21727 * src/LR0.c (allocate_itemsets): The memory allocated to
21728 `symbol_count' was used for two different purpose: once to count
21729 the number of occurrences of each symbol, and later reassigned to
21730 `shift_symbol', containing the symbol that can be shifted from a
21731 given state.
21732 Deobfuscate, i.e., allocate, use and free `symbol_count' here
21733 only, and...
21734 (new_itemsets): Allocate `shift_symbol' here.
21735 (allocate_itemsets): symbol_count includes useless nonterminals.
21736 Make room for them.
21737 (free_storage): Use `free', not `XFREE', for pointers that cannot
21738 be null.
21739
21740 2001-12-05 Akim Demaille <akim@epita.fr>
21741
21742 * src/nullable.c (set_nullable): Deobfuscate the handling of
21743 ritem.
21744 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
21745
21746 2001-12-05 Akim Demaille <akim@epita.fr>
21747
21748 * src/gram.c, src/gram.h (ritem_print): New.
21749 * src/gram.c (dummy): Remove, now there is actual code in gram.c.
21750 (This useless function was defined only to work around VMS linkers
21751 that can't handle compilation units with variables only).
21752 * src/reduce.c (dump_grammar): Use it to trace the construction of
21753 ritem.
21754
21755 2001-12-04 Paul Eggert <eggert@twinsun.com>
21756
21757 * src/bison.simple (union yyalloc): Change member names
21758 to be the same as the stack names.
21759 (yyparse): yyptr is now union yyalloc *, not char *.
21760 (YYSTACK_RELOCATE): Likewise. This avoids a GCC warning,
21761 and may generate better code on some machines.
21762 (yystpcpy): Use prototype if __STDC__ is defined, not just
21763 if __cplusplus is defined.
21764
21765 2001-11-30 Akim Demaille <akim@epita.fr>
21766
21767 * configure.in (WARNING_CFLAGS): Add -Werror when possible.
21768 (CFLAGS): Do not include the WARNING_CFLAGS here, since GNU
21769 Gettext doesn't compile cleanly, and dies with -Werror.
21770 * src/Makefile.am, lib/Makefile.am, tests/atlocal.in (CFLAGS):
21771 Include WARNING_CFLAGS here.
21772 * lib/xstrdup.c: Include xalloc.h, so that xstrdup be declared
21773 before being defined.
21774
21775 2001-11-27 Paul Eggert <eggert@twinsun.com>
21776
21777 * lib/quotearg.h (quotearg_n, quotearg_n_style):
21778 First arg is int, not unsigned.
21779 * lib/quotearg.c (quotearg_n, quotearg_n_style): Likewise.
21780 (SIZE_MAX, UINT_MAX): New macros.
21781 (quotearg_n_options): Abort if N is negative.
21782 Avoid overflow check on hosts where size_t is 64 bits and int
21783 is 32 bits, as overflow is impossible there.
21784 Fix off-by-one typo that caused unnecessary reallocation.
21785
21786 2001-11-29 Paul Eggert <eggert@twinsun.com>
21787
21788 Name space cleanup in generated parser.
21789
21790 * doc/bison.texinfo (Bison Parser): Discuss system headers
21791 and their effect on the user name space.
21792
21793 * src/bison.simple:
21794 (YYSTACK_ALLOC, YYSTACK_FREE, union yyalloc, YYSTACK_GAP_MAX,
21795 YYSTACK_BYTES, YYSTACK_RELOCATE): Do not define unless necessary,
21796 i.e. unless ! defined (yyoverflow) || defined (YYERROR_VERBOSE).
21797
21798 (YYSIZE_T): New macro. Use it instead of size_t, to avoid infringing
21799 on user names when possible.
21800
21801 (YYSTACK_USE_ALLOCA): Do not define; just use any existing defn.
21802 Simplify test for whather <alloca.h> exists.
21803
21804 (<stdlib.h>): Include if we will use malloc, and if standard C or C++.
21805
21806 (<stdio.h>): Include if YYDEBUG.
21807
21808 (yymemcpy): Renamed from __yy_memcpy. Do not define unless
21809 ! defined (yyoverflow) && ! defined (yymemcpy).
21810
21811 (yymemcpy, yyparse): Rename local variables as needed so that
21812 they all begin with 'yy'.
21813
21814 (yystrlen, yystpcpy): New functions.
21815
21816 (YY_DECL_NON_LSP_VARIABLES): Renamed from _YY_DECL_VARIABLES.
21817 All uses changed.
21818
21819 (yyparse): size_t -> YYSIZE_T. Use yystrlen and yystpcpy
21820 instead of relying on string.h functions. Use YYSTACK_ALLOC
21821 and YYSTACK_FREE instead of malloc and free.
21822
21823 2001-11-30 Akim Demaille <akim@epita.fr>
21824
21825 * src/bison.simple (YYSTYPE, YYLTYPE): Move their definitions
21826 before their first uses.
21827 (YYBISON, YYPURE): Move to the top of the output.
21828
21829 2001-11-30 Akim Demaille <akim@epita.fr>
21830
21831 * tests/reduce.at (Useless Nonterminals): Fix.
21832
21833 2001-11-30 Akim Demaille <akim@epita.fr>
21834
21835 * src/bison.simple (YYSTACK_FREE): Use `do {;} while (0)' as empty
21836 if body instead of `;' to pacify GCC's warnings.
21837
21838 2001-11-30 Akim Demaille <akim@epita.fr>
21839
21840 Instead of mapping the LHS of unused rules to -1, keep the LHS
21841 valid, but flag the rules as invalid.
21842
21843 * src/gram.h (rule_t): `useful' is a new member.
21844 * src/print.c (print_grammar): Adjust.
21845 * src/derives.c (set_derives): Likewise.
21846 * src/reader.c (packgram, reduce_output): Likewise.
21847 * src/reduce.c (reduce_grammar_tables): Likewise.
21848 * tests/reduce.at (Underivable Rules, Useless Rules): New.
21849
21850 2001-11-30 Akim Demaille <akim@epita.fr>
21851
21852 * src/reduce.c (reduce_output): Formatting changes.
21853 * src/print.c (print_results, print_grammar): Likewise.
21854 * tests/regression.at (Rule Line Numbers)
21855 (Solved SR Conflicts, Unresolved SR Conflicts): Adjust.
21856
21857 2001-11-30 Akim Demaille <akim@epita.fr>
21858
21859 * src/reduce.c (nonterminals_reduce): Instead of throwing away
21860 useless nonterminals, move them at the end of the symbol arrays.
21861 (reduce_output): Adjust.
21862 * tests/reduce.at (Useless Nonterminals): Adjust.
21863
21864 2001-11-30 Akim Demaille <akim@epita.fr>
21865
21866 * src/reduce.c: Various comment/formatting changes.
21867 (nonterminals_reduce): New, extracted from...
21868 (reduce_grammar_tables): here.
21869 (reduce_grammar): Call nonterminals_reduce.
21870
21871 2001-11-29 Paul Eggert <eggert@twinsun.com>
21872
21873 * src/bison.simple (YYSTACK_REALLOC): Remove.
21874 (YYSTACK_ALLOC): Resurrect this macro, with its old meaning.
21875 (YYSTACK_FREE, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYSTACK_RELOCATE):
21876 New macros.
21877 (union yyalloc): New type.
21878 (__yy_memcpy): Last arg is size_t, not unsigned int, to remove
21879 an arbitrary restriction on hosts where size_t is wider than int.
21880
21881 (yyparse): Don't dump core if alloca or malloc fails; instead, report
21882 a parser stack overflow. Allocate just one block of memory for all
21883 three stacks, instead of allocating three blocks; this typically is
21884 faster and reduces fragmentation.
21885
21886 Do not limit the number of items in the stack to a value that fits
21887 in 'int', as this is an arbitrary limit on hosts with 64-bit
21888 size_t and 32-bit int.
21889
21890 2001-11-29 Marc Autret <autret_m@epita.fr>
21891
21892 * tests/calc.at [AT_DATA_CALC_Y]: Use %error-verbose instead
21893 of defining YYERROR_VERBOSE.
21894 [AT_DATA]: $4 is now out of C declarations in the prologue.
21895
21896 2001-11-28 Marc Autret <autret_m@epita.fr>
21897
21898 * src/reader.c (parse_dquoted_param): New.
21899 (parse_skel_decl): Use it.
21900 * src/lex.h: Add its prototype.
21901 * src/lex.c (literalchar): Become not static.
21902
21903 2001-11-28 Marc Autret <autret_m@epita.fr>
21904
21905 * src/output.h: And put its extern declaration here.
21906 * src/output.c (error_verbose): Define here.
21907 (prepare): Echo name modification.
21908 * src/getargs.h: Clean its extern declaration.
21909 * src/getargs.c (error_verbose_flag): Remove.
21910 (getargs): Remove case 'e'.
21911 * src/options.c (option_table): 'error-verbose' is now seen as simple
21912 percent option.
21913 Include output.h.
21914
21915 * src/reader.c (read_declarations): Remove case tok_include.
21916 (parse_include_decl): Remove.
21917 * src/lex.h (token_t): Remove tok_include.
21918 * src/options.c (option_table): 'include' is now a simple command line
21919 option.
21920
21921 2001-11-28 Marc Autret <autret_m@epita.fr>
21922
21923 * src/bison.simple: Adjust muscle names.
21924 * src/muscle_tab.c (muscle_init): Also rename the muscles.
21925 * src/output.c (prepare): s/_/-/ for the muscles names.
21926 (output_parser): When scanning for a muscle, allow '-' instead of '_'.
21927
21928 2001-11-28 Marc Autret <autret_m@epita.fr>
21929
21930 * src/bison.simple: Fix debug.
21931 [YYERROR_VERBOSE]: Re-integrate as an internal macro.
21932
21933 2001-11-28 Akim Demaille <akim@epita.fr>
21934
21935 * src/LR0.c (shifts_new): New.
21936 (save_shifts, insert_start_shift, augment_automaton): Use it.
21937
21938 2001-11-28 Akim Demaille <akim@epita.fr>
21939
21940 * src/closure.c (closure): `b' and `ruleno' denote the same value:
21941 keep ruleno only.
21942
21943 2001-11-28 Akim Demaille <akim@epita.fr>
21944
21945 * src/closure.c (closure): Instead of looping over word in array
21946 then bits in words, loop over bits in array.
21947
21948 2001-11-28 Akim Demaille <akim@epita.fr>
21949
21950 * src/closure.c (closure): No longer optimize the special case
21951 where all the bits of `ruleset[r]' are set to 0, to make the code
21952 clearer.
21953
21954 2001-11-28 Akim Demaille <akim@epita.fr>
21955
21956 * src/closure.c (closure): `r' and `c' are new variables, used to
21957 de-obfuscate accesses to RULESET and CORE.
21958
21959 2001-11-28 Akim Demaille <akim@epita.fr>
21960
21961 * src/reduce.c (reduce_print): Use ngettext.
21962 (dump_grammar): Improve the trace accuracy.
21963
21964 2001-11-28 Akim Demaille <akim@epita.fr>
21965
21966 * src/reduce.c (dump_grammar): Don't translate trace messages.
21967
21968 2001-11-28 Akim Demaille <akim@epita.fr>
21969
21970 * tests/reduce.at (Useless Terminals, Useless Nonterminals): New.
21971 * src/reduce.c (reduce_grammar_tables): Do not free useless tags,
21972 as all tags are free'ed afterwards.
21973 From Enrico Scholz.
21974
21975 2001-11-27 Paul Eggert <eggert@twinsun.com>
21976
21977 * src/bison.simple (YYSTACK_REALLOC): Fix typo that caused us to
21978 use alloca when we didn't want to, and vice versa.
21979
21980 2001-11-27 Marc Autret <autret_m@epita.fr>
21981
21982 * src/muscle_tab.c (muscle_init): Remove 'verbose' muscle
21983 initialization.
21984 * src/output.c (prepare): Remove its update.
21985
21986 2001-11-27 Marc Autret <autret_m@epita.fr>
21987
21988 * tests/torture.at [AT_DATA]: Remove YYERROR_VERBOSE definition.
21989 Use %error-verbose.
21990
21991 2001-11-27 Marc Autret <autret_m@epita.fr>
21992
21993 * src/bison.simple: Remove YYERROR_VERBOSE using.
21994 Use %%error_verbose.
21995 (yyparse): Likewise.
21996 * src/output.c (prepare): Give its final value.
21997 * src/muscle_tab.c (muscle_init): Init new muscle 'error_verbose'.
21998 * src/getargs.h: Add its extern declaration.
21999 * src/getargs.c (error_verbose_flag): New int.
22000 (getargs): Update to catch new case.
22001 * src/options.c (option_table): 'error-verbose' is a new option.
22002 (shortopts): Update.
22003
22004 2001-11-27 Akim Demaille <akim@epita.fr>
22005
22006 * src/system.h: Use intl/libgettext.h.
22007 * src/Makefile.am (INCLUDES): Add -I $(top_srcdir).
22008
22009 2001-11-27 Akim Demaille <akim@epita.fr>
22010
22011 * tests/torture.at (Exploding the Stack Size with Malloc):
22012 s/YYSTACK_USE_ALLOCA_ALLOCA/YYSTACK_USE_ALLOCA/.
22013
22014 2001-11-27 Akim Demaille <akim@epita.fr>
22015
22016 * src/files.c: Include error.h.
22017 Reported by Hans Aberg.
22018
22019 2001-11-26 Marc Autret <autret_m@epita.fr>
22020
22021 * src/reader.c (parse_include_decl): New, not yet implemented.
22022 (read_declarations): Add case tok_include.
22023 * src/getargs.h (include): Add its extern definition.
22024 * src/getargs.c (include): New const char *.
22025 (getargs): Add case '-I'.
22026 * src/options.c (option_table): Add include as command line and
22027 percent option.
22028 * src/lex.h (token_t): Add tok_include.
22029
22030 2001-11-26 Akim Demaille <akim@epita.fr>
22031
22032 * src/reader.c (readgram): Make sure rules for mid-rule actions
22033 have a lineno equal to that of their host rule.
22034 Reported by Hans Aberg.
22035 * tests/regression.at (Rule Line Numbers): New.
22036
22037 2001-11-26 Akim Demaille <akim@epita.fr>
22038
22039 * src/LR0.c (allocate_itemsets): kernel_size contains ints, not
22040 size_ts.
22041
22042 2001-11-26 Akim Demaille <akim@epita.fr>
22043
22044 * src/complain.c, src/complain.h (error): Remove, provided by
22045 lib/error.[ch].
22046
22047 2001-11-26 Akim Demaille <akim@epita.fr>
22048
22049 * src/reader.c (read_declarations): Don't abort on tok_illegal,
22050 issue an error message.
22051 * tests/regression.at (Invalid %directive): New.
22052 Reported by Hans Aberg.
22053
22054 2001-11-26 Akim Demaille <akim@epita.fr>
22055
22056 * configure.in: Invoke AC_FUNC_OBSTACK and AC_FUNC_ERROR_AT_LINE.
22057 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
22058
22059 2001-11-26 Akim Demaille <akim@epita.fr>
22060
22061 * src/conflicts.c (conflicts_print): Don't complain at all when
22062 there are no reduce/reduce conflicts, and as many shift/reduce
22063 conflicts as expected.
22064 * tests/regression.at (%expect right): Adjust.
22065
22066 2001-11-23 Akim Demaille <akim@epita.fr>
22067
22068 * lib/alloca.c: Update, from fileutils.
22069
22070 2001-11-23 Akim Demaille <akim@epita.fr>
22071
22072 * lib/Makefile.am (libbison_a_LIBADD): Add @ALLOCA@.
22073
22074 2001-11-23 Akim Demaille <akim@epita.fr>
22075
22076 * src/system.h: Include alloca.h.
22077 * src/main.c (main) [C_ALLOCA]: Call alloca (0).
22078
22079 2001-11-23 Akim Demaille <akim@epita.fr>
22080
22081 * src/print_graph.c (print_actions): Remove `rule', unused.
22082 * src/LR0.c (kernel_size): Contain `int' instead of `size_t' to
22083 pacify GCC's signed < unsigned warnings.
22084 * src/closure.c (itemsetsize): Likewise.
22085 * src/reader.c (symbol_list_new): Static.
22086
22087 2001-11-23 Akim Demaille <akim@epita.fr>
22088
22089 Attaching lineno to buckets is stupid, since only one copy of each
22090 symbol is kept, only the line of the first occurrence is kept too.
22091
22092 * src/symtab.h, src/symtab.c (bucket): Remove the line member.
22093 * src/reader.c (rline_allocated): Remove, unused.
22094 (symbol_list): Have a `line' member.
22095 (symbol_list_new): New.
22096 (readgram): Use it.
22097 * src/print.c (print_grammar): Output the rule line numbers.
22098 * tests/regression.at (Solved SR Conflicts)
22099 (Unresolved SR Conflicts): Adjust.
22100 Reported by Hans Aberg.
22101
22102 2001-11-22 Marc Autret <autret_m@epita.fr>
22103
22104 * src/bison.simple [YYERROR_VERBOSE]: Force its value to be 1 or 0.
22105
22106 2001-11-22 Marc Autret <autret_m@epita.fr>
22107
22108 * src/muscle_tab.c (muscle_init): Remove initialization of
22109 skeleton muscle.
22110 * src/output.c (output_master_parser): Do it here.
22111
22112 2001-11-20 Akim Demaille <akim@epita.fr>
22113
22114 * po/sv.po: New.
22115 * configure.in (ALL_LINGUAS): Adjust.
22116 * po/POTFILE.in: Remove `nullable.c' and `derives.c' which no
22117 longer contains strings to translate.
22118
22119 2001-11-19 Akim Demaille <akim@epita.fr>
22120
22121 * src/conflicts.c (conflicts_print): Add a missing \n.
22122
22123 2001-11-19 Akim Demaille <akim@epita.fr>
22124
22125 * src/nullable.c (nullable_print): New.
22126 (set_nullable): Call it when tracing.
22127 Better locality of variables.
22128
22129 2001-11-19 Akim Demaille <akim@epita.fr>
22130
22131 * src/print.c (print_actions): Better locality of variables.
22132
22133 2001-11-19 Akim Demaille <akim@epita.fr>
22134
22135 * src/derives.c (print_derives): Fix and enrich.
22136 * src/closure.c (print_fderives): Likewise.
22137
22138 2001-11-19 Akim Demaille <akim@epita.fr>
22139
22140 * src/closure.c (itemsetend): Remove, replaced with...
22141 (itemsetsize): new.
22142
22143 2001-11-19 Akim Demaille <akim@epita.fr>
22144
22145 * src/LR0.c (kernel_end): Remove, replaced with...
22146 (kernel_size): new.
22147
22148 2001-11-19 Akim Demaille <akim@epita.fr>
22149
22150 * src/conflicts.c (set_conflicts): Use arrays instead of pointers
22151 to clarify.
22152
22153 2001-11-19 Akim Demaille <akim@epita.fr>
22154
22155 * src/closure.c (closure): Use arrays instead of pointers to clarify.
22156
22157 2001-11-19 Akim Demaille <akim@epita.fr>
22158
22159 * src/closure.c, src/derives.c, src/nullable.c: Adjust various
22160 trace messages.
22161 * src/LR0.c: Likewise.
22162 (allocate_itemsets): Use arrays instead of pointers to clarify.
22163
22164 2001-11-19 Akim Demaille <akim@epita.fr>
22165
22166 * src/getargs.c (statistics_flag): Replace with...
22167 (trace_flag): New.
22168 (longopts): Accept --trace instead of --statistics.
22169 * src/getargs.h, src/options.c: Adjust.
22170 * src/LR0.c, src/closure.c, src/derives.c, src/nullable.c,
22171 * src/reduce.c: Use trace_flags instead of the CPP conditional TRACE.
22172
22173 2001-11-19 Akim Demaille <akim@epita.fr>
22174
22175 * src/LR0.c (new_itemsets, get_state): Use more arrays and fewer
22176 pointers to clarify the code.
22177 (save_reductions, save_shifts): Factor common parts of alternatives.
22178
22179 2001-11-19 Akim Demaille <akim@epita.fr>
22180
22181 * src/LR0.c (new_state, get_state): Complete TRACE code.
22182 * src/closure.c: Include `reader.h' to get `tags', needed by the
22183 trace code.
22184 Rename the conditional DEBUG as TRACE.
22185 Output consistently TRACEs to stderr, not stdout.
22186 * src/derives.c: Likewise.
22187 * src/reduce.c: (inaccessable_symbols): Using if is better style
22188 than goto.
22189 Use `#if TRACE' instead of `#if 0' for tracing code.
22190
22191 2001-11-19 Akim Demaille <akim@epita.fr>
22192
22193 * src/system.h (LIST_FREE, shortcpy): New.
22194 * src/LR0.c: Use them.
22195 * src/output.c (free_itemsets, free_reductions, free_shifts):
22196 Remove, replaced by LIST_FREE.
22197
22198 2001-11-19 Akim Demaille <akim@epita.fr>
22199
22200 * src/state.h (CORE_ALLOC, SHIFTS_ALLOC, ERRS_ALLOC)
22201 (REDUCTIONS_ALLOC): New.
22202 * src/LR0.c, src/conflicts.c: Use them to de-obfuscate memory
22203 allocation.
22204
22205 2001-11-19 Akim Demaille <akim@epita.fr>
22206
22207 * src/LR0.c (new_state): Complete trace code.
22208 * src/nullable.c (set_nullable): Don't translate traces.
22209
22210 2001-11-19 Akim Demaille <akim@epita.fr>
22211
22212 * src/print_graph.c (print_core): Better locality of variables.
22213 * src/print.c (print_core): Likewise.
22214
22215 2001-11-19 Akim Demaille <akim@epita.fr>
22216
22217 * src/vcg.c: You do the output, so you are responsible of the
22218 handling of VCG syntax, in particular: use quotearg.
22219 * src/print_graph.c: Don't.
22220 (print_actions): Don't output the actions as part of the nodes,
22221 since that's the job of the edges.
22222 (print_state): Don't output by hand: fill the node description,
22223 and ask for its output.
22224
22225 2001-11-19 Akim Demaille <akim@epita.fr>
22226
22227 * src/bison.simple (yyparse): When verbosely reporting an error,
22228 no longer put additional quotes around token names.
22229 * tests/calc.at: Adjust.
22230
22231 2001-11-19 Akim Demaille <akim@epita.fr>
22232
22233 * src/symtab.h, src/symtab.c: `line' is a new member of `bucket'.
22234 * src/reader.c (record_rule_lines, rline, rline_allocated): Remove.
22235 * src/output.c: Adjust.
22236
22237 2001-11-19 Akim Demaille <akim@epita.fr>
22238
22239 * src/gram.h (rprec, rprecsym, rassoc): Remove, now part of...
22240 (rule_t): this.
22241 * src/conflicts.c, src/reader.c, src/reduce.c: Adjust.
22242
22243 2001-11-19 Akim Demaille <akim@epita.fr>
22244
22245 * src/gram.h (rule_t): New.
22246 (rule_table): New.
22247 (rrhs, rlhs): Remove, part of state_t.
22248 * src/print_graph.c, src/closure.c, src/conflicts.c, src/derives.c,
22249 * src/lalr.c, src/nullable.c, src/output.c, src/print.c,
22250 * src/reader.c, src/reduce.c: Adjust.
22251
22252 2001-11-19 Akim Demaille <akim@epita.fr>
22253
22254 * src/reader.c (symbols_output): New, extracted from...
22255 (packsymbols): Here.
22256 (reader): Call it.
22257
22258 2001-11-19 Akim Demaille <akim@epita.fr>
22259
22260 * src/lalr.c (set_maxrhs, maxrhs): Remove, replaced with...
22261 (maxrhs): this new function.
22262
22263 2001-11-19 Akim Demaille <akim@epita.fr>
22264
22265 * src/lalr.c (F): New macro to access the variable F.
22266 Adjust.
22267
22268 2001-11-19 Akim Demaille <akim@epita.fr>
22269
22270 * src/lalr.h (LA): New macro to access the variable LA.
22271 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
22272 * src/lalr.c: Adjust.
22273
22274 2001-11-19 Akim Demaille <akim@epita.fr>
22275
22276 * src/lalr.c (initialize_LA): Only initialize LA. Let...
22277 (set_state_table): handle the `lookaheads' members.
22278
22279 2001-11-19 Akim Demaille <akim@epita.fr>
22280
22281 * src/lalr.h (lookaheads): Removed array, whose contents is now
22282 a member of...
22283 (state_t): this structure.
22284 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
22285 Adjust.
22286
22287 2001-11-19 Akim Demaille <akim@epita.fr>
22288
22289 * src/lalr.h (consistent): Removed array, whose contents is now
22290 a member of...
22291 (state_t): this structure.
22292 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
22293 Adjust.
22294
22295 2001-11-19 Akim Demaille <akim@epita.fr>
22296
22297 * src/lalr.h (reduction_table, shift_table): Removed arrays, whose
22298 contents are now members of...
22299 (state_t): this structure.
22300 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
22301 Adjust.
22302
22303 2001-11-19 Akim Demaille <akim@epita.fr>
22304
22305 * src/lalr.h (state_t): New.
22306 (state_table): Be a state_t * instead of a core **.
22307 (accessing_symbol): Remove, part of state_t.
22308 * src/lalr.c: Adjust.
22309 (set_accessing_symbol): Merge into...
22310 (set_state_table): this.
22311 * src/print_graph.c, src/conflicts.c: Adjust.
22312
22313 2001-11-14 Akim Demaille <akim@epita.fr>
22314
22315 * tests/calc.at, tests/output.at, tests/regression.at,
22316 * tests/testsuite.at, tests/torture.at: Rely on Autotest 2.52g:
22317 now the tests are run in private dirs, therefore AC_CLEANUP and
22318 family can be simplified to 0-ary.
22319 * tests/atlocal.in: Now that we run `elsewhere' than in tests/,
22320 use abs. path to find config.h.
22321 * tests/calc.at (AT_CHECK_CALC): Don't try to check the compiler's
22322 stderr, there can be way too much random noise.
22323 Instead pass -Werror to GCC and rely on the exit status.
22324 Reported by Wolfram Wagner.
22325
22326 2001-11-14 Akim Demaille <akim@epita.fr>
22327
22328 * src/bison.simple (yyparse): Let yyls1, yyss1 and yyvs1 be
22329 defined only if yyoverflow is defined, to avoid `warning: unused
22330 variable `yyvs1''.
22331 Reported by The Test Suite.
22332
22333 2001-11-14 Akim Demaille <akim@epita.fr>
22334
22335 * src/print.c: Include reduce.h.
22336 Reported by Hans Aberg.
22337
22338 2001-11-14 Akim Demaille <akim@epita.fr>
22339
22340 * src/lex.c, src/lex.h (token_buffer, unlexed_token_buffer):
22341 Revert a previous patch: these are really const.
22342 * src/conflicts.c (conflict_report): Additional useless pair of
22343 braces to pacify GCC's warnings for `if () if () {} else {}'.
22344 * src/lex.c (parse_percent_token): Replace equal_offset with
22345 arg_offset.
22346 arg is const.
22347 Be sure to strdup `arg' when used, since there is no reason for
22348 token_buffer not to change.
22349
22350 2001-11-14 Akim Demaille <akim@epita.fr>
22351
22352 * src/system.h (EXIT_SUCCESS, EXIT_FAILURE): Ensure a proper
22353 definition.
22354 * src/main.c (main): Use them.
22355 Suggested by Hans Aberg.
22356
22357 2001-11-12 Akim Demaille <akim@epita.fr>
22358
22359 * src/system.h (ngettext): Now that we use ngettext, be sure to
22360 provide a default definition when NLS are not used.
22361
22362 2001-11-12 Akim Demaille <akim@epita.fr>
22363
22364 * doc/bison.texinfo: Use `$' as shell prompt, not `%'.
22365 Use @kbd to denote user input.
22366 (Language and Grammar): ANSIfy the example.
22367 Adjust its layout for info/notinfo.
22368 (Location Tracking Calc): Output error messages to stderr.
22369 Output locations in a more GNUtically correct way.
22370 Fix a couple of Englishos.
22371 Adjust @group/@end group pairs.
22372
22373 2001-11-12 Akim Demaille <akim@epita.fr>
22374
22375 %expect was not functioning at all.
22376
22377 * src/conflicts.c (expected_conflicts): Set to -1.
22378 (conflict_report): Use ngettext.
22379 (conflicts_print): Check %expect and make its violation an error.
22380 * doc/bison.texinfo (Expect Decl): Adjust.
22381 * configure.in (AM_GNU_GETTEXT): Ask for ngettext.
22382 * tests/regression.at (%expect not enough, %expect right)
22383 (%expect too much): New.
22384
22385 2001-11-12 Akim Demaille <akim@epita.fr>
22386
22387 * tests/regression.at (Conflicts): Rename as...
22388 (Unresolved SR Conflicts): this.
22389 (Solved SR Conflicts): New.
22390
22391 2001-11-12 Akim Demaille <akim@epita.fr>
22392
22393 * src/reduce.c (print_results): Rename as...
22394 (reduce_output): This.
22395 Output to OUT, passed as argument, instead of output_obstack.
22396 (dump_grammar): Likewise.
22397 (reduce_free): New.
22398 Also free V1.
22399 (reduce_grammar): No longer call reduce_output, since...
22400 * src/print.c (print_results): do it.
22401 * src/main.c (main): Call reduce_free;
22402
22403 2001-11-12 Akim Demaille <akim@epita.fr>
22404
22405 * src/conflicts.c (print_reductions): Accept OUT as argument.
22406 Output to it, not to output_obstack.
22407 * src/print.c (print_actions): Adjust.
22408
22409 2001-11-12 Akim Demaille <akim@epita.fr>
22410
22411 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts): Return
22412 the result instead of using...
22413 (src_total, rrc_total, src_count, rrc_count): Remove.
22414 (any_conflicts): Remove.
22415 (print_conflicts): Split into...
22416 (conflicts_print, conflicts_output): New.
22417 * src/conflicts.h: Adjust.
22418 * src/main.c (main): Invoke both conflicts_output and conflicts_print.
22419 * src/print.c (print_grammar): Issue `\n' between two rules.
22420 * tests/regression.at (Conflicts): New.
22421 Reported by Tom Lane.
22422
22423 2001-11-12 Akim Demaille <akim@epita.fr>
22424
22425 * tests/regression.at (Invalid input): Remove, duplicate with
22426 ``Invalid input: 1''.
22427
22428 2001-11-12 Akim Demaille <akim@epita.fr>
22429
22430 * tests/torture.at (AT_DATA_STACK_TORTURE)
22431 (Exploding the Stack Size with Alloca)
22432 (Exploding the Stack Size with Malloc): New.
22433
22434 2001-11-12 Akim Demaille <akim@epita.fr>
22435
22436 * src/bison.simple (YYSTACK_REALLOC): New.
22437 (yyparse) [!yyoverflow]: Use it and free the old stack.
22438 Reported by Per Allansson.
22439
22440 2001-11-12 Pascal Bart <pascal.bart@epita.fr>
22441
22442 * src/bison.simple: Define type yystype instead of YYSTYPE, and
22443 define CPP macro, which substitute YYSTYPE by yystype.
22444 * src/reader.c (parse_union_decl): Output yystype/YYSTYPE as we do
22445 with yyltype/YYLTYPE. This allows inclusion of the generated
22446 header within the parser if the compiler, such as GGC, accepts
22447 multiple equivalent #defines.
22448 From Akim.
22449
22450 2001-11-05 Akim Demaille <akim@epita.fr>
22451
22452 * src/reader.c (symbols_output): New, extracted from...
22453 (packsymbols): here.
22454 (reader): Adjust.
22455
22456 2001-11-05 Akim Demaille <akim@epita.fr>
22457
22458 * src/lex.c (parse_percent_token): s/quotearg/quote/.
22459
22460 2001-11-05 Akim Demaille <akim@epita.fr>
22461
22462 * tests/regression.at (AT_TEST_CPP_GUARD_H): Adjust the clean up
22463 pattern.
22464
22465 2001-11-05 Akim Demaille <akim@epita.fr>
22466
22467 * src/options.h (struct option_table_struct): set_flags is void*.
22468 * src/options.c (longopts): Support `--output' and `%output'.
22469 (usage): Adjust.
22470 * src/lex.h (tok_setopt): Remove, replaced with...
22471 (tok_intopt, tok_stropt): these new guys.
22472 * src/lex.c (getopt.h): Not needed.
22473 (token_buffer, unlexed_token_buffer): Not const.
22474 (percent_table): Promote `-' over `_' in directive names.
22475 Active `%name-prefix', `file-prefix', and `output'.
22476 (parse_percent_token): Accept possible arguments to directives.
22477 Promote `-' over `_' in directive names.
22478
22479 2001-11-04 Akim Demaille <akim@epita.fr>
22480
22481 * doc/bison.texinfo (Decl Summary): Split the list into
22482 `directives for grammars' and `directives for bison'.
22483 Sort'em.
22484 Add description of `%name-prefix', `file-prefix', and `output'.
22485 Promote `-' over `_' in directive names.
22486 (Bison Options): s/%locactions/%locations/. Nice Freudian slip.
22487 Simplify the description of `--name-prefix'.
22488 Promote `-' over `_' in directive names.
22489 Promote `--output' over `--output-file'.
22490 Fix the description of `--defines'.
22491 * tests/output.at: Exercise %file-prefix and %output.
22492
22493 2001-11-02 Akim Demaille <akim@epita.fr>
22494
22495 * doc/refcard.tex: Update.
22496
22497 2001-11-02 Akim Demaille <akim@epita.fr>
22498
22499 * src/symtab.h (SUNDEF): New.
22500 * src/symtab.c (bucket_new): Init user_token_number to SUNDEF to
22501 stand for `uninitialized', instead of 0.
22502 * src/reader.c (packsymbols, parse_thong_decl): Adjust.
22503 * src/lex.c (lex): Adjust.
22504
22505 * tests/calc.at (_AT_DATA_CALC_Y): Declare a token for EOF.
22506 Number it 0.
22507 Let yylex return it instead of a plain 0.
22508 Reported by Dick Streefland.
22509
22510 2001-11-02 Akim Demaille <akim@epita.fr>
22511
22512 * tests/regression.at (Mixing %token styles): New test.
22513
22514 2001-11-02 Akim Demaille <akim@epita.fr>
22515
22516 * src/reader.c (parse_thong_decl): Formatting changes.
22517 (token_translations_init): New, extracted from...
22518 (packsymbols): Here.
22519 Adjust.
22520
22521 2001-11-01 Akim Demaille <akim@epita.fr>
22522
22523 * tests/regression.at (AT_TEST_CPP_GUARD_H): New.
22524 Check that `9foo.y' produces correct cpp guards.
22525 * src/files.c (compute_header_macro): Prepend `BISON_' to CPP
22526 guards.
22527 Reported by Wwp.
22528
22529 2001-11-01 Akim Demaille <akim@epita.fr>
22530
22531 * tests/regression.at (Invalid input: 2): New.
22532 * src/lex.c (unlexed_token_buffer): New.
22533 (lex, unlex): Adjust: when unlexing, be sure to save token_buffer
22534 too.
22535 Reported by Wwp.
22536
22537 2001-11-01 Akim Demaille <akim@epita.fr>
22538
22539 * tests/calc.at: Catch up with 1.30.
22540 * configure.in: Bump to 1.49a.
22541 Adjust to newer Autotest.
22542
22543 2001-10-19 Pascal Bart <pascal.bart@epita.fr>
22544
22545 * src/conflicts.c: Move global variables rrc_total and src_total ...
22546 (print_conflicts): here.
22547 * src/output.c (output): Free global variable user_toknums.
22548 * src/lex.c (token_obstack): Become static.
22549
22550 2001-10-18 Akim Demaille <akim@epita.fr>
22551
22552 * tests/atlocal.in (GCC): Add.
22553 * tests/calc.at: s/m4_match/m4_bmatch/.
22554 s/m4_patsubst/m4_bpatsubst/.
22555 (AT_CHECK_CALC): Check the compiler's stderr only if it's GCC.
22556 * configure.in: AC_SUBST(GCC).
22557
22558 2001-10-14 Marc Autret <autret_m@epita.fr>
22559
22560 * src/options.c (create_long_option_table): Fix.
22561
22562 2001-10-10 Akim Demaille <akim@epita.fr>
22563
22564 * src/bison.simple: Be sure to set YYSTACK_USE_ALLOCA.
22565
22566 2001-10-04 Akim Demaille <akim@epita.fr>
22567
22568 * src/reader.c (parse_union_decl): Push the caracters in
22569 union_obstack, not attrs_obstack.
22570
22571 2001-10-04 Akim Demaille <akim@epita.fr>
22572
22573 Merge in the branch 1.29.
22574
22575 * src/reader.c (packsymbols): Use a temporary obstack for
22576 `%%tokendef', since output_stack is already used elsewhere.
22577
22578 2001-10-02 Akim Demaille <akim@epita.fr>
22579
22580 Bump 1.29d.
22581
22582 2001-10-02 Akim Demaille <akim@epita.fr>
22583
22584 Version 1.29c.
22585
22586 2001-10-02 Akim Demaille <akim@epita.fr>
22587
22588 * tests/regression.at (Invalid CPP headers): New.
22589 From Alexander Belopolsky.
22590 * src/files.c (compute_header_macro): Map non alnum chars to `_'.
22591
22592 2001-10-02 Akim Demaille <akim@epita.fr>
22593
22594 * tests/regression.at (Invalid input): New.
22595 * src/lex.c (lex): Be sure to set `token_buffer' in any case.
22596 Reported by Shura.
22597
22598 2001-10-02 Akim Demaille <akim@epita.fr>
22599
22600 * tests/calc.at: Now that --debug works, the tests must be adjusted.
22601
22602 2001-10-02 Akim Demaille <akim@epita.fr>
22603
22604 * src/output.c (output_parser): Assert `skeleton'.
22605 * src/files.c (skeleton_find): Look harder for skeletons on DOSish
22606 systems.
22607 From Shura.
22608
22609 2001-10-01 Marc Autret <autret_m@epita.fr>
22610
22611 * src/lex.h: Echo modifications.
22612 * src/lex.c (unlex): Parameter is now token_t.
22613 From Hans Aberg.
22614
22615 2001-10-01 Marc Autret <autret_m@epita.fr>
22616
22617 * src/main.c: Include lex.h.
22618 From Hans Aberg.
22619
22620 2001-09-29 Akim Demaille <akim@epita.fr>
22621
22622 * src/getargs.c (longopts): `--debug' is `-t', not `-d'.
22623
22624 2001-09-28 Akim Demaille <akim@epita.fr>
22625
22626 * tests/testsuite.at: Update to newer Autotest.
22627 * tests/Makefile.am (EXTRA_DIST): bison is not to be shipped.
22628
22629 2001-09-27 Akim Demaille <akim@epita.fr>
22630
22631 Position independent wrapper.
22632
22633 * tests/bison: Remove.
22634 * tests/bison.in: New.
22635 * configure.in: Adjust.
22636
22637 2001-09-27 Paul Eggert <eggert@twinsun.com>
22638
22639 Port quotearg fixes from tar 1.13.24.
22640
22641 * lib/quotearg.c: BSD/OS 4.1 wchar.h requires FILE and struct
22642 tm to be declared.
22643 (HAVE_MBSINIT): Undef if !HAVE_MBRTOWC.
22644 (mbsinit): Define to 1 if !defined mbsinit && !HAVE_MBSINIT.
22645
22646 * m4/Makefile.am (EXTRA_DIST): Add mbrtowc.m4.
22647 * m4/mbrtowc.m4: New file.
22648 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Check for mbsinit and stddef.h.
22649 Use jm_FUNC_MBRTOWC instead of AC_CHECK_FUNCS(mbrtowc).
22650
22651 2001-09-27 Akim Demaille <akim@epita.fr>
22652
22653 Bump to 1.29c.
22654
22655 2001-09-27 Akim Demaille <akim@epita.fr>
22656
22657 Version 1.29b.
22658
22659 2001-09-25 Akim Demaille <akim@epita.fr>
22660
22661 * src/system.h: Include `xalloc.h'.
22662 Remove it from the C files.
22663 * src/files.c (output_files): Free the obstacks.
22664 * src/lex.c (init_lex): Rename as...
22665 (lex_init): this.
22666 (lex_free): New.
22667 * src/main.c (main): Use it.
22668
22669 2001-09-24 Marc Autret <autret_m@epita.fr>
22670
22671 * src/vcg.c (open_edge, close_edge, open_node, close_node): Change
22672 to output informations in fout (FILE*).
22673 (open_graph, close_graph): Likewise.
22674 (output_graph, output_edge, output_node): Likewise.
22675 * src/vcg.h: Update function prototypes.
22676 * src/print_graph.c (print_graph): Open output graph file.
22677 (print_actions): Adjust.
22678 * src/files.h: Remove extern declaration.
22679 * src/files.c: Remove graph_obstack declaration.
22680 (open_files): Remove graph_obstack initialization.
22681 (output_files): Remove graph_obstack saving.
22682
22683 2001-09-24 Marc Autret <autret_m@epita.fr>
22684
22685 * src/files.c (compute_output_file_names): Fix.
22686
22687 2001-09-24 Marc Autret <autret_m@epita.fr>,
22688 Akim Demaille <akim@epita.fr>
22689
22690 * src/reader.c (reader): Remove call to free_symtab ().
22691 * src/main.c (main): Call it here.
22692 Include symtab.h.
22693 * src/conflicts.c (initialize_conflicts): Rename as...
22694 (solve_conflicts): this.
22695 * src/print.c (print_core, print_actions, print_state)
22696 (print_grammar): Dump to a file instead a `output_obstack'.
22697 (print_results): Dump `output_obstack', and then proceed with the
22698 FILE *.
22699 * src/files.c (compute_output_file_names, close_files): New.
22700 (output_files): Adjust.
22701 * src/main.c (main): Adjust.
22702
22703 2001-09-23 Marc Autret <autret_m@epita.fr>
22704
22705 * src/files.c (compute_header_macro): Computes header macro name
22706 from spec_defines_file when given.
22707
22708 2001-09-23 Marc Autret <autret_m@epita.fr>
22709
22710 * src/files.c (output_files): Add default extensions.
22711
22712 2001-09-22 Akim Demaille <akim@epita.fr>
22713
22714 * src/conflicts.c (finalize_conflicts): Rename as...
22715 (free_conflicts): this.
22716
22717 2001-09-22 Akim Demaille <akim@epita.fr>
22718
22719 * src/gram.c (gram_free): Rename back as...
22720 (dummy): this.
22721 (output_token_translations): Free `token_translations'.
22722 * src/symtab.c (free_symtab): Free the tag field.
22723
22724 2001-09-22 Akim Demaille <akim@epita.fr>
22725
22726 Remove `translations' as it is always set to true.
22727
22728 * src/gram.h: Adjust.
22729 * src/reader.c (packsymbols, parse_token_decl): Adjust
22730 * src/print.c (print_grammar): Adjust.
22731 * src/output.c (output_token_translations): Adjust.
22732 * src/lex.c (lex): Adjust.
22733 * src/gram.c: Be sure the set pointers to NULL.
22734 (dummy): Rename as...
22735 (gram_free): this.
22736
22737 2001-09-22 Akim Demaille <akim@epita.fr>
22738
22739 * configure.in: Invoke AM_LIB_DMALLOC.
22740 * src/system.h: Use dmalloc.
22741 * src/LR0.c: Be sure to have pointers initialized to NULL.
22742 (allocate_itemsets): Allocate kernel_items only if needed.
22743
22744 2001-09-22 Akim Demaille <akim@epita.fr>
22745
22746 * configure.in: Bump to 1.29b.
22747 * tests/Makefile.am (DISTCLEANFILES): Add package.m4.
22748 * tests/calc.at (_AT_DATA_CALC_Y): #undef malloc so that we don't
22749 need xmalloc.c in calc.y.
22750 From Pascal Bart.
22751
22752 2001-09-21 Akim Demaille <akim@epita.fr>
22753
22754 Version 1.29a.
22755 * Makefile.maint, config/config.guess, config/config.sub,
22756 * config/missing: Update from masters.
22757 * tests/Makefile.am ($(srcdir)/$(TESTSUITE)): No longer depend
22758 upon package.m4.
22759 * configure.in (ALL_LINGUAS): Add `tr'.
22760
22761 2001-09-21 Akim Demaille <akim@epita.fr>
22762
22763 * tests/Makefile.am (package.m4): Move to...
22764 ($(srcdir)/$(TESTSUITE)): here.
22765
22766 2001-09-20 Akim Demaille <akim@epita.fr>
22767
22768 * src/complain.c: No longer try to be standalone: use system.h.
22769 Don't assume __STDC__ is defined to 1. Just test if it is defined.
22770 * src/complain.h: Likewise.
22771 * src/reduce.c (useless_nonterminals, inaccessable_symbols):
22772 Remove the unused variable `n'.
22773 From Albert Chin-A-Young.
22774
22775 2001-09-18 Marc Autret <autret_m@epita.fr>
22776
22777 * doc/bison.1: Update.
22778 * doc/bison.texinfo (Bison Options): Update --defines and --graph
22779 descriptions.
22780 (Option Cross Key): Update.
22781 Add --graph.
22782
22783 2001-09-18 Marc Autret <autret_m@epita.fr>
22784
22785 * tests/regression.at: New test (comment in %union).
22786
22787 2001-09-18 Marc Autret <autret_m@epita.fr>
22788
22789 * src/reader.c (parse_union_decl): Do not output '/'. Let copy_comment
22790 do that.
22791 Reported by Keith Browne.
22792
22793 2001-09-18 Marc Autret <autret_m@epita.fr>
22794
22795 * tests/output.at: Add tests for --defines and --graph.
22796
22797 2001-09-18 Marc Autret <autret_m@epita.fr>
22798
22799 * tests/output.at: Removes tests of %{header,src}_extension features.
22800
22801 2001-09-18 Akim Demaille <akim@epita.fr>
22802
22803 * tests/Makefile.am (package.m4): New.
22804 * tests/calc.at (_AT_CHECK_CALC): Just run `calc input'.
22805 (_AT_CHECK_CALC_ERROR): Likewise.
22806 Factor the `, ' part of verbose error messages.
22807
22808 2001-09-18 Marc Autret <autret_m@epita.fr>
22809
22810 * src/getargs.c (longopts): Declare --defines and --graph as options
22811 with optional arguments.
22812 * src/files.h: Add extern declarations.
22813 * src/files.c (spec_graph_file, spec_defines_file): New.
22814 (output_files): Update.
22815 Remove CPP-outed code.
22816
22817 2001-09-18 Marc Autret <autret_m@epita.fr>
22818
22819 Turn off %{source,header}_extension feature.
22820
22821 * src/files.c (compute_exts_from_gf): Update.
22822 (compute_exts_from_src): Update.
22823 (output_files): CPP-out useless code.
22824 * src/files.h: Remove {header,source}_extension extern declarations.
22825 * src/reader.c (parse_dquoted_param): CPP-out.
22826 (parse_header_extension_decl): Remove.
22827 (parse_source_extension_decl): Remove.
22828 (read_declarations): Remove cases tok_{hdrext,srcext}.
22829 * src/lex.c (percent_table): Remove {header,source}_extension entries.
22830 * src/lex.h (token_t): Remove tok_hdrext and tok_srcext.
22831
22832 2001-09-10 Akim Demaille <akim@epita.fr>
22833
22834 * tests/output.at (AT_CHECK_BISON_FLAGS, AT_CHECK_BISON_PERCENT):
22835 (AT_CHECK_BISON_PERCENT_FLAGS): Merge into...
22836 (AT_CHECK_OUTPUT): this.
22837 Merely check ls' exit status, its output is useless.
22838
22839 2001-09-10 Akim Demaille <akim@epita.fr>
22840
22841 * tests/calc.at: Use m4_match.
22842 (_AT_DATA_CALC_Y): Check `yyin != NULL', not `stdin != NULL'.
22843
22844 2001-09-10 Marc Autret <autret_m@epita.fr>,
22845 Akim Demaille <akim@epita.fr>
22846
22847 * src/vcg.h (graph_s): color, textcolor, bordercolor are now
22848 enum color_e.
22849 * src/print_graph.c (print_graph): Initalize graph.layoutalgorithm
22850 to `normal'.
22851 * src/reader.c (parse_token_decl): Initialize token with tok_eof.
22852 * src/lex.h: Adjust prototype.
22853 (token_t): Add `tok_undef'.
22854 * src/lex.c (struct percent_table_struct): Retval is now a token_t.
22855 (parse_percent_token): Now returns token_t.
22856 Add default statement in switch.
22857 (lex): Separate `c' as an input variable, from the token_t result
22858 part.
22859 (unlexed): Is a token_t.
22860
22861 2001-09-10 Akim Demaille <akim@epita.fr>
22862
22863 * configure.in: Bump to 1.29a.
22864
22865 2001-09-07 Akim Demaille <akim@epita.fr>
22866
22867 Version 1.29.
22868
22869 2001-08-30 Akim Demaille <akim@epita.fr>
22870
22871 * tests/atgeneral.m4, tests/atconfig.in, tests/suite.at: Remove.
22872 * m4/atconfig.m4: Remove.
22873 * tests/testsuite.at, tests/atlocal.in, tests/output.at,
22874 * tests/bison: New.
22875 * tests/regression.at, tests/calc.at: Use m4_define, AT_BANNER,
22876 m4_if, m4_patsubst, and m4_regexp.
22877 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Use an
22878 `input' file instead of echo.
22879
22880 2001-08-29 Akim Demaille <akim@epita.fr>
22881
22882 Bump to 1.28e.
22883
22884 2001-08-29 Akim Demaille <akim@epita.fr>
22885
22886 Version 1.28d.
22887
22888 2001-08-29 Paul Eggert <eggert@twinsun.com>
22889
22890 * src/bison.simple (yyparse): Don't take the address of an
22891 item before the start of an array, as that doesn't conform to
22892 the C Standard.
22893
22894 2001-08-29 Robert Anisko <anisko_r@epita.fr>
22895
22896 * doc/bison.texinfo (Location Tracking Calc): New node.
22897
22898 2001-08-29 Paul Eggert <eggert@twinsun.com>
22899
22900 * src/output.c (output): Do not define const, as this now
22901 causes more problems than it cures.
22902
22903 2001-08-29 Akim Demaille <akim@epita.fr>
22904
22905 * doc/bison.texinfo: Modernize `@node' and `@top' use: just name
22906 the nodes.
22907 Be sure to tag the `detailmenu'.
22908
22909 2001-08-29 Akim Demaille <akim@epita.fr>
22910
22911 * Makefile.maint (do-po-update): Wget refuses to overwrite files:
22912 download in a tmp dir.
22913
22914 2001-08-28 Marc Autret <autret_m@epita.fr>
22915
22916 * config/depcomp: New file.
22917
22918 2001-08-28 Marc Autret <autret_m@epita.fr>
22919
22920 * doc/bison.1 (mandoc): Adjust.
22921 From Juan Manuel Guerrero.
22922
22923 2001-08-28 Marc Autret <autret_m@epita.fr>
22924
22925 * src/print_graph.c (print_state): Fix.
22926
22927 2001-08-27 Marc Autret <autret_m@epita.fr>
22928
22929 * src/vcg.h (classname_s, infoname_s, node_s): Constify the
22930 char * members.
22931 Echo modifications to the functions prototypes.
22932 * src/vcg.c (add_classname, add_infoname): Adjust arguments.
22933
22934 2001-08-27 Marc Autret <autret_m@epita.fr>
22935
22936 * src/vcg.c: Include `xalloc.h'.
22937 (add_colorentry): New.
22938 (add_classname): New.
22939 (add_infoname): New.
22940 * src/vcg.h: Add new prototypes.
22941
22942 2001-08-27 Akim Demaille <akim@epita.fr>
22943
22944 * Makefile.maint: Sync. again with CVS Autoconf.
22945
22946 2001-08-27 Akim Demaille <akim@epita.fr>
22947
22948 * Makefile.maint: Formatting changes.
22949 (po-update, cvs-update, update): New targets.
22950 (AMTAR): Remove.
22951
22952 2001-08-27 Akim Demaille <akim@epita.fr>
22953
22954 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
22955 * Makefile.maint: Sync. with CVS Autoconf.
22956
22957 2001-08-27 Marc Autret <autret_m@epita.fr>
22958
22959 * src/vcg.h (struct infoname_s): New.
22960 (struct colorentry_s): New.
22961 (graph_s): New fields {vertical,horizontal}_order in structure.
22962 Add `infoname' field.
22963 Add `colorentry' field;
22964 * src/vcg_defaults.h (G_VERTICAL_ORDER): New.
22965 (G_HORIZONTAL_ORDER): New.
22966 (G_INFONAME): New.
22967 (G_COLORENTRY): New.
22968 * src/vcg.c (output_graph): Add output of {vertical,horizontal}_order.
22969 Add output of `infoname'.
22970 Add output of `colorentry'.
22971
22972 2001-08-27 Marc Autret <autret_m@epita.fr>
22973
22974 * src/reader.c (parse_dquoted_param): Rename variable `index' to `i'.
22975 This one shadowed a global parameter.
22976
22977 2001-08-24 Marc Autret <autret_m@epita.fr>
22978
22979 * src/print_graph.c (node_output_size): Declared POSIX `size_t' type,
22980 instead of `unsigned'.
22981 (print_state): Do not call obstack_object_size () in obstack_grow ()
22982 to avoid macro variables shadowing.
22983
22984 2001-08-23 Marc Autret <autret_m@epita.fr>
22985
22986 * src/lex.c (percent_table): Typo: s/naem/name/.
22987 Add graph option.
22988 Normalize new options declarations.
22989
22990 2001-08-20 Pascal Bart <pascal.bart@epita.fr>
22991
22992 * tests/suite.at: Exercise %header_extension and %source_extension.
22993
22994 2001-08-16 Marc Autret <autret_m@epita.fr>
22995
22996 * src/reader.c (parse_dquoted_param): New.
22997 (parse_header_extension_decl): Use it.
22998 (parse_source_extension_decl): Likewise.
22999
23000 2001-08-16 Marc Autret <autret_m@epita.fr>
23001
23002 * src/vcg.c: Remove includes of `complain.h' and `xalloc.h'.
23003 (get_xxxx_str): Use assert () instead of complain ().
23004 Remove return invokations in default cases.
23005 (get_decision_str): Modify default behaviour. Remove second argument.
23006 Echo modifications on calls.
23007 (output_graph): Fix.
23008
23009 2001-08-16 Marc Autret <autret_m@epita.fr>
23010
23011 * src/getargs.c (usage): Update with ``-g, --graph''.
23012
23013 2001-08-16 Marc Autret <autret_m@epita.fr>
23014
23015 * doc/bison.texinfo (Bison Options): Add items `-g', `--graph'.
23016 (Option Cross Key): Likewise.
23017 * doc/bison.1: Update.
23018
23019 2001-09-25 Pascal Bart <pascal.bart@epita.fr>
23020
23021 * src/output.c (output_master_parser): Don't finish action_obstack.
23022 (output_parser): Don't care about the muscle action, here.
23023 (prepare): Copy the action_obstack in the action muscle.
23024 (output): Free action_obstack.
23025
23026 2001-09-23 Pascal Bart <pascal.bart@epita.fr>
23027
23028 * src/reader.c (parse_union_decl): Add new obstack union_obstack. Which
23029 will contain `%union' declaration.
23030 (parse_union_decl): Delete #line directive output.
23031 (parse_union_decl): Substitute /attrs_obstack/union_obstack for all
23032 informations about %union.
23033 (parse_union_decl): Copy the union_obstack in the muscle stype.
23034 * src/bison.simple: Add new #line directive.
23035 Add typdef %%stype YYSTYPE.
23036
23037 2001-09-23 Pascal Bart <pascal.bart@epita.fr>
23038
23039 * src/bison.simple: Add new `#line' directive.
23040
23041 2001-09-22 Pascal Bart <pascal.bart@epita.fr>
23042
23043 * src/bison.simple: New `#line' directive.
23044 * src/output.c (output_parser): Support new dynamic muscle input_line.
23045
23046 2001-09-22 Marc Autret <autret_m@epita.fr>
23047
23048 * src/output.c (output_master_parser): New.
23049 (output_parser): Be more re-entrant.
23050
23051 2001-09-21 Marc Autret <autret_m@epita.fr>
23052
23053 * src/reader.c (copy_definition, parse_union_decl): Update and use
23054 `linef' muscle.
23055 (copy_action): Likewise.
23056 Use obstack_1grow ().
23057 * src/muscle_tab.c (muscle_init): Add muscle `linef'.
23058
23059 2001-09-21 Marc Autret <autret_m@epita.fr>
23060
23061 * src/options.c (option_table): Adjust.
23062 * src/lex.c (parse_percent_token): Fix.
23063
23064 2001-09-20 Pascal Bart <pascal.bart@epita.fr>
23065
23066 * src/options.c (symtab.h): Include it, need by lex.h.
23067
23068 2001-09-20 Pascal Bart <pascal.bart@epita.fr>
23069
23070 * src/lex.c (parse_percent_token): Change type of variable `tx', which
23071 is now an option_table_struct*.
23072 (option_strcmp): New function option_strcmp.
23073 (parse_percent_token): Call option_strcmp.
23074 * src/getargs.c (xalloc.h, options.h): Include it.
23075 (getargs): Call create_long_option_table.
23076 (getargs): Free longopts at the end of the function.
23077 (shortopts): Move in options.c.
23078 * src/options.c (create_long_option_table): New function. Convert
23079 information from option_table to option structure.
23080 * src/reader.c (options.h): Include it.
23081
23082 * src/Makefile.am: Adjust.
23083 * src/options.c (option_table): Create from longopts and percent_table.
23084 * src/getargs.c (longopts): Delete.
23085 * src/lex.c (struct percent_table_struct): Delete.
23086 (percent_table): Delete.
23087 (options.h): Include it.
23088 * src/options.c: Create.
23089 * src/options.h: Create.
23090 Declare enum opt_access_e.
23091 Define struct option_table_struct.
23092
23093 2001-09-20 Marc Autret <autret_m@epita.fr>
23094
23095 * doc/bison.texinfo: Adjust terminologies about prologue and epilogue
23096 sections of Bison.
23097
23098 2001-09-19 Pascal Bart <pascal.bart@epita.fr>
23099
23100 * src/bison.simple: s/%%filename/%%skeleton.
23101 * src/muscle_tab.c (getargs.h): Include it.
23102 (muscle_init): Insert new muscle skeleton.
23103
23104 2001-09-18 Pascal Bart <pascal.bart@epita.fr>
23105
23106 * src/output.c (output_parser): Delete unused variable actions_dumped.
23107
23108 2001-09-07 Pascal Bart <pascal.bart@epita.fr>
23109
23110 * src/output.c (output): Delete call to reader_output_yylsp.
23111 * src/reader.c (reader): Likewise.
23112 * src/reader.h: Delete declaration of reader_output_yylsp.
23113
23114 2001-09-02 Marc Autret <autret_m@epita.fr>
23115
23116 * src/reader.c: Include muscle_tab.h.
23117 (parse_union_decl): Update.
23118 (parse_macro_decl): Rename parse_muscle_decl.
23119 Update to use renamed functions and variable.
23120 (read_declarations, copy_action, read_additionnal_code, : Updated
23121 with correct variables and functions names.
23122 (packsymbols, reader): Likewise.
23123
23124 * src/reader.h (muscle_obstack): Extern declaration update.
23125
23126 * src/output.c: Include muscle_tab.h
23127 In all functions using macro_insert, change by using muscle_insert ().
23128 (macro_obstack): Rename muscle_obstack.
23129 Echo modifications in the whole file.
23130 (MACRO_INSERT_INT): Rename MUSCLE_INSERT_INT.
23131 (MACRO_INSERT_STRING): Rename MUSCLE_INSERT_STRING.
23132 (MACRO_INSERT_PREFIX): Rename MUSCLE_INSERT_PREFIX.
23133
23134 * src/muscle_tab.h: Update double inclusion macros.
23135 (macro_entry_s): Rename muscle_entry_s.
23136 Update prototypes.
23137
23138 * src/muscle_tab.c: Include muscle_tab.h.
23139 Rename macro_tabble to muscle_table.
23140 (mhash1, mhash2, mcmp): Use muscle_entry.
23141 (macro_init): Rename muscle_init. Update.
23142 (macro_insert): Rename muscle_insert. Update.
23143 (macro_find): Rename muscle_find. Update.
23144
23145 * src/main.c: Include muscle_tab.h.
23146 (main): Call muscle_init ().
23147 * src/Makefile.am (bison_SOURCES): Echo modifications.
23148
23149 2001-09-02 Marc Autret <autret_m@epita.fr>
23150
23151 Now the files macro_tab.[ch] are named muscle_tab.[ch].
23152
23153 * src/muscle_tab.c, src/muscle_tab.h: Add files.
23154
23155 2001-09-02 Marc Autret <autret_m@epita.fr>
23156
23157 * src/macrotab.c, src/macrotab.h: Remove.
23158
23159 2001-09-01 Pascal Bart <pascal.bart@epita.fr>
23160
23161 * src/reader.c (copy_guard): Use muscle to specify the `#line'
23162 filename.
23163
23164 2001-09-01 Marc Autret <autret_m@epita.fr>
23165
23166 * tests/calc.at (exp): Now, YYERROR_VERBOSE need to be set
23167 to an explicit value to activate the feature. We do it here.
23168
23169 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
23170
23171 * src/output.c (prepare): Delete the `filename' muscule insertion.
23172 * src/reader.c (copy_action): Use `filename' muscule with `#line'.
23173 (parse_union_decl): Likewise.
23174 * src/macrotab.c (macro_init): Initialize filename by infile.
23175
23176 2001-08-31 Marc Autret <autret_m@epita.fr>
23177
23178 * src/bison.simple (YYLSP_NEEDED): New definition.
23179 * src/output.c (prepare): Add macro insertion of `locations_flag'
23180
23181 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
23182
23183 * src/output.c (prepare): Delete insertion of previous muscles,
23184 and insert the `prefix' muscles.
23185 * src/macrotab.c (macro_init): Likewise.
23186 (macro_init): Initialization prefix directive by `yy'.
23187 * src/bison.simple: Substitute all %%yylex, %%yychar, %%yylval,
23188 %%yydebug, %%yyerror, %%yynerrs and %%yyparse by yylex, yychar,
23189 yylval, yydebug, yyerror, yynerrs and yyparse.
23190 New directive `#define' to substitute yydebug, ... with option
23191 name_prefix.
23192
23193 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
23194
23195 * src/main.c (main): Standardize.
23196 * src/output.c (output_table_data, output_parser): Likewise.
23197 * src/macrotab.h, src/macrotab.c, src/bison.simple: Likewise.
23198
23199 2001-08-31 Pascal Bart <pascal.bart@epita.fr>, Marc Autret <autret_m@epita.fr>
23200
23201 * src/reader.c (read_additionnal_code): Rename %%user_code to
23202 %%epilogue.
23203 * src/output.c (output): Rename %%declarations to %%prologue.
23204 * src/bison.simple: Echo modifications.
23205
23206 2001-08-31 Marc Autret <autret_m@epita.fr>
23207
23208 * src/reader.c (readgram): CleanUp.
23209 (output_token_defines): Likewise.
23210 (packsymbols): Likewise.
23211 (reader): Likewise.
23212 * src/output.c (output): CPP-out useless code.
23213
23214 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
23215
23216 * src/reader.c (reader): Delete obsolete call to function
23217 output_trailers and output_headers.
23218 * src/output.h: Remove obsolete functions prototypes of output_headers
23219 and output_trailers.
23220
23221 2001-08-30 Pascal Bart <pascal.bart@epita.fr>
23222
23223 * src/main.c: Include macrotab.h.
23224 * src/macrotab.h (macro_entry_s): Constify fields.
23225 Adjust functions prototypes.
23226 * src/macrotab.c (macro_insert): Constify key and value.
23227 (macro_find): Constify key.
23228 (macro_insert): Include 'xalloc.h'
23229 (macro_insert): Use XMALLOC.
23230 (macro_find): Constify return value.
23231 * src/output.c (output_table_data): Rename table to table_data.
23232 (output_parser): Constify macro_key, macro_value.
23233
23234 2001-08-30 Marc Autret <autret_m@epita.fr>
23235
23236 * src/reader.c (parse_skel_decl): New.
23237 (read_declarations): Add case `tok_skel', call parse_skel_decl ().
23238 * src/lex.h (token_t): New token `tok_skel'.
23239 * src/lex.c (percent_table): Add skeleton option entry.
23240 Standardize.
23241
23242 2001-08-29 Marc Autret <autret_m@epita.fr>
23243
23244 * src/bison.simple: Add %%user_code directive at the end.
23245 * src/reader.c (read_additionnal_code): New.
23246 (reader): Use it.
23247 * src/output.c (output_program): Remove.
23248 (output): Update.
23249
23250 2001-08-28 Marc Autret <autret_m@epita.fr>
23251
23252 * src/output.c (output_actions): Clean up.
23253 (output_gram): CPP-out useless code.
23254 * src/reader.c (reader): Clean up, CPP-out useless code.
23255
23256 2001-08-28 Pascal Bart <pascal.bart@epita.fr>
23257
23258 * src/output.c (output): Copy attrs_obstack in the '%%definitions'
23259 directive.
23260 * src/bison.simple: Add `%%definitions'.
23261
23262 2001-08-28 Marc Autret <autret_m@epita.fr>
23263
23264 * config/depcomp: New file.
23265
23266 2001-08-27 Paul Eggert <eggert@twinsun.com>
23267
23268 * src/bison.simple (yyparse): Don't take the address of an
23269 item before the start of an array, as that doesn't conform to
23270 the C Standard.
23271
23272 2001-08-27 Robert Anisko <robert.anisko@epita.fr>
23273
23274 * src/output.c (output): Remove the initialization of the macro
23275 obstack. It was done too late here.
23276
23277 * src/reader.c (parse_macro_decl): Fix. Use of the macro obstack was
23278 completely wrong.
23279 (reader): Initialize the macro obstack here, since we need it to grow
23280 '%define' directives.
23281
23282 * src/reader.h: Declare the macro obstack as extern.
23283
23284 2001-08-27 Robert Anisko <robert.anisko@epita.fr>
23285
23286 * src/output.c (output_parser): Fix. Store single '%' characters in
23287 the output obstack instead of throwing them away.
23288
23289 2001-08-27 Akim Demaille <akim@epita.fr>
23290
23291 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
23292
23293 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
23294
23295 * lib/Makefile.am: Adjust.
23296
23297 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
23298
23299 * src/bison.simple: Update and add '%%' directives.
23300
23301 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
23302
23303 * src/reader.c (reader): Remove calls to 'output_headers' and
23304 'output_trailers'. Remove some C output.
23305 (readgram): Disable a piece of code that was writing a default
23306 definition for 'YYSTYPE'.
23307 (reader_output_yylsp): Remove.
23308 (packsymbols): Output token defintions to a macro.
23309 (copy_definition): Disable C output.
23310
23311 * src/reader.c (parse_macro_decl): New function used to parse macro
23312 declarations.
23313 (copy_string2): Put the body of copy_string into this new function.
23314 Add a parameter to let the caller choose whether he wants to copy the
23315 string delimiters or not.
23316 (copy_string): Be a simple call to copy_string2 with the last argument
23317 bound to true.
23318 (read_declarations): Add case for macro definition.
23319 (copy_identifier): New.
23320 (parse_macro_decl): Read macro identifiers using copy_identifier
23321 rather than lex.
23322
23323 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
23324
23325 * src/output.c (prepare): Add prefixed names.
23326 (output_parser): Output semantic actions.
23327 (output_parser): Fix bug on '%%line' directives.
23328
23329 * src/output.c (output_headers): Remove. The C code printed by this
23330 function should now be in the skeletons.
23331 (output_trailers): Remove.
23332 (output): Disable call to 'reader_output_yylsp'.
23333 (output_rule_data): Do not output tables to the table obstack.
23334
23335 * src/output.c: Remove some C dedicated output.
23336 Improve the use of macro and output obstacks.
23337 (output_defines): Remove.
23338
23339 * src/output.c (output_token_translations): Associate 'translate'
23340 table with a macro. No output to the table obstack.
23341 (output_gram): Same for 'rhs' and 'prhs'.
23342 (output_stos): Same for 'stos'.
23343 (output_rule_data): Same for 'r1' and 'r2'.
23344 (token_actions): Same for 'defact'.
23345 (goto_actions): Same for 'defgoto'.
23346 (output_base): Same for 'pact' and 'pgoto'.
23347 (output_table): Same for 'table'.
23348 (output_check): Same for 'check'.
23349
23350 * src/output.c (output_table_data): New function.
23351 (output_short_table): Remove.
23352 (output_short_or_char_table): Remove.
23353
23354 * src/output.c (output_parser): Replace most of the skeleton copy code
23355 with something new. Skeletons are now processed character by character
23356 rather than line by line, and Bison looks for '%%' macros. This is the
23357 first step in making Bison's output process (a lot) more flexible.
23358 (output_parser): Use the macro table.
23359
23360 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
23361
23362 * src/main.c (main): Initialize the macro table.
23363
23364 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
23365
23366 * src/lex.c (percent_table): Add tok_define.
23367 * src/lex.h: Add tok_define.
23368
23369 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
23370
23371 * src/macrotab.c: New file.
23372 * src/macrotab.h: New file.
23373 * src/Makefile.am: Update.
23374
23375 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
23376
23377 * lib/hash.c: New file.
23378 * lib/hash.h: New file.
23379 * lib/Makefile.am: Update.
23380
23381 2001-08-15 Akim Demaille <akim@epita.fr>
23382
23383 Version 1.28c.
23384
23385 2001-08-15 Marc Autret <autret_m@epita.fr>
23386
23387 * src/reader.c (readgram): Indent output macro YYSTYPE.
23388 (packsymbols): Likewise.
23389 (output_token_defines): Likewise.
23390 * src/files.c: Standardize.
23391 (compute_header_macro): New.
23392 (defines_obstack_save): New. Use compute_header_macro.
23393 (output_files): Update. Use defines_obstack_save.
23394
23395 2001-08-15 Akim Demaille <akim@epita.fr>
23396
23397 * doc/bison.texinfo (Table of Symbols): Document
23398 YYSTACK_USE_ALLOCA.
23399
23400 2001-08-15 Akim Demaille <akim@epita.fr>
23401
23402 * missing: Update from CVS Automake.
23403 * config/config.guess, config/config.sub, config/texinfo.tex:
23404 Update from gnu.org.
23405
23406 2001-08-15 Akim Demaille <akim@epita.fr>
23407
23408 * Makefile.maint: Sync with CVS Autoconf.
23409
23410 2001-08-14 Pascal Bart <pascal.bart@epita.fr>
23411
23412 * doc/bison.texinfo: Include GNU Free Documentation License from
23413 `fdl.texi'.
23414 * doc/fdl.texi: Add to package.
23415
23416 2001-08-14 Marc Autret <autret_m@epita.fr>
23417
23418 Turn on %{source,header}_extension features.
23419
23420 * src/lex.c (percent_table): Un-CPP out header_extension and
23421 source_extension.
23422 * src/files.c (compute_exts_from_gf): Compare pointers with NULL.
23423 (compute_exts_from_src): Remove conditions. It restores priorities
23424 between options.
23425
23426 2001-08-14 Marc Autret <autret_m@epita.fr>
23427
23428 * src/files.c (compute_base_names): Add extensions computing when
23429 `--file-prefix' used.
23430 Standardize function calls.
23431
23432 2001-08-13 Marc Autret <autret_m@epita.fr>
23433
23434 * src/bison.simple (YYSTACK_USE_ALLOCA): Changed to allow users
23435 defining it (defined but null disables alloca).
23436
23437 2001-08-13 Marc Autret <autret_m@epita.fr>
23438
23439 * src/bison.simple (_yy_memcpy): CPP reformat.
23440
23441 2001-08-13 Pascal Bart <pascal.bart@epita.fr>
23442
23443 * tests/atconfig.in (CPPFLAGS): Fix.
23444
23445 2001-08-10 Pascal Bart <pascal.bart@epita.fr>
23446
23447 * doc/bison.texinfo: Include GNU General Public License from
23448 `gpl.texi'.
23449 * doc/gpl.texi: Add to package.
23450
23451 2001-08-10 Marc Autret <autret_m@epita.fr>
23452
23453 * src/print_graph.h: Fix.
23454 * src/reader.c (read_declarations): Use parse_header_extension_decl ().
23455
23456 2001-08-10 Akim Demaille <akim@epita.fr>
23457
23458 * src/system.h: Provide default declarations for stpcpy, strndup,
23459 and strnlen.
23460
23461 2001-08-10 Robert Anisko <anisko_r@epita.fr>
23462
23463 * doc/bison.texinfo (Locations): Update @$ stuff.
23464
23465 2001-08-09 Robert Anisko <anisko_r@epita.fr>
23466
23467 * src/bison.simple (YYLLOC_DEFAULT): Update.
23468 (yyparse): Adjust.
23469
23470 2001-08-08 Marc Autret <autret_m@epita.fr>
23471
23472 * doc/bison.texinfo: Change @samp{$<@dots{}>} to
23473 @samp{$<@dots{}>@var{n}} in Section Actions in Mid-Rule.
23474 Reported by Fabrice Bauzac.
23475
23476 2001-08-08 Marc Autret <autret_m@epita.fr>
23477
23478 * src/vcg_default.h: Use NULL instead of 0 to initialize pointers.
23479 * src/vcg.c (output_node): Fix.
23480 * src/vcg.h: Cleanup.
23481 * src/print_graph.c: Add comments.
23482 (node_output_size): New global variable. Simplify the formatting of
23483 the VCG graph output.
23484 (print_actions): Unused code is now used. It notifies the final state
23485 and no action states in the VCG graph. It also give the reduce actions.
23486 The `shift and goto' edges are red and the `go to state' edges are
23487 blue.
23488 Get the current node name and node_obstack by argument.
23489 (node_obstack): New variable.
23490 (print_state): Manage node_obstack.
23491 (print_core): Use node_obstack given by argument.
23492 A node is not only computed here but in print_actions also.
23493 (print_graph): CPP out useless code instead of commenting it.
23494
23495 2001-08-07 Pascal Bart <pascal.bart@epita.fr>
23496
23497 * tests/atconfig.in (CPPFLAGS): Fix.
23498
23499 2001-08-07 Akim Demaille <akim@epita.fr>
23500
23501 * src/print_graph.c (quote): New.
23502 (print_core): Use it.
23503
23504 2001-08-06 Akim Demaille <akim@epita.fr>, Marc Autret <autret_m@epita.fr>
23505
23506 * src/vcg.c (complain.h): Include it.
23507 Unepitaize `return' invocations.
23508 [NDEBUG] (main): Remove.
23509 * src/vcg.h (node_t, edge_t, graph_t): Constify the char * members.
23510 * src/files.c (open_files): Initialize graph_obstack.
23511 * src/print_graph.c (print_actions): CPP out useless code.
23512 (print_core): Don't output the last `\n' in labels.
23513 Use `quote'.
23514 * src/files.c (output_files): Output the VCG file.
23515 * src/main.c (main): Invoke print_graph ();
23516
23517 2001-08-06 Marc Autret <autret_m@epita.fr>
23518
23519 Automaton VCG graph output.
23520 Using option ``-g'' or long option ``--graph'', you can generate
23521 a gram_filename.vcg file containing a VCG description of the LALR (1)
23522 automaton of your grammar.
23523
23524 * src/main.c: Call to print_graph() function.
23525 * src/getargs.h: Update.
23526 * src/getargs.c (options): Update to catch `-g' and `--graph' options.
23527 (graph_flag): New flag.
23528 (longopts): Update.
23529 (getargs): Add case `g'.
23530 * src/files.c (graph_obstack): New obstack struct.
23531 (open_files): Initialize new obstack.
23532 (output_files): Saves graph_obstack if required.
23533 * src/files.h (graph_obstack): New extern declaration.
23534 * src/Makefile.am: Add new source files.
23535
23536 2001-08-06 Marc Autret <autret_m@epita.fr>
23537
23538 * src/print_graph.c, src/print_graph.h (graph): New.
23539 * src/vcg.h: New file.
23540 * src/vcg.c: New file, VCG graph handling.
23541
23542 2001-08-06 Marc Autret <autret_m@epita.fr>
23543
23544 Add of %source_extension and %header_extension which specify
23545 the source or/and the header output file extension.
23546
23547 * src/files.c (compute_base_names): Remove initialisation of
23548 src_extension and header_extension.
23549 (compute_exts_from_gf): Update.
23550 (compute_exts_from_src): Update.
23551 (output_files): Update.
23552 * src/reader.c (parse_header_extension_decl): New.
23553 (parse_source_extension_decl): New.
23554 (read_declarations): New case statements for the new tokens.
23555 * src/lex.c (percent_table): Add entries for %source_extension
23556 and %header_extension.
23557 * src/lex.h (token_e): New tokens tok_hdrext and tok_srcext.
23558
23559 2001-08-06 Marc Autret <autret_m@epita.fr>
23560
23561 * configure.in: Bump to 1.28c.
23562 * doc/bison.texinfo: Texinfo thingies.
23563
23564 2001-08-04 Pascal Bart <pascal.bart@epita.fr>
23565
23566 * tests/atconfig.in (CPPFLAGS): Add.
23567 * tests/calc.at (AT_CHECK): Use CPPFLAGS.
23568
23569 2001-08-03 Akim Demaille <akim@epita.fr>
23570
23571 Version 1.28b.
23572
23573 2001-08-03 Akim Demaille <akim@epita.fr>
23574
23575 * tests/Makefile.am (check-local): Ship testsuite.
23576 * tests/calc.at (_AT_DATA_CALC_Y): Prototype all the functions.
23577 Include `string.h'.
23578
23579 2001-08-03 Akim Demaille <akim@epita.fr>
23580
23581 * configure.in: Try using -Wformat when compiling.
23582
23583 2001-08-03 Akim Demaille <akim@epita.fr>
23584
23585 * configure.in: Bump to 1.28b.
23586
23587 2001-08-03 Akim Demaille <akim@epita.fr>
23588
23589 * src/complain.c: Adjust strerror_r portability issues.
23590
23591 2001-08-03 Akim Demaille <akim@epita.fr>
23592
23593 Version 1.28a.
23594
23595 2001-08-03 Akim Demaille <akim@epita.fr>
23596
23597 * src/getargs.c, src/getarg.h (skeleton)): Constify.
23598 * src/lex.c (literalchar): Avoid name clashes on `buf'.
23599 * src/getargs.c: Include complain.h.
23600 * src/files.c, src/files.h (skeleton_find): Avoid name clashes.
23601 * lib/quotearg.c, lib/quotearg.h: Update from fileutils 4.1.
23602
23603 2001-08-03 Akim Demaille <akim@epita.fr>
23604
23605 * src/reader.c (readgram): Display hidden chars in error messages.
23606
23607 2001-08-03 Akim Demaille <akim@epita.fr>
23608
23609 Update to gettext 0.10.39.
23610
23611 2001-08-03 Akim Demaille <akim@epita.fr>
23612
23613 * lib/strspn.c: New.
23614
23615 2001-08-01 Marc Autret <autret_m@epita.fr>
23616
23617 * doc/bison.texinfo: Update.
23618 * doc/bison.1 (mandoc): Update.
23619 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove .c and .h.
23620 * src/files.c: Support output files extensions computing.
23621 (src_extension): New static variable.
23622 (header_extension): New static variable.
23623 (tr): New function.
23624 (get_extension_index): New function, gets the index of an extension
23625 filename in a string.
23626 (compute_exts_from_gf): New function, computes extensions from the
23627 grammar file extension.
23628 (compute_exts_from_src): New functions, computes extensions from the
23629 C source file extension, file given by ``-o'' option.
23630 (compute_base_names): Update.
23631 (output_files): Update.
23632
23633 2001-08-01 Robert Anisko <anisko_r@epita.fr>
23634
23635 * doc/bison.texi: Document @$.
23636 (Locations): New section.
23637
23638 2001-07-18 Akim Demaille <akim@epita.fr>
23639
23640 * Makefile.maint, GNUmakefile: New, from Autoconf 2.52.
23641 * config/prev-version.txt, config/move-if-change: New.
23642 * Makefile.am: Adjust.
23643
23644 2001-07-08 Pascal Bart <pascal.bart@epita.fr>
23645
23646 * src/bison.simple (yyparse): Suppress warning `comparaison
23647 between signed and unsigned'.
23648
23649 2001-07-05 Pascal Bart <pascal.bart@epita.fr>
23650
23651 * src/getargs.h (raw_flag): Remove.
23652 * src/getargs.c: Die on `-r'/`--raw'.
23653 * src/lex.c (parse_percent_token): Die on `%raw'.
23654 * src/reader.c (output_token_defines): Suppress call to `raw_flag'.
23655 * tests/calc.at: Suppress test with option `--raw'.
23656
23657 2001-07-14 Akim Demaille <akim@epita.fr>
23658
23659 * config/: New.
23660 * configure.in: Require Autoconf 2.50.
23661 Update to gettext 0.10.38.
23662
23663 2001-03-16 Akim Demaille <akim@epita.fr>
23664
23665 * doc/bison.texinfo: ANSIfy the examples.
23666
23667 2001-03-16 Akim Demaille <akim@epita.fr>
23668
23669 * getargs.c (skeleton): New variable.
23670 (longopts): --skeleton is a new option.
23671 (shortopts, getargs): -S is a new option.
23672 * getargs.h: Declare skeleton.
23673 * output.c (output_parser): Use it.
23674
23675 2001-03-16 Akim Demaille <akim@epita.fr>
23676
23677 * m4/strerror_r.m4: New.
23678 * m4/error.m4: Run AC_FUNC_STRERROR_R.
23679 * lib/error.h, lib/error.c: Update.
23680
23681 2001-03-16 Akim Demaille <akim@epita.fr>
23682
23683 * src/getargs.c (longopts): Clean up.
23684
23685 2001-02-21 Akim Demaille <akim@epita.fr>
23686
23687 * src/reader.c (gensym): `gensym_count' is your own.
23688 Use a static buf to create the symbol name, as token_buffer is no
23689 longer a buffer.
23690
23691 2001-02-08 Akim Demaille <akim@epita.fr>
23692
23693 * src/conflicts.c (conflict_report): Be sure not to append to res
23694 between two calls, which could happen if both first sprintf were
23695 skipped, but not the first cp += strlen.
23696
23697 2001-02-08 Akim Demaille <akim@epita.fr>
23698
23699 * lib/memchr.c, lib/stpcpy.c, lib/strndup.c, lib/strnlen.c:
23700 New, from fileutils 4.0.37.
23701 * configure.in: Require Autoconf 2.49c. I took some time before
23702 making this decision. This is the only way out for portability
23703 issues in Bison, it would mean way too much duplicate effort to
23704 import in Bison features implemented in 2.49c since 2.13.
23705 AC_REPLACE_FUNCS and AC_CHECK_DECLS the functions above.
23706
23707 2001-02-02 Akim Demaille <akim@epita.fr>
23708
23709 * lib/malloc.c, lib/realloc.c: New, from the fileutils 4.0.37.
23710 * lib/xalloc.h, lib/xmalloc.c: Update.
23711
23712 2001-01-19 Akim Demaille <akim@epita.fr>
23713
23714 Get rid of the ad hoc handling of token_buffer in the scanner: use
23715 the obstacks.
23716
23717 * src/lex.c (token_obstack): New.
23718 (init_lex): Initialize it. No longer call...
23719 (grow_token_buffer): this. Remove it.
23720 Adjust all the places which used it to use the obstack.
23721
23722 2001-01-19 Akim Demaille <akim@epita.fr>
23723
23724 * src/lex.h: Rename all the tokens:
23725 s/\bENDFILE\b/tok_eof/g;
23726 s/\bIDENTIFIER\b/tok_identifier/g;
23727 etc.
23728 Let them be enums, not #define, to ease debugging.
23729 Adjust all the code.
23730
23731 2001-01-18 Akim Demaille <akim@epita.fr>
23732
23733 * src/lex.h (MAXTOKEN, maxtoken, grow_token_buffer): Remove, private.
23734 * src/lex.c (maxtoken, grow_token_buffer): Static.
23735
23736 2001-01-18 Akim Demaille <akim@epita.fr>
23737
23738 Since we now use obstacks, more % directives can be enabled.
23739
23740 * src/lex.c (percent_table): Also accept `%yacc',
23741 `%fixed_output_files', `%defines', `%no_parser', `%verbose', and
23742 `%debug'.
23743 Handle the actions for `%semantic_parser' and `%pure_parser' here,
23744 instead of returning a token.
23745 * src/lex.h (SEMANTIC_PARSER, PURE_PARSER): Remove, unused.
23746 * src/reader.c (read_declarations): Adjust.
23747 * src/files.c (open_files): Don't call `compute_base_names', don't
23748 compute `attrsfile' since they depend upon data which might be
23749 *in* the input file now.
23750 (output_files): Do it here.
23751 * src/output.c (output_headers): Document the fact that this patch
23752 introduces a guaranteed SEGV for semantic parsers.
23753 * doc/bison.texinfo: Document them.
23754 * tests/suite.at: Exercise these %options.
23755
23756 2000-12-20 Akim Demaille <akim@epita.fr>
23757
23758 Also handle the output file (--verbose) with obstacks.
23759
23760 * files.c (foutput): Remove.
23761 (output_obstack): New.
23762 Adjust all dependencies.
23763 * src/conflicts.c: Return a string.
23764 * src/system.h (obstack_grow_string): Rename as...
23765 (obstack_sgrow): this. Be ready to work with non literals.
23766 (obstack_fgrow4): New.
23767
23768 2000-12-20 Akim Demaille <akim@epita.fr>
23769
23770 * src/files.c (open_files): Fix the computation of short_base_name
23771 in the case of `-o foo.tab.c'.
23772
23773 2000-12-20 Akim Demaille <akim@epita.fr>
23774
23775 * src/reader.c (copy_string, copy_comment, copy_comment2, copy_at)
23776 (copy_dollar): Now that everything uses obstacks, get rid of the
23777 FILE * parameters.
23778
23779 2000-12-20 Akim Demaille <akim@epita.fr>
23780
23781 * src/files.c (open_files): Actually the `.output' file is based
23782 on the short_base_name, not base_name.
23783 * tests/suite.at (Checking output file names): Adjust.
23784
23785 2000-12-20 Akim Demaille <akim@epita.fr>
23786
23787 * src/bison.s1: Remove, we now use directly...
23788 * src/bison.simple: this.
23789 * src/Makefile.am: Use pkgdata instead of data.
23790
23791 2000-12-20 Akim Demaille <akim@epita.fr>
23792
23793 * src/files.c (guard_obstack): New.
23794 (open_files): Initialize it.
23795 (output_files): Dump it...
23796 * src/files.h: Export it.
23797 * src/reader.c (copy_guard): Use it.
23798
23799 2000-12-19 Akim Demaille <akim@epita.fr>
23800
23801 * src/files.c (outfile, defsfile, actfile): Removed as global
23802 vars.
23803 (open_files): Don't compute them.
23804 (output_files): Adjust.
23805 (base_name, short_base_name): Be global.
23806 Adjust dependencies.
23807
23808 2000-12-19 Akim Demaille <akim@epita.fr>
23809
23810 * src/files.c (strsuffix): New.
23811 (stringappend): Be just like strcat but allocate.
23812 (base_names): Eve out from open_files.
23813 Try to simplify the rather hairy computation of base_name and
23814 short_base_name.
23815 (open_files): Use it.
23816 * tests/suite.at (Checking output file names): New test.
23817
23818 2000-12-19 Akim Demaille <akim@epita.fr>
23819
23820 * src/system.h (obstack_grow_literal_string): Rename as...
23821 (obstack_grow_string): this.
23822 * src/output.c (output_parser): Recognize `%% actions' instead of
23823 `$'.
23824 * src/bison.s1: s/$/%% actions/.
23825 * src/bison.hairy: Likewise.
23826
23827 2000-12-19 Akim Demaille <akim@epita.fr>
23828
23829 * src/output.c (output_parser): Compute the `#line' lines when
23830 there are.
23831 * src/Makefile.am (bison.simple): Be a simple copy of bison.s1.
23832 Suggested by Hans Aberg.
23833
23834 2000-12-19 Akim Demaille <akim@epita.fr>
23835
23836 Let the handling of the skeleton files be local to the procedures
23837 that use it.
23838
23839 * src/files.c (xfopen, xfclose, skeleton_find, guardfile): No
23840 longer static.
23841 (fparser, open_extra_files): Remove.
23842 (open_files, output_files): Don't take care of fparser.
23843 * src/files.h: Adjust.
23844 * src/output.c (output_parser): Open and close the file to the
23845 skeleton.
23846 * src/reader.c (read_declarations): When %semantic_parser, open
23847 fguard.
23848
23849 2000-12-19 Akim Demaille <akim@epita.fr>
23850
23851 * src/file.h (BISON_SIMPLE, BISON_HAIRY): Move from here...
23852 * src/system.h (BISON_SIMPLE, BISON_HAIRY): ... to here.
23853
23854 2000-12-19 Akim Demaille <akim@epita.fr>
23855
23856 * src/files.c (open_files): Yipee! We no longer need all the code
23857 looking for `/tmp' since we have no tmp file.
23858
23859 2000-12-19 Akim Demaille <akim@epita.fr>
23860
23861 * src/system.h (EXT_TAB, EXT_OUTPUT, EXT_STYPE_H, EXT_GUARD_C):
23862 New macros.
23863 * src/files.c (open_files): Less dependency on MSDOS etc.
23864
23865 2000-12-14 Akim Demaille <akim@epita.fr>
23866
23867 * src/bison.s1 (YYLLOC_DEFAULT): New macro.
23868 Provide a default definition.
23869 Use it when executing the default @ action.
23870 * src/reader.c (reader_output_yylsp): No longer include
23871 `timestamp' and `text' in the default YYLTYPE.
23872
23873 2000-12-12 Akim Demaille <akim@epita.fr>
23874
23875 * src/reader.c (copy_definition, parse_union_decl, copy_action)
23876 (copy_guard): Quote the file names.
23877 Reported by Laurent Mascherpa.
23878
23879 2000-12-12 Akim Demaille <akim@epita.fr>
23880
23881 * src/output.c (output_headers, output_program, output): Be sure
23882 to escape special characters when outputting filenames.
23883 (ACTSTR_PROLOGUE, ACTSTR_EPILOGUE): Remove.
23884 (output_headers): Don't depend on them, Use ACTSTR.
23885
23886 2000-11-17 Akim Demaille <akim@epita.fr>
23887
23888 * lib/obstack.h: Formatting changes.
23889 (obstack_grow, obstack_grow0): Don't cast WHERE at all: it
23890 prevents type checking.
23891 (obstack_ptr_grow, obstack_ptr_grow_fast): When assigning, don't
23892 cast the value to (void *): assigning a `foo *' to a `void *'
23893 variable is valid.
23894 (obstack_int_grow, obstack_int_grow_fast): Don't cast AINT to int.
23895 * src/reader.c (parse_union_decl): Typo: use obstack_1grow to
23896 append characters.
23897
23898 2000-11-17 Akim Demaille <akim@epita.fr>
23899
23900 * tests/Makefile.am (suite.m4, regression.m4, calc.m4): Rename
23901 as...
23902 (suite.m4, regression.m4, calc.m4): these.
23903 * tests/atgeneral.m4: Update from CVS Autoconf.
23904
23905 2000-11-17 Akim Demaille <akim@epita.fr>
23906
23907 * tests/regression.m4 (%union and --defines): New test,
23908 demonstrating a current bug in the obstack implementation.
23909
23910 2000-11-17 Akim Demaille <akim@epita.fr>
23911
23912 * src/bison.s1 (_YY_DECL_VARIABLES, YY_DECL_VARIABLES): New
23913 macros.
23914 Use them to declare the variables which are global or local to
23915 `yyparse'.
23916
23917 2000-11-17 Akim Demaille <akim@epita.fr>
23918
23919 * acconfig.h: Remove, no longer used.
23920
23921 2000-11-07 Akim Demaille <akim@epita.fr>
23922
23923 * src: s/Copyright (C)/Copyright/g.
23924
23925 2000-11-07 Akim Demaille <akim@epita.fr>
23926
23927 * src/reader.c (reader): #define YYLSP_NEEDED to 1 instead of just
23928 defining.
23929 * src/bison.s1: s/#ifdef YYLSP_NEEDED/#if YYLSP_NEEDED/.
23930
23931 2000-11-07 Akim Demaille <akim@epita.fr>
23932
23933 * src/bison.s1 (YYLEX): Use #if instead of #ifdef.
23934 Merge in a single CPP if/else.
23935
23936 2000-11-07 Akim Demaille <akim@epita.fr>
23937
23938 * src/output.c (output): Remove useless variables.
23939 * lib/obstack.c (obstack_grow, obstack_grow0): Rename the second
23940 argument `data' for consistency with the prototypes.
23941 Qualify it `const'.
23942 (obstack_copy, obstack_copy0): Rename the second argument as
23943 `address' for consistency. Qualify it `const'.
23944 * lib/obstack.h (obstack_copy, obstack_copy0, obstack_grow)
23945 (obstack_grow0, obstack_ptr_grow, obstack_ptr_grow_fast): Qualify
23946 `const' their input argument (`data' or `address').
23947 Adjust the corresponding macros to include `const' in casts.
23948
23949 2000-11-03 Akim Demaille <akim@epita.fr>
23950
23951 * src/Makefile.am (INCLUDES): s/PFILE/BISON_SIMPLE/.
23952 s/PFILE1/BISON_HAIRY/.
23953 Adjust dependencies.
23954
23955 2000-11-03 Akim Demaille <akim@epita.fr>
23956
23957 For some reason, this was not applied.
23958
23959 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
23960 `unlink': it's no longer used.
23961
23962 2000-11-03 Akim Demaille <akim@epita.fr>
23963
23964 * src/files.c (skeleton_find): New function, eved out of...
23965 (open_files, open_extra_files): here.
23966
23967 2000-11-03 Akim Demaille <akim@epita.fr>
23968
23969 Don't use `atexit'.
23970
23971 * src/files.c (obstack_save): New function.
23972 (done): Rename as...
23973 (output_files): this.
23974 Use `obstack_save'.
23975 * src/main.c (main): Don't use `atexit' to register `done', since
23976 it no longer has to remove tmp files, just call `output_files'
23977 when there are no errors.
23978
23979 2000-11-02 Akim Demaille <akim@epita.fr>
23980
23981 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
23982 `unlink': it's no longer used.
23983 * src/files.h: Formatting changes.
23984
23985 2000-11-02 Akim Demaille <akim@epita.fr>
23986
23987 Remove the last uses of mktemp and unlink/delete.
23988
23989 * src/files.c (fdefines, ftable): Removed.
23990 (defines_ostack, table_obstack): New.
23991 Adjust dependencies of the former into uses of the latter.
23992 * src/output.c (output_short_or_char_table, output_short_table):
23993 Convert to using obstacks.
23994 * src/reader.c (copy_comment2): Accept one FILE * and two
23995 obstacks.
23996 (output_token_defines, reader_output_yylsp): Use obstacks.
23997 * src/system.h (obstack_fgrow3): New.
23998 * po/POTFILES.in: Adjust.
23999
24000 2000-11-01 Akim Demaille <akim@epita.fr>
24001
24002 Change each use of `fattrs' into a use of `attrs_obstack'.
24003
24004 * src/reader.c (copy_at): Typo: s/yylloc/yyloc/.
24005 * src/files.c (fattrs): Remove.
24006 (attrs_obstack): New.
24007 Adjust all dependencies.
24008 (done): If SEMANTIC_PARSER, dump attrs_obstack into attrsfile.
24009
24010 2000-11-01 Akim Demaille <akim@epita.fr>
24011
24012 Introduce obstacks.
24013 Change each use of `faction' into a use of `action_obstack'.
24014
24015 * lib/obstack.h, lib/obstack.c: New files.
24016 * src/files.c (faction): Remove.
24017 (action_obstack): New.
24018 Adjust all dependencies.
24019
24020 2000-10-20 Akim Demaille <akim@epita.fr>
24021
24022 * lib/quote.h (PARAMS): New macro. Use it.
24023
24024 2000-10-16 Akim Demaille <akim@epita.fr>
24025
24026 * src/output.c (output_short_or_char_table): New function.
24027 (output_short_table, output_token_translations): Use it.
24028 (goto_actions): Use output_short_table.
24029
24030 2000-10-16 Akim Demaille <akim@epita.fr>
24031
24032 * src/symtab.c (bucket_new): New function.
24033 (getsym): Use it.
24034
24035 * src/output.c (output_short_table): New argument to display the
24036 comment associated with the table.
24037 Adjust dependencies.
24038 (output_gram): Use it.
24039 (output_rule_data): Nicer output layout for YYTNAME.
24040
24041 2000-10-16 Akim Demaille <akim@epita.fr>
24042
24043 * src/lex.c (read_typename): New function.
24044 (lex): Use it.
24045 * src/reader.c (copy_dollar): Likewise.
24046
24047 2000-10-16 Akim Demaille <akim@epita.fr>
24048
24049 * src/reader.c (copy_comment2): Expect the input stream to be on
24050 the `/' which is suspected to open a comment, instead of being
24051 called after `//' or `/*' was read.
24052 (copy_comment, copy_definition, parse_union_decl, copy_action)
24053 (copy_guard): Adjust.
24054
24055 2000-10-16 Akim Demaille <akim@epita.fr>
24056
24057 * src/reader.c (parse_expect_decl): Use `skip_white_space' and
24058 `read_signed_integer'.
24059
24060 2000-10-16 Akim Demaille <akim@epita.fr>
24061
24062 * src/reader.c (copy_dollar): New function.
24063 (copy_guard, copy_action): Use it.
24064
24065 2000-10-16 Akim Demaille <akim@epita.fr>
24066
24067 * lib/quote.h, lib/quote.c, lib/quotearg.h, lib/quotearg.c:
24068 * m4/prereq.m4, m4/c-bs-a.m4, m4/mbstate.m4:
24069 New files, from Fileutils 4.0.27.
24070 * src/main.c (printable_version): Remove.
24071 * src/lex.c, src/reader.c: Use `quote'.
24072
24073 2000-10-04 Akim Demaille <akim@epita.fr>
24074
24075 * lib/error.c, lib/error.h: New files, needed by xmalloc.c.
24076
24077 2000-10-04 Akim Demaille <akim@epita.fr>
24078
24079 * doc/bison.texinfo: Various typos spotted by Neil Booth.
24080
24081 2000-10-04 Akim Demaille <akim@epita.fr>
24082
24083 When a literal string is used to define two different tokens,
24084 `bison -v' segfaults.
24085 Reported by Piotr Gackiewicz, and fixed by Neil Booth.
24086
24087 * tests/regression.m4: New file.
24088 Include the core of the sample provided by Piotr Gackiewicz.
24089 * src/reader.c (parse_token_decl): Diagnose bad cases, and proceed
24090 properly.
24091
24092 2000-10-04 Akim Demaille <akim@epita.fr>
24093
24094 * src/reader.c (parse_expect_decl): Keep `count' within the size
24095 of `buffer'.
24096 From Neil Booth.
24097
24098 2000-10-02 Paul Eggert <eggert@twinsun.com>
24099
24100 * bison.s1 (yyparse): Assign the default value
24101 unconditionally, to avoid a GCC warning and make the parser a
24102 tad smaller.
24103
24104 2000-10-02 Akim Demaille <akim@epita.fr>
24105
24106 * src/getargs.c (getargs): Don't dump `--help' on unrecognized
24107 options.
24108
24109 2000-10-02 Akim Demaille <akim@epita.fr>
24110
24111 * src/derives.c, src/print.c, src/reduce.c: To ease the
24112 translation, move some `\n' out of the translated strings.
24113
24114 2000-10-02 Akim Demaille <akim@epita.fr>
24115
24116 The location tracking mechanism is precious for parse error
24117 messages. Nevertheless, it is enabled only when `@n' is used in
24118 the grammar, which is a different issue (you can use it in error
24119 message, but not in the grammar per se). Therefore, there should
24120 be another means to enable it.
24121
24122 * src/getargs.c (getargs): Support `--locations'.
24123 (usage): Report it.
24124 * src/getargs.h (locationsflag): Export it.
24125 * src/lex.c (percent_table): Support `%locations'.
24126 * src/reader.c (yylsp_needed): Remove this variable, now replaced
24127 with `locationsflag'.
24128 * doc/bison.texinfo: Document `--locations' and `%locations'.
24129 Sort the options.
24130 * tests/calc.m4: Test it.
24131
24132 For regularity of the names, replace each
24133 (nolineflag, toknumflag, rawtokenumflag, noparserflag): with...
24134 (no_lineflag, token_tableflag, rawflag, no_parserflag): this.
24135 In addition replace each `flag' with `_flag'.
24136
24137 2000-10-02 Akim Demaille <akim@epita.fr>
24138
24139 Also test parse error messages, including with YYERROR_VERBOSE.
24140
24141 * tests/calc.m4 (calc.y): Add support for `exp = exp' (non
24142 associative).
24143 Use it to check the computations.
24144 Use it to check `nonassoc' is honored.
24145 (AT_DATA_CALC_Y): Equip `calc.y' with YYERROR_VERBOSE when passed
24146 `--yyerror-verbose'.
24147 (_AT_CHECK_CALC): Adjust to this option.
24148 (_AT_CHECK_CALC_ERROR): New macro to check parse error messages.
24149
24150 2000-10-02 Akim Demaille <akim@epita.fr>
24151
24152 Test also `--verbose', `--defines' and `--name-prefix'. Testing
24153 the latter demonstrates a flaw in the handling of non debugging
24154 parsers introduced by myself on 2000-03-16: `#define yydebug 0'
24155 was used in order to simplify:
24156
24157 #if YYDEBUG
24158 if (yydebug)
24159 {
24160 ...
24161 }
24162 #endif
24163
24164 into
24165
24166 if (yydebug)
24167 {
24168 ...
24169 }
24170
24171 unfortunately this leads to a CPP conflict when
24172 `--name-prefix=foo' is used since it produces `#define yydebug
24173 foodebug'.
24174
24175 * src/bison.s1 [!YYDEBUG]: Do not define yydebug.
24176 (YYDPRINTF): New macro.
24177 Spread its use.
24178 * tests/calc.m4 (AT_CHECK_CALC): Do require a title, build it from
24179 the bison options.
24180 Also test `--verbose', `--defines' and `--name-prefix'.
24181
24182 2000-10-02 Akim Demaille <akim@epita.fr>
24183
24184 Improve the readability of the produced parsers.
24185
24186 * src/bison.s1: Formatting changes.
24187 Improve the comment related to the `$' mark.
24188 (yydefault): Don't fall through to `yyresume': `goto' there.
24189 * src/output.c (output_parser): When the `$' is met, skip the end
24190 of its line.
24191 New variable, `number_of_dollar_signs', to check there's exactly
24192 one `$' in the parser skeleton.
24193
24194 2000-10-02 Akim Demaille <akim@epita.fr>
24195
24196 * lib/xstrdup.c: New file, from the fileutils.
24197 * src/reader.c (parse_token_decl, get_type_name, parse_type_decl)
24198 (parse_assoc_decl, parse_thong_decl, get_type): Use `xstrdup'
24199 instead of strlen + xmalloc + strcpy.
24200 * src/symtab.c (copys): Remove, use xstrdup instead.
24201
24202 2000-10-02 Akim Demaille <akim@epita.fr>
24203
24204 * src/gram.h (associativity): New enum type which replaces the
24205 former CPP macros `RIGHT_ASSOC', `LEFT_ASSOC' and `NON_ASSOC' with
24206 `right_assoc', `left_assoc' and `non_assoc'.
24207 Adjust all dependencies.
24208 * src/reader.c: Formatting changes.
24209 (LTYPESTR): Don't define it, use it as a literal in
24210 `reader_output_yylsp'.
24211 * src/symtab.h (symbol_class): New enum type which replaces the
24212 former CPP macros `SUNKNOWN', `STOKEN and `SNTERM' with
24213 `sunknown', `stoken and `snterm'.
24214
24215 2000-10-02 Akim Demaille <akim@epita.fr>
24216
24217 * src/getargs.c (fixed_outfiles): Rename as...
24218 (yaccflag): for consistency and accuracy.
24219 Adjust dependencies.
24220
24221 2000-10-02 Akim Demaille <akim@epita.fr>
24222
24223 Use the more standard files `xalloc.h' and `xmalloc.c' instead of
24224 Bison's `allocate.c' and `alloc.h'. This patch was surprisingly
24225 difficult and introduced a lot of core dump. It turns out that
24226 Bison used an implementation of `xmalloc' based on `calloc', and
24227 at various places it does depend upon the initialization to 0. I
24228 have not tried to isolate the pertinent places, and all the former
24229 calls to Bison's `xmalloc' are now using `XCALLOC'. Someday,
24230 someone should address this issue.
24231
24232 * src/allocate.c, src/alloc.h, m4/bison-decl.m4: Remove.
24233 * lib/xmalloc.c, lib/xalloc.h, m4/malloc.m4, m4/realloc.m4: New
24234 files.
24235 Adjust dependencies.
24236 * src/warshall.h: New file.
24237 Propagate.
24238
24239 2000-10-02 Akim Demaille <akim@epita.fr>
24240
24241 Various anti-`extern in *.c' changes.
24242
24243 * src/system.h: Include `assert.h'.
24244
24245 2000-10-02 Akim Demaille <akim@epita.fr>
24246
24247 * src/state.h (nstates, final_state, first_state, first_shift)
24248 (first_reduction): Move their exportation from here...
24249 * src/LR0.h: to here.
24250 Adjust dependencies.
24251 * src/getargs.c (statisticsflag): New variable.
24252 Add support for `--statistics'.
24253 Adjust dependencies.
24254
24255 Remove a lot of now useless `extern' statements in most files.
24256
24257 2000-10-02 Akim Demaille <akim@epita.fr>
24258
24259 * src/LR0.h: New file.
24260 Propagate its use.
24261
24262 2000-10-02 Akim Demaille <akim@epita.fr>
24263
24264 * src/print.h: New file.
24265 Propagate its use.
24266 * src/print.c: Formatting and ordering changes.
24267 (verbose, terse): Replace with...
24268 (print_results): this new function.
24269 Adjust dependencies.
24270
24271 2000-10-02 Akim Demaille <akim@epita.fr>
24272
24273 * src/conflicts.c (conflict_report): New function.
24274 (conflict_log, verbose_conflict_log): Replace with...
24275 (print_conflicts): this function.
24276 Adjust dependencies.
24277 * src/conflicts.h: New file.
24278 Propagate its inclusion.
24279
24280 2000-10-02 Akim Demaille <akim@epita.fr>
24281
24282 * src/nullable.h: New file.
24283 Propagate its inclusion.
24284 * src/nullable.c: Formatting changes.
24285
24286 2000-10-02 Akim Demaille <akim@epita.fr>
24287
24288 * src/reduce.h: New file.
24289 Propagate its inclusion.
24290 * src/reduce.c: Topological sort and other formatting changes.
24291 (bool, TRUE, FALSE): Move their definition to...
24292 * src/system.h: here.
24293
24294 2000-10-02 Akim Demaille <akim@epita.fr>
24295
24296 * src/files.c: Formatting changes.
24297 (tryopen, tryclose, openfiles): Rename as...
24298 (xfopen, xfclose, open_files): this.
24299 (stringappend): static.
24300 * src/files.h: Complete the list of exported symbols.
24301 Propagate its use.
24302
24303 2000-10-02 Akim Demaille <akim@epita.fr>
24304
24305 * src/reader.h: New file.
24306 Propagate its use instead of tedious list of `extern' and
24307 prototypes.
24308 * src/reader.c: Formatting changes, topological sort,
24309 s/register//.
24310
24311 2000-10-02 Akim Demaille <akim@epita.fr>
24312
24313 * src/lex.h: Prototype `lex.c' exported functions.
24314 * src/reader.c: Adjust.
24315 * src/lex.c: Formatting changes.
24316 (safegetc): Rename as...
24317 (xgetc): this.
24318
24319 2000-10-02 Akim Demaille <akim@epita.fr>
24320
24321 * src/lalr.h: New file.
24322 Propagate its inclusion instead of prototypes and `extern'.
24323 * src/lalr.c: Formatting changes, topological sorting etc.
24324
24325 2000-10-02 Akim Demaille <akim@epita.fr>
24326
24327 * src/output.c (token_actions): Introduce a temporary array,
24328 YYDEFACT, that makes it possible for this function to use
24329 output_short_table.
24330
24331 2000-10-02 Akim Demaille <akim@epita.fr>
24332
24333 `user_toknums' is output as a `short[]' in `output.c', while it is
24334 defined as a `int[]' in `reader.c'. For consistency with the
24335 other output tables, `user_toknums' is now defined as a table of
24336 shorts.
24337
24338 * src/reader.c (user_toknums): Be a short table instead of an int
24339 table.
24340 Adjust dependencies.
24341
24342 Factor the short table outputs.
24343
24344 * src/output.c (output_short_table): New function.
24345 * src/output.c (output_gram, output_stos, output_rule_data)
24346 (output_base, output_table, output_check): Use it.
24347
24348 2000-10-02 Akim Demaille <akim@epita.fr>
24349
24350 * src/output.c (output): Topological sort of the functions, in
24351 order to get rid of the `static' prototypes.
24352 No longer use `register'.
24353 * src/output.h: New file.
24354 Propagate its inclusion in files explicitly prototyping functions
24355 from output.c.
24356
24357 2000-09-21 Akim Demaille <akim@epita.fr>
24358
24359 * src/atgeneral.m4: Update from Autoconf.
24360
24361 2000-09-21 Akim Demaille <akim@epita.fr>
24362
24363 * src/closure.h: New file.
24364 * src/closure.c: Formatting changes, topological sort over the
24365 functions, use of closure.h.
24366 (initialize_closure, finalize_closure): Rename as...
24367 (new_closure, free_closure): these. Adjust dependencies.
24368 * src/LR0.c: Formatting changes, topological sort, use of
24369 cloture.h.
24370 (initialize_states): Rename as...
24371 (new_states): this.
24372 * src/Makefile.am (noinst_HEADERS): Adjust.
24373
24374 2000-09-20 Akim Demaille <akim@epita.fr>
24375
24376 * src/acconfig.h: Don't protect config.h against multiple
24377 inclusion.
24378 Don't define PARAMS.
24379 * src/system.h: Define PARAMS.
24380 Remove some of the ad-hoc CPP magic for DOS, VMS etc.: this is the
24381 purpose of config.h. system.h must not try to fix wrong
24382 definitions in config.h.
24383
24384 2000-09-20 Akim Demaille <akim@epita.fr>
24385
24386 * src/derives.h: New file.
24387 * src/main.c, src/derives.h: Use it.
24388 Formatting changes.
24389 * src/Makefile.am (noinst_HEADERS): Adjust.
24390
24391 2000-09-20 Akim Demaille <akim@epita.fr>
24392
24393 * tests/atgeneral.m4: Update from Autoconf.
24394 * tests/calc.m4 (_AT_DATA_CALC_Y, AT_DATA_CALC_Y, _AT_CHECK_CALC)
24395 (AT_CHECK_CALC): New macros.
24396 Use these macros to test bison with options `', `--raw',
24397 `--debug', `--yacc', `--yacc --debug'.
24398
24399 2000-09-19 Akim Demaille <akim@epita.fr>
24400
24401 * src/output.c: Formatting changes.
24402 * src/machine.h: Remove, leaving its contents in...
24403 * src/system.h: here.
24404 Include stdio.h.
24405 Adjust all dependencies on stdio.h and machine.h.
24406 * src/getargs.h: New file.
24407 Let all `extern' declarations about getargs.c be replaced with
24408 inclusion of `getargs.h'.
24409 * src/Makefile.am (noinst_HEADERS): Adjust.
24410
24411 * tests/calc.m4 (yyin): Be initialized in main, not on the global
24412 scope.
24413 (yyerror): Returns void, not int.
24414 * doc/bison.texinfo: Formatting changes.
24415
24416 2000-09-19 Akim Demaille <akim@epita.fr>
24417
24418 * tests/calc.m4 (calc.y): Do not assign to stdin, as it's not
24419 portable.
24420
24421 2000-09-18 Akim Demaille <akim@epita.fr>
24422
24423 * configure.in: Append WARNING_CFLAGS to CFLAGS.
24424 * src/Makefile.am (INCLUDES): Don't.
24425 Be ready to fetch headers in lib/.
24426
24427 2000-09-18 Akim Demaille <akim@epita.fr>
24428
24429 * doc/bison.texinfo: Update the copyright.
24430 ANSIfy and GNUify the examples.
24431 Remove the old menu.
24432
24433 2000-09-18 Akim Demaille <akim@epita.fr>
24434
24435 First set of tests: use the `calc' example from the documentation.
24436
24437 * src/bison.s1 (yyparse): Condition the code using `yytname' which
24438 is defined only when YYDEBUG is.
24439 * m4/atconfig.m4 (AT_CONFIG): Adjust to Autoconf 2.13.
24440 * src/files.c (tryopen, tryclose): Formatting changes.
24441 Move to the top and be static.
24442 * src/reader.c (read_signed_integer): Likewise.
24443 * tests/calc.m4: New file.
24444 * Makefile.am, suite.m4: Adjust.
24445 * m4/atconfig.m4: Set BISON_SIMPLE and BISON_HAIRY.
24446
24447 2000-09-18 Akim Demaille <akim@epita.fr>
24448
24449 Add support for an Autotest test suite for Bison.
24450
24451 * m4/m4.m4, m4/atconfig.m4: New files.
24452 * m4/Makefile.am (EXTRA_DIST): Adjust.
24453 * tests/suite.m4, tests/Makefile.am, tests/atgeneral.m4: New
24454 files.
24455 * src/getargs.c: Display a more standard --version message.
24456 * src/reader.c (reader): Formatting changes.
24457 No longer depend upon VERSION_STRING.
24458 * configure.in: No longer use `dnl'.
24459 Set up the test suite and the new directory `tests/.
24460 (VERSION_STRING): Remove.
24461
24462 2000-04-14 Akim Demaille <akim@epita.fr>
24463
24464 * src/reader.c (copy_comment2): New function, same as former
24465 `copy_comment', but outputs into two FILE *.
24466 (copy_comment): Use it.
24467 (parse_union_decl): Use it.
24468 (get_type, parse_start_decl): Use the same `invalid' message.
24469 (parse_start_decl, parse_union_decl): Use the same `multiple'
24470 message.
24471 (parse_union_decl, copy_guard, copy_action): Use the same
24472 `unmatched' message.
24473 * m4/Makefile.am (EXTRA_DIST): Add `warning.m4'.
24474
24475 2000-03-31 Akim Demaille <akim@epita.fr>
24476
24477 * src/files.c (tryopen, tryclose): Move to the top.
24478 Be static.
24479
24480 2000-03-31 Akim Demaille <akim@epita.fr>
24481
24482 * src/main.c (main): Don't call `done', exit does it.
24483
24484 2000-03-31 Akim Demaille <akim@epita.fr>
24485
24486 * allocate.c: s/return (foo)/return foo/.
24487 * lalr.c: Likewise.
24488 * LR0.c: Likewise.
24489 * output.c: Likewise.
24490 * reader.c: Likewise.
24491 * symtab.c: Likewise.
24492 * vmsgetargs.c: Likewise.
24493
24494 2000-03-31 Akim Demaille <akim@epita.fr>
24495
24496 Clean up the error reporting functions.
24497
24498 * src/report.c: New file.
24499 * src/report.h: Likewise.
24500 * src/Makefile.am: Adjust.
24501 * m4/error.m4: New file.
24502 * m4/Makefile.am: Adjust.
24503 * configure.in (jm_PREREQ_ERROR): Call it.
24504 * src/main.c (int_to_string, banner, fatal_banner, warn_banner):
24505 Remove.
24506 (fatal, fatals): Remove. All callers use complain.c::fatal.
24507 (warn, warni, warns, warnss, warnss): Remove. All callers use
24508 complain.c::complain.
24509 (toomany): Remove, use fatal instead.
24510 * src/files.c (done): No argument, use complain_message_count.
24511 * src/main.c (main): Register `done' to `atexit'.
24512
24513 * src/getargs.c (usage): More `fputs', less `fprintf'.
24514
24515 2000-03-28 Akim Demaille <akim@epita.fr>
24516
24517 * lib/: New directory.
24518 * Makefile.am (SUBDIRS): Adjust.
24519 * configure.in: Adjust.
24520 (LIBOBJS): Although not used yet, AC_SUBST it, otherwise it's
24521 useless.
24522 * src/alloca.c: Moved to lib/.
24523 * src/getopt.c: Likewise.
24524 * src/getopt1.c: Likewise.
24525 * src/getopt.h: Likewise.
24526 * src/ansi2knr.c: Likewise.
24527 * src/ansi2knr.1: Likewise.
24528 * src/Makefile.am: Adjust.
24529 * lib/Makefile.am: New file.
24530
24531 2000-03-28 Akim Demaille <akim@epita.fr>
24532
24533 * src/getargs.c (usage): Refresh the help message.
24534
24535 2000-03-17 Akim Demaille <akim@epita.fr>
24536
24537 * src/getopt1.c: Updated from textutils 2.0e
24538 * src/getopt.c: Likewise.
24539 * src/getopt.h: Likewise.
24540
24541 2000-03-17 Akim Demaille <akim@epita.fr>
24542
24543 * src/Makefile.am (bison.simple): Fix the awk program: quote only
24544 the file name, not the whole `#line LINE FILE'.
24545
24546 2000-03-17 Akim Demaille <akim@epita.fr>
24547
24548 On syntax errors, report the token on which we choked.
24549
24550 * src/bison.s1 (yyparse): In the label yyerrlab, when
24551 YYERROR_VERBOSE, add yychar in msg.
24552
24553 2000-03-17 Akim Demaille <akim@epita.fr>
24554
24555 * src/reader.c (copy_at): New function.
24556 (copy_guard): Use it.
24557 (copy_action): Use it.
24558
24559 2000-03-17 Akim Demaille <akim@epita.fr>
24560
24561 Be kind to translators, save some useless translations.
24562
24563 * src/main.c (banner): New function.
24564 (fatal_banner): Use it.
24565 (warn_banner): Use it.
24566
24567 2000-03-17 Akim Demaille <akim@epita.fr>
24568
24569 * src/reader.c (copy_definition): Use copy_string and
24570 copy_comment. Removed now unused `match', `ended',
24571 `cplus_comment'.
24572 (copy_comment, copy_string): Moved, to be visible from
24573 copy_definition.
24574
24575 2000-03-17 Akim Demaille <akim@epita.fr>
24576
24577 * src/reader.c (copy_string): Declare `static inline'. No
24578 problems with inline, since it is checked by configure.
24579 (copy_comment): Likewise.
24580
24581 2000-03-17 Akim Demaille <akim@epita.fr>
24582
24583 * src/reader.c (packsymbols): Formatting changes.
24584
24585 2000-03-17 Akim Demaille <akim@epita.fr>
24586
24587 * src/reader.c (copy_comment): New function, factored out from:
24588 (copy_action): Use it. Removed now unused `match', `ended',
24589 `cplus_comment'.
24590 (copy_guard): Likewise.
24591
24592 2000-03-17 Akim Demaille <akim@epita.fr>
24593
24594 * src/reader.c (copy_string): New function, factored out from:
24595 (copy_action): Use it.
24596 (copy_guard): Likewise.
24597
24598 2000-03-17 Akim Demaille <akim@epita.fr>
24599
24600 Change the handling of @s so that they behave exactly like $s.
24601 There is now a pseudo variable @$ (readble and writable), location
24602 of the lhs of the rule (by default ranging from the location of
24603 the first symbol of the rhs, to the location of the last symbol,
24604 or, if the rhs is empty, YYLLOC).
24605
24606 * src/bison.s1 [YYLSP_NEEDED] (yyloc): New variable, twin of
24607 yyval.
24608 (yyparse): When providing a default semantic action, provide a
24609 default location action.
24610 (after the $): No longer change `*YYLSP', just stack YYLOC the
24611 same way you stack YYVAL.
24612 * src/reader.c (read_declarations): Use warns.
24613 (copy_guard, case '@'): Also recognize `@$', expanded as `YYLOC'.
24614 (copy_action, case '@'): Likewise.
24615 Use a standard error message, to save useless work from
24616 translators.
24617
24618 2000-03-17 Akim Demaille <akim@epita.fr>
24619
24620 * src/bison.s1: Formatting and cosmetics changes.
24621 * src/reader.c: Likewise.
24622 Update the Copyright notice.
24623
24624 2000-03-17 Akim Demaille <akim@epita.fr>
24625
24626 * src/bison.s1 (#line): All set to `#line' only, since the
24627 Makefile now handles them.
24628
24629 2000-03-16 Akim Demaille <akim@epita.fr>
24630
24631 * src/output.c (output_rule_data): Output the documentation of
24632 some of the tables.
24633 (Copyright notice): Update.
24634 Formatting changes.
24635
24636 2000-03-16 Akim Demaille <akim@epita.fr>
24637
24638 * src/bison.s1 [!YYDEBUG]: Define yydebug to 0. This allows to
24639 remove most `#if YYDEBUG != 0', since `if (yydebug)' is enough.
24640 One `#if YYDEBUG' remains, since it uses variables which are
24641 defined only if `YYDEBUG != 0'.
24642
24643 2000-03-16 Akim Demaille <akim@epita.fr>
24644
24645 * src/bison.s1 (yyparse): Reorganize the definitions of the stacks
24646 and related variables so that the similarities are highlighted.
24647
24648 2000-03-16 Akim Demaille <akim@epita.fr>
24649
24650 * src/bison.s1: Properly indent CPP directives.
24651
24652 2000-03-16 Akim Demaille <akim@epita.fr>
24653
24654 * src/bison.s1: Properly indent the `alloca' CPP section.
24655
24656 2000-03-16 Akim Demaille <akim@epita.fr>
24657
24658 Do not hard code values of directories in `configure.in'.
24659 Update the `configure' tool chain.
24660
24661 * configure.in (XPFILE, XPFILE1, LOCALEDIR): Remove, handled by
24662 src/makefile.am.
24663 (VERSION_STRING): Use the third arg of AC_DEFINE_UNQUOTED.
24664 (AC_OUTPUT): Add m4/Makefile.
24665 Bump to bison 1.28a, 1.29 has never been released.
24666 * acconfig.h (XPFILE, XPFILE1, LOCALEDIR): Remove, since they are
24667 handled via src/Makefile.am.
24668 (VERSION_STRING, PROTOTYPES, ENABLE_NLS, HAVE_CATGETS,
24669 HAVE_GETTEXT, HAVE_LC_MESSAGES, HAVE_STPCPY): Remove, handled by
24670 autoheader.
24671 * Makefile.am (SUBDIRS): Add m4.
24672 (ACLOCAL_AM_FLAGS): New variable.
24673 (AUTOMAKE_OPTIONS): Add check-news.
24674 * src/Makefile.am (bison.simple): Use awk to replace #line lines with
24675 the proper line number and file name.
24676 (DEFS): Propagate the location of bison library files and of the
24677 locale files.
24678 (INCLUDES): Added `-I ..' so that one can compile with srcdir !=
24679 builddir.
24680 * acinclude.m4: Remove, replaced by the directory m4.
24681 * m4/Makefile.am (EXTRA_DIST): New variable.
24682 * m4/gettext.m4: New file, from the fileutils.
24683 * m4/lcmessage.m4: Likewise
24684 * m4/progtest.m4: Likewise.
24685 * m4/bison-decl.m4: New file, extracted from former acinclude.m4.
24686
24687 2000-03-10 Akim Demaille <akim@epita.fr>
24688
24689 * src/closure.c:
24690 Formatting changes of various comments.
24691 Respect the GNU coding standards at various places.
24692 Don't use `_()' when no translation is needed.
24693
24694 1999-12-13 Jesse Thilo <jthilo@gnu.org>
24695
24696 * src/files.c:
24697 OS/2 honors TMPDIR environment variable.
24698
24699 1999-12-13 Jesse Thilo <jthilo@gnu.org>
24700
24701 * doc/bison.texinfo: Tweaked spelling and grammar.
24702 Updated ISBN.
24703 Removed reference to price of printed copy.
24704 Mention BISON_SIMPLE and BISON_HAIRY.
24705
24706 1999-12-13 Jesse Thilo <jthilo@gnu.org>
24707
24708 * configure.in, NEWS:
24709 Bison 1.29 released.
24710
24711 1999-10-27 Jesse Thilo <jthilo@gnu.org>
24712
24713 * doc/.cvsignore, doc/Makefile.am, doc/refcard.tex:
24714 Added reference card.
24715
24716 1999-07-26 Jesse Thilo <jthilo@gnu.org>
24717
24718 * po/ru.po: Added Russian translation.
24719
24720 1999-07-26 Jesse Thilo <jthilo@gnu.org>
24721
24722 * configure.in: Added Russian translation.
24723
24724 1999-07-06 Jesse Thilo <jthilo@gnu.org>
24725
24726 * configure.in, NEWS, README:
24727 Released version 1.28.
24728
24729 1999-06-14 Jesse Thilo <jthilo@gnu.org>
24730
24731 * src/system.h:
24732 Squashed redefinition warning on some systems.
24733
24734 * src/getargs.c, src/Makefile.am, src/reader.c, src/version.c:
24735 Have configure build version string instead of relying on ANSI string
24736 concatentation.
24737
24738 1999-06-14 Jesse Thilo <jthilo@gnu.org>
24739
24740 * po/POTFILES.in: Got rid of version.c.
24741
24742 1999-06-14 Jesse Thilo <jthilo@gnu.org>
24743
24744 * acconfig.h, configure.in:
24745 Have configure build version string instead of relying on ANSI string
24746 concatentation.
24747
24748 1999-06-08 Jesse Thilo <jthilo@gnu.org>
24749
24750 * doc/bison.1:
24751 Dropped mention of `+' for long-named options.
24752
24753 1999-05-30 Jesse Thilo <jthilo@gnu.org>
24754
24755 * src/files.c: Added <unistd.h> for unlink().
24756
24757 * src/Makefile.am, src/system.h:
24758 I18n fixes.
24759
24760 1999-05-30 Jesse Thilo <jthilo@gnu.org>
24761
24762 * README: Added a FAQ list.
24763
24764 * configure.in, acconfig.h:
24765 I18n fixes.
24766
24767 1999-05-30 Jesse Thilo <jthilo@gnu.org>
24768
24769 * doc/FAQ, doc/Makefile.am:
24770 Added a FAQ list.
24771
24772 1999-05-19 Jesse Thilo <jthilo@gnu.org>
24773
24774 * src/alloc.h, src/symtab.h, src/version.c:
24775 Protected inclusion of "config.h" with HAVE_CONFIG_H.
24776
24777 1999-04-18 Jesse Thilo <jthilo@gnu.org>
24778
24779 * src/.cvsignore, src/Makefile.am:
24780 Reorganized: sources in `src', documentation in `doc'.
24781
24782 * src/lex.c (literalchar):
24783 fixed the code for escaping double quotes (thanks
24784 Jonathan Czisny.)
24785
24786 1999-04-18 Jesse Thilo <jthilo@gnu.org>
24787
24788 * po/de.po, po/es.po, po/fr.po, po/nl.po, po/POTFILES.in:
24789 Adjusted paths to reflect directory reorganization.
24790
24791 1999-04-18 Jesse Thilo <jthilo@gnu.org>
24792
24793 * doc/.cvsignore, doc/Makefile.am:
24794 Reorganized: sources in `src', documentation in `doc'.
24795
24796 1999-04-18 Jesse Thilo <jthilo@gnu.org>
24797
24798 * configure.in:
24799 Updated AC_INIT file to reflect directory reorganization.
24800
24801 * configure.in, .cvsignore, Makefile.am, POTFILES.in:
24802 Reorganized: sources in `src', documentation in `doc'.
24803
24804 1999-04-13 Jesse Thilo <jthilo@gnu.org>
24805
24806 * src/allocate.c:
24807 Don't declare calloc() and realloc() if not necessary.
24808
24809 1999-04-13 Jesse Thilo <jthilo@gnu.org>
24810
24811 * configure.in, acconfig.h, acinclude.m4:
24812 Don't declare calloc() and realloc() if not necessary.
24813
24814 1999-03-23 Jesse Thilo <jthilo@gnu.org>
24815
24816 * po/.cvsignore: Added i18n support.
24817
24818 1999-03-23 Jesse Thilo <jthilo@gnu.org>
24819
24820 * acconfig.h, configure.in, Makefile.am:
24821 Added i18n support.
24822
24823 1999-03-22 Jesse Thilo <jthilo@gnu.org>
24824
24825 * src/bison.s1: Fixed #line numbers.
24826
24827 1999-03-15 Jesse Thilo <jthilo@gnu.org>
24828
24829 * po/es.po, po/fr.po, po/nl.po, po/de.po:
24830 Added PO files from Translation Project.
24831
24832 1999-03-03 Jesse Thilo <jthilo@gnu.org>
24833
24834 * Makefile.am:
24835 Added support for non-ANSI compilers (ansi2knr).
24836
24837 1999-02-16 Jesse Thilo <jthilo@gnu.org>
24838
24839 * configure.in: Bumped version number to 1.27.
24840
24841 * Makefile.am:
24842 Added `bison.simple' to list of files removed by `make distclean'.
24843
24844 1999-02-12 Jesse Thilo <jthilo@gnu.org>
24845
24846 * src/files.c, src/files.h:
24847 Defined locations of parser files in config.h instead of Makefile.
24848
24849 1999-02-12 Jesse Thilo <jthilo@gnu.org>
24850
24851 * acconfig.h, acinclude.m4, configure.in, Makefile.am:
24852 Defined locations of parser files in config.h instead of Makefile.
24853
24854 1999-02-09 Jesse Thilo <jthilo@gnu.org>
24855
24856 * Makefile.am:
24857 Removed inappropriate use of $< macro.
24858
24859 1999-02-05 Jesse Thilo <jthilo@gnu.org>
24860
24861 * po/Makefile.in.in, po/POTFILES.in:
24862 Add `po' directory skeleton.
24863
24864 1999-01-27 Jesse Thilo <jthilo@gnu.org>
24865
24866 * README: Document help-bison list.
24867
24868 * configure.in: Add check for mkstemp().
24869
24870 1999-01-20 Jesse Thilo <jthilo@gnu.org>
24871
24872 * src/conflicts.c, src/LR0.c, src/output.c, src/reader.c:
24873 Hush a few compiler warnings.
24874
24875 * src/files.c:
24876 Add tryclose(), which verifies that fclose was successful.
24877 Hush a couple of compiler warnings.
24878
24879 1999-01-20 Jesse Thilo <jthilo@gnu.org>
24880
24881 * Makefile.am, OChangeLog:
24882 ChangeLog is now automatically generated. Include the old version as
24883 OChangeLog.
24884
24885 1999-01-14 Jesse Thilo <jthilo@gnu.org>
24886
24887 * 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:
24888 Update FSF address.
24889
24890 1999-01-14 Jesse Thilo <jthilo@gnu.org>
24891
24892 * doc/bison.texinfo: Fix formatting glitch.
24893
24894 * doc/bison.texinfo: Update FSF address.
24895
24896 1999-01-14 Jesse Thilo <jthilo@gnu.org>
24897
24898 * acconfig.h: Update FSF address.
24899
24900 1999-01-08 Jesse Thilo <jthilo@gnu.org>
24901
24902 * src/system.h:
24903 Don't define PACKAGE here, since config.h defines it.
24904
24905 1998-12-30 Jesse Thilo <jthilo@gnu.org>
24906
24907 * src/reader.c: Update copyright date.
24908
24909 * src/main.c:
24910 Ditch sprintf to statically-sized buffers in fatal/warn functions in
24911 favor of output directly to stderr (avoids buffer overruns).
24912
24913 * src/reader.c: Some checks for premature EOF.
24914
24915 * 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:
24916 Use prototypes if the compiler understands them.
24917
24918 * src/files.c: Honor TMPDIR on Unix hosts.
24919 Use prototypes if the compiler understands them.
24920
24921 * src/reader.c:
24922 Fix a couple of buffer overrun bugs.
24923 Use prototypes if the compiler understands them.
24924
24925 * src/system.h: Include unistd.h and ctype.h.
24926 Use #ifdef instead of #if for NLS symbols.
24927
24928 1998-12-30 Jesse Thilo <jthilo@gnu.org>
24929
24930 * doc/bison.texinfo:
24931 Delete comment "consider using @set for edition number, etc..." since
24932 we now are doing so.
24933
24934 1998-12-30 Jesse Thilo <jthilo@gnu.org>
24935
24936 * configure.in:
24937 Use prototypes if the compiler understands them.
24938
24939 * NEWS: Document 1.26 highlights.
24940
24941 * Makefile.am: Require Automake 1.3 or later.
24942
24943 * acconfig.h:
24944 Use prototypes if the compiler understands them.
24945
24946 1998-12-29 Jesse Thilo <jthilo@gnu.org>
24947
24948 * src/version.c:
24949 Use VERSION symbol from automake for version number.
24950
24951 1998-12-29 Jesse Thilo <jthilo@gnu.org>
24952
24953 * acconfig.h, configure.in, version.cin:
24954 Use VERSION symbol from automake for version number.
24955
24956 1998-11-28 Jesse Thilo <jthilo@gnu.org>
24957
24958 * Makefile.am:
24959 Distribute original version of simple parser (bison.s1), not built
24960 version (bison.simple).
24961
24962 1998-11-28 Jesse Thilo <jthilo@gnu.org>
24963
24964 * doc/bison.texinfo: Add info dir entry.
24965
24966 * doc/bison.texinfo:
24967 Let automake put version number into documentation.
24968
24969 1998-11-26 Jesse Thilo <jthilo@gnu.org>
24970
24971 * src/bison.cld, src/build.com, src/vmshlp.mar:
24972 Add non-RCS files from /gd/gnu/bison.
24973
24974 1998-11-26 Jesse Thilo <jthilo@gnu.org>
24975
24976 * doc/bison.1:
24977 Document the BISON_HAIRY and BISON_SIMPLE variables.
24978
24979 1998-11-25 Jesse Thilo <jthilo@gnu.org>
24980
24981 * src/version.c: Build version.c automatically.
24982
24983 * src/reader.c:
24984 Fix token numbering (used to start at 258, not 257).
24985
24986 * src/system.h: Include config.h.
24987
24988 * src/getargs.c: Update bug report address.
24989
24990 * src/alloca.c, src/getopt1.c, src/getopt.c, src/getopt.h:
24991 Get latest copies of alloca.c, getopt.c, getopt.h, getopt1.c from gnu.org.
24992
24993 1998-11-25 Jesse Thilo <jthilo@gnu.org>
24994
24995 * Makefile.am:
24996 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
24997
24998 * configure.in, version.cin:
24999 Build version.c automatically.
25000
25001 * AUTHORS: Add AUTHORS file.
25002
25003 * README: Update bug report address.
25004
25005 * bison.simple:
25006 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
25007
25008 * configure.in, Makefile.am, Makefile.in, stamp-h.in:
25009 Add automake stuff.
25010
25011 1998-11-25 Jesse Thilo <jthilo@gnu.org>
25012
25013 * doc/bison.texinfo: Clean up some formatting.
25014
25015 1998-05-05 Richard Stallman <rms@gnu.org>
25016
25017 * doc/bison.texinfo:
25018 Explain better why to make a pure parser.
25019
25020 1998-01-05 Richard Stallman <rms@gnu.org>
25021
25022 * src/files.c (openfiles):
25023 [_WIN32 && !__CYGWIN32__] Use TEMP or Temp to
25024 find a temporary directory, if possible. Do not unlink files while
25025 they are open.
25026
25027 1997-08-25 Richard Stallman <rms@gnu.org>
25028
25029 * src/reader.c (stack_offset;):
25030 Change some warni to warns.
25031
25032 * src/lex.c (literalchar): Use warns, not warni.
25033
25034 1997-06-28 Richard Stallman <rms@gnu.org>
25035
25036 * src/bison.s1: Add a Bison version comment.
25037
25038 * src/main.c (fatal, warn, berror):
25039 Use program_name.
25040
25041 1997-06-28 Richard Stallman <rms@gnu.org>
25042
25043 * Makefile.in (bison_version): New variable.
25044 (dist): Use that variable.
25045 (bison.s1): Substitute the Bison version into bison.simple.
25046
25047 * bison.simple: Add a Bison version comment.
25048
25049 1997-06-18 Richard Stallman <rms@gnu.org>
25050
25051 * src/main.c (fatal, warn, berror):
25052 Make error messages standard.
25053 (toomany): Improve error message text.
25054
25055 * 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:
25056 new.h renamed to alloc.h.
25057
25058 1997-06-18 Richard Stallman <rms@gnu.org>
25059
25060 * Makefile.in: new.h renamed to alloc.h.
25061
25062 1997-05-24 Richard Stallman <rms@gnu.org>
25063
25064 * src/lex.c (literalchar):
25065 Fix the code for escaping \, " and '.
25066
25067 (lex): Avoid trouble when there are many chars
25068 to discard in a char literal with just several chars in it.
25069
25070 1997-05-17 Richard Stallman <rms@gnu.org>
25071
25072 * src/bison.s1:
25073 Use malloc, if using alloca is troublesome.
25074 (YYSTACK_USE_ALLOCA): New flag macro.
25075 Define it for some systems and compilers.
25076 (YYSTACK_ALLOC): New macro.
25077 (yyparse): Use YYSTACK_ALLOC to allocate stack.
25078 If it was malloc'd, free it.
25079
25080 1997-05-17 Richard Stallman <rms@gnu.org>
25081
25082 * bison.simple:
25083 Use malloc, if using alloca is troublesome.
25084 (YYSTACK_USE_ALLOCA): New flag macro.
25085 Define it for some systems and compilers.
25086 (YYSTACK_ALLOC): New macro.
25087 (yyparse): Use YYSTACK_ALLOC to allocate stack.
25088 If it was malloc'd, free it.
25089
25090 1997-04-23 Richard Stallman <rms@gnu.org>
25091
25092 * src/bison.s1:
25093 (alloca) [__hpux]: Always define as __builtin_alloca.
25094
25095 1997-04-23 Richard Stallman <rms@gnu.org>
25096
25097 * bison.simple:
25098 (alloca) [__hpux]: Always define as __builtin_alloca.
25099
25100 1997-04-22 Richard Stallman <rms@gnu.org>
25101
25102 * src/bison.s1:
25103 [__hpux]: Include alloca.h (right for HPUX 10)
25104 instead of declaring alloca (right for HPUX 9).
25105
25106 * src/bison.s1 (__yy_memcpy):
25107 Declare arg `count' as unsigned int.
25108 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
25109
25110 1997-04-22 Richard Stallman <rms@gnu.org>
25111
25112 * bison.simple:
25113 [__hpux]: Include alloca.h (right for HPUX 10)
25114 instead of declaring alloca (right for HPUX 9).
25115
25116 * bison.simple (__yy_memcpy):
25117 Declare arg `count' as unsigned int.
25118 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
25119
25120 1997-01-03 Richard Stallman <rms@gnu.org>
25121
25122 * src/allocate.c: [__STDC__ or _MSC_VER]:
25123 Declare calloc and realloc to return void *.
25124
25125 1997-01-02 Richard Stallman <rms@gnu.org>
25126
25127 * src/system.h:
25128 [_MSC_VER]: Include stdlib.h and process.h.
25129 [_MSC_VER] (getpid): Define as macro--translate it to _getpid.
25130
25131 * src/main.c (main): Return FAILURE as a value.
25132 (printable_version): Declare arg as int, not char.
25133
25134 1997-01-02 Richard Stallman <rms@gnu.org>
25135
25136 * Makefile.in (dist):
25137 Explicitly check for symlinks, and copy them.
25138
25139 1996-12-19 Richard Stallman <rms@gnu.org>
25140
25141 * src/files.c:
25142 [_MSC_VER] (XPFILE, XPFILE1): Define, if not already defined.
25143
25144 1996-12-18 Paul Eggert <eggert@gnu.org>
25145
25146 * src/bison.s1 (yyparse):
25147 If __GNUC__ and YYPARSE_PARAM are both defined,
25148 declare yyparse to have a void * argument.
25149
25150 1996-12-18 Paul Eggert <eggert@gnu.org>
25151
25152 * bison.simple (yyparse):
25153 If __GNUC__ and YYPARSE_PARAM are both defined,
25154 declare yyparse to have a void * argument.
25155
25156 1996-12-17 Richard Stallman <rms@gnu.org>
25157
25158 * src/reduce.c (nbits): Add some casts.
25159
25160 1996-08-12 Richard Stallman <rms@gnu.org>
25161
25162 * src/bison.s1: Test _MSDOS as well as _MSDOS_.
25163
25164 1996-08-12 Richard Stallman <rms@gnu.org>
25165
25166 * bison.simple: Test _MSDOS as well as _MSDOS_.
25167
25168 1996-07-31 Richard Stallman <rms@gnu.org>
25169
25170 * src/bison.s1:
25171 [__sun && __i386]: Include alloca.h.
25172
25173 1996-07-31 Richard Stallman <rms@gnu.org>
25174
25175 * bison.simple:
25176 [__sun && __i386]: Include alloca.h.
25177
25178 1996-07-30 Richard Stallman <rms@gnu.org>
25179
25180 * src/bison.s1: Comment change.
25181
25182 * src/bison.s1: Test _MSDOS_, not MSDOS.
25183
25184 1996-07-30 Richard Stallman <rms@gnu.org>
25185
25186 * bison.simple: Comment change.
25187
25188 * bison.simple: Test _MSDOS_, not MSDOS.
25189
25190 1996-06-01 Richard Stallman <rms@gnu.org>
25191
25192 * 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:
25193 Insert `_' macro around many string constants.
25194
25195 * src/main.c:
25196 Insert `_' macro around many string constants.
25197
25198 (main): Call setlocale, bindtextdomain and textdomain.
25199
25200 * src/system.h: [HAVE_LOCALE_H]: Include locale.h.
25201 [! HAVE_LOCALE_H] (setlocale): Define as no-op.
25202 [ENABLE_NLS]: Include libintl.h.
25203 [ENABLE_NLS] (gettext): Define.
25204 [! ENABLE_NLS] (bintextdomain, textdomain, _): Consolation definitions.
25205 (N_, PACKAGE, LOCALEDIR): New macros.
25206
25207 1996-06-01 Richard Stallman <rms@gnu.org>
25208
25209 * POTFILES.in: New file.
25210
25211 * Makefile.in (allocate.o):
25212 Define target explicitly.
25213
25214 * Makefile.in (CFLAGS): Set to @CFLAGS@.
25215 (LDFLAGS): Set to @LDFLAGS@.
25216 (configure): Run autoconf only if preceding `cd' succeeds.
25217 (bison.s1): Redirect output to temporary file then move the
25218 temporary to the target, rather than redirecting directly to bison.s1.
25219 (clean): Remove config.status and config.log.
25220 (distclean): Don't remove config.status here.
25221
25222 1996-05-12 Richard Stallman <rms@gnu.org>
25223
25224 * src/bison.s1:
25225 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
25226
25227 1996-05-12 Richard Stallman <rms@gnu.org>
25228
25229 * bison.simple:
25230 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
25231
25232 1996-05-11 Richard Stallman <rms@gnu.org>
25233
25234 * src/bison.s1 (__yy_memcpy):
25235 Really reorder the args, as was supposedly done on Feb 14 1995.
25236 (yyparse): Calls changed accordingly.
25237
25238 1996-05-11 Richard Stallman <rms@gnu.org>
25239
25240 * Makefile.in (dist): Don't use $(srcdir).
25241
25242 * bison.simple (__yy_memcpy):
25243 Really reorder the args, as was supposedly done on Feb 14 1995.
25244 (yyparse): Calls changed accordingly.
25245
25246 1996-01-27 Richard Stallman <rms@gnu.org>
25247
25248 * src/output.c (output_rule_data):
25249 Test YYERROR_VERBOSE in the conditional
25250 around the definition of ttyname.
25251
25252 1995-12-29 Richard Stallman <rms@gnu.org>
25253
25254 * src/bison.s1:
25255 Fix line numbers in #line commands.
25256
25257 1995-12-29 Richard Stallman <rms@gnu.org>
25258
25259 * bison.simple:
25260 Fix line numbers in #line commands.
25261
25262 1995-12-27 Richard Stallman <rms@gnu.org>
25263
25264 * src/bison.s1 (YYPARSE_PARAM_DECL):
25265 In C++, make it always null.
25266 (YYPARSE_PARAM_ARG): New macro.
25267 (yyparse): Use YYPARSE_PARAM_ARG.
25268
25269 1995-12-27 Richard Stallman <rms@gnu.org>
25270
25271 * bison.simple (YYPARSE_PARAM_DECL):
25272 In C++, make it always null.
25273 (YYPARSE_PARAM_ARG): New macro.
25274 (yyparse): Use YYPARSE_PARAM_ARG.
25275
25276 1995-11-29 Richard Stallman <rms@gnu.org>
25277
25278 * doc/bison.texinfo:
25279 Describe literal string tokens, %raw, %no_lines, %token_table.
25280
25281 1995-11-29 Daniel Hagerty <hag@gnu.org>
25282
25283 * doc/bison.texinfo: Fixed update date
25284
25285 1995-10-16 Richard Stallman <rms@gnu.org>
25286
25287 * src/version.c: Version 1.25.
25288
25289 1995-10-16 Richard Stallman <rms@gnu.org>
25290
25291 * NEWS: *** empty log message ***
25292
25293 1995-10-16 Richard Stallman <rms@gnu.org>
25294
25295 * doc/bison.1, doc/bison.rnh:
25296 Add new options.
25297
25298 1995-10-15 Richard Stallman <rms@gnu.org>
25299
25300 * src/vmsgetargs.c, src/getargs.c:
25301 Added -n, -k, and -raw switches.
25302 (noparserflag, toknumflag, rawtoknumflag): New variables.
25303
25304 * src/symtab.h (SALIAS):
25305 New #define for adding aliases to %token.
25306 (struct bucket): Added `alias' field.
25307
25308 * src/reduce.c (reduce_grammar):
25309 Revise error message.
25310 (print_notices): Remove final `.' from error message.
25311
25312 * src/reader.c (reader_output_yylsp):
25313 New function.
25314 (readgram): Use `#if 0' around code that accepted %command
25315 inside grammar rules: The documentation doesn't allow it,
25316 and it will fail since the %command processors scan for the next %.
25317 (parse_token_decl): Extended the %token
25318 declaration to allow a multi-character symbol as an alias.
25319 (parse_thong_decl): New function.
25320 (read_declarations): Added %thong declarations.
25321 (read_declarations): Handle NOOP to deal with allowing
25322 % declarations as another means to specify the flags.
25323 (readgram): Allow %prec prior to semantics embedded in a rule.
25324 (skip_to_char, read_declarations, copy_definition)
25325 (parse_token_decl, parse_start_decl, parse_type_decl)
25326 (parse_assoc_decl, parse_union_decl, parse_expect_decl)
25327 (get_type_name, copy_guard, copy_action, readgram)
25328 (get_type, packsymbols): Revised most error messages.
25329 Changed `fatal' to `warnxxx' to avoid aborting for error.
25330 Revised and use multiple warnxxx functions to avoid using VARARGS1.
25331 (read_declarations): Improve the error message for
25332 an invalid character. Do not abort.
25333 (read_declarations, copy_guard, copy_action): Use
25334 printable_version to avoid unprintable characters in printed output.
25335 (parse_expect_decl): Error if argument to %expect exceeds 10 digits.
25336 (parse_token_decl, parse_assoc_decl, parse_type_decl, get_type):
25337 Allow the type of a non-terminal can be given
25338 more than once, as long as all specifications give the same type.
25339
25340 * src/output.c:
25341 (output_headers, output_trailers, output, output_gram)
25342 (output_rule_data): Implement noparserflag variable.
25343 Implement toknumflag variable.
25344 (output): Call reader_output_yylsp to output LTYPESTR.
25345
25346 * src/main.c (main):
25347 If reader sees an error, don't process the grammar.
25348 (fatals): Updated to not use VARARGS1.
25349 (printable_version, int_to_string, warn, warni, warns, warnss)
25350 (warnsss): New error reporting functions. Avoid abort for error.
25351
25352 * src/lex.h:
25353 Added THONG and NOOP for alias processing.
25354 Added SETOPT for the new code that allows setting options with %flags.
25355
25356 * src/lex.c:
25357 Include getopt.h. Add some extern decls.
25358 (safegetc): New function to deal with EOF gracefully.
25359 (literalchar); new function to deal with reading \ escapes.
25360 (lex): Use literalchar.
25361 (lex): Implemented "..." tokens.
25362 (literalchar, lex, parse_percent_token): Made tokenbuffer
25363 always contain the token. This includes growing the token
25364 buffer while reading an integer.
25365 (parse_percent_token): Replaced if-else statement with percent_table.
25366 (parse_percent_token): Added % declarations as another
25367 way to specify the flags -n, -l, and -r. Also added hooks for
25368 -d, -k, -y, -v, -t, -p, -b, -o, but implementation requires
25369 major changes to files.c.
25370 (lex) Retain in the incoming stream a character following
25371 an incorrect '/'.
25372 (skip_white_space, lex): Revised most error messages
25373 and changed fatal to warn to avoid aborting.
25374 (percent_table): Added %thong declarations.
25375
25376 * src/gram.h: Comment changes.
25377
25378 * src/files.c (openfiles, open_extra_files, done):
25379 Add faction flag
25380 and actfile file. Handle noparserflag. Both for -n switch.
25381
25382 * src/conflicts.c (resolve_sr_conflict):
25383 Remove use of alloca.
25384
25385 1995-06-01 Jim Meyering <meyering@gnu.org>
25386
25387 * doc/bison.texinfo: *** empty log message ***
25388
25389 1995-05-06 Richard Stallman <rms@gnu.org>
25390
25391 * src/bison.s1: Comment change.
25392
25393 1995-05-06 Richard Stallman <rms@gnu.org>
25394
25395 * bison.simple: Comment change.
25396
25397 1995-05-03 Richard Stallman <rms@gnu.org>
25398
25399 * src/version.c: Version now 1.24.
25400
25401 * src/bison.s1: Change distribution terms.
25402
25403 * src/version.c: Version now 1.23.
25404
25405 1995-05-03 Richard Stallman <rms@gnu.org>
25406
25407 * doc/bison.texinfo:
25408 Rewrite "Conditions for Using Bison".
25409 Update version to 1.24.
25410
25411 1995-05-03 Richard Stallman <rms@gnu.org>
25412
25413 * bison.simple: Change distribution terms.
25414
25415 1995-02-23 Richard Stallman <rms@gnu.org>
25416
25417 * src/files.c: Test __VMS_POSIX as well as VMS.
25418
25419 1995-02-14 Jim Meyering <meyering@gnu.org>
25420
25421 * src/bison.s1 (__yy_memcpy):
25422 Renamed from __yy_bcopy to avoid
25423 confusion. Reverse FROM and TO arguments to be consistent with
25424 those of memcpy.
25425
25426 1995-02-14 Jim Meyering <meyering@gnu.org>
25427
25428 * bison.simple (__yy_memcpy):
25429 Renamed from __yy_bcopy to avoid
25430 confusion. Reverse FROM and TO arguments to be consistent with
25431 those of memcpy.
25432
25433 1994-11-10 David J. MacKenzie <djm@gnu.org>
25434
25435 * NEWS: reformat
25436
25437 * NEWS: New file.
25438
25439 * Makefile.in (DISTFILES): Include NEWS.
25440
25441 * Makefile.in (DISTFILES):
25442 Include install-sh, not install.sh.
25443
25444 * configure.in: Update to Autoconf v2 macro names.
25445
25446 1994-10-05 David J. MacKenzie <djm@gnu.org>
25447
25448 * Makefile.in: fix typo
25449
25450 * Makefile.in (prefix, exec_prefix):
25451 Let configure set them.
25452
25453 1994-09-28 David J. MacKenzie <djm@gnu.org>
25454
25455 * Makefile.in: Set datadir to $(prefix)/share.
25456
25457 1994-09-15 Richard Stallman <rms@gnu.org>
25458
25459 * src/bison.s1:
25460 Update copyright notice and GPL version.
25461
25462 1994-09-15 Richard Stallman <rms@gnu.org>
25463
25464 * bison.simple:
25465 Update copyright notice and GPL version.
25466
25467 1994-07-12 Richard Stallman <rms@gnu.org>
25468
25469 * src/reduce.c, src/reader.c:
25470 entered into RCS
25471
25472 1994-05-05 David J. MacKenzie <djm@gnu.org>
25473
25474 * Makefile.in: entered into RCS
25475
25476 1994-03-26 Richard Stallman <rms@gnu.org>
25477
25478 * src/bison.s1: entered into RCS
25479
25480 1994-03-26 Richard Stallman <rms@gnu.org>
25481
25482 * bison.simple: entered into RCS
25483
25484 1994-03-25 Richard Stallman <rms@gnu.org>
25485
25486 * src/main.c: entered into RCS
25487
25488 1994-03-24 Richard Stallman <rms@gnu.org>
25489
25490 * src/conflicts.c: entered into RCS
25491
25492 1994-01-02 Richard Stallman <rms@gnu.org>
25493
25494 * Makefile.in: *** empty log message ***
25495
25496 1993-11-21 Richard Stallman <rms@gnu.org>
25497
25498 * src/bison.s1: *** empty log message ***
25499
25500 1993-11-21 Richard Stallman <rms@gnu.org>
25501
25502 * doc/bison.texinfo: entered into RCS
25503
25504 * doc/bison.texinfo: *** empty log message ***
25505
25506 1993-11-21 Richard Stallman <rms@gnu.org>
25507
25508 * bison.simple: *** empty log message ***
25509
25510 1993-10-25 David J. MacKenzie <djm@gnu.org>
25511
25512 * doc/bison.texinfo: *** empty log message ***
25513
25514 1993-10-19 Richard Stallman <rms@gnu.org>
25515
25516 * src/bison.s1: *** empty log message ***
25517
25518 1993-10-19 Richard Stallman <rms@gnu.org>
25519
25520 * bison.simple: *** empty log message ***
25521
25522 1993-10-14 Richard Stallman <rms@gnu.org>
25523
25524 * src/bison.s1: *** empty log message ***
25525
25526 1993-10-14 Richard Stallman <rms@gnu.org>
25527
25528 * bison.simple: *** empty log message ***
25529
25530 1993-09-14 David J. MacKenzie <djm@gnu.org>
25531
25532 * doc/bison.texinfo: *** empty log message ***
25533
25534 1993-09-13 Noah Friedman <friedman@gnu.org>
25535
25536 * Makefile.in: *** empty log message ***
25537
25538 1993-09-10 Richard Stallman <rms@gnu.org>
25539
25540 * src/conflicts.c: *** empty log message ***
25541
25542 * src/system.h: entered into RCS
25543
25544 1993-09-10 Richard Stallman <rms@gnu.org>
25545
25546 * doc/bison.1: entered into RCS
25547
25548 1993-09-06 Noah Friedman <friedman@gnu.org>
25549
25550 * src/version.c: entered into RCS
25551
25552 1993-09-06 Noah Friedman <friedman@gnu.org>
25553
25554 * Makefile.in: *** empty log message ***
25555
25556 1993-07-30 David J. MacKenzie <djm@gnu.org>
25557
25558 * Makefile.in: *** empty log message ***
25559
25560 1993-07-24 Richard Stallman <rms@gnu.org>
25561
25562 * src/bison.s1: *** empty log message ***
25563
25564 1993-07-24 Richard Stallman <rms@gnu.org>
25565
25566 * bison.simple: *** empty log message ***
25567
25568 1993-07-08 David J. MacKenzie <djm@gnu.org>
25569
25570 * Makefile.in: *** empty log message ***
25571
25572 1993-07-04 Richard Stallman <rms@gnu.org>
25573
25574 * src/bison.s1: *** empty log message ***
25575
25576 1993-07-04 Richard Stallman <rms@gnu.org>
25577
25578 * bison.simple: *** empty log message ***
25579
25580 1993-06-26 David J. MacKenzie <djm@gnu.org>
25581
25582 * src/getargs.c: entered into RCS
25583
25584 1993-06-26 David J. MacKenzie <djm@gnu.org>
25585
25586 * doc/bison.texinfo: *** empty log message ***
25587
25588 * doc/bison.1: New file.
25589
25590 1993-06-25 Richard Stallman <rms@gnu.org>
25591
25592 * src/getargs.c: New file.
25593
25594 1993-06-16 Richard Stallman <rms@gnu.org>
25595
25596 * src/bison.s1: *** empty log message ***
25597
25598 1993-06-16 Richard Stallman <rms@gnu.org>
25599
25600 * bison.simple: *** empty log message ***
25601
25602 1993-06-03 Richard Stallman <rms@gnu.org>
25603
25604 * src/bison.s1: New file.
25605
25606 1993-06-03 Richard Stallman <rms@gnu.org>
25607
25608 * doc/bison.texinfo: *** empty log message ***
25609
25610 1993-06-03 Richard Stallman <rms@gnu.org>
25611
25612 * bison.simple: New file.
25613
25614 1993-05-19 Richard Stallman <rms@gnu.org>
25615
25616 * doc/bison.texinfo: New file.
25617
25618 1993-05-07 Noah Friedman <friedman@gnu.org>
25619
25620 * Makefile.in: *** empty log message ***
25621
25622 1993-04-28 Noah Friedman <friedman@gnu.org>
25623
25624 * src/reader.c: *** empty log message ***
25625
25626 1993-04-23 Noah Friedman <friedman@gnu.org>
25627
25628 * src/alloc.h: entered into RCS
25629
25630 1993-04-20 David J. MacKenzie <djm@gnu.org>
25631
25632 * src/version.c: *** empty log message ***
25633
25634 * src/files.c, src/allocate.c:
25635 entered into RCS
25636
25637 * src/reader.c: *** empty log message ***
25638
25639 * src/lex.c: entered into RCS
25640
25641 * src/conflicts.c: New file.
25642
25643 * src/symtab.c: entered into RCS
25644
25645 * src/alloc.h: New file.
25646
25647 * src/LR0.c: entered into RCS
25648
25649 1993-04-18 Noah Friedman <friedman@gnu.org>
25650
25651 * src/reader.c: New file.
25652
25653 * src/version.c: *** empty log message ***
25654
25655 1993-04-18 Noah Friedman <friedman@gnu.org>
25656
25657 * Makefile.in: *** empty log message ***
25658
25659 1993-04-17 Noah Friedman <friedman@gnu.org>
25660
25661 * Makefile.in: *** empty log message ***
25662
25663 1993-04-15 Richard Stallman <rms@gnu.org>
25664
25665 * src/main.c, src/files.c:
25666 New file.
25667
25668 1993-04-15 Noah Friedman <friedman@gnu.org>
25669
25670 * configure.in: entered into RCS
25671
25672 * configure.in: *** empty log message ***
25673
25674 * configure.in: New file.
25675
25676 1993-04-14 Richard Stallman <rms@gnu.org>
25677
25678 * Makefile.in: New file.
25679
25680 1993-04-13 Richard Stallman <rms@gnu.org>
25681
25682 * src/version.c: New file.
25683
25684 1993-03-25 Richard Stallman <rms@gnu.org>
25685
25686 * src/output.c: entered into RCS
25687
25688 1992-09-25 Richard Stallman <rms@gnu.org>
25689
25690 * configure.bat: entered into RCS
25691
25692 1992-06-22 Richard Stallman <rms@gnu.org>
25693
25694 * src/vmsgetargs.c: entered into RCS
25695
25696 1992-06-22 Richard Stallman <rms@gnu.org>
25697
25698 * doc/bison.rnh: entered into RCS
25699
25700 1992-04-20 David J. MacKenzie <djm@gnu.org>
25701
25702 * README: entered into RCS
25703
25704 1992-01-22 Richard Stallman <rms@gnu.org>
25705
25706 * src/machine.h: entered into RCS
25707
25708 1991-12-21 Richard Stallman <rms@gnu.org>
25709
25710 * src/lalr.c, src/closure.c:
25711 entered into RCS
25712
25713 1991-12-20 Richard Stallman <rms@gnu.org>
25714
25715 * src/state.h: entered into RCS
25716
25717 1991-12-18 Richard Stallman <rms@gnu.org>
25718
25719 * src/print.c, src/nullable.c, src/derives.c:
25720 entered into RCS
25721
25722 1991-11-03 David J. MacKenzie <djm@gnu.org>
25723
25724 * src/warshall.c, src/types.h, src/symtab.h, src/lex.h, src/gram.c, src/gram.h, src/files.h:
25725 entered into RCS
25726
25727 1988-09-09 Richard Stallman <rms@gnu.org>
25728
25729 * src/bison.hairy: entered into RCS
25730
25731 1987-12-16 Richard Stallman <rms@gnu.org>
25732
25733 * REFERENCES: entered into RCS
25734
25735
25736 -----
25737
25738 Copyright (C) 1987, 1988, 1991, 1992, 1993, 1994, 1995, 1996,
25739 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
25740 2008, 2009, 2010 Free Software Foundation, Inc.
25741
25742 Copying and distribution of this file, with or without
25743 modification, are permitted provided the copyright notice and this
25744 notice are preserved.