]> git.saurik.com Git - bison.git/blob - ChangeLog
e666d5885f8356a6f91219fbda4f15decfb0c8f4
[bison.git] / ChangeLog
1 2007-10-27 Joel E. Denny <jdenny@ces.clemson.edu>
2
3 For the XML output's terminal element, rename @number to @token-number,
4 and add @symbol-number. In the nonterminal element, rename @number to
5 @symbol-number. Discussed starting at
6 <http://lists.gnu.org/archive/html/bison-patches/2007-10/msg00040.html>.
7 * data/xslt/xml2text.xsl (xsl:template match="terminal"): Update for
8 renames.
9 (xsl:template match="nonterminal"): Likewise.
10 * data/xslt/xml2xhtml.xsl (xsl:template match="terminal"): Likewise.
11 (xsl:template match="nonterminal"): Likewise.
12 * src/print-xml.c (print_grammar): Implement.
13
14 2007-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
15
16 * data/xslt/xml2dot.xsl (xsl:template match="automaton/state"): After
17 2007-10-11 change, the child elements here are items not rules.
18 (<xsl:template match="item"): New.
19 (xsl:template match="rule"): Update for new reduced itemset.
20 (xsl:template match="point"): Remove.
21 (xsl:template match="empty"): For consistency with --graph, don't
22 output "/* empty */".
23 * data/xslt/xml2text.xsl (xsl:template match="terminal"): When invoking
24 line-wrap, don't pass a negative value as first-line-length since this
25 won't work with the following changes.
26 (xsl:template name="line-wrap"): Simplify slightly.
27 (xsl:template name="ws-search"): Eliminate recursion.
28 * src/print_graph.c (print_core): Don't print a reduction's lookahead
29 set next to an item whose dot is not at the end of the RHS even if it
30 happens to be associated with the same rule.
31
32 2007-10-19 Joel E. Denny <jdenny@ces.clemson.edu>
33
34 Add %define lr.keep_unreachable_states.
35 * NEWS (2.3a+): Mention it in the entry for unreachable state removal.
36 * doc/bison.texinfo (Decl Summary): Mention it in the %define entry.
37 * src/main.c (main): Implement it.
38 * tests/conflicts.at (Unreachable States After Conflict Resolution):
39 Extend to test it, and fix a typo.
40
41 2007-10-19 Joel E. Denny <jdenny@ces.clemson.edu>
42
43 * NEWS (2.3a+): Add entry for recent .output file lookahead set fix.
44 * doc/bison.texinfo (Understanding): Remove a bogus lookahead set in
45 the example .output text.
46 * tests/regression.at (Extra lookahead sets in report): Improve wording
47 of comments.
48
49 2007-10-17 Wojciech Polak <polak@gnu.org>
50
51 * src/print-xml.c (print_grammar): Renamed
52 <terminal> and <nonterminal> attributes:
53 "type" to "number" and "symbol" to "name".
54 * data/xslt/xml2text.xsl (xsl:template match="terminal"):
55 Use new attribute names.
56 (xsl:template match="nonterminal"): Likewise.
57 * data/xslt/xml2xhtml.xsl: Likewise.
58
59 2007-10-17 Joel E. Denny <jdenny@ces.clemson.edu>
60
61 * doc/bison.texinfo (Bison Options): Add entry for --print-datadir.
62 (Option Cross Key): Likewise.
63
64 * src/print-xml.c (print_core): Don't print a reduction's lookahead set
65 next to an item whose dot is not at the end of the RHS even if it
66 happens to be associated with the same rule.
67 * src/print.c (print_core): Likewise.
68 * tests/conflicts.at (Unresolved SR Conflicts): Update output.
69 (Resolved SR Conflicts): Update output.
70 * tests/regression.at (Extra lookahead sets in report): New test case.
71
72 2007-10-11 Wojciech Polak <polak@gnu.org>
73
74 * src/print-xml.c (print_core): Remove item set
75 redundancy.
76 * data/xslt/bison.xsl (bison:ruleNumber): New key.
77 Improve processing time. Suggested by Joel E. Denny.
78 * data/xslt/xml2dot.xsl (xsl:template name="escape"):
79 Write xsl:param "required" attribute as comment.
80 * data/xslt/xml2text.xsl (xsl:template match="item"): New.
81 (xsl:template match="rule"): Support new reduced itemset.
82 (xsl:template match="point"): Remove.
83 * data/xslt/xml2xhtml.xsl: Likewise.
84
85 2007-10-09 Joel E. Denny <jdenny@ces.clemson.edu>
86
87 * src/getargs.c (version): Update copyright year.
88
89 2007-10-09 Joel E. Denny <jdenny@ces.clemson.edu>
90
91 Make xml2dot.xsl and --graph produce the same output.
92 * data/xslt/xml2dot.xsl (xsl:template match="rule"): Use a `&#10;'
93 instead of a `\n'. That is, don't add escapes yet or they'll be doubly
94 escaped later.
95 (xsl:template name="output-node"): Use the new escape template instead
96 of the string-replace template directly.
97 (xsl:template name="output-edge"): Likewise.
98 (xsl:template name="escape"): New, escapes backslashes and newlines in
99 addition to quotation marks.
100 * src/graphviz.c (start_graph, output_node, output_edge): Add
101 whitespace to output for legibility.
102
103 Make xml2text.xsl and --report produce the same output, and remove the
104 XML "conflicts" element since a conflict summary is easily extracted
105 from the automaton.
106 * data/xslt/bison.xsl: New.
107 (xsl:template match="state" mode="bison:count-conflicts): New.
108 * data/xslt/xml2text.xsl: Import bison.xsl.
109 (xsl:template match="bison-xml-report"): Instead of styling the
110 "conflicts" element, style the "automaton" element with mode
111 "conflicts". Unlike the former, the latter lists S/R and R/R
112 conflicts for a state on the same line.
113 (xsl:template match="conflicts"): Remove.
114 (xsl:template match="conflict"): Remove.
115 (xsl:template match="terminal"): Line-wrap the list of rules in which
116 the terminal is used.
117 (xsl:template match="nonterminal"): Likewise for nonterminals.
118 (xsl:template match="automaton" mode="conflicts"): New.
119 (xsl:template match="state" mode="conflicts"): New.
120 (xsl:template name="line-wrap"): New.
121 (xsl:template name="ws-search"): New.
122 * data/xslt/xml2xhtml.xsl: Import bison.xsl.
123 (xsl:template match="bison-xml-report"): Instead of styling the
124 "conflicts" element, style the "automaton" element with mode
125 "conflicts."
126 (xsl:template match="conflicts"): Remove.
127 (xsl:template match="conflict"): Remove.
128 (xsl:template match="automaton" mode="conflicts"): New.
129 (xsl:template match="state" mode="conflicts): New.
130 * src/conflicts.c (conflicts_output_xml): Remove.
131 * src/conflicts.h (conflicts_output_xml): Remove prototype.
132 * src/print-xml.c (print_xml): Don't invoke conflicts_output_xml.
133 * src/print.c (print_grammar): Consistently wrap at the 66th column so
134 the corresponding XSLT is easier. Also, never wrap between a word and
135 the comma that follows it.
136
137 2007-10-08 Joel E. Denny <jdenny@ces.clemson.edu>
138
139 Improve C++ namespace support. Discussed starting at
140 <http://lists.gnu.org/archive/html/help-bison/2007-09/msg00016.html>.
141 * data/c++.m4: (b4_namespace_ref, b4_namespace_open,
142 b4_namespace_close): New macros that interpret the %define variable
143 "namespace" so its value can contain "::" to indicate nested
144 namespaces.
145 * data/glr.cc (b4_namespace): Don't define, and replace all uses with
146 the above macros.
147 * data/lalr1.cc (b4_namespace): Likewise.
148 * data/location.cc (b4_namespace): Likewise.
149 * doc/bison.texinfo (Decl Summary): Move `%define push_pull' entry
150 inside a new table in the general %define entry. Document `%define
151 namespace' there as well. Point the %name-prefix entry to it since it
152 explains it more completely in the case of C++.
153 (C++ Bison Interface): Mention `%define namespace' instead of
154 %name-prefix.
155 (Table of Symbols): Remove the `%define push_pull' entry. The %define
156 entry suffices.
157 * tests/c++.at (Relative namespace references): New test case.
158 (Absolute namespace references): New test case.
159 (Syntactically invalid namespace references): New test case.
160 * tests/input.at (C++ namespace reference errors): New test case.
161
162 2007-10-08 Joel E. Denny <jdenny@ces.clemson.edu>
163
164 Add syncline support and location accessor to internal %define
165 interfaces.
166 * data/bison.m4 (b4_percent_define_get_loc): New.
167 (b4_percent_define_get_syncline): New.
168 (b4_percent_define_flag_if): Use b4_percent_define_get_loc.
169 (b4_percent_define_default): Record defining location as line 1 rather
170 than 0 for the sake of synchronizing #line's, and define
171 b4_percent_define_syncline(VARIABLE).
172 (b4_percent_define_check_values): Use b4_percent_define_get_loc.
173 * src/muscle_tab.c (muscle_syncline_grow): New.
174 (muscle_code_grow): Use muscle_syncline_grow.
175 (muscle_percent_define_insert): Use muscle_percent_define_get_loc, and
176 define b4_percent_define_syncline(VARIABLE).
177 (muscle_percent_define_get_loc): New.
178 (muscle_percent_define_get_syncline): New.
179 (muscle_percent_define_flag_if): Use muscle_percent_define_get_loc, and
180 remove some unused variables.
181 (muscle_percent_define_default): Record defining location as line 1
182 rather than 0 for the sake of synchronizing #line's, and define
183 b4_percent_define_syncline(VARIABLE).
184 (muscle_percent_define_check_values): Use
185 muscle_percent_define_get_loc.
186 * src/muscle_tab.h (muscle_percent_define_get_loc): Prototype.
187 (muscle_percent_define_get_syncline): Prototype.
188 * tests/skeletons.at (%define Boolean variables: invalid skeleton
189 defaults): Update output for location change.
190 (Complaining during macro argument expansion): Extend to test
191 b4_percent_define_get_loc and b4_percent_define_get_syncline errors.
192
193 2007-10-07 Joel E. Denny <jdenny@ces.clemson.edu>
194
195 Fix some error-reporting macro bugs.
196 * data/bison.m4 (b4_cat): New.
197 (b4_error, b4_error_at): Use b4_cat to send error directives directly
198 to stdout so they don't become arguments to other macros. Update
199 comments and add examples.
200 (b4_warn, b4_warn_at, b4_complain, b4_complain_at): Update comments and
201 add examples.
202 (b4_fatal, b4_fatal_at): Likewise, and invoke m4_exit(1) immediately
203 after printing the error directive so that M4 doesn't report subsequent
204 problems that are induced by this problem.
205 * src/scan-skel.l: Recognize @` digraph outside of directive arguments
206 instead of just in them. Recognize @\n in both places. Both expand to
207 the empty string. Needed by b4_cat.
208 * tests/skeletons.at (Complaining during macro argument expansion):
209 New test case.
210 (Fatal errors make M4 exit immediately): New test case.
211
212 2007-10-04 Joel E. Denny <jdenny@ces.clemson.edu>
213
214 Implement --print-datadir.
215 * src/getargs.c (usage): Mention.
216 (PRINT_DATADIR_OPTION): New anonymous enum member.
217 (long_options): Add entry for it.
218 (getargs): Add case for it calling compute_pkgdatadir.
219 * src/output.c (output_skeleton): Encapsulate data directory
220 computation from here...
221 (prepare): ... and from here...
222 (compute_pkgdatadir): ... into this new function.
223 * src/output.h (compute_pkgdatadir): Prototype.
224
225 2007-09-29 Joel E. Denny <jdenny@ces.clemson.edu>
226
227 * src/print-xml.c (escape_bufs): New static global variable
228 replacing...
229 (xml_escape_n): ... the static local variable buf here.
230 (print_xml): Free memory for escape_bufs.
231 * src/reduce.c (reduce_xml): XML-escape terminal symbol tags.
232
233 2007-09-25 Joel E. Denny <jdenny@ces.clemson.edu>
234
235 Replace `%push-parser' and `%push-pull-parser' with
236 `%define push_pull "push"' and `%define push_pull "both"'.
237 `%define push_pull "pull"' is the default.
238 * doc/bison.texinfo (Push Decl, Push Parser Function,
239 Pull Parser Function, Parser Create Function, Parser Delete Function):
240 Update declarations.
241 (Decl Summary, Table of Symbols): Replace %push-parser and
242 %push-pull-parser entries with a %define push_pull entry.
243 * data/bison.m4 (b4_percent_define_check_values): New macro.
244 (b4_pull_if, b4_push_if, b4_use_push_for_pull_if): Move these
245 definitions...
246 * data/c.m4 (b4_identification): ... and the YYPUSH and YYPULL cpp
247 definitions...
248 * data/push.c: ... to here and compute them from the value of the
249 %define variable push_pull.
250 * data/c-skel.m4: Instead of choosing the push.c skeleton for push
251 parsing requests here...
252 * data/yacc.c: ... hack this to switch to push.c any time
253 b4_use_push_pull_flag or the %define variable push_pull is set. This
254 will go away when we mv push.c yacc.c.
255 * data/c++-skel.m4, data/glr.c, data/java-skel.m4: Don't report that
256 push parsing is not supported since unused %define variables are
257 reported anyway.
258 * src/getargs.c, src/getargs.h (pull_parser, push_parser): Remove.
259 * src/muscle_tab.h (muscle_percent_define_check_values): Update
260 comments for consistency with b4_percent_define_check_values.
261 * src/output.c (prepare): Don't insert b4_pull_flag and b4_push_flag
262 muscles.
263 * src/parse-gram.y (PERCENT_PUSH_PARSER, PERCENT_PUSH_PULL_PARSER):
264 Remove.
265 (prologue_declaration): Remove %push-parser and %push-pull-parser
266 rules.
267 * src/scan-gram.l (%push-parser, %push-pull-parser): Remove rules.
268 * tests/calc.at: Update declarations.
269 * tests/input.at (%define enum variables): New test case.
270 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Update
271 declaration.
272 (Push Parsing: Multiple impure instances): Update declaration.
273 (Push Parsing: Unsupported Skeletons): New test case.
274 * tests/torture.at (Exploding the Stack Size with Alloca): Update
275 declaration.
276 (Exploding the Stack Size with Malloc): Update declaration.
277
278 2007-09-24 Wojciech Polak <polak@gnu.org>
279
280 Add XSLT transformations.
281
282 * data/xslt/xml2dot.xsl: Transform XML into DOT.
283 * data/xslt/xml2text.xsl: Transform XML into plain text.
284 * data/xslt/xml2xhtml.xsl: Transform XML into XHTML.
285 * data/Makefile.am (xsltdir): New variable.
286 (dist_xslt_DATA): Add xslt/*.xsl files.
287
288 2007-09-23 Paul Eggert <eggert@cs.ucla.edu>
289
290 * src/conflicts.c (log_resolution): Fix indenting bugs I introduced.
291 Problem reported by Wojciech Polak.
292 * src/print-xml.c (xml_puts): Work even if LEVEL exceeds INT_MAX/2.
293 (xml_printf): Undo change I made on 21 September; that is,
294 indent 2 spaces, not 1.
295
296 2007-09-23 Joel E. Denny <jdenny@ces.clemson.edu>
297
298 Pacify ./configure --enable-gcc-warnings.
299 * src/print-xml.c, src/print-xml.h (xml_puts): Make third argument
300 `char const *' instead of `char *'.
301 * src/state.c (state_rule_lookahead_tokens_print_xml): Remove unused
302 local variable `sep'.
303
304 2007-09-21 Paul Eggert <eggert@cs.ucla.edu>
305
306 * src/gram.c (rule_rhs_print_xml): Now static, since it isn't used
307 elsewhere.
308 * src/print-xml.c: Prefer "const" after types; that's more consistent.
309 (xml_printf): Indent just 1 space for level.
310 (e_char, xlate_char): Remove.
311 (xml_escape_string): Rewrite to avoid undefined behavior (used
312 storage that was freed from the stack).
313 (xml_escape_n): Don't bother checking for subscript error.
314
315 2007-09-21 Wojciech Polak <polak@gnu.org>
316
317 Add Bison XML Automaton Report.
318
319 Add support for an -x option to generate an XML report.
320 It is not documented yet.
321 * src/print-xml.c: New file.
322 * src/print-xml.h: Likewise.
323 * lib/timevar.def (TV_XML): New var.
324 * src/Makefile.am (bison_SOURCES): Add print-xml.c, print-xml.h.
325 * src/conflicts.c: Include print-xml.h.
326 (solved_conflicts_xml_obstack): New var.
327 (log_resolution, conflicts_solve, conflicts_free):
328 Add support for XML report.
329 (conflicts_output_val): New function.
330 * src/conflicts.h (conflicts_output_val): New decl.
331 * src/files.c (spec_xml_file): New var.
332 (compute_output_file_names, output_file_names_free): Add XML support.
333 * src/files.h (spec_xml_file): New decl.
334 * src/getargs.c (xml_flag): New var.
335 (usage, short_options, long_options, getargs): Add XML support.
336 * src/getargs.h (xml_flag): New decl.
337 * src/gram.c: Include print-xml.h.
338 (rule_lhs_print_xml, rule_rhs_print_xml):
339 (grammar_rules_partial_print_xml, grammar_rules_print_xml):
340 New functions.
341 * src/gram.h: Declare external ones.
342 * src/main.c: Include print-xml.h.
343 (main): Add XML support.
344 * src/reduce.c: Include print-xml.h.
345 (reduce_xml): New function.
346 * src/reduce.h: Declare it.
347 * src/state.c: Include print-xml.h.
348 (state_new): Add XML support.
349 (state_rule_lookahead_tokens_print_xml): New function.
350 * src/state.h: Declare it.
351 (struct state): New member solved_conflicts_xml.
352 * src/symtab.c (symbol_class_get_string): New function.
353 * src/symtab.h: Declare it.
354
355 2007-09-21 Paul Eggert <eggert@cs.ucla.edu>
356
357 * GNUmakefile: Switch to coreutils's version.
358 * bootstrap: Likewise.
359 * Makefile.cfg: Adjust to new GNUmakefile.
360 * README-hacking: Likewise.
361
362 Import from gnulib:
363
364 2006-08-18 Paul Eggert <eggert@cs.ucla.edu>
365 Bruno Haible <bruno@clisp.org>
366
367 * m4/bison-i18n.m4 (BISON_I18N): Also handle the case where yacc exists
368 and is a script that invokes bison. Tighten the code. Add comments.
369
370 2007-08-28 Joel E. Denny <jdenny@ces.clemson.edu>
371
372 Spell "boolean" as "Boolean". Reported by Akim Demaille.
373 * data/bison.m4 (b4_percent_define_flag_if): Fix complaint.
374 * doc/bison.texinfo (Decl Summary): Fix.
375 * src/muscle_tab.c (muscle_percent_define_flag_if): Fix complaint.
376 * tests/input.at (Boolean %define variables): Update output.
377 * tests/skeletons.at (%define boolean variables: invalid skeleton
378 defaults): Rename to...
379 (%define Boolean variables: invalid skeleton defaults): ... this and
380 update output.
381
382 2007-08-17 Joel E. Denny <jdenny@ces.clemson.edu>
383
384 In impure push mode, don't allow more than one yypstate to be allocated
385 since multiple impure parsers would corrupt yynerrs.
386 * data/push.c (yypstate_allocated): New static global variable
387 initialized to 0.
388 (yypull_parse): If yypstate_new returns 0, don't report it as memory
389 exhaustion if yypstate_allocated is 1, but still return 2.
390 (yypstate_new): Invoke yyerror and return 0 if yypstate_allocated is
391 already 1. Otherwise, set it to 1.
392 (yypstate_delete): Set it to 0.
393 * tests/push.at (Push Parsing: Multiple impure instances): New test
394 case.
395
396 2007-08-17 Bob Rossi <bob@brasko.net>
397
398 * doc/bison.texinfo (Push Decl): Document the push parser.
399 (Table of Symbols): Ditto.
400 (Pure Decl): Ditto.
401 (Decl Summary): Ditto.
402 (Multiple Parsers, Push Parser Function, Pull Parser Function,
403 Parser Create Function, Parser Delete Function):
404 Add new push parser symbols.
405 (Table of Symbols): Document push-parser, push-pull-parser,
406 yypush_parse, yypull_parse, yypstate_new and yypstate_delete.
407
408 2007-08-15 Paul Eggert <eggert@cs.ucla.edu>
409
410 Update to GPLv3.
411 * doc/gpl-3.0.texi: New file.
412 * doc/gpl.texi: Remove.
413 * COPYING, GNUmakefile, HACKING, Makefile.am, Makefile.cfg:
414 * Makefile.maint, NEWS, PACKAGING, README, README-alpha:
415 * README-hacking, TODO, bootstrap, bootstrap.conf:
416 * configure.ac, data/Makefile.am, data/README, data/bison.m4:
417 * data/c++-skel.m4, data/c++.m4, data/c-skel.m4, data/c.m4:
418 * data/glr.c, data/glr.cc, data/java-skel.m4, data/java.m4:
419 * data/lalr1.cc, data/lalr1.java, data/location.cc:
420 * data/push.c, data/yacc.c, data/m4sugar/m4sugar.m4:
421 * djgpp/Makefile.maint, djgpp/README.in, djgpp/config.bat:
422 * djgpp/config.sed, djgpp/config.site, djgpp/config_h.sed:
423 * djgpp/djunpack.bat, djgpp/subpipe.c, djgpp/subpipe.h:
424 * djgpp/testsuite.sed, doc/Makefile.am, doc/bison.texinfo:
425 * doc/fdl.texi, doc/refcard.tex, etc/Makefile.am, etc/README:
426 * etc/bench.pl.in, examples/Makefile.am, examples/extexi:
427 * examples/calc++/Makefile.am, lib/Makefile.am, lib/abitset.c:
428 * lib/abitset.h, lib/bbitset.h, lib/bitset.c, lib/bitset.h:
429 * lib/bitset_stats.c, lib/bitset_stats.h, lib/bitsetv-print.c:
430 * lib/bitsetv-print.h, lib/bitsetv.c, lib/bitsetv.h:
431 * lib/ebitset.c, lib/ebitset.h, lib/get-errno.c:
432 * lib/get-errno.h, lib/lbitset.c, lib/lbitset.h:
433 * lib/libiberty.h, lib/main.c, lib/subpipe.c, lib/subpipe.h:
434 * lib/timevar.c, lib/timevar.def, lib/timevar.h:
435 * lib/vbitset.c, lib/vbitset.h, lib/yyerror.c:
436 * m4/c-working.m4, m4/cxx.m4, m4/m4.m4, m4/subpipe.m4:
437 * m4/timevar.m4, src/LR0.c, src/LR0.h, src/Makefile.am:
438 * src/assoc.c, src/assoc.h, src/closure.c, src/closure.h:
439 * src/complain.c, src/complain.h, src/conflicts.c:
440 * src/conflicts.h, src/derives.c, src/derives.h, src/files.c:
441 * src/files.h, src/flex-scanner.h, src/getargs.c:
442 * src/getargs.h, src/gram.c, src/gram.h, src/graphviz.c:
443 * src/lalr.c, src/lalr.h, src/location.c, src/location.h:
444 * src/main.c, src/muscle_tab.c, src/muscle_tab.h:
445 * src/nullable.c, src/nullable.h, src/output.c, src/output.h:
446 * src/parse-gram.c, src/parse-gram.h, src/parse-gram.y:
447 * src/print.c, src/print.h, src/print_graph.c:
448 * src/print_graph.h, src/reader.c, src/reader.h, src/reduce.c:
449 * src/reduce.h, src/relation.c, src/relation.h:
450 * src/revision.h, src/scan-code.h, src/scan-code.l:
451 * src/scan-gram.h, src/scan-gram.l, src/scan-skel.h:
452 * src/scan-skel.l, src/state.c, src/state.h, src/symlist.c:
453 * src/symlist.h, src/symtab.c, src/symtab.h, src/system.h:
454 * src/tables.c, src/tables.h, src/uniqstr.c, src/uniqstr.h:
455 * tests/Makefile.am, tests/actions.at, tests/c++.at:
456 * tests/calc.at, tests/conflicts.at, tests/cxx-type.at:
457 * tests/existing.at, tests/glr-regression.at:
458 * tests/headers.at, tests/input.at, tests/java.at:
459 * tests/local.at, tests/output.at, tests/push.at:
460 * tests/reduce.at, tests/regression.at, tests/sets.at:
461 * tests/skeletons.at, tests/synclines.at, tests/testsuite.at:
462 * tests/torture.at:
463 Update to GPLv3.
464
465 2007-08-11 Joel E. Denny <jdenny@ces.clemson.edu>
466
467 Get rid of broken %no-parser, -n, and --no-parser implementation and
468 documentation.
469 * TODO: Don't mention them.
470 * doc/bison.1: Likewise.
471 * doc/bison.texinfo (Decl Summary): Likewise.
472 (Bison Options): Likewise.
473 (Option Cross Key): Likewise.
474 * src/getargs.c (no_parser_flag): Remove global variable.
475 (usage): Don't print description of -n and --no-parser.
476 (long_options): Remove --no-parser entry here.
477 (getargs): Remove -n case in the switch here.
478 * src/getargs.h (no_parser_flag): Remove extern.
479 * tests/regression.at (Web2c Actions): Remove comment that mentions
480 --no-parser.
481
482 2007-08-11 Joel E. Denny <jdenny@ces.clemson.edu>
483
484 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Do not
485 name user variables starting with `yy'. Just pass NULL instead of a
486 dummy local &yylval to yypush_parse.
487 * tests/torture.at (AT_DATA_STACK_TORTURE): Do not name user variables
488 starting with `yy'.
489
490 2007-08-03 Joel E. Denny <jdenny@ces.clemson.edu>
491
492 * data/yacc.c (yyexhaustedlab): Define it when YYERROR_VERBOSE is
493 true since it's then always used regardless of whether yyoverflow is
494 defined. Reported by Christian Burger at
495 <http://lists.gnu.org/archive/html/bug-bison/2007-07/msg00031.html>.
496 * THANKS: Add Christian Burger.
497
498 * ChangeLog: For changes in doc/bison.texinfo, consistently reference
499 node names: say "Decl Summary" not "Bison Declaration Summary".
500
501 2007-07-28 Joel E. Denny <jdenny@ces.clemson.edu>
502
503 * src/muscle_tab.c (muscle_percent_define_flag_if): In order to
504 determine whether this function has already complained about an invalid
505 value for a %define boolean variable, don't check whether Bison has
506 ever examined the value. As written, the check was a tautology.
507 Instead, record and check for this complaint using a separate muscle.
508
509 2007-07-27 Joel E. Denny <jdenny@ces.clemson.edu>
510
511 Fix push parsing memory leak reported by Brandon Lucia at
512 <http://lists.gnu.org/archive/html/bug-bison/2007-07/msg00032.html>.
513 * THANKS: Add Brandon Lucia.
514 * data/push.c (yypstate_delete): Free the stack if it was reallocated
515 but the parse never completed and thus freed it.
516 * tests/Makefile.am (TESTSUITE_AT): Add push.at.
517 * tests/testsuite.at: Include push.at.
518 * test/push.at: New.
519 (Push Parsing: Memory Leak for Early Deletion): New test case.
520
521 2007-07-17 Joel E. Denny <jdenny@ces.clemson.edu>
522
523 Improve handling of multiple S/R conflicts in the same state and of S/R
524 conflicts involving multiple reductions.
525 * src/conflicts.c (resolve_sr_conflict): Don't assign the error action
526 set for a state here or Bison will abort if it is reassigned on a
527 later conflicted reduction in the same state.
528 Similarly, don't finalize and assign the solved conflicts report here
529 or it will be lost if it is reassigned on a later conflicted reduction
530 in the same state.
531 (set_conflicts): Instead, assign them both here after all S/R conflicts
532 in the state have been fully examined.
533 * src/print.c (shift_set): Rename to...
534 (no_reduce_set): ... this.
535 (print_reductions): Update for rename, and add %nonassoc error action
536 tokens to no_reduce_set so that, when printing the first remaining
537 reduction on an error action token, the reduction is enclosed in
538 brackets.
539 (print_results): Update for rename.
540 * tests/conflicts.at (Solved conflicts report for multiple reductions
541 in a state): New test case.
542 (%nonassoc error actions for multiple reductions in a state): New test
543 case.
544
545 * src/main.c (main): Don't depend on C99 features.
546
547 2007-07-16 Joel E. Denny <jdenny@ces.clemson.edu>
548
549 * build-aux/.cvsignore: Add compile.
550 * lib/.cvsignore: Add charset.alias, ref-add.sed, ref-del.sed, and
551 uniwidth.
552
553 2007-07-10 Joel E. Denny <jdenny@ces.clemson.edu>
554
555 * bootstrap (slurp): Create target directories that don't exist.
556 Specifically, we need lib/uniwidth/ because of recent Gnulib changes.
557
558 2007-07-09 Joel E. Denny <jdenny@ces.clemson.edu>
559
560 * LR0.c (new_itemsets): Fix wording in comments: say item index rather
561 than item number.
562 * closure.c (closure): Likewise.
563 * state.h (reductions): Comment sorting of rules.
564 (state): Comment sorting of items.
565
566 2007-07-02 Joel E. Denny <jdenny@ces.clemson.edu>
567
568 Fix C++ test cases after recent Gnulib changes. Discussed starting at
569 <http://lists.gnu.org/archive/html/bug-bison/2007-07/msg00000.html>.
570 * examples/calc++/Makefile.am (DEFAULT_INCLUDES): Override Automake's
571 definition in order to avoid Gnulib headers since we don't use config.h
572 here.
573 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): Use AT_DATA_GRAMMAR
574 rather than AT_DATA so that config.h is included.
575
576 2007-07-01 Joel E. Denny <jdenny@ces.clemson.edu>
577
578 * data/glr.c (yy_yypstack, yypstates, yypdumpstack): Use YYFPRINTF
579 instead of fprintf. Guard these functions with #if YYDEBUG instead of
580 #ifdef YYDEBUG for consistency with all other uses of YYDEBUG in Bison
581 and so that YYFPRINTF is guaranteed to be defined here.
582
583 2007-05-29 Joel E. Denny <jdenny@ces.clemson.edu>
584
585 * src/muscle_tab.c (muscle_percent_define_invalid_value): Replace
586 with...
587 (muscle_percent_define_check_values): ... this more helpful function.
588 Again, it's not used yet, but it will be.
589 * src/muscle_tab.h: Likewise.
590
591 Improve some comments in parser table construction.
592 * src/LR0.c (new_itemsets): Explain sorting of itemset and kernel_base.
593 (generate_states): Don't mention ruleset, which is internal to closure.
594 * src/closure.c (closure): Explain sorting of core and itemset, which
595 is required for this function to behave correctly.
596 * src/closure.h (closure): Mention sorting.
597
598 2007-05-28 Joel E. Denny <jdenny@ces.clemson.edu>
599
600 * src/lalr.c (state_lookahead_tokens_count): For code readability,
601 move the check for disabled transitions to an aver since conflict
602 resolution hasn't happened yet.
603
604 * src/lalr.c (state_lookahead_tokens_count): Remove the check that
605 labels a state as inconsistent just because it has error transitions.
606 The original form of this check appeared in revision 1.1 of lalr.c,
607 which was committed on 1991-12-21. Now (at least), changing the
608 consistency label on such a state appears to have no useful effect in
609 any of the places it is examined, which I enumerate below. The key
610 point to understanding each item in this enumeration is that a state
611 with an error transition is labelled consistent in the first place only
612 if it has no rules, so the check cannot matter for states that have
613 rules. (1) Labelling a state as inconsistent will cause set_conflicts
614 to try to identify its conflicts, and a state must have *rules* to have
615 conflicts. (2) Labelling a state as inconsistent will affect how
616 action_row sets the default *rule* for the state. (3) Labelling a
617 state as inconsistent will cause build_relations to add lookback edges
618 to *rules* in that state.
619 * src/state.h (struct state): Word the comment for member consistent
620 more carefully.
621
622 2007-05-27 Joel E. Denny <jdenny@ces.clemson.edu>
623
624 Don't depend on C99 features.
625 * src/conflicts.c (conflicts_update_state_numbers): Fix for-loop.
626 * src/lalr.c (lalr_update_state_numbers): Fix for-loop.
627 * src/reader.c (check_and_convert_grammar): Fix for-loop.
628 * src/state.c (state_mark_reachable_states): Fix for-loop.
629 (state_remove_unreachable_states): Fix for-loop.
630
631 Don't widen struct state with member reachable just to temporarily
632 record reachability. Instead, use a local bitset.
633 * src/state.h (struct state): Remove member.
634 * src/state.c (state_new): Don't initialize it.
635 (state_mark_reachable_states): Rename to...
636 (state_record_reachable_states): ... this, and use bitset.
637 (state_remove_unreachable_states): Use bitset.
638
639 2007-05-26 Joel E. Denny <jdenny@ces.clemson.edu>
640
641 * src/Makefile.am (yacc): Quote target action commands properly so
642 that the yacc script isn't corrupt. Reported by Hans Aberg at
643 <http://lists.gnu.org/archive/html/bug-bison/2007-05/msg00003.html>.
644
645 * data/glr.c (yylval): As in yacc.c, don't extern in the header for
646 the case of pure parsers. Reported by Frans Englich at
647 <http://lists.gnu.org/archive/html/help-bison/2007-05/msg00018.html>.
648 * THANKS: Add Frans Englich.
649
650 * NEWS (2.3a+): In the %code entry, reference section `Bison
651 Declaration Summary' from the manual now since the %code summary has
652 moved there.
653 * doc/bison.texinfo (Prologue Alternatives): Mention that directives
654 in the rules section must be terminated by semicolons.
655
656 2007-05-20 Joel E. Denny <jdenny@ces.clemson.edu>
657
658 Extend the front-end API for %define variables to more completely
659 mirror the back-end. This will be useful in the future.
660 * data/bison.m4 (b4_percent_define_get, b4_percent_define_ifdef):
661 Update comments to mention the new front-end counterparts of these
662 macros.
663 * src/muscle_tab.c (MUSCLE_COMMON_DECODE): New macro with common code
664 for muscle_string_decode and muscle_location_decode.
665 (muscle_string_decode): New static function.
666 (muscle_location_decode): Use MUSCLE_COMMON_DECODE.
667 (muscle_percent_define_get, muscle_percent_define_ifdef): New
668 functions.
669 (muscle_percent_define_flag_if): Use muscle_percent_define_ifdef and
670 muscle_percent_define_get to mimic the b4_percent_define_flag_if
671 implementation more closely.
672 (muscle_percent_define_invalid_value): New function.
673 * src/muscle_tab.h (muscle_percent_define_get,
674 muscle_percent_define_ifdef, muscle_percent_define_invalid_value):
675 Prototype.
676
677 2007-05-07 Joel E. Denny <jdenny@ces.clemson.edu>
678
679 * NEWS (2.3a+): Mention yesterday's state-removal change.
680 (2.3a): Remove the %language entry, which was added after 2.3a.
681 * src/LR0.c, src/closure.c, src/closure.h, src/conflicts.c,
682 src/conflicts.h, src/lalr.c, src/lalr.h, src/print.c,
683 src/print_graph.c, src/state.c, src/state.h, tests/conflicts.at,
684 tests/existing.at: Update copyright date.
685
686 2007-05-06 Joel E. Denny <jdenny@ces.clemson.edu>
687
688 If conflict resolution makes states unreachable, remove those states,
689 report rules that are then unused, and don't report conflicts in those
690 states.
691 * src/conflicts.c, src/conflicts.h (conflicts_update_state_numbers):
692 New global function.
693 * src/lalr.c, src/lalr.h (lalr_update_state_numbers): New global
694 function.
695 * src/main.c (main): After conflict resolution, remove the unreachable
696 states and update all data structures that reference states by number.
697 * src/state.c (state_new): Initialize each state's reachable member to
698 false.
699 (state_mark_reachable_states): New static function.
700 (state_remove_unreachable_states): New global function.
701 * src/state.h (struct state): Add member bool reachable.
702 (state_remove_unreachable_states): Prototype.
703 * tests/conflicts.at (Unreachable States After Conflict Resolution):
704 New test case.
705 * tests/existing.at (GNU pic Grammar): Update test case output now that
706 an unused rule is discovered.
707
708 2007-05-06 Joel E. Denny <jdenny@ces.clemson.edu>
709
710 Minor code cleanup in parser table construction.
711 * src/LR0.c (new_itemsets): Use item_number_is_symbol_number.
712 (new_itemsets, save_reductions): Update for rename to nitemset.
713 * src/closure.c (nritemset): Rename to...
714 (nitemset): ... this since the "r" appears to meaningless and isn't
715 used in the comments.
716 (closure): Update for rename.
717 * src/closure.h (nritemset): Update extern to...
718 (nitemset): ... this.
719 * src/lalr.c (LA): Fix a typo in comments.
720 * src/print.c (print_core): Update for rename to nitemset.
721 * src/print_graph.c (print_graph): Likewise.
722 * src/state.h: Fix some typos in header comments.
723
724 2007-04-04 Paul Eggert <eggert@cs.ucla.edu>
725
726 * THANKS: Use ASCII for Sebastien Fricker's name. Bison source
727 still sticks to ASCII. Sorry!
728
729 * README-hacking: New file, taken mostly from coreutils, with changes
730 for Bison. Contains much of the contents of:
731 * README-cvs: Remove.
732 * bootstrap: Sync from gnulib.
733 * build-aux/.cvsignore: Remove *.t, mkinstalldirs.
734 * lib/.cvsignore: Add wchar.h, wctype.h. Remove exit.h.
735
736 2007-03-10 Joel E. Denny <jdenny@ces.clemson.edu>
737
738 * doc/bison.texinfo (Destructor Decl): Fix typo reported by Sebastian
739 Setzer.
740 (Java Differences): Fix some typos.
741 * THANKS: Add Sebastian Setzer.
742
743 2007-03-07 Paolo Bonzini <bonzini@gnu.org>
744
745 * data/java.m4 (b4_single_class_if): Remove.
746 (b4_abstract_if): Look at "%define abstract".
747 (b4_lexer_if): New.
748 (b4_union_name): Rename...
749 (b4_yystype): ... to this. Map to "%define stype".
750 (b4_rhs_value, b4_parse_param_decl, b4_lex_param_decl,
751 b4_maybe_throws): Fix quoting.
752 (b4_lex_param_call): Move below to keep b4_*_param_decl close.
753 * data/lalr1.java (Lexer interface): Always define.
754 (Lexer interface within parser class): Remove.
755 (YYLexer class): New, used when "%code lexer" is present.
756 (constructor): When "%code lexer" is used, pass %lex-param
757 to the lexer constructor.
758 (yylex, yyparse): Remove %lex-param from method invocations
759 (YYStack, yyaction, yyparse): Rename b4_union_name to b4_yystype.
760
761 * doc/bison.texinfo (Java Bison Interface): Mention "%define
762 abstract". Rename "%define union_name" to "%define stype".
763 Rename method names according to previous patch.
764 (Java Scanner Interface): Describe "%code lexer" instead of
765 "%pure-parser" and "%define single_class".
766 (Java Differences): Mention "%code lexer".
767
768 * tests/java.at (_AT_DATA_JAVA_CALC_Y): Remove final argument.
769 Include scanner here, using macros from tests/local.at.
770 (AT_DATA_CALC_Y): Remove final argument.
771 (_AT_CHECK_JAVA_CALC): Likewise.
772 (AT_CHECK_JAVA_CALC): Likewise. Test all four combinations
773 of %locations and %error-verbose.
774 (main): Test with and without %lex-param.
775 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Push AT_LEXPARAM_IF.
776 (AT_BISON_OPTION_POPDEFS): Pop it.
777
778 2007-03-07 Juan Manuel Guerrero <juan.guerrero@gmx.de>
779
780 DJGPP spefic issue. Inhibit the use of disallowed characters for
781 file name genertion on Win98, WinXP, etc. These are |<>":?*\
782 and concern testsuite case 46.
783 * Makefile.am: djgpp/testsuite.sed added to EXTRA_DIST
784 * djgpp/testsuite.sed: Inhibit the use of disallowed characters.
785 * djgpp/config.bat: Inhibit the use of disallowed characters.
786
787 2007-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
788
789 Miscellaneous %define and %code cleanup.
790 * data/bison.m4 (b4_percent_define_flag_if): Correct comments on how
791 values are interpreted.
792 * doc/bison.texinfo (Decl Summary): Clean up and extend %define
793 documentation a little more.
794 * src/muscle_tab.c (MUSCLE_USER_NAME_CONVERT,
795 muscle_percent_define_insert, muscle_percent_code_grow): New
796 functions/macros.
797 * src/muscle_tab.h (muscle_percent_define_insert,
798 muscle_percent_code_grow): Prototype.
799 * src/parse-gram.y (prologue_declaration): Use
800 muscle_percent_define_insert and muscle_percent_code_grow when parsing
801 %define and %code directives.
802
803 Make it easy to share %define boolean variables between the front-end
804 and back-end. Though not used yet, this will be useful in the future.
805 * data/bison.m4 (b4_check_user_names): Rewrite comments to talk about
806 Bison uses of names rather than just skeleton uses of names.
807 (b4_percent_define_get, b4_percent_define_ifdef): Rename
808 b4_percent_define_skeleton_variables(VARIABLE) to
809 b4_percent_define_bison_variables(VARIABLE).
810 (b4_percent_code_get, b4_percent_code_ifdef): Rename
811 b4_percent_code_skeleton_qualifiers(QUALIFIER) to
812 b4_percent_code_bison_qualifiers(QUALIFIER).
813 (b4_check_user_names_wrap): Update for renames.
814 * src/muscle_tab.c, src/muscle_tab.h (muscle_percent_define_flag_if,
815 muscle_percent_define_default): New functions mimicking
816 b4_percent_define_flag_if and b4_percent_define_default.
817
818 For %define variables, report locations for invalid values and
819 redefinitions.
820 * data/bison.m4 (b4_percent_define_flag_if): Read
821 b4_percent_define_loc(VARIABLE) to report the location of an invalid
822 value for VARIABLE.
823 (b4_percent_define_default): Save a special location in
824 b4_percent_define_loc(VARIABLE) in case the default value for VARIABLE
825 must later be reported as invalid.
826 * src/muscle_tab.c (muscle_location_grow, muscle_location_decode): New
827 functions.
828 (muscle_percent_define_insert): Record the location of VARIABLE in
829 muscle percent_define_loc(VARIABLE), and use it to report the previous
830 location for a redefinition.
831 (muscle_percent_define_flag_if): Update like b4_percent_define_flag_if.
832 (muscle_percent_define_default): Update like b4_percent_define_default.
833 (muscle_grow_user_name_list): Rename to...
834 (muscle_user_name_list_grow): ... this for consistency and use
835 muscle_location_grow.
836 * src/muscle_tab.h (muscle_location_grow): Prototype.
837 * tests/input.at (%define errors): Update expected output.
838 * tests/skeletons.at (%define boolean variables: invalid skeleton
839 defaults): New test case.
840
841 2007-02-28 Joel E. Denny <jdenny@ces.clemson.edu>
842
843 * src/print.c (lookahead_set, state_default_rule): Remove.
844 (print_reductions): Replace state_default_rule invocation with
845 equivalent use of yydefact, which was computed in token_actions in
846 tables.c.
847 (print_results): Don't allocate lookahead_set.
848
849 2007-02-27 Paolo Bonzini <bonzini@gnu.org>
850
851 * data/lalr1.java: Prefix all private members with yy.
852
853 2007-02-24 Joel E. Denny <jdenny@ces.clemson.edu>
854
855 Use YYFPRINTF instead of fprintf where appropriate. Reported by
856 Sebastien Fricker at
857 <http://lists.gnu.org/archive/html/bug-bison/2007-02/msg00035.html>.
858 * THANKS: Add Sebastien Fricker.
859 * data/glr.c, data/push.c, data/yacc.c (yy_reduce_print): Implement.
860 * doc/bison.texinfo (Tracing): Make it clearer that YYFPRINTF must
861 accept a variable number of arguments.
862
863 2007-02-19 Joel E. Denny <jdenny@ces.clemson.edu>
864
865 * bootstrap: Remove occurrences of .#bootmp from lib/Makefile.
866
867 2007-02-13 Juan Manuel Guerrero <juan.guerrero@gmx.de>
868
869 * djgpp/config.bat: Adjustments concerning the use of autoconf 2.61.
870 * djgpp/config.sed: Adjustments concerning the use of autoconf 2.61.
871 * djgpp/config.site: Adjustments concerning the use of autoconf 2.61.
872
873 2007-02-11 Paul Eggert <eggert@cs.ucla.edu>
874
875 Undo my 2007-02-07 change, switching back to the c-strcase module
876 introduced in the 2007-02-03 change. Bruno Haible reported that
877 the 2007-02-07 change would be dangerous in Turkish if we add a
878 language whose name contains "i", since "i" is not lowercase "I"
879 in Turkish.
880 * bootstrap.conf (gnulib_modules): Add c-strcase. Remove strcase.
881 * lib/.cvsignore: Add c-ctype.c, c-ctype.h, c-strcase.h,
882 c-strcasecomp.c, c-strncasecmp.c. Remove strcasecmp.c, strncasecmp.c.
883 * m4/.cvsignore: Remove strcase.m4.
884 * src/getargs.c: Revert 2007-02-07 change, as follows.
885 Include c-strcase.h.
886 (language_argmatch): Use c_strcasecmp rather than strcasecmp.
887
888 2007-02-11 Bruno Haible <bruno@clisp.org>
889
890 Enable the Java related testsuite tests when the only Java compiler
891 found is a gcj < 4.3. Discussed at
892 <http://lists.gnu.org/archive/html/bug-bison/2007-02/msg00016.html>.
893 * configure.ac (gt_JAVACOMP): Don't specify a target_version.
894
895 2007-02-11 Joel E. Denny <jdenny@ces.clemson.edu>
896
897 * data/Makefile.am: Update copyright date.
898 * data/push.c (yypull_parse): Report memory exhaustion and return 2 if
899 yypstate_new returns NULL.
900 (yypstate_new): Return NULL if malloc does.
901 * src/reader.c (packgram): Move translation of rule actions from the
902 beginning of packgram to...
903 (check_and_convert_grammar): ... here right before packgram is invoked
904 so it's easier to write more complete comments, and remove redundant
905 code.
906
907 2007-02-10 Joel E. Denny <jdenny@ces.clemson.edu>
908
909 As in semantic actions, make @$ in %initial-action, %destructor, and
910 %printer imply %locations.
911 * src/scan-code.l (SC_SYMBOL_ACTION): Set locations_flag = true when
912 scanning @$.
913 * tests/actions.at (AT_CHECK_ACTION_LOCATIONS): New macro supporting...
914 (@$ in %initial-action implies %locations,
915 @$ in %destructor implies %locations,
916 @$ in %printer implies %locations): ... these new test cases.
917
918 2007-02-07 Paul Eggert <eggert@cs.ucla.edu>
919
920 Undo most of the 2007-02-03 change, switching to the strcase module
921 now that gnulib strcase has been fixed.
922 * bootstrap.conf (gnulib_modules): Remove c-strcase. Add strcase.
923 * lib/.cvsignore: Remove c-ctype.c, c-ctype.h, c-strcase.h,
924 c-strcasecomp.c, c-strncasecmp.c. Add strcasecmp.c, strncasecmp.c
925 * m4/.cvsignore: Add strcase.m4.
926 * src/getargs.c: Revert 2007-02-03 change, as follows.
927 Don't include c-strcase.h.
928 (language_argmatch): Use strcasecmp rather than c_strcasecmp.
929 strcasecmp has "unspecified behavior" outside the POSIX locale,
930 but it works fine in practice if at least one argument is ASCII,
931 as is the case in Bison.
932
933 2007-02-07 Paolo Bonzini <bonzini@gnu.org>
934
935 * tests/java.at: Skip tests if only one of javac/java is present.
936 Reported by Joel E. Denny.
937 * tests/atlocal.in: Adjust copyright years.
938
939 2007-02-05 Paolo Bonzini <bonzini@gnu.org>
940
941 * data/lalr1.java (Stack): Work around old verifiers that disallow
942 access to the private fields of an inner class, from the outer class.
943 We can make Stack's fields public because user code doesn't have access
944 to the instance of Stack used by parse(). Reported by Paul Eggert.
945
946 2007-02-03 Paul Eggert <eggert@cs.ucla.edu>
947
948 * .cvsignore: Add javacomp.sh, javaexec.sh. Is this really
949 the right spot for these files?
950 * bootstrap.conf (gnulib_modules): Add c-strcase.
951 * lib/.cvsignore: Add c-ctype.c c-ctype.h, c-strcasecomp.c,
952 c-strncasecmp.c.
953 * src/getargs.c: Include c-strcase.h.
954 (language_argmatch): Use c_strcasecmp rather than strcasecmp,
955 to avoid unspecified behavior.
956
957 2007-02-01 Joel E. Denny <jdenny@ces.clemson.edu>
958
959 * doc/bison.texinfo (Decl Summary): Correct typo.
960
961 2007-01-30 Paolo Bonzini <bonzini@gnu.org>
962
963 * data/bison.m4 (b4_percent_define_flag_if): Don't treat 0 as false.
964 Complain if the value does not match empty, "true" or "false".
965 * data/c++.m4: Adjust default definitions of %define variables.
966 * data/java.m4: Adjust default definitions of %define variables.
967 * doc/bison.texinfo (Decl Summary): Adjust the %define entry according
968 to above behavior.
969 * tests/input.at (Boolean %define variables): Test new behavior.
970
971 2007-01-29 Paolo Bonzini <bonzini@gnu.org>
972
973 * NEWS: Mention java.
974 * TODO: Remove things that are done.
975 * bootstrap.conf: Add javacomp-script and javaexec-script.
976 * configure.ac: Invoke gt_JAVACOMP and gt_JAVAEXEC.
977
978 * data/Makefile.am: Add new files.
979 * data/java-skel.m4: New.
980 * data/java.m4: New.
981 * data/lalr1.java: New.
982
983 * doc/bison.texinfo: Put "A Complete C++ Example" under
984 C++ Parsers. Add Java Parsers. Put C++ Parsers and Java Parsers
985 under Other Languages.
986
987 * src/getargs.c (valid_languages): Add Java.
988 * src/getargs.h (struct bison_language): Update size of string fields.
989
990 * tests/Makefile.am: Add java.at.
991 * tests/atlocal.in: Add CONF_JAVA and CONF_JAVAC.
992 * tests/java.at: New.
993 * tests/testsuite.at: Include it.
994
995 2007-01-28 Joel E. Denny <jdenny@ces.clemson.edu>
996
997 Clean up.
998 * src/scan-skel.l (at_directive_perform): Add at_directive_argc and
999 at_directive_argv arguments so these no longer have to be global
1000 variables. Also, update the implementation for the following changes.
1001 (fail_for_at_directive_too_many_args,
1002 fail_for_at_directive_too_few_args): Add at_directive_name argument.
1003 (at_directive_name): Remove as at_directive_argv[0] will be used for
1004 this now.
1005 (AT_DIRECTIVE_ARGC_MAX): Increment to make space in at_directive_argv
1006 for the directive name.
1007 (at_directive_argc, at_directive_argv): Make these local within
1008 skel_lex instead of global.
1009 (INITIAL): Update directive start action for above changes.
1010 (SC_AT_DIRECTIVE_ARG): Rename to...
1011 (SC_AT_DIRECTIVE_ARGS): ... this, and update for above changes.
1012 (SC_AT_DIRECTIVE_SKIP_WS): Update.
1013 (scan_skel): Move yylex_destroy to...
1014 (skel_scanner_free): ... here.
1015 * tests/skeletons.at (installed skeleton file name): Rename to...
1016 (installed skeleton file names): ... this.
1017
1018 2007-01-27 Joel E. Denny <jdenny@ces.clemson.edu>
1019
1020 * ChangeLog: For changes in doc/bison.texinfo, consistently reference
1021 node names: say "Table of Symbols" not "Bison Symbols", and say "Decl
1022 Summary" not "Directives".
1023 * doc/bison.texinfo (Decl Summary, Calc++ Parser): Cross-reference the
1024 %code entry in "Decl Summary" rather than the one in "Table of Symbols"
1025 since the former is now the more complete one.
1026 (Prologue Alternatives): Likewise and do the same for %defines.
1027 (Table of Symbols): Add summary of %code, add summary of %define, and
1028 move full %code documentation to...
1029 (Decl Summary): ... here for consistency with other entries in these
1030 sections.
1031 Move %define entry in order to keep this list alphabetized.
1032 Reword %define entry a little to put less emphasis on the skeleton
1033 concept, which most users shouldn't have to think about.
1034
1035 2007-01-26 Paul Eggert <eggert@cs.ucla.edu>
1036
1037 Adjust to recent gnulib changes.
1038 * lib/.cvsignore: Remove stpcpy.h, strndup.h, strnlen.h.
1039 Add string.h, string_.h, unistd_.h, wchar_.h.
1040 * m4/.cvsignore: Add gnulib-common.m4, string_h.m4, wchar.m4.
1041 * src/system.h: Don't include <stpcpy.h>; this is now done by
1042 <string.h>.
1043
1044 2007-01-23 Paolo Bonzini <bonzini@gnu.org>
1045
1046 Simplify implementation of unqualified %code, implement macros for
1047 uniform treatment of boolean %define flags. Document %define.
1048 * data/bison.m4 (b4_percent_define_ifdef, b4_percent_define_flag_if,
1049 b4_percent_code_ifdef): New.
1050 (b4_percent_code_get): Map unqualified %code to b4_percent_code().
1051 * data/c++.m4: Define default value for global_tokens_and_yystype.
1052 * data/glr.cc: Likewise.
1053 * data/location.cc: Use b4_percent_define_flag_if.
1054
1055 * doc/bison.texinfo (Decl Summary): Document %define.
1056
1057 * src/parse-gram.y (Unqualified %code): Change muscle name to
1058 b4_percent_code().
1059 (content.opt): Default to empty.
1060
1061 2007-01-17 Joel E. Denny <jdenny@ces.clemson.edu>
1062
1063 Implement support for relative and absolute skeleton file names.
1064 Discussed starting at
1065 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00071.html>.
1066 * doc/bison.texinfo (Decl Summary): Document in %skeleton entry.
1067 (Bison Options): Document in --skeleton entry.
1068 * src/output.c (output_skeleton): Use strncpy rather than strcpy since
1069 full_skeleton can't necessarily hold all of pkgdatadir.
1070 If the specified skeleton file name contains a `/', don't prepend
1071 pkgdatadir.
1072 * src/parse-gram.y (prologue_declaration): If the specified skeleton
1073 file name contains a `/', prepend the grammar file directory.
1074 * tests/Makefile.am (TESTSUITE_AT): Add skeletons.at.
1075 * skeletons.at: New file.
1076 (relative skeleton file names): New test case.
1077 (installed skeleton file names): New test case.
1078 * tests/testsuite.at: Include skeletons.at.
1079
1080 * bootstrap: Update copyright to 2007.
1081
1082 2007-01-17 Paolo Bonzini <bonzini@gnu.org>
1083
1084 * bootstrap: Remove occurrences of .#bootmp from the files.
1085
1086 2007-01-17 Akim Demaille <akim@epita.fr>
1087
1088 * doc/bison.texinfo (Calc++ Parser): Don't try to alias
1089 nonterminals.
1090 Use per-type %printer.
1091
1092 2007-01-17 Joel E. Denny <jdenny@ces.clemson.edu>
1093
1094 * NEWS, data/c++-skel.m4, data/c++.m4, data/c-skel.m4, data/c.m4,
1095 data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
1096 djgpp/config.site, src/files.c, src/files.h, src/main.c,
1097 src/muscle_tab.c, src/muscle_tab.h, src/parse-gram.y, src/reader.h,
1098 src/scan-skel.h, src/scan-skel.l, tests/actions.at, tests/calc.at,
1099 tests/glr-regression.at, tests/input.at, tests/local.at,
1100 tests/output.at, tests/torture.at: Update copyright to 2007.
1101
1102 2007-01-16 Akim Demaille <akim@epita.fr>
1103
1104 * doc/bison.texinfo (Calc++ Parsing Driver): Let "parse" return an
1105 error code.
1106 (Calc++ Scanner): Exit with failure if we can't open the input
1107 file.
1108 Accept "-" standing for stdin.
1109 (Calc++ Top Level): Print the result only if the parsing was
1110 successful.
1111
1112 2007-01-16 Akim Demaille <akim@epita.fr>
1113
1114 * data/lalr1.cc (yy_reduce_print_): Add a missing end-of-line.
1115
1116 2007-01-15 Paolo Bonzini <bonzini@gnu.org>
1117 and Joel E. Denny <jdenny@ces.clemson.edu>
1118
1119 Clean up %define and %code implementation in M4 some. Most
1120 importantly, rename all related macros to be in the b4_percent_define
1121 and b4_percent_code namespaces. Also, complete support for `.' in
1122 %define variable names and %code qualifiers.
1123 * data/bison.m4 (b4_check_user_names): Check for special
1124 "SKELETON-NAMESPACE(name)" macros instead of using two nested
1125 m4_foreach loops.
1126 (b4_get_percent_define, b4_get_percent_code): Rename to...
1127 (b4_percent_define_get, b4_percent_code_get): ... these.
1128 Extend documentation with examples.
1129 For SKELETON-NAMESPACE (as documented for b4_check_user_names), use
1130 b4_percent_define_skeleton_variables and
1131 b4_percent_code_skeleton_qualifiers.
1132 Expect any value for the %define variable `foo' to be stored in the
1133 macro named `b4_percent_define(foo)'; expect any %code blocks for the
1134 qualifier `foo' to be stored in a macro named `b4_percent_code(foo)';
1135 expect any unqualified %code blocks to be stored in a macro named
1136 `b4_percent_code_unqualified'.
1137 Use m4_indir so that %define variable names and %code qualifiers can
1138 contain `.', which is allowed by the grammar parser.
1139 (b4_percent_define_default): New macro to set a default value for a
1140 %define variable.
1141 (m4_wrap): Update wrapped code, and fix some underquoting.
1142 (b4_check_user_names_wrap): Update and define outside the m4_wrap.
1143 Expect grammar uses of %define variables and %code qualifiers to be
1144 defined in b4_percent_define_user_variables and
1145 b4_percent_code_user_qualifiers.
1146 * data/c++.m4: Use b4_percent_define_default rather than
1147 m4_define_default. Fix some underquoting. Skeleton usage of %define
1148 variable define_location_comparison now implies skeleton usage of
1149 %define variable filename_type.
1150 * data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
1151 data/push.c, data/yacc.c: Update macro names.
1152 * src/parse-gram.y (prologue_declaration, grammar_declaration): Update
1153 muscle names.
1154
1155 2007-01-14 Juan Manuel Guerrero <juan.guerrero@gmx.de>
1156
1157 DJGPP specific issues.
1158
1159 * djgpp/config.site: Set ac_cv_path_mkdir to a sane DJGPP specific
1160 default. Set gl_cv_absolute_wctype_h to a sane DJGPP specific default.
1161
1162 2007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
1163
1164 * tests/glr-regression.at: Use AT_PARSER_CHECK rather than AT_CHECK to
1165 run parsers in all tests so that Valgrind is invoked during
1166 maintainer-check-valgrind.
1167 (Duplicate representation of merged trees): Free all semantic values.
1168 (Duplicated user destructor for lookahead): Likewise.
1169
1170 2007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
1171
1172 * tests/local.at (AT_PARSER_CHECK): Add a PRE argument to specify a
1173 command-line prefix.
1174 * tests/torture.at (Exploding the Stack Size with Alloca): Stderr is
1175 ignored, so use that PRE to set --log-fd=1 in VALGRIND_OPTS so we don't
1176 miss Valgrind messages.
1177 (Exploding the Stack Size with Malloc): Likewise.
1178
1179 2007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
1180
1181 Ignore YYSTACK_USE_ALLOCA for push parsers since the stacks can't be
1182 locals. Reported by Juan Manuel Guerrero at
1183 <http://lists.gnu.org/archive/html/bug-bison/2007-01/msg00000.html>.
1184 * data/push.c: Enclose the #ifdef YYSTACK_USE_ALLOCA in b4_push_if.
1185 Fix some indentation also.
1186 * tests/torture.at (Exploding the Stack Size with Alloca): Add comment
1187 explaining this issue.
1188
1189 2007-01-09 Paolo Bonzini <bonzini@gnu.org>
1190 and Joel E. Denny <jdenny@ces.clemson.edu>
1191
1192 Simplify union and prologue handling, and escape union and lex/parse
1193 params with digraphs.
1194 * data/bison.m4 (b4_pre_prologue, b4_post_prologue): Set their default
1195 values to the empty string since these are no longer guaranteed
1196 initialized by the front-end.
1197 * data/glr.c, data/glr.cc, data/lalr1.cc, data/push.c, data/yacc.c: Add
1198 braces around b4_user_stype since this is no longer done by the
1199 front-end.
1200 * src/files.c, src/files.h (pre_prologue_obstack,
1201 post_prologue_obstack): Remove.
1202 * src/muscle_tab.c (muscle_pair_list_grow): Don't duplicate header
1203 comments here. Use MUSCLE_OBSTACK_SGROW so that values are escaped
1204 with digraphs. This fixes lex params and parse params.
1205 * src/muscle_tab.h (muscle_pair_list_grow): Update comments.
1206 * src/output.c (prepare): Remove muscle insertion of the prologues.
1207 (output): Remove freeing of pre_prologue_obstack and
1208 post_prologue_obstack.
1209 * src/parse-gram.y (prologue_declaration): Use muscle_code_grow rather
1210 than prologue_augment for prologue parsing so you don't need prologue
1211 obstacks.
1212 (grammar_declaration): For %union RHS, use `braceless' instead of
1213 "{...}" so that braces are already stripped and code is escaped with
1214 digraphs.
1215 * src/reader.c (prologue_augment): Remove.
1216 (reader): Remove initialization of pre_prologue_obstack and
1217 post_prologue_obstack.
1218 * src/reader.h (prologue_augment): Remove.
1219
1220 * data/c.m4: Remove stray parenthesis.
1221
1222 2007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
1223
1224 Remove quotes from variables names in %define directives and from
1225 qualifiers in %code directives, and restrict the characters that are
1226 allowed in them to M4-friendly ones. For %define, continue to support
1227 the quoted form as a deprecated feature. Discussed starting at
1228 <http://lists.gnu.org/archive/html/bison-patches/2007-01/msg00023.html>.
1229 * NEWS (2.3a+): Add entry for the change to %define. Update entry for
1230 %code.
1231 * doc/bison.texinfo (Prologue Alternatives): Update.
1232 (Decl Summary): In %defines entry, update mention of `%code requires'
1233 and `%code provides'.
1234 (C++ Location Values): Update %define uses.
1235 (Calc++ Parser Interface): Likewise.
1236 (Calc++ Parser): Likewise, and update `%code requires' uses.
1237 (Table of Symbols): Update %code documentation.
1238 * src/parse-gram.y (prologue_declaration): For %define variables, use
1239 `variable' instead of `STRING'.
1240 (grammar_declaration): For %code qualifiers, use `ID' instead of
1241 `STRING'.
1242 (variable): New nonterminal that takes an `ID' or a `STRING'.
1243 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Update %code
1244 and %define uses.
1245 * tests/calc.at (_AT_DATA_CALC_Y): Update %define use.
1246 * tests/input.at (Reject unused %code qualifiers): Update %code uses.
1247 (%define errors): Update %define uses.
1248
1249 2007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
1250
1251 * src/parse-gram.y (prologue_declaration): Use MUSCLE_INSERT_STRING
1252 instead of muscle_insert for %define values so that M4-special
1253 characters are replaced with digraphs.
1254 * tests/input.at (%define errors): Extend to check weird values.
1255
1256 2007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
1257
1258 Instead of having skeletons declare all valid %define variables and
1259 %code qualifiers, provide macros that retrieve the associated values
1260 and build these lists automatically. Thus Bison will now warn when a
1261 variable or qualifier is not used by the skeleton in the current
1262 invocation regardless of whether it might sometimes be used by that
1263 skeleton in other invocations. Also, move all %define value macros to
1264 the b4_percent_define_ namespace, and remove the %define "NAME" {CODE}
1265 form, which is replaced by %code.
1266 * data/bison.m4 (b4_check_for_unrecognized_names): Rename to...
1267 (b4_check_user_names): ... this, and change the series of valid name
1268 arguments to a single list argument for names used in the skeleton
1269 similar to the existing list argument for names used in the grammar.
1270 Warn instead of complaining.
1271 (b4_get_percent_define, b4_get_percent_code): New to retrieve %define
1272 values and %code code, to format %code code properly, and to build
1273 lists of all %define variables and %code qualifiers used in the
1274 skeleton: b4_skeleton_percent_define_variables and
1275 b4_skeleton_percent_code_qualifiers.
1276 (b4_check_percent_define_variables, b4_check_percent_code_qualifiers):
1277 Remove, and...
1278 (m4_wrap): ... m4_wrap b4_check_user_names invocations instead so that
1279 the skeleton names lists can finish building first. In place of
1280 b4_used_percent_define_variables and b4_used_percent_code_qualifiers,
1281 expect the lists b4_user_percent_define_variables and
1282 b4_user_percent_code_qualifiers.
1283 * data/c++.m4: Where setting default values for b4_parser_class_name,
1284 b4_location_type, b4_filename_type, b4_namespace, and
1285 b4_define_location_comparison, update their names to the
1286 b4_percent_define_ namespace.
1287 * data/glr.c: Don't use b4_check_percent_define_variables and
1288 b4_check_percent_code_qualifiers. Use b4_get_percent_code.
1289 * data/glr.cc, data/lalr1.cc: Likewise, and use b4_get_percent_define.
1290 (b4_parser_class_name, b4_namespace): Define these using
1291 b4_get_percent_define for parser_class_name and namespace.
1292 * data/location.cc: Use b4_get_percent_define.
1293 * data/push.c: Don't use b4_check_percent_define_variables and
1294 b4_check_percent_code_qualifiers. Use b4_get_percent_code.
1295 * data/yacc.c: Likewise, and don't call m4_exit in
1296 b4_use_push_for_pull_if or m4_wrap code will never execute.
1297 * src/muscle_tab.c, src/muscle_tab.h (muscle_grow_used_name_list):
1298 Rename to...
1299 (muscle_grow_user_name_list): ... this for consistency with the
1300 terminology used in bison.m4.
1301 * src/parse-gram.y (prologue_declaration): Prepend "percent_define_" to
1302 %define variable names, and rename muscle used_percent_define_variables
1303 to user_percent_define_variables.
1304 (grammar_declaration): Rename muscle used_percent_code_qualifiers to
1305 user_percent_code_qualifiers.
1306 (content): Remove.
1307 (content.opt): Replace content RHS with STRING RHS so %define "NAME"
1308 {CODE} form is no longer accepted.
1309 * tests/input.at (Reject bad %code qualifiers): Rename to...
1310 (Reject unused %code qualifiers): ... this, and update test output.
1311 (%define error): Update test output.
1312
1313 2007-01-07 Joel E. Denny <jdenny@ces.clemson.edu>
1314
1315 Check for unrecognized %define variables similar to checking for
1316 unrecognized %code qualifiers. Check for redefined %define variables.
1317 * data/bison.m4 (b4_check_for_unrecognized_names): New macro that
1318 generalizes...
1319 (b4_check_percent_code_qualifiers): ... this, which now wraps it.
1320 (b4_check_percent_define_variables): New, also wraps it.
1321 * data/glr.c: Unless glr.cc is wrapping glr.c, declare no valid %define
1322 variables using b4_check_percent_define_variables.
1323 * data/glr.cc, data/lalr1.cc: Declare the valid %define variables as
1324 all those exercised in the test suite and all those listed in the
1325 `Default values' section of c++.m4. Are there others?
1326 * data/push.c, data/yacc.c: Declare no valid %define variables.
1327 * src/muscle_tab.c, src/muscle_tab.h (muscle_find_const): New function,
1328 similar to muscle_find, but it works even when the muscle stores a
1329 const value.
1330 (muscle_grow_used_name_list): New function for constructing the used
1331 name list muscles that b4_check_for_unrecognized_names requires.
1332 * src/parse-gram.y (prologue_declaration): Warn if a variable is
1333 %define'd more than once. Define the b4_used_percent_define_variables
1334 muscle with muscle_grow_used_name_list.
1335 (grammar_declaration): Abbreviate %code code with
1336 muscle_grow_used_name_list.
1337 * tests/input.at (%define errors): New.
1338
1339 2007-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
1340
1341 Provide warn_at, complain_at, and fatal_at function callbacks to the
1342 skeletons, and use this for %code qualifier complaints.
1343 * data/bison.m4 (b4_error_at): New, invoked by...
1344 (b4_warn_at, b4_complain_at, b4_fatal_at): ... these new macros to wrap
1345 the skeleton scanner's new @warn_at(...@), @complain_at(...@), and
1346 @fatal_at(...@) directives.
1347 (b4_check_percent_code_qualifiers): Rewrite to expect locations for
1348 qualifiers in b4_used_percent_code_qualifiers and to use
1349 b4_complain_at.
1350 * src/location.c, src/location.h (boundary_set_from_string): New global
1351 function.
1352 * src/muscle_tab.c, src/muscle_tab.h (muscle_boundary_grow): New global
1353 function.
1354 * src/parse-gram.y (grammar_declaration): Add locations for qualifiers
1355 to b4_used_percent_code_qualifiers.
1356 * src/scan-skel.l (fail_for_at_directive_too_few_args): New static
1357 function.
1358 (AT_DIRECTIVE_ARGC_MAX): Increase for boundary arguments.
1359 (lineno): Rename to...
1360 (out_lineno): ... this so I don't misunderstand it again.
1361 (SC_AT_DIRECTIVE_SKIP_WS): Don't increment out_lineno for newlines
1362 here; these newlines are in the input but not the output file.
1363 (SC_AT_DIRECTIVE_ARG): Likewise. Extract directive execution to...
1364 (at_directive_perform): ... this new static function, and add handling
1365 of new @warn_at(...@), @complain_at(...@), and @fatal_at(...@)
1366 directives.
1367 * tests/input.at (Reject bad %code qualifiers): Update test output with
1368 locations and extend.
1369
1370 * tests/output.at (Output file name: [, Output file name: ]): Remove
1371 bogus comment about these tests failing.
1372
1373 2007-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
1374
1375 Clean up b4_check_percent_code_qualifiers a little.
1376 * data/bison.m4 (b4_check_percent_code_qualifiers): Expect qualifiers
1377 in b4_used_percent_code_qualifiers to be double-M4-quoted. Rewrite
1378 documentation and add examples.
1379 * src/parse-gram.y (grammar_declaration): Double-M4-quote those
1380 qualifiers here.
1381
1382 2007-01-05 Joel E. Denny <jdenny@ces.clemson.edu>
1383
1384 Don't use m4_divert since it makes m4_divert_push and m4_divert_pop
1385 unreliable -- especially when they're hidden inside another macro.
1386 * data/bison.m4, data/c++-skel.m4, data/c++.m4, data/c-skel.m4,
1387 data/c.m4: Remove m4_divert(-1).
1388 * data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
1389 data/push.c, data/yacc.c: Likewise, and replace m4_divert(0) with
1390 m4_divert_push(0) and m4_divert_pop(0).
1391 * src/output.c (output_skeleton): Don't add an m4_divert_push(0) and
1392 an m4_wrap([m4_divert_pop(0)]) to the M4. Diversion -1, which is
1393 pushed and popped by m4sugar, should be first on the stack.
1394
1395 Provide warn, complain, and fatal function callbacks to the skeletons.
1396 This provides more flexibility than m4_fatal, improves the error
1397 message format, and captures messages for translation. Discussed
1398 starting at
1399 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00063.html>.
1400 * data/bison.m4 (b4_error): New, invoked by...
1401 (b4_warn, b4_complain, b4_fatal): ... these new macros to wrap the
1402 skeleton scanner's new @warn(...@), @complain(...@), and @fatal(...@)
1403 directives. Because these M4 macros might be called when the current
1404 diversion is -1 or 0, m4_divert_push and m4_divert_pop is used; thus
1405 the previous removal of uses of m4_divert, which caused trouble.
1406 (b4_check_percent_code_qualifiers): Use b4_complain instead of
1407 m4_fatal to report unrecognized %code qualifiers.
1408 * data/c++-skel.m4: Use b4_complain instead of m4_fatal to report C++
1409 push parser requests.
1410 * data/glr.c: Use b4_complain instead of m4_fatal to report
1411 non-deterministic push parser requests.
1412 Update @output usage to @output(...@) form.
1413 * data/glr.cc, data/lalr1.cc: Use b4_fatal instead of m4_fatal to
1414 report missing %defines. Update @output usage to @output(...@) form.
1415 * data/location.cc, data/push.c, data/yacc.c: Update @output usage to
1416 @output(...@) form.
1417 * src/main.c (main): Invoke skel_scanner_free.
1418 * src/scan-skel.h (skel_scanner_free): Prototype new function.
1419 * src/scan-skel.l (FLEX_NO_OBSTACK): Don't define; we now need the
1420 obstack_for_string from flex-scanner.h.
1421 (YY_DECL): Use to declare skel_lex static.
1422 (decode_at_digraphs): Remove; now handled in the new
1423 SC_AT_DIRECTIVE_ARG start condition.
1424 (fail_for_at_directive_too_many_args, fail_for_invalid_at): New static
1425 functions.
1426 (at_directive_name, AT_DIRECTIVE_ARGC_MAX, at_directive_argc,
1427 at_directive_argv): New static globals.
1428 (INITIAL): Use fail_for_invalid_at.
1429 Don't parse `@output file_name\n' or `@basename(...@)'. Instead,
1430 recognize the start of a generalized `@directive(...@)' form and
1431 start...
1432 (SC_AT_DIRECTIVE_ARG): ... this new start condition to parse the
1433 directive args (using the new obstack_for_string), to decode the
1434 contained @ diagraphs, and to perform the directive. It recognizes
1435 @basename(...@), @warn(...@), @complain(...@), @fatal(...@), and
1436 @output(...@).
1437 (SC_AT_DIRECTIVE_SKIP_WS): New start condition started by
1438 SC_AT_DIRECTIVE_ARG to skip whitespace after the argument delimiter,
1439 `@,'.
1440 (scan_skel): Initialize obstack_for_string on the first call.
1441 (skel_scanner_free): New function to free obstack_for_string.
1442 * tests/input.at (Reject bad %code qualifiers): Update test output.
1443
1444 2007-01-04 Joel E. Denny <jdenny@ces.clemson.edu>
1445
1446 Consolidate the 4 prologue alternative directives (%code, %requires,
1447 %provides, and %code-top) into a single %code directive with an
1448 optional qualifier field. Discussed at
1449 <http://lists.gnu.org/archive/html/bison-patches/2007-01/msg00012.html>.
1450 * NEWS (2.3a+): Rewrite the existing entry for the prologue
1451 alternatives.
1452 * doc/bison.texinfo (Prologue Alternatives): Update.
1453 (Decl Summary): Update to %code "requires" and %code "provides".
1454 (Calc++ Parser): Update to %code "requires".
1455 (Table of Symbols): Remove entries for %requires, %provides, and
1456 %code-top. Rewrite %code entry, and add a %code "QUALIFIER" entry.
1457 * data/bison.m4 (b4_user_provides, b4_user_requires): Remove as these
1458 are replaced by b4_percent_code_provides and b4_percent_code_requires,
1459 which are skeleton-specific.
1460 (b4_check_percent_code_qualifiers): New. A skeleton can use this to
1461 declare what %code qualifiers it supports and to complain if any other
1462 qualifiers were used in the grammar.
1463 * data/glr.cc: Update to use b4_user_code([b4_percent_code_requires])
1464 and b4_user_code([b4_percent_code_provides]) in place of
1465 b4_user_requires and b4_user_provides.
1466 * data/glr.c, data/lalr1.cc, data/push.c, data/yacc.c: Likewise.
1467 Add b4_user_code([b4_percent_code_top]) and
1468 b4_user_code([b4_percent_code]).
1469 Invoke b4_check_percent_code_qualifiers.
1470 * src/parse-gram.y (PERCENT_CODE_TOP, PERCENT_PROVIDES,
1471 PERCENT_REQUIRES): Remove.
1472 (grammar_declaration): Remove RHS's for %code-top, %provides, and
1473 %requires. Rewrite the %code RHS as the unqualified form defining the
1474 muscle b4_percent_code. Add another RHS for the qualified %code form,
1475 which defines muscles of the form b4_percent_code_QUALIFIER and the
1476 b4_used_percent_code_qualifiers muscle.
1477 * src/scan-gram.l (PERCENT_CODE_TOP, PERCENT_PROVIDES,
1478 PERCENT_REQUIRES): Remove.
1479 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Update to use
1480 %code "requires" and %code "provides".
1481 * tests/input.at (Reject bad %code qualifiers): New.
1482
1483 2007-01-03 Joel E. Denny <jdenny@ces.clemson.edu>
1484
1485 Use the new code_props interface for destructors and printers.
1486 * src/symtab.h (symbol, semantic_type): Remove destructor_location and
1487 printer_location members, and change the type of the destructor and
1488 printer members to code_props.
1489 (symbol_destructor_set, symbol_destructor_get, symbol_printer_set,
1490 symbol_printer_get, semantic_type_destructor_set,
1491 semantic_type_printer_set, default_tagged_destructor_set,
1492 default_tagless_destructor_set, default_tagged_printer_set,
1493 default_tagless_printer_set): Use code_props in arguments and return
1494 types in place of char const * and location.
1495 (symbol_destructor_location_get, symbol_printer_location_get): Remove
1496 since the locations are now contained in the return of
1497 symbol_destructor_get and symbol_printer_get.
1498 * src/output.c (symbol_destructors_output, symbol_printers_output):
1499 Replace with...
1500 (symbol_code_props_output): ... this to eliminate duplicate code.
1501 (output_skeleton): Update to use symbol_code_props_output.
1502 * src/reader.c (symbol_should_be_used): Update use of
1503 symbol_destructor_get.
1504 * src/symlist.c (symbol_list_destructor_set, symbol_list_printer_set):
1505 Update uses of the various _destructor_set and _printer_set functions.
1506 * src/symtab.c: (default_tagged_destructor_location,
1507 default_tagless_destructor_location, default_tagged_printer_location,
1508 default_tagless_printer_location): Remove since we...
1509 (default_tagged_destructor, default_tagless_destructor,
1510 default_tagged_printer, default_tagless_printer): ... change the type
1511 of these to code_props.
1512 (symbol_new, semantic_type_new, symbol_destructor_set,
1513 semantic_type_destructor_set, symbol_destructor_get,
1514 symbol_printer_set, semantic_type_printer_set, symbol_printer_get,
1515 symbol_check_alias_consistency, default_tagged_destructor_set,
1516 default_tagless_destructor_set, default_tagged_printer_set,
1517 default_tagless_printer_set): Update.
1518 (symbol_destructor_location_get, symbol_printer_location_get): Remove.
1519 (SYMBOL_CODE_PRINT): New similar to SYMBOL_ATTR_PRINT but for
1520 code_props members.
1521 (symbol_print): Use SYMBOL_CODE_PRINT.
1522
1523 2007-01-03 Joel E. Denny <jdenny@ces.clemson.edu>
1524
1525 Use the new code_props interface for rule actions.
1526 * src/symlist.h (symbol_list): Replace action, action_location, and
1527 used members with a code_props action_props member.
1528 * src/reader.c (symbol_should_be_used, grammar_rule_check,
1529 grammar_midrule_action, grammar_current_rule_merge_set,
1530 grammar_current_rule_symbol_append, packgram): Update.
1531 * src/scan-code.h (translate_rule_action): Remove, no longer used.
1532 * src/scan-code.l (handle_action_dollar): Update.
1533 (translate_rule_action): Remove, no longer used.
1534 * src/symlist.c (symbol_list_sym_new, symbol_list_syms_print): Update.
1535
1536 2007-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
1537
1538 Use the new code_props interface in parse-gram.y.
1539 * src/parse-gram.y (prologue_declaration, braceless, epilogue.opt):
1540 Update all uses of translate_* functions to use the new code_props
1541 interface and to use gram_scanner_last_string_free and
1542 code_scanner_last_string_free where possible.
1543 (grammar_declaration): symbol_list_destructor_set and
1544 symbol_list_printer_set now perform the translation, so don't do it
1545 here. Use gram_scanner_last_string_free where possible.
1546 * src/scan-code.h, src/scan-code.l (translate_symbol_action,
1547 translate_code): Remove, no longer used.
1548 * src/symlist.h, src/symlist.c (symbol_list_destructor_set,
1549 symbol_list_printer_set): Perform code translation here rather than
1550 depending on the caller to do so.
1551
1552 * src/symlist.h (struct symbol_list): Correct some documentation typos.
1553 * src/scan-gram.h (gram_last_string): Remove declaration.
1554 * src/scan-gram.l (last_string): Declare it static.
1555
1556 2007-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
1557
1558 Encapsulate code properties and related functionality for the various
1559 destructors, printers, and actions into a code_props structure and
1560 interface. This patch merely implements code_props in scan-code.h and
1561 scan-code.l. Future patches will rewrite other modules to use it.
1562 Discussed starting at
1563 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00020.html>.
1564 * src/location.h (EMPTY_LOCATION_INIT): Define so that it's easier to
1565 consistently initialize const structs that have an empty location
1566 field.
1567 * src/location.c (empty_location): Initialize with EMPTY_LOCATION_INIT
1568 to ensure consistency.
1569 * src/scan-code.h (code_props): New structure.
1570 (code_props_none_init, CODE_PROPS_NONE_INIT, code_props_none): New
1571 function, macro, and const global variable for initializing a
1572 code_props with no code.
1573 (code_props_plain_init, code_props_symbol_action_init,
1574 code_props_rule_action_init, code_props_translate_code): The rest of
1575 the new code_props functional interface. Among other things, the init
1576 functions set the code_props kind field so that
1577 code_props_translate_code will know whether to behave like
1578 translate_symbol_action, translate_rule_action, or translate_code.
1579 These old translate functions must remain until all other modules are
1580 updated to use the new code_props interface.
1581 (code_scanner_last_string_free): New function similar to
1582 gram_scanner_last_string_free.
1583 (code_scanner_free): Add documentation.
1584 * src/scan-code.l: Implement the new interface.
1585 (code_lex): Make it static, add a code_props* argument, and remove the
1586 rule argument.
1587 (last_string): New static global similar to the one in scan-gram.l.
1588 (SC_RULE_ACTION): Update to use the code_props* argument to code_lex
1589 instead of rule.
1590 (SC_SYMBOL_ACTION): For $$, set the is_value_used member of the
1591 code_props since Bison may one day use this information for destructors
1592 and printers.
1593 (<*><<EOF>>): Use STRING_FINISH so that last_string is set.
1594 (handle_action_dollar): Use symbol_list_n_get and set used flag
1595 directly since symbol_list_n_used_set is removed.
1596 (translate_action): Add a code_props* argument and remove the rule,
1597 action, and location arguments. Pass the code_props* on to code_lex.
1598 (translate_rule_action, translate_symbol_action, translate_code):
1599 Rewrite as wrappers around the new code_props interface.
1600 * src/symlist.h, src/symlist.c (symbol_list_n_used_set): Remove since
1601 it would eventually need to break the encapsulation of code_props.
1602
1603 2007-01-01 Joel E. Denny <jdenny@ces.clemson.edu>
1604
1605 * etc/.cvsignore: New.
1606
1607 2007-01-01 Joel E. Denny <jdenny@ces.clemson.edu>
1608
1609 Add maintainer-push-check to run maintainer-check using push parsing in
1610 place of pull parsing where available.
1611 * Makefile.am (maintainer-push-check): New.
1612 * data/bison.m4 (b4_use_push_for_pull_if): New.
1613 * data/push.c: Redefine b4_push_if and b4_use_push_for_pull_if
1614 appropriately based on their existing values.
1615 (yypush_parse): Don't print push-parser-specific diagnostics if push
1616 parsing is being used in place of pull parsing.
1617 * data/yacc.c: If push parsing should replace pull parsing, redirect to
1618 push.c.
1619 * src/output.c (prepare): Check BISON_USE_PUSH_FOR_PULL environment
1620 variable, and insert b4_use_push_for_pull_flag into muscles.
1621 * tests/Makefile.am (maintainer-push-check): New.
1622
1623 2006-12-31 Joel E. Denny <jdenny@ces.clemson.edu>
1624
1625 * data/push.c (yypush_parse): Set yynew = 1 at the end of a parse
1626 (whether successful or failed) so that yypush_parse can be invoked
1627 again to start a new parse using the same yypstate.
1628 * tests/torture.at (AT_DATA_STACK_TORTURE): For push mode, extend to
1629 check multiple yypull_parse invocations on the same yypstate. For pull
1630 mode, extend to check multiple yyparse invocations.
1631 (Exploding the Stack Size with Alloca): Extend to try with
1632 %push-pull-parser.
1633 (Exploding the Stack Size with Malloc): Likewise.
1634
1635 * tests/calc.at (Simple LALR Calculator): Don't specify
1636 %skeleton "push.c" since %push-pull-parser implies that now.
1637 * tests/headers.at (export YYLTYPE): Don't check for the push
1638 declarations. Otherwise, this test case can't be used to see if push
1639 mode can truly emulate pull mode.
1640 * tests/input.at (Torturing the Scanner): Likewise.
1641 * tests/local.at (AT_YACC_OR_PUSH_IF, AT_PUSH_IF): Remove.
1642 (AT_YYERROR_SEES_LOC_IF): Rather than AT_YACC_OR_PUSH_IF, use
1643 AT_YACC_IF, which now includes the case of push mode since %skeleton
1644 need not be used for push mode. This will be more intuitive once
1645 push.c is renamed to yacc.c.
1646
1647 2006-12-31 Joel E. Denny <jdenny@ces.clemson.edu>
1648
1649 For push mode, convert yyparse from a macro to a function, invoke yylex
1650 instead of passing a yylexp argument to yypull_parse, and don't
1651 generate yypull_parse or yyparse unless %push-pull-parser is declared.
1652 Discussed starting at
1653 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00163.html>.
1654 * data/bison.m4 (b4_pull_if): New.
1655 * data/c.m4 (b4_identification): Define YYPULL similar to YYPUSH.
1656 * data/push.c: Improve M4 quoting a little.
1657 (b4_generate_macro_args, b4_parenthesize): Remove.
1658 (yyparse): If there's a b4_prefix, #define this to b4_prefix[parse]
1659 any time a pull parser is requested.
1660 Don't #define this as a wrapper around yypull_parse. Instead, when
1661 both push and pull are requested, make it a function that does that
1662 same thing.
1663 (yypull_parse): If there's a b4_prefix, #define this to
1664 b4_prefix[pull_parse] when both push and pull are requested.
1665 Don't define this as a function unless both push and pull are
1666 requested.
1667 Remove the yylexp argument and hard-code yylex invocation instead.
1668 * etc/bench.pl.in (bench_grammar): Use %push-pull-parser instead of
1669 %push-parser.
1670 * src/getargs.c (pull_parser): New global initialized to true.
1671 * getargs.h (pull_parser): extern it.
1672 * src/output.c (prepare): Insert pull_flag muscle.
1673 * src/parse-gram.y (PERCENT_PUSH_PULL_PARSER): New token.
1674 (prologue_declaration): Set both push_parser and pull_parser = true for
1675 %push-pull-parser. Set push_parser = true and pull_parser = false for
1676 %push-parser.
1677 * src/scan-gram.l: Don't accept %push_parser as an alternative to
1678 %push-parser since there's no backward-compatibility concern here.
1679 Scan %push-pull-parser.
1680 * tests/calc.at (Simple LALR(1) Calculator): Use %push-pull-parser
1681 instead of %push-parser.
1682 * tests/headers.at (export YYLTYPE): Make yylex static, and don't
1683 prototype it in the module that calls yyparse.
1684 * tests/input.at (Torturing the Scanner): Likewise.
1685 * tests/local.at (AT_PUSH_IF): Check for %push-pull-parser as well.
1686
1687 2006-12-26 Joel E. Denny <jdenny@ces.clemson.edu>
1688
1689 Update etc/bench.pl. Optimize push mode a little (the yyn change
1690 deserves most of the credit).
1691 * Makefile.am (SUBDIRS): Add etc subdirectory.
1692 * configure.ac (AC_CONFIG_FILES): Add etc/bench.pl and etc/Makefile.
1693 * data/push.c (b4_declare_parser_state_variables): Move yyn, yyresult,
1694 yytoken, yyval, and yyloc declarations to...
1695 (yyparse or yypush_parse): ... here to improve performance. For
1696 yypush_parse invocations after the first, be sure to assign yyn its old
1697 value again.
1698 (yypstate_new): Don't bother initializing the yyresult field since the
1699 initial value isn't used.
1700 (yyn, yyresult, yytoken, yyval, yyloc): For each NAME in this list,
1701 remove the #define that, in push mode, set it to yyps->NAME.
1702 * etc/Makefile.am: New.
1703 * etc/bench.pl: Remove and build it instead from...
1704 * etc/bench.pl.in: ... this new file. Use @abs_top_builddir@ to invoke
1705 "tests/bison" from the build directory by default rather than just
1706 invoking "bison" from $PATH.
1707 (calc_grammar): Update push parser code: don't declare yylval globally,
1708 don't define yyparse_wrapper, and don't #define yyparse.
1709 (bench_grammar): Update to check all working combinations of yacc.c,
1710 push.c, impure, pure, pull, and push.
1711
1712 2006-12-25 Joel E. Denny <jdenny@ces.clemson.edu>
1713
1714 For push mode, add pull wrappers around yypush_parse.
1715 * data/push.c: (b4_generate_macro_args, b4_parenthesize): New macros.
1716 (yypull_parse): New function wrapping yypush_parse.
1717 (yyparse): New #define wrapping yypull_parse.
1718 * tests/calc.at (_AT_DATA_CALC_Y): Call yyparse even when %push-parser
1719 is declared.
1720 * tests/headers.at (export YYLTYPE): Make yylex global. For push mode,
1721 prototype yylex in the module that calls yyparse, and don't prototype
1722 yyparse there. Otherwise, the yyparse expansion won't compile.
1723 * tests/input.at (Torturing the Scanner): Likewise.
1724
1725 2006-12-25 Joel E. Denny <jdenny@ces.clemson.edu>
1726
1727 Enable push parsers to operate in impure mode. Thus, %push-parser no
1728 longer implies %pure-parser. The point of this change is to move
1729 towards being able to test the push parser code by running the entire
1730 test suite as if %push-parser had been declared.
1731 * data/push.c (yypush_parse): For impure mode, remove the
1732 yypushed_char, yypushed_val, and yypushed_loc arguments.
1733 Instead, declare these as local variables initialized to the global
1734 yychar, yylval, and yylloc.
1735 For the first yypush_parse invocation only, restore the initial values
1736 of these global variables when it's time to read a token since they
1737 have been overwritten.
1738 * src/parse-gram.y (prologue_declaration): Don't set pure_parser for
1739 %push-parser.
1740 * tests/calc.at (Simple LALR(1) Calculator): Always declare
1741 %pure-parser along with %push-parser since this test case was designed
1742 for pure push parsers.
1743 * tests/local.at (AT_PURE_OR_PUSH_IF): Remove unused.
1744 (AT_YACC_OR_PUSH_IF): New.
1745 (AT_YYERROR_SEES_LOC_IF): Fix enough that the test suite passes, but
1746 add a note that it's still wrong for some cases (as it has been for a
1747 while).
1748 (AT_PURE_LEX_IF): Use AT_PURE_IF instead of AT_PURE_OR_PUSH_IF since
1749 %push-parser no longer implies %pure-parser.
1750
1751 2006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
1752
1753 Remove some unnecessary differences between the pull parser code and
1754 the push parser code. This patch enables yynerrs in push mode.
1755 * data/push.c: Reformat M4 a little.
1756 (b4_yyerror_range): Remove and convert all uses to just yyerror_range.
1757 (b4_declare_scanner_communication_variables): Don't omit yynerrs just
1758 because push mode is on. Instead, if pure mode is on, move yynerrs
1759 to...
1760 (b4_declare_parser_state_variables): ... here.
1761 (yynerrs, yyerror_range): For push mode, #define each NAME in this list
1762 to yyps->NAME so it can be used in yypush_parse.
1763 (yypush_parse): Don't omit uses of yynerrs in push mode.
1764
1765 2006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
1766
1767 Fix bug such that the first pushed token's value and location are
1768 sometimes overwritten (sometimes by %initial-action) before being used.
1769 * data/push.c (yypush_parse): Rename arguments yynchar, yynlval, and
1770 yynlloc to yypushed_char, yypushed_val, and yypushed_loc for clarity.
1771 For the first yypush_parse invocation, initialize yychar to YYEMPTY to
1772 more closely mimic the pull parser logic.
1773 Don't copy the pushed token to yychar, yylval, and yylloc until it's
1774 time to read a token, which is after any initialization of yylval and
1775 yylloc.
1776 (gottoken): Rename label to...
1777 (yyread_pushed_token): ... for clarity and to avoid infringing on the
1778 user namespace.
1779
1780 2006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
1781
1782 Rearrange initialization of the parser state variables so that the
1783 skeleton doesn't have to have a copy for pull mode and another for push
1784 mode. This patch also fixes at least a bug such that yylloc was not
1785 initialized (with b4_location_initial_line and
1786 b4_location_initial_column) upon calling yypush_parse. However, that
1787 initialization now overwrites the first token's location;
1788 %initial-action assigning @$ already did the same thing, and both bugs
1789 will be fixed in a later patch.
1790 * data/push.c (b4_yyssa): Remove and convert all uses to just yyssa.
1791 (b4_declare_parser_state_variables): Remove initialization of yytoken,
1792 yyss, yyvs, yyls, and yystacksize.
1793 (yypstate_new): Remove initialization of some yypstate fields: yystate,
1794 yyerrstatus, yytoken, yyss, yyvs, yyls, yystacksize, yyssp, yyvsp, and
1795 yylsp.
1796 (yyssa, yyvsa, yylsa): For push mode, #define each NAME in this list to
1797 yyps->NAME so it can be used in yypush_parse.
1798 (yyparse or yypush_parse): For yypush_parse, don't print the
1799 "Starting parse" diagnostic for invocations after the first.
1800 Add initialization of yytoken, yyss, yyvs, yyls, and yystacksize; for
1801 yypush_parse, only do it for the first invocation.
1802 Allow yystate, yyerrstatus, yyssp, yyvsp, yylsp, and yylloc
1803 initialization to occur in yypush_parse but only on the first
1804 invocation.
1805
1806 2006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
1807
1808 * data/push.c: Add CPP guards around push parser declarations in both
1809 the header and the code file.
1810 In the code file, move the push parser declarations to the same place
1811 they appear in the header file.
1812 Clean up the M4 some, especially the inconsistent underquoting in
1813 some b4_c_function_def and b4_c_function_decl uses.
1814
1815 2006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
1816
1817 Encapsulate the push parser state variables into an M4 macro so the
1818 push skeleton doesn't have to list them again for pull mode's yyparse.
1819 For push mode, remove yypush_parse's local equivalents of these
1820 variables to eliminate unnecessary copying between the two sets at
1821 run-time. This patch also fixes at least a bug related to multiple
1822 %initial-action invocations in push mode.
1823 * data/push.c (b4_declare_parser_variables): Rename to...
1824 (b4_declare_scanner_communication_variables): ... this for clarity and
1825 update both uses.
1826 (b4_declare_yyparse_variables): Remove and move its contents to the one
1827 spot where it was invoked.
1828 (b4_declare_parser_state_variables): New macro containing the parser
1829 state variables required by push mode.
1830 (struct yypstate): Replace all fields but yynew with
1831 b4_declare_parser_state_variables.
1832 (yystate, yyn, yyresult, yyerrstatus, yytoken, yyss, yyssp, yyvs,
1833 yyvsp, yyls, yylsp, yystacksize, yyval, yyloc): For push mode, #define
1834 each NAME in this list to yyps->NAME so it can be used in yypush_parse.
1835 (yyparse or yypush_parse): For yyparse in pull mode, replace local
1836 parser state variable declarations with
1837 b4_declare_parser_state_variables.
1838 Don't initialize parser state variables when calling yypush_parse since
1839 yypstate_new already does that.
1840 Invoke the user's initial action only upon the first yypush_parse
1841 invocation.
1842 Remove all code that copies between the local parser state variables
1843 and the yypstate.
1844
1845 2006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
1846
1847 * data/push.c (union yyalloc): Rename yyss, yyvs, and yyls fields to
1848 prevent a name collision in a future patch where these names will
1849 sometimes be #define'd.
1850 (YYSTACK_RELOCATE): Add an argument to select a union yyalloc field
1851 since it no longer has the same name as the existing argument.
1852 (yyparse or yypush_parse): Update all uses of YYSTACK_RELOCATE.
1853
1854 2006-12-19 Paolo Bonzini <bonzini@gnu.org>
1855 and Joel E. Denny <jdenny@ces.clemson.edu>
1856
1857 * doc/bison.texinfo (Decl Summary): In the %language entry, mention
1858 that the argument is case-insensitive, and there's no `=' here.
1859 For the %skeleton entry, mention that %language is better.
1860 (Bison Options): Likewise for --language and --skeleton. Move the
1861 --skeleton entry so that the `Tuning the parser' section is sorted
1862 alphabetically on long options.
1863 (C++ Bison Interface): Don't use the word skeleton. Don't explain the
1864 %language directive in detail here; cross-reference the %language
1865 documentation instead.
1866 (Calc++ Parser): Use `%require "@value{VERSION}"' rather than
1867 `%require "2.3b"' so that the example is always up-to-date.
1868 (Table of Symbols): Add entries for %language and %skeleton.
1869 * examples/extexi (normalize): Instead of replacing every %require
1870 argument with the current Bison version, just substitute for
1871 `@value{VERSION}'. This guarantees that we're testing what actually
1872 appears in the documentation.
1873 * examples/calc++/Makefile.am ($(calc_extracted)): Use `$(VERSION)'
1874 rather than `@VERSION@'.
1875
1876 2006-12-18 Paul Eggert <eggert@cs.ucla.edu>
1877
1878 * NEWS: Reword the %language news a bit, and put it earlier.
1879
1880 * src/getargs.c (skeleton_arg): Last arg is now location const *.
1881 Rewrite to simplify the logic.
1882 (language_argmatch): Likewise.
1883 (program_name): We now own this var.
1884 * src/getargs.h (struct bison_language): Use char[] rather than
1885 const char *.
1886
1887 * doc/bison.texinfo (Decl Summary, Bison Options): Don't claim
1888 Java is supported.
1889 * src/complain.c (program_name): Remove decl; no longer needed.
1890 * src/main.c (program_name): Remove; now belongs to getargs.
1891
1892 2006-12-18 Paolo Bonzini <bonzini@gnu.org>
1893
1894 * NEWS: Document %language.
1895
1896 * data/Makefile.am (dist_pkgdata_DATA): Add c-skel.m4, c++-skel.m4.
1897
1898 * data/c-skel.m4, data/c++-skel.m4: New files.
1899 * data/glr.c: Complain on push parsers.
1900
1901 * doc/bison.texinfo (C++ Parser Interface): Prefer %language
1902 over %skeleton.
1903 (Decl Summary): Document %language and %skeleton.
1904 (Command line): Document -L.
1905
1906 * examples/extexi: Rewrite %require directive.
1907 * examples/calc++/Makefile.am: Pass VERSION to extexi.
1908
1909 * src/files.c (compute_exts_from_gc): Look in language structure
1910 for .y extension.
1911 (compute_file_name_parts): Check whether .tab should be added.
1912 * src/getargs.c (valid_languages, skeleton_prio, language_prio):
1913 (language, skeleton_arg, language_argmatch): New.
1914 (long_options): Add --language.
1915 (getargs): Use skeleton_arg, add -L/--language.
1916 * src/getargs.h: Include location.h.
1917 (struct bison_language, language, skeleton_arg, language_argmatch): New.
1918 * src/output.c (prepare): Pick default skeleton from struct language.
1919 Don't dispatch C skeletons here.
1920 * src/parse-gram.y (PERCENT_LANGUAGE): New.
1921 (prologue_declaration): Add "%language" rule, use skeleton_arg.
1922 * src/scan-gram.l ("%language"): New rule.
1923
1924 * tests/calc.at: Test %skeleton and %language.
1925 * tests/local.at (AT_SKEL_CC_IF): Look for %language.
1926 (AT_GLR_IF): Look for %skeleton "glr.cc".
1927 (AT_LALR1_CC_IF, AT_GLR_CC_IF): Rewrite.
1928 (AT_YACC_IF): Reject %language.
1929
1930 2006-12-18 Paul Eggert <eggert@cs.ucla.edu>
1931
1932 * src/symtab.h (struct semantic_type): Remove the tag 'semantic_type',
1933 since it wasn't used; only the typedef name 'semantic_type' is needed.
1934 Also, omit trailing white space.
1935
1936 * bootstrap: Sync from coreutils.
1937 (gnulib_extra_files): Add build-aux/announce.gen.
1938 (slurp): Adjust .gitignore files like .cvsignore files.
1939 * build-aux/announce-gen: Remove from CVS, since bootstrap
1940 now creates this.
1941
1942 2006-12-16 Joel E. Denny <jdenny@ces.clemson.edu>
1943
1944 Make %push-parser imply %pure-parser. This fixes several bugs; see
1945 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00148.html>.
1946 * src/parse-gram.y (prologue_declaration): For %push-parser, also set
1947 pure_parser = true.
1948 * data/push.c: Don't bother testing b4_push_if when deciding whether
1949 to expand b4_declare_parser_variables globally.
1950 (yypush_parse): Likewise in here.
1951
1952 * data/push.c (yypush_parse): Add b4_parse_param to arguments.
1953 (yy_reduce_print): Reformat M4 for readability.
1954
1955 2006-12-15 Bob Rossi <bob@brasko.net>
1956 and Joel Denny <jdenny@ces.clemson.edu>
1957
1958 * data/push.c (yypstate): Add typedef, and update all uses of
1959 struct yypstate to just yypstate.
1960 * tests/calc.at (_AT_DATA_CALC_Y): Update here as well.
1961
1962 2006-12-14 Bob Rossi <bob@brasko.net>
1963
1964 * data/push.c (yypush_parse): Declare prototype regardless of
1965 %locations option.
1966
1967 2006-12-14 Bob Rossi <bob@brasko.net>
1968
1969 * data/push.c (yyparse): Remove the prototype and the #define when in
1970 push-parser mode.
1971
1972 2006-12-13 Bob Rossi <bob@brasko.net>
1973
1974 * data/push.c (yypstate_init): Rename to...
1975 (yypstate_new): ... this and use b4_c_function_def.
1976 (yypstate_delete): New.
1977 (yypush_parse): Change parameters yynval and yynlloc to be const.
1978 * tests/calc.at (_AT_DATA_CALC_Y): Use new yypstate_new and
1979 yypstate_delete functions.
1980
1981 2006-12-13 Joel E. Denny <jdenny@ces.clemson.edu>
1982
1983 * configure.ac (AC_PREREQ): Require Autoconf 2.61 because of our
1984 strange test case titles. Reported by Bob Rossi.
1985
1986 2006-12-13 Paul Eggert <eggert@cs.ucla.edu>
1987
1988 * TODO: Add pointer to Sylvain Schmitz's work on static detection
1989 of potential ambiguities in GLR grammers.
1990
1991 2006-12-12 Joel E. Denny <jdenny@ces.clemson.edu>
1992
1993 * tests/testsuite.at (AT_CHECK): When checking if $1 starts with
1994 `bison ', use m4_index instead of m4_substr since chopping up a string
1995 containing M4-special characters causes problems here.
1996
1997 Fix a couple of bugs related to special characters in user-specified
1998 file names, and make it easier for skeletons to compute output file
1999 names with the same file name prefix as Bison-computed output file
2000 names.
2001 * data/glr.cc, data/push.c, data/yacc.c: In @output, use
2002 b4_parser_file_name and b4_spec_defines_file instead of
2003 @output_parser_name@ and @output_header_name@, which are now redundant.
2004 * data/glr.c, data/lalr1.cc: Likewise. Also, in header #include's, use
2005 b4_parser_file_name, b4_spec_defines_file, and the new
2006 @basename(FILENAME@) instead of @output_parser_name@ and
2007 @output_header_name@, which inappropriately escaped the file names as
2008 C string literals.
2009 * src/files.c (all_but_ext): Remove static qualifier.
2010 (compute_output_file_names): Move `free (all_but_ext)' to...
2011 (output_file_names_free): ... here since all_but_ext is needed later.
2012 * src/files.h (all_but_ext): Extern.
2013 * src/muscle_tab.h (MUSCLE_INSERT_STRING_RAW): New macro that does
2014 exactly what MUSCLE_INSERT_STRING used to do.
2015 (MUSCLE_INSERT_STRING): Use MUSCLE_OBSTACK_SGROW so that M4-special
2016 characters are escaped properly.
2017 * src/output.c (prepare): Define muscle file_name_all_but_ext as
2018 all_but_ext.
2019 For pkgdatadir muscle, maintain previous functionality by using
2020 MUSCLE_INSERT_STRING_RAW instead of MUSCLE_INSERT_STRING. The problem
2021 is that b4_pkgdatadir is used inside m4_include in the skeletons, so
2022 digraphs would never be expanded. Hopefully no one has M4-special
2023 characters in his Bison installation path.
2024 * src/scan-skel.l: Don't parse @output_header_name@ and
2025 @output_parser_name@ anymore since they're now redundant.
2026 In @output, use decode_at_digraphs.
2027 Parse a new @basename command that invokes last_component.
2028 (decode_at_digraphs): New.
2029 (BASE_QPUTS): Remove unused.
2030 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): New macro.
2031 (Output file name): New tests.
2032
2033 2006-12-09 Joel E. Denny <jdenny@ces.clemson.edu>
2034
2035 Warn about output files that are generated by the skeletons and that
2036 conflict with other output files.
2037 * data/glr.c: Don't generate the header file here when glr.cc does.
2038 * src/files.c (file_names, file_names_count): New static globals.
2039 (compute_output_file_names): Invoke output_file_name_check for files
2040 not generated by the skeletons and remove existing checks.
2041 (output_file_name_check): New function that warns about conflicting
2042 output file names.
2043 (output_file_names_free): Free file_names.
2044 * src/files.h (output_file_name_check): Declare.
2045 * src/scan-skel.l: Invoke output_file_name_check for files generated by
2046 the skeletons.
2047 * tests/output.at (AT_CHECK_CONFLICTING_OUTPUT): New.
2048 (Conflicting output files): New tests.
2049
2050 2006-12-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2051
2052 * doc/bison.texinfo: Fix a couple of typos.
2053
2054 2006-12-08 Bob Rossi <bob@brasko.net>
2055
2056 * data/push.c: (yypvarsinit, yypvars, struct yypvars, yypushparse):
2057 Rename to...
2058 (yypstate_init, yypstate, struct yypstate, yypush_parse): ... these and
2059 update all uses.
2060 (b4_yyssa, b4_yyerror_range, yypstate_init): Rename pv to yyps.
2061 (yypush_parse): Rename yypvars argument to yyps and remove redundant
2062 local pv.
2063 (yypstate_init, yypush_parse): Declare in Bison-generated header file.
2064 * tests/calc.at (_AT_DATA_CALC_Y): Use newly named functions.
2065
2066 2006-12-07 Bob Rossi <bob@brasko.net>
2067 and Joel Denny <jdenny@ces.clemson.edu>
2068
2069 * data/push.c (yypvarsinit): Change return type from void* to struct
2070 yypvars*. No longer cast to void* on return.
2071 (struct yypvars): Remove yylen since it need not be remembered between
2072 yypushparse invocations.
2073 (yypushparse): Don't copy between yylen and pv->yylen.
2074
2075 2006-12-05 Bob Rossi <bob@brasko.net>
2076
2077 * data/push.c (yychar_set, yylval_set, yylloc_set): Delete.
2078 (yypushparse): Add yynchar, yynlval, yynlloc parameters.
2079 (b4_declare_parser_variables): Do not declare yynerrs for push mode.
2080 (struct yypvars): Remove b4_declare_parser_variables.
2081 (yypvarsinit): Remove init code for removed variables.
2082 (global scope): Do not declare b4_declare_parser_variables if
2083 push or pure mode.
2084 (yypushparse): Add b4_declare_parser_variables.
2085 Init new local variables, and remove init code for removed
2086 yypvars variables.
2087 (yyparse): Delete.
2088 * tests/calc.at (_AT_DATA_CALC_Y): Call yypushparse for push mode
2089 and yyparse for other modes.
2090 (AT_CHECK_CALC_LALR): Added '%skeleton "push.c"' for push tests.
2091 * tests/local.at (AT_PUSH_IF, AT_PURE_OR_PUSH_IF): Added.
2092 (AT_YYERROR_SEES_LOC_IF): push-parser makes this false.
2093 (AT_PURE_LEX_IF): True if pure or push parser.
2094
2095 2006-12-05 Joel E. Denny <jdenny@ces.clemson.edu>
2096
2097 Document Yacc prologue alternatives and default %destructor's and
2098 %printer's as experimental. Don't mention Java yet. Discussed at
2099 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00002.html>.
2100 * NEWS (2.3a+): Say they're experimental. Remove any mention of Java.
2101 (2.3a): Annotate this entry to say the old forms of these features were
2102 also experimental.
2103 * doc/bison.texinfo (Prologue Alternatives, Freeing Discarded Symbols,
2104 Table of Symbols): Say they're experimental. Comment out any mention
2105 of Java (we'll want this back eventually).
2106
2107 2006-12-01 Joel E. Denny <jdenny@ces.clemson.edu>
2108
2109 Support a file name argument to %defines. Deprecate `=' in
2110 %file-prefix, %name-prefix, and %output. Discussed at
2111 <http://lists.gnu.org/archive/html/help-bison/2006-09/msg00001.html>.
2112 * NEWS (2.3a+): Mention.
2113 * doc/bison.texinfo (Decl Summary, Table of Symbols): Add entry for new
2114 form of %defines, and remove `=' from entries for %file-prefix,
2115 %name-prefix, and %output.
2116 * src/parse-gram.y (prologue_declaration): Implement.
2117 * tests/calc.at (Simple LALR Calculator, Simple GLR Calculator, Simple
2118 LALR1 C++ Calculator, Simple GLR C++ Calculator): Remove the `=' from
2119 all but one occurrence of %name-prefix.
2120 * tests/headers.at (export YYLTYPE): Remove the `=' from %name-prefix.
2121 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Likewise.
2122 * tests/output.at (AT_CHECK_OUTPUT): Remove the `=' from all but one
2123 occurrence of each of %file-prefix and %output. Add check for %defines
2124 with argument.
2125 * tests/reduce.at (Useless Terminals, Useless Nonterminals,
2126 Useless Rules, Reduced Automaton, Underivable Rules, Empty Language):
2127 Remove the `=' from %output.
2128
2129 2006-11-21 Joel E. Denny <jdenny@ces.clemson.edu>
2130
2131 Don't escape $ in test case titles since Autoconf 2.61 now does that
2132 correctly.
2133 * tests/actions.at (Default %printer and %destructor are not for error
2134 or $undefined): Here.
2135 (Default %printer and %destructor are not for $accept): Here.
2136 * tests/input.at (Invalid $n and @n): Here.
2137
2138 2006-11-20 Joel E. Denny <jdenny@ces.clemson.edu>
2139
2140 Rename <!> to <>. Discussed starting at
2141 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00039.html>.
2142 * NEWS (2.3a+): Update.
2143 * doc/bison.texinfo (Freeing Discarded Symbols, Table of Symbols):
2144 Update.
2145 * src/parse-gram.y (TYPE_TAG_NONE, generic_symlist_item): Implement.
2146 * src/scan-gram.l (INITIAL): Implement.
2147 * src/symlist.c (symbol_list_default_tagless_new): Update comment.
2148 * src/symlist.h (symbol_list, symbol_list_default_tagless_new): Update
2149 comment.
2150 * tests/actions.at (Default tagless %printer and %destructor,
2151 Default tagged and per-type %printer and %destructor,
2152 Default %printer and %destructor are not for error or $undefined,
2153 Default %printer and %destructor are not for $accept,
2154 Default %printer and %destructor for mid-rule values): Update.
2155 * tests/input.at (Default %printer and %destructor redeclared,
2156 Unused values with default %destructor): Update.
2157
2158 2006-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
2159
2160 Don't let %prec take a nonterminal.
2161 * src/reader.c (grammar_current_rule_prec_set): Make the %prec symbol a
2162 token.
2163 * tests/input.at (%prec takes a token): New test checking that %prec
2164 won't take a nonterminal.
2165
2166 2006-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
2167
2168 * tests/testsuite.at (AT_CHECK): Don't miss an exit value of 0 because
2169 it was double-quoted.
2170 * src/Makefile.am (YACC): Use --warnings=all,error so that Bison's own
2171 grammar is maintained with Bison's highest standards.
2172 * src/getargs.c: Fix some typos in Doxygen comments.
2173
2174 2006-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
2175
2176 Fix memory leaks in scanners generated by at least Flex 2.5.9 and
2177 later. Reported by Paul Eggert in
2178 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00014.html>.
2179 * src/flex-scanner.h (yylex_destroy): Define for Flex before 2.5.9.
2180 * src/scan-code.l (translate_action): Don't bother invoking
2181 yy_delete_buffer (YY_CURRENT_BUFFER) before creating the first buffer.
2182 (code_scanner_free): Instead of invoking
2183 yy_delete_buffer (YY_CURRENT_BUFFER) directly, invoke yylex_destroy,
2184 which frees more.
2185 * src/scan-gram.l (gram_scanner_free): Likewise.
2186 * src/scan-skel.l (scan_skel): Likewise.
2187
2188 2006-11-09 Joel E. Denny <jdenny@ces.clemson.edu>
2189
2190 * src/files.c (tr): Change return type to void.
2191 * src/muscle_tab.c (muscle_insert): Free storage in case muscle_grow
2192 has been called previously for the same key.
2193 (muscle_find): Return storage instead of value so that
2194 --enable-gcc-warnings doesn't produce warnings that the return discards
2195 const. aver that the value and storage are the same since storage
2196 could potentially be NULL when value is not.
2197 * tests/testsuite.at (AT_CHECK): Treat an unspecified exit value the
2198 same as 0.
2199
2200 2006-11-08 Paul Eggert <eggert@cs.ucla.edu>
2201
2202 * bootstrap.conf (excluded_files): Exclude m4/codeset.m4 (undoing
2203 the earlier change today), m4/intl.m4, m4/intldir.m4. This gives
2204 us a slightly cleaner distribution, and also works.
2205 * m4/.cvsignore: Add inline.m4, wint_t.m4 to accommodate recent
2206 gnulib changes.
2207
2208 2006-11-08 Joel E. Denny <jdenny@ces.clemson.edu>
2209 and Paul Eggert <eggert@cs.ucla.edu>
2210
2211 Don't let Bison leak memory except when it complains.
2212 * src/files.h (parser_file_name, spec_verbose_file, spec_graph_file):
2213 (spec_defines_file, dir_prefix): Now char *, not const char *,
2214 since they are freed.
2215 * src/files.c: Likewise.
2216 (all_but_ext, all_but_tab_ext, src_extension, header_extension):
2217 Likewise.
2218 (tr): Now operates in-place. All uses changed.
2219 (compute_exts_from_gf, compute_exts_from_src): Don't leak temporary
2220 values.
2221 (compute_file_name_parts, compute_output_file_names): Don't store
2222 read-only data in variables that will be freed.
2223 (compute_output_file_names): Free all_but_ext, all_but_tab_ext,
2224 src_extension, and header_extension.
2225 (output_file_names_free): New public function to free
2226 spec_verbose_file, spec_graph_file, spec_defines_file,
2227 parser_file_name, and dir_prefix.
2228 * src/getargs.c (getargs): Don't store read-only data in variables that
2229 will be freed.
2230 * src/main.c (main): Invoke output_file_names_free, code_scanner_free
2231 (which previously existed but was unused), and quotearg_free.
2232 * src/muscle_tab.h (muscle_insert): value arg is now a `char const *'.
2233 * src/muscle_tab.c: Likewise.
2234 (muscle_entry): Make the value char const *,
2235 and add a new storage member that is char * and can be freed.
2236 (muscle_entry_free): New private function.
2237 (muscle_init): Use it instead of free.
2238 (muscle_insert, muscle_grow): Update and use new storage member.
2239 (muscle_code_grow): Free the string passed to muscle_grow
2240 since it's not needed anymore.
2241 * src/parse-gram.y (%union): Make `chars' member a `char const *', and
2242 add a new `char *code' member.
2243 ("{...}"): Declare semantic type as code.
2244 * src/scan-code.h (translate_rule_action):
2245 (translate_symbol_action, translate_code, translate_action): Return
2246 `char const *' rather than `char *' since external code should not free
2247 these strings.
2248 * src/scan-code.l: Likewise.
2249 * src/scan-gram.l (<SC_BRACED_CODE>): Use val->code for BRACED_CODE,
2250 which is "{...}" in the parser.
2251 * tests/Makefile.am (maintainer-check-valgrind): Set
2252 VALGRIND_OPTS='--leak-check=full --show-reacheable=yes' before invoking
2253 Valgrind.
2254 * tests/calc.at (_AT_DATA_CALC_Y): fclose the FILE* so Valgrind doesn't
2255 complain.
2256 * tests/testsuite.at (AT_CHECK): Redefine so that running Bison and
2257 expecting a non-zero exit status sets --leak-check=summary and
2258 --show-reachable=no for Valgrind. Bison unabashedly leaks memory in
2259 this case, and we don't want to hear about it.
2260
2261 2006-11-08 Paul Eggert <eggert@cs.ucla.edu>
2262
2263 * bootstrap (runtime-po/Makevars): Derive from po/Makevars
2264 instead of from the template, to simplify configuration a bit.
2265 * bootstrap.conf (excluded_files): Don't exclude m4/codeset.m4
2266 and m4/wint_t.m4, as they are needed with the latest gnulib.
2267
2268 2006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
2269
2270 Disable unset/unused mid-rule value warnings by default, and recognize
2271 --warnings=midrule-values to enable them. Discussed starting at
2272 <http://lists.gnu.org/archive/html/help-bison/2006-10/msg00030.html>.
2273 * NEWS (2.3a+): Mention.
2274 * src/getargs.c, src/getargs.h (warnings_args, warnings_types, enum
2275 warnings): Add entry for midrule-values subargument.
2276 * src/reader.c (symbol_should_be_used): Don't return true just because
2277 the value is a set/used mid-rule value unless
2278 --warnings=midrule-values was specified.
2279 * tests/input.at (Unused values, Unused values before symbol
2280 declarations): Run tests with and without --warnings=midrule-values.
2281
2282 * src/reader.c (check_and_convert_grammar): Use symbol_list_free rather
2283 than LIST_FREE directly.
2284
2285 2006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
2286
2287 Finish implementing --warnings=error, which should not be implied by
2288 --warnings=all (or by its synonyms -W and --warnings without
2289 subarguments).
2290 * src/complain.c (set_warning_issued): New function to report that
2291 warnings are being treated as errors and to record an error if so.
2292 Invoke...
2293 (warn_at, warn): ... here.
2294 * src/getargs.c (warnings_args, warnings_types): Reorder so that
2295 "error - warnings are errors" does not appear above "all - all of the
2296 above".
2297 (getargs): For -W and --warnings without subarguments, don't let
2298 FLAGS_ARGMATCH set warnings_error in warnings_flag.
2299 * src/getargs.h (enum warnings): Unset warnings_error in warnings_all.
2300
2301 2006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
2302
2303 * src/getargs.c (flags_argmatch): Don't cause segmentation fault for
2304 empty subargument list. For example: `bison --warnings= parser.y'.
2305
2306 2006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
2307
2308 * data/push.c, data/yacc.c: Make sure there's a newline at the end of
2309 the parser header file so that gcc doesn't warn.
2310
2311 2006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
2312
2313 Split the default %destructor/%printer into two kinds: <*> and <!>.
2314 Discussed starting at
2315 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00060.html>.
2316 * NEWS (2.3a+): Mention.
2317 * doc/bison.texinfo (Freeing Discarded Symbols): Document this and the
2318 previous change today related to mid-rules.
2319 (Table of Symbols): Remove %symbol-default and add <*> and <!>.
2320 * src/parse-gram.y (PERCENT_SYMBOL_DEFAULT): Remove.
2321 (TYPE_TAG_ANY): Add as <*>.
2322 (TYPE_TAG_NONE): Add as <!>.
2323 (generic_symlist_item): Remove RHS for %symbol-default and add RHS's
2324 for <*> and <!>.
2325 * src/scan-gram.l (PERCENT_SYMBOL_DEFAULT): Remove.
2326 (TYPE_TAG_ANY, TYPE_TAG_NONE): Add.
2327 * src/symlist.c (symbol_list_default_new): Split into tagged and
2328 tagless versions.
2329 (symbol_list_destructor_set, symbol_list_printer_set): Split
2330 SYMLIST_DEFAULT case into SYMLIST_DEFAULT_TAGGED and
2331 SYMLIST_DEFAULT_TAGLESS.
2332 * src/symlist.h: Update symbol_list_default*_new prototypes.
2333 (symbol_list.content_type): Split enum value SYMLIST_DEFAULT into
2334 SYMLIST_DEFAULT_TAGGED and SYMLIST_DEFAULT_TAGLESS.
2335 * src/symtab.c (default_destructor, default_destructor_location,
2336 default_printer, default_printer_location): Split each into tagged and
2337 tagless versions.
2338 (symbol_destructor_get, symbol_destructor_location_get,
2339 symbol_printer_get, symbol_printer_location_get): Implement tagged
2340 default and tagless default cases.
2341 (default_destructor_set, default_printer_set): Split each into tagged
2342 and tagless versions.
2343 * src/symtab.h: Update prototypes.
2344 * tests/actions.at (Default %printer and %destructor): Rename to...
2345 (Default tagless %printer and %destructor): ... this, and extend.
2346 (Per-type %printer and %destructor): Rename to...
2347 (Default tagged and per-type %printer and %destructor): ... this, and
2348 extend.
2349 (Default %printer and %destructor for user-defined end token): Extend.
2350 (Default %printer and %destructor are not for error or $undefined):
2351 Update.
2352 (Default %printer and %destructor are not for $accept): Update.
2353 (Default %printer and %destructor for mid-rule values): Extend.
2354 * tests/input.at (Default %printer and %destructor redeclared): Extend.
2355 (Unused values with default %destructor): Extend.
2356
2357 2006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
2358
2359 Don't apply the default %destructor/%printer to an unreferenced midrule
2360 value. Mentioned at
2361 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00104.html>.
2362 * src/symtab.c (dummy_symbol_get): Name all dummy symbols initially
2363 like $@n instead of just @n so that the default %destructor/%printer
2364 logic doesn't see them as user-defined symbols.
2365 (symbol_is_dummy): Check for both forms of the name.
2366 * src/reader.c (packgram): Remove the `$' from each midrule symbol
2367 name for which the midrule value is referenced in any action.
2368 * tests/actions.at (Default %printer and %destructor for mid-rule
2369 values): New test.
2370 * tests/regression.at (Rule Line Numbers, Web2c Report): Update output
2371 for change to dummy symbol names.
2372
2373 2006-10-20 Joel E. Denny <jdenny@ces.clemson.edu>
2374
2375 Warn about unset midrule $$ if the corresponding $n is used.
2376 * src/reader.c (symbol_should_be_used): Check midrule parent rule for
2377 $n usage.
2378 (packgram): Before invoking grammar_rule_check on any rule, make sure
2379 all actions have already been scanned in order to set `used' flags.
2380 Otherwise, checking that a midrule's $$ is set will not always work
2381 properly because the midrule check must forward-reference the midrule's
2382 parent rule.
2383 * tests/input.at (AT_CHECK_UNUSED_VALUES): Extend to check the new
2384 warning.
2385
2386 2006-10-20 Joel E. Denny <jdenny@ces.clemson.edu>
2387
2388 More improvements to the documentation of the prologue alternatives:
2389 * NEWS (2.3a+): Mention the new `Prologue Alternatives' section in the
2390 Bison manual.
2391 * doc/bison.texinfo (Prologue Alternatives): Correct some errors. Add
2392 some text to clarify the relative importance of the new directives and
2393 to show how these directives may be viewed as code labels.
2394
2395 2006-10-16 Joel E. Denny <jdenny@ces.clemson.edu>
2396
2397 Similar to the recently removed %before-header, add %code-top as the
2398 alternative to the pre-prologue. Mentioned at
2399 <http://lists.gnu.org/archive/html/bison-patches/2006-10/msg00063.html>.
2400 Also, let the prologue alternatives appear in the grammar section.
2401 * src/parse-gram.y (PERCENT_CODE_TOP): New token.
2402 (prologue_declaration): Move the existing prologue alternatives to...
2403 (grammar_declaration): ... here and add %code-top.
2404 * src/scan-gram.l (PERCENT_CODE_TOP): New token.
2405
2406 Clean up and extend documentation for the prologue alternatives.
2407 * NEWS (2.3a+): Describe prologue alternatives.
2408 * doc/bison.texinfo (Prologue): Move discussion of prologue
2409 alternatives to...
2410 (Prologue Alternatives): ... this new section, and extend it to discuss
2411 all 4 directives in detail.
2412 (Table of Symbols): Clean up discussion of prologue alternatives and
2413 add %code-top.
2414
2415 2006-10-16 Juan Manuel Guerrero <juan.guerrero@gmx.de>
2416
2417 DJGPP specific issues.
2418
2419 * djgpp/config.bat: config.hin has been moved to lib. Adjust
2420 config.bat accordingly.
2421 * djgpp/config.sed: Adjust config.sed for the use of autoconf 2.60.
2422 * djgpp/config.site: Likewise.
2423
2424 2006-10-16 Paolo Bonzini <bonzini@gnu.org>
2425
2426 Replace %*-header with %provides, %requires, %code. See discussion at
2427 http://lists.gnu.org/archive/html/bison-patches/2006-10/msg00002.html
2428
2429 * data/bison.m4 (b4_user_requires, b4_user_provides): New.
2430 (b4_user_start_header): Remove.
2431 * data/glr.c: Use new macros instead of b4_*start_header
2432 and b4_*end_header.
2433 * data/glr.cc: Likewise.
2434 * data/lalr1.cc: Likewise.
2435 * data/push.c: Likewise.
2436 * data/yacc.c: Likewise.
2437
2438 * doc/bison.texinfo: Remove %before-header, rename
2439 %{start,end,after}-header to %requires, %provides, %code.
2440
2441 * src/parse-gram.y: Likewise (also rename token names accordingly).
2442 * src/scan-gram.l: Likewise.
2443 * tests/actions.at: Likewise.
2444
2445 2006-10-14 Paul Eggert <eggert@cs.ucla.edu>
2446
2447 * lib/Makefile.am (AM_CFLAGS): Remove $(WERROR_CFLAGS).
2448 Problem reported by Joel E. Denny.
2449
2450 2006-10-14 Jim Meyering <jim@meyering.net>
2451
2452 (Sync from coreutils.)
2453 Work also when the working directory (with e.g. coreutils sources)
2454 is version controlled with git, rather than CVS.
2455 * bootstrap (CVS_only_file): Test for the existence of README-cvs,
2456 rather than CVS.
2457 In messages and comments, say e.g., "checked-out sources",
2458 rather than "CVS sources".
2459 (version_controlled_file): New function. Work for git as well as
2460 for CVS. Don't use grep's -q option.
2461 (slurp): Call it here, in place of CVS-specific code.
2462
2463 2006-10-14 Joel E. Denny <jdenny@ces.clemson.edu>
2464
2465 Fix testsuite for ./configure --enable-gcc-warnings:
2466 * configure.ac (gcc-warnings): Move -Wall before -Wno-sign-compare.
2467 Otherwise, gcc 4.1.0 (at least) warns about sign comparisons in
2468 __AT_CHECK_PRINTER_AND_DESTRUCTOR in tests/actions.at.
2469 * test/input.at (Torturing the Scanner): #include <stdlib.h> for abort.
2470 * test/regression.at (Diagnostic that expects two alternatives):
2471 Likewise.
2472
2473 2006-10-12 Paul Eggert <eggert@cs.ucla.edu>
2474
2475 * bootstrap.conf (gnulib_modules): Add config-h.
2476 * djgpp/subpipe.c: Include <config.h> unconditionally; don't
2477 worry about HAVE_CONFIG_H.
2478 * lib/abitset.c: Likewise.
2479 * lib/bitset.c: Likewise.
2480 * lib/bitset_stats.c: Likewise.
2481 * lib/bitsetv-print.c: Likewise.
2482 * lib/bitsetv.c: Likewise.
2483 * lib/ebitset.c: Likewise.
2484 * lib/get-errno.c: Likewise.
2485 * lib/lbitset.c: Likewise.
2486 * lib/subpipe.c: Likewise.
2487 * lib/timevar.c: Likewise.
2488 * lib/vbitset.c: Likewise.
2489 * lib/bitset.c: Include "bitset.h" first, to test interface.
2490 * lib/bitset_stats.c: Include "bitset_stats.h" first.
2491 * lib/bitsetv-print.c: Include "bitsetv-print.h" first.
2492 * lib/bitsetv.c: Include "bitsetv.h" first.
2493 * lib/get-errno.c: Include "get-errno.h" first.
2494 * m4/.cvsignore: Add config-h.m4.
2495 * tests/actions.at (Default %printer and %destructor for ...):
2496 Adjust expected line numbers in output to reflect removal of #if
2497 HAVE_CONFIG_H lines.
2498 * tests/glr-regression.at (Missed %merge type warnings when ...):
2499 Likewise.
2500 * tests/regression.at (Braced code in declaration in rules section):
2501 Likewise.
2502 * tests/atlocal.in (CPPFLAGS): Don't define HAVE_CONFIG_H.
2503 * tests/local.at (AT_DATA_GRAMMAR_PROLOGUE):
2504 Include <config.h> unconditionally.
2505
2506 * bootstrap: Sync from coreutils, as follows:
2507
2508 2006-10-11 Paul Eggert <eggert@cs.ucla.edu>
2509
2510 * bootstrap (symlink_to_gnulib): Fix bug: the dot_dots shell
2511 variable was sometimes used without being initialized. This
2512 messed up the installation of the INSTALL file in some cases.
2513
2514 2006-10-09 Paul Eggert <eggert@cs.ucla.edu>
2515
2516 * bootstrap (usage, main program, symlink_to_gnulib): Add option
2517 --copy. Inspired by a suggestion from Bruno Haible.
2518
2519 2006-10-03 Jim Meyering <jim@meyering.net>
2520
2521 * bootstrap: Undo last change to this file, since now gnulib-tool
2522 sticks with the automake default in generating dependencies.
2523
2524 2006-10-12 Paul Eggert <eggert@cs.ucla.edu>
2525
2526 * configure.ac: Use AC_PROG_CC_STDC; this is more modern than
2527 the old AC_PROG_CC / AM_PROG_CC_STDC combination.
2528
2529 * doc/bison.1: Add copyright notice.
2530
2531 * data/glr.c: Don't include <stdarg.h>; not used.
2532
2533 * NEWS: The -g and --graph options now output graphs in Graphviz
2534 DOT format, not VCG format.
2535 * doc/bison.1: Likewise.
2536 * doc/bison.texinfo (Understanding, Bison Options): Likewise.
2537 * THANKS: Add Satya Kiran Popuri, who proposed the initial version
2538 of this change in
2539 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00158.html>.
2540 * TODO: Remove Graphviz entry.
2541 * src/Makefile.am (bison_SOURCES): Add graphviz.c and graphviz.h;
2542 remove vcg.c, vcg.h, vcg_defaults.h.
2543 * src/vcg.c, src/vcg.h, src/vcg_defaults.h: Remove.
2544 * src/graphviz.c, src/graphviz.h: New files.
2545 * src/files.c (compute_output_file_names): Output .dot, not .vcg.
2546 * src/files.h: Make comment more generic.
2547 * src/main.c (main): Likewise.
2548 * src/print_graph.h: Likewise.
2549 * src/getargs.c (usage): Make usage description more generic.
2550 * src/print_graph.c: Include graphviz.h rather than vcg.h.
2551 (static_graph, fgraph): Remove. All uses changed to pass
2552 arguments instead of sharing a static var.
2553 (print_core, print_actions, print_state, print_graph):
2554 Output graphviz format rather than VCG format.
2555 * tests/.cvsignore: Remove *.vcg; add *.dot.
2556 * tests/output.at: Expect *.dot files, not *.vcg files.
2557
2558 * data/Makefile.am (dist_pkgdata_DATA): Add bison.m4; this
2559 accommodates the 2006-10-08 change.
2560
2561 2006-10-11 Bob Rossi <bob@brasko.net>
2562
2563 * data/push.c (yypushparse, yypvarsinit, yypvars): Wrap in b4_push_if.
2564 (b4_yyssa, b4_yyerror_range): New macros.
2565 (struct yypvars): Remove yyssa_ptr and yyerror_range_ptr fields.
2566 (yypvarsinit): Remove init of removed fields.
2567 (yypushparse): Remove use of removed fields; use new macros instead.
2568
2569 2006-10-11 Paul Eggert <eggert@cs.ucla.edu>
2570
2571 * data/push.c (yypushparse): Fix memory leak if yymsg is malloced
2572 in a push parser. Reindent slightly to match yacc.c better.
2573
2574 2006-10-11 Bob Rossi <bob@brasko.net>
2575
2576 * data/push.c (struct yypvars): Remove yymsgbuf, yymsgbuf_ptr, yymsg,
2577 yymsg_alloc fields.
2578 (yypvarsinit, yypushparse): Remove init of removed fields.
2579 (yypushparse): Use yymsgbuf instead of yymsgbuf_ptr.
2580
2581 2006-10-09 Paul Eggert <eggert@cs.ucla.edu>
2582
2583 * THANKS: Add Paolo Bonzini and Bob Rossi.
2584
2585 2006-10-08 Paolo Bonzini <bonzini@gnu.org>
2586
2587 * data/c.m4 (b4_copyright, b4_epilogue, b4_location_initial_column,
2588 b4_location_initial_line, p4_parse_param, b4_ints_in, b4_flag_if,
2589 b4_define_flag_if and uses, b4_basename, b4_syncline, b4_user_code,
2590 b4_define_user_cde and uses): Remove.
2591 (b4_comment, b4_prefix, b4_sync_start): New.
2592 * data/bison.m4: New file, with most of the content removed from c.m4.
2593 * src/muscle_tab.h: Use "do {...} while(0)" throughout.
2594 * src/output.c (output_skeleton): Pass bison.m4.
2595 (prepare): Pass glr_flag and nondeterministic_flag. Pass prefix
2596 only if specified.
2597
2598 2006-10-05 Paul Eggert <eggert@cs.ucla.edu>
2599
2600 Fix test failure reported by Tom Lane in
2601 <http://lists.gnu.org/archive/html/bug-bison/2006-10/msg00000.html>
2602 and try to make such failures easier to catch in the future.
2603 * data/glr.c (YYTRANSLATE): Don't check for nonpositive arg;
2604 that's now the caller's responsibility.
2605 (yyprocessOneStack, yyrecoverSyntaxError, yyparse):
2606 Set yychar = YYEOF if it's negative.
2607 * tests/actions.at (yylex): Abort if asked to read past EOF.
2608 * tests/conflicts.at (yylex): Likewise.
2609 * tests/cxx-type.at (yylex): Likewise.
2610 * tests/glr-regression.at (yylex): Likewise.
2611 * tests/input.at (yylex): Likewise.
2612 * tests/regression.at (yylex): Likewise.
2613 * tests/torture.at (yylex): Likewise.
2614
2615 2006-10-01 Paul Eggert <eggert@cs.ucla.edu>
2616
2617 Fix problems with translating English-language diagnostics.
2618 * bootstrap: Fix bug introduced in recent bootstrap changes, with
2619 respect to bison-runtime pot generation. The YY_ stuff
2620 wasn't being captured.
2621 * bootstrap.conf (XGETTEXT_OPTIONS_RUNTIME): New var.
2622 * po/POTFILES.in: Add src/location.c, src/scan-code.l.
2623 * runtime-po/POTFILES.in: Add data/push.c.
2624
2625 2006-09-29 Paul Eggert <eggert@cs.ucla.edu>
2626
2627 Merge bootstrap changes from coreutils.
2628
2629 2006-09-28 Jim Meyering <jim@meyering.net>
2630
2631 Automatically generated dependencies are important even
2632 when all of the sources in a directory come from gnulib.
2633 * bootstrap (gnulib_tool): Remove the "no-dependencies" automake
2634 option that gnulib-tool adds to what becomes our lib/gnulib.mk.
2635
2636 2006-09-23 Jim Meyering <jim@meyering.net>
2637
2638 * bootstrap (gnulib_tool_options): Add "--local-dir gl".
2639
2640 2006-09-20 Paul Eggert <eggert@cs.ucla.edu>
2641
2642 * bootstrap: Add support for --force.
2643 (usage): New function. Describe usage less tersely.
2644 (CVS_only_file): New var.
2645
2646 2006-09-21 Paul Eggert <eggert@cs.ucla.edu>
2647
2648 * data/push.c (YYPUSH_MORE): Make it an enum instead.
2649 (yypushparse): Use YYPUSH_MORE instead of the mystery constant.
2650 Adjust white space and comments to match GNU style better.
2651
2652 2006-09-20 Bob Rossi <bob@brasko.net>
2653
2654 * data/push.c (yyresult_get): Remove function.
2655 (YYPUSH_MORE): Add #define.
2656 (yypushparse): Modify return value.
2657
2658 2006-09-20 Paul Eggert <eggert@cs.ucla.edu>
2659
2660 * stamp-h.in: Remove; no longer needed.
2661 * .cvsignore: Replace autom4te.cache and config.cache with *.cache.
2662 Remove config.h, config.hin, intl (no longer created).
2663 * lib/.cvsignore: Add config.h, config.hin, configmake.h, inttypes.h,
2664 stamp-h1.
2665
2666 Sync bootstrap from coreutils, as follows:
2667
2668 2006-09-18 Paul Eggert <eggert@cs.ucla.edu>
2669
2670 * bootstrap (symlink_to_gnulib): New function.
2671 (cp_mark_as_generated): Use it, to prefer symlinks-to-gnulib
2672 to copies-of-gnulib.
2673 (cp_mark_as_generated, slurp, gnulib_files):
2674 Avoid making a copy if it's the same as the old version.
2675 (gnulib_files): Add support for this variable (used by Bison).
2676
2677 2006-09-20 Paul Eggert <eggert@cs.ucla.edu>
2678
2679 * src/getargs.c (usage): Rework to use conventions similar to
2680 coreutils, to make translation a bit easier and the code a bit
2681 smaller. Problem reported by Tim Van Holder.
2682
2683 2006-09-15 Paul Eggert <eggert@cs.ucla.edu>
2684
2685 Use some of gnulib's new modules, taken from coreutils.
2686
2687 * bootstrap: Sync from coreutils, except add support for gnulib_files.
2688 * bootstrap.conf: New file.
2689 (gnulib_modules): Add configmake, inttypes, unistd.
2690 (XGETTEXT_OPTIONS): Add complain, complain_at,
2691 fatal, fatal_at, warn, warn_at, unexpected_end.
2692 * configure.ac (AC_CONFIG_HEADERS): config.h is now in lib, not here.
2693 (gl_USE_SYSTEM_EXTENSIONS): Remove; gl_EARLY now does this.
2694 (gl_EARLY): Add.
2695 (AM_STDBOOL_H): Remove; gl_INIT now dows this.
2696 (gl_INIT): Add
2697 (GNULIB_AUTOCONF_SNIPPET): Remove.
2698 (AM_GNU_GETTEXT): Add; require formatstring macros since that's
2699 the pickiest.
2700 * lib/.cvsignore: Add inttypes_.h.
2701 * lib/Makefile.am: Include gnulib.mk first so we can append to it.
2702 (AM_CFLAGS): Add WERROR_CFLAGS, to be more like coreutils.
2703 (BUILT_SOURCES, EXTRA_DIST, MOSTLYCLEANFILES): Remove
2704 no-longer-necessary initializations.
2705 (lib_SOURCES): Remove, replacing by libbison_a_SOURCES.
2706 * lib/subpipe.c: Include <unistd.h> unconditionally, now that we
2707 use the unistd module.
2708 * src/system.h: Likewise.
2709 * m4/.cvsignore: Remove *_gl.m4, gnulib.m4, inttypes_h.m4, uintmax_t.m4,
2710 ulonglong.m4. Add gettext.m4, gnulib-cache.m4, gnulib-comp.m4,
2711 gnulib-tool.m4, inttypes-h.m4, inttypes-pri.m4, inttypes.m4.
2712 * src/Makefile.am (DEFS): Remove, since configmake does this for us.
2713 (AM_CPPFLAGS): Remove -I../lib, since Automake does that for us.
2714 * src/system.h: Include inttypes.h unconditionally, now that we
2715 use the inttypes module. Don't bother to include stdint.h, since
2716 inttypes.h now does that for us.
2717 (LOCALEDIR): Remove, now that we use the configmake module.
2718 * src/getargs.c: Include configmake.h.
2719 * src/main.c: Likewise.
2720 * src/output.c: Likewise.
2721 * tests/atlocal.in (CPPFLAGS): Include from $abs_top_builddir/lib,
2722 not from $abs_top_builddir, since config.h moved.
2723
2724
2725 Port to GCC 2.95. First two problems reported by Michael Deutschmann in
2726 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00018.html>.
2727
2728 * src/parse-gram.y (symbol_declaration): Don't put statements
2729 before declarations; it's not portable to C89.
2730 * src/scan-code.l (handle_action_at): Likewise.
2731
2732 * src/scan-code.l: Always initialize braces_level; the old code
2733 left it uninitialized and therefore had undefined behavior.
2734
2735 Don't attempt to redefine 'assert', since it runs afoul of
2736 systems where standard headers (mistakenly) include <assert.h>.
2737 Instead, define and use our own alternative, called 'aver'.
2738 * src/reader.c: Don't include assert.h, since we no longer
2739 use assert.
2740 * src/scan-code.l: Likewise.
2741 * src/system.h (assert): Remove, replacing with....
2742 (aver): New function, taking a bool arg. All uses changed.
2743 * src/tables.c (pack_vector): Ensure that aver arg is bool,
2744 not merely an integer.
2745
2746 2006-09-15 Bob Rossi <bob@brasko.net>
2747
2748 * data/Makefile.am (dist_pkgdata_DATA): Add push.c.
2749 * data/c.m4 (YYPUSH): New.
2750 (b4_push_if): New macro. Use it instead of #ifdef YYPUSH.
2751 * src/getargs.c (push_parser): New var.
2752 * src/getargs.h (push_parser): New declaration.
2753 * src/output.c (prepare): Add macro insertion of `push_flag'.
2754 * src/parse-gram.y (PERCENT_PUSH_PARSER): New token.
2755 (prologue_declaration): Parse %push-parser.
2756 * src/scan-gram.l: Scan new PERCENT_PUSH_PARSER token.
2757 * tests/calc.at (_AT_CHECK_CALC_ERROR): Add "Return" and "Now" to
2758 list of removed lines from the traces observed.
2759 (AT_CHECK_CALC_LALR): Added push parser tests.
2760
2761 2006-09-13 Paul Eggert <eggert@cs.ucla.edu>
2762
2763 * NEWS: Version 2.3a.
2764 * configure.ac (AC_INIT): Likewise.
2765
2766 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Remove
2767 "#define YYSTYPE int" that caused "make maintainer-check" to fail
2768 due to header ordering dependencies. I don't know why the #define
2769 was there.
2770
2771 Fix glr.cc and lalr1.cc's use of YYDEBUG so that there's zero
2772 runtime cost when YYDEBUG is not defined, and so that some tests
2773 that used to fail now work. Problem and initial suggestion by
2774 Paolo Bonzini.
2775 * data/c++.m4 (b4_parse_param_cons): Omit leading ','.
2776 * data/glr.cc (b4_parser_class_name):
2777 Initialize yycdebug_ only if YYDEBUG. Also, initialize yydebug_.
2778 (debug_level, set_debug_level): Affect yydebug_, not ::yydebug.
2779 (yydebug_) [YYDEBUG]: New member.
2780 (yycdebug_): Now defined only if YYDEBUG.
2781 * data/lalr1.cc (yydebug_, yycdebug_): Now defined only if YYDEBUG.
2782 (YYCDEBUG) [!YYDEBUG]: Don't use yydebug_ and yycdebug_.
2783 (b4_parser_class_name): Initialize yydebug_ and yycdebug_ only
2784 if YYYDEBUG.
2785 (debug_stream, set_debug_stream, debug_level, set_debug_level):
2786 Define only if YYDEBUG.
2787 * tests/calc.at (_AT_DATA_CALC_Y) [!YYDEBUG]: Omit call to
2788 set_debug_level.
2789 * tests/regression.at (_AT_DATA_DANCER_Y) [!YYDEBUG]: Likewise.
2790 * tests/calc.at (AT_CHECK_CALC_GLR_CC): Uncomment calls to
2791 AT_CHECK_CALC_GLR_CC that are working now.
2792
2793 2006-09-12 Paul Eggert <eggert@cs.ucla.edu>
2794
2795 * data/glr.cc (YYERROR_VERBOSE, YYTOKEN_TABLE): Remove.
2796 We don't need them in glr.cc, and glr.c defines them.
2797 Defining YYERROR_VERBOSE to 0 here breaks glr.c, since glr.c
2798 assumes that defining it to anything is the same as defining
2799 it to 1. Problem reported by Paolo Bonzini.
2800
2801 2006-09-12 Paolo Bonzini <bonzini@gnu.org> (tiny change)
2802
2803 * data/c.m4 (b4_null, b4_case): Define.
2804 * src/output.c (prepare_symbols): Use b4_null.
2805 (user_actions_output): Use b4_case.
2806
2807 2006-09-11 Paul Eggert <eggert@cs.ucla.edu>
2808
2809 * data/glr.c (b4_shared_declarations): Put start-header first,
2810 before any #includes that we generate, so that feature-test
2811 macros work. Problem reported by Michael Deutschmann in
2812 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00004.html>.
2813 * data/lalr1.cc: Likewise.
2814 * doc/bison.texinfo (Prologue): Document that feature-test macros
2815 should be defined before any Bison declarations.
2816 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Put defns
2817 that depend on location.hh after, not before, Bison decls, since
2818 we now include location.hh after the first user prologue.
2819
2820 * doc/bison.texinfo (Calc++ Parser): Fix memory leak reported by
2821 Sander Brandenburg in
2822 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00002.html>.
2823 Also, fix minor white space and comment issues.
2824 (Prologue): Mention that it's better to define feature-test macros
2825 before Bison declarations. Problem reported by Michael Deutschmann.
2826
2827 * README-cvs: Fix typo: "&" should be "&&". Problem reported
2828 by Jim Meyering.
2829 * m4/.cvsignore: Add argmatch.m4. Remove obstack.m4, strerror_r.m4.
2830 This adjusts to recent gnulib changes.
2831
2832 2006-09-04 Joel E. Denny <jdenny@ces.clemson.edu>
2833
2834 Finish implementation of per-type %destructor/%printer. Discussed
2835 starting at
2836 <http://lists.gnu.org/archive/html/bison-patches/2006-02/msg00064.html>
2837 and
2838 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00091.html>.
2839 * NEWS (2.3+): Add a description of this feature to the default
2840 %destructor/%printer description.
2841 * doc/bison.texinfo (Freeing Discarded Symbols): Likewise.
2842 * src/symlist.c (symbol_list_destructor_set, symbol_list_printer_set):
2843 Invoke semantic_type_destructor_set or semantic_type_printer_set when a
2844 list node contains a semantic type.
2845 * src/symtab.c, src/symtab.h: Extend with a table that associates
2846 semantic types with their %destructor's and %printer's.
2847 (semantic_type_from_uniqstr, semantic_type_get,
2848 semantic_type_destructor_set, semantic_type_printer_set): New functions
2849 composing the public interface of that table.
2850 (symbol_destructor_get, symbol_destructor_location_get,
2851 symbol_printer_get, symbol_printer_location_get): If there's no
2852 per-symbol %destructor/%printer, look up the per-type before trying
2853 the default.
2854 * tests/actions.at (Per-type %printer and %destructor): New test case.
2855 * tests/input.at (Default %printer and %destructor redeclared):
2856 Extend to check that multiple occurrences of %symbol-default in a
2857 single %destructor/%printer declaration is an error.
2858 (Per-type %printer and %destructor redeclared, Unused values with
2859 per-type %destructor): New test cases.
2860
2861 2006-09-04 Joel E. Denny <jdenny@ces.clemson.edu>
2862
2863 Require default %destructor/%printer to be declared using
2864 %symbol-default instead of an empty symbol list, and start working on
2865 new per-type %destructor/%printer. Discussed at
2866 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00007.html>.
2867 * NEWS (2.3+): Add %symbol-default to example.
2868 * bison.texinfo (Freeing Discarded Symbols): Likewise.
2869 (Table of Symbols): Add entry for %symbol-default.
2870 * src/parse-gram.y (PERCENT_SYMBOL_DEFAULT): New token.
2871 (generic_symlist, generic_symlist_item): New nonterminals for creating
2872 a list in which each item is a symbol, semantic type, or
2873 %symbol-default.
2874 (grammar_declaration): Use generic_symlist in %destructor and %printer
2875 declarations instead of symbols.1 or an empty list.
2876 (symbol_declaration, precedence_declaration, symbols.1): Update actions
2877 for changes to symbol_list.
2878 * src/reader.c: Update for changes to symbol_list.
2879 * src/scan-code.l: Likewise.
2880 * src/scan-gram.l: Scan new PERCENT_SYMBOL_DEFAULT token.
2881 * src/symlist.c, src/symlist.h: Extend such that a list node may
2882 represent a semantic type or a %symbol-default in addition to just an
2883 ordinary symbol. Add switched functions for setting %destructor's and
2884 %printer's.
2885 * tests/actions.at, tests/input.at: Add %symbol-default to all default
2886 %destructor/%printer declarations.
2887
2888 2006-08-23 Joel E. Denny <jdenny@ces.clemson.edu>
2889
2890 Whether the default %destructor/%printer applies to a particular symbol
2891 isn't a question of whether the user *declares* that symbol (in %token,
2892 for example). It's a question of whether the user by any means
2893 *defines* the symbol at all (by simply using a char token, for
2894 example). $end is defined by Bison whereas any other token with token
2895 number 0 is defined by the user. The error token is always defined by
2896 Bison regardless of whether the user declares it with %token, but we
2897 may one day let the user define error as a nonterminal instead.
2898 * NEWS (2.3+): Say "user-defined" instead of "user-declared".
2899 * doc/bison.texinfo (Freeing Discarded Symbols): Likewise, and document
2900 the meaning of "user-defined".
2901 * tests/actions.at (Default %printer and %destructor for user-declared
2902 end token): Rename to...
2903 (Default %printer and %destructor for user-defined end token): ...
2904 this.
2905
2906 * src/symtab.c (symbol_destructor_get, symbol_printer_get): In the
2907 computation of whether to apply the default, don't maintain a list of
2908 every Bison-defined symbol. Instead, just check for a first character
2909 of '$', which a user symbol cannot have, and check for the error token.
2910
2911 2006-08-21 Joel E. Denny <jdenny@ces.clemson.edu>
2912
2913 Don't apply the default %destructor or %printer to the error token,
2914 $undefined, or $accept. This change fits the general rule that the
2915 default %destructor and %printer are only for user-declared symbols,
2916 and it solves several difficulties that are described in the new test
2917 cases listed below.
2918 * src/symtab.c (symbol_destructor_get, symbol_printer_get): Implement.
2919 * tests/actions.at (Default %printer and %destructor are not for error
2920 or $undefined, Default %printer and %destructor are not for $accept):
2921 New test cases.
2922
2923 2006-08-19 Joel E. Denny <jdenny@ces.clemson.edu>
2924
2925 Allow %start after the first rule.
2926 * src/reader.c (grammar_current_rule_begin): Don't set the start symbol
2927 when parsing the first rule.
2928 (check_and_convert_grammar): Search for it here after all grammar
2929 declarations have been parsed. Skip midrules, which have dummy LHS
2930 nonterminals.
2931 * src/symtab.c (symbol_is_dummy): New function.
2932 * src/symtab.h (symbol_is_dummy): Declare it.
2933 * tests/input.at (%start after first rule): New test.
2934
2935 2006-08-18 Joel E. Denny <jdenny@ces.clemson.edu>
2936
2937 Redo some of the previous commit: add back the ability to use
2938 non-aliased/undeclared string literals since it might be useful to
2939 those declaring %token-table.
2940 * src/reader.c (check_and_convert_grammar): Undo changes in previous
2941 commit: don't worry about complaints from symbols_pack.
2942 * src/symtab.c (symbol_new, symbol_class_set,
2943 symbol_check_alias_consistency): Undo changes in previous commit: count
2944 each string literal as a new symbol and token, assign it a symbol
2945 number, and don't complain about non-aliased string literals.
2946 (symbols_pack): Since symbol_make_alias still does not decrement symbol
2947 and token counts but does still set aliased tokens to the same number,
2948 symbol_pack_processor now leaves empty slots in the symbols array.
2949 Remove those slots.
2950 * tests/regression.at (Undeclared string literal): Remove test case
2951 added in previous commit since non-aliased string literals are allowed
2952 again.
2953 (Characters Escapes, Web2c Actions): Undo changes in previous commit:
2954 remove unnecessary string literal declarations.
2955 * tests/sets.at (Firsts): Likewise.
2956
2957 2006-08-18 Joel E. Denny <jdenny@ces.clemson.edu>
2958
2959 Don't allow an undeclared string literal, but allow a string literal to
2960 be used before its declaration.
2961 * src/reader.c (check_and_convert_grammar): Don't invoke packgram if
2962 symbols_pack complained.
2963 * src/symtab.c (symbol_new): Don't count a string literal as a new
2964 symbol.
2965 (symbol_class_set): Don't count a string literal as a new token, and
2966 don't assign it a symbol number since symbol_make_alias does that.
2967 (symbol_make_alias): It's not necessary to decrement the symbol and
2968 token counts anymore. Don't assume that an alias declaration occurs
2969 before any uses of the identifier or string, and thus don't assert that
2970 one of them has the highest symbol number so far.
2971 (symbol_check_alias_consistency): Complain if there's a string literal
2972 that wasn't declared as an alias.
2973 (symbols_pack): Bail if symbol_check_alias_consistency failed since
2974 symbol_pack asserts that every token has been assigned a symbol number
2975 although undeclared string literals have not.
2976 * tests/regression.at (String alias declared after use, Undeclared
2977 string literal): New test cases.
2978 (Characters Escapes, Web2c Actions): Declare string literals as
2979 aliases.
2980 * tests/sets.at (Firsts): Likewise.
2981
2982 2006-08-14 Joel E. Denny <jdenny@ces.clemson.edu>
2983
2984 In the grammar scanner, STRING_FINISH unclosed constructs and return
2985 them to the parser in order to improve error messages.
2986 * src/scan-gram.l (SC_ESCAPED_STRING, SC_ESCAPED_CHARACTER,
2987 SC_BRACED_CODE, SC_PROLOGUE): Implement.
2988 * tests/input.at (Unclosed constructs): New test case.
2989 * tests/regression.at (Invalid inputs): Update now that unclosed %{ is
2990 seen.
2991
2992 * src/scan-gram.h, src/scan-gram.l (gram_last_braced_code_loc): Remove
2993 unused global.
2994
2995 2006-08-13 Joel E. Denny <jdenny@ces.clemson.edu>
2996
2997 Handle string aliases for character tokens correctly.
2998 * src/symtab.c (symbol_user_token_number_set): If the token has an
2999 alias, check and set its alias's user token number instead of its own,
3000 which is set to indicate the alias. Previously, every occurrence of
3001 the character token in the grammar overwrote that alias indicator with
3002 the character code.
3003 * tests/input.at (String aliases for character tokens): New test.
3004
3005 2006-08-12 Joel E. Denny <jdenny@ces.clemson.edu>
3006
3007 * src/parse-gram.y: Add `%expect 0' so we don't overlook conflicts.
3008
3009 2006-08-11 Paul Eggert <eggert@cs.ucla.edu>
3010
3011 * bootstrap: Put in need-ngettext argument to AM_GNU_GETTEXT,
3012 to prevent failures when building on older platforms.
3013 Check for autopoint failure.
3014 Set XGETTEXT_OPTIONS to values that check for C format strings,
3015 so that translators are warned about them (this also helps
3016 prevent core dumps).
3017
3018 * lib/subpipe.c (create_subpipe): Use new gnulib pipe_safer
3019 function, since it simplifies our code a bit.
3020
3021 * configure.ac (AC_ARG_ENABLE): Use -Wextra -Wno-sign-compare
3022 rather than -W, so we don't get bogus warnings about sign comparisons.
3023 Add -Wpointer-arith, since that warning is useful (it reports code
3024 that does not conform to C89 and that some compilers reject).
3025 * data/c.m4, data/glr.c, data/lalr1.cc, data/yacc.c: Undo latest change,
3026 since it's no longer needed.
3027
3028 2006-08-10 Joel E. Denny <jdenny@ces.clemson.edu>
3029
3030 Clean up scanners a bit.
3031 * src/flex-scanner.h (FLEX_NO_OBSTACK): New macro that blocks obstack
3032 definitions so gcc won't warn when obstack_for_string is unused.
3033 * src/scan-code.l: config.h and system.h are already #include'd by
3034 scan-code-c.c, so get rid of them here.
3035 * src/scan-gram.l: Likewise.
3036 * src/scan-skel.l: Likewise, and use flex-scanner.h without obstack
3037 definitions rather than duplicating the rest of it.
3038 * src/scan-gram-c.c, scan-skel-c.c: #include "system.h".
3039
3040 2006-08-09 Joel E. Denny <jdenny@ces.clemson.edu>
3041
3042 Suppress signed/unsigned comparison warnings for yycheck.
3043 * data/c.m4 (b4_safest_int_type): New macro.
3044 * data/glr.c, data/lalr1.cc: Wherever you compare yycheck[i] against
3045 a signed int type, cast it to b4_safest_int_type first.
3046 * data/yacc.c: Likewise.
3047 (b4_safest_int_type): Overwrite the one from c.m4 since b4_int_type is
3048 also overwritten.
3049
3050 2006-08-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de> (tiny change)
3051
3052 * doc/bison.texinfo: Fix some typos.
3053
3054 2006-08-02 Paul Eggert <eggert@cs.ucla.edu>
3055
3056 * m4/.cvsignore: Add inttypes_h.m4,lib-ld.m4, lib-prefix.m4,
3057 po.m4, stdint_h.m4, uintmax_t.m4, ulonglong.m4, warning.m4.
3058
3059 * bootstrap (gnulib_tool): Stop using --assume-autoconf;
3060 the latest gnulib does this a different way.
3061 (get_translations): Sharuzzaman Ahmat Raslan reported that the ms
3062 translation was patched, so stop omitting it.
3063
3064 2006-07-29 Joel E. Denny <jdenny@ces.clemson.edu>
3065
3066 Enable declaration of default %printer/%destructor. Make the parser
3067 use these for all user-declared grammar symbols for which the user does
3068 not declare a specific %printer/%destructor. Thus, the parser uses it
3069 for token 0 if the user declares it but not if Bison generates it as
3070 $end. Discussed starting at
3071 <http://lists.gnu.org/archive/html/bison-patches/2006-02/msg00064.html>,
3072 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00091.html>,
3073 and
3074 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00019.html>.
3075 * NEWS (2.3+): Mention.
3076 * doc/bison.texinfo (Actions in Mid-Rule): It's no longer impossible to
3077 declare a %destructor for a mid-rule's semantic value. It's just
3078 impossible to declare one specific to it.
3079 (Freeing Discarded Symbols): Mention that @$ can be used in %destructor
3080 code. Describe default %destructor form.
3081 * src/parse-gram.y (grammar_declaration): Parse default
3082 %printer/%destructor declarations.
3083 * src/output.c (symbol_destructors_output): Use symbol_destructor_get
3084 and symbol_destructor_location_get rather than accessing the destructor
3085 and destructor_location members of struct symbol.
3086 (symbol_printers_output): Likewise but for %printer's.
3087 * src/reader.c (symbol_should_be_used): Likewise but for %destructor's
3088 again.
3089 * src/symtab.c (default_destructor, default_destructor_location,
3090 default_printer, default_printer_location): New static global
3091 variables to record the default %destructor and %printer.
3092 (symbol_destructor_get, symbol_destructor_location_get,
3093 symbol_printer_get, symbol_printer_location_get): New functions to
3094 compute the appropriate %destructor and %printer for a symbol.
3095 (default_destructor_set, default_printer_set): New functions to set the
3096 default %destructor and %printer.
3097 * src/symtab.h: Prototype all those new functions.
3098 * tests/actions.at (Default %printer and %destructor): New test to
3099 check that the right %printer and %destructor are called, that they're
3100 not called for $end, and that $$ and @$ work correctly.
3101 (Default %printer and %destructor for user-declared end token): New
3102 test to check that the default %printer and %destructor are called for
3103 a user-declared end token.
3104 * tests/input.at (Default %printer and %destructor redeclared, Unused
3105 values with default %destructor): New tests to check related grammar
3106 warnings and errors.
3107
3108 2006-07-29 Joel E. Denny <jdenny@ces.clemson.edu>
3109
3110 Clean up handling of %destructor for the end token (token 0).
3111 Discussed starting at
3112 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00019.html>
3113 and
3114 <http://lists.gnu.org/archive/html/help-bison/2006-07/msg00013.html>.
3115
3116 Make the skeletons consistent in how they pop the end token and invoke
3117 its %destructor.
3118 * data/glr.c (yyrecoverSyntaxError, yyparse): Don't pop the start
3119 state, which has token number 0, since this would invoke the
3120 %destructor for the end token.
3121 * data/lalr1.cc (yy::parser::parse): Don't check for the final state
3122 until after shifting the end token, or else it won't be popped.
3123 * data/yacc.c (yyparse): Likewise.
3124
3125 * data/glr.c (yyparse): Clear the lookahead after shifting it even when
3126 it's the end token. Upon termination, destroy an unshifted lookahead
3127 even when it's the end token.
3128 * data/lalr1.cc (yy::parser::parse): Likewise.
3129 * data/yacc.c (yyparse): Likewise.
3130
3131 * src/reader.c (packgram): Don't check rule 0. This suppresses unused
3132 value warnings for the end token when the user gives the end token a
3133 %destructor.
3134
3135 * tests/actions.at (Printers and Destructors): Test all the above.
3136
3137 2006-07-24 Paul Eggert <eggert@cs.ucla.edu>
3138
3139 Update to latest gnulib and gettext versions.
3140 * bootstrap (gnulib-modules): Remove hard-locale, stdio-safer.
3141 Add fopen-safer.
3142 (gnulib_files): Add m4/warning.m4. Don't worry about files
3143 overwritten by autopoint.
3144 Replace gt_INTL_SUBDIR_CORE with an empty body in m4/gettext_gl.m4.
3145 Suppress "id", "ms", "tr" translations for now, since gettext 0.15
3146 rejects them.
3147 Don't use autoreconf; instead, invoke autopoint etc. by hand,
3148 so that we can remove the intl files at a better time.
3149 (intl_files_to_remove): Remove aclocal.m4, since it gets
3150 rebuilt anyway. Remove m4/inttypes_h.m4, m4/inttypes.m4,
3151 m4/isc-posix.m4, m4/lib-ld.m4, m4/lib-prefix.m4, m4/po.m4,
3152 m4/stdint_h.m4, m4/uintmax_t.m4, m4/ulonglong.m4.
3153 Add m4/inttypes-h.m4, m4/lock.m4, m4/visibility.m4.
3154 Remove datarootdir hack; no longer needed.
3155 * configure.ac: Use gl_WARNING_CFLAGS rather than BISON_WARNING.
3156 (AM_GNU_GETTEXT_VERSION): Bump from 0.12 to 0.15.
3157 * lib/.cvsignore: Remove hard-locale.c, hard-locale.h, strdup.c,
3158 strdup.h.
3159 * m4/.cvsignore: Remove hard-locale.m4, strdup.m4.
3160 * m4/warning.m4: Remove from CVS, since we now use gnulib's version.
3161
3162 2006-07-20 Paul Eggert <eggert@cs.ucla.edu>
3163
3164 * bootstrap: Adjust to today's change to gnulib-tool by invoking
3165 it with --assume-autoconf='latest-stable'.
3166
3167 2006-07-13 Joel E. Denny <jdenny@ces.clemson.edu>
3168
3169 * src/parse-gram.y (grammar_declaration): Don't confuse Doxygen (at
3170 least 1.4.7 and 1.4.4) by putting a #line between `typedef union
3171 YYSTYPE' and `{'.
3172 * src/muscle_tab.h (muscle_grow): Replace the header comments with
3173 those from muscle_tab.c since the old ones are misleading.
3174
3175 2006-07-13 Akim Demaille <akim@epita.fr>
3176
3177 Support %define "KEY" {VALUE}.
3178 * src/scan-code.h, src/scan-code.l (translate_action)
3179 (translate_rule_action, translate_symbol_action, translate_code):
3180 Return char *, not const char *.
3181 * src/parse-gram.y (declaration): Rename as...
3182 (prologue_declaration): this.
3183 (string_content): Remove this nonterminal, use STRING.
3184 (braceless, content, content.opt): New nonterminal.
3185 Use them.
3186 (%define): Now accept content.opt, i.e., accept also BRACED_CODE
3187 as value.
3188 * src/scan-gram.l (getargs.h): Don't include it.
3189
3190 2006-07-12 Paul Eggert <eggert@cs.ucla.edu>
3191
3192 * data/lalr1.cc (YYCDEBUG): Use 'if (yydebug_) (*yycdebug_)'
3193 rather than a for-loop that declares a local bool variable. This
3194 should work around a compatibility problem with a Cray x1e C++
3195 compiler reported by Hung Nguyen in
3196 <http://lists.gnu.org/archive/html/help-bison/2006-07/msg00022.html>.
3197 The for-loop was introduced in the 2004-11-17 change but I don't
3198 know why it was needed.
3199
3200 2006-07-12 Akim Demaille <akim@epita.fr>
3201
3202 * data/c.m4: Comment changes.
3203
3204 2006-07-10 Akim Demaille <akim@lrde.epita.fr>
3205
3206 * src/complain.c (error_message, ERROR_MESSAGE): New.
3207 To factor...
3208 (fatal_at, fatal, warn_at, warn, complain_at, complain): these.
3209 * src/complain.h, src/complain.c (warning_issued): Remove, unused.
3210
3211 2006-07-09 Paul Eggert <eggert@cs.ucla.edu>
3212
3213 * NEWS: Instead of %union, you can define and use your own union type
3214 YYSTYPE if your grammar contains at least one <type> tag.
3215 Your YYSTYPE need not be a macro; it can be a typedef.
3216 * doc/bison.texinfo (Value Type, Multiple Types, Location Type):
3217 (Union Decl, Decl Summary): Document this.
3218 * data/glr.c (YYSTYPE): Implement this.
3219 * data/glr.cc (YYSTYPE): Likewise.
3220 * data/lalr1.cc (YYSTYPE): Likewise.
3221 * data/yacc.c (YYSTYPE): Likewise.
3222 * src/output.c (prepare): Output tag_seen_flag.
3223 * src/parse-gram.y (declaration, grammar_declaration):
3224 Use 'union_seen' rather than 'typed' to determine whether
3225 %union has been seen, since grammars can now be typed without
3226 %union.
3227 (symbol_declaration, type.opt, symbol_def):
3228 Keep track of whether a tag has been seen.
3229 * src/reader.c (union_seen, tag_seen): New vars.
3230 (typed): remove.
3231 * src/reader.h (union_seen, tag_seen, typed): Likewise.
3232 * src/scan-code.l (untyped_var_seen): New variable.
3233 (handle_action_dollar): Adjust to above changes.
3234 (handle_action_dollar, handle_action_at):
3235 Improve overflow checking for outlandish numbers.
3236 * tests/input.at (AT_CHECK_UNUSED_VALUES): Redo test to
3237 avoid new diagnostics generated by above changes.
3238 * tests/regression.at (YYSTYPE typedef): Add test to check
3239 for type tags without %union.
3240
3241 * src/symlist.c (symbol_list_length): Return int, not unsigned
3242 int, since callers expect int. This may need to get revisited
3243 once we have proper integer overflow checking.
3244
3245 * src/scan-gram.h (gram_scanner_cursor): Remove decl, since this
3246 object is now static.
3247
3248 * src/getargs.c (flags_argmatch): Return void, not int,
3249 to pacify ./configure --enable-gcc-warnings.
3250
3251 * src/flex-scanner.h (STRING_FREE): Don't use FLEX_PREFIX (last_string)
3252 since last_string is already defined to FLEX_PREFIX (last_string).
3253
3254 2006-07-09 Akim Demaille <akim@lrde.epita.fr>
3255
3256 Implement --warnings/-W.
3257 * src/getargs.c (report_argmatch, trace_argmatch): Remove,
3258 replaced by...
3259 (flags_argmatch, FLAGS_ARGMATCH): this new function and macro.
3260 Adjust callers.
3261 * src/getargs.h, src/getargs.c (warnings, warnings_flags)
3262 (warnings_args, warnings_types): New.
3263 (getargs, short_options, long_options): Accept -W/--warnings.
3264 Sort the options by alphabetical order, upper case letter right
3265 before its lower case.
3266
3267 2006-07-09 Joel E. Denny <jdenny@ces.clemson.edu>
3268
3269 Change %merge result type clash warnings to errors. Discussed at
3270 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00026.html>.
3271 * src/reader.c (record_merge_function_type): Use complain_at.
3272 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
3273 declared later): Update test case results.
3274
3275 2006-07-09 Akim Demaille <akim@lrde.epita.fr>
3276
3277 * src/getargs.h, src/getargs.c: Swap --report and --trace handling
3278 to be in alphabetical order.
3279 (trace_args): Spelling fixes.
3280
3281 2006-07-09 Paul Eggert <eggert@cs.ucla.edu>
3282
3283 * data/yacc.c (YYID, yy_stack_print): Prefix local vars with "yy"
3284 so they don't collide with user-defined macros.
3285 (yy_stack_print): Don't assume that yytype_int16 promotes to int;
3286 this was never guaranteed, and now that we're using gnulib stdint,
3287 which defines int_fast16_t to long int, the problem is exposed.
3288
3289 2006-07-08 Paul Eggert <eggert@cs.ucla.edu>
3290
3291 * data/c.m4 (b4_basename): Simplify a bit, since we don't
3292 need the full POSIX semantics (and weren't implementing them
3293 anyway).
3294
3295 Adjust to Autoconf 2.60 and today's gnulib.
3296 * bootstrap (gnulib_modules): Add stdint.
3297 Remove special case for m4/onceonly_2_57.m4, since gnulib-tool
3298 no longer copies it.
3299 (intl_files_to_remove): Remove m4/longlong.m4 and m4/wchar_t.m4,
3300 since stdint needs the former and wcwidth (which is now required
3301 by mbswidth) needs the latter.
3302 Append 'datarootdir = @datarootdir@' to po/Makefile.in.in, to
3303 work around a compatibility glitch between gettext 0.14.6 and
3304 Autoconf 2.60.
3305 * configure.ac (AC_PREREQ): Require Autoconf 2.60.
3306 Do not check for uintptr_t, since new stdint module does the right
3307 thing.
3308 * lib/.cvsignore: Remove alloca.c, alloca.h, alloca_.h.
3309 Add stdint.h, stdint_.h, wcwidth.h.
3310 * m4/.cvsignore: Remove alloca.m4, onceonly.m4.
3311 Add absolute-header.m4, double-slash-root.m4, longlong.m4,
3312 stdint.m4, wchar_t.m4, wcwidth.m4.
3313 * src/files.c: Include <dirname.h> and <stdio-safer.h> in the
3314 usual order for ../lib/*.h files.
3315 (file_name_split): Use last_component, not base_name, to adjust
3316 to gnulib changes.
3317 * src/parse-gram.h: Include <strverscmp.h> in the usual order
3318 for ../lib/*.h files.
3319 (YYTYPE_INT16, YYTYPE_INT8, YYTYPE_UINT16, YYTYPE_UINT8):
3320 Define unconditionally, since we now assume the stdint module.
3321 * src/scan-skel.l: Include <dirname.h>.
3322 (BASE_QPUTS): Use last_component, not base_name.
3323 * src/system.h: Include <unlocked-io.h> in the usual order
3324 for ../lib/*.h files. Include <stdint.h> unconditionally,
3325 since we now use the stdint module.
3326 (uintptr_t): Declare if UINTPTR_MAX is not defined, not
3327 HAVE_UINTPTR_T, since we now use the stdint module.
3328 (base_name): Remove decl, since files now include <dirname.h>
3329 to get the decl.
3330
3331 2006-07-08 Akim Demaille <akim@lrde.epita.fr>
3332
3333 * data/c.m4 (b4_location_initial_column, b4_location_initial_line):
3334 New, default to 1.
3335 * data/yacc.c, data/glr.c, data/location.cc: Use them.
3336 * NEWS, doc/bison.texinfo: The initial column and line are 1 by
3337 default.
3338 * tests/calc.at: Adjust.
3339
3340 2006-07-08 Akim Demaille <akim@lrde.epita.fr>
3341
3342 * data/c.m4 (b4_basename): New.
3343 (b4_syncline): Also output the location of its invocation (from
3344 the skeleton).
3345 (b4_user_action, b4_define_user_action, b4_user_actions)
3346 (b4_user_initial_action, b4_user_post_prologue, b4_user_start_header)
3347 (b4_user_stype): New.
3348 * data/yacc.c, data/glr.c, data/lalr1.cc, data/glr.cc: Use them.
3349
3350 2006-07-07 Joel E. Denny <jdenny@ces.clemson.edu>
3351
3352 In the grammar file, the first column is 1 not 0 on the first line as
3353 on every other line.
3354 * src/parse-gram.y (%initial-action): Initialize @$ correctly.
3355 * tests/input.at (Torturing the Scanner): Update output.
3356
3357 * src/scan-gram.l (scanner_cursor): Declare it static.
3358
3359 2006-07-07 Joel E. Denny <jdenny@ces.clemson.edu>
3360
3361 In warnings, say "previous declaration" rather than "first
3362 declaration".
3363 * src/symtab.c (redeclaration): Do that here.
3364 * src/reader.c (record_merge_function_type): In the case of a result
3365 type clash, report the previous declaration rather than the very first
3366 one in the grammar file.
3367 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
3368 declared later): Add a third declaration to check this behavior.
3369 * tests/input.at (Incompatible Aliases): Update output.
3370
3371 2006-06-27 Akim Demaille <akim@epita.fr>
3372
3373 * doc/Doxyfile.in: New.
3374 * doc/Makefile.am: Use it.
3375 * src/lalr.h, src/symtab.h: Initial doxygenation.
3376
3377 2006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
3378
3379 Don't miss %merge result type warnings just because the LHS types are
3380 declared after the %merge. This continues the effort of the previous
3381 patch.
3382 * src/reader.c (get_merge_function): Don't set the merger type yet.
3383 (record_merge_function_type): New function for setting the merger type
3384 and checking for clashes.
3385 (grammar_current_rule_merge_set): Set the location of the %merge for
3386 the current rule.
3387 (packgram): Invoke record_merge_function_type for each rule now that
3388 all symbol type declarations have been parsed.
3389 * src/reader.h (merger_list.type_declaration_location): New member
3390 storing the location of the first %merge from which the type for this
3391 merging function was derived.
3392 * src/symlist.h (symbol_list.merger_declaration_location): New member
3393 storing the location of a rule's %merge, if any.
3394 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
3395 declared later): New test to catch the error fixed by the above patch.
3396
3397 2006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
3398
3399 Get action warnings (grammar_rule_check) right even when symbol
3400 declarations appear after the rules. Discussed at
3401 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00108.html>
3402 and
3403 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00151.html>.
3404 Don't mistake the type of $$ in a midrule to be that of its parent
3405 rule's $$.
3406 * src/reader.c (grammar_current_rule_end): Don't invoke
3407 grammar_rule_check yet since not all symbol declarations may have been
3408 parsed yet.
3409 (grammar_midrule_action): Likewise.
3410 Don't record whether the midrule's $$ has been used yet since actions
3411 haven't been translated yet.
3412 Record the midrule's parent rule and its RHS index within the parent
3413 rule.
3414 (grammar_current_rule_action_append): Don't translate the action yet
3415 since not all symbol declarations may have been parsed yet and, thus,
3416 warnings about types for $$, $n, @$, and @n can't be reported yet.
3417 (packgram): Translate the action and invoke grammar_rule_check now that
3418 all symbol declarations have been parsed.
3419 * src/scan-code.l (handle_action_dollar): Now that this is invoked
3420 after parsing the entire grammar file, the symbol list here in the case
3421 of a midrule is actually the midrule's empty RHS, so reference its
3422 parent rule's RHS where necessary.
3423 On the other hand, now that you can already know it's a midrule, you
3424 aren't forced to think $$ has the same type as its parent rule's $$.
3425 (handle_action_at): In the case of a midrule, reference the parent rule
3426 where necessary.
3427 * src/symlist.c (symbol_list_new): Initialize new midrule-related
3428 members.
3429 (symbol_list_length): Now that this is invoked after all rules have
3430 been parsed, a NULL symbol (rather than a NULL symbol list node)
3431 terminates a rule. symbol_list_print already does this correctly.
3432 * src/symlist.h (symbol_list.midrule_parent_rule,
3433 symbol_list.midrule_parent_rhs_index): New members so that midrules can
3434 remember their relationships with their parents.
3435 * tests/input.at (Type Clashes): Extend to catch the midrule $$ error
3436 fixed by the above patch.
3437 (_AT_UNUSED_VALUES_DECLARATIONS, AT_CHECK_UNUSED_VALUES): New m4 macros
3438 implementing...
3439 (Unused values): ... this old test case and...
3440 (Unused values before symbol declarations): ... this new test case.
3441 This one is the same as `Unused values' except that all symbol
3442 declarations appear after the rules in order to catch the rest of the
3443 errors fixed by the above patch.
3444
3445 2006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
3446
3447 More cleanup.
3448 * src/reader.c (current_rule): Declare it static since it's no longer
3449 used outside this file.
3450 (grammar_current_rule_action_append): Remove redundant arguments from
3451 translate_rule_action invocation.
3452 * src/reader.h (current_rule): Remove this unused extern.
3453 * src/scan-code.h (translate_rule_action): Remove redundant arguments.
3454 * src/scan-code.l (translate_rule_action): Likewise.
3455
3456 2006-06-25 Joel E. Denny <jdenny@ces.clemson.edu>
3457
3458 Clean up yesterday's patch.
3459 * parse-gram.y (rhs): Move grammar_midrule_action invocation from here
3460 to...
3461 * src/reader.c (grammar_current_rule_action_append): ... here for
3462 consistency with grammar_current_rule_symbol_append.
3463 * tests/regression.at (Braced code in declaration in rules section):
3464 Make yyerror and yylex static as usual.
3465
3466 2006-06-24 Joel E. Denny <jdenny@ces.clemson.edu>
3467
3468 Fix bug that mistakes braced code in a declaration in the rules section
3469 to be a rule action. Mentioned at
3470 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00105.html>.
3471 * src/scan-gram.l: Move midrule action detection from the start of the
3472 scanning of any braced code to...
3473 * src/parse-gram.y (rhs): ... the parsing of braced code as a rule
3474 action. For readability, use $2 and @2 rather than the equivalent
3475 global variables.
3476 * tests/regression.at (Braced code in declaration in rules section):
3477 New test to catch the error fixed by the above patch.
3478
3479 Work on code readability some.
3480 * src/scan-code.l (current_rule): Get rid of this misleading and
3481 redundant declaration: it's actually extern'ed in reader.h.
3482 (YY_DECL, code_lex, handle_action_dollar, handle_action_at,
3483 translate_action): Add a rule argument and use it instead of the global
3484 current_rule.
3485 (translate_rule_action): This already receives current_rule through an
3486 argument, so pass it on to translate_action instead of assigning
3487 current_rule to current_rule.
3488 (translate_symbol_action, translate_code): Pass rule = NULL to
3489 translate_action.
3490
3491 2006-06-23 Joel E. Denny <jdenny@ces.clemson.edu>
3492
3493 Rename %before-definitions to %start-header and %after-definitions to
3494 %end-header. Don't use these declarations to separate pre-prologue
3495 blocks from post-prologue blocks. Add new order-independent
3496 declarations %before-header and %after-header as alternatives to the
3497 traditional Yacc pre-prologue and post-prologue blocks. Discussed at
3498 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00110.html>.
3499 * NEWS (2.3+): Update for these changes.
3500 * data/glr.c (b4_before_definitions): Update to...
3501 (b4_start_header): ... this.
3502 (b4_after_definitions): Update to...
3503 (b4_end_header): ... this.
3504 * data/glr.cc: Likewise.
3505 * data/lalr1.cc: Likewise.
3506 * data/yacc.c: Likewise.
3507 * doc/bison.texinfo (The prologue): Update names, and replace remaining
3508 prologue blocks with %*-header declarations.
3509 (Calc++ Parser): Likewise.
3510 (Decl Summary): Update names.
3511 (Table of Symbols): Update description.
3512 * src/parse-gram.y (PERCENT_AFTER_DEFINITIONS): Update to...
3513 (PERCENT_END_HEADER): ... this.
3514 (PERCENT_BEFORE_DEFINITIONS): Update to...
3515 (PERCENT_START_HEADER): ... this.
3516 (PERCENT_AFTER_HEADER, PERCENT_BEFORE_HEADER): New tokens.
3517 (declaration): Update token names and m4 macro names.
3518 When parsing %end-header and %start-header, invoke translate_code
3519 before muscle_code_grow, and no longer set global booleans to remember
3520 whether these declarations have been seen.
3521 Parse new %after-header and %before-header.
3522 * src/reader.c (before_definitions, after_definitions): Remove.
3523 (prologue_augment): Accept a new bool argument to specify whether to
3524 augment the pre-prologue or post-prologue.
3525 * src/reader.h (before_definitions, after_definitions): Remove these
3526 extern's.
3527 (prologue_augment): Add new bool argument.
3528 * src/scan-gram.l (PERCENT_AFTER_DEFINITIONS): Update to...
3529 (PERCENT_END_HEADER): ... this.
3530 (PERCENT_BEFORE_DEFINITIONS): Update to...
3531 (PERCENT_START_HEADER): ... this.
3532 (PERCENT_AFTER_HEADER, PERCENT_BEFORE_HEADER): New tokens.
3533 * tests/actions.at (Printers and Destructors): Update names.
3534
3535 2006-06-22 Joel E. Denny <jdenny@ces.clemson.edu>
3536
3537 Add comparison operators for C++ location classes. Discussed at
3538 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00092.html>.
3539 * data/c++.m4 (b4_define_location_comparison): New boolean %define
3540 declaration indicating whether filename_type has an operator==. If
3541 filename_type is `std::string', it defaults to `1', `0' otherwise.
3542 * data/location.cc: Iff b4_define_location_comparison is `1', add
3543 operator== and operator!= for class position and for class location.
3544
3545 Some minor fixes.
3546 * src/scan-action.l: Remove unused file.
3547 * src/symtab.c (symbol_printer_set): Use printer_location not
3548 destructor_location.
3549 * src/symtab.h (struct symbol): Replace incorrect source comment for
3550 printer members.
3551 * tests/input.at (Incompatible Aliases): Update output with correct
3552 printer location.
3553
3554 2006-06-20 Joel E. Denny <jdenny@ces.clemson.edu>
3555
3556 Don't put the pre-prologue in the header file. For the yacc.c code
3557 file and the glr.c header and code files, move the pre-prologue before
3558 the token definitions. Add new %before-definitions and
3559 %after-definitions to declare code that will go in both the header file
3560 and code file. Discussed at
3561 <http://lists.gnu.org/archive/html/bison-patches/2005-12/msg00000.html>,
3562 <http://lists.gnu.org/archive/html/bison-patches/2006-01/msg00016.html>,
3563 and
3564 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00055.html>.
3565 * NEWS (2.3+): Describe these changes.
3566 * data/glr.c (b4_pre_prologue): Move from within to before...
3567 (b4_shared_declarations): ... this.
3568 Add new b4_before_definitions before b4_token_enums.
3569 Add new b4_after_definitions at the end.
3570 * data/glr.cc (b4_pre_prologue): Replace with...
3571 (b4_before_definitions): ... this in the header file.
3572 (b4_after_definitions): New near the end of the header file.
3573 * data/lalr1.cc (b4_pre_prologue): Move from the header file to the
3574 code file right before including the header file.
3575 (b4_before_definitions): New in the previous position of
3576 b4_pre_prologue in the header file.
3577 (b4_after_definitions): New near the end of the header file.
3578 * data/yacc.c: Clean up some m4 quoting especially in the header file.
3579 (b4_token_enums_defines): In the code file, move to right before
3580 YYSTYPE for consistency with the header file.
3581 (b4_before_definitions): New right before b4_token_enums_defines in
3582 both the header and code file.
3583 (b4_after_definitions): New right after YYLTYPE and yylloc in both the
3584 header and code file.
3585 * doc/bison.texinfo (Prologue): Show use of %before-definitions instead
3586 of prologues for %union dependencies.
3587 (Decl Summary): In %defines description, mention the effect of
3588 %before-definitions and %after-definitions on the header file.
3589 (Calc++ Parser): Forward declare driver in a %before-definitions rather
3590 than in the pre-prologue so that make check succeeds.
3591 (Table of Symbols): Add entries for %before-definitions and
3592 %after-definitions.
3593 * src/parse-gram.y (PERCENT_BEFORE_DEFINITIONS): New token for
3594 %before-definitions.
3595 (PERCENT_AFTER_DEFINITIONS): New token for %after-definitions.
3596 (declaration): Parse those declarations and append to
3597 b4_before_definitions and b4_after_definitions, respectively.
3598 * src/reader.c (before_definitions, after_definitions): New bools to
3599 track whether those declarations have been seen.
3600 (prologue_augment): Add to the post-prologue if %union,
3601 %before-definitions, or %after-definitions has been seen.
3602 * src/reader.h (before_definitions, after_definitions): New extern's.
3603 * src/scan-gram.l: Scan the new declarations.
3604 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Place the second
3605 prologue block in a %before-definitions or a %after-definitions based
3606 on whether the %union is declared.
3607 * tests/regression.at (Early token definitions with --yacc, Early token
3608 definitions without --yacc): Move tests for token definitions into the
3609 post-prologue since token names are no longer defined in the
3610 pre-prologue.
3611
3612 2006-06-20 Akim Demaille <akim@epita.fr>
3613
3614 * src/symtab.h, src/symtab.c (symbol_from_uniqstr): New.
3615 (symbol_get): Use it.
3616 * src/parse-gram.y: Use it.
3617
3618 2006-06-19 Joel E. Denny <jdenny@ces.clemson.edu>
3619
3620 * src/scan-gram.l: Remove unused declaration of last_string_1 so the
3621 build succeeds when configured with --enable-gcc-warnings.
3622
3623 2006-06-19 Paul Eggert <eggert@cs.ucla.edu>
3624
3625 * src/parse-gram.y (char_name): New function.
3626 (CHAR, STRING, string_content): For %printer, properly escape.
3627 (ID): Prefer fputs to fprintf.
3628 (id): Reindent to be consistent with other rules.
3629 Properly quote char.
3630
3631 The Translation Project changed its way of publishing translations
3632 to maintainers. I haven't received any responses to my request
3633 for supporting the old way, or for documenting the new way. I
3634 have modified 'bootstrap' to use screen scraping
3635 (in this case, HTML scraping). This is unreliable and inelegant,
3636 but I don't see any better way. Yuck.
3637 * bootstrap (TP_URL, WGET_COMMAND): New vars.
3638 (get_translations): New function, which uses HTML scraping to
3639 deduce locations of latest translations.
3640 Use this function to grab both bison and bison-runtime .po files.
3641 Don't bother priming the pump for the runtime-po domain any more,
3642 as it's now translated better than bison is.
3643
3644 2006-06-19 Akim Demaille <akim@epita.fr>
3645
3646 * src/scan-gram.l: No longer "parse" things after `%union' until
3647 `{'. Rather, return a single "%union" token.
3648 No longer make symbols: return strings, and leave the conversion
3649 to symbols to the parser.
3650 (SC_PRE_CODE, token_type): Remove.
3651 * src/parse-gram.y (%union): New field `character'.
3652 Sort tokens.
3653 (CHAR): New token.
3654 (ID, ID_COLON): Now that the scanner no longer makes them
3655 identifiers, adjust all uses to invoke symbol_get.
3656 (id_colon): New, wraps the conversion from string to symbol.
3657 (%union): Accept a possible union_name.
3658 (symbol): Now can be a char.
3659 * data/c.m4 (b4_union_name): Leave a default value.
3660 * data/glr.c, data/yacc.c: Use it.
3661
3662 2006-06-11 Joel E. Denny <jdenny@ces.clemson.edu>
3663
3664 For associating token numbers with token names for "yacc.c", don't use
3665 #define statements unless `--yacc' is specified; always use enum
3666 yytokentype. Most important discussions start at:
3667 <http://lists.gnu.org/archive/html/bison-patches/2005-09/msg00053.html>,
3668 <http://lists.gnu.org/archive/html/bison-patches/2005-12/msg00052.html>,
3669 and
3670 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00043.html>.
3671 * NEWS (2.3+): Mention.
3672 * data/c.m4 (b4_yacc_if): New.
3673 (b4_token_enums_defines): Use b4_yacc_if to decide whether to add the
3674 token #define's.
3675 * doc/bison.texinfo (Bison Options): Describe the effect of `--yacc'
3676 on token name definitions.
3677 * src/getargs.c (usage): Capitalize `Yacc' in English.
3678 * src/output.c (prepare): Define b4_yacc_flag.
3679 * tests/regression.at (Early token definitions): Test that tokens names
3680 are defined before the pre-prologue not just before the post-prologue.
3681 Remove this test case and copy to...
3682 (Early token definitions with --yacc): ... this to test #define's.
3683 (Early token definitions without --yacc): ... and this to test enums.
3684
3685 2006-06-11 Paul Eggert <eggert@cs.ucla.edu>
3686
3687 * NEWS: Reword the post-2.3 change to not be so optimistic about
3688 removing the old "look-ahead" spelling.
3689 Update previous look-ahead/lookahead change reports.
3690 * REFERENCES: look-ahead -> lookahead (since that's
3691 what he actually wrote).
3692 * doc/refcard.tex: look ahead -> lookahead,
3693 look-ahead -> lookahead
3694
3695 2006-06-09 Joel E. Denny <jdenny@ces.clemson.edu>
3696
3697 For consistency, use `lookahead' instead of `look-ahead' or
3698 `look_ahead'. Discussed starting at
3699 <http://lists.gnu.org/archive/html/bison-patches/2006-01/msg00049.html>
3700 and then at
3701 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00017.html>.
3702 * NEWS: For the next release, note the change to `--report'.
3703 * TODO, doc/bison.1: Update English.
3704 * doc/bison.texinfo: Update English.
3705 (Understanding Your Parser, Bison Options): Document as
3706 `--report=lookahead' rather than `--report=look-ahead'.
3707 * src/conflicts.c: Update English in comments.
3708 (lookahead_set): Rename from look_ahead_set.
3709 (flush_reduce): Rename argument look_ahead_tokens to lookahead_tokens.
3710 (resolve_sr_conflict): Rename local look_ahead_tokens to
3711 lookahead_tokens, and update other uses.
3712 (flush_shift, set_conflicts, conflicts_solve, count_sr_conflicts,
3713 count_rr_conflicts, conflicts_free): Update uses.
3714 * src/getargs.c (report_args): Move "lookahead" before alternate
3715 spellings.
3716 (report_types): Update uses.
3717 (usage): For `--report' usage description, state `lookahead' spelling
3718 rather than `look-ahead'.
3719 * src/getargs.h (report.report_lookahead_tokens): Rename from
3720 report_look_ahead_tokens.
3721 * src/lalr.c: Update English in comments.
3722 (compute_lookahead_tokens): Rename from compute_look_ahead_tokens.
3723 (state_lookahead_tokens_count): Rename from
3724 state_look_ahead_tokens_count.
3725 Rename local n_look_ahead_tokens to n_lookahead_tokens.
3726 (lookahead_tokens_print): Rename from look_ahead_tokens_print.
3727 Rename local n_look_ahead_tokens to n_lookahead_tokens.
3728 Update other uses.
3729 Update English in output.
3730 (add_lookback_edge, initialize_LA, lalr, lalr_free): Update uses.
3731 * src/print.c: Update English in comments.
3732 (lookahead_set): Rename from look_ahead_set.
3733 (print_reduction): Rename argument lookahead_token from
3734 look_ahead_token.
3735 (print_core, state_default_rule, print_reductions, print_results):
3736 Update uses.
3737 * src/print_graph.c: Update English in comments.
3738 (print_core): Update uses.
3739 * src/state.c: Update English in comments.
3740 (reductions_new): Update uses.
3741 (state_rule_lookahead_tokens_print): Rename from
3742 state_rule_look_ahead_tokens_print, and update other uses.
3743 * src/state.h: Update English in comments.
3744 (reductions.lookahead_tokens): Rename from look_ahead_tokens.
3745 (state_rule_lookahead_tokens_print): Rename from
3746 state_rule_look_ahead_tokens_print.
3747 * src/tables.c: Update English in comments.
3748 (conflict_row, action_row): Update uses.
3749 * tests/glr-regression.at
3750 (Incorrect lookahead during deterministic GLR,
3751 Incorrect lookahead during nondeterministic GLR): Rename
3752 print_look_ahead to print_lookahead.
3753 * tests/torture.at: Update English in comments.
3754 (AT_DATA_LOOKAHEAD_TOKENS_GRAMMAR): Rename from
3755 AT_DATA_LOOK_AHEAD_TOKENS_GRAMMAR.
3756 (Many lookahead tokens): Update uses.
3757 * data/glr.c: Update English in comments.
3758 * lalr1.cc: Likewise.
3759 * yacc.c: Likewise.
3760 * src/conflicts.h: Likewise.
3761 * src/lalr.h: Likewise.
3762 * src/main.c: Likewise.
3763 * src/output.c: Likewise.
3764 * src/parse-gram.c: Likewise.
3765 * src/tables.h: Likewise.
3766 * tests/calc.at: Likewise.
3767
3768 2006-06-08 Joel E. Denny <jdenny@ces.clemson.edu>
3769
3770 * src/flex-scanner.h (yytext): Remove stray `*/' in #define.
3771
3772 2006-06-07 Paul Eggert <eggert@cs.ucla.edu>
3773
3774 * TODO: Add request from Nelson H. F. Beebe to be able to install
3775 Bison without installing the yacc script.
3776
3777 2006-06-07 Joel E. Denny <jdenny@ces.clemson.edu>
3778
3779 * src/flex-scanner.h: For the sake of Flex 2.5.4, don't #define yyleng
3780 and yytext if they're already #define'd.
3781 * src/flex-scanner.h, src/location.h: Move #include "system.h" to...
3782 * src/scan-code-c.c: ... here.
3783 * src/scan-code.l, src/scan-gram.l: ... and here. Also #include
3784 <config.h>.
3785
3786 2006-06-07 Joel E. Denny <jdenny@ces.clemson.edu>
3787
3788 Get Bison to build again when configured with --enable-gcc-warnings.
3789 * src/location.c, src/location.h, src/main.c, src/scan-code.l: Add some
3790 missing #include's.
3791 * src/scan-code.l (handle_action_dollar, handle_action_at): Rename
3792 loc argument as it shadows a global.
3793 * src/scan-gram.l: Remove stray comma that prevents boundary_set
3794 invocation.
3795
3796 * src/.cvsignore: Add scan-code.c.
3797
3798 2006-06-07 Akim Demaille <akim@epita.fr>
3799
3800 * src/scan-gram.l: Move the "add a trailing ; to actions" code
3801 to...
3802 * src/scan-code.l: here.
3803 * tests/input.at (Torturing the Scanner): Fix another location
3804 error.
3805
3806 2006-06-07 Akim Demaille <akim@epita.fr>
3807
3808 * src/Makefile.am (BUILT_SOURCES): Fix the trailing backslash.
3809
3810 2006-06-06 Akim Demaille <akim@epita.fr>
3811
3812 Extract the parsing of user actions from the grammar scanner.
3813 As a consequence, the relation between the grammar scanner and
3814 parser is much simpler. We can also split "composite tokens" back
3815 into simple tokens.
3816 * src/gram.h (ITEM_NUMBER_MAX, RULE_NUMBER_MAX): New.
3817 * src/scan-gram.l (add_column_width, adjust_location): Move to and
3818 rename as...
3819 * src/location.h, src/location.c (add_column_width)
3820 (location_compute): these.
3821 Fix the column count: the initial column is 0.
3822 (location_print): Be robust to ending column being 0.
3823 * src/location.h (boundary_set): New.
3824 * src/main.c: Adjust to scanner_free being renamed as
3825 gram_scanner_free.
3826 * src/output.c: Include scan-code.h.
3827 * src/parse-gram.y: Include scan-gram.h and scan-code.h.
3828 Use boundary_set.
3829 (PERCENT_DESTRUCTOR, PERCENT_PRINTER, PERCENT_INITIAL_ACTION)
3830 (PERCENT_LEX_PARAM, PERCENT_PARSE_PARAM): Remove the {...} part,
3831 which is now, again, a separate token.
3832 Adjust all dependencies.
3833 Whereever actions with $ and @ are used, use translate_code.
3834 (action): Remove this nonterminal which is now useless.
3835 * src/reader.c: Include assert.h, scan-gram.h and scan-code.h.
3836 (grammar_current_rule_action_append): Use translate_code.
3837 (packgram): Bound check ruleno, itemno, and rule_length.
3838 * src/reader.h (gram_in, gram__flex_debug, scanner_cursor)
3839 (last_string, last_braced_code_loc, max_left_semantic_context)
3840 (scanner_initialize, scanner_free, scanner_last_string_free)
3841 (gram_out, gram_lineno, YY_DECL_): Move to...
3842 * src/scan-gram.h: this new file.
3843 (YY_DECL): Rename as...
3844 (GRAM_DECL): this.
3845 * src/scan-code.h, src/scan-code.l, src/scan-code-c.c: New.
3846 * src/scan-gram.l (gram_get_lineno, gram_get_in, gram_get_out):
3847 (gram_get_leng, gram_get_text, gram_set_lineno, gram_set_in):
3848 (gram_set_out, gram_get_debug, gram_set_debug, gram_lex_destroy):
3849 Move these declarations, and...
3850 (obstack_for_string, STRING_GROW, STRING_FINISH, STRING_FREE):
3851 these to...
3852 * src/flex-scanner.h: this new file.
3853 * src/scan-gram.l (rule_length, rule_length_overflow)
3854 (increment_rule_length): Remove.
3855 (last_braced_code_loc): Rename as...
3856 (gram_last_braced_code_loc): this.
3857 Adjust to the changes of the parser.
3858 Move all the handling of $ and @ into...
3859 * src/scan-code.l: here.
3860 * src/scan-gram.l (handle_dollar, handle_at): Remove.
3861 (handle_action_dollar, handle_action_at): Move to...
3862 * src/scan-code.l: here.
3863 * src/Makefile.am (bison_SOURCES): Add flex-scanner.h,
3864 scan-code.h, scan-code-c.c, scan-gram.h.
3865 (EXTRA_bison_SOURCES): Add scan-code.l.
3866 (BUILT_SOURCES): Add scan-code.c.
3867 (yacc): Be robust to white spaces.
3868
3869 * tests/conflicts.at, tests/input.at, tests/reduce.at,
3870 * tests/regression.at: Adjust the column numbers.
3871 * tests/regression.at: Adjust the error message.
3872
3873 2006-06-06 Joel E. Denny <jdenny@ces.clemson.edu>
3874
3875 * src/getargs.c (usage): Mention GLR not just LALR(1) in --help output.
3876 Use Akim's wording from
3877 <http://lists.gnu.org/archive/html/bison-patches/2006-05/msg00056.html>.
3878
3879 2006-06-06 Joel E. Denny <jdenny@ces.clemson.edu>
3880
3881 Between Bison releases, manually append `+' to the previous Bison
3882 release number, and use that as a signal to automatically print the
3883 ChangeLog's CVS Id keyword from --version. Discussed starting at
3884 <http://lists.gnu.org/archive/html/bison-patches/2006-05/msg00028.html>.
3885 * ChangeLog: Add Id header.
3886 * configure.ac (AC_INIT): Append `+' to `2.3'.
3887 * src/.cvsignore: Add revision.c.
3888 * src/Makefile.am (bison_SOURCES): Add revision.c and revision.h.
3889 (BUILT_SOURCES): Add revision.c.
3890 (revision.c): New target rule. This file defines a new global variable
3891 named revision. It initializes it with either the Id from ChangeLog
3892 or, if VERSION doesn't contain `+', with the empty string.
3893 * src/getargs.c (version): Print the value of revision.
3894 * src/revision.h: Extern revision.
3895
3896 2006-06-05 Paul Eggert <eggert@cs.ucla.edu>
3897
3898 * NEWS: Version 2.3.
3899 * configure.ac (AC_INIT): Likewise.
3900
3901 2006-05-30 Paul Eggert <eggert@cs.ucla.edu>
3902
3903 * data/glr.c (YYRECOVERING): Define to be a function-like macro
3904 with no arguments, not as an object-like macro. This is for
3905 compatibility with data/yacc.c. Problem reported by John P. Hartmann in
3906 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00059.html>.
3907 * doc/bison.texinfo (Action Features, Error Recovery, Table of Symbols):
3908 Document this.
3909
3910 2006-05-30 Joel E. Denny <jdenny@ces.clemson.edu>
3911
3912 * src/getargs.c (usage): Back out yesterday's modification of the
3913 --help output so that we don't have to wait for translation before
3914 releasing 2.3.
3915
3916 2006-05-29 Paul Eggert <eggert@cs.ucla.edu>
3917
3918 * doc/bison.texinfo (Introduction): Don't say "GLR grammar".
3919 Problem reported by Akim Demaille.
3920
3921 2006-05-29 Joel E. Denny <jdenny@ces.clemson.edu>
3922
3923 * src/getargs.c (usage): Mention GLR not just LALR(1) in --help output.
3924
3925 2006-05-26 Paul Eggert <eggert@cs.ucla.edu>
3926
3927 * data/yacc.c (yy_reduce_print): Omit trailing white space in
3928 generated source code. Problem reported by Frans Englich in
3929 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00049.html>.
3930
3931 2006-05-22 Paul Eggert <eggert@cs.ucla.edu>
3932
3933 * Makefile.maint (gzip_rsyncable, GZIP_ENV): Compute within the
3934 shell, not within 'make', so that 'make' by an ordinary builder
3935 (using GNU make) does not worry about configuring gzip. This also
3936 works around a bug reported independently by Keith Thompson and by
3937 Georg Schwarz, whereby gzip 1.2.4 --help would output usage on
3938 stderr rather than stdout, messing up the build logs.
3939
3940 2006-05-21 Joel E. Denny <jdenny@ces.clemson.edu>
3941
3942 * data/yacc.c (yyparse): Wrap the final return from yyparse inside YYID
3943 to make sure that YYID will never be unused. This fixes a 'make
3944 maintainer-check' failure caused by the recent changes to the 'Trivial
3945 grammars' test case, which caused g++ 4.1.0 to complain that YYID was
3946 not used.
3947 * data/glr.c (yyparse): Wrap yyparse's return inside YYID just in case.
3948
3949 2006-05-21 Joel E. Denny <jdenny@ces.clemson.edu>
3950
3951 * data/glr.c (yyresolveLocations): Remove bogus YYASSERT that the
3952 state before an empty RHS is always resolved here. Only the location
3953 of that state is guaranteed to be resolved, and that's enough. This
3954 fixes the remaining bug reported by Derek M. Jones in
3955 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00027.html>.
3956 * tests/glr-regression.at (Uninitialized location when reporting
3957 ambiguity): Test the above case.
3958 Also, the embedded comments in this test case claim it checks the case
3959 of an empty RHS that has inherited the initial location. However, the
3960 corresponding LHS was already resolved, so yyresolveLocations didn't
3961 actually have reason to modify it. Fix this by forcing
3962 nondeterministic operation at the beginning of the parse.
3963
3964 2006-05-20 Paul Eggert <eggert@cs.ucla.edu>
3965
3966 * data/c.m4 (b4_yy_symbol_print_generate):
3967 (b4_yy_symbol_print_generate): Use 'YYSTYPE const' rather than
3968 'const YYSTYPE', and similarly for YYLTYPE. This fixes one
3969 of the bugs reported today by Derek M Jones in
3970 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00027.html>.
3971 * doc/bison.texinfo (Value Type): Document that YYSTYPE must be
3972 defined to be a type name without parens or brackets.
3973 (Location Type): Similarly for YYLTYPE.
3974 * tests/regression.at (Trivial grammars): Put in a test for this
3975 bug that will be caught by 'make maintainer-check' (though not,
3976 alas, by 'make check' unless your compiler is picky).
3977
3978 2006-05-19 Paul Eggert <eggert@cs.ucla.edu>
3979
3980 * NEWS: Version 2.2.
3981 * configure.ac (AC_INIT): Likewise.
3982
3983 2006-05-17 Joel E. Denny <jdenny@ces.clemson.edu>
3984
3985 * data/glr.c (yyreportTree): Make room in yystates for the state
3986 preceding the RHS. This fixes the segmentation fault reported by Derek
3987 M. Jones in
3988 <http://lists.gnu.org/archive/html/help-bison/2006-05/msg00035.html>.
3989 (yyreportTree, yypdumpstack): Subtract 1 from yyrule before printing
3990 to the user. Reported for yyreportTree by Derek M. Jones later in the
3991 same thread.
3992 * THANKS: Add Derek M. Jones.
3993 Update my email address.
3994 Fix typo in Steve Murphy's name.
3995
3996 2006-05-14 Paul Eggert <eggert@cs.ucla.edu>
3997
3998 * data/glr.c (yyreportSyntaxError): Fix off-by-one error in
3999 checking against YYLAST that caused the parser to miss a potential
4000 alternative in its diagnostic.
4001 Problem reported by Maria Jose Moron Fernandez in
4002 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00024.html>.
4003 * data/lalr1.cc (yysyntax_error_): Likewise.
4004 * data/yacc.c (yysyntax_error): Likewise.
4005 * tests/regression.at (_AT_DATA_DANCER_Y): Use static array for
4006 tokens, in case we run into an older C compiler.
4007 (_AT_DATA_EXPECT2_Y, AT_CHECK_EXPECT2): New macros.
4008 Use them to check for the off-by-one error fixed above.
4009
4010 * data/yacc.c (yytnamerr): Fix typo: local var should be of type
4011 YYSIZE_T, not size_t.
4012 * tests/regression.at (Trivial grammars): New test, to catch
4013 the error fixed by the above patch.
4014
4015 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
4016
4017 * doc/bison.texinfo (C++ Bison Interface): Clarify the naming
4018 scheme.
4019 Reported by Steve Murphy.
4020
4021 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
4022
4023 * data/glr.cc, data/lalr1.cc: Using %defines is mandatory.
4024 * data/glr.cc: b4_location_flag is now b4_locations_flag.
4025
4026 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
4027
4028 Implement --trace=m4.
4029 * src/getargs.c (trace_types, trace_args): Accept trace_m4.
4030 * src/output.c (output_skeleton): When set, pass -dV to m4.
4031
4032 Factor the handling of flags in m4.
4033 * src/output.c (prepare): Rename the muscle names debug, defines,
4034 error_verbose to debug_flag, defines_flag, error_verbose_flag.
4035 * data/c.m4: Adjust.
4036 (_b4_define_flag_if, b4_define_flag_if, b4_defines_if): New.
4037 Use b4_define_flag_if to define other b4_FLAG_if macros.
4038 (b4_location_if): As a consequence, rename as...
4039 (b4_locations_if): this, for consistency.
4040 Adjust all the skeletons.
4041
4042 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
4043
4044 * etc/bench.pm: Shorten bench names.
4045
4046 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
4047
4048 * src/output.h, src/output.c (error_verbose): Move to...
4049 * src/getargs.h, src/getargs.c: here.
4050 Sort the flags.
4051 Adjust dependencies.
4052
4053 2006-05-13 Paul Eggert <eggert@cs.ucla.edu>
4054
4055 * data/c.m4 (b4_copyright): Put the special exception for Bison
4056 skeletons here, so we don't have to put it in each skeleton. All
4057 uses changed. Suggested by Akim Demaille. Also, wrap the
4058 copyright notice, in case it is longer than 80 columns. Replace
4059 comma by newline after title.
4060
4061 2006-05-11 Paul Eggert <eggert@cs.ucla.edu>
4062
4063 * doc/bison.texinfo (Calc++ Scanner): The flex behavior is an
4064 incompatibility, not a bug. Mention that it wasn't fixed as of
4065 flex 2.5.33.
4066
4067 2006-05-11 Akim Demaille <akim@lrde.epita.fr>
4068
4069 * examples/extexi: Enforce the precedence of concatenation over
4070 >>.
4071 Reported by Tommy Nordgren.
4072
4073 2006-05-11 Akim Demaille <akim@lrde.epita.fr>
4074
4075 * data/lalr1.cc (yytranslate_): Rename token as t to avoid clashes
4076 with the member "token".
4077 Reported by Martin Nylin.
4078
4079 2006-05-08 Paul Eggert <eggert@cs.ucla.edu>
4080
4081 * data/glr.c: Switch to Bison 2.2 special-exception language in
4082 the copyright notice. Use more-regular format for titles and
4083 copyright notices.
4084 * data/glr.cc: Likewise.
4085 * data/location.cc: Likewise.
4086 * data/yacc.cc: Likewise.
4087 * doc/bison.texinfo (Conditions): Document this.
4088 * NEWS: likewise. Upgrade version to 2.2.
4089
4090 2006-04-27 Akim Demaille <akim@lrde.epita.fr>
4091
4092 * data/glr.cc: Remove dead code.
4093
4094 2006-04-25 Paul Eggert <eggert@cs.ucla.edu>
4095
4096 * bootstrap: Comment out the AM_CPPFLAGS line, since we don't use
4097 that variable and the line breaks the bootstrap. Problem reported
4098 by Juan M. Guerrero.
4099
4100 2006-04-24 Akim Demaille <akim@lrde.epita.fr>
4101
4102 * doc/bison.texinfo (Multiple start-symbols): New.
4103
4104 2006-04-24 Akim Demaille <akim@lrde.epita.fr>
4105
4106 * etc/README, etc/bench.pl: New.
4107
4108 2006-04-03 Akim Demaille <akim@lrde.epita.fr>
4109
4110 * src/scan-gram.l: Be robust to BRACED_CODE appearing before any
4111 rule.
4112 Reported by Mickael Labau.
4113 * tests/input.at (Torturing the Scanner): Test it.
4114
4115 2006-03-16 Paul Eggert <eggert@cs.ucla.edu>
4116
4117 * doc/bison.texinfo (Decl Summary): Don't mention yylloc twice.
4118 Problem reported by Bob Rossi.
4119
4120 2006-03-13 Paul Eggert <eggert@cs.ucla.edu>
4121
4122 * doc/bison.texinfo: Remove @shorttitlepage stuff; it wasn't used
4123 and didn't really work.
4124 For the index, use @ifnotinfo, not @iftex.
4125 Minor cleanups of spacing and terminology.
4126
4127 2006-03-12 Akim Demaille <akim@lrde.epita.fr>
4128
4129 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Fix the definition
4130 of AT_NAME_PREFIX when %name-prefix is not used.
4131
4132 2006-03-12 Akim Demaille <akim@lrde.epita.fr>
4133
4134 Apply --prefix to C++ skeletons too: they change the namespace.
4135 The test suite already exercize these cases.
4136 * data/c++.m4 (b4_namespace): New.
4137 * data/lalr1.cc, data/glr.cc, data/location.cc: Use it instead of `yy'.
4138 * data/lalr1.cc (yytnameerr_): Move its definition into the namespace.
4139 * data/yacc.c, data/glr.c: Remove a useless `[]'.
4140 * doc/bison.texinfo: Document it.
4141 (Option Cross Key): Use @multitable in all formats. It looks
4142 nicer, even in TeX outputs.
4143 (Rules): Use the same code whatever the output type is.
4144 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS)
4145 (_AT_BISON_OPTION_POPDEFS): Support AT_NAME_PREFIX.
4146 * tests/calc.at: Use it, instead of hard coding `yy'.
4147
4148 2006-03-10 Akim Demaille <akim@lrde.epita.fr>
4149
4150 * TODO: Remove dead items.
4151
4152 2006-03-10 Akim Demaille <akim@lrde.epita.fr>
4153
4154 * doc/FAQ: Remove, merged into...
4155 * doc/bison.texinfo (FAQ): this.
4156 * doc/Makefile.am (EXTRA_DIST): Adjust.
4157
4158 2006-03-10 Akim Demaille <akim@lrde.epita.fr>
4159
4160 * data/c.m4 (b4_token_enum): Always define the enum of tokens,
4161 even if empty.
4162 * data/lalrl1.cc, data/glr.cc (parser::token_type): New.
4163 * doc/bison.texinfo (Calc++ Scanner): Use it.
4164
4165 2006-03-09 Paul Eggert <eggert@cs.ucla.edu>
4166
4167 Fix two nits reported by twlevo, plus one more that I discovered.
4168
4169 * src/assoc.h (assoc_to_string): Give a name to the arg, as
4170 this is the usual Bison style.
4171 * src/location.h (location_print): Likewise.
4172
4173 * src/reader.h (token_name): Likewise.
4174
4175 2006-03-08 Paul Eggert <eggert@cs.ucla.edu>
4176
4177 Fix some nits reported by twlevo.
4178 * doc/FAQ: Remove ancient Y2K FAQ, replacing it with "secure"
4179 and "POSIX". Use more-modern syntax for URLs. Mention C++
4180 and ask for Java. Don't hardwire OS version numbers. Add
4181 copyright notice.
4182 * m4/.cvsignore: Add unistd_h.m4, for latest gnulib.
4183 * src/conflicts.c (solved_conflicts_obstack): Now static.
4184
4185 2006-03-08 Joel E. Denny <jdenny@ces.clemson.edu>
4186
4187 * doc/bison.texinfo (Introduction): Mention GLR and C++ as on the web
4188 page. Say "you can use it" not "you may use it" as on the web page;
4189 we're describing capabilities not granting permission.
4190
4191 2006-03-06 Paul Eggert <eggert@cs.ucla.edu>
4192
4193 * data/glr.c (yyresolveLocations): Rename local variables to avoid
4194 shadowing warnings. Use usual patter for iterating through RHS.
4195 * tests/glr-regression.at
4196 (Uninitialized location when reporting ambiguity):
4197 Modify yylex so that it uses its argument, rather than trying
4198 to rely on ARGSUSED (which doesn't work for gcc with warnings).
4199 const char -> char const.
4200
4201 * tests/Makefile.am ($(srcdir)/package.m4, maintainer-check-valgrind):
4202 Don't use tabs inside commands; it messes up 'ps'.
4203 Problem reported by twlevo.
4204
4205 2006-03-06 Joel E. Denny <jdenny@ces.clemson.edu>
4206
4207 * tests/glr-regression.at (Uninitialized location when reporting
4208 ambiguity): New test case.
4209 * data/glr.c (yyresolveLocations): New function, which uses
4210 YYLLOC_DEFAULT.
4211 (yyresolveValue): Invoke yyresolveLocations before reporting an
4212 ambiguity.
4213 * doc/bison.texinfo (Default Action for Locations): Note
4214 YYLLOC_DEFAULT's usage for ambiguity locations.
4215 (GLR Semantic Actions): Cross-reference those notes.
4216
4217 2006-03-04 Joel E. Denny <jdenny@ces.clemson.edu>
4218
4219 * tests/glr-regression.at (Leaked semantic values when reporting
4220 ambiguity): Remove unnecessary union and type declarations.
4221 (Leaked lookahead after nondeterministic parse syntax error): New test
4222 case.
4223 * data/glr.c (yyparse): Check for zero stacks remaining before
4224 attempting to shift the lookahead so that you don't lose it.
4225
4226 2006-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
4227
4228 Avoid memory leaks by not invoking longjmp in yyreportAmbiguity.
4229 * tests/glr-regression.at (Leaked semantic values when reporting
4230 ambiguity): New test case.
4231 * data/glr.c (yyreportAmbiguity): Invoke yyyerror directly and return
4232 yyabort rather than invoking yyFail, which invokes longjmp. Remove the
4233 now unnecessary yystackp parameter.
4234 (yyresolveValue): Return yyreportAmbiguity's result. Now the necessary
4235 destructors can be called.
4236
4237 * tests/glr-regression.at: Don't invoke bison with `-t' unnecessarily
4238 in existing testcases.
4239
4240 2006-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
4241
4242 Don't leak semantic values for parent RHS when a user action cuts the
4243 parser, and clean up related code a bit.
4244 * tests/glr-regression.at (Leaked merged semantic value if user action
4245 cuts parse): Rename to...
4246 (Leaked semantic values if user action cuts parse): ... this. Add check
4247 for leaked parent RHS values.
4248 * data/glr.c (yydestroyGLRState): In debugging output, distinguish
4249 between an unresolved state (non-empty chain of semantic options) and
4250 an incomplete one (signaled by an empty chain).
4251 (yyresolveStates): Document the interface. Move all manipulation of a
4252 successfully or unsuccessfully resolved yyGLRState to...
4253 (yyresolveValue): ... here so that yyresolveValue always leaves a
4254 yyGLRState with consistent data and thus is easier to understand.
4255 Remove the yyvalp and yylocp parameters since they are always just
4256 taken from the yys parameter. When reporting a discarded merged value
4257 in debugging output, note that it is incompletely merged. Document the
4258 interface.
4259 (yyresolveAction): If resolving any of the RHS states fails, destroy
4260 them all rather than leaking them. Thus, as long as user actions are
4261 written to clean up the RHS correctly, yyresolveAction always cleans up
4262 the RHS of a semantic option. Document the interface.
4263
4264 2006-02-27 Paul Eggert <eggert@cs.ucla.edu>
4265
4266 * data/glr.c (yyexpandGLRStack): Catch an off-by-one error that
4267 led to a segmentation fault in GNU Pascal. Problem reported
4268 by Waldek Hebisch.
4269
4270 2006-02-21 Joel E. Denny <jdenny@ces.clemson.edu>
4271
4272 * doc/bison.texinfo (Mid-Rule Actions): Explain how to bury a
4273 mid-rule action inside a nonterminal symbol in order to declare a
4274 destructor for its semantic value.
4275
4276 2006-02-16 Paul Eggert <eggert@cs.ucla.edu>
4277
4278 * data/yacc.c [(! defined yyoverflow || YYERROR_VERBOSE) && !
4279 YYSTACK_USE_ALLOCA && ! defined YYSTACK_ALLOC && defined
4280 __cplusplus && ! defined _STDLIB_H && !
4281 ((defined YYMALLOC || defined malloc) && (defined YYFREE ||
4282 defined free))]: Include <stdlib.h> rather than rolling our own
4283 declarations of malloc and free, to avoid problems with
4284 incompatible declarations (using 'throw') C++'s stdlib.h. This
4285 should fix Debian bug 340012
4286 <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=340012>,
4287 reported by Guillaume Melquiond.
4288
4289 2006-02-13 Paul Eggert <eggert@cs.ucla.edu>
4290
4291 * NEWS: Clarify symbols versus types in unused-value warnings.
4292
4293 * configure.ac (AC_INIT): Bump version number.
4294
4295 2006-02-13 Paul Eggert <eggert@cs.ucla.edu>
4296
4297 * NEWS: Version 2.1a.
4298 * tests/headers.at (AT_TEST_CPP_GUARD_H): Declare yyerror and yylex,
4299 since C99 requires this.
4300
4301 2006-02-11 Paul Eggert <eggert@cs.ucla.edu>
4302
4303 * m4/c-working.m4: New file.
4304 * configure.ac (BISON_TEST_FOR_WORKING_C_COMPILER): Use it.
4305
4306 2006-02-10 Paul Eggert <eggert@cs.ucla.edu>
4307
4308 * Makefile.maint: Merge from coreutils.
4309
4310 2006-02-09 Paul Eggert <eggert@cs.ucla.edu>
4311
4312 More portability fixes for problems summarized by Nelson H. F. Beebe.
4313
4314 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Catch a
4315 configuration screwup "./configure CC=/opt/SUNWspro/bin/c89
4316 CFLAGS="-xarch=generic64" CXX=/opt/SUNWspro/bin/CC
4317 LDFLAGS="-xarch=generic64" with Sun C 5.7 on Solaris 10; this
4318 messes up because C++ code is compiled in 32-bit mode but linked
4319 in 64-bit mode.
4320
4321 2006-02-08 Paul Eggert <eggert@cs.ucla.edu>
4322
4323 More portability fixes for problems summarized by Nelson H. F. Beebe.
4324
4325 * doc/bison.texinfo (Calc++ Scanner): Work around a bug in flex
4326 2.5.31. This resembles the 2005-10-10 patch to src/scan-skel.l.
4327
4328 * examples/calc++/Makefile.am (check_PROGRAMS): Renamed from
4329 nodist_PROGRAMS, since we don't need to actually compile the
4330 example if we're just doing a plain 'make'. This avoids bothering
4331 the installer unnecessarily about problems due to weird C++
4332 compilers.
4333
4334 2006-02-06 Paul Eggert <eggert@cs.ucla.edu>
4335
4336 More portability fixes for problems summarized by Nelson H. F. Beebe.
4337
4338 * tests/headers.at (AT_TEST_CPP_GUARD_H): Use #include <...> rather
4339 than #include "...", and compile with -I'.'. The old method was
4340 not portable, according to Posix and the C standard, and it does
4341 not work with Sun C 5.7, where previous #line directives affect
4342 the working directory used in later #include "..." directives.
4343
4344 2006-02-06 Juan Manuel Guerrero <juan.guerrero@gmx.de>
4345
4346 Various DJGGP specific issues in /djgpp
4347
4348 2006-02-02 Paul Eggert <eggert@cs.ucla.edu>
4349
4350 More portability fixes for problems summarized by Nelson H. F. Beebe.
4351
4352 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check that
4353 '#include <map>' works and that you can apply ++ to iterators.
4354
4355 2006-02-01 Paul Eggert <eggert@cs.ucla.edu>
4356
4357 Work around portability problems summarized by Nelson H. F. Beebe in
4358 <http://lists.gnu.org/archive/html/bug-bison/2005-09/msg00021.html>.
4359
4360 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check
4361 that '#include <string>' works.
4362
4363 * data/lalr1.cc (yytranslate_): No longer inline, to work around a
4364 porting problem to g++ 3.4.3 on Darwin 7.9.0, where g++ complained
4365 "warning: sorry: semantics of inline function static data `const
4366 unsigned char translate_table[262]' are wrong (you'll wind up with
4367 multiple copies)".
4368
4369 * lib/bbitset.h (struct bitset_vtable): Rename members not, and,
4370 or, xor to not_, and_, or_, and xor_, respectively. This works
4371 around a bug in GCC 3.4.3 on Irix 6.5, which apparently has a
4372 random system header somewhere that includes the equivalent of
4373 <iso646.h>.
4374
4375 * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that "$CC
4376 -E" works; it apparently doesn't work with PathScale EKO Compiler
4377 Suite Version 2.0.
4378
4379 2006-01-30 Joel E. Denny <jdenny@ces.clemson.edu>
4380
4381 During deterministic GLR operation, user actions should be able to
4382 influence the parse by changing yychar. To make this easier to fix and
4383 to make glr.c easier to evolve in general, don't maintain yytoken in
4384 parallel with yychar; just compute yytoken when needed.
4385 * tests/glr-regression.at (Incorrect lookahead during deterministic
4386 GLR): Check that setting yychar in a user action has the intended
4387 effect.
4388 * data/glr.c (yyGLRStack): Remove yytokenp member.
4389 (yyclearin): Don't set *yytokenp.
4390 (yyprocessOneStack, yyreportSyntaxError, yyrecoverSyntaxError): Examine
4391 yychar rather than *yytokenp to determine the current lookahead.
4392 Compute yytoken locally when needed.
4393 (yyparse): Likewise. Remove the local yytoken that yytokenp used to
4394 point to.
4395
4396 * doc/bison.texinfo (Bison Options): Remove stray sentence fragment
4397 after `--report' documentation.
4398
4399 2006-01-30 Paul Eggert <eggert@cs.ucla.edu>
4400
4401 * src/parse-gram.y (grammar_declaration): Location of printer
4402 symbol is @1, not list->location. Bug reported by twlevo.
4403 * tests/input.at (Incompatible Aliases): Adjust to above change.
4404
4405 2006-01-29 Paul Eggert <eggert@cs.ucla.edu>
4406
4407 * tests/input.at (AT_CHECK_UNUSED_VALUES): Remove. Instead, do
4408 all the test at once. This makes the output easier to read in the
4409 normal case.
4410
4411 Fix a longstanding bug uncovered by bro-0.9a9/src/parse.y, which I
4412 got from <http://bro-ids.org/download.html>. The bug is that
4413 when two actions appeared in succession, the second one was
4414 scanned before the first one was added to the grammar rule
4415 as a midrule action. Bison then output the incorrect warning
4416 "parse.y:905.17-906.36: warning: unused value: $3".
4417 * src/parse-gram.y (BRACED_CODE, action): These are no longer
4418 associated with a value.
4419 (rhs): Don't invoke grammar_current_rule_action_append.
4420 (action): Invoke it here instead.
4421 * src/reader.c (grammar_midrule_action): Now extern.
4422 (grammar_current_rule_action_append): Don't invoke
4423 grammar_midrule_action; that is now the scanner's job.
4424 * src/reader.h (last_string, last_braced_code_loc):
4425 (grammar_midrule_action): New decls.
4426 * src/scan-gram.l (last_string): Now extern, sigh.
4427 (last_braced_code_loc): New extern variable.
4428 (<INITIAL>"{"): Invoke grammar_midrule_action if the current
4429 rule already has an action.
4430 (<SC_BRACED_CODE>"}"): Set last_braced_code_loc before returning.
4431 * tests/input.at (AT_CHECK_UNUSED_VALUES):
4432 Add some tests to check that the above changes fixed the bug.
4433
4434 2006-01-27 Paul Eggert <eggert@cs.ucla.edu>
4435
4436 * src/reader.c (symbol_should_be_used): Renamed from symbol_typed_p.
4437 All used changed. Check whether the symbol has a destructor,
4438 not whether it is typed.
4439 * tests/input.at (AT_CHECK_UNUSED_VALUES): Add a destructor, so
4440 that the values are still reported as unused. All line numbers
4441 adjusted.
4442
4443 2006-01-23 Paul Eggert <eggert@cs.ucla.edu>
4444
4445 Work around a bug in bro 0.8, which underparenthesizes its
4446 definition of YYLLOC_DEFAULT.
4447 * data/glr.c: Change all uses of YYLLOC_DEFAULT to parenthesize
4448 their arguments.
4449 * data/lalr1.cc: Likewise.
4450 * data/yacc.cc: Likewise.
4451
4452 2006-01-22 Paul Eggert <eggert@cs.ucla.edu>
4453
4454 Work around a bug in Pike 7.0, and give the Pike folks a
4455 better way to override the usual int widths.
4456 * data/yacc.c (b4_int_type): Use yytype_uint8, etc., so that the
4457 user can override the types.
4458 (short): #undef, to work around a bug in Pike 7.0.
4459 (yytype_uint8, yytype_int8, yytype_uint16, yytype_int16): New types.
4460 (union yyalloc.yyss): Use yytype_int16 rather than short.
4461 All uses changed.
4462 (yysigned_char): Remove.
4463 * src/parse-gram.y (YYTYPE_UINT8, YYTYPE_INT8, YYTYPE_UINT16):
4464 (YYTYPE_INT16): New macros, to test the new facility in yacc.c.
4465 * tests/regression.at (Web2c Actions): Adjust to above changes.
4466
4467 * src/reader.c (check_and_convert_grammar): New function.
4468 (reader): Close the input file even if something went wrong during
4469 parsing. Minor file descriptor leak reported by twlevo.
4470
4471 * src/assoc.c (assoc_to_string): Use a default: abort (); case
4472 to pacify gcc -Wswitch-default.
4473 * src/scan-gram.l (adjust_location): Use a default: break; case
4474 to pacify gcc -Wswitch-default.
4475 * src/scan-skel.h (skel_get_lineno, skel_get_in, skel_get_out):
4476 (skel_get_leng, skel_get_text, skel_set_lineno, skel_set_in):
4477 (skel_set_out, skel_get_debug, skel_set_debug, skel_lex_destroy):
4478 Move these decls to scan-skel.l, since they don't need to be
4479 visible elsewhere.
4480 * src/scan-skel.l: Accept the above decls.
4481 (skel_lex): New decl, to pacify GCC when unpatched flex 2.5.31
4482 is used.
4483
4484 2006-01-21 Paul Eggert <eggert@cs.ucla.edu>
4485
4486 * Makefile.cfg (local-checks-to-skip): Add changelog-check,
4487 since we don't want to insist on a version number at the start
4488 of the changelog every time.
4489 * Makefile.maint: Sync from coreutils a bit better.
4490 (sc_trailing_blank): Renamed from sc_trailing_space.
4491 All uses changed.
4492 (sc_no_if_have_config_h, sc_require_config_h):
4493 (sc_prohibit_assert_without_use): New rules.
4494 (sc_obsolete_symbols): Don't catch Makefile.maint itself.
4495 (sc_dd_max_sym_length): Fix leading spaces in rule.
4496 (sc_system_h_headers): Prefix with @.
4497 (sc_useless_cpp_parens, m4-check): Output line numbers.
4498 (changelog-check): Allow version only in head.
4499 * data/c.m4: Use "defined FOO" instead of "defined (FOO)", to
4500 satisfy new Makefile.maint rule.
4501 * data/glr.c: Likewise.
4502 * data/glr.cc: Likewise.
4503 * data/lalr1.cc: Likewise.
4504 * data/yacc.c: Likewise.
4505 * lib/ebitsetv.c: Likewise.
4506 * lib/lbitset.c: Likewise.
4507 * lib/subpipe.c: Likewise.
4508 * lib/timevar.c: Likewise.
4509 * src/system.h: Likewise.
4510 * data/yacc.c (YYSTYPE): Don't generate trailing spaces in output.
4511 * djgpp/Makefile.maint: Add copyright notice.
4512 * djgpp/README.in: Likewise.
4513 * djgpp/config.bat: Likewise.
4514 * djgpp/config.site: Likewise.
4515 * djgpp/config_h.sed: Likewise.
4516 * djgpp/djunpack.bat: Likewise.
4517 * djgpp/config.sed: Fix copyright notice to match standard format.
4518 * djgpp/subpipe.h: Likewise.
4519 * lib/bitsetv-print.c: Likewise.
4520 * lib/bitsetv.c: Likewise.
4521 * lib/subpipe.h: Likewise.
4522 * lib/timevar.c: Likewise.
4523 * lib/timevar.h: Likewise.
4524 * djgpp/subpipe.c: Use standard recipe for config.h.
4525 * lib/abitset.c: Likewise.
4526 * lib/bitset.c: Likewise.
4527 * lib/bitset_stats.c: Likewise.
4528 * lib/bitsetv-print.c: Likewise.
4529 * lib/bitsetv.c: Likewise.
4530 * lib/ebitsetv.c: Likewise.
4531 * lib/get-errno.c: Likewise.
4532 * lib/lbitset.c: Likewise.
4533 * lib/subpipe.c: Likewise.
4534 * lib/timevar.c: Likewise.
4535 * lib/vbitset.c: Likewise.
4536 * tests/local.at: Likewise.
4537 * src/scan-gram.l: Don't include verify.h, since system.h does
4538 that for us.
4539 * .x-sc_require_config_h: New file.
4540 * .x-sc_unmarked_diagnostics: New file.
4541
4542 2006-01-20 Paul Eggert <eggert@cs.ucla.edu>
4543
4544 Be a bit more systematic about using 'abort'.
4545 * lib/abitset.c (abitset_test): Remove ATTRIBUTE_UNUSED; not needed.
4546 * lib/bitset.c (bitset_bytes, bitset_init, bitset_op4_cmp):
4547 Put 'default: abort ();' before some other case, to satisfy older
4548 pedantic compilers.
4549 * lib/bitset_stats.c (bitset_stats_init): Likewise.
4550 * lib/ebitset.c (ebitset_elt_find, ebitset_op3_cmp): Likewise.
4551 * lib/lbitset.c (lbitset_elt_find, lbitset_op3_cmp): Likewise.
4552 * src/conflicts.c (resolve_sr_conflict): Likewise.
4553 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str):
4554 (get_decision_str, get_orientation_str, get_node_alignment_str):
4555 (get_arrow_mode_str, get_crossing_type_str, get_view_str):
4556 (get_linestyle_str, get_arrowstyle_str): Likewise.
4557 * src/conflicts.c (resolve_sr_conflict):
4558 Use a default case rather than one for the one remaining enum
4559 value, to catch invalid enum values as well.
4560 * src/lalr.c (set_goto_map, map_goto):
4561 Prefer "assert (FOO);" to "if (!FOO) abort ();".
4562 * src/nullable.c (nullable_compute, token_definitions_output):
4563 Likewise.
4564 * src/reader.c (packgram, reader): Likewise.
4565 * src/state.c (transitions_to, state_new, state_reduction_find):
4566 Likewise.
4567 * src/symtab.c (symbol_user_token_number_set, symbol_make_alias):
4568 (symbol_pack): Likewise.
4569 * src/tables.c (conflict_row, pack_vector): Likewise.
4570 * src/scan-skel.l (QPUTS): Remove unnecessary parens.
4571 (BASE_QPUTS, "@output ".*\n): Remove unnecessary asserts.
4572 * src/system.h: Don't include <assert.h>.
4573 (assert): New macro.
4574
4575 * doc/bison.texinfo (Prologue, Rules, Actions, Union Decl, Action Decl):
4576 (Destructor Decl, Parser Function, Pure Calling):
4577 Describe rules for braces inside C code more carefully.
4578
4579 2006-01-19 Paul Eggert <eggert@cs.ucla.edu>
4580
4581 Fix some porting glitches found by Nelson H. F. Beebe.
4582 * lib/abitset.c (abitset_resize): Rewrite to avoid warnings from
4583 compilers that don't understand that abort () does not return.
4584 * src/state.c (transitions_to): Likewise.
4585 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check
4586 that '#include <cstdlib>' works.
4587 * src/system.h (INT8_MIN, INT16_MIN, INT32_MIN, INT8_MAX):
4588 (INT16_MAX, UINT8_MAX, INT32_MAX, UINT16_MAX, UINT32_MAX):
4589 #undef if ! defined __STDC_VERSION__ || __STDC_VERSION__ < 199901,
4590 for the benefit of some pre-C99 compilers.
4591
4592 * bootstrap: Undo changes to gnulib files that autoreconf made.
4593
4594 Minor fixups to get 'make maintainer-check' to work.
4595 * configure.ac: Don't use -Wnested-externs, as it's incompatible
4596 with the new verify.h implementation.
4597 * data/c.m4 (b4_yy_symbol_print_generate): YYUSE (yyoutput).
4598 * data/glr.c (YYUSE): Depend on __GNUC__ as well.
4599 * data/yacc.c (YYUSE): Likewise.
4600 * data/lalr1.cc (yysyntax_error_): YYUSE (yystate).
4601 * lib/subpipe.c (end_of_output_subpipe): The args are unused.
4602 * src/parse-gram.y (declaration): Don't pass a string constant
4603 to a function that expects char *, since GCC might complain
4604 about the constant value.
4605 * src/reader.c (symbol_typed_p): Add parens to pacify GCC.
4606 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): #undef yylloc and yylval
4607 before #defining them.
4608 * tests/glr-regression.at
4609 (Incorrectly initialized location for empty right-hand side in GLR):
4610 In yyerror, use the msg arg.
4611 (Corrupted semantic options if user action cuts parse):
4612 (Incorrect lookahead during deterministic GLR):
4613 (Incorrect lookahead during nondeterministic GLR):
4614 Don't name a local var 'index'; it shadows string.h's 'index'.
4615
4616 2006-01-19 Akim Demaille <akim@epita.fr>
4617
4618 * tests/calc.at (_AT_DATA_CALC_Y): Initialize the whole initial
4619 location, not just parts of it.
4620
4621 2006-01-18 Paul Eggert <eggert@cs.ucla.edu>
4622
4623 * NEWS: Document the fact that multiple %unions are now allowed.
4624 * doc/bison.texinfo (Union Decl): Likewise.
4625 * TODO: This feature is now implemented, so remove it from
4626 the wishlist.
4627
4628 * Makefile.maint: Merge with coreutils Makefile.maint.
4629 (CVS_LIST): Use build-aux version if available.
4630 (VERSION_REGEXP): New macro.
4631 (syntax-check-rules): Add sc_no_if_have_config_h,
4632 sc_prohibit_assert_without_use, sc_require_config_h,
4633 sc_useless_cpp_parens.
4634 (sc_obsolete_symbols): Check for O_NDELAY.
4635 (sc_dd_max_sym_length): Track coreutils.
4636 (sc_unmarked_diagnostics): Look in all files, not just *.c.
4637 (sc_useless_cpp_parens): New rule.
4638 (news-date-check): Look for version or today's date.
4639 (changelog-check): Don't require version number near head.
4640 (copyright-check): Use current year instead of hardwiring 2005.
4641 (my-distcheck): Depend on $(release_archive_dir)/$(prev-tgz).
4642 (announcement): Add --gpg-key-ID.
4643
4644 * djgpp/config.sed: Add copyright notice, and replace "filesystem"
4645 with "file system".
4646
4647 Avoid undefined behavior that addressed just before the start of an
4648 array. Problem reported by twlevo.
4649 * src/reader.c (packgram): Prepend a new sentinel before ritem.
4650 * src/lalr.c (build_relations): Rely on new sentinel.
4651 * src/gram.c (gram_free): Adjust to new sentinel.
4652
4653 2006-01-12 Joel E. Denny <jdenny@ces.clemson.edu>
4654
4655 * data/glr.c (yyGLRStateSet): Rename yylookaheadStatuses to
4656 yylookaheadNeeds. All uses updated.
4657 (yysplitStack): Rename local yynewLookaheadStatuses to
4658 yynewLookaheadNeeds.
4659 * data/glr-regression.at (Incorrect lookahead during nondeterministic
4660 GLR): In comments, change `lookahead status' to `lookahead need'.
4661
4662 2006-01-11 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
4663
4664 * data/glr.c (yysplitStack): A little stylistic rewrite.
4665
4666 2006-01-11 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
4667
4668 * data/glr.c (yyaddDeferredAction): Flesh out the comment.
4669
4670 2006-01-11 Joel E. Denny <jdenny@ces.clemson.edu>
4671
4672 * doc/bison.texinfo: Fix some typos.
4673 (GLR Semantic Actions): New subsection discussing special
4674 considerations because GLR semantic actions might be deferred.
4675 (Actions): Mention look-ahead usage of yylval.
4676 (Actions and Locations): Mention look-ahead usage of yylloc.
4677 (Special Features for Use in Actions): Add YYEOF entry and mention it
4678 in the yychar entry.
4679 In the yychar entry, remove mention of the local yychar case (pure
4680 parser) since this is irrelevant information when writing semantic
4681 actions and since it's already discussed in `Table of Symbols' where
4682 yychar is otherwise described as an external variable.
4683 In the yychar entry, don't call it the `current' look-ahead since it
4684 isn't when semantic actions are deferred.
4685 In the yychar and yyclearin entries, add note about deferred semantic
4686 actions.
4687 Add yylloc and yylval entries discussing look-ahead usage.
4688 (Look-Ahead Tokens): When discussing yychar, don't call it the
4689 `current' look-ahead, and do mention yylval and yylloc.
4690 (Error Recovery): Cross-reference `Action Features' when mentioning
4691 yyclearin.
4692 (Table of Symbols): In the yychar entry, don't call it the `current'
4693 look-ahead.
4694 In the yylloc and yylval entries, mention look-ahead usage.
4695
4696 2006-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
4697
4698 * tests/glr-regression.at: Update copyright year to 2006.
4699
4700 2006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
4701
4702 * data/glr.c (yyGLRStateSet): Add yybool* yylookaheadStatuses member to
4703 use during nondeterministic operation to track which stacks have
4704 actually needed the current lookahead.
4705 (yyinitStateSet, yyfreeStateSet, yyremoveDeletes, yysplitStack):
4706 Allocate, deallocate, resize, and otherwise shuffle space for
4707 yylookaheadStatuses in parallel with yystates member of yyGLRStateSet.
4708 (yysplitStack, yyprocessOneStack, yyparse): Set lookahead status
4709 appropriately during nondeterministic operation.
4710 (yySemanticOption): Add int yyrawchar, YYSTYPE yyval, and YYLTYPE yyloc
4711 members to store the current lookahead to be used by the deferred
4712 user action.
4713 (yyaddDeferredAction): Add size_t yyk parameter specifying the stack
4714 from which the RHS is taken. Set the lookahead members of the new
4715 yySemanticOption according to the lookahead status for stack yyk.
4716 (yyglrShiftDefer, yyglrReduce): Pass yyk parameter on to
4717 yyaddDeferredAction.
4718 (yyresolveAction): Set yychar, yylval, and yylloc to the lookahead
4719 members of yySemanticOption before invoking yyuserAction, and then set
4720 them back to their current values afterward.
4721 (yyparse): Set yychar = YYEMPTY where yytoken = YYEMPTY.
4722 (yyreportAmbiguity): Add /*ARGSUSED*/ to pacify lint.
4723 * tests/glr-regression.at: Remove `.' from the ends of recent test case
4724 titles for consistency.
4725 (Leaked merged semantic value if user action cuts parse): In order to
4726 suppress lint warnings, use arguments in merge function, and assign
4727 char value < 128 in main.
4728 (Incorrect lookahead during deterministic GLR): New test case.
4729 (Incorrect lookahead during nondeterministic GLR): New test case.
4730
4731 2006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
4732
4733 * data/c.m4 (b4_yy_symbol_print_generate): In yy_symbol_print, accept
4734 !yyvaluep as signal that no semantic value is available to print.
4735 * data/glr.c (yydestroyGLRState): If state is not resolved, don't try
4736 to print a semantic value.
4737
4738 2006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
4739
4740 * tests/glr-regression.at: For consistency with my newer test cases,
4741 don't thank myself.
4742
4743 2006-01-05 Joel E. Denny <jdenny@ces.clemson.edu>
4744
4745 * data/glr.c (yyresolveValue): When merging semantic options, if at
4746 least one user action succeeds but a later one cuts the parse, then
4747 destroy the semantic value before returning rather than leaking it.
4748 (yyresolveStates): If a user action cuts the parse and thus
4749 yyresolveValue fails, ignore the (unset) semantic value rather than
4750 corrupting the yyGLRState, and empty the semantic options list since
4751 the user actions should have called all necessary destructors.
4752 Simplify code with YYCHK.
4753 * tests/glr-regression.at (Corrupted semantic options if user action
4754 cuts parse): New test case.
4755 (Undesirable destructors if user action cuts parse): New test case.
4756 Before applying any of this patch, this test case never actually failed
4757 for me... but only because the corrupted semantic options usually
4758 masked this bug.
4759 (Leaked merged semantic value if user action cuts parse): New test
4760 case.
4761
4762 2006-01-05 Akim Demaille <akim@epita.fr>
4763
4764 * src/reader.c, src/symlist.h, src/symlist.c: s/mid_rule/midrule/.
4765
4766 2006-01-04 Paul Eggert <eggert@cs.ucla.edu>
4767
4768 * data/c.m4 (b4_c_modern): New macro, with a new provision for
4769 _MSC_VER. Problem reported by Cenzato Marco.
4770 (b4_c_function_def): Use it.
4771 * data/yacc.c (YYMODERN_C): Remove. All uses replaced by
4772 b4_c_modern.
4773 (yystrlen, yystpcpy, yyparse): Use b4_c_function... macros rather
4774 than rolling our own.
4775
4776 2006-01-04 Akim Demaille <akim@epita.fr>
4777
4778 Also warn about non-used mid-rule values.
4779 * src/symlist.h, src/symlist.c (symbol_list): Add a mid_rule
4780 member.
4781 (symbol_list_new): Adjust.
4782 * src/reader.c (symbol_typed_p): New.
4783 (grammar_rule_check): Use it.
4784 (grammar_midrule_action): Bind a mid-rule LHS to its rule.
4785 Check its rule.
4786 * tests/input.at (AT_CHECK_UNUSED_VALUES): New.
4787 Use it.
4788 * tests/actions.at (Exotic Dollars): Adjust.
4789
4790 2006-01-04 Akim Demaille <akim@epita.fr>
4791
4792 * src/reader.c (grammar_midrule_action): If $$ is set in a
4793 mid-rule, move the `used' bit to its lhs.
4794 * tests/input.at (Unused values): New.
4795 * tests/actions.at (Exotic Dollars): Adjust: exp is not typed.
4796
4797 2006-01-03 Paul Eggert <eggert@cs.ucla.edu>
4798
4799 * doc/bison.texinfo (Bison Options): Say more accurately what
4800 --yacc does.
4801 * src/parse-gram.y (rules_or_grammar_declaration): Don't complain
4802 about declarations in the grammar when in Yacc mode, as POSIX does
4803 not require a diagnostic when the grammar uses extensions.
4804
4805 * src/reduce.c (reduce_grammar): Remove unnecessary cast to bool.
4806
4807 Warn about dubious constructions like "%token T T".
4808 Reported by twlevo.
4809 * src/symtab.h (struct symbol.declared): New member.
4810 * src/symtab.c (symbol_new): Initialize it to false.
4811 (symbol_class_set): New arg DECLARING, specifying whether
4812 this is a declaration that we want to warn about, if there
4813 is more than one of them. All uses changed.
4814
4815 * data/glr.c, data/glr.cc, data/lalr1.cc, data/yacc.c:
4816 Allow multiple %union directives, whose contents concatenate.
4817 * src/parse-gram.y (grammar_declaration): Likewise.
4818 Use muscle_code_grow, so that we don't need stype_line any more.
4819 All uses changed.
4820
4821 * src/muscle_tab.c (muscle_grow): Fix comment.
4822
4823 * ChangeLog, data/c.m4, data/glr.c, data/glr.cc, data/location.cc:
4824 * data/yacc.c, src/getargs.c, src/output.c, tests/cxx-type.at:
4825 Update copyright year to 2006.
4826
4827 2006-01-03 Akim Demaille <akim@epita.fr>
4828
4829 Have glr.cc pass (some of) the calc.at tests.
4830 * data/glr.cc (b4_parse_param_orig): New.
4831 (b4_parse_param): Improve its definition, and bound it more
4832 clearly in the skeleton.
4833 (b4_epilogue): Append, instead of prepending, in order to keep
4834 #line consistency.
4835 Simplify the generation of auxiliary functions: locations and
4836 purity are mandated.
4837 (b4_global_tokens_and_yystype): Honor it.
4838 * data/location.cc (c++.m4): Don't include it.
4839 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Define AT_GLR_CC_IF
4840 and AT_SKEL_CC_IF.
4841 * tests/calc.at (AT_CHECK_CALC): Rely on AT_SKEL_CC_IF instead of
4842 AT_LALR1_CC_IF.
4843 Be sure to initialize the first position's filename.
4844 (AT_CHECK_CALC_LALR1_CC): Add %location and %defines, they are
4845 mandated anyway.
4846 (AT_CHECK_CALC_GLR_CC): New.
4847 Use it to exercise glr.cc as a lalr1.cc drop-in replacement.
4848
4849 2006-01-02 Akim Demaille <akim@epita.fr>
4850
4851 * src/output.c (output_skeleton): Don't hard wire the inclusion of
4852 c.m4.
4853 * data/c++.m4, data/glr.c, data/yacc.c: Include c.m4.
4854 * data/glr.cc: Do not include stack.hh.
4855
4856 2006-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
4857
4858 * data/glr.c: Reformat whitespace with tabs.
4859 (b4_lpure_formals): Remove this unused m4 macro.
4860 * tests/cxx-type.at: Reformat whitespace with tabs.
4861 (_AT_TEST_GLR_CXXTYPES): In union Node, rename node_info to nodeInfo
4862 since it's a member. Rename type to isNterm for clarity.
4863
4864 2005-12-29 Akim <akim@sulaco.local>
4865
4866 Let glr.cc catch up with symbol_value_print.
4867 * data/glr.cc (b4_yysymprint_generate): Replace by...
4868 (b4_yy_symbol_print_generate): this.
4869 (yy_symbol_print, yy_symbol_value_print): Declare them.
4870
4871 2005-12-28 Paul Eggert <eggert@cs.ucla.edu>
4872
4873 * src/location.h (boundary): Note that a line or column equal
4874 to INT_MAX indicates an overflow.
4875 * src/scan-gram.l: Include verify.h. Don't include get-errno.h.
4876 (rule_length_overflow, increment_rule_length, add_column_width):
4877 New functions.
4878 (<INITIAL>{id}, <SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'"):
4879 (<SC_BRACED_CODE>"}"):
4880 Use increment_rule_length rather than incrementing it by hand.
4881 (adjust_location, handle_syncline): Diagnose overflow.
4882 (handle_action_dollar, handle_action_at):
4883 Fix bug with monstrosities like $-2147483648.
4884 Remove now-unnecessary checks.
4885 (scan_integer): Verify assumptions and remove now-unnecessary checks.
4886 (convert_ucn_to_byte): Verify assumptions.
4887 (handle_syncline): New arg LOC. All callers changed.
4888 Don't store through a value derived from char const * pointer.
4889
4890 * src/reader.c (grammar_rule_check): Rewrite slightly to avoid
4891 GCC warnings.
4892
4893 2005-12-27 Paul Eggert <eggert@cs.ucla.edu>
4894
4895 * src/reader.c (grammar_midrule_action, grammar_symbol_append):
4896 Remove unnecessary forward static decls.
4897
4898 2005-12-27 Akim Demaille <akim@epita.fr>
4899
4900 * src/reader.c (grammar_current_rule_check): Also check that $$
4901 is used.
4902 Take the rule to check as argument, hence rename as...
4903 (grammar_rule_check): this.
4904 * src/reader.h, src/reader.c (grammar_rule_begin, grammar_rule_end):
4905 Rename as...
4906 (grammar_rule_begin, grammar_rule_end): these, for consistency.
4907 (grammar_midrule_action, grammar_symbol_append): Now static.
4908 * tests/torture.at (input): Don't rely on the default action
4909 being always performed.
4910 * tests/calc.at: "Set" $$ even when the action is "cut" with
4911 YYERROR or other.
4912 * tests/actions.at (Exotic Dollars): Instead of using unused
4913 values, check that the warning is issued.
4914
4915 2005-12-22 Paul Eggert <eggert@cs.ucla.edu>
4916
4917 * NEWS: Improve wording for unused-value warnings.
4918
4919 2005-12-22 Akim Demaille <akim@epita.fr>
4920
4921 * data/lalr1.cc, data/yacc.c, data/glr.c, data/c.m4
4922 (b4_yysymprint_generate): Rename as...
4923 (b4_yy_symbol_print_generate): this.
4924 Generate yy_symbol_print instead of yysymprint.
4925 Generate also yy_symbol_value_print, and use it.
4926
4927 2005-12-22 Akim Demaille <akim@epita.fr>
4928
4929 * NEWS: Warn about unused values.
4930 * src/symlist.h, src/symlist.c (symbol_list, symbol_list_new): Add
4931 a `used' member.
4932 (symbol_list_n_get, symbol_list_n_used_set): New.
4933 (symbol_list_n_type_name_get): Use symbol_list_n_get.
4934 * src/scan-gram.l (handle_action_dollar): Flag used symbols.
4935 * src/reader.c (grammar_current_rule_check): Check that values are
4936 used.
4937 * src/symtab.c (symbol_print): Accept 0.
4938 * tests/existing.at: Remove the type information.
4939 Empty the actions.
4940 Remove useless actions (beware of mid-rule actions: perl -000
4941 -pi -e 's/\s*\{\}(?=[\n\s]*[|;])//g').
4942 * tests/actions.at (Exotic Dollars): Use unused values.
4943 * tests/calc.at: Likewise.
4944 * tests/glr-regression.at (No users destructors if stack 0 deleted):
4945 Likewise.
4946
4947 * src/gram.c (rule_useful_p, rule_never_reduced_p): Use
4948 rule_useful_p.
4949
4950 2005-12-21 Paul Eggert <eggert@cs.ucla.edu>
4951
4952 Undo 2005-12-01 tentative license wording change. The wording is
4953 still being reviewed by the lawyers, and we don't want to wait for
4954 them before publishing a test release. For now, revert to the
4955 previous wording.
4956 * NEWS: Undo 2005-12-01 change.
4957 * data/glr.c: Revert to previous license wording.
4958 * data/glr.cc: Likewise.
4959 * data/lalr1.cc: Likewise.
4960 * data/location.cc: Likewise.
4961 * data/yacc.c: Likewise.
4962
4963 * NEWS: Reword %destructor vs YYABORT etc.
4964 * data/glr.c: Use American spacing, for consistency.
4965 * data/glr.cc: Likewise.
4966 * data/lalr1.cc: Likewise.
4967 * data/yacc.c: Likewise.
4968 * data/yacc.c: Reformat comments slightly.
4969 * doc/bison.texinfo: Replace "non-" with "non" when that makes sense,
4970 for consistency. Fix some spelling errors and reword recently-included
4971 text slightly.
4972 * tests/cxx-type.at: Cast results of malloc, for C++.
4973
4974 2005-12-21 Joel E. Denny <address@hidden>
4975
4976 * tests/cxx-type.at: Construct a tree, count the parents of shared
4977 nodes, and free each node once and only once. Previously, the memory
4978 for semantic values was leaked instead.
4979
4980 2005-12-21 Joel E. Denny <address@hidden>
4981
4982 * data/glr.c (struct yyGLRStack): If pure, add yyval and yyloc members.
4983 (yylval, yylloc): If pure, #define to yystackp->yyval and
4984 yystackp->yyloc similar to yychar and yynerrs.
4985 (yyparse): If pure, remove local yylval and yylloc. Add local
4986 yystackp to accommodate pure definitions of yylval and yylloc.
4987 (b4_lex_param, b4_lyyerror_args, b4_lpure_args): If pure, change
4988 yylvalp and yyllocp to &yylval and &yylloc.
4989 (nerrs, char, lval, lloc): If pure, add #define's for b4_prefix[]
4990 namespace. Previously, nerrs and char were missing, but lval and lloc
4991 weren't necessary.
4992 (yyprocessOneStack, yyreportSyntaxError, yyrecoverSyntaxError): Remove
4993 yylvalp and yyllocp parameters since, if pure, these are now always
4994 accessible through yystackp. If not pure, they are still accessible
4995 globally.
4996 * data/glr.c, data/yacc.c (YYLLOC_DEFAULT): Change `if (N)' to
4997 `if (YYID (N))' to pacify lint.
4998
4999 2005-12-21 Akim Demaille <akim@epita.fr>
5000
5001 YYACCEPT, YYERROR, and YYABORT, as user actions, should not
5002 destroy the RHS symbols of a rule.
5003 * data/yacc.c (yylen): Initialize to 0.
5004 Keep its value to the number of items to possibly shift.
5005 In particular, a regular successful parse that ends on YYFINAL by
5006 a (internal) YYACCEPT must not have yylen != 0.
5007 (yyerrorlab, yyreturn): Pop the RHS.
5008 Reorder a bit to emphasize the `shifting' bits of code.
5009 (YYPOPSTACK): Now accept a number of items to pop.
5010 * data/lalr1.cc: Likewise.
5011 * data/glr.c: Formatting changes.
5012 Use goto instead of fall through.
5013 * doc/bison.texinfo (Destructor Decl): Complete.
5014
5015 2005-12-20 Juan Manuel Guerrero <juan.guerrero@gmx.de>
5016
5017 * Makefile.am: DJGPP specific files added to EXTRA_DIST.
5018 * djgpp/Makefile.maint: Fix PACKAGE variable computation.
5019 * djgpp/config.bat: Replace every occurence of the file name
5020 scan-gram-c.c with c-scan-gram.c. The same for scan-skel-c.c with
5021 c-scan-skel.c to conform with the 8.3 file name restriction on MSDOS.
5022 * djgpp/config.sed: Replace every occurence of the file name
5023 scan-gram-c.c with c-scan-gram.c. The same for scan-skel-c.c with
5024 c-scan-skel.c to conform with the 8.3 file name restriction on MSDOS.
5025 * djgpp/djunpack.bat: DJGPP specific file.
5026 * djgpp/fnchange.lst: DJGPP specific file.
5027 * djgpp/README.in: Add new information about how to unpack the bison
5028 source on MSDOS and other systems which have 8.3 file name restrictions
5029 using djunpack.bat and fnchange.lst.
5030
5031 2005-12-12 Paul Eggert <eggert@cs.ucla.edu>
5032
5033 * bootstrap (build_cvs_prefix): Remove; unused.
5034 (CVS_PREFIX): Adjust to yesterday's Savannah reorganization
5035 when getting gnulib.
5036
5037 2005-12-12 "Joel E. Denny" <jdenny@ces.clemson.edu>
5038
5039 * data/glr.c: Reorder typedef declarations for structs to match order
5040 of struct declarations.
5041 Rename yystack everywhere to yystackp except in yyparse where it's not
5042 a pointer.
5043 (yyglrShift): Change parameter YYSTYPE yysval to YYSTYPE* yyvalp for
5044 consistency.
5045 (yyis_table_ninf): Change 0 to YYID (0) to pacify lint.
5046 (yyreportSyntaxError): Add /*ARGSUSED*/ to pacify lint.
5047 (yyparse): Change while (yytrue) to while ( YYID (yytrue)) to pacify
5048 lint.
5049
5050 2005-12-09 Paul Eggert <eggert@cs.ucla.edu>
5051
5052 * tests/sets.at (Accept): Fix typos in regular expression used to
5053 sed out the final state number.
5054
5055 Work around portability problem on Solaris 10: flex-generated
5056 files include <stdio.h> before <config.h>, which messes up
5057 because the latter defines __EXTENSIONS__. Address the problem
5058 by creating two new little files that include <config.h> first,
5059 then include the flex-generated files. Rewrite everyone else
5060 to include <config.h> first, as well.
5061 * lib/timevar.c: Always include "config.h".
5062 * src/Makefile.am (bison_SOURCES): Replace scan-gram.l with
5063 scan-gram-c.c, and scan-skel.l with scan-skel-c.c.
5064 (EXTRA_bison_SOURCES): New macro.
5065 * src/scan-gram-c.c, src/scan-skel-c.c: New files.
5066 * src/system.h: Don't include config.h.
5067 * src/LR0.c: Include <config.h> first.
5068 * src/assoc.c: Likewise.
5069 * src/closure.c: Likewise.
5070 * src/complain.c: Likewise.
5071 * src/conflicts.c: Likewise.
5072 * src/derives.c: Likewise.
5073 * src/files.c: Likewise.
5074 * src/getargs.c: Likewise.
5075 * src/gram.c: Likewise.
5076 * src/lalr.c: Likewise.
5077 * src/location.c: Likewise.
5078 * src/main.c: Likewise.
5079 * src/muscle_tab.c: Likewise.
5080 * src/nullable.c: Likewise.
5081 * src/output.c: Likewise.
5082 * src/parse-gram.y: Likewise.
5083 * src/print.c: Likewise.
5084 * src/print_graph.c: Likewise.
5085 * src/reader.c: Likewise.
5086 * src/reduce.c: Likewise.
5087 * src/relation.c: Likewise.
5088 * src/state.c: Likewise.
5089 * src/symlist.c: Likewise.
5090 * src/symtab.c: Likewise.
5091 * src/tables.c: Likewise.
5092 * src/uniqstr.c: Likewise.
5093 * src/vcg.c: Likewise.
5094
5095 * src/parse-gram.y: Fix minor problems uncovered by lint.
5096 (current_lhs, current_lhs_location): Now static.
5097 (current_assoc): Remove unused variable.
5098
5099 Cleanups so that Bison-generated parsers have less lint.
5100 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate):
5101 Prepend /*ARGSUSED*/, for lint's sake.
5102 * data/glr.c (YYUSE): Properly parenthesize, and use an alternate
5103 definition if 'lint' is defined.
5104 (YYID): New macro (or function, if lint).
5105 All uses of /*CONSTCOND*/0 replaced by YYID(0).
5106 * data/yacc.c: Likewise.
5107 * data/glr.c (yyuserAction, yyuserMerge, yy_reduce_print):
5108 (yyrecoverSyntaxError): Prepend /*ARGSUSED*/.
5109 * data/glr.cc (YYLLOC_DEFAULT): Omit /*CONSTCOND*/ since this code
5110 is C++ only.
5111 * data/lalr1.cc (YYUSE): Just use a cast, since this code is C++ only.
5112 * data/yacc.c (YYSTACK_FREE) [defined YYSTACK_ALLOC]:
5113 Use YYID(0) rather than 0, for lint.
5114 (yystrlen): Rewrite to avoid lint warning about ptrdiff_t overflow.
5115 (yysyntax_error): Rewrite to avoid lint warnings about parenthesization.
5116
5117 2005-12-07 Paul Eggert <eggert@cs.ucla.edu>
5118
5119 * tests/glr-regression.at
5120 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
5121 Close memory leak reported by twlevo.
5122
5123 2005-12-06 "Joel E. Denny" <jdenny@ces.clemson.edu>
5124
5125 * data/glr.c (yyprocessOneStack, yyparse): Synchronize the shift for
5126 all stacks.
5127 (yyparse): Iterate another stack in order to call user destructors.
5128 * tests/glr-regression.at (No users destructors if stack 0 deleted):
5129 New test case.
5130 (Duplicated user destructor for lookahead): This test now is expected
5131 to succeed.
5132
5133 2005-12-01 Paul Eggert <eggert@cs.ucla.edu>
5134
5135 * NEWS: Document the following change.
5136 * data/yacc.c: Say "parser skeleton" rather than "file", since
5137 it's no longer just a file.
5138 * data/glr.c: Grant a special exception for C GLR parsers, that
5139 reads like the already-existing exception for C LALR(1) parsers.
5140 * data/glr.cc: Likewise.
5141 * data/lalr1.cc: Likewise.
5142 * data/location.cc: Likewise.
5143 * data/yacc.c: Reword the "written by" statement to clarify that
5144 it was the parser skeleton, not the entire output file.
5145 * data/glr.c: Written by Paul Hilfinger.
5146 * data/glr.cc: Written by Akim Demaille.
5147 * data/lalr1.cc: Likewise.
5148
5149 2005-11-18 Paul Eggert <eggert@cs.ucla.edu>
5150
5151 * data/yacc.c (yy_reduce_print, YY_REDUCE_PRINT):
5152 Fix typos in previous change that broke 'make check'.
5153 YY_REDUCE_PRINT cannot be a pseudo-varargs macro; that isn't
5154 supported in C.
5155 * tests/calc.at (_AT_CHECK_CALC,_AT_CHECK_CALC_ERROR):
5156 Don't check NUM-STDERR-LINES, since the output format is fluctuating.
5157 We can revert this once things settle down.
5158
5159 * src/conflicts.c (conflicts_print): Don't print file name twice
5160 when %expect fails because there were no conflicts.
5161 * doc/bison.texinfo (Expect Decl): Tighten up wording in previous
5162 change.
5163 * tests/conflicts.at (%expect not enough, %expect too much):
5164 (%expect with reduce conflicts): Adjust to new behavior.
5165
5166 2005-11-18 Akim Demaille <akim@epita.fr>
5167
5168 * src/conflicts.c (conflicts_print): Unsatisfied %expectation are
5169 errors.
5170 * NEWS: Document this.
5171 * doc/bison.texinfo (Expect Decl): Likewise.
5172
5173 2005-11-16 Akim Demaille <akim@epita.fr>
5174
5175 Generalize the display of semantic values and locations in traces.
5176 * data/glr.c (yy_reduce_print): Fix indices (again).
5177 * data/c++.m4 (b4_rhs_value, b4_rhs_location): Don't expect
5178 literal integers.
5179 * data/lalr1.cc (yyreduce_print): Rename as...
5180 (yy_reduce_print): this.
5181 Display values and locations.
5182 * data/yacc.c (yy_reduce_print): Likewise.
5183 (YY_REDUCE_PRINT): Adjust to pass the required arguments.
5184 (yysymprint): Move higher to be visible from yy_reduce_print).
5185 (yyparse): Adjust.
5186 * tests/calc.at: Adjust the expected length of the traces.
5187
5188 2005-11-14 Akim Demaille <akim@epita.fr>
5189
5190 * data/glr.c (yy_reduce_print): The loop was quite wrong: type are
5191 from 1 to N, while values and location start at 0.
5192 (b4_rhs_location, b4_rhs_value): Add parens around $1 and $2.
5193
5194 2005-11-14 Akim Demaille <akim@epita.fr>
5195
5196 * data/glr.c (yy_reduce_print): Fix the $ number.
5197
5198 2005-11-14 Akim Demaille <akim@epita.fr>
5199
5200 "Use" parse parameters.
5201 * data/c.m4 (b4_parse_param_for, b4_parse_param_use): New.
5202 * data/glr.c, data/glr.cc: Use them.
5203 * data/glr.c (YYUSE): Have a C++ definition that supports
5204 non-pointer types.
5205
5206 2005-11-14 Akim Demaille <akim@epita.fr>
5207
5208 * data/glr.c (yyexpandGLRStack): Declare only if defined.
5209
5210 2005-11-14 Akim Demaille <akim@epita.fr>
5211
5212 * data/glr.cc: New.
5213 * data/m4sugar/m4sugar.m4 (m4_prepend): New.
5214
5215 2005-11-12 Akim Demaille <akim@epita.fr>
5216
5217 Let position and location be PODs.
5218 * data/location.cc (position::initialize, location::initialize): New.
5219 (position::position, location::location): Define only if
5220 b4_location_constructors is defined.
5221 * data/lalr1.cc (b4_location_constructors): Define it for backward
5222 compatibility.
5223 * doc/bison.texinfo (Initial Action Decl): Use initialize.
5224
5225 2005-11-12 Akim Demaille <akim@epita.fr>
5226
5227 * data/lalr1.cc: Move the body of the ctor and dtor into the
5228 parser file (instead of the header).
5229 Wrap the implementations in a "namespace yy".
5230
5231 2005-11-12 Akim Demaille <akim@epita.fr>
5232
5233 Have glr.c include its header file when created.
5234 * data/glr.c (b4_shared_declarations): New.
5235 Output them verbatim in the parser if !%defines, otherwise
5236 output then in the header file, and include it instead.
5237
5238 2005-11-11 Akim Demaille <akim@epita.fr>
5239
5240 * data/glr.c: Comment changes.
5241
5242 2005-11-11 Akim Demaille <akim@epita.fr>
5243
5244 When yydebug, report semantic and location values for reductions.
5245 * data/glr.c (yy_reduce_print): Report the semantic values and the
5246 locations.
5247 (YY_REDUCE_PRINT): Adjust.
5248 (yyglrReduce): Use them.
5249 (b4_rhs_value, b4_rhs_location): Remove m4_eval invocations.
5250 * data/c.m4 (b4_yysymprint_generate): Specify the const arguments.
5251 * tests/calc.at (_AT_CHECK_CALC_ERROR): Remove the reduction
5252 traces.
5253
5254 2005-11-10 Akim Demaille <akim@epita.fr>
5255
5256 * data/glr.c (yynewGLRStackItem, YY_RESERVE_GLRSTACK): New.
5257 (yyaddDeferredAction, yyglrShift, yyglrShiftDefer): Use them.
5258 (yyexpandGLRStack, YYRELOC): Define only when YYSTACKEXPANDABLE.
5259
5260 2005-11-09 Albert Chin-A-Young <china@thewrittenword.com>
5261
5262 * m4/cxx.m4, examples/Makefile.am: Don't build
5263 examples/calc++ if no C++ compiler is available. (trivial change)
5264
5265 2005-11-09 Akim Demaille <akim@epita.fr>
5266
5267 * src/scan-skel.l: Use a couple of asserts.
5268
5269 2005-11-03 Akim Demaille <akim@epita.fr>
5270
5271 In some (weird) cases, the final state number is incorrect.
5272 Reported by Alexandre Duret-Lutz.
5273 * src/LR0.c (state_list_append): Remove the computation of
5274 final_state.
5275 (save_reductions): Do it here.
5276 (get_state): Alpha conversion.
5277 (generate_states): Use a for loop.
5278 * src/gram.h (item_number_is_rule_number)
5279 (item_number_is_symbol_number): New.
5280 * src/state.c: Use assert.
5281 * src/system.h: Include assert.h.
5282 * tests/sets.at (Accept): New.
5283
5284 2005-10-30 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
5285
5286 * data/glr.c (yyfill): Adjust comment.
5287 (yyresolveAction): Initialize default location properly
5288 for empty right-hand sides.
5289 (yydoAction): Ditto.
5290 Add comment explaining apparently dead code.
5291 * tests/glr-regression.at
5292 (Incorrectly initialized location for empty right-hand side in GLR):
5293 New test.
5294
5295 2005-10-30 Paul Eggert <eggert@cs.ucla.edu>
5296
5297 * bootstrap (cleanup_gnulib): New function. Use it to clean up
5298 gnulib when interrupted. This fixes some race conditions and
5299 works around some portability problems (one noted by Paul
5300 Hilfinger).
5301
5302 2005-10-22 Akim <akim@epita.fr>
5303
5304 * Makefile.cfg: Adjust to config -> build-aux.
5305 Reported by twledo.
5306
5307 2005-10-21 Akim Demaille <akim@epita.fr>
5308
5309 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate): Pass
5310 the %parse-params.
5311 * data/glr.c (YY_SYMBOL_PRINT, yydestroyGLRState): Adjust.
5312 * data/yacc.c (b4_Pure_if): Rename as...
5313 (b4_yacc_pure_if): this.
5314 (YY_SYMBOL_PRINT, yyparse): Adjust.
5315 * doc/bison.texinfo: Formatting changes.
5316
5317 2005-10-21 Akim Demaille <akim@epita.fr>
5318
5319 Finish the transition config -> build-aux.
5320 * configure.ac, Makefile.am: Use build-aux.
5321 * config/prev-version, config/announce-gen, config/Makefile.am:
5322 Move to...
5323 * build-aux/prev-version, build-aux/announce-gen,
5324 * build-aux/Makefile.am: here.
5325
5326 2005-10-14 Akim Demaille <akim@epita.fr>
5327
5328 * examples/calc++/test: Use set -x only when VERBOSE.
5329
5330 2005-10-13 Paul Eggert <eggert@cs.ucla.edu>
5331
5332 * NEWS: Bison now warns if it finds a stray `$' or `@' in an action.
5333 * src/scan-gram.l (<SC_BRACED_CODE>[$@]): Implement this.
5334
5335 2005-10-13 Akim Demaille <akim@epita.fr>
5336
5337 * src/scan-skel.l: Output the base name parts of the parser and
5338 header file names.
5339 * tests/output.at (AT_CHECK_OUTPUT): Support subdirectories, and
5340 additional checks.
5341 Use this to exercise C++ outputs in subdirs.
5342 Reported by Oleg Smolsky.
5343
5344 2005-10-12 Paul Eggert <eggert@cs.ucla.edu>
5345
5346 * data/c.m4 (b4_c_function_def): Look at __C99_FUNC__, not at
5347 __STDC_VERSION__, as IBM cc 7.0 doesn't define the latter either.
5348 Problem reported by John P. Hartmann.
5349 * data/yacc.c (YYMODERN_C): Likewise. Don't define if the user has
5350 already defined it.
5351
5352 2005-10-12 Akim Demaille <akim@epita.fr>
5353
5354 * src/parse-gram.y (version_check): Exit 63 to please missing
5355 (stands for "version mismatch).
5356 * tests/input.at, doc/bison.texinfo: Adjust.
5357
5358 2005-10-10 Paul Eggert <eggert@cs.ucla.edu>
5359
5360 Work around portability problems with Visual Age C compiler
5361 (xlc and xlC_r) reported by John P. Hartmann.
5362 * data/location.cc (initial_column, initial_line): Remove.
5363 All uses replaced by 0 and 1.
5364 * src/scan-gram.l (gram_wrap): Redefine to avoid bug in flex 2.5.31
5365 that xlc complains about.
5366 * src/scan-skel.l (skel_wrap): Likewise.
5367 * data/c.m4 (b4_c_function_def): Look at __STDC_VERSION__ as well
5368 as __STDC__.
5369 * data/yacc.c (YYMODERN_C): New macro, which also looks at
5370 __STDC_VERSION__. Use it everywhere instead of looking at
5371 __STDC__ and __cplusplus.
5372
5373 2005-10-10 Akim Demaille <akim@epita.fr>
5374
5375 * examples/calc++/test: Be quiet unless VERBOSE.
5376
5377 2005-10-05 Paul Eggert <eggert@cs.ucla.edu>
5378
5379 * data/c.m4 (yydestruct, yysymprint):
5380 Use YYUSE instead of casting to void.
5381 * data/glr.c (YYUSE): New macro.
5382 (yyuserMerge, yyreportAmbiguity, yyreportSyntaxError):
5383 Use it instead of rolling our own.
5384 (YYLLOC_DEFAULT, YYCHK, YYDPRINTF, YY_SYMBOL_PRINT, YY_REDUCE_PRINT):
5385 (YYCHK1):
5386 Use /*CONSTCOND*/ to suppress lint warnings.
5387 * data/lalr1.cc (YYLLOC_DEFAULT, YY_SYMBOL_PRINT, YY_REDUCE_PRINT):
5388 (YY_STACK_PRINT): Use 'false' not '0'.
5389 (YYUSE): New macro.
5390 (yysymprint_, yydestruct_): Use it instead of rolling our own.
5391 * data/yacc.c (YYUSE): New macro.
5392 (YYCOPY, YYSTACK_RELOCATE, YYBACKUP, YYLLOC_DEFAULT):
5393 (YYDPRINTF, YY_SYMBOL_PRINT, YY_STACK_PRINT, YY_REDUCE_PRINT):
5394 (yyerrorlab): Use /*CONSTCOND*/ to suppress lint warnings.
5395
5396
5397 * data/m4sugar/m4sugar.m4 (_m4_map): New macro.
5398 (m4_map, m4_map_sep): Use it. Handle the empty list correctly.
5399
5400 2005-10-04 Paul Eggert <eggert@cs.ucla.edu>
5401
5402 Undo the parts of the unlocked-I/O change that substituted
5403 putc or puts for printf. This might hurt performance a bit,
5404 but some people prefer the printf style.
5405 * data/c.m4 (yysymprint): Prefer printf to puts and putc.
5406 * data/glr.c (YYFPUTC, YYFPUTS, YYDPUTS): Remove.
5407 All uses replaced by YYFPRINTF and YYDPRINTF.
5408 * data/yacc.c: Likewise.
5409 * lib/bitset.c (bitset_print): Likewise.
5410 * lib/bitsetv.c (bitsetv_dump, debug-bitsetv): Prefer printf to
5411 putc and puts.
5412 * lib/lbitset.c (debug_lbitset): Likewise.
5413 * src/closure.c (print_firsts, print_fderives): Likewise.
5414 * src/gram.c (grammar_dump): Likewise.
5415 * src/lalr.c (look_ahead_tokens_print): Likewise.
5416 * src/output.c (escaped_output): Likewise.
5417 (user_actions_output): Break apart two printfs.
5418 * src/parse-gram.y (%printer): Prefer printf to putc and puts.
5419 * src/reduce.c (reduce_print): Likewise.
5420 * src/state.c (state_rule_look_ahead_tokens_print): Likewise.
5421 * src/system.h: Include unlocked-io.h rathe than stdio.h.
5422
5423 * data/glr.c (yyuserMerge, yyreportAmbiguity, yyreportSyntaxError):
5424 Use assignments rather than casts-to-void to suppress
5425 unused-variable warnings. This pacifies 'lint'.
5426 * data/lalr1.cc (yysymprint_, yydestruct_): Use a call to suppress
5427 unused-variable warnings.
5428
5429 2005-10-03 Juan Manuel Guerrero <juan.guerrero@gmx.de>
5430
5431 * Makefile.am: DJGPP specific files added to EXTRA_DIST.
5432
5433 2005-10-02 Paul Eggert <eggert@cs.ucla.edu>
5434
5435 Use unlocked I/O for a minor performance improvement on hosts like
5436 GNU/Linux and Solaris that support unlocked I/O. The basic idea
5437 is to use the gnlib unlocked-io module, and to prefer putc and
5438 puts to printf when either will work (since the latter doesn't
5439 come in an unlocked flavor).
5440 * bootstrap (gnulib_modules): Add unlocked-io.
5441 * data/c.m4 (yysymprint): Prefer puts and putc to printf.
5442 * data/glr.c (YYFPUTC, YYFPUTS, YYDPUTS): New macros.
5443 Prefer them to YYFPRINTF and YYDPRINTF if either will do,
5444 and similarly for puts and putc and printf.
5445 * data/yacc.c: Likewise.
5446 * lib/bitset.c (bitset_print): Likewise.
5447 * lib/bitset.h [USE_UNLOCKED_IO]: Include unlocked-io.h.
5448 * lib/bitsetv.c (bitsetv_dump, debug-bitsetv): Prefer putc and puts
5449 to printf.
5450 * lib/lbitset.c (debug_lbitset): Likewise.
5451 * src/closure.c (print_firsts, print_fderives): Likewise.
5452 * src/gram.c (grammar_dump): Likewise.
5453 * src/lalr.c (look_ahead_tokens_print): Likewise.
5454 * src/output.c (escaped_output): Likewise.
5455 (user_actions_output): Coalesce two printfs.
5456 * src/parse-gram.y (%printer): Prefer putc and puts to printf.
5457 * src/reduce.c (reduce_print): Likewise.
5458 * src/state.c (state_rule_look_ahead_tokens_print): Likewise.
5459 * src/system.h: Include unlocked-io.h rather than stdio.h.
5460
5461 * data/lalr1.cc: Don't put an unmatched ' in a dnl comment, as
5462 this confuses xgettext.
5463
5464 2005-10-02 Akim Demaille <akim@epita.fr>
5465
5466 * bootstrap (gnulib_modules): Add strverscmp.
5467 * lib/.cvsignore: Add strverscmp.c, strverscmp.h.
5468 * m4/.cvsignore: Add strverscmp.m4.
5469 * src/parse-gram.y (%require): New token, new rule.
5470 (version_check): New.
5471 * src/scan-gram.l (%require): Adjust.
5472 * tests/input.at (AT_REQUIRE): New.
5473 Use it.
5474 * doc/bison.texinfo (Require Decl): New.
5475 (Calc++ Parser): Use %require.
5476
5477 2005-10-02 Akim Demaille <akim@epita.fr>
5478
5479 * data/location.cc: New.
5480
5481 2005-10-02 Paul Eggert <eggert@cs.ucla.edu>,
5482 Akim Demaille <akim@epita.fr>
5483
5484 Make sure -odir/foo.cc creates dir/location.hh etc.
5485 * src/files.h (spec_outfile, parser_file_name, spec_name_prefix)
5486 (spec_file_prefix, spec_verbose_file, spec_graph_file)
5487 (spec_defines_file): Now const.
5488 (dir_prefix): New.
5489 (short_base_name): Remove.
5490 * src/files.c: Adjust.
5491 (dirname.h): Include.
5492 (base_name): Don't prototype it.
5493 (finput): Remove, duplicates gram_in.
5494 (full_base_name, short_base_name): Replace by...
5495 (all_but_ext, all_but_tab_ext): these.
5496 (compute_base_names): Rename as...
5497 (compute_file_name_parts): this.
5498 Update to compute the new variables, including dir_prefix.
5499 Adjust dependencies.
5500 * src/output.c (prepare): Output them.
5501 * src/reader.c: Adjust to use gram_in, not finput.
5502 * src/scan-skel.l (@dir_prefix@): New.
5503
5504 2005-10-02 Juan Manuel Guerrero <juan.guerrero@gmx.de>
5505
5506 * lib/subpipe.c: New function end_of_output_subpipe() added
5507 to allow support for non-posix systems. This is a no-op function
5508 for posix systems.
5509
5510 * lib/subpipe.h: New function end_of_output_subpipe() added
5511 to allow support for non-posix systems. This is a no-op function
5512 for posix systems.
5513
5514 * src/output.c (output_skeleton): Use end_of_output_subpipe() to
5515 handle the lack of pipe/fork functionality on non-posix systems.
5516
5517 * djgpp/Makefile.maint: DJGPP specific file.
5518
5519 * djgpp/README.in: DJGPP specific file.
5520
5521 * djgpp/config.bat: DJGPP specific configuration file.
5522
5523 * djgpp/config.sed: DJGPP specific configuration file.
5524
5525 * djgpp/config.site: DJGPP specific configuration file.
5526
5527 * djgpp/config_h.sed: DJGPP specific configuration file.
5528
5529 * djgpp/subpipe.c: DJGPP specific replacement file for lib/subpipe.c.
5530
5531 * djgpp/subpipe.h: DJGPP specific replacement file for lib/subpipe.h.
5532
5533 2005-10-02 Akim Demaille <akim@epita.fr>
5534
5535 * data/location.cc: New, extract from...
5536 * data/lalr1.cc: here.
5537 (location.hh): Include it after the user prologue, in case the
5538 filename type is defined by the user.
5539 Forward declation location and position before the pre-prologue.
5540 (yyresult_): Rename as...
5541 (yyresult): this, it's a local variable, not an attribute.
5542 * data/Makefile.am (dist_pkgdata_DATA): Adjust.
5543
5544 2005-10-01 Akim Demaille <akim@epita.fr>
5545
5546 * examples/extexi: Restore the #line generation.
5547
5548 2005-09-30 Akim Demaille <akim@epita.fr>,
5549 Alexandre Duret-Lutz <adl@gnu.org>
5550
5551 Move the token type and YYSTYPE in the parser class.
5552 * data/lalr1.cc (stack.hh, location.hh): Include earlier.
5553 (parser::token): New, from the moved free definition of tokens.
5554 (parser::semantic_value): Now a full definition instead of an
5555 indirection to YYSTYPE.
5556 (b4_post_prologue): No longer included in the header file, but
5557 in the implementation file.
5558 * doc/bison.texi (C+ Language Interface): Update.
5559 * src/parse-gram.y: Support unary %define.
5560 * tests/actions.at: Define global_tokens_and_yystype for backward
5561 compatibility until we update the tests.
5562 * tests/calc.at: Idem.
5563 (first_line, first_column, last_line, last_column): Define for lalr1.cc
5564 to simplify the code.
5565
5566 2005-09-29 Paul Eggert <eggert@cs.ucla.edu>
5567
5568 Port to SunOS 4.1.4, which lacks strtoul and strerror.
5569 Ah, the good old days! Problem reported by Peter Klein.
5570 * bootstrap (gnulib_modules): Add strerror, strtoul.
5571 * lib/.cvsignore: Add strerror.c, strtol.c, strtoul.c
5572 * m4/.cvsignore: Add strerror.m4, strtol.m4, strtoul.m4.
5573
5574 2005-09-29 Akim Demaille <akim@epita.fr>
5575
5576 * data/c.m4 (b4_error_verbose_if): New.
5577 * data/lalr1.cc: Use it.
5578 (YYERROR_VERBOSE_IF): Remove.
5579 (yyn_, yylen_, yystate_, yynerrs_, yyerrstatus_): Remove as
5580 parser members, replaced by...
5581 (yyn, yylen, yystate, yynerss, yyerrstatus): these parser::parse
5582 local variables.
5583 (yysyntax_error_): Takes the state number as argument.
5584 (yyreduce_print_): Use the argument yyrule, not the former
5585 attribute yyn_.
5586
5587 2005-09-26 Paul Eggert <eggert@cs.ucla.edu>
5588
5589 * bootstrap (gnulib_modules): Add verify.
5590 * lib/.cvsignore: Add verify.h.
5591 * src/getargs.c: Use ARGMATCH_VERIFY rather than verify.
5592 * src/system.h (verify): Remove.
5593 Include verify.h instead.
5594 * src/tables.c (tables_generate): Use new API for 'verify'.
5595
5596 2005-09-21 Paul Eggert <eggert@cs.ucla.edu>
5597
5598 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Do not use
5599 local variables whose names begin with 'yy'.
5600 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
5601 Trivial changes from Joel E. Denny.
5602
5603 * bootstrap (gnulib_modules): Remove alloca. Bison doesn't need
5604 it itself.
5605 * src/main.c (main) [C_ALLOCA]: Don't flush alloca'ed memory; we
5606 don't use alloca any more.
5607
5608 * data/yacc.c [YYSTACK_USE_ALLOCA && !defined __GNUC__ && ! defined
5609 __BUILTIN_VA_ARG_INCR && ! defined _AIX && ! defined _MSC_VER &&
5610 defined _ALLOCA_H]: Don't include <stdlib.h>; not needed in this case.
5611 * tests/torture.at (Exploding the Stack Size with Alloca): Adjust
5612 to match yacc.c, to test more hosts.
5613
5614 2005-09-20 Paul Eggert <eggert@cs.ucla.edu>
5615
5616 * data/yacc.c (YYSIZE_T): Reindent to make it clearer. This
5617 doesn't affect behavior.
5618 (YYSTACK_ALLOC) [YYSTACK_USE_ALLOCA]: Improve support for
5619 Solaris, AIX, MSC.
5620 (_STDLIB_H): Renamed from YYINCLUDED_STDLIB_H. All uses changed.
5621 This works a bit better with glibc, if user code has already included
5622 stdlib.h.
5623 * doc/bison.texinfo (Bison Parser): Document that users can't
5624 arbitrarily use malloc and free for other purposes. Document
5625 that <alloca.h> and <malloc.h> might be included.
5626 (Table of Symbols): Under YYSTACK_USE_ALLOCA, Don't claim that the
5627 user must declare alloca.
5628
5629 * HACKING (release): Forwarn the Translation Project about
5630 stable releses.
5631
5632 2005-09-20 Akim Demaille <akim@epita.fr>
5633
5634 * data/glr.c: Use b4_token_enums, not b4_token_enums_defines.
5635
5636 2005-09-19 Paul Eggert <eggert@cs.ucla.edu>
5637
5638 * data/yacc.c (YYSIZE_MAXIMUM): New macro.
5639 (YYSTACK_ALLOC_MAXIMUM): Use it.
5640 (yysyntax_error): New function.
5641 (yyparse) [YYERROR_VERBOSE]: Don't leak memory indefinitely if
5642 multiple syntax errors are reported, and alloca is being used.
5643 Instead, reallocate buffers twice as big each time, so that
5644 we waste at most half the allocated memory. Start with a small
5645 (128-byte) buffer that will suffice in most cases anyway.
5646 Use yysyntax_error to do most of the work.
5647
5648 * doc/bison.texinfo (Error Reporting, Table of Symbols):
5649 yynerrs is the number of errors reported, not the number of
5650 errors encountered.
5651
5652 * tests/glr-regression.at (Duplicated user destructor for lookahead):
5653 Mark it as expected to fail.
5654 Cast result of malloc; problem reported by twlevo@xs4all.nl.
5655 * tests/actions.at, tests/calc.at, tests/glr-regression.at:
5656 Don't start user-code symbols with "yy", to avoid name space problems.
5657
5658 2005-09-19 Akim Demaille <akim@epita.fr>
5659
5660 Remove the traits, failed experiment.
5661 It never proved useful, and anyway because of the current
5662 definition, it was not possible to have several specialization of
5663 this traits, making it useless.
5664 * data/lalr1.cc (yy:traits): Remove.
5665 Inline its definitions in the parser class.
5666
5667 2005-09-19 Akim Demaille <akim@epita.fr>
5668
5669 * tests/atlocal.in (LIBS): Pass INTLLIBS to address failures on at
5670 least Mac OSX with a /usr/local install of gettext.
5671
5672 2005-09-19 Akim Demaille <akim@epita.fr>
5673
5674 * data/lalr1.cc (yyparse): Rename yylooka and yyilooka as yychar
5675 and yytoken for similarity with the other skeletons.
5676
5677 2005-09-19 Akim Demaille <akim@epita.fr>
5678
5679 * NEWS, configure.ac: update version number to 2.1a.
5680
5681 2005-09-16 Paul Eggert <eggert@cs.ucla.edu>
5682
5683 * NEWS: Version 2.1.
5684
5685 * NEWS: Remove notice of yytname change, since it was never in an
5686 official release.
5687 * data/glr.c (yydestroyGLRState): Rename local var to avoid shadowing
5688 diagnostic.
5689 * src/output.c (prepare): Likewise.
5690 * data/lalr1.cc (YYERROR_VERBOSE_IF): New macro.
5691 (yysyntax_error_): Use it to avoid GCC warning when YYERROR_VERBOSE
5692 is not defined. This is an awful hack, but it's enough for now.
5693 All callers changed.
5694 * tests/glr-regression-at (make_value): Args are const pointers now,
5695 to avoid GCC warning.
5696 (Duplicated user destructor for lookahead): New test. Currently
5697 skipped. It fails on my host but I'm not sure it'll always fail.
5698
5699 2005-09-16 Akim Demaille <akim@epita.fr>
5700
5701 * src/symtab.h (struct symbol): Declare the printer and destructor
5702 as const, to avoid accidental calls to free.
5703 (symbol_destructor_set, symbol_printer_set): Adjust.
5704 * src/symtab.c: Adjust.
5705
5706 2005-09-16 Akim Demaille <akim@epita.fr>
5707
5708 * data/c.m4 (b4_token_enums): New.
5709 (b4_token_defines): Rename as...
5710 (b4_token_enums_defines): this.
5711 (b4_token_defines): New, output only the #defines.
5712 * data/yacc.c, data/glr.c: Adjust.
5713 * data/lalr1.cc: Use b4_token_enums instead of b4_token_enums_defines.
5714 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate): Define
5715 as default values.
5716
5717 2005-09-16 Akim Demaille <akim@epita.fr>
5718
5719 * data/lalr1.cc (yylex_): Remove, inline its code.
5720 (yyreport_syntax_error_): Remove, replaced by...
5721 (yysyntax_error_): this which returns a string and leaves to the
5722 caller the call to the users' error function.
5723 (yylooka_, yyilooka_, yylval, yylloc, yyerror_range_, yyval, yyloc):
5724 Move from members of the parser object...
5725 (yylooka, yyilooka, yylval, yylloc, yyerror_range, yyval, yyloc):
5726 to local variables of the parse function.
5727
5728 2005-09-16 Akim Demaille <akim@epita.fr>
5729
5730 * doc/bison.texinfo (Calc++ Parser): Don't promote defining YYEOF
5731 since it's in Bison's name space.
5732
5733 2005-09-15 Paul Eggert <eggert@cs.ucla.edu>
5734
5735 * data/glr.c (yyresolveValue): Add default case to pacify
5736 gcc -Wswitch-default. Problem reported by twlevo@xs4all.nl.
5737
5738 * NEWS: Document when yyparse started to return 2.
5739 * doc/bison.texinfo (Parser Function): Document when yyparse
5740 returns 2.
5741
5742 * data/lalr1.cc: Revert part of previous change, as it's incompatible.
5743 (b4_filename_type): Renamed back from b4_file_name_type. All uses
5744 changed.
5745 (class position): file_name -> filename (reverting). All uses changed.
5746
5747 2005-09-14 Paul Eggert <eggert@cs.ucla.edu>
5748
5749 * examples/calc++/Makefile.am ($(calc_sources_generated)): Don't
5750 do anything if $@ exists. This reverts part of the 2005-07-07
5751 patch.
5752
5753 2005-09-11 Paul Eggert <eggert@cs.ucla.edu>
5754
5755 * Makefile.am (EXTRA_DIST): Do not distribute REFERENCES; it
5756 contains obsolete information and isn't worth distributing as a
5757 separate file anyway.
5758 * data/glr.c [defined YYSETJMP]: Don't include <setjmp.h>.
5759 (YYJMP_BUF, YYSETJMP, YYLONGJMP) [!defined YYSETJMP]: New macros.
5760 All uses of jmp_buf, setjmp, longjmp changed to use these instead.
5761 (yyparse): Abort if user code uses longjmp to throw an unexpected
5762 value.
5763
5764 2005-09-09 Paul Eggert <eggert@cs.ucla.edu>
5765
5766 * data/c.m4 (b4_identification): Define YYBISON_VERSION.
5767 Suggested by twlevo@xs4all.nl.
5768
5769 * data/glr.c (YYCHK1): Do not assume YYE is in range.
5770 This avoids a diagnostic from gcc -Wswitch-enum.
5771 Problem reported by twlevo@xs4all.nl.
5772
5773 * doc/bison.texinfo: Don't use "filename", as per GNU coding
5774 standards. Use "file name" or "file" or "name", depending on
5775 the context.
5776 (Invocation): The output of "bison hack/foo.y" goes to foo.tab.c,
5777 not to hack/foo.tab.c.
5778 (Calc++ Top Level): 2nd arg of main is not const.
5779 * data/glr.c: b4_filename -> b4_file_name.
5780 * data/lalr1.cc: Likewise. Also, b4_filename_type -> b4_file_name_type.
5781 All uses changed.
5782 (class position): filename -> file_name. All uses changed.
5783 * data/yacc.c: b4_filename -> b4_file_name.
5784 * lib/bitset.h: filename -> file_name in local vars.
5785 * lib/bitset_stats.c: Likewise.
5786 * src/files.c: Likewise.
5787 * src/scan-skel.l ("@output ".*\n): Likewise.
5788 * src/files.c (file_name_split): Renamed from filename_split.
5789 * src/muscle_tab.c (muscle_init): Output b4_file_name, not b4_filename.
5790
5791 2005-09-08 Paul Eggert <eggert@cs.ucla.edu>
5792
5793 * lib/.cvsignore: Add pipe-safer.c, stdio--.h, unistd--.h,
5794 to accommodate latest gnulib.
5795
5796 * tests/glr-regression.at (Duplicate representation of merged trees):
5797 Add casts to pacify g++. Problem reported by twlevo@xs4all.nl.
5798
5799 * bootstrap: Add comment as to why the AM_LANGINFO_CODESET hack is
5800 needed.
5801
5802 2005-08-26 Paul Eggert <eggert@cs.ucla.edu>
5803
5804 * data/glr.c (yydestroyGLRState): Renamed from yydestroyStackItem.
5805 All uses changed. Invoke user destructor after an error during a
5806 split parse (trivial change from Joel E. Denny).
5807
5808 * tests/glr-regression.at
5809 (User destructor after an error during a split parse): New test case.
5810 Problem reported by Joel E. Denny in:
5811 http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00029.html
5812
5813 2005-08-25 Paul Eggert <eggert@cs.ucla.edu>
5814
5815 * README-cvs: Give URLs for recommended tools.
5816 Mention Gzip version problem, and bootstrapping issues.
5817 Remove troubleshooting section, as it's somewhat obsolete.
5818
5819 * bootstrap (no_cache): New var, to accommodate different wget
5820 variants. Use it instead of '-C off'. Problem reported by
5821 twlevo@xs4all.nl.
5822
5823 * data/glr.c (yydestroyStackItem): New function.
5824 (yyrecoverSyntaxError, yyreturn): Use it to improve quality of
5825 debugging information. Problem reported by Joel E. Denny.
5826
5827 2005-08-25 Akim Demaille <akim@epita.fr>
5828
5829 * tests/local.at (AT_COMPILE_CXX): Pass $LINKS too.
5830
5831 2005-08-24 Paul Eggert <eggert@cs.ucla.edu>
5832
5833 * data/glr.c (yyrecoverSyntaxError, yyreturn):
5834 Don't invoke destructor on unresolved entries.
5835 * tests/glr-regression.at
5836 (User destructor for unresolved GLR semantic value): New test case.
5837 Problem reported by Joel E. Denny in:
5838 http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00016.html
5839
5840 2005-08-21 Paul Eggert <eggert@cs.ucla.edu>
5841
5842 * lib/.cvsignore: Remove realloc.c, strncasecmp.c, xstrdup.c.
5843 Add strnlen.c.
5844 * m4/.cvsignore: Remove codeset.m4, gettext.m4, lib-ld.m4,
5845 lib-prefix.m4, po.m4.
5846
5847 * data/glr.c (yyreturn): Use "Cleanup:" rather than "Error:"
5848 in yydestruct diagnostic, since it might not be an error.
5849 Problem reported by Joel Denny near end of
5850 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00040.html>.
5851 * data/lalr1.cc (yyerturn): Likewise.
5852 * data/yacc.c (yyreturn): Likewise.
5853 * tests/calc.at (_AT_CHECK_CALC_ERROR): Adjust to the above change.
5854
5855 * src/files.c: Remove obsolete FIXME comment.
5856
5857 * data/glr.c (YY_SYMBOL_PRINT): Append a newline, for consistency
5858 with the other templates, and to fix bogus run-on messages such
5859 as the one reported at the end of
5860 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00040.html>.
5861 All callers changed to avoid the newline.
5862 (yyprocessOneStack): Output two lines rather than one, to accommodate
5863 the above change. This changes the debug output format slightly.
5864
5865 * data/glr.c (yyresolveValue): Fix redundant parse tree problem
5866 reported by Joel E. Denny in
5867 <http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00004.html>
5868 (trivial change).
5869 * tests/glr-regression.at (Duplicate representation of merged trees):
5870 New test, from Joel E. Denny in:
5871 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00013.html>.
5872 * THANKS: Add Joel E. Denny.
5873
5874 * configure.ac (AC_INIT): Bump to 2.0c.
5875
5876 2005-07-24 Paul Eggert <eggert@cs.ucla.edu>
5877
5878 * NEWS: Version 2.0b.
5879
5880 * Makefile.am (SUBDIRS): Put examples before tests, so that
5881 "make check" doesn't finish with "All 1 tests passed".
5882
5883 * tests/regression.at (Token definitions): Don't rely on
5884 AT_PARSER_CHECK for data that contains backslashes. It currently
5885 uses 'echo', and 'echo' isn't portable if its argument contains
5886 backslashes. Problem found on OpenBSD 3.4. Also, do not assume
5887 that the byte '\0xff' is not printable in the C locale; it is,
5888 under OpenBSD 3.4 (!). Luckily, '\0x80' through '\0x9e' are
5889 not printable, so use '\0x81' to test.
5890
5891 * data/glr.c (YYOPTIONAL_LOC): Define even if it's not a recent
5892 version of GCC, since the macro is used with non-GCC compilers.
5893
5894 Fix core dump reported by Pablo De Napoli in
5895 <http://lists.gnu.org/archive/html/bug-bison/2005-07/msg00053.html>.
5896 * tests/regression.at (Invalid inputs with {}): New test.
5897 * src/parse-gram.y (token_name): Translate type before using
5898 it as an index.
5899
5900 * data/glr.c (ATTRIBUTE_UNUSED): Remove, since it infringes on
5901 the user's name space. All uses changed to __attribute__
5902 ((__unused__)).
5903 (yyFail, yyMemoryExhausted, yyreportAmbiguity):
5904 Add __attribute__ ((__noreturn__)).
5905
5906 * etc/clcommit: Remove. We weren't using it, and it failed
5907 "make maintainer-distcheck".
5908 * Makefile.maint: Merge from coreutils.
5909 (CVS_LIST, CVS_LIST_EXCEPT): New macros.
5910 (syntax-check-rules): Change list of rules as described below.
5911 (sc_cast_of_alloca_return_value, sc_dd_max_sym_length):
5912 (sc_file_system, sc_obsolete_symbols, sc_prohibit_atoi_atof):
5913 (sc_prohibit_jm_in_m4, sc_root_tests, sc_tight_scope):
5914 (sc_trailing_space): New rules.
5915 (sc_xalloc_h_in_src): Remove.
5916 (sc_cast_of_argument_to_free, sc_cast_of_x_alloc_return_value):
5917 (sc_space_tab, sc_error_exit_success, sc_changelog):
5918 (sc_system_h_headers, sc_sun_os_names, sc_unmarked_diagnostics):
5919 (makefile-check, po-check, author_mark_check):
5920 (makefile_path_separator_check, copyright-check):
5921 Use grep -n, to make it easier to find violations.
5922 Use CVS_LIST and CVS_LIST_EXCEPT.
5923 (header_regexp, h_re): Remove.
5924 (dd_c): New macro.
5925 (sc_dd_max_sym_length, .re-list, news-date-check): New rules.
5926 (my-distcheck): Use more-modern GCC flags.
5927 (signatures, %.asc): Remove.
5928 (rel-files, announcement): Remove signatures.
5929 Restore old updating code, even though we don't use it, so
5930 that we're the same as coreutils.
5931 (alpha, beta, major): Depend on news-date-check.
5932 Make the upload commands.
5933
5934 * data/c.m4, data/lalr1.cc, data/yacc.c: Normalize white space.
5935 * lib/abitset.h, lib/bbitset.h, lib/bitset.h: Likewise.
5936 * lib/bitset_stats.c, lib/ebitset.h, lib/lbitset.c: Likewise.
5937 * lib/libitset.h, lib/timevar.c, lib/vbitset.h: Likewise.
5938 * src/Makefile.am, src/gram.c, src/muscle_tab.h: Likewise.
5939 * src/parse-gram.y, src/system.h, src/tables.c, src/vcg.c: Likewise.
5940 * src/vcg_defaults.h, tests/cxx-type.at, tests/existing.at: Likewise.
5941 * tests/sets.at: Likewise.
5942
5943 * data/m4sugar/m4sugar.m4: Sync from Autoconf, except that
5944 we comment out the Autoconf version number.
5945 * doc/bison.texinfo (Calc++ Scanner): Don't use atoi, as
5946 it's error-prone and "make maintainer-distcheck" rejects it.
5947
5948 * lib/subpipe.c: Include <fcntl.h> without checking for HAVE_FCNTL_H.
5949 Indent calls to "error" to pacify "make maintainer-distcheck",
5950 when the calls are not intended to be translated.
5951 * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't check for fcntl.h.
5952
5953 * src/Makefile.am (DEFS): Use +=, to pacify
5954 "make maintainer-distcheck".
5955 (bison_SOURCES): Add scan-skel.h.
5956 (sc_tight_scope): New rule, from coreutils.
5957
5958 * src/files.c (src_extension, header_extension):
5959 Now static, not extern.
5960 * src/getargs.c (short_options): Likewise.
5961 * src/muscle_tab.c (muscle_table): Likewise.
5962 * src/parse-gram.y (current_class, current_type, current_prec):
5963 Likewise.
5964 * src/reader.c (grammar_end, previous_rule_end): Likewise.
5965 * src/getargs.h: Redo comments to pacify "make maintainer-distcheck".
5966 * src/main.c (main): Cast bindtextdomain and textdomain calls to
5967 void, to avoid warning when NLS is disabled.
5968 * src/output.c: Include scan-skel.h.
5969 (scan_skel): Remove decl, since scan-skel.h does this.
5970 (output_skeleton):
5971 Indent calls to "error" to pacify "make maintainer-distcheck".
5972 * src/print_graph.c: Don't include <obstack.h>, as system.h does this.
5973 * src/reader.h (gram_end, gram_lineno): New decls to pacify
5974 "make maintainer-distcheck".
5975 * src/scan-skel.l (skel_lex, skel_get_lineno, skel_get_in):
5976 (skel_get_out, skel_get_leng, skel_get_text, skel_set_lineno):
5977 (skel_set_in, skel_set_out, skel_get_debug, skel_set_debug):
5978 (skel_lex_destroy, scan_skel): Move these decls to...
5979 * src/scan-skel.h: New file.
5980 * src/uniqstr.c (uniqstr_assert):
5981 Indent calls to "error" to pacify "make maintainer-distcheck".
5982
5983 * tests/Makefile.am ($(srcdir)/package.m4): Use $(VAR),
5984 not @VAR@.
5985
5986 * tests/torture.at: Revamp to avoid misuse of atoi that
5987 "make maintainer-distcheck" complained about.
5988
5989 * examples/extexi (message): Don't print a message more than once,
5990 and omit line-number decoration that makes Emacs compile think
5991 that informative messages are worth worrying about.
5992
5993 2005-07-22 Paul Eggert <eggert@cs.ucla.edu>
5994
5995 * configure.ac: Update version number.
5996
5997 * Makefile.am (SUBDIRS): Add examples; somehow this got removed
5998 accidentally.
5999 * examples/calc++/calc++-parser.yy: Remove from CVS, as it's
6000 autogenerated by the maintainer.
6001 * examples/calc++/.cvsignore: Add *.yy.
6002
6003 * lib/bitset.c (bitset_alloc): Don't cast xcalloc result.
6004 * lib/bitset_stats.c (bitset_stats_init): Likewise.
6005 * lib/bitsetv.c (bitsetv_alloc): Likewise.
6006
6007 * po/POTFILES.in: Add lib/xalloc-die.c; remove lib/xmalloc.c.
6008
6009 * src/relation.c (relation_transpose): Rewrite to avoid bogus complaint
6010 from maintainer-distcheck about casting the argument of 'free'.
6011
6012 * NEWS: Mention recent yytname changes.
6013 * THANKS: Add Anthony Heading, twlevo@xs4all.nl.
6014
6015 * bootstrap: For translations that have not yet been upgraded to
6016 the new runtime-po domain, prime the pump by extracting the
6017 relevant strings from the obsolete translations. This code can be
6018 removed once the bison-runtime domain has been translated by each
6019 team.
6020
6021 * src/scan-gram.l (<SC_PRE_CODE>.): Don't double-quote token names,
6022 now that token names are already quoted.
6023
6024 Fix problem reported by Anthony Heading.
6025 * data/glr.c (YYTOKEN_TABLE): New macro.
6026 (yytname): Define if YYTOKEN_TABLE.
6027 * data/yacc.c (YYTOKEN_TABLE, yytname): Likewise.
6028 * data/lalr1.cc (YYTOKEN_TABLE, yytname_): Likewise.
6029 (YYERROR_VERBOSE): Define the same way the other skeletons do.
6030 * src/output.c (prepare_symbols): Output token_table_flag.
6031
6032 2005-07-21 Paul Eggert <eggert@cs.ucla.edu>
6033
6034 * data/glr.c (yyinitGLRStack, yyreturn): Don't call malloc
6035 again if the first call fails.
6036
6037 * data/glr.c (yytnamerr): New function.
6038 (yyreportSyntaxError): Use it to dequote most string literals.
6039 * data/lalr1.c (yytname_): Renamed from yyname_, for compatibility
6040 with other skeletons. All uses changed.
6041 (yytnameerr_): New function.
6042 (yyreport_syntax_error): Use it to dequote most string literals.
6043 * data/yacc.c (yytnamerr): New function.
6044 (yyerrlab): Use it to decode most string literals.
6045 * doc/bison.texinfo (Decl Summary, Calling Convention):
6046 Clarify quoting convention of yytname.
6047 * src/output.c (prepare_symbols): Quote all names. This undoes
6048 the 2005-04-17 change, which is now accomplished (mostly) via
6049 changes in the parsers as described above.
6050 * tests/regression.at (Token definitions, Web2c Actions):
6051 Undo most 2005-04-17 change here, too.
6052
6053 2005-07-20 Paul Eggert <eggert@cs.ucla.edu>
6054
6055 Fix more problems reported by twlevo@xs4all.nl.
6056 * tests/cxx-type.at: Don't pipe output of ./types through sed to
6057 remove trailing spaces. This loses the exit status of ./types,
6058 and isn't needed since ./types shouldn't be emitting trailing
6059 spaces.
6060 * data/glr.c (yyreturn): Don't pop stack if yyinitStateSet failed,
6061 as the stack isn't valid in that case.
6062
6063 * src/scan-gram.l (gram_get_lineno, gram_get_in, gram_get_out):
6064 (gram_get_leng, gram_get_text, gram_set_lineno, gram_set_in):
6065 (gram_set_out, gram_get_debug, gram_set_debug, gram_lex_destroy):
6066 Add declarations to pacify "gcc -Wmissing-prototypes" when flex 2.5.31
6067 is used.
6068 * src/scan-skel.l (skel_get_lineno, skel_get_in, skel_get_out):
6069 (skel_get_leng, skel_get_text, skel_set_lineno, skel_set_in):
6070 (skel_set_out, skel_get_debug, skel_set_debug, skel_lex_destroy):
6071 Likewise.
6072
6073 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Work even with
6074 overly-picky compilers that reject 'char *foo = "bar";'.
6075
6076 * src/symtab.c (SYMBOL_ATTR_PRINT, symbol_print): Direct output
6077 to FILE * parameter, not to stderr. This fixes a typo introduced
6078 in the 2005-07-12 change.
6079
6080 * lib/subpipe.c (create_subpipe): Rewrite slightly to avoid
6081 warnings from GCC 4.
6082
6083 * data/glr.c (yyexpandGLRStack, yyaddDeferredAction, yyexpandGLRStack):
6084 (yyglrShiftDefer, yysplitStack):
6085 Remove unused parameters b4_pure_formals. All uses changed.
6086 (yyglrShift): Remove unused parameters b4_user_formals.
6087 All uses changed.
6088 (yyglrReduce): Removed unused parameter yylocp. All uses changed.
6089
6090 2005-07-18 Paul Eggert <eggert@cs.ucla.edu>
6091
6092 Destructor cleanups and regularization among the three skeletons.
6093 * NEWS: Document the behavior changes.
6094 * data/glr.c (yyrecoverSyntaxError): Don't bother to pop the
6095 stack before failing, as the cleanup code will do it for us now.
6096 * data/lalr1.cc (yyerrlab): Likewise.
6097 * data/glr.c (yyparse): Pop everything off the stack before
6098 freeing it, so that destructors get called properly.
6099 * data/lalr1.cc (yyreturn): Likewise.
6100 * data/yacc.c (yyreturn): Pop and destroy the start symbol, too.
6101 This is more consistent.
6102 * doc/bison.texinfo (Destructor Decl): Mention more reasons
6103 why destructors might be called. 1.875 -> 2.1.
6104 (Destructor Decl, Decl Summary, Table of Symbols):
6105 Some English-language cleanups for %destructor.
6106 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
6107 Add output line for destructor of start symbol.
6108 * tests/calc.at (AT_CHECK_CALC): Add one to line counts,
6109 because of that same extra output line.
6110
6111 * NEWS: Document minor wording changes in diagnostics of
6112 Bison-generated parsers.
6113 * data/glr.c (yyMemoryExhausted): Renamed from yyStackOverflow.
6114 Remove unused formals. All uses changed.
6115 (yyreportAmbiguity): "ambiguity detected" -> "syntax is ambiguous".
6116 (yyparse): Rename yyoverflowlab to yyexhaustedlab.
6117 * data/yacc.c (yyparse): "parser stack overflow" -> "memory exhausted".
6118 Rename yyoverflowab to yyexhaustedlab.
6119 When memory exhaustion occurs during syntax-error reporting,
6120 report it separately rather than in a single diagnostic; this
6121 eases translation.
6122 * doc/bison.texinfo (Memory Management): Renamed from Stack Overflow.
6123 (Memory Exhausted): Renamed from Parser Stack Overflow.
6124 Revamp wording slightly to prefer "memory exhaustion".
6125 * tests/actions.at: "parser stack overflow" -> "memory exhausted".
6126
6127 * data/c.m4 (b4_yysymprint_generate): Use YYFPRINTF, not fprintf.
6128
6129 Add i18n support to the GLR skeleton. Partially fix the C++
6130 skeleton; a C++ expert needs to finish this. Remove debugging
6131 msgids; there's little point to having them translated, since they
6132 can be understood only by someone who can read the
6133 (English-language) source code.
6134
6135 Generate runtime-po/bison-runtime.pot automatically, so that we
6136 don't have to worry about garbage getting in that file. We'll
6137 make sure after the next official release that old msgids don't
6138 get lost. See
6139 <http://lists.gnu.org/archive/html/bison-patches/2005-07/msg00119.html>.
6140
6141 * runtime-po/Makefile.in.in, runtime-po/bison-runtime.pot: Remove.
6142 Now auto-generated.
6143 * PACKAGING: Don't claim that Gawk, GCC, Perl use this method yet.
6144 Fix typos in explanations of the runtime file.
6145 * bootstrap: Change gettext keyword from YYI18N to YY_.
6146 Use standard Makefile.in.in in runtime-po, since we'll arrange
6147 for backward-compatible bison-runtime.po files in a different way.
6148 * data/glr.c (YY_): New macro, from yacc.c.
6149 (yyuserAction, yyreportAmbiguity, yyreportSyntaxError, yyparse):
6150 Translate messages intended for users.
6151 (yyreportSyntaxError): Change "virtual memory" to "memory" to match
6152 the wording in the other skeletons. We don't know that the memory
6153 is virtual.
6154 * data/lalr1.cc (YY_): Renamed from _. All uses changed.
6155 Use same method that yacc.c uses.
6156 Don't translate debugging messages.
6157 (yy::yyreport_syntax_error): Put in a FIXME for the i18n stuff;
6158 it doesn't work (yet), and requires C++ expertise to fix.
6159 * data/yacc.c (YY_): Renamed from YY18N. All uses changed.
6160 Move defn to a more logical place, to be consistent with other
6161 skeletons.
6162 Don't translate debugging messages.
6163 Don't assume line numbers fit in unsigned int; use unsigned long fmts.
6164 * doc/bison.texinfo: Mention <libintl.h>. Change glibc cross reference
6165 to gettext cross reference. Add indexing terms. Mention YYENABLE_NLS.
6166 * runtime-po/POTFILES.in: Add data/glr.c, data/lalr1.cc.
6167
6168 Fix yyerror / yylex test glitches noted by twlevo@xs4all.nl.
6169 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Have yyerror return
6170 void, not int.
6171 * tests/glr-regression.at (Badly Collapsed GLR States):
6172 Likewise.
6173 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
6174 yylex should return 0 at EOF rather than aborting.
6175
6176 Improve tests for stack overflow in GLR parser.
6177 Problem reported by twlevo@xs4all.nl.
6178 * data/glr.c (struct yyGLRStack): Remove yyerrflag member.
6179 All uses removed.
6180 (yyStackOverflow): Just longjmp, but with value 2 so that caller
6181 can handle the problem.
6182 (YYCHK1): Use goto (a la yacc.c) rather than setting a flag.
6183 (yyparse): New local variable yyresult to record the result.
6184 Use result of setjmp to set it, rather than storing itinto
6185 struct.
6186 (yyDone): Remove label.
6187 (yyacceptlab, yyabortlab, yyoverflowlab, yyreturn): New labels,
6188 to mimic yacc.c. Do not discard lookahead if it's EOF (possible
6189 if YYABORT is used).
6190 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Exit with
6191 yyparse status; put status > 1 into diagnostic.
6192 Check that status==2 works.
6193 * tests/calc.at, tests/cxx-type.at, tests/glr-regression.at:
6194 Use exit status 3 for failure to open (which shouldn't happen).
6195
6196 2005-07-17 Paul Eggert <eggert@cs.ucla.edu>
6197
6198 * tests/conflicts.at (%nonassoc and eof): Don't exit with status
6199 1 on syntax error; just let yyparse do its thing.
6200 * tests/glr-regression.at (Badly Collapsed GLR States): Likewise.
6201 * tests/torture.at (AT_DATA_STACK_TORTURE): Likewise.
6202 (Exploding the Stack Size with Alloca):
6203 (Exploding the Stack Size with Malloc):
6204 Expect exit status 2, not 1, since the parser is supposed to blow
6205 its stack. Problem reported by twlevo@xs4all.nl.
6206
6207 * data/glr.c (yyparse): Don't assume that the initial calls
6208 to YYMALLOC succeed; in that case, yyparse incorrectly returned 0.
6209 Print a stack-overflow message and fail instead.
6210 Initialize the line-number information before creating the stack,
6211 so that the stack-overflow message can report line zero safely.
6212
6213 2005-07-14 Paul Eggert <eggert@cs.ucla.edu>
6214
6215 Fix problems reported by twlevo@xs4all.nl.
6216 * data/glr.c (YYSTACKEXPANDABLE): Don't define if already defined.
6217 (yyuserMerge): Provide a default case if b4_mergers is empty.
6218 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Define YYSTACKEXPANDABLE.
6219 * tests/glr-regression.at
6220 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
6221 Add casts to pacify C++ compilers.
6222 * tests/glr-regression.at (Improper merging of GLR delayed action
6223 sets): Declare yylex before using it.
6224 * tests/Makefile.am (maintainer-check-g++): Fix a stray
6225 $(GXX) that escaped the renaming of GXX to CXX. Remove bogus
6226 test for valgrind; valgrind is independent of g++.
6227 (maintainer-check-posix): Add _POSIX2_VERSION=200112, to check
6228 for compatibility with POSIX 1003.1-2001 (if running coreutils).
6229 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Port to stricter C++.
6230 Use a destructor, so that we can expand the stack. Change
6231 YYSTYPE to char * so that we can free it. Cast result of malloc.
6232
6233 2005-07-13 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
6234
6235 * data/glr.c (yyuserAction): Fix uninitialized variable that caused
6236 a valgrind failure. Problem reported by twlevo@xs4all.nl.
6237
6238 2005-07-13 Paul Eggert <eggert@cs.ucla.edu>
6239
6240 * PACKAGING: New file, suggested by Bruno Haible and taken from
6241 similar wording in gettext's PACKAGING file.
6242 * NEWS: Mention PACKAGING.
6243 * Makefile.am (EXTRA_DIST): Add PACKAGING.
6244
6245 2005-07-12 Paul Eggert <eggert@cs.ucla.edu>
6246
6247 * NEWS: Document recent i18n improvements.
6248 * bootstrap: Get runtime translations into runtime-po.
6249 Create runtime-po files automatically, if possible.
6250 * configure.ac: Invoke BISON_I18N, so that we eat our own dog food.
6251 * data/yacc.c: Rewrite inclusion of <libintl.h> so that ENABLE_NLS
6252 does not infringe on the user's name space.
6253 (YYENABLE_NLS): Renamed from ENABLE_BISON_NLS.
6254 * doc/bison.texinfo (Internationalization): Revamp the English
6255 and Texinfo syntax a bit, to try to make it clearer.
6256 (Bison Options, Option Cross Key): Mention --print-localedir.
6257 * m4/bison-i18n.m4 (BISON_I18N): Rename ENABLE_BISON_NLS to
6258 YYENABLE_NLS. Quote a bit more.
6259 * runtime-po/.cvsignore: New file.
6260 * runtime-po/Makefile.in.in (mostlyclean): Remove *.old.pot.
6261 * runtime-po/Rules-quot: Remove; now created by bootstrap.
6262 * runtime-po/quot.sed: Likewise.
6263 * runtime-po/boldquot.sed: Likewise.
6264 * runtime-po/en@quot.header: Likewise.
6265 * runtime-po/en@boldquot.header: Likewise.
6266 * runtime-po/insert-header.sin: Likewise.
6267 * runtime-po/remove-potcdate.sin: Likewise.
6268 * runtime-po/Makevars: Likewise.
6269 * runtime-po/LINGUAS: Likewise.
6270 * runtime-po/de.po: Likewise; we will rely on the translation project
6271 to maintain this, so "bootstrap" should get it.
6272 * src/getarg.c (PRINT_LOCALEDIR_OPTION): Let the C compiler determine
6273 its value.
6274 * src/main.c (main): Bind the bison-runtime domain, too.
6275
6276 2005-07-12 Bruno Haible <bruno@clisp.org>
6277
6278 * data/yacc.c: Include <libintl.h> when NLS is enabled.
6279 (YYI18N): Renamed from _. Use dgettext when NLS is enabled.
6280 * po/POTFILES.in: Remove autogenerated file src/parse-gram.c.
6281 * runtime-po: New directory.
6282 * runtime-po/Makefile.in.in: New file, copied from po/, with modified
6283 $(DOMAIN).pot-update rule, so that old messages are never dropped.
6284 * runtime-po/Rules-quot: New file, copied from po/.
6285 * runtime-po/quot.sed: Likewise.
6286 * runtime-po/boldquot.sed: Likewise.
6287 * runtime-po/en@quot.header: Likewise.
6288 * runtime-po/en@boldquot.header: Likewise.
6289 * runtime-po/insert-header.sin: Likewise.
6290 * runtime-po/remove-potcdate.sin: Likewise.
6291 * runtime-po/Makevars: New file.
6292 * runtime-po/POTFILES.in: New file.
6293 * runtime-po/LINGUAS: New file.
6294 * runtime-po/bison-runtime.pot: New file.
6295 * runtime-po/de.po: New file.
6296 * m4/bison.m4: New file.
6297 * Makefile.am (SUBDIRS): Add runtime-po.
6298 (aclocaldir, aclocal_DATA): New variables.
6299 * configure.ac: Add AC_CONFIG_FILES of runtime-po/Makefile.in.
6300 Define aclocaldir.
6301 * src/getargs.c (usage): Document --print-localedir option.
6302 (PRINT_LOCALEDIR_OPTION): New enum item.
6303 (long_options): Add --print-localedir option.
6304 (getargs): Handle --print-localedir option.
6305 * doc/bison.texinfo (Bison Parser): Remove paragraph about _().
6306 (Internationalization): New section.
6307
6308 2005-07-12 Akim Demaille <akim@epita.fr>
6309
6310 * src/symtab.h, src/symtab.c (symbol_print): Swap the arguments,
6311 for consistency with the rest of the code.
6312 * src/symlist.h, src/symlist.c (symbol_list_print): Ditto.
6313 Add separators.
6314
6315 2005-07-12 Akim Demaille <akim@epita.fr>
6316
6317 * src/parse-gram.y: Use %printer instead of YYPRINT.
6318
6319 2005-07-12 Akim Demaille <akim@epita.fr>
6320
6321 * src/symtab.h, src/symtab.c (symbol_print): New.
6322 * src/symlist.h, src/symlist.c (symbol_list_print): New.
6323 * src/symlist.c (symbol_list_n_type_name_get): Report the culprit.
6324
6325 2005-07-12 Akim Demaille <akim@epita.fr>
6326
6327 * data/glr.c (b4_syncline): Fix (swap) the definitions of
6328 b4_at_dollar and b4_dollar_dollar.
6329
6330 2005-07-11 Paul Eggert <eggert@cs.ucla.edu>
6331
6332 * doc/bison.texinfo (Mystery Conflicts): Add reference to DeRemer
6333 and Pennello's paper.
6334
6335 2005-07-09 Paul Eggert <eggert@cs.ucla.edu>
6336
6337 * data/yacc.c (yyparse): Undo previous patch. Instead,
6338 set yylsp[0] and yyvsp[0] only if the initial action
6339 sets yylloc and yylval, respectively.
6340
6341 * data/yacc.c (yyparse): In the initial action, set
6342 yylsp[0] and yyvsp[0] rather than yylloc and yylval.
6343 This avoids the use of undefined variables if the initial
6344 action does not set yylloc and/or yylval.
6345
6346 2005-07-07 Paul Eggert <eggert@cs.ucla.edu>
6347
6348 * examples/calc++/calc++-driver.cc, examples/calc++/calc++-driver.hh:
6349 * examples/calc++/calc++-scanner.ll, examples/calc++/calc++.cc:
6350 Remove from CVS. These files are automatically generated.
6351 * examples/extexi: Clarify that this file is now part of Bison,
6352 not GNU M4, and that it works with any POSIX-compatible Awk.
6353 * examples/calc++/Makefile.am (run_extexi): Remove; not used.
6354 ($(calc_extracted)): Renamed from $(calc_sources_extracted),
6355 so that we also get calc++-parser.yy. Geneate it.
6356 Use $(AWK), not gawk, since any conforming Awk will do.
6357 Put comment before action, since older 'make' can't handle comment
6358 in action.
6359 $(BUILT_SOURCES): List all built sources, not just some of them.
6360 $(MAINTAINERCLEANFILES): Remove *.stamp, and all built sources.
6361 $($(srcdir)/calc++-parser.stamp): Work even if POSIXLY_CORRECT.
6362 $($(calc_sources_generated)): Remove unnecessary test for existence
6363 of target. (This had a shell syntax error anyway; a stray "x".)
6364 (calc_extracted): List $(srcdir)/calc++-parser.yy, not
6365 calc++-parser.yy.
6366 * examples/.cvsignore, examples/calc++/.cvsignore: New files.
6367
6368 * bootstrap (gnulib_modules): Add gettext, now that it's no longer
6369 implied by the other modules.
6370
6371 2005-07-06 Akim Demaille <akim@epita.fr>
6372
6373 Bind examples/calc++ to the package.
6374 * examples/calc++/Makefile: Remove, replaced by...
6375 * examples/calc++/Makefile.am: ... this new file.
6376 * examples/calc++/test: Remove input.
6377 * examples/calc++/compile: Remove.
6378 * examples/Makefile.am: New.
6379 * configure.ac, Makefile.am: Adjust.
6380 * doc/Makefile.am (clean-local): New, for more recent texi2dvis.
6381
6382 2005-07-05 Paul Eggert <eggert@cs.ucla.edu>
6383
6384 * data/glr.c (yyFail): Drastically simplify; since the format argument
6385 never had any % directives, we can simply pass it to yyerror.
6386 (yyparse): Use "t a; a=b;" rather than "t a = b;" when a will
6387 be modified later, as that is the usual style in glr.c.
6388 Problems reported by Paul Hilfinger.
6389
6390 Rewrite GLR parser to catch more buffer overrun, storage exhaustion,
6391 and size overflow errors.
6392 * data/glr.c: Include <stdio.h> etc. after user prolog, not before,
6393 in case the user prolog sets feature-test macros like _GNU_SOURCE.
6394 (YYSIZEMAX): New macro.
6395 (yystpcpy): New function, taken from yacc.c.
6396 (struct yyGLRStack.yyspaceLeft): Now size_t, not int.
6397 (yyinitGLRStack, yyfreeGLRstack): Remove unnecessary forward decls,
6398 so that we don't have to maintain their signatures.
6399 (yyFail): Check for buffer overflow, by using vsnprintf rather
6400 than vsprintf. Allocate a bigger buffer if possible.
6401 Report an error if buffer allocation fails.
6402 (yyStackOverflow): New function.
6403 (yyinitStateSet, yyinitGLRStack): Return a boolean indicating whether
6404 the initialization was successful. It might fail if storage was
6405 exhausted.
6406 (yyexpandGLRStack): Add more checks for storage allocation failure.
6407 Use yyStackOverflow to report failures.
6408 (yymarkStackDeleted, yyglrShift, yyglrShiftDefer, yydoAction):
6409 (yysplitStack, yyprocessOneStack, yyparse, yypstack):
6410 Don't assume stack number fits in int.
6411 (yysplitStack): Check for storage allocation failure.
6412 (yysplitStack, yyprocessOneStack): Add pure_formals, so that we
6413 can print diagnostics on storage allocation failure. All callers
6414 changed.
6415 (yyresolveValue): Use yybool for boolean.
6416 (yyreportSyntaxError): Check for size-calculation overflow.
6417 This code is taken from yacc.c.
6418 (yyparse): Check for storage allocation errors when allocating
6419 the initial stack.
6420
6421 2005-07-05 Akim Demaille <akim@epita.fr>
6422
6423 Extract calc++ from the documentation.
6424 * doc/bison.texinfo (Calc++): Add the extraction marks.
6425 * examples/extexi: New, from the aborted GNU Programming 2E.
6426 Separate the different paragraph of a file with empty lines.
6427 * examples/Makefile: Use it to extract the whole calc++ example.
6428
6429 2005-06-24 Akim Demaille <akim@epita.fr>
6430
6431 * doc/bison.texinfo (C++ Parser Interface): Use defcv to define
6432 class typedefs.
6433
6434 2005-06-22 Akim Demaille <akim@epita.fr>
6435
6436 * doc/bison.texinfo (C++ Language Interface): First stab.
6437 (C++ Parsers): Remove.
6438
6439 2005-06-22 Akim Demaille <akim@epita.fr>
6440
6441 * data/lalr1.cc (yylex_): Honor %lex-param.
6442
6443 2005-06-22 Akim Demaille <akim@epita.fr>
6444
6445 Start a set of simple examples.
6446 * examples/calc++/Makefile, examples/calc++/calc++-driver.cc,
6447 * examples/calc++/calc++-driver.hh,
6448 * examples/calc++/calc++-parser.yy,
6449 * examples/calc++/calc++-scanner.ll, examples/calc++/calc++.cc,
6450 * examples/calc++/compile, examples/calc++/test: New.
6451
6452 2005-06-09 Paul Eggert <eggert@cs.ucla.edu>
6453
6454 * data/yacc.c (malloc, free) [defined __cplusplus]: Wrap inside
6455 extern "C" {}. This fixes a problem reported by Paul Hilfinger,
6456 which stems from the 2005-05-27 patch.
6457
6458 2005-06-06 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
6459
6460 * data/glr.c: Modify treatment of unused parameters to permit use
6461 of g++ (which doesn't allow __attribute__ ((unused)) for parameters).
6462
6463 2005-05-30 Paul Eggert <eggert@cs.ucla.edu>
6464
6465 Fix infringement on user name space reported by Janos Zoltan Szabo.
6466 * data/yacc.c (yyparse): strlen -> yystrlen.
6467
6468 2005-05-30 Akim Demaille <akim@epita.fr>
6469
6470 * data/lalr1.cc (_): New.
6471 Translate the various messages.
6472
6473 2005-05-27 Paul Eggert <eggert@cs.ucla.edu>
6474
6475 Fix infringement on user name space reported by Bruno Haible.
6476 * data/yacc.c (YYSIZE_T): Define first, so that later decls can use it.
6477 Prefer GCC's __SIZE_TYPE__ if available, so that we don't infringe on
6478 the user's name space.
6479 (alloca): Include <stdlib.h> to get it, if it's not built in.
6480 (YYMALLOC, YYFREE): Define only if needed.
6481 (malloc, free): Declare, but only if needed, as this infringes on
6482 the user name space.
6483
6484 2005-05-25 Paul Eggert <eggert@cs.ucla.edu>
6485
6486 Fix BeOS, FreeBSD, MacOS porting problems reported by Bruno Haible.
6487 * lib/bitset.c (bitset_print): Don't assume size_t can be printed
6488 with %d format.
6489 * lib/ebitset.c (min, max): Undef before defining.
6490 * lib/vbitset.c (min, max): Likewise.
6491 * lib/subpipe.c (create_subpipe): Save local variables in case
6492 vfork clobbers them.
6493
6494 2005-05-24 Bruno Haible <bruno@clisp.org>
6495
6496 * tests/synclines.at (AT_SYNCLINES_COMPILE): Add support for the
6497 error message syntax used by gcc-4.0.
6498
6499 2005-05-23 Paul Eggert <eggert@cs.ucla.edu>
6500
6501 * README: Mention m4 1.4.3. Remove obsolete advice about
6502 Sun Forte Developer 6 update 2, VMS, and MS-DOS.
6503
6504 * bootstrap: Remove workaround for problem I encountered with
6505 gettext 0.14.1; it seems to be fixed now.
6506
6507 2005-05-22 Paul Eggert <eggert@cs.ucla.edu>
6508
6509 * NEWS: Version 2.0a.
6510
6511 * src/files.c: Include "stdio-safer.h"; this fixes a typo in
6512 the previous change.
6513
6514 Various maintainer cleanups.
6515 * .cvsignore: Add a.exe, a.out, b.out,, conf[0-9]*, confdefs*,
6516 conftest*, for benefit of CVS commands run at the same time as
6517 "configure". Add build-aux, since "bootstrap" now creates it and
6518 its subfiles.
6519 * Makefile.cfg (move_if_change): Remove.
6520 * Makefile.maint: Remove the update stuff; we now use "bootstrap".
6521 (ftp-gnu, www-gnu, move_if_change, local_updates, update):
6522 (po_repo, do-po-update, po-update, wget_files, get-targets):
6523 (config.guess-url_prefix, config.sub-url_prefix):
6524 (ansi2knr.c-url_prefix, texinfo.tex-url_prefix):
6525 (standards.texi-url_prefix, make-stds.texi-url_prefix, taget, url):
6526 ($(get-targets), cvs-files, automake_repo, wget-update, cvs-update):
6527 Remove.
6528 * configure.ac (AC_CONFIG_AUX_DIR): Change from config to build-aux;
6529 this is now the recommended name.
6530 * config/.cvsignore: Remove config.guess, config.rpath, config.sub,
6531 depcomp, install-sh, mdate-sh, missing, mkinstalldirs, texinfo.tex,
6532 ylwrap. These files now go into build-aux.
6533 * config/move-if-change: Remove.
6534 * config/prev-version.txt: Bump from 1.75 to 2.0.
6535
6536 * bootstrap: Add stdio-safer, unistd-safer modules.
6537 Remove m4/glibc2.m4 (introduced by latest gnulib, but
6538 we don't need it).
6539 * lib/.cvsignore: Add dup-safer.c, fd-safer.c,
6540 fopen-safer.c, stdio-safer.h, unistd-safer.h.
6541 * lib/subpipe.c: Include "unistd-safer.h".
6542 (create_subpipe): Make sure all the newly-created
6543 file descriptors are > 2, so that diagnostics don't
6544 get sent down them (which might cause Bison to hang, in theory).
6545 * m4/.cvsignore: Add stdio-safer.m4, unistd-safer.m4.
6546 * src/files.c (xfopen): Use fopen_safer, not fopen.
6547
6548 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Port
6549 yesterday's yacc.c fix.
6550
6551 2005-05-21 Paul Eggert <eggert@cs.ucla.edu>
6552
6553 * data/glr.c, data/lalr1.cc: Update copyright date.
6554
6555 Fix a destructor bug reported by Wolfgang Spraul in
6556 <http://lists.gnu.org/archive/html/bug-bison/2005-05/msg00042.html>.
6557 * data/yacc.c (yyabortlab): Don't call destructor, and
6558 don't set yychar to EMPTY.
6559 (yyoverflowlab): Don't call destructor.
6560 (yyreturn): Call destructor, if yychar is neither YYEOF nor YYEMPTY.
6561 * tests/calc.at (AT_CHECK_CALC): Expect one fewer output lines,
6562 since we no longer output the message "discarding lookahead token
6563 end of input ()".
6564
6565 2005-05-20 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
6566
6567 * data/glr.c (YY_SYMBOL_PRINT): Don't print newline at end to
6568 fix a small glitch in debugging output.
6569 (yyprocessOneStack, yyrecoverSyntaxError, yyparse): Print newline
6570 after YY_SYMBOL_PRINT where needed.
6571
6572 (struct yyGLRState): Add some comments.
6573 (struct yySemanticOption): Add some comments.
6574 (union yyGLRStackItem): Add comment.
6575
6576 (yymergeOptionSets): Correct this to properly perform the union,
6577 avoiding infinite reported by Michael Rosien.
6578 Update comment.
6579
6580 * tests/glr-regression.at: Add test for GLR merging error reported
6581 by M. Rosien.
6582
6583 2005-05-13 Paul Eggert <eggert@cs.ucla.edu>
6584
6585 * COPYING, ChangeLog, GNUmakefile, HACKING, Makefile.am,
6586 Makefile.cfg, Makefile.maint, NEWS, README, README-alpha,
6587 README-cvs, TODO, bootstrap, configure.ac, data/Makefile.am,
6588 data/README, data/c.m4, data/glr.c, data/lalr1.cc, data/yacc.c,
6589 data/m4sugar/m4sugar.m4, doc/Makefile.am, doc/bison.texinfo,
6590 doc/fdl.texi, doc/gpl.texi, doc/refcard.tex, lib/Makefile.am,
6591 lib/abitset.c, lib/abitset.h, lib/bbitset.h, lib/bitset.c,
6592 lib/bitset.h, lib/bitset_stats.c, lib/bitset_stats.h,
6593 lib/bitsetv-print.c, lib/bitsetv-print.h, lib/bitsetv.c,
6594 lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/get-errno.c,
6595 lib/get-errno.h, lib/lbitset.c, lib/lbitset.h, lib/libiberty.h,
6596 lib/main.c, lib/subpipe.c, lib/subpipe.h, lib/timevar.c,
6597 lib/timevar.def, lib/timevar.h, lib/vbitset.c, lib/vbitset.h,
6598 lib/yyerror.c, m4/cxx.m4, m4/m4.m4, m4/subpipe.m4, m4/timevar.m4,
6599 m4/warning.m4, src/LR0.c, src/LR0.h, src/Makefile.am, src/assoc.c,
6600 src/assoc.h, src/closure.c, src/closure.h, src/complain.c,
6601 src/complain.h, src/conflicts.c, src/conflicts.h, src/derives.c,
6602 src/derives.h, src/files.c, src/files.h, src/getargs.c,
6603 src/getargs.h, src/gram.c, src/gram.h, src/lalr.c, src/lalr.h,
6604 src/location.c, src/location.h, src/main.c, src/muscle_tab.c,
6605 src/muscle_tab.h, src/nullable.c, src/nullable.h, src/output.c,
6606 src/output.h, src/parse-gram.c, src/parse-gram.h,
6607 src/parse-gram.y, src/print.c, src/print.h, src/print_graph.c,
6608 src/print_graph.h, src/reader.c, src/reader.h, src/reduce.c,
6609 src/reduce.h, src/relation.c, src/relation.h, src/scan-gram.l,
6610 src/scan-skel.l, src/state.c, src/state.h, src/symlist.c,
6611 src/symlist.h, src/symtab.c, src/symtab.h, src/system.h,
6612 src/tables.c, src/tables.h, src/uniqstr.c, src/uniqstr.h,
6613 src/vcg.c, src/vcg.h, src/vcg_defaults.h, tests/Makefile.am,
6614 tests/actions.at, tests/c++.at, tests/calc.at, tests/conflicts.at,
6615 tests/cxx-type.at, tests/existing.at, tests/glr-regression.at,
6616 tests/headers.at, tests/input.at, tests/local.at, tests/output.at,
6617 tests/reduce.at, tests/regression.at, tests/sets.at,
6618 tests/synclines.at, tests/testsuite.at, tests/torture.at:
6619 Update FSF postal mail address.
6620
6621 2005-05-11 Paul Eggert <eggert@cs.ucla.edu>
6622
6623 * tests/local.at (AT_COMPILE_CXX): Treat LDFLAGS like AT_COMPILE does.
6624 Problem reported by Ralf Menzel.
6625
6626 2005-05-01 Paul Eggert <eggert@cs.ucla.edu>
6627
6628 * tests/actions.at: Test that stack overflow invokes destructors.
6629 From Marcus Holland-Moritz.
6630 * data/yacc.c (yyerrlab): Move the code that destroys the stack
6631 from here....
6632 (yyreturn): to here. That way, destructors are called properly
6633 even if the stack overflows, or the user calls YYACCEPT or
6634 YYABORT. Stack-overflow problem reported by Marcus Holland-Moritz.
6635 (yyoverflowlab): Destroy the lookahead.
6636
6637 2005-04-24 Paul Eggert <eggert@cs.ucla.edu>
6638
6639 * data/yacc.c (YYSTACK_ALLOC_MAXIMUM): Add more-descriptive comment.
6640
6641 2005-04-17 Paul Eggert <eggert@cs.ucla.edu>
6642
6643 * NEWS: Bison-generated C parsers no longer quote literal strings
6644 associated with tokens.
6645 * src/output.c (prepare_symbols): Don't escape strings,
6646 since users don't want to see C escapes.
6647 * tests/calc.at (AT_CHECK_CALC): Adjust to lack of quotes
6648 in diagnostics.
6649 * tests/input.at (Torturing the Scanner): Likewise.
6650 * tests/regression.at (Token definitions, Web2c Actions): Likewise.
6651
6652 2005-04-16 Paul Eggert <eggert@cs.ucla.edu>
6653
6654 * tests/torture.at (AT_INCREASE_DATA_SIZE): Skip the test if
6655 the data size is known to be too small and we can't increase it.
6656 This works around an HP-UX 11.00 glitch reported by Andrew Benham.
6657
6658 2005-04-15 Paul Eggert <eggert@cs.ucla.edu>
6659
6660 * src/parse-gram.y: Include quotearg.h.
6661 (string_as_id): Quote $1 before using it as a key, since the
6662 lexer no longer quotes it for us.
6663 (string_content): Don't strip quotes, since lexer no longer
6664 quotes it for us.
6665 * src/scan-gram.l: Include quotearg.h.
6666 ("\""): Omit quote.
6667 ("'"<SC_ESCAPED_CHARACTER>): Quote symbol before using it as
6668 a key, since the rest of the lexer doesn't quote it.
6669 * src/symtab.c (symbol_get): Don't quote symbol; caller does it now.
6670 * tests/regression.at (Token definitions): Check for backslashes
6671 in token strings.
6672
6673 * data/yacc.c (YYSTACK_ALLOC_MAXIMUM): New macro.
6674 (YYSIZE_T): Define to unsigned long int when using an older compiler.
6675 (yyparse): Revamp code to generate long syntax error message, to
6676 make it easier to translate, and to avoid problems with arithmetic
6677 overflow. Change "virtual memory" to "memory" in diagnostic, since
6678 we don't know whether the memory is virtual.
6679
6680 2005-04-13 Paul Eggert <eggert@cs.ucla.edu>
6681
6682 * NEWS: Bison-generated C parsers now use the _ macro to
6683 translate strings.
6684 * data/yacc.c (_) [!defined _]: New macro.
6685 All English strings wrapped inside this macro.
6686 * doc/bison.texinfo (Bison Parser): Document _.
6687 * po/POTFILES.in: Include src/parse-gram.c, since it now
6688 includes translateable strings that parse-gram.y doesn't.
6689
6690 2005-04-12 Paul Eggert <eggert@cs.ucla.edu>
6691
6692 * src/symtab.c (symbol_make_alias): Call symbol_type_set,
6693 reverting the 2004-10-11 change to this function.
6694 (symbol_check_alias_consistency): Don't call symbol_type_set
6695 if the type name is already correct.
6696 * tests/input.at (Typed symbol aliases): New test, from Tim Van Holder.
6697
6698 2005-03-25 Paul Eggert <eggert@cs.ucla.edu>
6699
6700 * tests/regression.at (Token definitions): Don't use a token named
6701 c, as that generates a "#define c ..." that runs afoul of buggy
6702 stdlib.h that uses the identifier c as a member of struct
6703 drand48_data. Problem reported by Horst Wente.
6704
6705 2005-03-21 Paul Eggert <eggert@cs.ucla.edu>
6706
6707 * bootstrap: Change translation URL from
6708 http://www2.iro.umontreal.ca/~gnutra/po/maint/bison/ to
6709 http://www.iro.umontreal.ca/translation/maint/bison/ to avoid
6710 redirection glitches. Problem reported by twlevo@xs4all.nl.
6711
6712 2005-03-20 Paul Eggert <eggert@cs.ucla.edu>
6713
6714 * tests/local.at (AT_COMPILE, AT_COMPILE_CXX): Don't put options
6715 after operands; POSIX says this isn't portable for the c99 command.
6716
6717 2005-03-18 Paul Eggert <eggert@cs.ucla.edu>
6718
6719 * tests/glr-regression.at (glr-regr2a.y): Try to dump core
6720 immediately if a data overrun has occurred; this may help us track
6721 down what may be a spurious failure on MacOS.
6722
6723 2005-03-17 Paul Eggert <eggert@cs.ucla.edu>
6724
6725 Respond to problems reported by twlevo@xs4all.nl.
6726
6727 * bootstrap: Use "trap - 0" rather than the unportable "trap 0".
6728
6729 * src/vcg.h: Comment fix.
6730 * src/vcg_defaults.h: Parenthesize macro bodies to make them safe.
6731 (G_CMAX): Change to -1 instead of INT_MAX.
6732
6733 * data/yacc.c (yyparse): Omit spaces before #line.
6734
6735 2005-03-15 Paul Eggert <eggert@cs.ucla.edu>
6736
6737 * src/tables.c (state_number_to_vector_number): Put it inside an
6738 "#if 0", since it's not currently used. Problem reported by
6739 Roland McGrath.
6740
6741 2005-03-06 Paul Eggert <eggert@cs.ucla.edu>
6742
6743 * src/output.c (escaped_output): Renamed from
6744 escaped_file_name_output, since we now use it for symbol tags as
6745 well. All uses changed.
6746 (symbol_destructors_output, symbol_printers_output):
6747 Escape symbol tags too.
6748 Problem reported by Matyas Forstner in
6749 <http://lists.gnu.org/archive/html/bug-bison/2005-03/msg00009.html>.
6750
6751 * src/muscle_tab.c (muscle_code_grow): Don't quote numbers; it's
6752 not needed.
6753 * src/output.c (user_actions_output, token_definitions_output,
6754 symbol_destructors_output, symbol_printers_output): Likewise.
6755 * src/reader.c (prologue_augment): Likewise.
6756 * src/scan-gram.l (handle_action_dollar, handle_action_at): Likewise.
6757
6758 * src/vcg.c (output_edge): Don't quote linestyle arg.
6759 Problem reported by twlevo@xs4all.nl.
6760
6761 2005-02-28 Paul Eggert <eggert@cs.ucla.edu>
6762
6763 * doc/bison.texinfo (Semantic Tokens): Fix scoping problem in
6764 example, reported by Derek M Jones. Also, make the example even
6765 more outrageous, to better illustrate how bad the problem is.
6766
6767 2005-02-24 Paul Eggert <eggert@cs.ucla.edu>
6768
6769 * doc/bison.texinfo (Mfcalc Symtab): Correct the prototype for
6770 putsym. Typo reported by Sebastian Piping.
6771
6772 2005-02-23 Paul Eggert <eggert@cs.ucla.edu>
6773
6774 * doc/bison.texinfo (Language and Grammar): some -> same
6775 (Epilogue): int he -> in the
6776 Typos reported by Sebastian Piping via Justin Pence.
6777
6778 2005-02-07 Paul Eggert <eggert@cs.ucla.edu>
6779
6780 * tests/glr-regression.at (Improper handling of embedded actions
6781 and dollar(-N) in GLR parsers): Renamed from "Improper handling of
6782 embedded actions and $-N in GLR parsers", work around an Autoconf bug
6783 with dollar signs in test names.
6784 * tests/input.at (Invalid dollar-n): Renamed from "Invalid \$n",
6785 for a similar reason.
6786
6787 2005-01-28 Paul Eggert <eggert@cs.ucla.edu>
6788
6789 * src/vcg.c (output_graph): G_VIEW -> normal_view in case someone
6790 wants to redefine G_VIEW.
6791
6792 2005-01-27 Paul Eggert <eggert@cs.ucla.edu>
6793
6794 * src/vcg.c (get_view_str): Remove case for normal_view.
6795 Problem reported by twlevo@xs4all.nl.
6796
6797 2005-01-24 Paul Eggert <eggert@cs.ucla.edu>
6798
6799 * configure.ac (O0CFLAGS, O0CXXFLAGS): Fix quoting bug.
6800 Problem reported by twlevo@xs4all.nl.
6801
6802 * doc/bison.texinfo: Change @dircategory from "GNU programming
6803 tools" to "Software development". Requested by Richard Stallman
6804 via Karl Berry.
6805
6806 2005-01-23 Paul Eggert <eggert@cs.ucla.edu>
6807
6808 * tests/c++.at (AT_CHECK_DOXYGEN): Don't use options after operands.
6809 Problem reported by twlevo@xs4all.nl.
6810
6811 2005-01-21 Paul Eggert <eggert@cs.ucla.edu>
6812
6813 * data/yacc.c (YYCOPY, yystpcpy, yyparse): Remove "register"
6814 keyword; it's not needed with modern compilers, and it doesn't
6815 affect correctness with older compilers. Suggested by
6816 twlevo@xs4all.nl.
6817
6818 2005-01-17 Paul Eggert <eggert@cs.ucla.edu>
6819
6820 * data/glr.c (yyuserAction): Add "default: break;" case to pacify
6821 gcc -Wswitch-default.
6822 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
6823 * data/yacc.c (yyparse): Likewise.
6824
6825 2005-01-12 Paul Eggert <eggert@cs.ucla.edu>
6826
6827 * src/system.h (OUTPUT_EXT, TAB_EXT): Define only if not defined
6828 already. Let config.h define any nonstandard values.
6829
6830 2005-01-10 Paul Eggert <eggert@cs.ucla.edu>
6831
6832 * tests/calc.at (_AT_DATA_CALC_Y): Use alarm (100), not alarm (10),
6833 for the benefit of slower hosts. Problem reported by
6834 Nelson H. F. Beebe.
6835
6836 2005-01-07 Paul Eggert <eggert@cs.ucla.edu>
6837
6838 * data/yacc.c (yyparse): Pacify non-GCC compilers about yyerrorlab
6839 being defined and not used.
6840 * data/lalr1.cc (yyparse): Likewise.
6841 Use "if (false)" rather than "if (0)".
6842
6843 2005-01-05 Paul Eggert <eggert@cs.ucla.edu>
6844
6845 * TODO: Mention that we should allow NUL bytes in tokens.
6846
6847 2005-01-02 Paul Eggert <eggert@cs.ucla.edu>
6848
6849 * src/scan-skel.l (<<EOF>>): Don't close standard output.
6850 Problem reported by Hans Aberg.
6851
6852 2005-01-01 Paul Eggert <eggert@cs.ucla.edu>
6853
6854 * src/getargs.c (version): Happy new year; update overall
6855 program copyright date from 2004 to 2005.
6856
6857 * src/scan-skel.l ("@output ".*\n): Don't close standard output.
6858 Problem reported by Hans Aberg.
6859 * tests/output.at (AT_CHECK_OUTPUT): New arg SHELLIO.
6860 (Output file names.): Add a test for the case when standard output
6861 is closed.
6862
6863 2004-12-26 Paul Eggert <eggert@cs.ucla.edu>
6864
6865 * doc/bison.texinfo (@copying): Update FDL version number to 1.2,
6866 to fix an oversight in the Bison 2.0 manual.
6867
6868 2004-12-25 Paul Eggert <eggert@cs.ucla.edu>
6869
6870 * NEWS: Version 2.0. Reformat the existing news items since
6871 1.875, so that related items are grouped together.
6872 * configure.ac (AC_INIT): Bump version to 2.0.
6873 * src/parse-gram.c, src/parse-gram.h: Regenerate with 2.0.
6874
6875 * tests/torture.at (Exploding the Stack Size with Alloca): Set
6876 YYSTACK_USE_ALLOCA to 1 if __GNUC__ or alloca are defined;
6877 otherwise, we're not testing alloca. Unfortunately there's no
6878 simple way to consult HAVE_ALLOCA here.
6879
6880 * data/lalr1.cc (yydestruct_): Pacify unused variable warning
6881 for yymsg, too.
6882
6883 * src/LR0.c (new_itemsets): Use memset rather than zeroing by
6884 hand. This avoids a warning about comparing int to size_t when
6885 GCC warnings are enabled.
6886
6887 2004-12-22 Paul Eggert <eggert@cs.ucla.edu>
6888
6889 * NEWS: Bison-generated parsers no longer default to using the
6890 alloca function (when available) to extend the parser stack, due
6891 to widespread problems in unchecked stack-overflow detection.
6892 * data/glr.c (YYMAXDEPTH): Remove undef when zero. It's the user's
6893 responsibility to set it to a positive value. This lets the user
6894 specify a value that is not a preprocessor constant.
6895 * data/yacc.c (YYMAXDEPTH): Likewise.
6896 (YYSTACK_ALLOC): Define only if YYSTACK_USE_ALLOCA is nonzero.
6897 * doc/bison.texinfo (Stack Overflow): YYMAXDEPTH no longer needs
6898 to be a compile-time constant. However, explain the constraints on it.
6899 Also, explain the constraints on YYINITDEPTH.
6900 (Table of Symbols): Explain that alloca is no longer the default.
6901 Explain the user's responsibility if they define YYSTACK_USE_ALLOCA
6902 to 1.
6903
6904 * doc/bison.texinfo (Location Default Action): Mention that n must
6905 be zero when k is zero. Suggested by Frank Heckenbach.
6906
6907 2004-12-22 Akim Demaille <akim@epita.fr>
6908
6909 * data/lalr1.cc (parser::token_number_type, parser::rhs_number_type)
6910 (parser::state_type, parser::semantic_type, parser::location_type):
6911 Private, not public.
6912 (parser::parse): Return ints, not bool.
6913 Returning a bool introduces a problem: 0 corresponds to false, and
6914 it seems weird to return false on success. Returning true changes
6915 the conventions for yyparse.
6916 Alternatively we could return void and send an exception.
6917 There is no clear consensus (yet?).
6918 (state_stack, semantic_stack, location_stack): Rename as...
6919 (state_stack_type, semantic_stack_type, location_stack_type): these.
6920 Private, not public.
6921 * tests/c++.at: New.
6922 * tests/testsuite.at, tests/Makefile.am: Adjust.
6923
6924 2004-12-21 Akim Demaille <akim@epita.fr>
6925
6926 * data/lalr1.cc (parser::parse): Return a bool instead of an int.
6927
6928 2004-12-21 Akim Demaille <akim@epita.fr>
6929
6930 Don't impose std::string for filenames.
6931
6932 * data/lalr1.cc (b4_filename_type): New.
6933 (position::filename): Use it.
6934 (parser.hh): Move the inclusion of stack.hh and location.hh below
6935 the user code, so that needed headers for the filename type can be
6936 included first.
6937 Forward declare them before the user code.
6938 * tests/Makefile.am (check-local, installcheck-local): Pass
6939 TESTSUITEFLAGS to the TESTSUITE.
6940
6941 2004-12-20 Akim Demaille <akim@epita.fr>
6942
6943 Use more STL like names: my_class instead of MyClass.
6944
6945 * data/lalr1.cc (LocationStack, LocationType, RhsNumberType)
6946 (SemanticStack, SemanticType, StateStack, StateType)
6947 (TokenNumberType, Stack, Slice, Traits, Parser::location)
6948 (Parser::value): Rename as...
6949 (location_stack, location_type, rhs_number_type, semantic_stack)
6950 (semantic_type, state_stack, state_type, token_number_type, stack)
6951 (slice, traits, parser::yylloc, parser::yylval): these.
6952
6953 * tests/calc.at, tests/regression.at, tests/actions.at: Adjust.
6954
6955 2004-12-19 Paul Eggert <eggert@cs.ucla.edu>
6956
6957 * data/glr.c (YYLLOC_DEFAULT): Use GNU spacing conventions.
6958 * data/yacc.c (YYLLOC_DEFAULT): Likewise.
6959
6960 2004-12-17 Paul Eggert <eggert@cs.ucla.edu>
6961
6962 Remove uses of 'short int' and 'unsigned short int'. This raises
6963 some arbitrary limits. It uses more memory but nowadays that's
6964 not much of an issue.
6965
6966 This change does not affect the generated parsers; that's a different
6967 task, as some users will want to conserve memory there.
6968
6969 Ideally we should use size_t to represent all object counts, and
6970 something like ptrdiff_t to represent signed differences of object
6971 counts; but that will require more code-cleanup than I have the
6972 time to do right now.
6973
6974 * src/LR0.c (allocate_itemsets, new_itemsets, save_reductions):
6975 Use size_t, not int or short int, to count objects.
6976 * src/closure.c (nritemset, closure): Likewise.
6977 * src/closure.h (nritemset, closure): Likewise.
6978 * src/nullable.c (nullable_compute): Likewise.
6979 * src/print.c (print_core): Likewise.
6980 * src/print_graph.c (print_core): Likewise.
6981 * src/state.c (state_compare, state_hash): Likewise.
6982 * src/state.h (struct state): Likewise.
6983 * src/tables.c (default_goto, goto_actions): Likewise.
6984
6985 * src/gram.h (rule_number, rule): Use int, not short int.
6986 * src/output.c (prepare_rules): Likewise.
6987 * src/state.h (state_number, STATE_NUMBER_MAXIMUM, transitions,
6988 errs, reductions): Likewise.
6989 * src/symtab.h (symbol_number, SYMBOL_NUMBER_MAXIMUM, struct symbol):
6990 Likewise.
6991 * src/tables.c (vector_number, tally, action_number,
6992 ACTION_NUMBER_MINIMUM): Likewise.
6993 * src/output.c (muscle_insert_short_int_table): Remove.
6994
6995 2004-12-17 Akim Demaille <akim@epita.fr>
6996
6997 * data/lalr1.cc: Extensive Doxygenation.
6998 (error_): Rename as...
6999 (error): this, since it is visible to the user.
7000 Adjust callers.
7001 (Parser::message): Now an automatic variable from...
7002 (Parser::yyreport_syntax_error_): here.
7003 * tests/actions.at, tests/calc.at, tests/regression.at: Adjust to
7004 Parser::error.
7005 * tests/input.at: Escape $.
7006
7007 2004-12-16 Paul Eggert <eggert@cs.ucla.edu>
7008
7009 * data/glr.c (b4_lhs_value, b4_rhs_value, b4_rhs-location):
7010 Parenthesize rhs to avoid obscure problems with mistakes like
7011 "foo$$bar = foo$1bar;". Problem reported by twlevo at xs4all.
7012 * data/lalr1.cc (b4_lhs_value, b4_rhs_value, b4_lhs_location,
7013 b4_rhs_location): Likewise.
7014 * data/yacc.c (b4_lhs_value, b4_rhs_value, b4_lhs_location,
7015 b4_rhs_location): Likewise.
7016
7017 2004-12-16 Akim Demaille <akim@epita.fr>
7018
7019 * data/lalr1.cc (yyreport_syntax_error_): Catch up with glr.c and
7020 yacc.c: be sure to stay within yycheck_.
7021 * tests/actions.at: Re-enable C++ tests.
7022
7023 2004-12-16 Akim Demaille <akim@epita.fr>
7024
7025 * src/print_graph.c (print_graph): Remove layoutalgorithm uses for
7026 real.
7027
7028 2004-12-16 Akim Demaille <akim@epita.fr>
7029
7030 Use #define to handle the %name-prefix.
7031
7032 * data/glr.c, data/yacc.c: Comment changes.
7033 * data/lalr1.cc (yylex): Use #define to select the name of yylex,
7034 so that one can refer to yylex in the parser file, and have it
7035 renamed, as is the case with other skeletons.
7036
7037 2004-12-16 Akim Demaille <akim@epita.fr>
7038
7039 Move lalr1.cc internals into yy*.
7040
7041 * data/lalr1.cc (semantic_stack_, location_stack_, state_stack_)
7042 (semantic_stack_, location_stack_, pact_, pact_ninf_, defact_)
7043 (pgoto_, defgoto_, table_, table_ninf_, check_, stos_, r1_, r2_)
7044 (name_, rhs_, prhs_, rline_, token_number_, eof_, last_, nnts_)
7045 (empty_, final_, terror_, errcode_, ntokens_)
7046 (user_token_number_max_, undef_token_, n_, len_, state_, nerrs_)
7047 (looka_, ilooka_, error_range_, nerrs_):
7048 Rename as...
7049 (yysemantic_stack_, yylocation_stack_, yystate_stack_)
7050 (yysemantic_stack_, yylocation_stack_, yypact_, yypact_ninf_)
7051 (yydefact_, yypgoto_, yydefgoto_, yytable_, yytable_ninf_)
7052 (yycheck_, yystos_, yyr1_, yyr2_, yyname_, yyrhs_, yyprhs_)
7053 (yyrline_, yytoken_number_, yyeof_, yylast_, yynnts_, yyempty_)
7054 (yyfinal_, yyterror_, yyerrcode_, yyntokens_)
7055 (yyuser_token_number_max_, yyundef_token_, yyn_, yylen_, yystate_)
7056 (yynerrs_, yylooka_, yyilooka_, yyerror_range_, yynerrs_):
7057 these.
7058
7059 2004-12-15 Paul Eggert <eggert@cs.ucla.edu>
7060
7061 Fix some problems reported by twlevo at xs4all.
7062 * src/symtab.c (symbol_new): Report an error if the input grammar
7063 contains too many symbols. This is better than calling abort() later.
7064 * src/vcg.h (enum layoutalgorithm): Remove. All uses removed.
7065 (struct node, struct graph):
7066 Rename member expand to stretch. All uses changed.
7067 (struct graph): Remove member layoutalgorithm. All uses removed.
7068 * src/vcg.c (get_layoutalgorithm_str): Remove. All uses removed.
7069 * src/vcg_defaults.h (G_STRETCH): Renamed from G_EXPAND.
7070 All uses changed.
7071 (N_STRETCH): Rename from N_EXPAND. All uses changed.
7072
7073 2004-12-15 Akim Demaille <akim@epita.fr>
7074
7075 * data/lalr1.cc: Normalize /** \brief ... */ to ///.
7076 Add more Doxygen comments.
7077 (symprint_, stack_print_, reduce_print_, destruct_, pop)
7078 (report_syntax_error_, translate_): Rename as...
7079 (yysymprint_, yystack_print_, yyreduce_print_, yydestruct_)
7080 (yypop_, yyreport_syntax_error_, yytranslate_): this.
7081
7082 2004-12-15 Akim Demaille <akim@epita.fr>
7083
7084 * data/lalr1.cc (lex_): Rename as...
7085 (yylex_): this.
7086 Move the trace here.
7087 Take the %name-prefix into account.
7088 Reported by Alexandre Duret-Lutz.
7089
7090 2004-12-15 Akim Demaille <akim@epita.fr>
7091
7092 Simplify the C++ parser constructor.
7093
7094 * data/lalr1.cc (debug_): Rename as...
7095 (yydebug_): so that the parser's internals are always in the yy*
7096 pseudo namespace.
7097 Adjust uses.
7098 (b4_parse_param_decl): Remove the leading comma as it is now only
7099 called as unique argument list.
7100 (Parser::Parser): Remove the constructor accepting a location and
7101 an initial debugging level.
7102 Remove from the other ctor the argument for the debugging level.
7103 (debug_level_type, debug_level, set_debug_level): New.
7104
7105 * tests/actions.at, tests/calc.at, tests/regression.at: Adjust
7106 constructor calls.
7107
7108 2004-12-15 Akim Demaille <akim@epita.fr>
7109
7110 Remove b4_root related material: failure experiment
7111 (which goal was to allow to derive from a class).
7112
7113 * data/lalr1.cc (b4_root, b4_param, b4_constructor): Remove
7114 definitions and uses.
7115
7116 2004-12-14 Paul Eggert <eggert@cs.ucla.edu>
7117
7118 * data/glr.c (struct yyGLRStack): yyerror_range now has 3 items,
7119 not 2, since it's not portable to subtract 1 from the start of an
7120 array. The new item 0 is never set or used. All uses changed.
7121
7122 (yyrecoverSyntaxError): Use YYLLOC_DEFAULT instead of assuming
7123 the default definition of YYLLOC_DEFAULT. Problem reported
7124 by Frank Heckenbach.
7125
7126 2004-12-12 Paul Eggert <eggert@cs.ucla.edu>
7127
7128 * data/glr.c (YYRHSLOC): Don't have two definitions, one for
7129 the normal case and one for the error case. Just use the
7130 first one uniformly. Problem reported by Frank Heckenbach.
7131 (YYLLOC_DEFAULT): Use the conventions of yacc.c, so we can
7132 use exactly the same macro in both places.
7133 (yyerror_range): Now of type yyGLRStackItem, not YYLTYPE,
7134 so that the normal-case YYRHSLOC works for the error case too.
7135 All uses changed.
7136 * data/yacc.c (YYRHSLOC): New macro, taken from glr.c.
7137 (YYLLOC_DEFAULT): Use the same macro as glr.c.
7138 * doc/bison.texinfo (Location Default Action): Don't claim that
7139 we have an array of locations. Use the same macro for both glr
7140 and lalr parsers. Mention YYRHSLOC. Mention what happens when
7141 the index is 0.
7142
7143 2004-12-10 Paul Eggert <eggert@cs.ucla.edu>
7144
7145 * HACKING: Update email addresses to send announcements to.
7146
7147 * configure.ac (AC_INIT): Bump version to 1.875f.
7148
7149 2004-12-10 Paul Eggert <eggert@cs.ucla.edu>
7150
7151 * NEWS: Version 1.875e.
7152 * src/parse-gram.c, src/parse-gram.h: Regenerate with 1.875e.
7153
7154 * src/scan-skel.l: Include "complain.h", for "fatal".
7155
7156 * src/relation.h (relation_print, relation_digraph):
7157 Relation sizes are of type relation_node, not size_t (this is
7158 merely a doc fix, since the two types are equivalent).
7159 (relation_transpose): Relation sizes are of type relation_node,
7160 not int.
7161 * src/relation.c: Likewise.
7162 (top, infinity): Now of type relation_node, not int.
7163 (traverse, relation_transpose): Use relation_node, not int.
7164
7165 * data/glr.c (yyuserAction, yyrecoverSyntaxError): Mark args
7166 with ATTRIBUTE_UNUSED if they're not used, to avoid GCC warning.
7167 (yyparse): Remove unused local introduced in 2004-10-25 patch.
7168
7169 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): New arg
7170 specifying whether the test should be skipped. Use it tp
7171 specify that the [%defines %skeleton "lalr1.cc"] tests currently
7172 fail on some hosts, and should be skipped.
7173
7174 2004-12-08 Paul Eggert <eggert@cs.ucla.edu>
7175
7176 * src/system.h (CALLOC, MALLOC, REALLOC): Remove. All callers
7177 changed to use xcalloc, xnmalloc, xnrealloc, respectively,
7178 unless otherwise specified below.
7179
7180 * src/LR0.c (allocate_itemsets): Use xnmalloc, not xcalloc,
7181 to allocate kernel_base, kernel_items, kernel_size, since
7182 they needn't be initialized to 0.
7183 (allocate_storgae): Likewise, for shiftset, redset, shift_symbol.
7184 * src/closure.c (new_closure): Likewise, for itemset.
7185 * src/derives.c (derives_compute): Likewise, for delts, derives, q.
7186 * src/lalr.c (set_goto_map): Likewise, for temp_map.
7187 (initialize_F): Likewise, for reads, edge, reads[i], includes[i].
7188 (build_relations): Likewise for edge, states1, includes.
7189 * src/nullable.c (nullable_compute): Likewise, for squeue, relts.
7190 * src/reader.c (packgram): Likewise, for ritem, rules.
7191 * src/reduce.c (nonterminals_reduce): Likewise for nontermmap.
7192 * src/relation.c (relation_digraph): Likewise for VERTICES.
7193 (relation_transpose): Likewise for new_R, end_R.
7194 * src/symtab.c (symbols_token_translations_init): Likewise for
7195 token_translations.
7196 * src/tables.c (save_row): Likewise for froms, tos, conflict_tos.
7197 (token_actions): Likewise for yydefact, actrow, conflrow,
7198 conflict_list.
7199 (save_column): Likewise for froms[symno], tos[symno].
7200 (goto_actions): Likewise for state_count.
7201 (pack_table): Likewise for base, pos, check.
7202 (tables_generate): Likewise for width.
7203
7204 * src/LR0.c (set_states): Don't reuse kernel_size and kernel_base
7205 for initial core. Just have a separate core, so we needn't worry
7206 about whether kernel_size and kernel_base are initialized.
7207
7208 * src/LR0.c (shift_symbol, redset, shiftset, kernel_base,
7209 kernel_size, kernel_items): Remove unnecessary initialization.
7210 * src/conflicts.c (conflicts): Likewise.
7211 * src/derives.c (derives): Likewise.
7212 * src/muscle_tablc (muscle_insert): Likewise.
7213 * src/relation.c (relation_digraph): Likewise.
7214 * src/tables.c (froms, tos, conflict_tos, tally, width, actrow, order,
7215 conflrow, conflict_table, conflict_list, table, check):
7216 Likewise.
7217
7218 * src/closure.c (new_closure): Arg is of type unsigned int, not int.
7219 This is because all callers pass unsigned int.
7220 * src/closure.h (new_closure): Likewise.
7221
7222 * src/lalr.c (initialize_F): Initialize reads[i] in all cases.
7223 (build_relations): Initialize includes[i] in all cases.
7224 * src/reader.c (packgram): Always initialize rules[ruleno].prec
7225 and rules[ruleno].precsym. Initialize members in order.
7226 * src/relation.c (relation_transpose): Always initialize new_R[i]
7227 and end_R[i].
7228 * src/table.c (conflict_row): Initialize 0 at end of conflict_list.
7229
7230 * src/output.c (prepare_actions): Pass 0 instead of conflict_list[0];
7231 conflict_list[0] was always 0, but now it isn't initialized.
7232
7233 * src/table.c (table_grow): When conflict_table grew, the grown
7234 area wasn't cleared. Fix this.
7235
7236 * lib/.cvsignore: Add strdup.c, strdup.h.
7237 * m4/.cvsignore: Add strdup.m4.
7238
7239 2004-12-07 Paul Eggert <eggert@cs.ucla.edu>
7240
7241 * src/lalr.h (GOTO_NUMBER_MAXIMUM): New macro.
7242 * src/lalr.c (set_goto_map): Don't allow ngotos to equal
7243 GOTO_NUMBER_MAXIMUM, since we occasionally compute
7244 ngotos + 1 without checking for overflow.
7245 (build_relations): Use END_NODE, not -1, to denote end of edges.
7246 * src/lalr.c (set_goto_map, map_goto, initialize_F, add_loopback_edge,
7247 build_relations): Use goto_number, not int, for goto numbers.
7248 * src/tables.c (save_column, default_goto): Likewise.
7249
7250 2004-11-23 Akim Demaille <akim@epita.fr>
7251
7252 * data/lalr1.cc (YYSTYPE): Define it as is done for C, instead
7253 of #defining from yystype.
7254 Don't typedef yystype, C++ does not need it.
7255 This lets it possible to forward declare it as union.
7256
7257 2004-11-23 Paul Eggert <eggert@cs.ucla.edu>
7258
7259 * bootstrap (gnulib_modules): Add extensions.
7260 Problem reported by Jim Meyering.
7261
7262 2004-11-22 Paul Eggert <eggert@cs.ucla.edu>
7263
7264 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c,
7265 src/lalr.c, src/nullable.c, src/relation.c, src/scan-skel.l,
7266 src/system.h, src/tables.c: XFREE -> free, to accommodate
7267 recent change to gnulib xalloc.h.
7268 Problem reported by Jim Meyering.
7269
7270 2004-11-17 Akim Demaille <akim@epita.fr>
7271
7272 * data/lalr1.cc (symprint_): Use cdebug_ to avoid warnings.
7273
7274 2004-11-17 Akim Demaille <akim@epita.fr>,
7275 Alexandre Duret-Lutz <adl@gnu.org>
7276
7277 * data/lalr1.cc (Parser::yycdebug_): New, a pointer, to allow
7278 changes.
7279 (YYCDEBUG): Adjust.
7280 Use it instead of cdebug_.
7281 (Parser::debug_stream, Parser::set_debug_stream): New.
7282 (Parser::symprint_): Define cdebug_ for temporary backward
7283 compatibility.
7284 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use
7285 debug_stream ().
7286
7287 2004-11-17 Akim Demaille <akim@epita.fr>
7288
7289 * data/lalr1.cc (Parser:print_): Remove, use %printer instead.
7290 * tests/regression.at (_AT_DATA_DANCER_Y): Adjust.
7291 * tests/calc.at (_AT_DATA_CALC_Y): Ditto.
7292 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
7293
7294 2004-10-27 Paul Eggert <eggert@cs.ucla.edu>
7295
7296 * data/glr.c (yyloc_default): Remove; not used.
7297 Problem reported by Frank Heckenbach.
7298
7299 2004-10-25 Akim Demaille <akim@epita.fr>
7300
7301 * data/glr.c (YYRHSLOC): Move its definition next to its uses.
7302 Introduce another definition to address simple location arrays.
7303 (yyGLRStack): New member: yyerror_range.
7304 (yyrecoverSyntaxError, yyparse): Update it.
7305 (yyrecoverSyntaxError): Use it when shifting the error token to
7306 have an accurate range, equivalent to the one computed by both
7307 yacc.c and lalr1.cc.
7308 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Change its yylex so
7309 that column numbers start at column 0, as per GNU Coding
7310 Standards, the others tests, and the doc.
7311 (_AT_RESOLVED_GLR_OUTPUT_WITH_LOC, _AT_AMBIG_GLR_OUTPUT_WITH_LOC):
7312 Adjust to the above change (first column is 0).
7313 And adjust the location of the "<error>", now covering the whole
7314 line.
7315
7316 2004-10-22 Akim Demaille <akim@epita.fr>
7317 and Paul Eggert <eggert@cs.ucla.edu>
7318
7319 Remove some arbitrary limits on goto numbers and relations.
7320 * src/lalr.c (goto_map, ngotos, from_state, to_state): Omit
7321 initial values, since they're never used.
7322 (set_goto_map): ngotos is now unsigned, so test for overflow
7323 by seeing whether it wraps around to zero.
7324 * src/lalr.h (goto_number): Now size_t, not short int.
7325 (GOTO_NUMBER_MAXIMUM): Remove.
7326 * src/relation.c (relation_print, traverse, relation_transpose):
7327 Check for END_NODE rather than looking at sign.
7328 * src/relation.h (END_NODE): New macro.
7329 (relation_node): Now size_t, not short int.
7330
7331 2004-10-22 Paul Eggert <eggert@cs.ucla.edu>
7332
7333 * doc/bison.texinfo (Language and Grammar): In example, "int" is a
7334 keyword, not an identifier. Problem reported by Baron Schwartz in
7335 <http://lists.gnu.org/archive/html/bug-bison/2004-10/msg00017.html>.
7336
7337 2004-10-11 Akim Demaille <akim@epita.fr>
7338
7339 * src/symtab.c (symbol_check_alias_consistency): Also check
7340 type names, destructors, and printers.
7341 Reported by Alexandre Duret-Lutz.
7342 Recode the handling of associativity and precedence in terms
7343 of symbol_precedence_set.
7344 Accept no redeclaration at all, not even equal to the previous
7345 value.
7346 (redeclaration): New.
7347 Use it to factor redeclaration complaints.
7348 (symbol_make_alias): Don't set the type of the alias, let
7349 symbol_check_alias_consistency do it as for other features.
7350 * src/symtab.h (symbol): Add new member prec_location, and
7351 type_location.
7352 * src/symtab.c (symbol_precedence_set, symbol_type_set): Set them.
7353 * tests/input.at (Incompatible Aliases): New.
7354
7355 2004-10-09 Paul Eggert <eggert@cs.ucla.edu>
7356
7357 .cvsignore fixes to accommodate gnulib changes,
7358 and the practice of naming build directories "_build".
7359 * .cvsignore: Add "_*". Sort.
7360 * lib/.cvsignore: Add getopt_.h, xalloc-die.c.
7361 * m4/.cvsignore: Add "*_gl.m4".
7362
7363 2004-10-06 Akim Demaille <akim@epita.fr>
7364
7365 * src/parse-gram.y (add_param): Fix the truncation of trailing
7366 spaces.
7367
7368 2004-10-05 Akim Demaille <akim@epita.fr>
7369
7370 In Bison 1.875's yacc.c, YYLLOC_DEFAULT was called regardless
7371 whether the reducion was empty or not. This leaves room to
7372 improve the use of YYLLOC_DEFAULT in such a case.
7373 lalr1.cc is still experimental, so changing this is acceptable.
7374 And finally, there are probably not many users who changed the
7375 handling of locations in GLR, so changing is admissible too.
7376
7377 * data/glr.c, data/lalr1.cc, data/yacc.c (YYLLOC_DEFAULT): On an
7378 empty reduction, set @$ to an empty location ending the previously
7379 stacked symbol.
7380 Adjust uses to make sure the code is triggered on empty
7381 reductions.
7382 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust the
7383 expected output: empty reductions have empty locations.
7384
7385 2004-09-29 Akim Demaille <akim@epita.fr>
7386
7387 * data/lalr1.cc: Move towards a more standard C++ coding style
7388 for templates: Class < T > -> Class<T>.
7389
7390 2004-09-29 Akim Demaille <akim@epita.fr>
7391
7392 * data/lalr1.cc: Reinstall the former ctor, for sake of
7393 compatibility, but warn it will be removed.
7394 Move towards a more standard C++ coding style (i.e., type *var ->
7395 type* var).
7396
7397 2004-09-27 Paul Eggert <eggert@cs.ucla.edu>
7398
7399 * src/parse-gram.y (add_param): Rewrite to avoid strchr,
7400 since it's less likely to work if NULs are involved in the future.
7401
7402 2004-09-27 Akim Demaille <akim@epita.fr>
7403
7404 * data/yacc.c (YY_LOCATION_PRINT): Fix its default declaration.
7405
7406 2004-09-27 Akim Demaille <akim@epita.fr>
7407
7408 * data/lalr1.cc (b4_parse_param_decl_1): New.
7409 (b4_parse_param_decl): Use it to have different names between attribute
7410 and argument names.
7411 (b4_cc_constructor_call): Likewise.
7412
7413 2004-09-24 Akim Demaille <akim@epita.fr>
7414
7415 * src/parse-gram.y (add_param): Strip the leading and trailing
7416 blanks from a formal argument declaration.
7417 (YY_LOCATION_PRINT): New.
7418
7419 2004-09-24 Akim Demaille <akim@epita.fr>
7420
7421 * data/c.m4 (b4_yysymprint_generate): Move the YYINPUT invocation
7422 after the location.
7423
7424 2004-09-24 Akim Demaille <akim@epita.fr>
7425
7426 * doc/bison.texinfo (Table of Symbols): Sort.
7427
7428 2004-09-21 Akim Demaille <akim@epita.fr>
7429
7430 * data/yacc.c, data/glr.c (b4_at_dollar, b4_dollar_dollar): Remove
7431 the useless parentheses.
7432 Suggested by Paul Eggert.
7433
7434 2004-09-20 Akim Demaille <akim@epita.fr>
7435
7436 Let the initial-action act on the look-ahead, and use it for the
7437 "initial push" (corresponding to an hypothetical beginning-of-file).
7438 And let lalr1.cc honor %initial-action.
7439
7440 * doc/bison.texinfo (Initial Action Decl): Clarify, and add an
7441 example.
7442 * data/lalr1.cc (Parser::initlocation_): Remove, bad experiment.
7443 (Parser::Parser): Remove the ctor that used to initialize it.
7444 (Parser::parse): Like in the other skeletons, issue the "starting
7445 parse" message before any action.
7446 Honor %initial-action.
7447 Initialize the stacks with the lookahead.
7448 * data/yacc.c: Let $$ and @$ in %initial-action designate the
7449 look-ahead.
7450 Push them in the stacks.
7451 * tests/actions.at, tests/calc.at: Adjust the C++ ctor invocations.
7452
7453 2004-09-20 Akim Demaille <akim@epita.fr>
7454
7455 * doc/bison.texinfo (Initial Action Decl): New.
7456
7457 2004-09-20 Akim Demaille <akim@epita.fr>
7458
7459 * data/yacc.c (YY_LOCATION_PRINT): Use YYLTYPE_IS_TRIVIAL as a
7460 clearer criterion to define it.
7461 (parse): Initialize the initial location when YYLTYPE_IS_TRIVIAL.
7462 When reducing on an empty RHS, use the latest stacked location as
7463 location.
7464 yylloc is not always available.
7465 * data/glr.c: Likewise.
7466 Also, honor initial-actions.
7467
7468 2004-09-20 Akim Demaille <akim@epita.fr>
7469
7470 * data/yacc.c (YY_LOCATION_PRINT): New.
7471 Define when we know YYLTYPE's structure, i.e., when the default
7472 YYLLOC_DEFAULT is used.
7473 * data/c.m4 (b4_yysymprint_generate): Use it.
7474 * data/lalr1.cc (YYLLOC_DEFAULT): Stop relying on the initial
7475 value of the result.
7476 (error_start_): Replace with...
7477 (error_range_): this location array.
7478 This allows to replace code relying on the implementation of
7479 locations by portable code.
7480 * data/yacc.c (yylerrsp): Replace with...
7481 (yyerror_range): this.
7482 Every time a token is popped, update yyerror_range[0], to have an
7483 accurate location for the error token.
7484 * data/glr.c (YY_LOCATION_PRINT): New.
7485 (yyprocessOneStack): Fix an invocation of YY_SYMBOL_PRINT:
7486 deference a pointer.
7487 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): No longer
7488 report the location in %printers.
7489
7490 * src/scan-skel.l: Instead of abort, report error messages to ease
7491 understanding skeleton scanning failures.
7492
7493 2004-09-16 Akim Demaille <akim@epita.fr>
7494
7495 * data/lalr1.cc (Stack::Iterator, Stack::ConstIterator): Rename as...
7496 (iterator, const_iterator): these, to be more in the C++ spirit.
7497 Also, return reverse iterators so that when displaying the stack
7498 we display its bottom first.
7499 (Parser::stack_print_, Parser::reduce_print_): Match the messages
7500 from yacc.c.
7501 We should probably use vector here though.
7502
7503 2004-09-16 Akim Demaille <akim@epita.fr>
7504
7505 Have more complete shift traces.
7506
7507 * data/yacc.c, data/lalr1.c, data/glr.c: Use YY_SYMBOL_PRINT
7508 to report Shifts instead of ad hoc YYDPRINTF invocations,
7509 including for the error token.
7510 * data/lalr1.cc (symprint_): Output the location.
7511 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): In C++, don't
7512 output the location within the %printer.
7513 Activate GLR tests, at least to make sure they compile properly.
7514 They still don't pass though.
7515 * tests/calc.at: Adjust expect verbose output, since now "Entering
7516 state..." is on a different line than the "Shifting" message.
7517
7518 2004-09-08 Akim Demaille <akim@epita.fr>
7519
7520 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Move the
7521 Bison directive from the Bison file to the invocation of this
7522 macro, so that these directives are passed to
7523 AT_BISON_OPTION_PUSHDEFS to get correct help macros.
7524 Use these helping macros (e.g., AT_LOC, AT_VAL and so forth).
7525 Move the AT_SETUP/AT_CLEANUP outside, to report as test title
7526 the extra Bison directives instead of the whole series.
7527 Change the grammar so that there are recoverable errors, and
7528 unrecoverable errors. Now we can have the parser give up before
7529 consuming the whole input. As a result we now can observe that
7530 the lookahead is freed when needed.
7531 Change the parser source to parse argv[1] instead of a hard coded
7532 string.
7533 Simplify yylex, and give a value and location to EOF.
7534 Simplify some invocations of AT_CHECK_PRINTER_AND_DESTRUCTOR that
7535 passed directives already coded in the file.
7536 Add some tests to check the location of "error".
7537 For some tests, the C++ parser is correct, and not yacc.c.
7538 For other tests, they provide different, but unsatisfying, values,
7539 so keep the C++ value so that at least one parser is "correct"
7540 according to the test suite.
7541 (Actions after errors): Remove, this is subsumed by the
7542 AT_CHECK_PRINTER_AND_DESTRUCTOR series.
7543
7544 2004-09-06 Akim Demaille <akim@epita.fr>
7545
7546 * data/lalr1.cc: Adjust the indentation of the labels.
7547 (Parser::pop): New.
7548 Use it.
7549
7550 2004-09-06 Akim Demaille <akim@epita.fr>
7551
7552 * data/yacc.cc, data/glr.cc (yydestruct): Accept an additional
7553 argument, an informative message.
7554 Call YY_SYMBOL_PRINT.
7555 Adjust all callers: integrate the associated YY_SYMBOL_PRINT.
7556 * data/lalr1.cc (destruct_): Likewise.
7557 In addition, no longer depend on b4_yysymprint_generate and
7558 b4_yydestruct_generate to generate these functions, do it "by
7559 hand".
7560
7561 2004-09-03 Akim Demaille <akim@epita.fr>
7562
7563 * data/glr.c, data/lalr1.cc, data/yacc.c: When YYABORT was
7564 invoked, yydestruct the lookahead.
7565 * tests/calc.at (Calculator $1): Update the expected lengths of
7566 traces: there is an added line for the discarded lookahead.
7567 * doc/bison.texinfo (Destructor Decl): Some rewording.
7568 Define "discarded" symbols.
7569
7570 2004-09-02 Akim Demaille <akim@epita.fr>
7571
7572 * data/lalr1.cc (translate_, destruct_): No reason to be static.
7573
7574 2004-09-02 Akim Demaille <akim@epita.fr>
7575
7576 * data/glr.c, yacc.c (YYDSYMPRINT): Remove, not used.
7577 (YYDSYMPRINTF): Rename as...
7578 (YY_SYMBOL_PRINT): this.
7579 * data/lalr1.cc (YY_SYMBOL_PRINT): New, modeled after the previous
7580 two.
7581 Use it instead of direct symprint_ calls.
7582 (yybackup): Tweak the "Now at end of input" case to match yacc.c's
7583 one.
7584
7585 2004-09-02 Akim Demaille <akim@epita.fr>
7586
7587 * data/lalr1.cc (b4_yysymprint_generate): New.
7588 (symprint_): New member function, defined when YYDEBUG.
7589 Use it consistently instead of token/nterm debugging output by
7590 hand.
7591 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust
7592 %printer calls to use cdebug_ when using lalr1.cc.
7593
7594 2004-08-30 Florian Krohm <florian@edamail.fishkill.ibm.com>
7595
7596 * data/glr.c: Guard the declarations of yypstack and yypdumpstack
7597 with #ifdef YYDEBUG.
7598
7599 2004-08-26 Akim Demaille <akim@epita.fr>
7600
7601 * doc/bison.texinfo (Implementing Loops): Rename as...
7602 (Implementing Gotos/Loops): this.
7603
7604 2004-08-13 Paul Eggert <eggert@cs.ucla.edu>
7605
7606 Adjust to latest gnulib.
7607 * bootstrap (gnulib_modules): Add xalloc-die.
7608 Set LC_ALL=C so that file names sort consistently.
7609 Prefer the gnulib copies of gettext.m4, glibc21.m4,
7610 inttypes_h.m4, lib-ld.m4, lib-prefix.m4, po.m4, stdint_h.m4,
7611 uintmax_t.m4, ulonglong.m4.
7612 (intl_files_to_remove): Add gettext.m4, lib-ld.m4, lib-prefix.m4,
7613 po.m4 since we are now using _gl.m4 instead.
7614
7615 2004-08-10 Florian Krohm <florian@edamail.fishkill.ibm.com>
7616
7617 * src/scan-action.l: Remove. Scanning of semantic actions is
7618 handled in scan-gram.l.
7619
7620 2004-08-07 Florian Krohm <florian@edamail.fishkill.ibm.com>
7621
7622 * src/scan-gram.l (handle_syncline): Use uniqstr_new not xstrdup.
7623
7624 * src/location.h (struct): The file member is a uniqstr.
7625 (equal_boundaries): Use UNIQSTR_EQ for comparison.
7626
7627 2004-07-22 Paul Eggert <eggert@cs.ucla.edu>
7628
7629 Fix bug with non-%union parsers that have printers or destructors,
7630 which led to a Bison core dump. Reported by Peter Fales in
7631 <http://lists.gnu.org/archive/html/bug-bison/2004-07/msg00014.html>.
7632
7633 * data/c.m4 (b4_symbol_actions): Don't assume %union was used.
7634 * data/lalr1.cc (yystype) [defined YYSTYPE]: Define to YYSTYPE,
7635 not to our own type.
7636 * src/output.c (symbol_destructors_output, symbol_printers_output):
7637 Don't assume %union.
7638 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR,
7639 AT_CHECK_PRINTER_AND_DESTRUCTOR): New argument
7640 UNION-FLAG. All callers changed.
7641 (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Don't assume %union.
7642 Use type char, not unsigned int, when declaring an array of char;
7643 this lets us remove a cast.
7644 (Printers and Destructors): Add non-%union test cases.
7645
7646 2004-06-21 Paul Eggert <eggert@cs.ucla.edu>
7647
7648 * doc/bison.texinfo: Minor editorial changes, mostly to the new
7649 GLR writeups. E.g., avoid frenchspacing and the future tense,
7650 change "lookahead" to "look-ahead", and change "wrt" to "with
7651 respect to".
7652
7653 2004-06-21 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
7654
7655 * doc/bison.texinfo (Merging GLR Parses, Compiler Requirements):
7656 New sections, split off from the GLR Parsers section. Put the new
7657 Simple GLR Parser near the start of the GLR section, for clarity.
7658 Rewrite connective text.
7659
7660 2004-06-21 Frank Heckenbach <frank@g-n-u.de>
7661
7662 * doc/bison.texinfo (Simple GLR Parsers): New section.
7663
7664 2004-06-21 Paul Eggert <eggert@cs.ucla.edu>
7665
7666 * NEWS, TODO, doc/bison.texinfo:
7667 Use "look-ahead" instead of "lookahead", to be consistent.
7668 * REFERENCES: Fix incorrect reference to DeRemer and Pennello,
7669 while we're fixing "look-ahead".
7670 * src/conflicts.c (shift_set): Renamed from shiftset.
7671 (look_ahead_set): Renamed from lookaheadset.
7672 * src/print.c: Likewise.
7673 * src/getargs.c (report_args): Add "look-ahead" as the new canonical
7674 name for "lookahead".
7675 (report_types, usage): Likewise.
7676 * src/getargs.h (report_look_ahead_tokens): Renamed from
7677 report_lookaheads.
7678 * src/lalr.c (compute_look_ahead_tokens): Renamed from
7679 compute_lookaheads.
7680 (state_look_ahead_tokens_count): Renamed from state_lookaheads_count.
7681 (look_ahead_tokens_print): Renamed from lookaheads_print.
7682 * src/state.c (state_rule_look_ahead_tokens_print): Renamed from
7683 state_rule_lookaheads_print.
7684 * src/state.h: Likewise.
7685 (reductions.look_ahead_tokens): Renamed from lookaheads.
7686 * tests/torture.at (AT_DATA_LOOK_AHEAD_TOKENS_GRAMMAR): Renamed from
7687 AT_DATA_LOOKAHEADS_GRAMMAR.
7688
7689 2004-06-03 Paul Eggert <eggert@cs.ucla.edu>
7690
7691 * README: Update location of patched M4 distribution.
7692
7693 2004-05-30 Albert Chin-A-Young <china@thewrittenword.com>
7694
7695 Don't assume the C++ compiler takes the same arguments as the C compiler
7696 (trivial change).
7697 * configure.ac (O0CXXFLAGS): New var.
7698 * tests/atlocal.in (CXXFLAGS): Use it.
7699
7700 2004-05-29 Paul Eggert <eggert@cs.ucla.edu>
7701
7702 Fix some "make check" problems with C++ reported by
7703 Albert Chin-A-Young for Tru64 C++ in this thread:
7704 http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00049.html
7705
7706 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check for std::cerr.
7707 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
7708 Output to a .cc file for C++, not to a .c file.
7709 * tests/calc.at (AT_CHECK_CALC): Likewise.
7710 * tests/regression.at (AT_CHECK_DANCER): Likewise.
7711 * tests/local.at (AT_COMPILE_CXX): Default to OUTPUT.cc, not OUTPUT.c.
7712
7713 2004-05-28 Albert Chin-A-Young <china@thewrittenword.com>
7714
7715 * tests/calc.at, tests/actions.at: Workaround for SGI
7716 C++ compiler. (trivial change)
7717
7718 2004-05-27 Paul Eggert <eggert@cs.ucla.edu>
7719
7720 Spent a few hours checking out which prerequisite versions the
7721 current sources actually require. I went all the way back to
7722 Gettext 0.10.40, Automake 1.4, and Autoconf 2.57 and investigated
7723 a seemingly endless set of combinations of versions more recent
7724 than that. The bottom line is that the current sources require
7725 fairly recent versions of the build tools, and it'll be some work
7726 to change this.
7727 * configure.ac (AC_PREREQ): Increase from 2.58 to 2.59.
7728 (AM_INIT_AUTOMAKE): Increase from 1.7 to 1.8.
7729 (AM_GNU_GETTEXT_VERSION): Increase from 0.11.5 to 0.12.
7730 Add comments explaining why those particular versions are
7731 currently needed.
7732
7733 * src/parse-gram.y (lloc_default): Rewrite to avoid compiler bug
7734 in SGI MIPSpro 7.4.1m. Problem reported by Albert Chin-A-Young in
7735 <http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00037.html>.
7736
7737 * configure.ac (AC_PREREQ): Bump to 2.58, since 2.57 doesn't work
7738 (it fails with a Autoconf-without-aclocal-m4 diagnostic).
7739
7740 2004-05-26 Paul Eggert <eggert@cs.ucla.edu>
7741
7742 * configure.ac (AM_GNU_GETTEXT_VERSION): Lower it from 0.14.1 to
7743 0.11.5. Suggested by Bruno Haible.
7744 * bootstrap: Remove gettext version checking.
7745
7746 * doc/bison.texinfo (Decl Summary): Also mention that %union
7747 can depend on prerequisite types. Problem reported by Tim
7748 Van Holder.
7749
7750 2004-05-25 Paul Eggert <eggert@cs.ucla.edu>
7751
7752 * README: Mention GNU m4 1.4 bugs and Akim's patched version.
7753 * README-alpha: Don't tell people not to package this.
7754
7755 * bootstrap: Don't assume $(...) works; use `...` instead.
7756 Problem reported by Paul Hilfinger. Also, diagnose non-GNU
7757 gettext better.
7758
7759 * doc/bison.texinfo (Decl Summary, Bison Options): Clarify what's
7760 put into the -d output file, and mention what to do if YYSTYPE is
7761 defined as a macro.
7762
7763 2004-05-24 Paul Eggert <eggert@cs.ucla.edu>
7764
7765 Undo change made earlier today: it caused autopoint to not bring
7766 in ABOUT-NLS. Ouch. Instead, substitute our own diagnostic for
7767 autopoint's.
7768
7769 * bootstrap: Check that gettext version matches what's in
7770 configure.ac. Warn users to ignore robots.txt ERROR 404.
7771 * bootstrap: Undo today's earlier change (logged below).
7772 * configure.ac (AM_GNU_GETTEXT_VERSION): Likewise.
7773
7774 The gettext version checking is causing more trouble than it's
7775 curing; remove it. Problem reported by Paul Hilfinger.
7776
7777 * bootstrap: Issue a warning that one can expect a message
7778 'AM_GNU_GETTEXT is used, but not AM_GNU_GETTEXT_VERSION'.
7779 * configure.ac (AM_GNU_GETTEXT_VERSION): Remove.
7780
7781 2004-05-23 Paul Eggert <eggert@cs.ucla.edu>
7782
7783 Ensure that the C++ compiler used for testing actually works on a
7784 simple test program; if not, skip the C++-related tests. Problem
7785 reported by Vin Shelton in:
7786 http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00026.html
7787
7788 * m4/cxx.m4: New file.
7789 * configure.ac (BISON_TEST_FOR_WORKING_CXX_COMPILER): Add.
7790 * tests/atlocal.in (BISON_CXX_WORKS): Add.
7791 * tests/local.at (AT_COMPILE_CXX): Use it.
7792
7793 2004-05-21 Paul Eggert <eggert@cs.ucla.edu>
7794
7795 * data/glr.c (yylloc): Output this macro even if locations are not
7796 being generated, as the GLR parser needs it even in that case.
7797 Problem reported by Troy A. Johnson
7798 <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=195946>.
7799
7800 * configure.ac (AC_INIT): Update to 1.875e.
7801
7802 2004-05-21 Paul Eggert <eggert@cs.ucla.edu>
7803
7804 * NEWS: Version 1.875d.
7805 * configure.ac (AC_INIT): Likewise.
7806 * src/parse-gram.c, src/parse-gram.h: Regenerate with 1.875d.
7807
7808 * configure.ac (--enable-gcc-warnings): Do not enable -Wshadow,
7809 -Wmissing-prototypes, or -Wstrict-prototypes for C++. The current
7810 lalr1.cc runs afoul of the first, and the last two are no longer
7811 supported by GCC 3.4.0.
7812 * README: Mention GNU m4 1.4 or later; mention m4 patches.
7813 * HACKING: Use ./bootstrap, not "make update" to import foreign files.
7814
7815 2004-05-06 Paul Eggert <eggert@cs.ucla.edu>
7816
7817 * src/muscle_tab.c (hash_muscle): Accept and return size_t, not
7818 unsigned int, for compatibility with latest gnulib hash module.
7819 * src/state.c (state_hash, state_hasher): Likewise.
7820 * src/symtab.c (hash_symbol, hash_symbol_hasher): Likewise.
7821 * src/uniqstr.c (hash_uniqstr): Likewise.
7822
7823 2004-05-03 Paul Eggert <eggert@cs.ucla.edu>
7824
7825 * NEWS: Unescaped newlines are no longer allowed in char & strings.
7826
7827 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER,
7828 SC_CHARACTER,SC_STRING>): Reject unescaped newlines in
7829 character and string literals.
7830 (unexpected_end): New function.
7831 (unexpected_eof): Use it.
7832 (unexpected_newline): New function.
7833 (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>): Coalesce duplicate
7834 actions.
7835
7836 * NEWS: Document %expect-rr.
7837
7838 * bootstrap (--gnulib-srcdir=*, --cvs-user=*):
7839 Fix typo by replacing $1 with $option.
7840 Remove more 'intl'-related files.
7841 Don't DEFUN AM_INTL_SUBDIR twice.
7842
7843 * lib/.cvsignore: Add strndup.h. Remove memchr.c, memcmp.c,
7844 memrchr.c, strcasecmp.c, strchr.c, strrchr.c, strspn.c, strtol.c,
7845 strtoul.c.
7846 * m4/.cvsignore: Add exitfail.m4, extensions.m4, gnulib.m4,
7847 hard-locale.m4, mbstate_t.m4, strerror_r.m4, strndup.m4,
7848 xstrndup.m4. Remove glibc21.m4, intdiv0.m4, inttypes-pri.m4,
7849 inttypes.m4, inttypes_h.m4, isc-posix.m4, lcmessage.m4,
7850 stdint_h.m4, uintmax_t.m4, ulonglong.m4.
7851 * src/.cvsignore: Add *.output.
7852
7853 * src/parse-gram.y: Put copyright notice inside %{ %} so it
7854 gets copied to the output file.
7855
7856 2004-04-28 Paul Eggert <eggert@twinsun.com>
7857
7858 Get files from the gnulib and po repositories, instead of relying
7859 on them being in our CVS. Upgrade to latest versions of gnulib
7860 and Automake.
7861
7862 * Makefile.am (SUBDIRS): Remove m4; Automake now does m4.
7863 * bootstrap: Bootstrap from gnulib and po repositories.
7864 Much of this code was stolen from GNU diff and GNU tar's bootstrap.
7865 * README-cvs: Document these changes. Remove version numbers from
7866 mentions of build tools, since they change so often. Mention Flex.
7867
7868 * configure.ac (AC_CONFIG_MACRO_DIR): Add, with m4 as arg.
7869 (gl_USE_SYSTEM_EXTENSIONS): Add.
7870 (AC_GNU_SOURCE, AC_AIX, AC_MINIX):
7871 Remove; no longer needed, as gl_USE_SYSTEM_EXTENSIONS
7872 does this for us.
7873 (AC_ISC_POSIX): Remove; we no longer support this
7874 ancient OS, as it gets in the way of latest Autoconf & gnulib.
7875 (AC_HEADER_STDC): Remove: we now assume C89 or better.
7876 (AC_CHECK_HEADERS_ONCE): Use instead of AC_CHECK_HEADERS.
7877 Do not check for C89 headers, except for locale.h which is used
7878 by the Yacc library and must port to K&R hosts.
7879 (AC_CHECK_FUNCS_ONCE): Use instead of AC_CHECK_FUNCS.
7880 Do not check for C89 functions, except for setlocale which is
7881 used by the Yacc library.
7882 (AC_CHECK_DECLS, AC_REPLACE_FUNCS): Remove; no longer needed.
7883 (gl_DIRNAME, gl_ERROR, gl_FUNC_ALLOCA, gl_FUNC_MEMCHR,
7884 gl_FUNC_MEMRCHR, gl_FUNC_STPCPY, gl_FUNC_STRNLEN, gl_FUNC_STRTOL,
7885 gl_GETOPT, gl_HASH, gl_MBSWIDTH, gl_OBSTACK, gl_QUOTE,
7886 gl_QUOTEARG, gl_XALLOC, jm_FUNC_GLIBC_UNLOCKED_IO, jm_FUNC_MALLOC,
7887 AM_GNU_GETTEXT): Remove; now done by:
7888 (GNULIB_AUTOCONF_SNIPPET): Add. "bootstrap" builds this for us.
7889 (AC_CONFIG_FILES): Remove m4/Makefile, as Automake now does this
7890 for us.
7891
7892 * lib/Makefile.am: Include gnulib.mk, built for us by "bootstrap".
7893 (BUILT_SOURCES, EXTRA_DIST, MOSTLYCLEANFILES):
7894 Define to empty, as gnulib.mk will do the rest for us.
7895 ($(libbison_a_OBJECTS), stdbool.h): Remove, as gnulib.mk does this
7896 for us.
7897 (libbison_a_SOURCES): Define to $(lib_SOURCES) now.
7898 (lib_SOURCES): New symbol, containing only the non-gnulib libs.
7899
7900 * src/files.c: Include gnulib's xstrndup.h.
7901
7902 * src/system.h (MALLOC): Use xnmalloc, for better overflow checking.
7903 (REALLOC): Use xnrealloc, for likewise.
7904 (xstrndup, stpcpy): Remove decls, as gnulib does this for us now.
7905 (strnlen, memrchr): Remove decls; functions no longer used.
7906 Include <stpcpy.h>.
7907
7908 * config/depcomp, config/install-sh, lib/alloca.c, lib/argmatch.c,
7909 lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
7910 lib/error.c, lib/error.h, lib/getopt.c, lib/getopt.h,
7911 lib/getopt1.c, lib/gettext.h, lib/hash.c, lib/hash.h,
7912 lib/malloc.c, lib/mbswidth.c, lib/mbswidth.h, lib/memchr.c,
7913 lib/memcmp.c, lib/memrchr.c, lib/obstack.c, lib/obstack.h,
7914 lib/quote.c, lib/quote.h, lib/quotearg.c, lib/quotearg.h,
7915 lib/realloc.c, lib/stdbool_.h, lib/stpcpy.c, lib/strcasecmp.c,
7916 lib/strchr.c, lib/strncasecmp.c, lib/strnlen.c, lib/strrchr.c,
7917 lib/strspn.c, lib/strtol.c, lib/strtoul.c, lib/unlocked-io.h,
7918 lib/xalloc.h, lib/xmalloc.c, lib/xstrdup.c, lib/xstrndup.c,
7919 m4/Makefile.am, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
7920 m4/error.m4, m4/getopt.m4, m4/hash.m4, m4/malloc.m4,
7921 m4/mbrtowc.m4, m4/mbswidth.m4, m4/memchr.m4, m4/memcmp.m4,
7922 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/prereq.m4,
7923 m4/quote.m4, m4/quotearg.m4, m4/realloc.m4, m4/stdbool.m4,
7924 m4/stpcpy.m4, m4/strnlen.m4, m4/strtol.m4, m4/strtoul.m4,
7925 m4/unlocked-io.m4, m4/xalloc.m4, po/LINGUAS, po/Makefile.in.in,
7926 po/Makevars, po/da.po, po/de.po, po/es.po, po/et.po, po/fr.po,
7927 po/hr.po, po/id.po, po/it.po, po/ja.po, po/ms.po, po/nl.po,
7928 po/pt_BR.po, po/ro.po, po/ru.po, po/sv.po, po/tr.po:
7929 Remove, as these files are now generated automatically
7930 by bootstrap or automake.
7931
7932 * po/ChangeLog: Remove: all but one entry was a duplicate
7933 of this file, and I moved that 2000-11-02 entry here.
7934
7935 * config/.cvsignore: Add Makefile, depcomp, install-sh.
7936 * lib/.cvsignore: Add alloca.c, alloca.h, alloca_.h, argmatch.c,
7937 argmatch.h, basename.c, dirname.c, dirname.h, error.c, error.h,
7938 exit.h, exitfail.c, exitfail.h, getopt.c, getopt.h, getopt1.c,
7939 getopt_int.h, gettext.h, gnulib.mk, hard-locale.c, hard-locale.h,
7940 hash.c, hash.h, malloc.c, mbswidth.c, mbswidth.h, memchr.c,
7941 memcmp.c, memrchr.c, obstack.c, obstack.h, quote.c, quote.h,
7942 quotearg.c, quotearg.h, realloc.c, stdbool_.h, stpcpy.c, stpcpy.h,
7943 strcasecmp.c, strchr.c, stripslash.c, strncasecmp.c, strndup.c,
7944 strnlen.c, strrchr.c, strspn.c, strtol.c, strtoul.c,
7945 unlocked-io.h, xalloc.h, xmalloc.c, xstrdup.c, xstrndup.c,
7946 xstrndup.h.
7947 * m4/.cvsignore: Remove Makefile, Makefile.in. Add alloca.m4,
7948 dirname.m4, dos.m4, error.m4, getopt.m4, hash.m4, mbrtowc.m4,
7949 mbswidth.m4, obstack.m4, onceonly.m4, quote.m4, quotearg.m4,
7950 stdbool.m4, stpcpy.m4, strnlen.m4, unlocked-io.m4, xalloc.m4.
7951 * po/.cvsignore: Add *.po, LINGUAS, Makefile.in.in, Makevars.
7952 * src/.cvsignore: Remove *_.c.
7953
7954
7955 * Makefile.maint (GZIP_ENV): Don't use --rsyncable if gzip doesn't
7956 support it. (The latest stable gzip doesn't.)
7957
7958 2004-04-27 Paul Eggert <eggert@twinsun.com>
7959
7960 * data/lalr1.cc (Parser::stos_) [! YYDEBUG]: Define even in this
7961 case, as stos_ is now used by destructors due to the 2004-02-09
7962 change.
7963
7964 Remove more K&R C support.
7965 * lib/libiberty.y (PARAMS): Remove. All uses removed.
7966 * lib/subpipe.c (errno): Remove decl.
7967 Include <stdlib.h> unconditionally.
7968 (EXIT_FAILURE): Remove macro.
7969 * src/complain.c (vfprintf, strerror): Remove.
7970 * src/system.h: Include limits.h, stdlib.h, string.h, locale.h
7971 unconditionally.
7972 (EXIT_FAILURE, EXIT_SUCCESS, setlocale): Remove defns.
7973 Use latest Autoconf recommendations for including inttypes.h, stdint.h.
7974 (strchr, strspn, memchr): Remove decls.
7975 * tests/calc.at (_AT_DATA_CALC_Y): Include stdlib.h, string.h
7976 unconditionally. Do not declare perror.
7977 * tests/conflicts.at (%nonassoc and eof): Include stdlib.h
7978 unconditionally.
7979
7980 * src/complain.c (_): Remove useless defn, as system.h defines this.
7981
7982 * lib/bitset.h (__INT_TO_PTR): Remove; workaround no longer needed
7983 with latest obstack.h.
7984 * lib/ebitset.c (ebitset_elt_alloc): Don't bother to cast args
7985 to procedure types, as obstack.h now does that for us.
7986 * lib/lbitset.c (lbitset_elt_alloc): Likewise.
7987
7988 * lib/subpipe.h [HAVE_SYS_TYPES_H]: Include <sys/types.h>,
7989 so that this include file can stand alone.
7990 * lib/subpipe.c: Do not include <sys/types.h>, as subpipe.h
7991 does this now. Include subpipe.h first after config.h, to
7992 test whether it can stand alone.
7993
7994 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Don't
7995 declare yyerror when using lalr.cc, as GCC 3.4.0 warns about the
7996 unused declaration.
7997
7998 * tests/synclines.at (%union synch line): Put a dummy member in
7999 the union, because empty unions aren't allowed in C. Caught
8000 by GCC 3.4.0.
8001
8002 2004-04-13 Jim Meyering <jim@meyering.net>
8003
8004 * src/conflicts.c (conflicts_print): Correct format string typo:
8005 use `%%' to produce literal `%'. (trivial change)
8006
8007 2004-03-30 Paul Eggert <eggert@twinsun.com>
8008
8009 * src/getargs.c (version): Update copyright year to 2004.
8010
8011 * data/c.m4 (b4_int_type): Use 'short int' rather than
8012 'short', and similarly for 'long', 'unsigned', etc.
8013 * data/glr.c (YYTRANSLATE, yyconfl, yySymbol, yyItemNum,
8014 yygetLRActions, yyprocessOneStack, yyrecoverSyntaxError,
8015 yy_yypstack, yydumpstack): Likewise.
8016 * data/lalr1.cc (user_token_number_max_, user_token_number_max_,
8017 translate_, seq_, [], pop, Slice, range_, operator+, operator+=):
8018 Likewise.
8019 * data/yacc.c (b4_int_type, yyss, YYSTACK_BYTES, yysigned_char,
8020 yy_stack_print, yyparse): Likewise.
8021 * doc/bison.texinfo (Prologue, Multiple Types): Likewise.
8022 * lib/bbitset.h (bitset_word, BITSET_WORD_BITS): Likewise.
8023 * lib/bitset.c (bitset_print): Likewise.
8024 * lib/bitset_stats.c (bitste_log_histogram_print): Likewise.
8025 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
8026 * lib/bitsetv.c (bitsetv_dump): Likewise.
8027 * lib/ebitset.c (EBITSET_ELT_BITS, ebitset_elt_alloc): Likewise.
8028 * lib/lbitset.c (LBITSET_ELT_BITS, lbitset_elt_alloc, debug_lbitset):
8029 Likewise.
8030 * src/LR0.c (allocate_itemsets): Likewise.
8031 * src/gram.h (rule_number, rule): Likewise.
8032 * src/lalr.h (goto_number): Likewise.
8033 * src/nullable.c (nullable_compute): Likewise.
8034 * src/output.c (prepare_rules): Likewise.
8035 * src/relation.c (relation_print, relation_digraph): Likewise.
8036 * src/relation.h (relation_node): Likewise.
8037 * src/state.h (state_number, transitions, errs, reductions,
8038 struct state): Likewise.
8039 * src/symtab.h (symbol_number, struct symbol): Likewise.
8040 * src/tables.c (vector_number, tally, action_number,
8041 default_goto, goto_actions): Likewise.
8042 * tests/existing.at (GNU Cim Grammar): Likewise.
8043 * tests/regression.at (Web2c Actions): Likewise.
8044
8045 * src/output.c (muscle_insert_short_int_table): Renamed from
8046 muscle_insert_short_table. All uses changed.
8047
8048 2004-03-25 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
8049
8050 * src/parse-gram.y: Define PERCENT_EXPECT_RR.
8051 (declaration): Replace expected_conflicts with expected_sr_conflicts.
8052 Add %expect-rr rule.
8053
8054 * src/scan-gram.l: Recognize %expect-rr.
8055
8056 * src/conflicts.h (expected_sr_conflicts): Rename from
8057 expected_conflicts.
8058 (expected_rr_conflicts): Declare.
8059
8060 * src/conflicts.c (expected_sr_conflicts): Rename from
8061 expected_conflicts.
8062 (expected_rr_conflicts): Define.
8063 (conflicts_print): Check r/r conflicts against expected_rr_conflicts
8064 for GLR parsers.
8065 Use expected_sr_conflicts in place of expected_conflicts.
8066 Warn if expected_rr_conflicts used in non-GLR parser.
8067
8068 * doc/bison.texinfo: Add documentation for %expect-rr.
8069
8070 2004-03-08 Paul Eggert <eggert@gnu.org>
8071
8072 Add support for hex token numbers. Suggested by Odd Arild Olsen in
8073 <http://lists.gnu.org/archive/html/bison-patches/2004-03/msg00000.html>.
8074
8075 * NEWS: Document hexadecimal tokens, no NUL bytes, %destructor
8076 in lalr1.cc.
8077 * doc/bison.texinfo (Token Decl): Add hexadecimal token numbers.
8078 * src/scan-gram.l (scan_integer): New function.
8079 ({int}): Use it.
8080 (0[xX][0-9abcdefABCDEF]+): New pattern, to support hex numbers.
8081 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>, \\x[0-9abcdefABCDEF]+,
8082 handle_action_dollar, handle_action_at, convert_ucn_to_byte):
8083 Say "long int", not "long", for uniformity with GNU style.
8084
8085 2004-02-25 Paul Eggert <eggert@twinsun.com>
8086
8087 * tests/local.at (AT_COMPILE, AT_COMPILE_CXX): Ignore stdout from
8088 compilers. This fixes a problem with Intel's C++ compiler being
8089 chatty, reported by Guido Trentalancia in
8090 <http://lists.gnu.org/archive/html/bug-bison/2004-02/msg00030.html>.
8091
8092 2004-02-09 Alexandre Duret-Lutz <adl@gnu.org>
8093
8094 Support %destructor and merge error locations in lalr1.cc.
8095
8096 * data/lalr1.cc (b4_cxx_destruct_def): New macro.
8097 (Parser::stos_): Define unconditionally.
8098 (Parser::destruct_): New method. Generate its body with
8099 b4_yydestruct_generate.
8100 (Parser::error_start_): New attribute.
8101 (Parser::parse) <yyerrlab, yyerrlab1>: Call destruct_ on erroneous
8102 token which are discarded.
8103 (Parser::parse) <yyerrlab, yyerrorlab, yyerrlab1>: Update
8104 error_start_ when erroneous token are discarded.
8105 (Parser::parse) <yyerrlab1>: Compute the location of the error
8106 token so that it covers all the discarded tokens.
8107 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust so
8108 it can be called with `%skeleton "lalr1.cc"', and do that.
8109
8110 2004-02-02 Paul Eggert <eggert@twinsun.com>
8111
8112 * src/Makefile.am (AM_CPPFLAGS): New macro. It mentions
8113 $(top_srcdir)/lib and ../lib. This fixes a bug reported
8114 by Paul Hilfinger; the old INCLUDES value didn't mention ../lib.
8115 There's no need to mention top_builddir since Automake does that
8116 for us.
8117 (INCLUDES): Remove, as Automake says it's obsolescent.
8118 Contents migrated into AM_CPPFLAGS as described above.
8119 * lib/Makefile.am (INCLUDES): Remove; obsolescent.
8120
8121 2004-01-14 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
8122
8123 * data/glr.c (yytokenName): Bullet-proof against YYEMPTY token.
8124 (yyreportSyntaxError): Handle case where lookahead token is
8125 YYEMPTY.
8126
8127 2004-01-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
8128
8129 * data/glr.c: Put casts on uses of YYREALLOC and YYMALLOC so that
8130 resulting parsers are compilable with C++.
8131
8132 2003-12-23 Paul Eggert <eggert@twinsun.com>
8133
8134 * config/depcomp, config/install-sh: Sync with Automake 1.8.
8135 * src/output.c (output_skeleton): Rename local var.
8136 * tests/input.at (Torturing the Scanner): Don't use \x0 or \0 in
8137 Bison tokens, as this runs afoul of the 2003-10-07 change that
8138 disallowed NUL bytes in character constants or string literals.
8139
8140 * tests/local.at: Require Autoconf 2.59's Autotest.
8141 * tests/testsuite.at: Don't include local.at, since we now assume
8142 Autoconf 2.59 or later. Autoconf 2.59 had some problems with
8143 including it.
8144 * tests/Makefile.am ($(TESTSUITE)): Remove warning about ignoring
8145 multiple inclusion warnings.
8146
8147 2003-12-02 Akim Demaille <akim@epita.fr>
8148
8149 * doc/bison.texinfo (How Can I Reset the Parser): More about start
8150 conditions.
8151 From Bruno Haible.
8152
8153 2003-11-18 Alexandre Duret-Lutz <adl@gnu.org>
8154
8155 * doc/bison.texinfo (Bison Options): Escape `@' in `$@'.
8156
8157 2003-10-07 Paul Eggert <eggert@twinsun.com>
8158
8159 * tests/Makefile.am (clean-local): Don't run 'testsuite --clean'
8160 if testsuite doesn't exist.
8161
8162 * doc/bison.texinfo (Symbols): NUL bytes are not allowed in string
8163 literals, unfortunately.
8164 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>):
8165 Complain about NUL bytes in character constants or string literals.
8166
8167 2003-10-05 Paul Eggert <eggert@twinsun.com>
8168
8169 * NEWS: Don't document %no-default-prec, as it's still
8170 too experimental.
8171 * doc/bison.texinfo: Document %no-default-prec only if
8172 the defaultprec flag is set. Normally it's not.
8173
8174 2003-10-04 Paul Eggert <eggert@twinsun.com>
8175
8176 * data/glr.c (b4_rhs_value, b4_rhs_location): Yield a
8177 non-modifiable lvalue, instead of a modifiable one.
8178 * doc/bison.texinfo (Actions): Document that $$ can
8179 be assigned to. Do not claim that $$ and $N are
8180 array element references: user code should not rely on this.
8181
8182 2003-10-01 Paul Eggert <eggert@twinsun.com>
8183
8184 * src/parse-gram.h (PERCENT_NO_DEFAULT_PREC): New token.
8185 (grammar_declaration): Use it.
8186 * src/scan-gram.l: New token %no-default-prec.
8187 * tests/conflicts.at: Revamp tests to use %no-default-prec.
8188 * NEWS, doc/bison.texinfo: Document the above.
8189
8190 2003-10-01 Akim Demaille <akim@epita.fr>
8191
8192 VCG no longer supports long_straight_phase.
8193
8194 * src/vcg.c, src/vcg.h: Remove the handling of long_straight_phase.
8195 * src/print_graph.c (print_graph): Adjust.
8196
8197 2003-09-30 Frank Heckenbach <frank@g-n-u.de>
8198 and Paul Eggert <eggert@twinsun.com>
8199
8200 * doc/bison.texinfo (Decl Summary, Contextual Precedence,
8201 Table of Symbols): Document %default-prec.
8202 * src/parse-gram.y (PERCENT_DEFAULT_PREC): New token.
8203 (grammar_declaration): Set default_prec on %default-prec.
8204 * src/scan-gram.l (%default-prec): New token.
8205 * src/reader.h (default_prec): New flag.
8206 * src/reader.c: Likewise.
8207 (packgram): Handle it.
8208 * tests/conflicts.at (%default-prec without %prec,
8209 %default-prec with %prec, %default-prec 1): New tests.
8210
8211 2003-09-30 Paul Eggert <eggert@twinsun.com>
8212
8213 * tests/testsuite.at: Include local.at, not input.at, fixing
8214 a typo in the 2003-08-25 patch.
8215
8216 2003-08-27 Akim Demaille <akim@epita.fr>
8217
8218 * data/lalr1.cc (yyparse) [__GNUC__]: "Use" yyerrorlab to pacify
8219 GCC warnings.
8220
8221 2003-08-26 Akim Demaille <akim@epita.fr>
8222
8223 * config/announce-gen (print_changelog_deltas): Neutralize "<#" as
8224 "<\#" to avoid magic from Gnus when posting parts of this script.
8225
8226 2003-08-26 Akim Demaille <akim@epita.fr>
8227
8228 * data/lalr1.cc (Parser::report_syntax_error_): New, extracted from
8229 (Parser::parse): here.
8230 Adjust: nerrs and errstatus is now replaced by...
8231 (Parser::nerrs_, Parser::errstatus_): New.
8232
8233 2003-08-25 Akim Demaille <akim@epita.fr>
8234
8235 * config/announce-gen, Makefile.cfg: New.
8236 * Makefile.am: Adjust.
8237 * GNUmakefile, Makefile.maint: Update from CVS Autoconf, but
8238 keeping local WGET and WGETFLAGS modifications from Paul Eggert.
8239
8240 2003-08-25 Akim Demaille <akim@epita.fr>
8241
8242 When reducing initial empty rules, Bison parser read an initial
8243 location that is not defined. This results in garbage, and that
8244 affects Bison's own parser. Therefore we need (i) to extend Bison
8245 to support a means to initialize this location, and (ii) to use
8246 this CVS Bison to fix CVS Bison's parser.
8247
8248 * src/reader.h, reader.c (epilogue_augment): Remove, replace
8249 with...
8250 * src/muscle_tab.h, src/muscle_tab.c (muscle_code_grow): this.
8251 * src/parse-gram.y: Adjust.
8252 (%initial-action): New.
8253 (%error-verbose): Since we require CVS Bison, there is no reason
8254 not to use it.
8255 * src/scan-gram.l: Adjust.
8256 * src/Makefile.am (YACC): New, to make sure we use our own parser.
8257 * data/yacc.c (yyparse): Use b4_initial_action.
8258
8259 2003-08-25 Akim Demaille <akim@epita.fr>
8260
8261 * doc/bison.texinfo: Don't promote stdout for error messages.
8262
8263 2003-08-25 Akim Demaille <akim@epita.fr>
8264
8265 * data/lalr1.cc (Parser::reduce_print_): Remove unused yyi.
8266 From Alexandre Duret-Lutz.
8267
8268 2003-08-25 Akim Demaille <akim@epita.fr>
8269
8270 Version 1.875c.
8271
8272 2003-08-25 Akim Demaille <akim@epita.fr>
8273
8274 * data/lalr1.cc (Parser::stack_print_, YY_STACK_PRINT): New.
8275 Use them.
8276
8277 2003-08-25 Akim Demaille <akim@epita.fr>
8278
8279 * data/lalr1.cc (Parser::reduce_print_): New.
8280 Use it.
8281
8282 2003-08-25 Akim Demaille <akim@epita.fr>
8283
8284 Have lalr1.cc catch with Paul Eggert's patch to fix the infinite
8285 error recovery loops. This patch is based on
8286 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00000.html>.
8287 Also, augment the similarity between lalr1.cc and yacc.c.
8288 Note: the locations of error recovery rules are not correct yet.
8289
8290 * data/lalr1.cc: Comment changes to augment the similarity between
8291 lalr1.cc and yacc.c.
8292 (YYERROR): Goto to yyerrorlab, not yyerrlab1.
8293 (yyerrlab1): Remove, but where it used to be (now the bottom part of
8294 yyerrlab), when hitting EOF, pop the whole stack here instead of
8295 merely falling thru the default error handling mechanism.
8296 (yyerrorlab): New label, with the old contents of YYERROR,
8297 plus the following change: pop the stack of rhs corresponding
8298 to the production that invoked YYERROR. That is how Yacc
8299 behaves (required by POSIX).
8300 * tests/calc.at (AT_CHECK_CALC_LALR1_CC): No longer expected to
8301 fail.
8302
8303 2003-08-25 Akim Demaille <akim@epita.fr>
8304
8305 Tune local.at so that people can "autom4te -l autotest calc.at -o
8306 calc" for instance, to extract a sub test suite.
8307
8308 * tests/testsuite.at: Move the initialization, Autotest version
8309 requirement, and AT_TESTED invocation into...
8310 * tests/local.at: here.
8311 * tests/testsuite.at: Include it for compatibility with Autoconf
8312 2.57.
8313 * tests/Makefile.am ($(TESTSUITE)): Report that the warning should
8314 be ignore.
8315
8316 2003-08-04 Paul Eggert <eggert@twinsun.com>
8317
8318 Rework code slightly to avoid gcc -Wtraditional warnings.
8319 * data/glr.c (yyuserMerge): Return void, not YYSTYPE.
8320 The returned value is now stored in *YY0. All callers changed.
8321 * src/output.c (merge_output): Adjust to the above change.
8322
8323 2003-07-26 Paul Eggert <eggert@twinsun.com>
8324
8325 * data/glr.c (YYASSERT): New macro.
8326 (yyfillin, yydoAction, yyglrReduce, yysplitStack,
8327 yyresolveStates, yyprocessOneStack):
8328 Use `YYASSERT (FOO);' rather than `if (! (FOO)) abort ();'.
8329 Derived from a suggestion by Frank Heckenbach.
8330
8331 2003-07-25 Paul Eggert <eggert@twinsun.com>
8332
8333 * data/glr.c (yyglrReduce): Don't use C89 string concatenation,
8334 for portability to K&R C (after ansi2knr, presumably). See
8335 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>
8336 by Frank Heckenbach, though I have omitted the structure-initialization
8337 part of his glr-knr.diff patch since I recall that the Portable
8338 C Compiler didn't require that change.
8339
8340 Let the user specify how to allocate and free memory.
8341 Derived from a suggestion by Frank Heckenbach in
8342 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>.
8343 * data/glr.c (YYFREE, YYMALLOC, YYREALLOC): New macros.
8344 All uses of free, malloc, realloc changed to use these macros,
8345 and unnecessary casts removed.
8346 * data/yacc.c (YYFREE, YYMALLOC): Likewise.
8347
8348 2003-07-06 Matthias Mann <MatthiasMann@gmx.de>
8349
8350 * data/lalr1.cc (operator<<(std::ostream&, const Position&)):
8351 use s.empty() rather than s == "" to test for empty string; see
8352 <http://lists.gnu.org/archive/html/bison-patches/2003-07/msg00003.html>
8353 (trivial change)
8354
8355 2003-06-25 Akim Demaille <akim@epita.fr>
8356
8357 * config/depcomp, config/install-sh: Update from masters.
8358
8359 2003-06-20 Paul Eggert <eggert@twinsun.com>
8360
8361 * data/glr.c (YYLLOC_DEFAULT): Parenthesize arguments as needed,
8362 and return properly parenthesized result.
8363 * data/lalar1.cc (YYLLOC_DEFAULT): Likewise.
8364 * data/yacc.c (YYLLOC_DEFAULT): Likewise.
8365 Remove unnecessary parentheses from uses.
8366 * doc/bison.texinfo (Location Default Action): Describe the
8367 conventions for parentheses.
8368
8369 2003-06-19 Paul Eggert <eggert@twinsun.com>
8370
8371 * data/glr.c (yyremoveDeletes, yy_reduce_print, yyglrReduce,
8372 yyreportTree): Do not assume that size_t is the same width as int,
8373 when printing sizes. Print sizes using an unsigned format.
8374 Problem reported by Frank Heckenbach in
8375 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00035.html>.
8376
8377 Port to Forte Developer 7 C compiler.
8378 * data/glr.c (struct YYLTYPE): If locations are not being used,
8379 declare a single dummy member, as empty structs do not conform
8380 to the C standard.
8381 (YYERROR, YYBACKUP): Do not use "do { ...; return foo; } while (0)";
8382 the Forte Developer 7 C compiler complains that end-of-loop
8383 code is not reached.
8384
8385 2003-06-17 Paul Eggert <eggert@twinsun.com>
8386
8387 * lib/libiberty.h (PARAMS): Spell argument as Args, not as X, to
8388 avoid warnings from picky compilers about redefinition of PARAMS.
8389
8390 2003-06-17 Paul Eggert <eggert@twinsun.com>
8391
8392 Version 1.875b.
8393
8394 * NEWS: Document 1.875b.
8395
8396 * lib/bbitset.h: Do not include config.h; that's the includer's job.
8397 Do not include <sys/types.h>; shouldn't be needed on a C89 host.
8398 * lib/bitset.h (bitset_compatible_p): Indent as per GNU standard.
8399 Don't use 'index' in comments, as it's a builtin fn on some hosts.
8400 * lib/bitset_stats.c: Include gettext.h unconditionally, as
8401 per recent gettext manual's suggestion.
8402 * lib/ebitset.c (ebitset_resize, ebitset_unused_clear):
8403 Use prototypes, not old-style definitions.
8404 * lib/lbitset.c (lbitset_unused_clear): Likewise.
8405 * lib/vbitset.c (vbitset_resize, vbitset_ones, vbitset_zero,
8406 vbitset_empty_p, vbitset_copy1, vbitset_not, vbitset_equal_p,
8407 vbitset_subset_p, vbitset_disjoint_p, vbitset_and, vbitset_and_cmp,
8408 vbitset_andn, vbitset_andn_cmp, vbitset_or, vbitset_or_cmp,
8409 vbitset_xor, vbitset_xor_cmp, vbitset_and_or, vbitset_and_or_cmp,
8410 vbitset_andn_or, vbitset_andn_or_cmp, vbitset_or_and,
8411 vbitset_or_and_cmp, vbitset_copy): Likewise.
8412
8413 * lib/libiberty.h: Do not include config.h; that's the includer's job.
8414 Do not include <stdlib.h>.
8415 (PARAMS): Define unconditionally for C89.
8416 (ATTRIBUTE_NORETURN): Remove.
8417 (ATTRIBUTE_UNUSED): Define unconditionally.
8418
8419 Upgrade to 2003-06-08 libbitset, submitted by Michael Hayes in:
8420 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00005.html>
8421 * lib/Makefile.am (bitsets_sources): Add vbitset.c, vbitset.h.
8422 * lib/vbitset.c, lib/vbitset.h: New files.
8423 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
8424 lib/bitset_stats.c, lib/ebitset.c, lib/lbitset.c: Import
8425 from libbitset.
8426
8427 * doc/bison.texinfo (How Can I Reset the Parser): Renamed from
8428 `How Can I Reset @code{yyparse}', since texinfo does not allow
8429 arbitrary @ in node names.
8430
8431 * m4/Makefile.am (EXTRA_DIST): Add the following files, which
8432 shouldn't be needed according to the gettext 0.12.1 documentation
8433 but which seem to be needed anyway: codeset.m4 glibc21.m4
8434 intdiv0.m4 inttypes-pri.m4 inttypes.m4 inttypes_h.m4 isc-posix.m4
8435 lcmessage.m4 nls.m4 po.m4 stdint_h.m4 uintmax_t.m4 ulonglong.m4.
8436 * po/Makefile.in.in: Upgrade to gettext 0.12.1 version.
8437
8438 * lib/.cvsignore: Add stdbool.h.
8439 * m4/.cvsignore: Add nls.m4, po.m4.
8440
8441 Upgrade to CVS gnulib.
8442 * stdbool_.h: File renamed from stdbool.h.in.
8443 * configure.ac (AM_STDBOOL_H): Invoke this instead of
8444 AC_HEADER_STDBOOL.
8445 (AM_GNU_GETTEXT): Put brackets around args, as latest manual suggests.
8446 (AM_GNU_GETTEXT_VERSION): Update to 0.12.1.
8447 * lib/Makefile.am (EXTRA_DIST): Add stdbool_.h.
8448 (MOSTLYCLEANFILES): New var.
8449 ($(libbison_a_OBJECTS)): Depend on $(STDBOOL_H).
8450 (stdbool.h): New rule.
8451 * lib/dirname.c, lib/dirname.h, lib/hash.c, lib/hash.h,
8452 lib/malloc.c, lib/obstack.h, lib/quote.c, lib/realloc.c,
8453 lib/strcasecmp.c, lib/xalloc.h, m4/alloca.m4, m4/onceonly.m4,
8454 m4/quote.m4: Upgrade to today's gnulib.
8455
8456 * tests/calc.at (AT_CHECK_CALC): New option EXPECTED-TO-FAIL.
8457 (AT_CHECK_CALC_LALR1_CC): Use it, since the C++ LALR parser fails
8458 the tests right now.
8459 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Ensure yylex and
8460 yyerror are declared before use; C99 requires this.
8461
8462 2003-06-09 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
8463
8464 * data/glr.c (YYERROR): Update definition to reset yyerrState to 0
8465 first.
8466 (yyrecoverSyntaxError): Correct the logic for setting and testing
8467 yyerrState.
8468 Correct comment on handling EOF.
8469 Allow states with only a default reduction, rather than failing
8470 (I can't quite reconstruct why these were not allowed before).
8471
8472 Fixes to avoid problem that $-N rules in GLR parsers can cause
8473 buffer overruns, corrupting state.
8474
8475 * src/output.c (prepare_rules): Output max_left_semantic_context
8476 definition.
8477 * src/reader.h (max_left_semantic_context): New variable declaration.
8478 * src/scan-gram.l (max_left_semantic_context): Define.
8479 (handle_action_dollar): Update max_left_semantic_context.
8480 * data/glr.c (YYMAXLEFT): New definition.
8481 (yydoAction): Increase size of yyrhsVals by YYMAXLEFT.
8482 (yyresolveAction): Ditto.
8483
8484 Fixes to problems with location handling in GLR parsers reported by
8485 Frank Heckenbach (2003/06/05).
8486
8487 * data/glr.c (YYLTYPE): Make trivial if locations not used.
8488 (YYRHSLOC): Add parentheses, and define only if locations used.
8489 (YYLLOC_DEFAULT): Add parentheses, and give trivial definition if
8490 locations not used.
8491 (yyuserAction): Use YYLLOC_DEFAULT to set *yylocp.
8492 (yydoAction): Remove redundant initialization of *yyvalp and *yylocp.
8493
8494 * tests/cxx-type.at: Exercise location information; update tests
8495 to differentiate output with and without locations.
8496 Remove forward declarations of yylex and yyerror---caused errors
8497 because default YYLTYPE not yet defined.
8498 Change semantic actions to compute strings, rather than printing
8499 them directly (to test proper passing of semantics values). Change
8500 output to prefix notation and update test data and expected results.
8501 (yylex): Track locations.
8502 (stmtMerge): Return value rather than printing, and include arguments
8503 in value.
8504
8505 2003-06-03 Paul Eggert <eggert@twinsun.com>
8506
8507 Avoid warnings generated by GCC 2.95.4 when Bison is
8508 configured with --enable-gcc-warnings.
8509 * data/lalr1.cc (yy::]b4_parser_class_name[::parse,
8510 yy::]b4_parser_class_name[::translate_,
8511 yy::Stack::operator[] (unsigned),
8512 yy::Stack::operator[] (unsigned) const,
8513 yy::Slice::operator[] (unsigned),
8514 yy::Slice::operator[] (unsigned) const):
8515 Rename local vars to avoid warnings.
8516 * tests/glr-regression.at (Improper handling of embedded actions
8517 and $-N in GLR parsers): Remove unused local variable from yylex.
8518 * tests/regression.at (_AT_DATA_DANCER_Y): Declare yylex to take
8519 (void) as arg when not pure, since we now assume C89 when building
8520 Bison. Pacify GCC by using parameter.
8521
8522 2003-06-02 Paul Eggert <eggert@twinsun.com>
8523
8524 * data/lalr1.cc (yy::Position::lines, yy::Position::columns,
8525 yy::Location::lines, yy::Location::columns): Rename arguments
8526 to avoid shadowing; this removes a warning generated by GCC 3.3.
8527
8528 2003-06-01 Paul Eggert <eggert@twinsun.com>
8529
8530 Don't pass C-only warning optins (e.g., -Wmissing-declarations)
8531 to g++, as GCC 3.3 complains if you do it.
8532 * configure.ac (WARNING_CXXFLAGS): New subst. Set it to
8533 everything that WARNING_CFLAGS has, except omit warnings
8534 not suitable for C++.
8535 (AC_PROG_CXX): Use this instead of AC_CHECK_PROGS([CXX], [g++]).
8536 * tests/atlocal.in (CXXFLAGS): New var.
8537 * tests/local.at (AT_COMPILE_CXX): Use it instead of CFLAGS.
8538
8539 Fix a GLR parser bug I reported in February; see
8540 <http://lists.gnu.org/archive/html/bison-patches/2003-02/msg00008.html>.
8541 The problem was that GLR parsers did not conform to the C standard,
8542 because actions like { $1 = $2 + $3; } expanded to expressions
8543 that invoked YYFILL in separate subexpressions, and YYFILL assigned
8544 to a local variable. The C standard says that expressions
8545 like (var = f ()) + (var = f ()) have undefined behavior.
8546 Another problem was that GCC sometimes issues warnings that
8547 yyfill and its parameters are unused.
8548
8549 * data/glr.c (yyfillin): Renamed from the old yyfill. Mark
8550 as possibly unused.
8551 (yyfill): New function.
8552 (YYFILL): Use it.
8553 (yyuserAction): Change type of yynormal to bool, so that it matches
8554 the new yyfill signature. Mark it as possibly unused.
8555
8556
8557 Follow up on a bug I reported in February, where a Bison-generated
8558 parser can loop. Provide a test case and a fix for yacc.c. I
8559 don't have a fix for lalr1.cc or for glr.c, unfortunately.
8560 The original bug report is in:
8561 <http://lists.gnu.org/archive/html/bison-patches/2003-02/msg00044.html>
8562
8563 * data/yacc.c (YYERROR): Now just 'goto yyerrorlab', since the
8564 macro's size was becoming unwieldy.
8565 (yyerrlab): Do not discard an empty lookahead symbol, as this
8566 might destroy garbage.
8567 (yyerrorlab): New label, with the old contents of YYERROR,
8568 plus the following change: pop the stack of rhs corresponding
8569 to the production that invoked YYERROR. That is how Yacc
8570 behaves, and POSIX requires this behavior.
8571 (yyerrlab1): Use YYPOPSTACK instead of its definiens.
8572 * tests/calc.at (_AT_DATA_CALC_Y): Include unistd.h if available.
8573 Define 'alarm' to do nothing if unistd.h is not available.
8574 Add a new rule "exp: '-' error;" to test the above change to
8575 data/yacc.c. Use 'alarm' to abort any test taking longer than
8576 10 seconds, as it's probably looping.
8577 (AT_CHECK_CALC): Test recovery from error in new grammar rule.
8578 Also, the new yacc.c generates two fewer diagnostics for an
8579 existing test.
8580
8581 2003-05-24 Paul Eggert <eggert@twinsun.com>
8582
8583 * data/glr.c (YYSTACKEXPANDABLE): Do not evaluate
8584 YYSTYPE_IS_TRIVIAL or YYSTYPE_IS_TRIVIAL unless they are defined.
8585 This fixes a problem reported by John Bowman when the Compaq/HP
8586 Alpha cxx compiler happy (e.g. using cxx -D__USE_STD_IOSTREAM
8587 -ansi -Wall -gall).
8588 * data/yacc.c (union yyalloc): Likewise.
8589 (YYCOPY): Do not evaluate __GNUC__ unless it is defined.
8590
8591 Switch from 'int' to 'bool' where that makes sense.
8592
8593 * lib/abitset.c (abitset_test, abitset_empty_p, abitset_equal_p,
8594 abitset_subset_p, abitset_disjoint_p, abitset_and_cmp,
8595 abitset_andn_cmp, abitset_or_cmp, abitset_xor_cmp, abitset_and_or,
8596 abitset_and_or_cmp, abitset_andn_or_cmp, abitset_or_and_cmp):
8597 Return or accept bool, not int. All callers changed.
8598 * lib/bbitset.h: (bitset_toggle_, bitset_copy_, bitset_and_or_cmp_,
8599 bitset_andn_or_cmp_, bitset_or_and_cmp_): Likewise.
8600 * lib/bitset.c (bitset_only_set_p, bitset_print, bitset_toggle_,
8601 bitset_copy_, bitset_op4_cmp, bitset_and_or_cmp_, bitset_andn_or_cmp_,
8602 bitset_or_and_cmp_): Likewise.
8603 * lib/bitset.h (bitset_test, bitset_only_set_p): Likewise.
8604 * lib/bitset_stats.c (bitset_stats_print, bitset_stats_toggle,
8605 bitset_stats_test, bitset_stats_empty_p, bitset_stats_disjoint_p,
8606 bitset_stats_equal_p, bitset_stats_subset_p, bitset_stats_and_cmp,
8607 bitset_stats_andn_cmp, bitset_stats_or_cmp, bitset_stats_xor_cmp,
8608 bitset_stats_and_or_cmp, bitset_stats_andn_or_cmp,
8609 bitset_stats_or_and_cmp): Likewise.
8610 * lib/ebitset.c (ebitset_elt_zero_p, ebitset_equal_p, ebitset_copy_cmp,
8611 ebitset_test, ebitset_empty_p, ebitset_subset_p, ebitset_disjoint_p,
8612 ebitset_op3_cmp, ebitset_and_cmp, ebitset_andn_cmp, ebitset_or_cmp,
8613 ebitset_xor_cmp): Likewise.
8614 * lib/lbitset.c (lbitset_elt_zero_p, lbitset_equal_p, lbitset_copy_cmp,
8615 lbitset_test, lbitset_empty_p, lbitset_subset_p, lbitset_disjoint_p,
8616 lbitset_op3_cmp, lbitset_and_cmp, lbitset_andn_cmp, lbitset_or_cmp,
8617 lbitset_xor_cmp): Likewise.
8618 * lib/bbitset.h: Include <stdbool.h>.
8619 (struct bitset_vtable): The following members now return bool, not
8620 int: toggle, test, empty_p, disjoint_p, equal_p, subset_p,
8621 and_cmp, andn_cmp, or_cmp, xor_cmp, and_or_cmp, andn_or_cmp,
8622 or_and_cmp).
8623 * src/conflicts.c (count_rr_conflicts): Likewise.
8624 * lib/bitset_stats.h (bitset_stats_enabled): Now bool, not int.
8625 All uses changed.
8626 * lib/ebitset.c (ebitset_obstack_init): Likewise.
8627 * lib/lbitset.c (lbitset_obstack_init): Likewise.
8628 * src/getargs.c (debug_flag, defines_flag, locations_flag,
8629 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
8630 graph_flag): Likewise.
8631 * src/getargs.h (debug_flag, defines_flag, locations_flag,
8632 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
8633 graph_flag): Likewise.
8634 * src/output.c (error_verbose): Likewise.
8635 * src/output.h (error_verbose): Likewise.
8636 * src/reader.c (start_flag, typed): Likewise.
8637 * src/reader.h (typed): Likewise.
8638 * src/getargs.c (LOCATIONS_OPTION): New constant.
8639 (long_options, getargs): Use it.
8640 * src/lalr.c (build_relations): Use bool, not int.
8641 * src/nullable.c (nullable_compute): Likewise.
8642 * src/print.c (print_reductions): Likewise.
8643 * src/tables.c (action_row, pack_vector): Likewise.
8644 * src/muscle_tab.h (MUSCLE_INSERT_BOOL): New macro.
8645 * src/output.c (prepare): Use it.
8646 * src/output.c (token_definitions_output,
8647 symbol_destructors_output, symbol_destructors_output): Use string,
8648 not boolean integer, to keep track of whether to output separator.
8649 * src/print_graph.c (print_core): Likewise.
8650 * src/state.c (state_rule_lookaheads_print): Likewise.
8651
8652 * config/install-sh: Sync from automake 1.7.5.
8653
8654 2003-05-14 Paul Eggert <eggert@twinsun.com>
8655
8656 * src/parse-gram.y (rules_or_grammar_declaration): Require a
8657 semicolon after a grammar declaration, in the interest of possible
8658 future changes to the Bison input language.
8659 Do not allow a stray semicolon at the start of the grammar.
8660 (rhses.1): Allow one or more semicolons after any rule, including
8661 just before "|" as required by POSIX.
8662 * tests/input.at (Torturing the Scanner): Add tests for ";|" in a
8663 grammar.
8664
8665 2003-05-14 Alexandre Duret-Lutz <adl@gnu.org>
8666
8667 %parse-param support for lalr1.cc.
8668
8669 * data/lalr1.cc (b4_parse_param_decl, b4_parse_param_cons,
8670 b4_cc_constructor_calls, b4_cc_constructor_call,
8671 b4_parse_param_vars, b4_cc_var_decls, b4_cc_var_decl): New m4
8672 definitions.
8673 (yy::b4_parser_class_name::b4_parser_class_name): Take extra
8674 parse-param arguments.
8675 (yy::b4_parser_class_name): Declare instance variables to
8676 hold parse-param arguments.
8677 * tests/calc.at: s/value/semantic_value/ because value clashes
8678 with a member of yy::b4_parser_class_name. Adjust C++ code
8679 to handle %parse-param. Enable %parse-param test in C++.
8680
8681 2003-05-12 Paul Eggert <eggert@twinsun.com>
8682
8683 * doc/bison.texinfo (How Can I Reset @code{yyparse}): Reword the
8684 English a bit. Fix fclose typo. Change "const char" to "char
8685 const", and use ANSI C rather than K&R for "main". Suggest
8686 YY_FLUSH_BUFFER over yyrestart (as that is what Flex recommends)
8687 and suggest yy_switch_to_buffer.
8688
8689 2003-05-05 Paul Eggert <eggert@twinsun.com>
8690
8691 * lib/bitset.h (__INT_TO_PTR): Define to a value that presumes
8692 C89. This avoids a diagnostic on compilers that define __STDC__
8693 to 0, fixing a problem with Tru64 cc reported by Martin Mokrejs in
8694 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
8695
8696 2003-05-03 Paul Eggert <eggert@twinsun.com>
8697
8698 * lib/bitset.h (BITSET_FOR_EACH, BITSET_FOR_EACH_REVERSE):
8699 Do not overrun array bounds.
8700 This should fix a bug reported today by Olatunji Oluwabukunmi in
8701 <http://lists.gnu.org/archive/html/bug-bison/2003-05/msg00004.html>.
8702
8703 2003-04-29 Akim Demaille <akim@epita.fr>
8704
8705 * src/gram.h, src/gram.c (pure_parser, glr_parser): Move to...
8706 * src/getargs.c, src/getargs.h: here, as bool, not int.
8707 (nondeterministic_parser): New.
8708 * src/parse-gram.y, src/scan-gram.l: Support
8709 %nondeterministic-parser.
8710 * src/output.c (prepare): Use nondeterministic_parser instead
8711 of glr_parser where appropriate.
8712 * src/tables.c (conflict_row, action_row, save_row)
8713 (token_actions, token_actions, pack_vector): Ditto.
8714
8715 2003-04-29 Akim Demaille <akim@epita.fr>
8716
8717 * doc/bison.texinfo (C++ Parsers, Implementing Loops): New.
8718
8719 2003-04-29 Akim Demaille <akim@epita.fr>
8720
8721 * tests/calc.at: Also test yacc.c and glr.c (but not lalr1.cc yet)
8722 with %pure-parser and %locations to exercise the patch from Yakov
8723 Markovitch below.
8724
8725 2003-04-28 Tim Van Holder <tim.van.holder@pandora.be>
8726
8727 * data/yacc.c: (b4_lex_param): Corrected for the case where
8728 %lex-param is provided and %pure-parser isn't.
8729
8730 2003-04-27 Paul Eggert <eggert@twinsun.com>
8731
8732 Avoid gcc -Wundef warnings reported by Gerald Pfeifer in
8733 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00044.html>.
8734 * data/yacc.c (YYSTACK_ALLOC): Don't evaluate YYSTACK_USE_ALLOCA
8735 if it is not defined.
8736 (YYMAXDEPTH): Don't evaluate YYMAXDEPTH if it is not defined.
8737
8738 2003-04-26 Paul Eggert <eggert@twinsun.com>
8739
8740 * data/lalr1.cc (yy::Parser::pact_ninf_, yy::Parser::table_ninf_):
8741 Declare to be of type suitable for the ninf value itself, not of
8742 type suitable for the corresponding table, since the latter might
8743 be unsigned but the ninf value might be negative. This fixes a
8744 bug reported by Alexandre Duret-Lutz in
8745 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00017.html>.
8746
8747 * configure.ac (AC_FUNC_ERROR_AT_LINE): Remove, since gl_ERROR
8748 invokes it. We shouldn't invoke it twice because it will attempt
8749 to put error.o in the archive twice. This fixes a glitch reported
8750 by Martin Mokrejs in
8751 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
8752
8753 2003-04-21 Paul Eggert <eggert@twinsun.com>
8754
8755 * m4/error.m4: Update from Bruno Haible's 2003-04-14 patch
8756 to gnulib.
8757
8758 2003-04-21 Yakov Markovitch <Markovitch@iso.ru>
8759
8760 * data/glr.c (yyexpandGLRStack) [!YYSTACKEXPANDABLE]:
8761 Fix obvious typo that results in uncompilable GLR parsers
8762 when both %pure-parser and %locations are used. (trivial change)
8763
8764 2003-04-17 Paul Eggert <eggert@twinsun.com>
8765
8766 * src/scan-gram.l: Add %option nounput, since we no longer use unput.
8767 (unexpected_eof): Renamed from unexpected_end_of_file, for brevity.
8768 Do not insert the expected token via unput, as this runs afoul
8769 of a POSIX-compatibility bug in flex 2.5.31.
8770 All uses changed to BEGIN the parent state,
8771 since we no longer insert the expected token via unput.
8772 * tests/regression.at (Invalid inputs): Remove cascaded diagnostic
8773 that is no longer emitted after the above change.
8774
8775 * src/conflicts.c (set_conflicts): Resolve all conflicts, not just
8776 the first one. This change is from Paul Hilfinger, and it fixes
8777 regression reported by Werner Lemberg in
8778 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00026.html>.
8779
8780 (resolve_sr_conflict): Don't invoke state_errs_set
8781 unless one or more tokens have been explicitly made errors.
8782 Otherwise, the above change causes Bison to abort.
8783
8784 * tests/existing.at (GNU pic Grammar): New test case, taken from
8785 Lemberg's email.
8786
8787 2003-03-31 Akim Demaille <akim@epita.fr>
8788
8789 * doc/Makefile.am (AM_MAKEINFOFLAGS): Don't split the info file.
8790
8791 2003-03-31 Akim Demaille <akim@epita.fr>
8792
8793 * src/output.c (prepare_symbols): Avoid trailing spaces in the
8794 output.
8795
8796 2003-03-31 Akim Demaille <akim@epita.fr>
8797
8798 * doc/bison.texinfo (Strings are Destroyed): s/losses/loses/.
8799 From Paul Hilfinger.
8800
8801 2003-03-29 Akim Demaille <akim@epita.fr>
8802
8803 * m4/error.m4: Do not put under dynamic conditions some code which
8804 expansion is under static control.
8805
8806 2003-03-29 Akim Demaille <akim@epita.fr>
8807
8808 * doc/bison.texinfo (How Can I Reset @code{yyparse}): New.
8809
8810 2003-03-29 Akim Demaille <akim@epita.fr>
8811
8812 * doc/bison.texinfo (Strings are Destroyed): New.
8813
8814 2003-03-13 Paul Eggert <eggert@twinsun.com>
8815
8816 * .cvsignore: Add configure.lineno.
8817 * src/.cvsignore: Add yacc.
8818 * tests/.cvsignore: Add testsuite.log.
8819 * doc/fdl.texi: Sync with latest FSF version.
8820
8821 2003-03-12 Paul Eggert <eggert@twinsun.com>
8822
8823 * scan-gram.l (YY_USER_INIT): Initialize code_start, too.
8824 (<INITIAL><<EOF>>, <SC_PRE_CODE><<EOF>>): Set *loc to the scanner
8825 cursor, instead of leaving it undefined. This fixes a bug
8826 reported by Tim Van Holder in
8827 <http://lists.gnu.org/archive/html/bug-bison/2003-03/msg00023.html>.
8828 * tests/input.at (Torturing the Scanner): Test the scanner on
8829 an empty input file, which was Tim Van Holder's test case.
8830
8831 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): When checking whether
8832 <sys/resource.h> can be included, include sys/time.h and
8833 sys/times.h first, if available. This works around the SunOS
8834 4.1.4 porting bug reported by Bruce Becker in
8835 <http://lists.gnu.org/archive/html/bug-bison/2003-03/msg00018.html>.
8836
8837 * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't
8838 AC_CHECK_HEADERS([sys/wait.h]), as this interferes with
8839 AC_HEADER_SYS_WAIT.
8840
8841 Merge changes from gnulib. This was prompted because the CVS
8842 snapshot didn't build on Solaris 7 due to strnlen problems.
8843
8844 These changes need to be merged back into gnulib:
8845 * lib/hash.c: Include <stdbool.h> unconditionally.
8846 * m4/onceonly.m4 (m4_quote): New macro.
8847 (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE, AC_CHECK_DECLS_ONCE):
8848 Quote AC_FOREACH variable-expansions properly.
8849 The 2003-01-03 obstack.h change also needs merging.
8850 {end of changes requiring merging}
8851
8852 * lib/stdbool.h.in, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
8853 m4/getopt.m4, m4/hash.m4, m4/malloc.m4, m4/memchr.m4,
8854 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/quote.m4,
8855 m4/quotearg.m4, m4/realloc.m4, m4/stpcpy.m4, m4/strnlen.m4,
8856 m4/strtol.m4, m4/strtoul.m4, m4/unlocked-io.m4, m4/xalloc.m4:
8857 New files, imported from gnulib.
8858 * m4/Makefile.am (EXTRA_DIST): Add the new m4/*.m4 files mentioned
8859 above.
8860
8861 * lib/mbswidth.c, m4/error.m4, m4/mbrtowc.m4, m4/mbswidth.m4,
8862 m4/memcmp.m4, m4/prereq.m4, m4/stdbool.m4: Update to current
8863 gnulib sources.
8864
8865 * configure.ac (gl_DIRNAME, gl_GETOPT, gl_HASH, gl_QUOTE, gl_XALLOC):
8866 Add.
8867 (gl_ERROR): New, replacing jm_PREREQ_ERROR.
8868 (gl_FUNC_ALLOCA): New, replacing AC_FUNC_ALLOCA.
8869 (gl_FUNC_STPCPY): New, replacing AC_REPLACE_FUNCS(stpcpy).
8870 (gl_FUNC_STRNLEN): New, replacing AC_FUNC_STRNLEN.
8871 (gl_MBSWIDTH): New, replacing jm_PREREQ_MBSWIDTH.
8872 (gl_OBSTACK): New, replacing AC_FUNC_OBSTACK.
8873 (gl_QUOTEARG): New, replacing jm_PREREQ_QUOTEARG.
8874 (jm_FUNC_GLIBC_UNLOCKED_IO, gl_FUNC_STPCPY, gl_FUNC_STRTOL): New.
8875 (jm_FUNC_MALLOC): New, replacing AC_FUNC_MALLOC.
8876 (jm_FUNC_REALLOC): New, replacing AC_FUNC_REALLOC.
8877 (jm_PREREQ_ARGMATCH): Remove.
8878 (AC_REPLACE_FUNCS): Remove memchr, memrchr, stpcpy, strtol, strtoul.
8879 * lib/Makefile.am (libbison_a_SOURCES): Add argmatch.c, argmatch.h.
8880
8881 * src/system.h: Include <stdbool.h> unconditionally.
8882
8883 * lib/bbitset.h: Include <limits.h> unconditionally. We have been
8884 assuming at least C89 in the bitset code for some time now.
8885
8886 2003-03-03 Akim Demaille <akim@epita.fr>
8887
8888 * ro.po: New.
8889
8890 2003-03-02 Akim Demaille <akim@epita.fr>
8891
8892 * doc/bison.texinfo (Table of Symbols): Reactivate the
8893 documentation for %lex-param, and %parse-param.
8894
8895 2003-03-02 Akim Demaille <akim@epita.fr>
8896
8897 * data/yacc.c, data/glr.c, data/lal1.cc: Use similar code to
8898 generate verbose error messages.
8899 Use the number of tokens as an upper bound in yytname, as it
8900 cannot be a non terminal.
8901
8902 2003-03-02 Akim Demaille <akim@epita.fr>
8903
8904 * tests/regression.at (_AT_DATA_DANCER_Y): Fix the expected error
8905 message.
8906
8907 2003-03-02 Akim Demaille <akim@epita.fr>
8908
8909 * tests/regression.at (_AT_DATA_DANCER_Y, AT_CHECK_DANCER): New.
8910 Use them to exercise yycheck overrun.
8911 Based on Andrew Suffield's grammar.
8912
8913 2003-03-02 Akim Demaille <akim@epita.fr>
8914
8915 Create tests/local.at for Bison generic testing macros.
8916
8917 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Move to...
8918 * tests/local.at (AT_BISON_OPTION_PUSHDEFS, AT_BISON_OPTION_POPDEFS):
8919 This new file.
8920 * tests/calc.at (AT_CHECK_CALC): Adjust.
8921 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR)
8922 (AT_COMPILE, AT_COMPILE_CXX, AT_PARSER_CHECK): Move to...
8923 * tests/local.at: here.
8924 (AT_COMPILE_CXX): Tags the tests using it as c++.
8925 Ignore the test if CXX is not functional.
8926
8927 2003-03-01 Paul Eggert <eggert@twinsun.com>
8928
8929 * src/scan-gram.l (code_start): Initialize it to scanner_cursor,
8930 not loc->end, since loc->end might contain garbage and this leads
8931 to undefined behavior on some platforms.
8932 (id_loc, token_start): Use (IF_LINTed) initial values that do not
8933 depend on *loc, so that the reader doesn't give the the false
8934 impression that *loc is initialized.
8935 (<INITIAL>"%%"): Do not bother setting code_start, since its value
8936 does not survive the return.
8937
8938 2003-03-01 Akim Demaille <akim@epita.fr>
8939
8940 * src/scan-gram.l (code_start): Always initialize it when entering
8941 into yylex, as SC_EPILOGUE is activated *before* the corresponding
8942 yylex invocation. An alternative would be making it static, but
8943 then it starts with the second %%'s beginning, instead of its end.
8944
8945 2003-02-28 Paul Eggert <eggert@twinsun.com>
8946
8947 * lib/mbswidth.c: Include <wchar.h> before "mbswidth.h", to work
8948 around a UnixWare 7.1.1 porting bug reported by John Hughes in
8949 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00030.html>.
8950
8951 2003-02-26 Paul Eggert <eggert@twinsun.com>
8952
8953 * README: Mention compiler bug in Sun Forte Developer 6 update 2.
8954 Remove Sequent/Pyramid discussion (nobody uses them any more).
8955 Merge VMS and MS-DOS discussion; these ports may well be dead
8956 but let's keep mentioning them for now. Put <> around email
8957 addresses. Add copyright notice.
8958
8959 2003-02-24 Paul Eggert <eggert@twinsun.com>
8960
8961 * data/glr.c (yy_reduce_print): yylineno -> yylno,
8962 to avoid collision with flex use of yylineno.
8963 Problem reported by Bruce Lilly in
8964 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00016.html>.
8965 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
8966 * data/yacc.c (yy_reduce_print): Likewise.
8967
8968 * config/depcomp: Sync with Automake 1.7.3.
8969
8970 2003-02-21 Akim Demaille <akim@epita.fr>
8971
8972 * data/lalr1.cc: Use temporary variables instead of casts to
8973 change integer types.
8974 Suggested by Paul Eggert.
8975
8976 2003-02-21 Akim Demaille <akim@epita.fr>
8977
8978 * doc/bison.texinfo: Use "location" consistently to refer to @n,
8979 to avoid confusions with lalr1.cc's notion of Position.
8980 Suggested by Paul Eggert.
8981
8982 2003-02-20 Akim Demaille <akim@epita.fr>
8983
8984 * data/lalr1.cc (position.hh): Make sure "columns" never pushes
8985 before initial_columns.
8986 (location.hh): Use consistent variable names when defining the
8987 operator<<.
8988 Use "last" so that we subtract from Positions, not from unsigned.
8989
8990 2003-02-20 Akim Demaille <akim@epita.fr>
8991
8992 * data/lalr1.cc (position.hh): New subfile, including the extended
8993 and Doxygen'ed documentation of class Position.
8994 (location.hh): Use it.
8995 Document a` la Doxygen.
8996 With the help of Benoit Perrot.
8997
8998 2003-02-20 Akim Demaille <akim@epita.fr>
8999
9000 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Define
9001 AT_YACC_IF.
9002 Redefine AT_YYERROR_SEES_LOC_IF using it.
9003 (_AT_DATA_CALC_Y): Don't declare yyerror when lalr1.cc, as it is
9004 not defined.
9005 Don't use the location in yy::Parser::error_ and
9006 yy::Parser::print_ when not %locations.
9007 Activate more lalr1.cc tests.
9008
9009 2003-02-19 Akim Demaille <akim@epita.fr>
9010
9011 * data/lalr1.cc: When displaying a line number, be sure to make it
9012 an int.
9013
9014 2003-02-19 Akim Demaille <akim@epita.fr>
9015
9016 * data/lalr1.cc (b4_stack_depth_init, yy::Parser::initdepth_):
9017 Remove, useless.
9018 (YYABORT, YYACCEPT, YYERROR): New.
9019 * tests/calc.at: Renable the lalr1.cc test.
9020
9021 2003-02-19 Akim Demaille <akim@epita.fr>
9022
9023 * tests/calc.at (AT_CHECK_CALC): Check different scenarios of
9024 error recovery, mixing with/without pops and discarding of the
9025 lookahead.
9026 Exercise YYERROR.
9027 Disable the lalr1.cc tests as currently it doesn't support YYERROR.
9028
9029 2003-02-17 Paul Eggert <eggert@twinsun.com>
9030
9031 * tests/atlocal.in (LDFLAGS, LIBS): New vars.
9032 * tests/testsuite.at (AT_COMPILE): Use them.
9033 This fixes the testsuite problem reported by Robert Lentz in
9034 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00011.html>.
9035
9036 2003-02-12 Paul Eggert <eggert@twinsun.com>
9037
9038 * data/yacc.c (yyerrlab) [YYERROR_VERBOSE]:
9039 Avoid subscript error in yycheck. Bug reported by Andrew Suffield in
9040 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00003.html>.
9041 * data/glr.c (yyreportSyntaxError) [YYERROR_VERBOSE]: Likewise.
9042 Check for malloc failure, for consistency with yacc.c.
9043 (yytname_size): Remove, for consistency with yacc.c.
9044
9045 The bug still remains in data/lalr1.cc, as I didn't have time
9046 to fix it there.
9047
9048 2003-02-06 Akim Demaille <akim@epita.fr>
9049
9050 * configure.ac (GXX): Rename as...
9051 (CXX): this, to keep the original Autoconf semantics.
9052 Require 2.57.
9053 * data/lalr1.cc: Fix b4_copyright invocations.
9054 If YYDEBUG is not defined, don't depend upon name_ being defined.
9055 (location.hh): Include string and iostream.
9056 (Position::filename): New member.
9057 (Position::Position ()): New.
9058 (operator<< (Position)): New.
9059 (operator- (Position, int)): New.
9060 (Location::first, Location::last): Rename as...
9061 (Location::begin, Location::end): these, to mock the conventional
9062 iterator names.
9063 (operator<< (Location)): New.
9064 * tests/atlocal.in (CXX): New.
9065 * tests/testsuite.at (AT_COMPILE_CXX): New.
9066 * tests/calc.at (_AT_DATA_CALC_Y): Adjust yyerror to report the
9067 locations in a more synthetic way.
9068 (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF is positive if
9069 lalr1.cc is used.
9070 Adjust the C locations to match those from Emacs: first column is
9071 column 0.
9072 Change all the expected results.
9073 Conform to the GCS: simplify the locations when applicable.
9074 (LOC, VAL, YYLLOC_FORMAL, YYLLOC_ARG, USE_YYLLOC, LEX_FORMALS)
9075 (LEX_ARGS, USE_LEX_ARGS, LEX_PRE_FORMALS, LEX_PRE_ARGS): Replace
9076 these CPP macros with the m4 macros new defined by...
9077 (AT_CHECK_PUSHDEFS): this, i.e.:
9078 (AT_LALR1_CC_IF, AT_PURE_LEX_IF, AT_LOC, AT_VAL, AT_LEX_FORMALS)
9079 (AT_LEX_ARGS, AT_USE_LEX_ARGS, AT_LEX_PRE_FORMALS, AT_LEX_PRE_ARGS)
9080 New macros.
9081 (AT_CHECK_POPDEFS): Undefine them.
9082 (AT_CHECK_CALC_LALR1_CC): New.
9083 Use it for the first lalr1.cc test.
9084
9085 2003-02-04 Akim Demaille <akim@epita.fr>
9086
9087 * data/lalr1.cc (YYLLOC_DEFAULT): Fix its definition: be based on
9088 Location as is defined.
9089
9090 2003-02-04 Akim Demaille <akim@epita.fr>
9091
9092 * data/lalr1.cc: If YYDEBUG is not defined, don't depend upon
9093 name_ being defined.
9094
9095 2003-02-03 Paul Eggert <eggert@twinsun.com>
9096
9097 * src/gram.h (start_symbol): Remove unused decl.
9098
9099 Use more-consistent naming conventions for local vars.
9100
9101 * src/derives.c (derives_compute): Change type of local var from
9102 int to rule_number.
9103 * src/gram.c (grammar_rules_partial_print): Likewise.
9104 * src/print.c (print_core): Likewise.
9105 * src/reduce.c (reduce_grammar_tables): Likewise.
9106
9107 * src/gram.c (grammar_dump): Change name of item_number *
9108 local var from r to rp.
9109 * src/nullable.c (nullable_compute): Likewise.
9110
9111 * src/gram.h (ISTOKEN, ISVAR): Use i, not s, for int var.
9112
9113 * src/gram.h (symbol_number_as_item_number): Use sym, not s,
9114 for symbol or symbol_number var.
9115 * src/reader.c (grammar_start_symbol_set): Likewise.
9116 * src/reader.h (grammar_start_symbol_set, grammar_symbol_append):
9117 Likewise.
9118 * src/state.c (transitions_to): Likewise.
9119 * src/state.h: Likewise.
9120 * src/tables.c (symbol_number_to_vector_number): Likewise.
9121
9122 * src/muscle_tab.h (MUSCLE_OBSTACK_SGROW): Use p, not s, for
9123 char * var.
9124
9125 * src/parse-gram.y (lloc_default): Use loc, not r, for YYLTYPE
9126 var.
9127
9128 * src/scan-gram.l (no_cr_read): Use bytes_read, not s, for size
9129 var.
9130
9131 * src/system.h (xstrndup, strchr, strspn, strnlen, memchr, memrchr):
9132 Use str, not s, for char * var. Use ch, not c, for character var.
9133 Use size for size var.
9134
9135 * src/uniqstr.c (uniqstr_new, uniqstr_assert): Use str, not s, for
9136 char * var.
9137 (uniqstr_print, uniqst_print_processor): Use ustr, not s, for
9138 uniqstr var.
9139 * src/uniqstr.h: Likewise.
9140
9141 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
9142 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
9143 get_node_alignment_str, get_arrow_mode_str, get_crossing_type_str,
9144 get_view_str, get_linestyle_str, get_arrowstyle_str): Rename
9145 param to have same name as that of enum, so that we don't use
9146 "s" to stand for a non-state.
9147
9148 2003-02-02 Akim Demaille <akim@epita.fr>
9149
9150 * src/scan-skel.l: Scan more than one inert character per yylex
9151 invocation.
9152
9153 2003-02-01 Paul Eggert <eggert@twinsun.com>
9154
9155 Version 1.875a.
9156
9157 * po/LINGUAS: Add ms.
9158
9159 2003-01-30 Akim Demaille <akim@epita.fr>
9160
9161 * doc/Makefile.am (CLEANFILES): Add bison.fns for distcheck.
9162
9163 2003-01-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
9164
9165 * tests/cxx-type.at: Correct apparent typo in Bison input: $$ instead
9166 of $1.
9167
9168 Changes in response to error report by S. Eken: GLR mode does not
9169 handle negative $ indices or $ indices in embedded rules correctly.
9170 See <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00076.html>.
9171
9172 * data/glr.c (b4_rhs_value): Change to use YYFILL macro.
9173 (b4_rhs_location): Ditto.
9174 (yyfill): New function to copy from stack tree into array
9175 incrementally.
9176 (yyuserAction): Modify to allow incremental move of semantic values
9177 to rhs array when in GLR mode.
9178 Define YYFILL to use in user-defined actions to fill semantic array
9179 as needed.
9180 Remove dummy use of yystack, as there is now a guaranteed use.
9181 (yydoAction): Modify to allow incremental move of semantic values
9182 to rhs array when in GLR mode.
9183 (yyresolveAction): Ditto.
9184 (yyglrShiftDefer): Update comment.
9185 (yyresolveStates): Use X == NULL for pointers, not !X.
9186 (yyglrReduce): Ditto.
9187 (yydoAction): Ditto
9188
9189 * tests/glr-regr1.at: Rename to ...
9190 * tests/glr-regression.at: Add new regression test for the problems
9191 described above (adapted from S. Eken).
9192 Update copyright notice.
9193 * tests/testsuite.at: Rename glr-regr1.at to glr-regression.at.
9194 * tests/Makefile.am: Ditto.
9195
9196 2003-01-28 Paul Eggert <eggert@twinsun.com>
9197
9198 * data/lalr1.cc: Do not use @output_header_name@ unless
9199 b4_defines_flag is set. This fixes two bugs reported by
9200 Tim Van Holder in
9201 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00071.html>
9202 and <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00073.html>.
9203
9204 2003-01-21 Paul Eggert <eggert@twinsun.com>
9205
9206 * data/yacc.c (YYERROR): Move code from yyerrlab1 to here, so that
9207 we don't need to worry about yyerrlab1 being reported as an
9208 "unused label" by non-GCC C compilers. The downside is that if
9209 locations are used then a couple of statements are duplicated each
9210 time YYERROR is invoked, but the upside is that the warnings
9211 should vanish.
9212 (yyerrlab1): Move code to YERROR.
9213 (yyerrlab2): Remove. Change uses back to yyerrlab1.
9214 This reverts some of the 2002-12-27 change.
9215
9216 2003-01-17 Paul Eggert <eggert@twinsun.com>
9217
9218 * src/output.c (symbol_printers_output): Fix typo that led
9219 to core dump. Problem reported by Antonio Rus in
9220 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00058.html>.
9221
9222 2003-01-13 Akim Demaille <akim@epita.fr>,
9223 Quoc Peyrot <chojin@lrde.epita.fr>,
9224 Robert Anisko <anisko_r@lrde.epita.fr>
9225
9226 * data/lalr1.cc (parse::yyerrlab1): When popping the stack, stop
9227 when the stacks contain one element, as the loop would otherwise
9228 free the last state, and then use the top state (the one we just
9229 popped). This means that the initial elements will not be freed
9230 explicitly, as is the case in yacc.c; it is not a problem, as
9231 these elements have fake values.
9232
9233 2003-01-11 Paul Eggert <eggert@twinsun.com>
9234
9235 * NEWS: %expect-violations are now just warnings, reverting
9236 to Bison 1.30 and 1.75 behavior. This fixes the GCC 3.2
9237 bootstrapping problem reported by Matthias Klose; see
9238 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00053.html>.
9239 * src/conflicts.c (conflicts_print): Likewise.
9240 * tests/conflicts.at (%expect not enough, %expect too much,
9241 %expect with reduce conflicts): Likewise.
9242 * doc/bison.texinfo (Expect Decl): Document this. Also mention
9243 that the warning is enabled if the number of conflicts changes
9244 (not necessarily increases).
9245
9246 * src/getargs.c (version): Update copyright year.
9247
9248 2003-01-09 Akim Demaille <akim@epita.fr>
9249
9250 * src/Makefile.am, lib/Makefile.am: Use $(VAR) instead of @VAR@.
9251
9252 2003-01-08 Paul Eggert <eggert@twinsun.com>
9253
9254 * Makefile.maint (WGETFLAGS):
9255 New macro, containing "-C off" to disable proxy caches.
9256 All uses of $(WGET) changed to $(WGET) $(WGETFLAGS).
9257 (rel-check): Use $(WGET) instead of wget.
9258
9259 2003-01-06 Paul Eggert <eggert@twinsun.com>
9260
9261 * doc/bison.texinfo (Generalized LR Parsing): Add a reference to
9262 the GLR paper of Scott, Johnstone and Hussain.
9263
9264 2003-01-04 Paul Eggert <eggert@twinsun.com>
9265
9266 * configure.ac (AC_ARG_ENABLE): Add --disable-yacc.
9267 (YACC_SCRIPT, YACC_LIBRARY): New vars to AC_SUBST.
9268 * lib/Makefile.am (lib_LIBRARIES): liby.a -> @YACC_LIBRARY@.
9269 (EXTRA_LIBRARIES): New var, for liby.a.
9270 * src/Makefile.am (bin_SCRIPTS): yacc -> @YACC_SCRIPT@.
9271 (EXTRA_SCRIPTS): New var, for yacc.
9272
9273 * data/yacc.c (yyerrlab1): Omit attribute if __cplusplus is defined,
9274 since GNU C++ (as of 3.2.1) does not allow attributes on labels.
9275 Problem reported by Nelson H. F. Beebe.
9276
9277 2003-01-03 Paul Eggert <eggert@twinsun.com>
9278
9279 * lib/obstack.h (__INT_TO_PTR) [__STDC__]: Cast result to
9280 (void *) to avoid diagnostic with native c89 on SGI IRIX 6.5
9281 when compiling Bison 1.875's `bitset bset = obstack_alloc
9282 (bobstack, bytes);'. Problem reported by Nelson H. F. Beebe.
9283
9284 * src/scan-skel.l (QPUTS): Omit redundant `;' from macro definition.
9285 ([^@\n]): Renamed from [^@\n]+ so that the token buffer does not
9286 grow to a huge size with typical invocation.
9287
9288 * lib/hash.c (_Bool, bool, false, true, __bool_true_false_are_defined):
9289 Use the pattern recommended by Autoconf 2.57, except also protect
9290 against double-definition.
9291 * src/system.h: Likewise.
9292 Portability issues reported by Nelson H. F. Beebe.
9293
9294 * data/glr.c (yybool): Renamed from bool, to avoid collisions in C.
9295 All uses changed. Provide a definition in both C and C++.
9296 (yytrue, yyfalse): Define even if defined (__cplusplus).
9297
9298 * lib/bitset_stats.c (bitset_stats_list): Remove unused var.
9299 Reported by Nelson H. F. Beebe.
9300
9301 * src/scan-skel.l ("@oline@"): Output lineno+1, not lineno.
9302
9303 2003-01-02 Paul Eggert <eggert@twinsun.com>
9304
9305 * data/yacc.c (yyerrlab1): Append `;' after attribute, to
9306 pacify the buggy "smart preprocessor" in MacOS 10.2.3.
9307 Bug reported by Nelson H. F. Beebe.
9308
9309 2003-01-01 Paul Eggert <eggert@twinsun.com>
9310
9311 * Version 1.875.
9312
9313 2002-12-30 Paul Eggert <eggert@twinsun.com>
9314
9315 * src/scan-gram.l (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>","):
9316 Moved here from...
9317 (<INITIAL>","): Here. This causes stray "," to be treated
9318 more uniformly.
9319
9320 * src/scan-gram.l (<SC_BRACED_CODE>"}"): Output ";" before the
9321 last brace in braced code when not in Yacc mode, for compatibility
9322 with Bison 1.35. This resurrects the 2001-12-15 patch to
9323 src/reader.c.
9324
9325 * src/reader.h (YYDECL): Use YYSTYPE, not its deprecated alias
9326 yystype. This follows up the 2002-12-24 YYSTYPE bug fix.
9327
9328 2002-12-28 Paul Eggert <eggert@twinsun.com>
9329
9330 * src/symtab.c (symbol_make_alias): Set type of SYMVAL to be
9331 that of SYM's type. This fixes Debian bug 168069, reported by
9332 Thomas Olsson.
9333
9334 2002-12-28 Paul Eggert <eggert@twinsun.com>
9335
9336 Version 1.75f.
9337
9338 Switch back to the Yacc style of conflict reports, undoing some
9339 of the 2002-07-30 change.
9340 * doc/bison.texinfo (Understanding): Use Yacc style for
9341 conflict reports. Also, use new way of locating rules.
9342 * src/conflicts.c (conflict_report):
9343 Renamed from conflict_report_yacc, removing the old
9344 'conflict_report'. Translate the entire conflict report at once,
9345 so that we don't assume that "," has the same interpretation in
9346 all languages.
9347 (conflicts_output): Use Yacc-style conflict report for each state,
9348 instead of our more-complicated style.
9349 (conflicts_print): Use Yacc-style conflict report, except print
9350 the input file name when not emulating Yacc.
9351 * tests/conflicts.at (Unresolved SR Conflicts, Defaulted
9352 Conflicted Reduction, %expect not enough, %expect too much,
9353 %expect with reduce conflicts): Switch to Yacc-style conflict reports.
9354 * tests/existing.at (GNU Cim Grammar): Likewise.
9355 * tests/glr-regr1.at (Badly Collapsed GLR States): Likewise.
9356
9357 * src/complain.c (warn_at, warn, complain_at, complain, fatal_at,
9358 fatal): Don't invoke fflush; it's not needed and it might even be
9359 harmful for stdout, as stdout might not be open.
9360 * src/reduce.c (reduce_print): Likewise.
9361
9362 2002-12-27 Paul Eggert <eggert@twinsun.com>
9363
9364 Fix a bug where error locations were not being recorded correctly.
9365 This problem was originally reported by Paul Hilfinger in
9366 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00086.html>.
9367
9368 * data/yacc.c (yyparse): New local var yylerrsp, to record the
9369 top of the location stack's error locations.
9370 (yyerrlab): Set it. When discarding a token, push its location
9371 onto yylerrsp so that we don't lose track of the error's end.
9372 (yyerrlab1): Now is only the target of YYERROR, so that we can
9373 properly record the location of the action that failed. For GCC
9374 2.93 and later, insert an __attribute__ ((__unused__)) to avoid
9375 GCC warning about yyerrlab1 being unused if YYERROR is unused.
9376 (yyerrlab2): New label, which yyerrlab now falls through to.
9377 Compute the error's location by applying YYLLOC_DEFAULT to
9378 the locations of all the symbols that went into the error.
9379 * doc/bison.texinfo (Location Default Action): Mention that
9380 YYLLOC_DEFAULT is also invoked for syntax errors.
9381 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
9382 Error locations include the locations of all the tokens that were
9383 discarded, not just the last token.
9384
9385 2002-12-26 Paul Eggert <eggert@twinsun.com>
9386
9387 * src/files.c: Include quote.h.
9388 (compute_output_file_names): Warn if we detect conflicting
9389 outputs to the same file. This should catch the misunderstanding
9390 exemplified by Debian Bug 165349, reported by Bruce Stephens..
9391
9392 * src/conflicts.c (conflicts_print): If the user specifies
9393 "%expect N", report an error if there are any reduce/reduce
9394 conflicts. This is what the manual says should happen.
9395 This fixes Debian bug 130890, reported by Anthony DeRobertis.
9396 * tests/conflicts.at (%expect with reduce conflicts): New test.
9397
9398 Don't use m4_include on relative file names, as it doesn't work as
9399 desired if there happens to be a file with that name under ".".
9400
9401 * m4sugar/version.m4: Remove; it was included but it wasn't used.
9402 * data/Makefile.am (dist_m4sugar_DATA): Remove m4sugar/version.m4.
9403 * data/m4sugar/m4sugar.m4: Don't include m4sugar/version.m4.
9404 * data/glr.c, data/lalr1.cc, data/yacc.c: Don't include c.m4.
9405 * src/output.c (output_skeleton): Use full path names when
9406 specifying a file to include; don't rely on include path, as
9407 it's unreliable when the working file contains a file with
9408 that name.
9409
9410 2002-12-25 Paul Eggert <eggert@twinsun.com>
9411
9412 Remove obsolete references to bison.simple and bison.hairy.
9413 Problem mentioned by Aubin Mahe in
9414 <http://lists.gnu.org/archive/html/help-bison/2002-12/msg00010.html>.
9415 * data/glr.c: Comment fix.
9416 * doc/bison.1: Remove references. Also, mention "yacc".
9417
9418 * src/getargs.c (getargs) [MSDOS]: Don't assume optarg != NULL
9419 with -g option.
9420
9421 * src/parse-gram.y (declaration): Use enum "report_states" rather
9422 than its numeric value 1.
9423
9424 * src/scan-skel.l ("@output ".*\n): Close any old yyout before
9425 opening a new one. This fixes Debian bug 165349, reported by
9426 Bruce Stephens.
9427
9428 2002-12-24 Paul Eggert <eggert@twinsun.com>
9429
9430 Version 1.75e.
9431
9432 * Makefile.maint (cvs-update): Don't assume that the shell
9433 supports $(...), as Solaris sh doesn't.
9434
9435 * src/parse-gram.y (lloc_default): Remove test for empty
9436 nonterminals at the end, since it didn't change the result.
9437
9438 2002-12-24 Paul Eggert <eggert@twinsun.com>
9439
9440 If the user does not define YYSTYPE as a macro, Bison now declares it
9441 using typedef instead of defining it as a macro. POSIX requires this.
9442 For consistency, YYLTYPE is also declared instead of defined.
9443
9444 %union directives can now have a tag before the `{', e.g., the
9445 directive `%union foo {...}' now generates the C code
9446 `typedef union foo { ... } YYSTYPE;'; this is for Yacc compatibility.
9447 The default union tag is `YYSTYPE', for compatibility with Solaris 9
9448 Yacc. For consistency, YYLTYPE's struct tag is now `YYLTYPE'
9449 instead of `yyltype'.
9450
9451 `yystype' and `yyltype' are now obsolescent macros instead of being
9452 typedefs or tags; they are no longer documented and will be
9453 withdrawn in a future release.
9454
9455 * data/glr.c (b4_location_type): Remove.
9456 (YYSTYPE): Renamed from yystype.
9457 (YYSTYPE_IS_DECLARED): New macro, used to prevent double-typedef.
9458 (struct YYLTYPE): Renamed from struct yyltype.
9459 (YYLTYPE): Renamed from yyltype.
9460 (yyltype, yystype): New (and obsolescent) macros,
9461 for backward compatibility.
9462 * data/yacc.c: Likewise.
9463
9464 * data/yacc.c (YYSTYPE): Declare as union YYSTYPE if the user
9465 does not specify a union tag. This is for compatibility with
9466 Solaris 9 yacc.
9467
9468 * src/parse-gram.y (add_param): 2nd arg is now char * not char
9469 const *, since it is now modified by stripping surrounding { }.
9470 (current_braced_code): Remove.
9471 (PERCENT_DESTRUCTOR, PERCENT_PRINTER, PERCENT_UNION,
9472 PERCENT_LEX_PARAM, PERCENT_PARSE_PARAM): Change names to include
9473 trailing " {...}". Now of type <chars>.
9474 (grammar_declaration): Adjust to bundled tokens.
9475 (code_content): Remove; stripping is now done by add_param.
9476 (print_token_value): Print contents of bundled tokens.
9477 (token_name): New function.
9478
9479 * src/reader.h (braced_code, current_braced_code): Remove.
9480 (token_name): New decl.
9481
9482 * src/scan-gram.l (handle_dollar, handle_at): Now takes int
9483 token_type, not braced_code code_kind. All uses changed.
9484 (SC_PRE_CODE): New state, for scanning after a keyword that
9485 has (or usually has) an immediately-following braced code.
9486 (token_type): New local var, to keep track of which token type
9487 to return when scanning braced code.
9488 (<INITIAL>"%destructor", <INITIAL>"%lex-param",
9489 <INITIAL>"%parse-param", <INITIAL>"%printer",
9490 <INITIAL>"%union"): Set token type and BEGIN SC_PRE_CODE
9491 instead of returning a token type immediately.
9492 (<INITIAL>"{"): Set token type.
9493 (<SC_BRACED_CODE>"}"): Use it.
9494 (handle_action_dollar, handle_action_at): Now returns bool
9495 indicating success. Fail if ! current_rule; this prevents a core dump.
9496 (handle_symbol_code_dollar, handle_symbol_code_at):
9497 Remove; merge body into caller.
9498 (handle_dollar, handle_at): Complain in invalid contexts.
9499
9500 * NEWS, doc/bison.texinfo: Document the above.
9501 * NEWS: Fix years and program names in copyright notice.
9502
9503 2002-12-17 Paul Eggert <eggert@twinsun.com>
9504
9505 * NEWS, doc/bison.texinfo (Parser Function, Pure Calling, Error
9506 Reporting, Table of Symbols): Omit mentions of %lex-param and
9507 %parse-param from the documentation for now.
9508
9509 2002-12-15 Paul Eggert <eggert@twinsun.com>
9510
9511 Undo most of the 2002-11-12 yychar -> yytoken patch, as it broke
9512 GCC 3.2.1 (which depends on yychar == YYEMPTY when there is no
9513 lookahead symbol, and which sets yychar in parser actions) and it
9514 disagreed with the Bison documentation. Bug
9515 reported by Andrew Walrond.
9516
9517 * data/yacc.c (YYTRANSLATE): Don't check for negative argument,
9518 as the caller now does that.
9519 (yyclearin, YYBACKUP, yyparse): Use yychar, not yytoken.
9520 (YYEMPTY): Parenthesize right hand side, since others use it.
9521 (yyparse): Don't assume that our generated code is the only code
9522 that sets yychar.
9523
9524 2002-12-13 Paul Eggert <eggert@twinsun.com>
9525
9526 Version 1.75d.
9527
9528 POSIX requires a "yacc" command.
9529 * src/Makefile.am (bin_SCRIPTS): New macro, for yacc.
9530 (MOSTLYCLEANFILES): Add yacc.
9531 (yacc): New rule.
9532 * doc/bison.texinfo (Invocation, Bison Options): Mention yacc
9533 as an alias for bison y.
9534
9535 * po/LINGUAS: Add da.
9536
9537 * src/getargs.c (__GNU_LIBRARY__) [lint]: Define to work around
9538 problem with latest <getopt.h>.
9539 (HACK_FOR___GNU_LIBRARY___PROTOTYPE): New macro.
9540
9541 * doc/fdl.texi: Upgrade to 1.2.
9542 * lib/alloca.c, lib/error.c, lib/getopt.c, lib/getopt.h
9543 lib/getopt1.c, lib/gettext.h, lib/memrchr.c, lib/obstack.c,
9544 lib/obstack.h, lib/strnlen.c, lib/unlocked-io.h: Sync with
9545 gnulib.
9546 * config/install-sh: Sync with autotools.
9547
9548 Fix a bad interaction with flex 2.5.23 reported by Bruce Lilly in
9549 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
9550 * data/yacc.c (YYLTYPE, struct yyltype): Do not define unless
9551 locations are requested.
9552 (union yyalloc): Do not depend on YYLTYPE_IS_TRIVIAL unless
9553 locations are requested.
9554
9555 2002-12-12 Paul Eggert <eggert@twinsun.com>
9556
9557 Remove unportable casts and storage allocation tricks.
9558 While we're at it, remove almost all casts, since they
9559 usually aren't needed and are a sign of trouble.
9560
9561 * configure.ac (AC_CHECK_TYPES): Check for uintptr_t.
9562
9563 * src/derives.c (derives_compute): Do not subtract NTOKENS from
9564 the pointer DSET returned by malloc; this isn't portable.
9565 Instead, always use DSET[i - NTOKENS] rather than DSET[i].
9566 Similarly for DERIVES.
9567 * src/lalr.c (set_goto_map): Likewise, for GOTO_MAP and TEMP_MAP.
9568 * src/nullable.c (nullable_compute): Likewise, for RSETS and NULLABLE.
9569 * src/reduce.c (reduce_grammar_tables): Likewise, for nontermmap
9570
9571 * src/derives.c (derives_compute): Do not bother invoking
9572 int_of_rule_number, since rule numbers are integers.
9573
9574 * src/files.c (concat2, tr, compute_base_name): Use xmalloc (N)
9575 rather than XMALLOC (char, N).
9576
9577 * src/files.c (filename_split): Rewrite to avoid cast.
9578
9579 * src/gram.h (symbol_number_as_item_number,
9580 item_number_as_symbol_number, rule_number_as_item_number,
9581 item_number_as_rule_number):
9582 Now inline functions rather than macros, to avoid casts.
9583 * src/state.h (state_number_as_int): Likewise.
9584 * src/tables.c (state_number_to_vector_number,
9585 symbol_number_to_vector_number): Likewise.
9586
9587 * src/gram.h (int_of_rule_number): Remove; no longer used.
9588
9589 * src/lalr.c (add_lookback_edge): Use malloc rather than calloc,
9590 since the resulting storage is always stored into.
9591
9592 * src/main.c (alloca) [C_ALLOCA]: Add decl here, the only place
9593 where it's needed.
9594
9595 * src/muscle_tab.c (muscle_m4_output):
9596 Now inline. Return bool, not int.
9597 * src/state.c (state_compare): Likewise.
9598 * src/symtab.c (symbol_check_defined,
9599 symbol_check_alias_consistency, symbol_pack, symbol_translation,
9600 hash_compare_symbol, hash_symbol):
9601 Likewise.
9602 * src/uniqstr.c (uniqstr_print): Likewise.
9603 * src/muscle_tab.c (muscle_m4_output_processor):
9604 New function, to avoid casts.
9605 * src/state.c (state_comparator, stage_hasher): Likewise.
9606 * src/symtab.c (symbol_check_defined_processor,
9607 symbol_check_alias_consistency_processor, symbol_pack_processor,
9608 symbol_translation_processor, hash_symbol_comparator,
9609 hash_symbol_hasher): Likewise.
9610 * src/uniqstr.c (uniqstr_print_processor): Likewise.
9611 * src/muscle_tab.c (muscles_m4_output):
9612 Use new functions instead of casting old functions unportably.
9613 * src/state.c (state_hash_new): Likewise.
9614 * src/symtab.c (symbols_new, symbols_do, symbols_check_defined,
9615 symbols_token_translations_init):
9616 Likewise.
9617 * src/uniqstr.c (uniqstrs_new, hash_initialize, uniqstrs_do): Likewise.
9618
9619 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): Use long local
9620 var instead of casting to long, to avoid casts.
9621 (prepare_states): Use MALLOC rather than alloca, so that we don't
9622 have to worry about alloca.
9623 * src/state.c (state_hash_lookup): Likewise.
9624
9625 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>"'"): Use unsigned char
9626 local var instead of casting to unsigned char, to avoid casts.
9627
9628 * src/state.c (TRANSITIONS_ALLOC, ERRS_ALLOC, REDUCTIONS_ALLOC,
9629 STATE_ALLOC): Remove.
9630 (transitions_new, errs_new, reductions_new, state_new): Use malloc
9631 rather than calloc, and use offsetof to avoid allocating slightly
9632 too much storage.
9633 (state_new): Initialize all members.
9634
9635 * src/state.c (state_hash): Use unsigned accumulator, not signed.
9636
9637 * src/symtab.c (symbol_free): Remove; unused.
9638 (symbol_get): Remove cast in lhs of assignment.
9639 (symbols_do): Now static. Accept generic arguments, not
9640 hashing-related ones.
9641
9642 * src/symtab.h: (NUMBER_UNDEFINED): Remove unnecessary cast.
9643 (symbol_processor): Remove.
9644 (symbols_do): Remove decl; now static.
9645
9646 * src/system.h (alloca): Remove; decl no longer needed.
9647 (<stddef.h>): Include, for offsetof.
9648 (<inttypes.>, <stdint.h>): Include if available.
9649 (uintptr_t): New type, if system lacks it.
9650 (CALLOC, MALLOC, REALLOC): New macros.
9651 All uses of XCALLOC, XMALLOC, and XREALLOC changed to use these
9652 new macros.
9653
9654 * src/tables.c (table_size): Now int, to pacify GCC.
9655 (table_grow, table_ninf_remap): Use signed table size.
9656 (save_row): Don't bother initializing locals when not needed.
9657 (default_goto, goto_actions, pack_vector): Remove unnecessary casts.
9658 * src/uniqstr.c (hash_compare_uniqstr): Likewise.
9659
9660 * src/vcg.h: Correct misspellings.
9661
9662 * src/vcg_defaults.h (G_CMAX): Now INT_MAX.
9663
9664
9665 * src/getargs.c (getargs): Don't assume EOF == -1.
9666
9667 2002-12-09 Paul Eggert <eggert@twinsun.com>
9668
9669 Change identifier spellings to avoid collisions with names
9670 that are reserved by POSIX.
9671
9672 Don't use names ending in _t, since POSIX reserves them.
9673 For consistency, remove _e and _s endings -- they're weren't
9674 needed to remove ambiguity. All uses changed.
9675 * src/uniqstr.h (uniqstr): Renamed from uniqstr_t, which in
9676 turn was just renamed from struniq_t.
9677 * src/uniqstr.c (uniqstr_processor): Renamed from struniq_processor,
9678 which in turn was just renamed from struniq_processor_t.
9679 (hash_compare_uniqstr): Renamed from hash_compare_struniq, which
9680 in turn was renamed from hash_compare_struniq_t.
9681 * src/LR0.c (struct state_list): Renamed from struct state_list_s.
9682 (state_list): Renamed from state_list_t.
9683 * src/assoc.h (assoc): Renamed from assoc_t.
9684 * src/conflicts.c (enum conflict_resolution): Renamed from
9685 enum conflict_resolution_e.
9686 * src/derives.c (struct rule_list): Renamed from struct rule_list_s.
9687 (rule_list): Renamed from rule_list_t.
9688 * src/getargs.h (enum trace): Renamed from enum trace_e.
9689 (enum report): Renamed from enum report_e.
9690 * src/gram.h (item_number): Renamed from item_number_t.
9691 (rule_number): Renamed from rule_number_t.
9692 (struct rule_s): Remove the "rule_s" part; not used.
9693 (rule): Renamed from rule_t.
9694 (rule_filter): Renamed from rule_filter_t.
9695 * src/lalr.c (struct goto_list): Renamed from struct goto_list_s.
9696 (goto_list): Renamed from goto_list_t.
9697 * src/lalr.h (goto_number): Renamed from goto_number_t.
9698 * src/location.h (location): Renamed from location_t.
9699 * src/muscle_tab.c (muscle_entry): Renamed from muscle_entry_t,
9700 and moved here from:
9701 * src/muscle_tab.h (muscle_entry_t): here.
9702 * src/nullable.c (struct rule_list): Renamed from struct rule_list_s.
9703 (rule_list): Renamed from rule_list_t.
9704 * src/print_graph.c (static_graph): Renamed from graph.
9705 * src/reader.h (braced_code): Renamed from braced_code_t.
9706 Remove brace_code_e tag.
9707 * src/relation.h (relation_node): Renamed from relation_node_t.
9708 (relation_nodes): Renamed from relation_nodes_t.
9709 (relation): Renamed from relation_t.
9710 * src/state.h (state_number): Renamed from state_number_t.
9711 (struct state): Renamed from struct state_s.
9712 (state): Renamed from state_t.
9713 (transitions): Renamed from transitions_t. Unused (and
9714 misspelled) transtion_s tag removed.
9715 (errs): Renamed from errs_t. Unused errs_s tag removed.
9716 (reductions): Renamed from reductions_t. Unused tag
9717 reductions_s removed.
9718 * src/symlist.h (symbol_list): Renamed from symbol_list_t.
9719 (struct symbol_list): Renamed from struct symbol_list_s.
9720 * src/symtab.h (symbol_number): Renamed from symbol_number_t.
9721 (struct symbol): Renamed from struct symbol_s.
9722 (symbol): Renamed from symbol_t.
9723 * src/tables.c (vector_number): Renamed from vector_number_t.
9724 (action_number): Renamed from action_t.
9725 * src/tables.h (base_number): Renamed from base_t.
9726 * src/vcg.h (enum color): Renamed from enum color_e.
9727 (enum textmode): Renamed from enum textmode_e.
9728 (enum shape): Renamed from enum shape_e.
9729 (struct colorentry): Renamed from struct colorentry_s.
9730 (struct classname): Renamed from struct classname_s.
9731 (struct infoname): Renamed from struct infoname_s.
9732 (enum layoutalgorithm): Renamed from enum layoutalgorithm_e.
9733 (enum decision): Renamed from enum decision_e.
9734 (enum orientation): Renamed from enum orientation_e.
9735 (enum alignment): Renamed from enum alignment_e.
9736 (enum arrow_mode): Renamed from enum arrow_mode_e.
9737 (enum crossing_type): Renamed from enum crossing_type_e.
9738 (enum view): Renamed from enum view_e.
9739 (struct node): Renamed from struct node_s.
9740 (node): Renamed from node_t.
9741 (enum linestyle): Renamed from enum linestyle_e.
9742 (enum arrowstyle): Renamed from enum arrowstyle_e.
9743 (struct edge): Renamed from struct edge.
9744 (edge): Renamed from edge_t.
9745 (struct graph): Renamed from struct graph_s.
9746 (graph): Renamed from graph_t.
9747 * tests/calc.at (_AT_DATA_CALC_Y, Simple LALR Calculator):
9748 Rename value_t -> value.
9749 * tests/input.at (Torturing the Scanner): Rename value_t -> value,
9750 value_t_as_yystype -> value_as_yystype.
9751
9752 Don't include <errno.h> in the mainstream code, since it
9753 reserves E[A-Z0-9]* and we want to use symbols like 'EQUALS'.
9754 * lib/get-errno.c, lib/get-errno.h: New files.
9755 * lib/Makefile.am (libbison_a_SOURCES): Add get-errno.h,
9756 get-errno.c.
9757 * src/files.c (xfopen, xfclose): Use get_errno instead of errno.
9758 * src/output.c (output_skeleton): Likewise.
9759 * src/scan-gram.l (<INITIAL>{int}): Use set_errno and get_errno
9760 instead of errno.
9761 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>\\x[0-9abcdefABCDEF]+):
9762 Likewise.
9763 (handle_action_dollar, handle_action_at): Likewise.
9764 * src/system.h: Do not include <errno.h>.
9765 (TAB_EXT): Renamed from EXT_TAB.
9766 (OUTPUT_EXT): Renamed from EXT_OUTPUT.
9767
9768 Avoid str[a-z]*, since <string.h> reserves that name space.
9769 Change all instances of "struniq" in names to "uniqstr", and
9770 likewise for "STRUNIQ" and "UNIQSTR".
9771 * src/uniqstr.c: Renamed from src/struniq.c.
9772 * src/uniqstr.h: Renamed from src/struniq.h.
9773 * src/Makefile.am (bison_SOURCES): Adjust to these renamings.
9774 * src/files.c (strsuffix): Remove; unused.
9775 (concat2): Renamed from stringappend. Now static.
9776 * src/files.h (strsuffix, stringappend): Remove; unused.
9777 * src/parse-gram.y (<chars>): Renamed from <string>.
9778 (<uniqstr>): Renamed from <struniq>.
9779 * src/scan-gram.l (obstack_for_string): Renamed from string_obstack.
9780 * src/vcg.h (struct node_s.expand): Renamed from struct node_s.stretch.
9781 (struct graph_s.expand): Renamed from struct graph_s.stretch.
9782 * src/vcg_defaults.h (G_EXPAND): Renamed from G_STRETCH.
9783 (G_LONG_STRAIGHT_PHASE): Renamed from G_STRAIGHT_PHASE.
9784 (N_EXPAND): Renamed from N_STRETCH.
9785
9786 Avoid *_MAX and *_MIN, since <limits.h> reserves that name space.
9787 * data/yacc.c (YYSTACK_GAP_MAXIMUM): Renamed from YYSTACK_GAP_MAX.
9788 * src/gram.h (ITEM_NUMBER_MAX, ITEM_NUMBER_MIN, RULE_NUMBER_MAX):
9789 Remove; unused.
9790 * src/lalr.h (GOTO_NUMBER_MAXIMUM): Renamed from GOTO_NUMBER_MAX.
9791 * src/state.h (STATE_NUMBER_MAXIMUM): Renamed from STATE_NUMBER_MAX.
9792 * src/symtab.h (SYMBOL_NUMBER_MAXIMUM): Renamed from SYMBOL_NUMBER_MAX.
9793 * src/tables.c (VECTOR_NUMBER_MAX, VECTOR_NUMBER_MIN): Remove; unused.
9794 (BASE_MAXIMUM): Renamed from BASE_MAX.
9795 (BASE_MINIMUM): Renamed from BASE_MIN.
9796 (ACTION_MAX): Remove; unused.
9797 (ACTION_NUMBER_MINIMUM): Renamed from ACTION_MIN.
9798 Unnecessary casts removed from above defines.
9799
9800
9801 Fix misspelling in names.
9802 * src/vcg.h (enum_alignment_e): Renamed from enum_alignement_e.
9803 * src/vcg_defaults.h (G_NODE_ALIGNMENT): Renamed from
9804 G_NODE_ALIGNEMENT.
9805
9806
9807 * lib/timevar.c (timevar_report): Renamed from time_report,
9808 for consistency with other names.
9809 * lib/timevar.h (timevar_report): New decl.
9810 * src/system.h (time_report): Remove; decl is now in lib/timevar.h.
9811
9812
9813 Sort include-file uses.
9814
9815 Reorder all include files under src to be in the order "system.h".
9816 then the ../lib include files in angle brackets (alphabetized),
9817 then the . include files in double-quotes (alphabetized). Fix
9818 dependency breakages encountered in this process, as follows:
9819 * src/closure.h, src/derives.h, src/state.h: Include "gram.h".
9820 * src/complain.c: Don't include stdlib.h, string.h _LIBC stuff.
9821 * src/state.h: Include "symtab.h".
9822
9823 2002-12-08 Paul Eggert <eggert@twinsun.com>
9824
9825 * data/glr.c, data/lalr1.cc, data/yacc.c: Do not use __file__,
9826 since this causes problems when __file__ contains character
9827 sequences like "@" that are treated specially by src/scan-skel.l.
9828 Instead, just use the file's basename. This fixes the bug
9829 reported by Martin Mokrejs in
9830 <http://lists.gnu.org/archive/html/bug-bison/2002-12/msg00007.html>.
9831
9832 2002-12-06 Paul Eggert <eggert@twinsun.com>
9833
9834 Add support for rules that do not have trailing semicolons, as
9835 POSIX requires. Improve the quality of locations in Bison
9836 diagnostics.
9837
9838 * src/location.c: Include <quotearg.h>.
9839 (empty_location): Now const.
9840 (location_print): New function. Follow the recommendation of the
9841 GNU Coding Standards for locations that span file boundaries.
9842 * src/location.h: Do not include <quotearg.h>; no longer needed.
9843 (boundary): New type.
9844 (location_t): Use it. This allows locations to span file boundaries.
9845 All member uses changed: file -> start.file or end.file (as needed),
9846 first_line -> start.line, first_column -> start.column,
9847 last_line -> end.line, last_column -> end.column.
9848 (equal_boundaries): New function.
9849 (LOCATION_RESET, LOCATION_STEP): Remove.
9850 (LOCATION_PRINT): Remove. All callers changed to use location_print.
9851 (empty_location): Now const.
9852 (location_print): New decl.
9853 * src/parse-gram.y (lloc_default): New function, which handles
9854 empty locations more accurately.
9855 (YYLLOC_DEFAULT): Use it.
9856 (%token COLON): Remove.
9857 (%token ID_COLON): New token.
9858 (rules): Use it.
9859 (declarations, rules): Remove trailing semicolon.
9860 (declaration, rules_or_grammar_declaration):
9861 Allow empty (";") declaration.
9862 (symbol_def): Remove empty actions; no longer needed.
9863 (rules_or_grammar_declaration): Remove trailing semicolon.
9864 (semi_colon.opt): Remove.
9865 * src/reader.h: Include location.h.
9866 (scanner_cursor): New decl.
9867 * src/reduce.c (nonterminals_reduce): Use warn_at rather than
9868 rolling our own.
9869 * src/scan-gram.l (YY_USER_INIT): Initialize scanner_cursor instead
9870 of *loc.
9871 (STEP): Remove. No longer needed, now that adjust_location does
9872 the work. All uses removed.
9873 (scanner_cursor): New var.
9874 (adjust_location): Renamed from extend_location. It now sets
9875 *loc and adjusts the scanner cursor. All uses changed.
9876 Don't bother testing for CR.
9877 (handle_syncline): Remove location arg; now updates scanner cursor.
9878 All callers changed.
9879 (unexpected_end_of_file): Now accepts start boundary of token or
9880 comment, not location. All callers changed. Update scanner cursor,
9881 not the location.
9882 (SC_AFTER_IDENTIFIER): New state.
9883 (context_state): Renamed from c_context. All uses changed.
9884 (id_loc, code_start, token_start): New local vars.
9885 (<INITIAL,SC_AFTER_IDENTIFIER>): New initial context. Move all
9886 processing of Yacc white space and equivalents here.
9887 (<INITIAL>{id}): Save id_loc. Begin state SC_AFTER_IDENTIFIER
9888 instead of returning ID immediately, since we need to search for
9889 a subsequent colon.
9890 (<INITIAL>"'", "\""): Save token_start.
9891 (<INITIAL>"%{", "{", "%%"): Save code_start.
9892 (<SC_AFTER_IDENTIFIER>): New state, looking for a colon.
9893 (<SC_YACC_COMMENT>, <SC_COMMENT>, <SC_LINE_COMMENT>):
9894 BEGIN context_state at end, not INITIAL.
9895 (<SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'",
9896 <SC_BRACED_CODE>"}", <SC_PROLOGUE>"%}", <SC_EPILOGUE><<EOF>>):
9897 Return correct token start.
9898 (<SC_BRACED_CODE,SC_PROLOGUE,SC_EPILOGUE>): Save start boundary when
9899 the start of a character, string or multiline comment is found.
9900 * tests/conflicts.at (S/R in initial, Defaulted Conflicted
9901 Reduction): Adjust reported locations to match the more-precise
9902 results now expected.
9903 * tests/input.at (Invalid $n, Invalid @n, Type Clashes): Likewise.
9904 * tests/reduce.at (Useless Rules, Reduced Automaton,
9905 Underivable Rules): Likewise.
9906 * tests/regression.at (Invalid inputs): No longer `expecting ";"
9907 or "|"' now that so many other tokens are allowed by the new grammar.
9908
9909 * src/complain.h (current_file): Remove duplicate decl;
9910 current_file is now owned by files.h.
9911 * src/complain.c, src/scan-gram.l: Include files.h.
9912
9913 2002-12-06 Paul Eggert <eggert@twinsun.com>
9914
9915 * data/glr.c (yy_reduce_print): Don't assume that yyrline[yyrule]
9916 promotes to int; it might be unsigned int.
9917 * data/yacc.c (yy_reduce_print): Likewise.
9918
9919 * doc/bison.texinfo (Table of Symbols): YYERROR_VERBOSE should
9920 be #defined in the prologue, not in the Bison declarations.
9921 This fixes Debian Bug 102878, reported by Shaul Karl.
9922
9923 2002-12-02 Paul Eggert <eggert@twinsun.com>
9924
9925 * configure.ac (AC_REPLACE_FUNCS): Add strtoul.
9926 * lib/strtoul.c: New file, from gnulib.
9927 This fixes a porting bug reported by Peter Klein in
9928 <http://lists.gnu.org/archive/html/bug-bison/2002-12/msg00000.html>.
9929
9930 2002-11-30 Paul Eggert <eggert@twinsun.com>
9931
9932 * src/scan-gram.l (no_cr_read, extend_location): Move to epilogue,
9933 and put only a forward declaration in the prologue. This is for
9934 consistency with the other scanner helper functions.
9935
9936 Type clashes now generate warnings, not errors, since it
9937 appears that POSIX may allow some grammars with type clashes.
9938 * src/reader.c (grammar_current_rule_check): Warn about
9939 type clashes instead of complaining.
9940 * tests/input.at (Type Clashes): Expect warnings, not complaints.
9941
9942 Add Yacc library, since POSIX requires it.
9943 * doc/bison.texinfo (Yacc Library): New node. Regenerate top menu.
9944 * lib/Makefile.am (lib_LIBRARIES, liby_a_SOURCES): New macros.
9945 * lib/main.c, lib/yyerror.c: New files.
9946
9947 gram_error can be static; it need not be extern.
9948 * src/reader.h (gram_error): Remove decl.
9949 * src/parse-gram.y (gram_error): Now static. Add static decl.
9950 (print_token_value): Omit parameter names from forward decl,
9951 for consistency.
9952
9953 2002-11-29 Paul Eggert <eggert@twinsun.com>
9954
9955 * doc/bison.texinfo: Emphasize that yylex and yyerror must
9956 be declared before being used. E.g., one should typically
9957 declare them in the prologue. Use GNU coding style in examples.
9958 Put "const" consistently after the type it modifies. Mention
9959 that C99 supports "inline". Mention that yyerror traditionally
9960 returns "int".
9961
9962 %parse-param and %lex-param now take just one argument, the
9963 declaration; the argument name is deduced from the declaration.
9964
9965 * doc/bison.texinfo (Parser Function, Pure Calling, Error
9966 Reporting, Table of Symbols): Document this.
9967 * src/parse-gram.y (add_param): New function.
9968 (COMMA): Remove.
9969 (declaration): Implement new rule for %parse-param and %lex-param.
9970 * src/scan-gram.l: "," now elicits a warning, rather than being
9971 a token; this is more compatible with byacc.
9972 * tests/calc.at (Simple LALR Calculator): Adopt new convention.
9973
9974 2002-11-27 Paul Eggert <eggert@twinsun.com>
9975
9976 Rename identifiers to avoid real and potential collisions.
9977
9978 * data/c.m4 (b4_yysymprint_generate): yyout -> yyoutput,
9979 to avoid collision with lex macro described by Bruce Lilly in
9980 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
9981 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
9982 * doc/bison.texinfo (Prologue, Tracing): yyprint -> print_token_value.
9983 * src/parse-gram.y (print_token_value): Renamed from yyprint.
9984 All uses changed.
9985 (YYPARSE_PARAM, YYLEX_PARAM, yycontrol): Remove. All uses changed.
9986 The name "yycontrol" violates the name space rules, and this stuff
9987 wasn't being used anyway.
9988 (input): Remove action; this stuff wasn't being used.
9989 (gram_error): Rename local variable yylloc -> loc.
9990 * src/reader.h (struct gram_control_s, gram_control_t): Remove.
9991 (YY_DECL): Don't use "yy" at start of local variables.
9992 All uses changed, e.g., yylloc -> loc.
9993 * src/scan-gram.l (STEP): Renamed from YY_STEP. All uses changed.
9994 (STRING_GROW): Renamed from YY_OBS_GROW. All uses changed.
9995 (STRING_FINISH): Renamed from YY_OBS_FINISH. All uses changed.
9996 (STRING_FREE): Renamed from YY_OBS_FREE. All uses changed.
9997
9998 * src/parse-gram.y (gram_error): loc is now const *.
9999 * src/reader.h (gram_error): Likewise.
10000
10001 2002-11-24 Paul Eggert <eggert@twinsun.com>
10002
10003 Version 1.75c.
10004
10005 * tests/actions.at (Actions after errors): Use an output format
10006 more similar to that of the Printers and Destructors test.
10007 Test the position of the ';' token too.
10008 (Printers and Destructors): Likewise.
10009 (Printers and Destructors: %glr-parser): Remove for now, to avoid
10010 unnecessarily alarming people when the test fails.
10011
10012 * data/yacc.c (yyerrlab1): Move this label down, so that the
10013 parser does not discard the lookahead token if the user code
10014 invokes YYERROR. This change is required for POSIX conformance.
10015
10016 * lib/error.c: Sync with gnulib.
10017
10018 2002-11-22 Paul Eggert <eggert@twinsun.com>
10019
10020 * lib/quotearg.c, lib/quotearg.h: Sync with gnulib.
10021 * lib/mbswidth.c, lib/mbswidth.h: Likewise.
10022 * lib/xmalloc.c: Likewise.
10023
10024 2002-11-20 Paul Eggert <eggert@twinsun.com>
10025
10026 * lib/argmatch.c, lib/argmatch.h: Sync with gnulib.
10027
10028 2002-11-20 Paul Eggert <eggert@twinsun.com>
10029
10030 Avoid use of <assert.h>, as the GNU Coding Standards hint that one
10031 should use `if (! x) abort ();' rather than `assert (x);', and
10032 anyway it's one less thing to worry about configuring.
10033
10034 * data/glr.c, lib/hash.c, src/system.h: Do not include <assert.h>.
10035 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise,
10036 and replace all instances of assert with abort.
10037 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
10038 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Likewise.
10039
10040 * data/glr.c (yydoAction, yyglrReduce, yysplitStack, yyresolveStates,
10041 yyresolveAction, yyprocessOneStack): Use abort rather than assert.
10042 * lib/hash.c (hash_lookup, hash_get_first, hash_get_next,
10043 hash_find_entry, hash_rehash, hash_insert): Likewise.
10044 * src/conflicts.c (resolve_sr_conflict): Likewise.
10045 * src/lalr.c (set_goto_map, map_goto): Likewise.
10046 * src/nullable.c (nullable_compute): Likewise.
10047 * src/output.c (prepare_rules, token_definitions_output): Likewise.
10048 * src/reader.c (packgram, reader): Likewise.
10049 * src/state.c (state_new, state_free, state_transitions_set,
10050 state_reduction_find): Likewise.
10051 * src/symtab.c (symbol_user_token_number_set, symbol_make_alias,
10052 symbol_pack): Likewise.
10053 * src/tables.c (conflict_row, pack_vector): Likewise.
10054 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
10055 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
10056 get_node_alignement_str, get_arrow_mode_str, get_crossing_type_str,
10057 get_view_str, get_linestyle_str, get_arrowstyle_str): Likewise.
10058
10059 * lib/argmatch.h (ARRAY_CARDINALITY): Do not bother to #undef.
10060 (ARGMATCH_CONSTRAINT): New macro.
10061 (ARGMATCH_ASSERT): Use it.
10062
10063 * src/system.h (verify): New macro.
10064 * src/getargs.c (trace_argmatch, report_argmatch): Use verify
10065 rather than assert.
10066 * src/tables.c (tables_generate): Likewise.
10067
10068 * src/struniq.c (struniq_assert): Now returns void, and aborts
10069 if the assertion is false.
10070 (struniq_assert_p): Remove.
10071 * src/struniq.h: Likewise.
10072
10073 2002-11-18 Paul Eggert <eggert@twinsun.com>
10074
10075 * data/glr.c (yygetLRActions): Replace `yyindex' with
10076 `yytable[yyindex]' to fix typo introduced in my 2002-11-09 patch.
10077 This fixes the regression with Sun ONE Studio 7 cc that I reported in
10078 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00077.html>.
10079
10080 2002-11-18 Akim Demaille <akim@epita.fr>
10081
10082 * doc/bison.texinfo (Tracing): `yyprint' shouldn't prepend a
10083 space.
10084 From Tim Van Holder.
10085
10086 2002-11-17 Paul Eggert <eggert@twinsun.com>
10087
10088 Pacify Sun ONE Studio 7 lint. Also, rename "ParseError"
10089 to "SyntaxError" for consistency with my 2002-11-15 change.
10090
10091 * data/glr.c (YYDPRINTF, YYDSYMPRINT, YYDSYMPRINTF) [!YYDEBUG]: Do
10092 not define to {}, since this breaks the common use of `YYDPRINTF
10093 ((...));' if a single statement is desired (e.g. before `else').
10094 Work around GCC warnings by surrounding corresponding calls with
10095 {} if needed.
10096 (yyhasResolvedValue): Remove unused function.
10097 (yymergeOptionSets, yyresolvStack): Use `continue;' for empty
10098 loop body.
10099 (yyreportSyntaxError): Renamed from yyreportParseError.
10100 (yyrecoverSyntaxError): Renamed from yyrecoverParseError.
10101 All uses changed.
10102 * tests/calc.at (_AT_DATA_CALC_Y): Make vars static instead of
10103 extern when possible. Remove unused initializations.
10104
10105 2002-11-16 Akim Demaille <akim@epita.fr>
10106
10107 Augment the similarity between GLR and LALR traces.
10108
10109 * data/yacc.c (yy_stack_print, YY_STACK_PRINT, yy_reduce_print)
10110 (YY_REDUCE_PRINT): New.
10111 (yyparse): Use them.
10112 * data/glr.c (yy_reduce_print): Use YYFPRINTF, no need for
10113 YYDPRINT here.
10114 (yyglrReduce, yyrecoverParseError, yyparse): Don't report the
10115 state reached after the reduction/recovery, since...
10116 (yyparse, yyprocessOneStack): Report the state we are entering in.
10117
10118 2002-11-16 Akim Demaille <akim@epita.fr>
10119
10120 * src/getargs.h, src/getargs.c (trace_e, trace_args, trace_types):
10121 Add support for --trace=skeleton.
10122 * src/scan-skel.l: %option debug.
10123 Scan strings of non-@ or \n instead of character by character.
10124 (scan_skel): Handle trace_skeleton.
10125 (QPUTS): New.
10126 (@output_parser_name@, @output_header_name@): ``Restore'' their
10127 support (used to be M4 macros).
10128 * data/yacc.c: Quote larger chunks, a la glr.c.
10129 * data/lalr1.cc: Likewise.
10130 The header guards are no longer available, so use some other
10131 string than `YYLSP_NEEDED'.
10132
10133 2002-11-16 Akim Demaille <akim@epita.fr>
10134
10135 Make the ``Printers and Destructors'' test more verbose, taking
10136 `yacc.c''s behavior as (possibly wrong) reference.
10137
10138 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use printf
10139 instead of fprint on stdout.
10140 Set and report the last_line of the symbols.
10141 Consistently display values and locations.
10142
10143 2002-11-16 Paul Eggert <eggert@twinsun.com>
10144
10145 * data/yacc.c: Avoid over-quoting of __line__ and __file__.
10146
10147 2002-11-15 Paul Eggert <eggert@twinsun.com>
10148
10149 * tests/actions.at (Actions after errors): New test case.
10150
10151 * data/glr.c, data/lalr1.cc, data/yacc.cc, doc/bison.texinfo,
10152 src/conflicts.c, src/parse-gram.y, src/tables.c, src/tables.h,
10153 tests/action.at, tests/calc.at, tests/conflicts.at,
10154 tests/cxx-type.at, tests/regression.at:
10155 "parse error" -> "syntax error" for POSIX compatibility.
10156 "parsing stack overflow..." -> "parser stack overflow" so
10157 that code matches Bison documentation.
10158
10159 2002-11-15 Akim Demaille <akim@epita.fr>
10160
10161 * src/parse-gram.y (declaration): Have %parse-param and %lex-param
10162 take two BRACED_CODE, not two string_content.
10163 Free the scanner's obstack when we are done.
10164 (code_content): New.
10165 * tests/calc.at: Adjust.
10166 * doc/bison.texinfo: Adjust.
10167 Also, make sure to include the `,' for these declarations.
10168
10169 2002-11-15 Tim Van Holder <tim.van.holder@pandora.be>
10170
10171 * m4/prereq.m4: Removed the commented jm_PREREQ_HASH
10172 definition; avoids potential autoreconf problems.
10173
10174 2002-11-15 Akim Demaille <akim@epita.fr>
10175
10176 Always check the value returned by yyparse.
10177
10178 * tests/calc.at (_AT_DATA_CALC_Y): Have `main' exit with the value
10179 returned by yyparse.
10180 (_AT_CHECK_CALC_ERROR): Take the expected exit value as argument.
10181 Adjust calls.
10182 * tests/glr-regr1.at (glr-regr1.y): Have `main' exit with the value
10183 returned by yyparse.
10184
10185 2002-11-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
10186
10187 * data/glr.c (yyFail): Always set yyerrflag. Corrects regression
10188 on input.at test.
10189
10190 2002-11-14 Paul Eggert <eggert@twinsun.com>
10191
10192 * src/output.c (output_skeleton): Call xfopen instead of
10193 duplicating xfopen's body.
10194
10195 Fix bugs reported by Nelson H. F. Beebe in
10196 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00078.html>.
10197
10198 * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that
10199 "$CC -E foo.h" is allowed, as this doesn't work with the Portland
10200 Group compiler. Instead, use "$CC -E bar.c". Include the .h
10201 file twice in the grammar, as an extra check.
10202
10203 * tests/input.at (Torturing the Scanner): Surround the
10204 backslash-newline tests with "#if 0", to make it less likely that
10205 we'll run into compiler bugs. Bring back solitary \ inside
10206 comment, but add a closing comment to work around HP C bug. Don't
10207 test backslash-newline in C character constant.
10208
10209 2002-11-14 Akim Demaille <akim@epita.fr>
10210
10211 * tests/synclines.at (AT_SYNCLINES_COMPILE): Ignore the exit
10212 status of the compiler.
10213 Calling `exit 1' is no longer needed.
10214 Reported by Nelson H. F. Beebe.
10215
10216 2002-11-14 Akim Demaille <akim@epita.fr>
10217
10218 * tests/atlocal.in (CPPFLAGS): We have config.h.
10219 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR):
10220 New.
10221 * tests/actions.at, tests/calc.at, tests/conflicts.at,
10222 * tests/cxx-type.at, tests/glr-regr1.at, tests/headers.at,
10223 * tests/regression.at, tests/torture.at: Use them for all the
10224 grammars that are to be compiled.
10225 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Rename as...
10226 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): this.
10227 * doc/bison.texinfo (GLR Parsers): Document `inline'.
10228
10229 2002-11-14 Akim Demaille <akim@epita.fr>
10230
10231 * doc/bison.texinfo: Various formatting changes (alignments in
10232 samples, additional @group/@end group, GCS in samples.
10233 Use @deffn instead of simple @table to define the directives,
10234 macros, variables etc.
10235
10236 2002-11-13 Paul Eggert <eggert@twinsun.com>
10237
10238 Fix some bugs reported by Albert Chin-A-Young in
10239 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00066.html>.
10240
10241 * tests/input.at (Torturing the Scanner): Don't invoke "cc a.c b.c
10242 -o c"; the HP C compiler chatters during compilation.
10243 Instead, invoke "cc -c a.c -o a.o; cc -c b.c -o b.o; cc a.o b.o -o c".
10244 * tests/headers.at (export YYLTYPE): Likewise.
10245
10246 * tests/input.at (Torturing the Scanner): Remove lines containing
10247 solitary backslashes, as they tickle a bug in the HP C compiler.
10248
10249 * tests/glr-regr1.at (Badly Collapsed GLR States): Avoid //
10250 comments, since they're not portable. Use GNU coding style.
10251
10252 2002-11-13 Akim Demaille <akim@epita.fr>
10253
10254 * data/yacc.c: Leave bigger chunks of quoted text.
10255 (YYDSYMPRINTF): New.
10256 Use it to report symbol activities.
10257 * data/glr.c (YYDSYMPRINTF): New.
10258 Use it.
10259
10260 2002-11-12 Paul Eggert <eggert@twinsun.com>
10261
10262 Version 1.75b.
10263
10264 * data/glr.c (yydoAction): Return YYRESULTTAG, not int.
10265 (yyglrReduce): Return yyok, not 0.
10266 This should avoid the enumerated-type warnings reported
10267 by Nelson H. F. Beebe in
10268 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00057.html>.
10269
10270 * lib/bbitset.h (BITSET_INLINE): Remove.
10271 * lib/bitset.h [! BITSET_INLINE]: Remove.
10272 (bitset_set, bitset_reset, bitset_test): Rename local vars
10273 to avoid shadowing warnings by GCC.
10274
10275 * data/glr.c (inline): Remove #define. It's the user's
10276 responsibility to #define it away, just like 'const'.
10277 This fixes one of the bugs reported by Nelson H. F. Beebe in
10278 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00058.html>.
10279
10280 * Makefile.maint (po-check): Scan .l and .y files instead of the
10281 .c and the .h files that they generate. This fixes the bug
10282 reported by Tim Van Holder in:
10283 <http://lists.gnu.org/archive/html/bison-patches/2002-11/msg00062.html>
10284 Look for N_ as well as for _. Try to avoid matching #define for
10285 N_ and _.
10286 * po/POTFILES.in: Remove src/parse-gram.c, src/scan-gram.c,
10287 src/system.h. Add src/parse-gram.y, src/scan-gram.l.
10288 * src/scan-gram.l: Revamp regular expressions so that " and '
10289 do not confuse xgettext.
10290
10291 * src/struniq.h (struniq_new): Do not declare the return type
10292 to be 'const'; this violates the C standard.
10293 * src/struniq.c (struniq_new): Likewise.
10294
10295 2002-11-12 Albert Chin-A-Young <china@thewrittenword.com>
10296
10297 * src/Makefile.am (LDADD): Link $(LIBINTL) last to avoid the
10298 duplicate definition of optind on Tru64 UNIX 4.0D with the Compaq
10299 linker.
10300
10301 2002-11-12 Akim Demaille <akim@epita.fr>
10302
10303 * Makefile.maint: Sync with Autoconf:
10304 (local_updates): New.
10305
10306 2002-11-12 Akim Demaille <akim@epita.fr>
10307
10308 * po/POTFILES.in (src/lalr.c, src/state.c): Remove
10309
10310 2002-11-12 Akim Demaille <akim@epita.fr>
10311
10312 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Display the
10313 locations.
10314
10315 2002-11-12 Akim Demaille <akim@epita.fr>
10316
10317 * data/c.m4 (b4_yysymprint_generate): Pass *yyvaluep to YYPRINT,
10318 not yyvalue.
10319
10320 2002-11-12 Akim Demaille <akim@epita.fr>
10321
10322 * tests/actions.at (AT_CHECK_PRINTER_AND_DESTRUCTOR): New.
10323 Use it to test the GLR parser.
10324
10325 2002-11-12 Akim Demaille <akim@epita.fr>
10326
10327 * tests/regression.at (input.y): s/YYEOF/MYEOF/, as the skeleton
10328 defines it.
10329 * data/glr.c (yystos): New.
10330 (b4_yysymprint_generate, b4_yydestruct_generate): Invoke.
10331 (YYDSYMPRINT): New.
10332 (yyval): Don't define it, it is handled via M4.
10333 (yyrecoverParseError): Free verbosely the discarded symbols.
10334 * data/yacc.c (yysymprint): Remove, rather...
10335 (b4_yysymprint_generate): invoke.
10336 * data/c.m4 (b4_yysymprint_generate): New.
10337 Accept pointers as arguments, as opposed to the version from
10338 yacc.c.
10339 (b4_yydestruct_generate): Likewise.
10340 * tests/cations.at (Printers and Destructors): Use Bison directives
10341 instead of CPP macros.
10342 Don't rely on internal details.
10343
10344 2002-11-12 Akim Demaille <akim@epita.fr>
10345
10346 * data/c.m4 (b4_yydestruct_generate, b4_symbol_actions): New.
10347 * data/yacc.c: Rename yychar1 as yytoken, as in glr.c.
10348 Don't work on yychar (i.e., do set it to YYEMPTY, don't match
10349 it against YYEMPTY and so forth), work on yytoken (i.e., set
10350 it to YYEMPTY etc.).
10351 (yydestruct): Replace with a b4_yydestruct_generate invocation.
10352 (b4_symbol_actions): Remove.
10353 * data/glr.c (YYTRANSLATE): As for yacc.c, if negative, it stands
10354 for 0, end-of-input.
10355
10356 2002-11-12 Akim Demaille <akim@epita.fr>
10357
10358 * doc/bison.texinfo (Destructor Decl): New.
10359
10360 2002-11-12 Akim Demaille <akim@epita.fr>
10361
10362 * src/tables.c (tables_generate): Use free for pointers that
10363 cannot be NULL, not XFREE.
10364 (pack_vector): Use assert, not fatal, for bound violations.
10365 * src/state.c (state_new): Likewise.
10366 * src/reader.c (reader): Likewise.
10367 * src/lalr.c (set_goto_map): Likewise.
10368 * src/location.h (LOCATION_PRINT): If first_line is 0, just issue
10369 the file name.
10370
10371 2002-11-12 Akim Demaille <akim@epita.fr>
10372
10373 * src/scan-gram.l, src/reader.h (scanner_last_string_free):
10374 Restore.
10375 * src/scan-gram.l (last_string): Is global to the file, not to
10376 yylex.
10377 * src/parse-gram.y (input): Don't append the epilogue here,
10378 (epilogue.opt): do it here, and free the scanner's obstack.
10379 * src/reader.c (epilogue_set): Rename as...
10380 (epilogue_augment): this.
10381 * data/c.m4 (b4_epilogue): Defaults to empty.
10382
10383 2002-11-12 Akim Demaille <akim@epita.fr>
10384
10385 * src/getargs.c (long_options): Remove duplicates.
10386 * src/vmsgetargs.c, src/build.com, src/bison.cld, src/vmshlp.mar:
10387 Remove.
10388 * doc/bison.rnh: Remove.
10389 * doc/bison.texinfo (VMS Invocation): Remove.
10390
10391 2002-11-12 Akim Demaille <akim@epita.fr>
10392
10393 * src/struniq.h, src/struniq.c (struniq_t): Is const.
10394 (STRUNIQ_EQ, struniq_assert, struniq_assert_p): New.
10395
10396 Use struniq for symbols.
10397
10398 * src/symtab.h (symbol_t): The tag member is a struniq.
10399 (symbol_type_set): Adjust.
10400 * src/symtab.c (symbol_new): Takes a struniq.
10401 (symbol_free): Don't free the tag member.
10402 (hash_compare_symbol_t, hash_symbol_t): Rename as...
10403 (hash_compare_symbol, hash_symbol): these.
10404 Use the fact that tags as struniqs.
10405 (symbol_get): Use struniq_new.
10406 * src/symlist.h, src/symlist.c (symbol_list_n_type_name_get):
10407 Returns a strniq.
10408 * src/reader.h (merger_list, grammar_currentmerge_set): The name
10409 and type members are struniqs.
10410 * src/reader.c (get_merge_function)
10411 (grammar_current_rule_merge_set): Adjust.
10412 (TYPE, current_type): Are struniq.
10413
10414 Use struniq for file names.
10415
10416 * src/files.h, src/files.c (infile): Split into...
10417 (grammar_file, current_file): these.
10418 * src/scan-gram.c (YY_USER_INIT, handle_syncline): Adjust.
10419 * src/reduce.c (reduce_print): Likewise.
10420 * src/getargs.c (getargs): Likewise.
10421 * src/complain.h, src/complain.c: Likewise.
10422 * src/main.c (main): Call struniqs_new early enough to use it for
10423 file names.
10424 Don't free the input file name.
10425
10426 2002-11-12 Akim Demaille <akim@epita.fr>
10427
10428 * src/symtab.c (symbol_free): Remove dead deactivated code:
10429 type_name are properly removed.
10430 Don't use XFREE to free items that cannot be NULL.
10431 * src/struniq.h, src/struniq.c: New.
10432 * src/main.c (main): Initialize/free struniqs.
10433 * src/parse-gram.y (%union): Add astruniq member.
10434 (yyprint): Adjust.
10435 * src/scan-gram.l (<{tag}>): Return a struniq.
10436 Free the obstack bit that used to store it.
10437 * src/symtab.h (symbol_t): The 'type_name' member is a struniq.
10438
10439 2002-11-11 Paul Eggert <eggert@twinsun.com>
10440
10441 Revamp to fix many (but not all) of the C- and M4-related quoting
10442 problems. Among other things, this fixes the Bison bug reported
10443 by Jan Hubicka when processing the Bash grammar; see:
10444 <http://lists.gnu.org/archive/html/bison-patches/2002-11/msg00039.html>
10445
10446 Use new @ escapes consistently. Represent brackets with @{ and @}
10447 rather than @<:@ and @:>@, since this works a bit better with dumb
10448 editors like vi. Represent @ with @@, since @ is now consistently
10449 an escape. Use @oline@ and @ofile@ rather than __oline__ and
10450 __ofile__, to avoid unexpected expansions. Similarly, use @output
10451 rather than #output.
10452
10453 * data/c.m4 (b4_copyright): Omit file name from comment, since
10454 the file name could contain "*/".
10455 (b4_synclines_flag): Don't quote the 2nd argument; it should already
10456 be quoted. All uses changed.
10457
10458 * data/glr.c: Use new @ escapes consistently.
10459 (b4_input_suffix, b4_output_parser_suffix, b4_output_parser_name,
10460 b4_output_header_suffix, b4_output_header_name, b4_header_guard):
10461 Remove, since they couldn't handle arbitrary characters in file
10462 names.
10463 * data/lalr1.cc: Likewise.
10464 * data/yacc.c: Likewise.
10465
10466 * src/files.c (output_infix): Remove; all uses removed.
10467 * src/files.h: Likewise.
10468
10469 * data/glr.c: Remove use of "#ifdef b4_header_guard", since it
10470 mishandled funny characters in file names, and anyway it isn't
10471 needed any more.
10472 * data/yacc.c: Likewise.
10473 * data/lalr1.cc: Use YYSLP_NEEDED instead of b4_header_guard.
10474
10475 * data/glr.c (YYSTYPE_IS_TRIVIAL): Define when the .h file would.
10476 * data/yacc.c: Likewise.
10477
10478 * src/muscle_tab.c: Include quotearg.h, since we need to quote C
10479 strings now.
10480 (muscle_init): Quote filename as a C string.
10481 * src/muscle_tab.h (MUSCLE_GROW_STRING_PAIR): Remove; unused.
10482 (MUSCLE_OBSTACK_SGROW, MUSCLE_INSERT_C_STRING): New macros.
10483 * src/output.c (escaped_file_name_output): New function.
10484 (prepare_symbols): Quote tokens for M4.
10485 (prepare): Don't insert output_infix, output_prefix,
10486 output_parser_name, output_header_name; this is now down by scan-skel.
10487 Insert skeleton as a C string.
10488
10489 * src/output.c (user_actions_output, symbol_destructors_output,
10490 symbol_printers_output): Quote filenames for C and M4.
10491 * src/reader.c (prologue_augment, epilogue_set): Likewise.
10492
10493 * src/scan-gram.l (<SC_CHARACTER>): Don't worry about any backslash
10494 escapes other than \\ and \'; this simplifies the code.
10495 (<SC_STRING>): Likewise, for \\ and \".
10496 (<SC_COMMENT,SC_LINE_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,
10497 SC_PROLOGUE,SC_EPILOGUE>): Escape $ and @, too.
10498 Use new escapes @{ and @} for [ and ].
10499
10500 * src/scan-skel.l (yylineno, yyoutname): Remove static vars, replacing
10501 them with auto vars.
10502 Switch to new escape scheme, where @ is the escape character uniformly.
10503 Abort if a stray escape character is found. Avoid unbounded input
10504 buffer when parsing non-escaped text.
10505
10506 * tests/input.at (Torturing the Scanner): Add tests that @oline@,
10507 __oline__, #output, $@, and @{ do not have unintended meanings.
10508
10509 2002-11-09 Paul Eggert <eggert@twinsun.com>
10510
10511 Fix the test failure due to GCC warnings described in
10512 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00000.html>.
10513 * data/glr.c (yyis_pact_ninf, yyis_table_ninf): New macros, which
10514 evaluate to 0 if it's impossible for NINF to be in the respective
10515 table.
10516 (yygetLRActions, yyrecoverParseError): Use them.
10517
10518 * src/scan-gram.l (unexpected_end_of_file): Fix bug: columns were
10519 counted in the token inserted at end of file. Now takes
10520 location_t *, not location_t, so that the location can be
10521 adjusted. All uses changed.
10522
10523 * tests/regression.at (Invalid inputs): Adjust wording in
10524 diagnostic to match the new behavior.
10525
10526 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR,
10527 AT_DATA_HORIZONTAL_GRAMMAR, AT_DATA_LOOKAHEADS_GRAMMAR,
10528 AT_DATA_STACK_TORTURE): Replace `assert (x);' with `if (! (x))
10529 abort ();'. This reduces the runtime of the "Many lookaheads"
10530 test from 27.6 to 2.7 minutes on a 440 MHz Ultrasparc III running
10531 GCC 3.2.
10532
10533 2002-11-07 Paul Eggert <eggert@twinsun.com>
10534
10535 * src/parse-gram.y (CHARACTER): Remove unused token.
10536 All uses removed.
10537
10538 * src/scan-gram.l: Remove stack option. We no longer use the
10539 stack, since the stack was never deeper than 1; instead, use the
10540 new auto var c_context to record the stacked value.
10541
10542 Remove nounput option. At an unexpected end of file, we now unput
10543 the minimal input necessary to end cleanly; this simplifies the
10544 code.
10545
10546 Avoid unbounded token sizes where this is easy.
10547
10548 (unexpected_end_of_file): New function.
10549 Use it to systematize the error message on unexpected EOF.
10550 (last-string): Now auto, not static.
10551 (YY_OBS_FREE): Remove unnecessary do while (0) wrapper.
10552 (scanner_last_string_free): Remove; not used.
10553 (percent_percent_count): Move decl to just before use.
10554 (SC_ESCAPED_CHARACTER): Return ID at unexpected end of file,
10555 not the (never otherwised-used) CHARACTER.
10556
10557 2002-11-07 Akim Demaille <akim@epita.fr>
10558
10559 Let yyerror always receive the msg as last argument, so that
10560 yyerror can be variadic.
10561
10562 * data/yacc.c (b4_yyerror_args): New.
10563 Use it when calling yyerror.
10564 * data/glr.c (b4_yyerror_args, b4_lyyerror_args): New.
10565 Use it when calling yyerror.
10566 * doc/bison.texinfo (Error Reporting): Adjust.
10567 * tests/calc.at (_AT_DATA_CALC_Y): Adjust.
10568 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Adjust.
10569
10570 2002-11-06 Akim Demaille <akim@epita.fr>
10571
10572 #line should have quoted strings.
10573 Ideally, this should be done by m4_quotearg.
10574
10575 * src/scan-skel.l: Include quotearg.h.
10576 Quote __ofile__.
10577 * src/output.c (symbol_printers_output)
10578 (symbol_destructors_output): Quote the file name.
10579
10580 2002-11-06 Akim Demaille <akim@epita.fr>
10581
10582 * tests/regression.at (Invalid inputs): Adjust to the recent
10583 messages.
10584
10585 2002-11-06 Akim Demaille <akim@epita.fr>
10586
10587 Restore --no-lines.
10588 Reported by Jim Kent.
10589
10590 * data/c.m4 (b4_syncline): New.
10591 * data/glr.c, data/yacc.c, data/lalr1.cc: Use it.
10592 * src/reader.c (prologue_augment, epilogue_set): Use b4_syncline.
10593 * src/output.c (user_actions_output): Likewise.
10594 (prepare): Define 'b4_synclines_flag'.
10595 * src/muscle_tab.c (muscle_init): Don't define b4_linef.
10596
10597 2002-11-06 Akim Demaille <akim@epita.fr>
10598
10599 * src/main.c (main): Free `infile'.
10600 * src/scan-gram.l (handle_syncline): New.
10601 Recognize `#line'.
10602 * src/output.c (user_actions_output, symbol_destructors_output)
10603 (symbol_printers_output): Use the location's file name, not
10604 infile.
10605 * src/reader.c (prologue_augment, epilogue_set): Likewise.
10606
10607 2002-11-05 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
10608
10609 * src/tables.c (matching_state): Don't allow states to match if
10610 either has GLR conflict entries.
10611
10612 2002-11-05 Paul Eggert <eggert@twinsun.com>
10613
10614 * src/scan-gram.l: Use more accurate diagnostics, e.g.
10615 "integer out of range" rather than "invalid value".
10616 * tests/input.at (Invalid $n, Invalid @n): Change expected wording
10617 accordingly.
10618
10619 Scan <% and %> digraphs in C code as POSIX 1003.1-2001 requires.
10620 Also, remove one static variable in the scanner.
10621
10622 * src/scan-gram.l (braces_level): Now auto, not static.
10623 Initialize to zero if the compiler is being picky.
10624 (INITIAL): Clear braces_level instead of incrementing it.
10625 (SC_BRACED_CODE): Treat <% and %> as { and } when inside C code,
10626 as POSIX 1003.1-2001 requires.
10627 * src/system.h (IF_LINT): New macro, taken from coreutils.
10628 * configure.ac: Define "lint" if --enable-gcc-warnings.
10629
10630 2002-11-05 Akim Demaille <akim@epita.fr>
10631
10632 * src/scan-gram.l: When it starts with `%', complain about the
10633 whole directive, not just that `invalid character: %'.
10634
10635 2002-11-04 Akim Demaille <akim@epita.fr>
10636
10637 * Makefile.maint: Update from Autoconf.
10638 (update, cvs-update, po-update, do-po-update): New.
10639
10640 2002-11-04 Akim Demaille <akim@epita.fr>
10641
10642 * tests/glr-regr1.at (Badly Collapsed GLR States): Prototype yylex
10643 and yyerror.
10644 Have yyerror `use' its arguments.
10645 * tests/calc.at (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF
10646 returns true when location & yacc & pure & parse-param.
10647 (_AT_DATA_CALC_Y): Let yyerror ``use'' its arguments.
10648
10649 2002-11-04 Akim Demaille <akim@epita.fr>
10650
10651 * src/location.h (LOCATION_PRINT): Use quotearg slot 3 to avoid
10652 clashes.
10653 * src/scan-gram.l: Use [\'] instead of ['] to pacify
10654 font-lock-mode.
10655 Use complain_at.
10656 Use quote, not quote_n since LOCATION_PRINT no longer uses the
10657 slot 0.
10658
10659 2002-11-03 Paul Eggert <eggert@twinsun.com>
10660
10661 * src/reader.c (get_merge_function, grammar_current_rule_check):
10662 Use consistent diagnostics for reporting type name clashes.
10663 Quote the types with <>, for consistency with Yacc.
10664 * tests/input.at (Type Clashes): Adjust to diagnostic changes.
10665
10666 2002-11-03 Akim Demaille <akim@epita.fr>
10667
10668 * data/c.m4 (b4_identification, b4_user_args, b4_parse_param):
10669 New.
10670 * data/yacc.m4 (b4_pure_args, b4_Pure_args): New.
10671 (b4_parse_param): Remove.
10672 Use b4_identification.
10673 Propagate b4_pure_args where needed to pass them to yyerror.
10674 * data/glr.m4 (b4_parse_param): Remove.
10675 (b4_user_formals, b4_pure_args, b4_pure_formals, b4_lpure_args)
10676 (b4_lpure_formals): New.
10677 Use b4_identification.
10678 (YY_USER_FORMALS, YY_USER_ARGS): Remove, replaced by
10679 b4_user_formals and b4_user_args.
10680 (yyexpandGLRStack, yyFail, yyaddDeferredAction, yyglrShiftDefer)
10681 (yyreportAmbiguity): When using a pure parser, also need
10682 the location, and the parse-params.
10683 Adjust callers.
10684 (yyuserAction, yyglrShift, yyreportParseError, yyrecoverParseError):
10685 When using a pure parser, also need the parse-params.
10686 Adjust callers.
10687 * tests/calc.at: Test pure (%pure-parser) and absolutely pure
10688 (%pure-parser + %parse-param) LALR and GLR parsers.
10689 (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): New, define AT_PARAM_IF,
10690 AT_LOCATION_IF, AT_PURE_IF, AT_GLR_IF, AAT_PURE_AND_LOC_IF,
10691 AT_GLR_OR_PARAM_IF, AT_YYERROR_ARG_LOC_IF, AT_YYERROR_SEES_LOC_IF.
10692 (_AT_DATA_CALC_Y): Equip for purity of yyerror.
10693 (_AT_CHECK_CALC_ERROR): Use AT_YYERROR_SEES_LOC_IF.
10694 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Equip for yyerror purity.
10695 * doc/bison.texinfo: Untabify the whole file.
10696 (Parser Function): Document %parse-param, deprecate YYPARSE_PARAM.
10697 (Pure Calling): Document %lex-param, deprecate YYLEX_PARAM.
10698 (Error Reporting): Adjust to these new directives.
10699 Document %error-verbose, deprecate YYERROR_VERBOSE.
10700
10701 2002-11-03 Akim Demaille <akim@epita.fr>
10702
10703 * tests/calc.at: Change all the AT_CHECK_CALC_LALR and
10704 AT_CHECK_CALC_GLR invocations to use % directives, instead of
10705 command line options.
10706 * tests/cxx-type.at: Formatting changes.
10707
10708 2002-11-03 Paul Eggert <eggert@twinsun.com>
10709
10710 * src/scan-gram.l: Revamp to fix POSIX incompatibilities,
10711 to count columns correctly, and to check for invalid inputs.
10712
10713 Use mbsnwidth to count columns correctly. Account for tabs, too.
10714 Include mbswidth.h.
10715 (YY_USER_ACTION): Invoke extend_location rather than LOCATION_COLUMNS.
10716 (extend_location): New function.
10717 (YY_LINES): Remove.
10718
10719 Handle CRLF in C code rather than in Lex code.
10720 (YY_INPUT): New macro.
10721 (no_cr_read): New function.
10722
10723 Scan UCNs, even though we don't fully handle them yet.
10724 (convert_ucn_to_byte): New function.
10725
10726 Handle backslash-newline correctly in C code.
10727 (SC_LINE_COMMENT, SC_YACC_COMMENT): New states.
10728 (eols, blanks): Remove. YY_USER_ACTION now counts newlines etc.;
10729 all uses changed.
10730 (tag, splice): New EREs. Do not allow NUL or newline in tags.
10731 Use {splice} wherever C allows backslash-newline.
10732 YY_STEP after space, newline, vertical-tab.
10733 ("/*"): BEGIN SC_YACC_COMMENT, not yy_push_state (SC_COMMENT).
10734
10735 (letter, id): Don't assume ASCII; e.g., spell out a-z.
10736
10737 ({int}, handle_action_dollar, handle_action_at): Check for integer
10738 overflow.
10739
10740 (YY_STEP): Omit trailing semicolon, so that it's more like C.
10741
10742 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>): Allow \0 and \00
10743 as well as \000. Check for UCHAR_MAX, not 255.
10744 Allow \x with an arbitrary positive number of digits, as in C.
10745 Check for overflow here.
10746 Allow \? and UCNs, for compatibility with C.
10747
10748 (handle_symbol_code_dollar): Use quote_n slot 1 to avoid collision
10749 with quote slot used by complain_at.
10750
10751 * tests/input.at: Add tests for backslash-newline, m4 quotes
10752 in symbols, long literals, and funny escapes in strings.
10753
10754 * configure.ac (jm_PREREQ_MBSWIDTH): Add.
10755 * lib/Makefile.am (libbison_a_SOURCES): Add mbswidth.h, mbswidth.c.
10756 * lib/mbswidth.h, lib/mbswidth.c: New files, from GNU gettext.
10757 * m4/Makefile.am (EXTRA_DIST): Add mbswidth.m4.
10758 * m4/mbswidth.m4: New file, from GNU coreutils.
10759
10760 * doc/bison.texinfo (Grammar Outline): Document // comments.
10761 (Symbols): Document that trigraphs have no special meaning in Bison,
10762 nor is backslash-newline allowed.
10763 (Actions): Document that trigraphs have no special meaning.
10764
10765 * src/location.h (LOCATION_COLUMNS, LOCATION_LINES): Remove;
10766 no longer used.
10767
10768 2002-11-02 Paul Eggert <eggert@twinsun.com>
10769
10770 * src/reader.c: Don't include quote.h; not needed.
10771 (get_merge_function): Reword warning to be consistent with
10772 type clash diagnostic in grammar_current_rule_check.
10773
10774 * lib/quotearg.c (quotearg_buffer_restyled): Fix off-by-two
10775 bug in trigraph handling.
10776
10777 * src/output.c (prepare_symbols): When printing token names,
10778 escape "[" as "@<:@" and likewise for "]".
10779
10780 * src/system.h (errno): Remove declaration, as we are now
10781 assuming C89 or better, and C89 guarantees errno.
10782
10783 2002-10-30 Paul Eggert <eggert@twinsun.com>
10784
10785 * lib/bitset_stats.c (bitset_stats_read, bitset_stats_write):
10786 Check for close failures.
10787 * src/files.h (xfclose): Return void, not int, since it always
10788 returned zero.
10789 * src/files.c (xfclose): Likewise. Report I/O error if ferror
10790 indicates one.
10791 * src/output.c (output_skeleton): Use xfclose rather than fclose
10792 and ferror. xfclose now checks ferror.
10793
10794 * data/glr.c (YYLEFTMOST_STATE): Remove.
10795 (yyreportTree): Use a stack-based leftmost state. This avoids
10796 our continuing battles with bogus warnings about initializers.
10797
10798 2002-10-30 Akim Demaille <akim@epita.fr>
10799
10800 * src/system.h: Don't use #ifdef/#ifndef on HAVE_ values, only
10801 #if.
10802
10803 2002-10-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
10804
10805 * tests/glr-regr1.at: New test for reported regressions.
10806 * tests/testsuite.at: Add glr-regr1.at test.
10807 * tests/Makefile.am: Add glr-regr1.at test.
10808
10809 2002-10-24 Paul Eggert <eggert@twinsun.com>
10810
10811 Version 1.75a.
10812
10813 * tests/calc.at (_AT_DATA_CALC_Y): Remove unused strcat declaration.
10814 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Include stdlib.h, since
10815 we use malloc. Don't assume 'A' through 'Z' are contiguous.
10816 Don't assume strdup exists; POSIX says its an XSI extension.
10817 Check for buffer overflow on input.
10818
10819 2002-10-24 Akim Demaille <akim@epita.fr>
10820
10821 * src/output.c (output_skeleton): Don't disable M4sugar comments
10822 too soon: it results in comments being expanded.
10823 * data/yacc.c, data/glr.c, data/lalr1.cc: Do it right before the
10824 first output.
10825
10826 2002-10-24 Akim Demaille <akim@epita.fr>
10827
10828 * data/yacc.c (m4_int_type): New.
10829 * data/c.m4 (m4_int_type): Don't use yysigned_char, but `signed
10830 char' as only yacc.c wants K&R portability.
10831 * data/glr.c (yysigned_char): Remove.
10832 * data/lalr1.cc: Rename the trailing b4_name as b4_parser_class_name.
10833 Reported by Quoc Peyrot.
10834
10835 2002-10-23 Paul Eggert <eggert@twinsun.com>
10836
10837 * src/main.c (main): With --trace=time, report times even if a
10838 non-fatal error occurs. Formerly, the times were reported in some
10839 such cases but not in others.
10840 * src/reader.c (reader): Just return if a complaint has been issued,
10841 instead of exiting, so that 'main' can report times.
10842
10843 2002-10-22 Akim Demaille <akim@epita.fr>
10844
10845 * src/system.h: Include sys/types.
10846 Reported by Bert Deknuydt.
10847
10848 2002-10-23 Paul Eggert <eggert@twinsun.com>
10849
10850 * configure.ac (AC_PROG_LEX): Use instead of AM_PROG_LEX.
10851 Suggested by Art Haas.
10852
10853 2002-10-22 Paul Eggert <eggert@twinsun.com>
10854
10855 * src/complain.c (exit) [! (STDC_HEADERS || _LIBC)]: Remove exit
10856 decl; not needed any more.
10857 * src/main.c (main): Use return to exit, undoing yesterday's change.
10858 The last OS that we could find where this wouldn't work is
10859 SunOS 3.5, and that's too old to worry about now.
10860
10861 * data/glr.c (struct yyltype): Define members even when not
10862 doing locations. This is more consistent with yacc.c, and it
10863 works around the following bug reports:
10864 http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00106.html
10865 http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00111.html
10866
10867 * doc/bison.texinfo: Minor spelling and typographical fixes. Use
10868 @acronym consistently. Standardize on "Yacc" instead of "YACC",
10869 "Algol" instead of "ALGOL". Give a bit more history about BNF.
10870
10871 2002-10-22 Akim Demaille <akim@epita.fr>
10872
10873 * data/README: New.
10874
10875 2002-10-21 Paul Eggert <eggert@twinsun.com>
10876
10877 Be consistent about 'bool'; the old code used an enum in one
10878 module and an int in another, and this violates the C standard.
10879 * m4/stdbool.m4: New file, from coreutils 4.5.3.
10880 * configure.ac (AC_HEADER_STDBOOL): Add.
10881 * m4/Makefile.am (EXTRA_DIST): Add stdbool.m4.
10882 * src/muscle_tab.c (hash_compare_muscles): (a ? FALSE : TRUE) -> (! a)
10883 * src/symtab.c (hash_compare_symbol_t): Likewise.
10884 * src/system.h (bool, false, true): Use a definition consistent
10885 with ../lib/hash.c. All uses changed.
10886
10887 * src/complain.c (warning_issued): Renamed from warn_message_count,
10888 so that we needn't worry about integer overflow (!).
10889 Now of type bool. All uses changed.
10890 (complaint_issued): Renamed from complain_message_count; likewise.
10891
10892 * src/main.c (main): Use exit to exit with failure.
10893
10894 * src/complain.c (fatal_at, fatal): Use EXIT_FAILURE and EXIT_SUCCESS
10895 rather than 1 and 0.
10896 * src/main.c (main): Likewise.
10897 * src/getargs.c (getargs): Likewise.
10898 * src/reader.c (reader): Likewise.
10899
10900 * src/getarg.c (getargs): Remove duplicate code for
10901 "Try `bison --help'".
10902
10903 * src/files.c (xfopen, xfclose): Use EXIT_FAILURE rather than 2.
10904 What was that "2" for?
10905
10906 * src/complain.h (fatal, fatal_at): Add __attribute__((__noreturn__)).
10907 * src/getargs.c (usage): Likewise.
10908
10909 * src/getargs.c (getargs): When there are too few operands, report
10910 the last one. When there are too many, report the first extra
10911 one. This is how diffutils does it.
10912
10913 2002-10-20 Paul Eggert <eggert@twinsun.com>
10914
10915 Remove K&R vestiges.
10916 * configure.ac (AC_C_CONST, AM_C_PROTOTYPES): Remove.
10917 * src/complain.c (VA_START): Remove. Assume prototypes.
10918 (vfprintf) [! (HAVE_VPRINTF || defined vfprintf)]: New macro.
10919 (private_strerror, warn_at, warn, complain_at, complain, fatal_at,
10920 fatal): Assume prototypes.
10921 * src/complain.h: Assume prototypes.
10922 * src/system.h (PARAMS): Remove.
10923 Include <limits.h> unconditionally, since it's guaranteeed even
10924 for a freestanding C89 compiler.
10925 (SHRT_MIN, SHRT_MAX): Remove, since C89 guarantees them.
10926 * src/vmsgetargs.c (getargs, cli_present, cli_get_value): Prototype.
10927
10928 2002-10-20 Akim Demaille <akim@epita.fr>
10929
10930 * src/muscle_tab.c (muscle_grow): Remove trailing debugging code.
10931 * data/glr.c (YY_USER_FORMALS, YY_USER_ARGS): New.
10932 (yyuserAction, yydoAction, yyglrReduce, yyresolveValue)
10933 (yyresolveStates, yyresolveAction, yyresolveStack)
10934 (yyprocessOneStack): Use them.
10935 (yy_reduce_print): New.
10936 * tests/calc.at (_AT_DATA_CALC_Y): Exercise %parse-param.
10937
10938 2002-10-20 Akim Demaille <akim@epita.fr>
10939
10940 * data/c.m4 (b4_c_ansi_args): Recognize functions with no
10941 arguments and output `void'.
10942 (b4_c_function): Rename as...
10943 (b4_c_function_def): this.
10944 (b4_c_function_decl, b4_c_ansi_function_def)
10945 (b4_c_ansi_function_decl): New.
10946 Change the interpretation of the arguments: before `int, foo', now
10947 `int foo, foo'.
10948 * data/yacc.c (yyparse): Prototype and define thanks to these.
10949 Adjust b4_c_function_def uses.
10950 * data/glr.c (yyparse): Likewise, but ANSI only.
10951
10952 2002-10-20 Akim Demaille <akim@epita.fr>
10953
10954 * src/output.c (prepare): Move the definition of `tokens_number',
10955 `nterms_number', `undef_token_number', `user_token_number_max'
10956 to...
10957 (prepare_tokens): Here.
10958 (prepare_tokens): Rename as...
10959 (prepare_symbols): this.
10960 (prepare): Move the definition of `rules_number' to...
10961 (prepare_rules): here.
10962 (prepare): Move the definition of `last', `final_state_number',
10963 `states_number' to...
10964 (prepare_states): here.
10965 * data/yacc.c, data/lalr1.cc, data/glr.c: Normalize `>' into `<'.
10966
10967 2002-10-20 Akim Demaille <akim@epita.fr>
10968
10969 * src/tables.h, src/tables.c, src/output.c: Comment changes.
10970
10971 2002-10-20 Akim Demaille <akim@epita.fr>
10972
10973 * data/yacc.c, data/yacc.c (b4_location_if, b4_pure_if): Move to...
10974 * data/c.m4: here.
10975
10976 2002-10-20 Akim Demaille <akim@epita.fr>
10977
10978 * src/output.c (prepare): Use MUSCLE_INSERT_STRING.
10979 * src/muscle_tab.c (muscle_pair_list_grow): Rename `val as
10980 `pair'.
10981 (muscle_init): Move the `b4_ltype', `b4_maxdepth', `b4_initdepth',
10982 `name' to...
10983 * data/glr.c, data/lalr1.cc, data/yacc.c (b4_location_type)
10984 (b4_stack_depth_init, b4_stack_depth_max, b4_parser_class_name):
10985 These.
10986
10987 2002-10-19 Paul Eggert <eggert@twinsun.com>
10988
10989 Do not create a temporary file, as that involves security and
10990 cleanup headaches. Instead, use a pair of pipes.
10991 Derived from a suggestion by Florian Krohm.
10992 * lib/subpipe.c, lib/subpipe.h, m4/subpipe.m4: New files.
10993 * lib/mkstemp.c, lib/readpipe.c, lib/tempname.c, m4/mkstemp.m4: Remove.
10994 * configure.ac (UTILS_FUNC_MKSTEMP, jm_PREREQ_TEMPNAME): Remove.
10995 (BISON_PREREQ_SUBPIPE): Add.
10996 * lib/Makefile.am (libbison_a_SOURCES): Remove readpipe.c.
10997 Add subpipe.h, subpipe.c.
10998 * m4/Makefile.am (EXTRA_DIST): Remove mkstemp.m4. Add subpipe.m4.
10999 * po/POTFILES.in: Add lib/subpipe.c.
11000 * src/output.c: Include "subpipe.h".
11001 (m4_invoke): Remove decl.
11002 (scan_skel): New decl.
11003 (output_skeleton): Use pipe rather than temporary file for m4 input.
11004 Check that m4sugar.m4 is readable, to avoid deadlock.
11005 Check for pipe I/O error.
11006 * src/scan-skel.l (readpipe): Remove decl.
11007 (scan_skel): New function, to be used in place of m4_invoke.
11008 Read from stream rather than file.
11009
11010 * lib/timevar.c (TICKS_TO_MSEC, CLOCKS_TO_MSEC): Do not cast to
11011 float, as this generates a warning on Solaris 8 + GCC 3.2 with
11012 --enable-gcc-warnings. Instead, divide into 1.0 rather than 1;
11013 this generates a more-accurate value anyway.
11014
11015 * lib/timevar.c (timervar_accumulate): Rename locals to
11016 avoid confusion with similarly-named more-global.
11017 * src/muscle_tab.c (muscle_pair_list_grow): Likewise.
11018
11019 * src/output.c (prepare): Use xstrdup to convert char const *
11020 to char *, to avoid GCC warning.
11021
11022 2002-10-19 Akim Demaille <akim@epita.fr>
11023
11024 * tests/calc.at (_AT_DATA_CALC_Y): Define VAL, LOC, LEX_FORMALS,
11025 LEX_PRE_FORMALS, LEX_ARGS, LEX_PRE_ARGS, USE_LEX_ARGS.
11026 Use them to have `calc.y' ready for %pure-parser.
11027 * data/yacc.c (YYLEX): Pass a yylex return type to
11028 b4_c_function_call.
11029
11030 2002-10-19 Akim Demaille <akim@epita.fr>
11031
11032 Prototype support of %lex-param and %parse-param.
11033
11034 * src/parse-gram.y: Add the definition of the %lex-param and
11035 %parse-param tokens, plus their rules.
11036 Drop the `_' version of %glr-parser.
11037 Add the "," token.
11038 * src/scan-gram.l (INITIAL): Scan them.
11039 * src/muscle_tab.c: Comment changes.
11040 (muscle_insert, muscle_find): Rename `pair' as `probe'.
11041 * src/muscle_tab.h (MUSCLE_INSERT_PREFIX): Remove unused.
11042 (muscle_entry_s): The `value' member is no longer const.
11043 Adjust all dependencies.
11044 * src/muscle_tab.c (muscle_init): Adjust: use
11045 MUSCLE_INSERT_STRING.
11046 Initialize the obstack earlier.
11047 * src/muscle_tab.h, src/muscle_tab.c (muscle_grow)
11048 (muscle_pair_list_grow): New.
11049 * data/c.m4 (b4_c_function_call, b4_c_args): New.
11050 * data/yacc.c (YYLEX): Use b4_c_function_call to honor %lex-param.
11051 * tests/calc.at: Use %locations, not --locations.
11052 (AT_CHECK_CALC_GLR): Use %glr-parser, not %glr_parser.
11053
11054 2002-10-19 Akim Demaille <akim@epita.fr>
11055
11056 * src/getargs.c (usage): Take status as argument and exit
11057 accordingly.
11058 Report the traditional `Try ... --help' message when status != 0.
11059 (usage, version): Don't take a FILE * as arg, it is pointless.
11060 (getargs): When there is an incorrect number of arguments, make it
11061 an error, and report it GNUlically thanks to `usage ()'.
11062
11063 2002-10-18 Paul Eggert <eggert@twinsun.com>
11064
11065 * data/glr.c (yyreportParseError): Don't assume that sprintf
11066 yields the length of the printed string, as this is not true
11067 on SunOS 4.1.4. Reported by Peter Klein.
11068
11069 * tests/calc.at (_AT_DATA_CALC_Y): #undef memcmp and realloc.
11070 * tests/conflicts.at (%nonassoc and eof): Likewise.
11071 Fixes SunOS 4.1.4 test failure reported by Peter Klein.
11072
11073 2002-10-17 Akim Demaille <akim@epita.fr>
11074
11075 * src/getargs.h (trace_e): Add trace_scan, and trace_parse.
11076 * src/getargs.c (trace_types, trace_args): Adjust.
11077 * src/reader.c (grammar_current_rule_prec_set)
11078 (grammar_current_rule_dprec_set, grammar_current_rule_merge_set):
11079 Standardize error messages.
11080 And s/@prec/%prec/!
11081 (reader): Use trace_flag to enable scanner/parser debugging,
11082 instead of an adhoc scheme.
11083 * src/scan-gram.l: Remove trailing debugging code.
11084
11085 2002-10-16 Paul Eggert <eggert@twinsun.com>
11086
11087 * src/muscle_tab.h (MUSCLE_TAB_H_): Was misspelled as
11088 MUSCLE_TAB_H.
11089
11090 * NEWS: Officially drop support for building Bison with K&R C,
11091 since it didn't work anyway and it's not worth worrying about.
11092 * Makefile.maint (wget_files): Remove ansi2knr.c.
11093 (ansi2knr.c-url_prefix): Remove.
11094 * lib/.cvsignore: Remove ansi2knr, ansi2knr.*.
11095 * lib/Makefile.am (AUTOMAKE_OPTIONS): Remove.
11096 * src/Makefile.am (AUTOMAKE_OPTIONS): Remove.
11097
11098 2002-10-15 Paul Eggert <eggert@twinsun.com>
11099
11100 Stop using the "enum_" trick for K&R-style function definitions;
11101 it confused me, and I was the author! Instead, assume that people
11102 who want to use K&R C compilers (when using these modules in GCC,
11103 perhaps?) will run ansi2knr.
11104
11105 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): Remove.
11106 All uses of "enum_" changed to "enum ".
11107 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
11108 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
11109
11110 * lib/abitset.c (abitset_and, abitset_and_cmp, abitset_and_or,
11111 abitset_and_or_cmp, abitset_andn, abitset_andn_cmp,
11112 abitset_andn_or, abitset_andn_or_cmp, abitset_bytes, abitset_copy,
11113 abitset_copy1, abitset_disjoint_p, abitset_empty_p,
11114 abitset_equal_p, abitset_init, abitset_list, abitset_list_reverse,
11115 abitset_not, abitset_ones, abitset_or, abitset_or_and,
11116 abitset_or_and_cmp, abitset_or_cmp, abitset_reset, abitset_set,
11117 abitset_size, abitset_small_list, abitset_subset_p, abitset_test,
11118 abitset_unused_clear, abitset_xor, abitset_xor_cmp, abitset_zero):
11119 Use function prototypes; this removes the need for declaring
11120 static functions simply to provide their prototypes.
11121 * lib/bitset.c (bitset_alloc, bitset_and_or_, bitset_and_or_cmp_,
11122 bitset_andn_or_, bitset_andn_or_cmp_, bitset_bytes, bitset_copy_,
11123 bitset_count_, bitset_create, bitset_dump, bitset_first,
11124 bitset_free, bitset_init, bitset_last, bitset_next,
11125 bitset_obstack_alloc, bitset_obstack_free, bitset_only_set_p,
11126 bitset_op4_cmp, bitset_or_and_, bitset_or_and_cmp_, bitset_prev,
11127 bitset_print, bitset_release_memory, bitset_toggle_,
11128 bitset_type_choose, bitset_type_get, bitset_type_name_get,
11129 debug_bitset): Likewise.
11130 * lib/bitset.h (bitset_set, bitset_reset, bitset_test): Likewise.
11131 * lib/bitset_stats.c (bitset_log_histogram_print,
11132 bitset_percent_histogram_print, bitset_stats_and,
11133 bitset_stats_and_cmp, bitset_stats_and_or,
11134 bitset_stats_and_or_cmp, bitset_stats_andn, bitset_stats_andn_cmp,
11135 bitset_stats_andn_or, bitset_stats_andn_or_cmp, bitset_stats_copy,
11136 bitset_stats_count, bitset_stats_disable, bitset_stats_disjoint_p,
11137 bitset_stats_dump, bitset_stats_empty_p, bitset_stats_enable,
11138 bitset_stats_equal_p, bitset_stats_free, bitset_stats_init,
11139 bitset_stats_list, bitset_stats_list_reverse, bitset_stats_not,
11140 bitset_stats_ones, bitset_stats_or, bitset_stats_or_and,
11141 bitset_stats_or_and_cmp, bitset_stats_or_cmp, bitset_stats_print,
11142 bitset_stats_print_1, bitset_stats_read, bitset_stats_reset,
11143 bitset_stats_set, bitset_stats_size, bitset_stats_subset_p,
11144 bitset_stats_test, bitset_stats_toggle, bitset_stats_type_get,
11145 bitset_stats_write, bitset_stats_xor, bitset_stats_xor_cmp,
11146 bitset_stats_zero): Likewise.
11147 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
11148 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
11149 bitsetv_dump, debug_bitsetv): Likewise.
11150 * lib/ebitset.c (ebitset_and, ebitset_and_cmp, ebitset_andn,
11151 ebitset_andn_cmp, ebitset_bytes, ebitset_copy, ebitset_copy_,
11152 ebitset_copy_cmp, ebitset_disjoint_p, ebitset_elt_add,
11153 ebitset_elt_alloc, ebitset_elt_calloc, ebitset_elt_find,
11154 ebitset_elt_free, ebitset_elt_last, ebitset_elt_remove,
11155 ebitset_elt_zero_p, ebitset_elts_grow, ebitset_empty_p,
11156 ebitset_equal_p, ebitset_free, ebitset_init, ebitset_list,
11157 ebitset_list_reverse, ebitset_not, ebitset_ones, ebitset_op3_cmp,
11158 ebitset_or, ebitset_or_cmp, ebitset_release_memory, ebitset_reset,
11159 ebitset_set, ebitset_size, ebitset_subset_p, ebitset_test,
11160 ebitset_weed, ebitset_xor, ebitset_xor_cmp, ebitset_zero):
11161 Likewise.
11162 * lib/lbitset.c (debug_lbitset, lbitset_and, lbitset_and_cmp,
11163 lbitset_andn, lbitset_andn_cmp, lbitset_bytes, lbitset_copy,
11164 lbitset_copy_cmp, lbitset_disjoint_p, lbitset_elt_alloc,
11165 lbitset_elt_calloc, lbitset_elt_find, lbitset_elt_free,
11166 lbitset_elt_link, lbitset_elt_unlink, lbitset_elt_zero_p,
11167 lbitset_empty_p, lbitset_equal_p, lbitset_free, lbitset_init,
11168 lbitset_list, lbitset_list_reverse, lbitset_not, lbitset_ones,
11169 lbitset_op3_cmp, lbitset_or, lbitset_or_cmp, lbitset_prune,
11170 lbitset_release_memory, lbitset_reset, lbitset_set, lbitset_size,
11171 lbitset_subset_p, lbitset_test, lbitset_weed, lbitset_xor,
11172 lbitset_xor_cmp, lbitset_zero): Likewise.
11173
11174 2002-10-14 Akim Demaille <akim@epita.fr>
11175
11176 Version 1.75.
11177
11178 2002-10-14 Akim Demaille <akim@epita.fr>
11179
11180 * tests/Makefile.am (maintainer-check-posix): New.
11181
11182 2002-10-14 Akim Demaille <akim@epita.fr>
11183
11184 * data/glr.c [YYDEBUG] (YYLEFTMOST_STATE): Initialize the yyloc
11185 member.
11186
11187 2002-10-14 Akim Demaille <akim@epita.fr>
11188
11189 * src/tables.c (table_ninf_remap): base -> tab.
11190 Reported by Matt Rosing.
11191
11192 2002-10-14 Paul Eggert <eggert@twinsun.com>
11193
11194 * tests/action.at, tests/calc.at, tests/conflicts.at,
11195 tests/cxx-type.at, tests/headers.at, tests/input.at,
11196 tests/regression.at, tests/synclines.at, tests/torture.at:
11197 Say "bison -o foo.c foo.y", not "bison foo.y -o foo.c",
11198 so that the tests still work even if POSIXLY_CORRECT is set.
11199 * doc/bison.texinfo (Rpcalc Compile, Invocation): Likewise.
11200
11201 * data/c.m4 (b4_int_type): Use yysigned_char instead of signed char,
11202 for portability to K&R hosts. Fix typo: signed char is guaranteed
11203 only to 127, not to 128.
11204 * data/glr.c (yysigned_char): New type.
11205 * data/yacc.c (yysigned_char): Likewise.
11206 * tests/regression.at (Web2c Actions): signed char -> yysigned_char.
11207
11208 2002-10-13 Paul Eggert <eggert@twinsun.com>
11209
11210 * data/yacc.c (yyparse): Rewrite to avoid "comparison is always
11211 true due to limited range of data type" warning from GCC.
11212
11213 * data/c.m4 (b4_token_defines): Protect against double-inclusion
11214 by wrapping enum yytokentype's definition inside #ifndef
11215 YYTOKENTYPE. This undoes a bug I introduced on 2002-10-12.
11216
11217 2002-10-13 Akim Demaille <akim@epita.fr>
11218
11219 * data/glr.c (yyglrShiftDefer, yyaddDeferredAction, yydoAction):
11220 Un yy- yyrhs to avoid the name clash with the global YYRHS.
11221
11222 2002-10-13 Akim Demaille <akim@epita.fr>
11223
11224 * Makefile.maint: Update from Autoconf 2.54.
11225 * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Remove, shipped with 2.54.
11226
11227 2002-10-13 Akim Demaille <akim@epita.fr>
11228
11229 * src/print.c (print_state): Separate the list of solved conflicts
11230 from the other items.
11231 * tests/conflicts.at (Resolved SR Conflicts): Adjust.
11232
11233 2002-10-13 Akim Demaille <akim@epita.fr>
11234
11235 Let nondeterministic skeletons be usable with deterministic
11236 tables.
11237
11238 With the patch, GAWK compiled by GCC without -O2 passes its test
11239 suite using a GLR parser driven by LALR tables. It fails with -O2
11240 because `struct stat' gives two different answers on my machine:
11241 88 (definition of an auto var) and later 96 (memset on this var).
11242 Hence the stack is badly corrumpted. The headers inclusion is to
11243 blame: if I move the awk.h inclusion before GLR's system header
11244 inclusion, the two struct stat have the same size.
11245
11246 * src/tables.c (pack_table): Always create conflict_table.
11247 (token_actions): Always create conflict_list.
11248 * data/glr.c (YYFLAG): Remove, unused.
11249
11250 2002-10-13 Akim Demaille <akim@epita.fr>
11251
11252 * configure.ac (AC_GNU_SOURCE): Use it instead of hand written code.
11253 (O0FLAGS): New.
11254 (VALGRIND, GXX): New.
11255 * tests/atlocal.in (CFLAGS): Use O0FLAGS.
11256 * tests/bison.in: Run $PREBISON a pre-command.
11257 * tests/Makefile.am (maintainer-check, maintainer-check-valgrind)
11258 (maintainer-check-g++): New.
11259 * Makefile.am (maintainer-check): New.
11260
11261 2002-10-13 Akim Demaille <akim@epita.fr>
11262
11263 * data/glr.c: Formatting changes.
11264 Tweak some trace messages to match yacc.c's.
11265
11266 2002-10-13 Akim Demaille <akim@epita.fr>
11267
11268 GLR parsers sometimes raise parse errors instead of performing the
11269 default reduction.
11270 Reported by Charles-Henry de Boysson.
11271
11272 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Don't
11273 check the length of the traces when %glr.
11274 (_AT_CHECK_CALC_ERROR): Also skip `^Stack' lines, coming from
11275 GLR's traces.
11276 (AT_CHECK_CALC_LALR, AT_CHECK_CALC_GLR): New.
11277 Test GLR parsers.
11278 * data/glr.c (YYLEFTMOST_STATE): Fix its value.
11279 (yyltype): Remove the yy prefix from the member names.
11280 (yytable): Complete its comment.
11281 (yygetLRActions): Map error action number from YYTABLE from
11282 YYTABLE_NINF to 0.
11283 (yyisErrorAction): No longer compare YYACTION to YYPACT_NINF
11284 (which was a bug: it should have been YYTABEL_NINF, and yet it was
11285 not satisfying as we could compare an YYACTION computed from
11286 YYDEFACT to YYTABLE_NINF although they are unrelated): 0 is the
11287 only value for error actions.
11288 (yyreportParseError): In verbose parse error messages, don't issue
11289 `error' in the list of expected tokens.
11290 * data/yacc.c (yyparse) <yybackup>: Rewrite the decoding of the
11291 next action to perform to match glr.c's decoding.
11292 (yytable): Complete its comment.
11293
11294 2002-10-13 Paul Eggert <eggert@twinsun.com>
11295
11296 Fix problem reported by Henrik Grubbstroem in
11297 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00098.html>:
11298 "nonterm: { $$ = 123; } { $$ = $1; };" was wrongly rejected,
11299 because the Bison parser reads the second action before reducing
11300 the first one.
11301 * src/scan-gram.l (rule_length): New static var.
11302 Use it to keep track of the rule length in the scanner, since
11303 we can't expect the parser to be in lock-step sync with the scanner.
11304 (handle_action_dollar, handle_action_at): Use this var.
11305 * tests/actions.at (Exotic Dollars): Test for the problem.
11306
11307 2002-10-12 Paul Eggert <eggert@twinsun.com>
11308
11309 * lib/timevar.c [! IN_GCC && HAVE_SYS_TIME_H]: Include <sys/time.h>.
11310 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): Check for <sys/time.h>.
11311 Include <sys/time.h> when checking for clock_t and struct tms.
11312 Use same include order as source.
11313 This is for the SunOS 4.1.4 porting bug reported by Peter Klein in
11314 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00016.html>.
11315
11316 * lib/timevar.c: Update copyright date and clarify comments.
11317 (get_time) [IN_GCC]: Keep the GCC version for reference.
11318
11319 * lib/timevar.c, lib/timevar.h, lib/timevar.def: Import
11320 GCC version as of today, then merge Bison's changes.
11321 Change "GCC" to "Bison" in copyright notice. timevar.def's
11322 author is Akim, so change that too.
11323
11324 * src/reader.c (grammar_current_rule_check):
11325 Don't worry about the default action if $$ is untyped.
11326 Prevents bogus warnings reported by Jim Gifford in
11327 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00015.html>.
11328
11329 * data/c.m4 (b4_token_enum): Do not define YYTOKENTYPE.
11330 * data/glr.c, data/lalr1.cc, data/yacc.c:
11331 Output token definitions before the first part of user declarations.
11332 Fixes compatibility problem reported by Jim Gifford for kbd in
11333 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00014.html>.
11334
11335 2002-10-11 Paul Eggert <eggert@twinsun.com>
11336
11337 * data/yacc.c (yyreport_parse_error): Remove, putting its body into...
11338 (yyparse): here. This undoes some of the 2002-07-25 change.
11339 Compatibility problem reported by Ralf S. Engelschall with
11340 OSSP cfg <http://www.ossp.org/pkg/lib/cfg/>.
11341
11342 2002-10-11 Akim Demaille <akim@epita.fr>
11343
11344 * tests/regression.at Characters Escapes): New.
11345 * src/scan-gram.l (SC_ESCAPED_CHARACTER): Accept \' in strings and
11346 characters.
11347 Reported by Jan Nieuwenhuizen.
11348
11349 2002-10-11 Akim Demaille <akim@epita.fr>
11350
11351 * po/id.po: New.
11352
11353 2002-10-10 Paul Eggert <eggert@twinsun.com>
11354
11355 Portability fixes for bitsets; this also avoids several GCC
11356 warnings.
11357
11358 * lib/abitset.c: Include <stddef.h>, for offsetof.
11359 * lib/lbitset.c: Likewise.
11360
11361 * lib/abitset.c (abitset_bytes): Return a size that is aligned
11362 properly for vectors of objects. Do not assume that adding a
11363 header size to a multiple of a word size yields a value that is
11364 properly aligned for the whole union.
11365 * lib/bitsetv.c (bitsetv_alloc): Likewise.
11366
11367 * lib/bitset_stats.c (bitset_stats_bytes): Adjust to new,
11368 unique names for structures.
11369 * lib/ebitset.c (ebitset_bytes): Likewise.
11370 * lib/lbitset.c (lbitset_bytes): Likewise.
11371
11372 * lib/abitset.c (abitset_ones, abitset_zero, abitset_empty_p,
11373 abitset_copy1, abitset_not, abitset_equal_p, abitset_subset_p,
11374 abitset_disjoint_p, abitset_and, abitset_and_cmp, abitset_andn,
11375 abitset_andn_cmp, abitset_or, abitset_or_cmp, abitset_xor,
11376 abitset_xor_cmp, abitset_and_or, abitset_and_or_cmp,
11377 abitset_andn_or, abitset_andn_or_cmp, abitset_or_and,
11378 abitset_or_and_cmp, abitset_copy): Supply prototype decls,
11379 to improve the type-checking that GCC can do.
11380 * lib/bitset.c (bitset_op4_cmp): Likewise.
11381 * lib/bitset_stats.c (bitset_stats_count,
11382 bitset_stats_empty_p, bitset_stats_ones, bitset_stats_zero,
11383 bitset_stats_copy, bitset_stats_disjoint_p,
11384 bitset_stats_equal_p, bitset_stats_not, bitset_stats_subset_p,
11385 bitset_stats_and, bitset_stats_and_cmp, bitset_stats_andn,
11386 bitset_stats_andn_cmp, bitset_stats_or, bitset_stats_or_cmp,
11387 bitset_stats_xor, bitset_stats_xor_cmp, bitset_stats_and_or,
11388 bitset_stats_and_or_cmp, bitset_stats_andn_or,
11389 bitset_stats_andn_or_cmp, bitset_stats_or_and,
11390 bitset_stats_or_and_cmp): Likewise.
11391 * lib/lbitset.c (lbitset_and, lbitset_and_cmp, lbitset_andn,
11392 lbitset_andn_cmp, lbitset_or, lbitset_or_cmp, lbitset_xor,
11393 lbitset_xor_cmp, lbitset_empty_p, lbitset_ones, lbitset_not,
11394 lbitset_subset_p, lbitset_disjoint_p, debug_lbitset): Likewise.
11395
11396 * lib/abitset.h: Include bitset.h, not bbitset.h.
11397 * lib/ebitset.h: Likewise.
11398 * lib/lbitset.h: Likewise.
11399
11400 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): New types.
11401 All instances of parameters of type enum bitset_opts are now of
11402 type enum_bitset_opts, to conform to the C Standard, and similarly
11403 for enum_bitset_type.
11404 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
11405 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
11406
11407 Do not use "struct bitset_struct" to mean different things in
11408 different modules. Not only is this confusing, it violates
11409 the C Standard, which requires that structure types in different
11410 modules must be compatible if one is to be passed to the other.
11411 * lib/bbitset.h (bitset): Now points to a union, not to a struct.
11412 All instances of "struct bitset_struct *" replaced with "bitset".
11413 * lib/bitset.h (struct bitset_struct): Remove, replacing with....
11414 (union bitset_union, struct abitset_struct, struct ebitset_struct,
11415 struct lbitset_struct, struct bitset_stats_struct): New types.
11416 All uses of struct bitset_struct changed to union bitset_union,
11417 etc.
11418 * lib/abitset.c (struct abitset_struct, abitset,
11419 struct bitset_struct): Remove.
11420 * lib/bitset_stats.c (struct bitset_stats_struct, bitset_stats,
11421 struct bitset_struct): Remove.
11422 * lib/ebitset.c (struct ebitset_struct, ebitset, struct
11423 bitset_struct): Remove.
11424 * lib/lbitset.c (struct lbitset_struct, lbitset, bitset_struct):
11425 Likewise.
11426
11427 Do not call a function of type T using a call that assumes the
11428 function is of a different type U. Standard C requires that a
11429 function must be called with a type that is compatible with its
11430 definition.
11431 * lib/bbitset.h (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
11432 New decls.
11433 * lib/bitset.c (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
11434 New functions.
11435 * lib/ebitset.c (PFV): Remove.
11436 * lib/lbitset.c (PFV): Likewise.
11437 * lib/ebitset.c (ebitset_and, ebitset_andn, ebitset_or,
11438 ebitset_xor, ebitset_copy, ebitset_ones, ebitset_empty_p): New
11439 decls.
11440 (ebitset_and, ebitset_andn, ebitset_or, ebitset_xor): New functions.
11441 (ebitset_vtable): Use them.
11442 * lib/lbitset.c (lbitset_and, lbitset_andn, lbitset_or,
11443 lbitset_xor): New functions.
11444 (lbitset_vtable): Use them.
11445
11446 * lib/bitset.h (bitset_next, bitset_prev, bitset_only_set_p):
11447 Declare.
11448
11449 * lib/bitsetv.c (bitsetv_alloc): Add a cast to (void *) to avoid a
11450 GCC warning.
11451 * lib/lbitset.c (LBITSET_CURRENT1): Likewise.
11452 Use offsetof, for simplicity.
11453
11454 2002-10-06 Paul Eggert <eggert@twinsun.com>
11455
11456 * lib/bitset.h (bitset_reset): Do not assume that bitset_word is
11457 the same width as int. This reapplies a hunk of the 2002-08-12 patch
11458 <http://lists.gnu.org/archive/html/bison-patches/2002-08/msg00007.html>,
11459 which was inadvertently undone by the 2002-09-30 patch.
11460 * lib/lbitset.c (debug_lbitset): Do not assume that bitset_word is
11461 the same width as int.
11462
11463 2002-10-04 Paul Eggert <eggert@twinsun.com>
11464
11465 Version 1.50.
11466
11467 * configure.ac (AC_INIT), NEWS: Increment version number.
11468
11469 * doc/bison.texinfo: Minor spelling, grammar, and white space
11470 fixes.
11471 (Symbols): Mention that any negative value returned from yylex
11472 signifies end-of-input. Warn about negative chars. Mention
11473 the portable Standard C character set.
11474
11475 The GNU coding standard says CFLAGS and YFLAGS are reserved
11476 for the installer to set.
11477 * lib/Makefile.am (AM_CFLAGS): Renamed from CFLAGS.
11478 * src/Makefile.am (AM_CFLAGS): Likewise.
11479 (AM_YFLAGS): Renamed from YFLAGS.
11480
11481 Fix some MAX and MIN problems.
11482 * src/gram.h (ITEM_NUMBER_MIN): MIN_MAX -> INT_MIN.
11483 * src/lalr.h (GOTO_NUMBER_MAX): INT_MAX -> SHRT_MAX.
11484 * src/symtab.h (SYMBOL_NUMBER_MAX): New macro.
11485 * src/reader.c (reader): Use it.
11486
11487 * tests/regression.at (Braces parsing): Use grep, not fgrep, as
11488 POSIX 1003.1-2001 has removed fgrep.
11489
11490 2002-10-04 Michael Hayes <m.hayes@elec.canterbury.ac.nz>
11491
11492 * lib/bbitset.h (BITSET_WINDEX_MAX): Redefine so that it cannot be
11493 interpreted as signed.
11494 * lib/ebitset.c (ebitset_list): Fix bug.
11495
11496 2002-10-01 Paul Eggert <eggert@twinsun.com>
11497
11498 More fixes for 64-bit hosts and large bitsets.
11499
11500 * lib/abitset.c (struct abitset_struct.n_bits, abitset_small_list,
11501 abitset_size, abitset_list, abitset_list_reverse, abitset_list):
11502 Use bitset_bindex, not int or unsigned int or size_t, to count bits.
11503 * lib/bbitset.h (struct bitset_vtable.size, struct bitset_vtable.count,
11504 struct bitset_vtable.list, struct bitset_vtable.list_reverse,
11505 bitset_count_, bitset_next, bitset_prev, bitset_first, bitset_last,
11506 bitset_count_): Likewise.
11507 * lib/bitset.h (bitset_iterator.num, bitset_iterator.i,
11508 bitset_first, bitset_last): Likewise.
11509 * lib/bitset_stats.c (bitset_stats_size, bitset_stats_list,
11510 bitset_stats_list_reverse, bitset_stats_size,
11511 bitset_stats_count, bitset_stats_list, bitset_stat_list_reverse):
11512 Likewise.
11513 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
11514 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
11515 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
11516 bitsetv_reflexive_transitive_closure): Likewise.
11517 * lib/bitsetv.h (bitsetv_alloc, bitsetv_create): Likewise.
11518 * lib/ebitset.c (ebitset_size, ebitset_list, ebitset_list_reverse):
11519 Likewise.
11520 * lib/lbitset.c (lbitset_size, lbitset_list, lbitset_list_merge):
11521 Likewise.
11522
11523 * lib/abitset.c (abitset_ones, abitset_zero, abitset_bytes):
11524 Use size_t, not unsigned int, to count bytes.
11525 * lib/abitset.h (abitset_bytes): Likewise.
11526 * lib/bitset.c (bitset_bytes, bitset_alloc, bitset_obstack_alloc):
11527 Likewise.
11528 * lib/bitset.h (bitset_bytes): Likewise.
11529 * lib/bitset_stats.c (bitset_stats_bytes, bitset_stats_init): Likewise.
11530 * lib/bitset_stats.h (bitset_stats_bytes): Likewise.
11531 * lib/bitsetv.c (bitsetv_alloc): Likewise.
11532 * lib/ebitset.c (ebitset_bytes): Likewise.
11533 * lib/ebitset.h (ebitset_bytes): Likewise.
11534 * lib/lbitset.c (lbitset_bytes): Likewise.
11535 * lib/lbitset.h (lbitset_bytes): Likewise.
11536
11537 * lib/abitset.c (abitset_empty_p, abitset_not, abitset_equal_p,
11538 abitset_subset_p, abitset_disjoint_p, abitset_and,
11539 abitset_and_cmp, abitset_andn, abitset_andn_cmp, abitset_or,
11540 abitset_or_cmp, abitset_xor, abitset_xor_cmp, abitset_and_or,
11541 abitset_and_or_cmp, abitset_andn_or, abitset_andn_or_cmp,
11542 abitset_or_and, abitset_or_and_cmp):
11543 Use bitset_windex instead of unsigned int.
11544 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
11545 * lib/ebitset.c (struct ebitset_struct.size, ebitset_elts_grow,
11546 ebitset_elt_add, ebitset_elt_remove, ebitset_weed,
11547 ebitset_elt_find, ebitset_list_reverse, ebitset_list, ebitset_init):
11548 Likewise.
11549 * lib/lbitset.c (lbitset_ones, lbitset_not): Likewise.
11550
11551 * lib/bitset.c (bitset_print):
11552 Use proper printf formats for widths of integer types.
11553 * lib/bitset_stats.c (bitset_percent_histogram_print,
11554 bitset_log_histogram_print, bitset_stats_print_1): Likewise.
11555 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
11556 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
11557 * lib/lbitset.c (lbitset_bytes): Likewise.
11558
11559 * lib/bbitset.h (BITSET_BINDEX_MAX, BITSET_WINDEX_MAX,
11560 BITSET_SIZE_MAX): New macros.
11561 (BITSET_INDEX_MAX): Remove. It wasn't right, since it assumed that
11562 sizeof (bitset_word) == sizeof (bitset_windex). All uses changed
11563 to BITSET_WINDEX_MAX.
11564
11565 * lib/bitset.c (bitset_next, bitset_prev, bitset_first,
11566 bitset_last): Return BITSET_BINDEX_MAX (not -1) for no value,
11567 since we now return the bitset_bindex type (not int).
11568
11569 * lib/bitsetv.c (bitsetv_alloc): Check for arithmetic overflow
11570 when computing sizes.
11571 * lib/ebitset.c (ebitset_elts_grow): Likewise.
11572
11573 * lib/lbitset.c (lbitset_elt_find): Simplify windex calculation
11574 and avoid cast to unsigned.
11575
11576 2002-09-30 Akim Demaille <akim@epita.fr>
11577
11578 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
11579 * lib/bitset_stats.c, lib/bitsetv.c, lib/ebitset.c, lib/lbitset.c:
11580 Updates from Michael Hayes.
11581
11582 2002-09-30 Art Haas <ahaas@neosoft.com>
11583
11584 * configure.ac: Update AC_OUTPUT and AM_CONFIG_HEADER
11585 invocations.
11586 * tests/cxx-type.at (declarator): Don't rely on NDEBUG being not
11587 defined.
11588
11589 2002-09-27 Akim Demaille <akim@epita.fr>
11590
11591 Version 1.49c.
11592
11593 2002-09-27 Akim Demaille <akim@epita.fr>
11594
11595 * configure.ac (AM_INIT_AUTOMAKE): We _need_ 1.7.
11596 (Because of AC_LIBSOURCE).
11597
11598 2002-09-27 Akim Demaille <akim@epita.fr>
11599
11600 Playing with Autoscan.
11601
11602 * configure.ac: Remove the old LIBOBJ tweaks.
11603 (AC_REPLACE_FUNCS): Add strrchr and strtol.
11604 * lib/strrchr.c: New.
11605 * lib/strtol.c: New, from the Coreutils 4.5.1.
11606
11607 2002-09-27 Akim Demaille <akim@epita.fr>
11608
11609 Playing with Autoscan.
11610
11611 * m4/prereq.m4 (jm_PREREQ_ARGMATCH, jm_FUNC_ARGMATCH): New.
11612 * lib/Makefile.am (libbison_a_SOURCES): No longer include
11613 argmatch.c and argmatch.h, since they are AC_LIBSOURCE'd.
11614 * lib/strcasecmp.c, lib/strncasecmp.c, lib/memcmp.c: New, from the
11615 Coreutils 4.5.1.
11616
11617 2002-09-24 Akim Demaille <akim@epita.fr>
11618
11619 * doc/bison.texinfo (Stack Overflow): xref to Recursion.
11620 (Frequently Asked Questions, Parser Stack Overflow): New.
11621
11622 2002-09-13 Akim Demaille <akim@epita.fr>
11623
11624 Playing with autoscan.
11625
11626 * src/reader.c (get_merge_function): Use xstrdup, not strdup.
11627 * src/files.c (skeleton_find): Remove, unused.
11628 * m4/memcmp.m4: New, from the Coreutils 4.5.1.
11629 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Run jm_FUNC_MEMCMP.
11630
11631 2002-09-13 Akim Demaille <akim@epita.fr>
11632
11633 * configure.ac (AM_INIT_AUTOMAKE): Require Automake 1.6.3.
11634 * Makefile.am (AUTOMAKE_OPTIONS): Don't.
11635
11636 2002-09-13 Akim Demaille <akim@epita.fr>
11637
11638 * configure.ac: Require 2.54.
11639 s/jm_FUNC_MALLOC/AC_FUNC_MALLOC/.
11640 s/jm_FUNC_REALLOC/AC_FUNC_REALLOC/.
11641 * m4/c-bs-a.m4, m4/malloc.m4, m4/mbstate_t.m4, m4/realloc.m4:
11642 Remove, provided by Autoconf macros.
11643
11644 2002-09-12 Akim Demaille <akim@epita.fr>
11645
11646 * m4/prereq.m4: Update, from Coreutils 4.5.1.
11647
11648 2002-09-12 Akim Demaille <akim@epita.fr>
11649
11650 * m4/prereq.m4: Update, from Fileutils 4.1.5.
11651 * configure.ac (jm_PREREQ_TEMPNAME): Invoke it.
11652 Reported by Martin Mokrejs.
11653
11654 2002-09-10 Akim Demaille <akim@epita.fr>
11655
11656 * src/parse-gram.y: Associate a human readable string to each
11657 token type.
11658 * tests/regression.at (Invalid inputs): Adjust.
11659
11660 2002-09-10 Gary V. Vaughan <gary@gnu.org>
11661
11662 * tests/Makefile.am ($(srcdir)/package.m4): Bison now ships
11663 with an Autoconf-2.5x style configure.ac.
11664
11665 2002-09-06 Paul Eggert <eggert@twinsun.com>
11666
11667 * doc/bison.texinfo (Conditions): Make explicit that the GPL
11668 exception applies only to yacc.c. This is a modification of a
11669 patch originally suggested by Akim Demaille.
11670
11671 2002-09-06 Akim Demaille <akim@epita.fr>
11672
11673 * data/c.m4 (b4_copyright): Move the GPL exception comment from
11674 here to...
11675 * data/yacc.c: here.
11676
11677 * data/lalr1.cc (struct yyltype): Don't define it, since we use
11678 LocationType.
11679 (b4_ltype): Default to yy::Location from location.hh.
11680
11681 2002-09-04 Jim Meyering <jim@meyering.net>
11682
11683 * data/yacc.c: Guard the declaration of yytoknum also with
11684 `#ifdef YYPRINT', so it is declared only when used.
11685
11686 2002-09-04 Akim Demaille <akim@epita.fr>
11687
11688 * configure.in: Rename as...
11689 * configure.ac: this.
11690 Bump to 1.49c.
11691
11692 2002-09-04 Akim Demaille <akim@epita.fr>
11693
11694 * src/assoc.c, src/closure.c, src/gram.c, src/injections.c,
11695 * src/lalr.c, src/LR0.c, src/relation.c, src/tables.c: Don't
11696 translate maintainer only messages.
11697
11698 2002-08-12 Paul Eggert <eggert@twinsun.com>
11699
11700 Version 1.49b.
11701
11702 * Makefile.am (SUBDIRS): Remove intl.
11703 (DISTCLEANFILES): Remove.
11704 * NEWS: Mention that GNU M4 is now required. Clarify what is
11705 meant by "larger grammars". Mention the pt_BR translation.
11706 * configure.in (AC_CHECK_DECLS): Add getenv, getopt.
11707 (AM_GNU_GETTEXT_VERSION): New macro, replacing GETTEXT_VERSION var.
11708 Bump version from 0.11.2 to 0.11.5.
11709 (BISON_PREREQ_STAGE): Remove.
11710 (AM_GNU_GETTEXT): Use external gettext.
11711 (AC_OUTPUT): Remove intl/Makefile.
11712
11713 * config/depcomp, config/install-sh: Sync with Automake 1.6.3.
11714
11715 * data/glr.c: Include string.h, for strlen.
11716 (yyreportParseError): Use size_t for yysize.
11717 (yy_yypstack): No longer nested inside yypstates, as nested
11718 functions are not portable. Do not assume size_t is the
11719 same width as int.
11720 (yypstates): Do not assume that ptrdiff_t is the same width
11721 as int, and similarly for yyposn and YYINDEX.
11722
11723 * data/yacc.c: Fix comment about `$$ = $1': it can copy garbage.
11724
11725 * lib/Makefile.am (INCLUDES): Do not include from the intl
11726 directory, which has been removed.
11727 * src/Makefile.am (INCLUDES): Likewise.
11728
11729 * lib/Makefile.am (libbison_a_SOURCES): Add unlocked-io.h.
11730 (bitsets_sources, additional_bitsets_sources, timevars_sources):
11731 New vars.
11732
11733 * lib/Makefile.am (libbison_a_SOURCES): Avoid +=, a GNU make extension.
11734 * tests/Makefile.am (EXTRA_DIST): Likewise.
11735
11736 * lib/abitset.c (abitset_reverse_list, ebitset_reverse_list):
11737 Do not assume that bitset_windex is the same width as unsigned.
11738
11739 * lib/abitset.c (abitset_unused_clear): Do not assume that
11740 bitset_word is the same width as int.
11741 * lib/bbitset.h (BITSET_INDEX_MAX, BITSET_MSB): Likewise.
11742 * lib/bitset.h (bitset_set, bitset_reset): Likewise.
11743 * lib/bitset_stats.c (bitset_stats_set, bitset_stats_reset): Likewise.
11744 * lib/ebitset.c (ebitset_set, ebitset_reset): Likewise.
11745 * lib/lbitset.c (lbitset_set, lbitset_reset): Likewise.
11746
11747 * lib/abitset.c (abitset_op1): Use -1, not ~0, as memset arg (for
11748 portability to one's complement hosts!).
11749 * lib/ebitset.c (ebitset_op1): Likewise.
11750 * lib/lbitset.c (lbitset_op1): Likewise.
11751
11752 * lib/argmatch.c, lib/quotearg.c, quotearg.h: Sync with GNU tar.
11753 * lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
11754 lib/hash.c, lib/hash.h, lib/strnlen.c, lib/xmalloc.c:
11755 Sync with fileutils.
11756 * lib/error.c, lib/getopt.c, lib/getopt.h, lib/getopt1.c,
11757 lib/gettext.h: Sync with diffutils.
11758
11759 * lib/memrchr.c, lib/mkstemp.c, lib/strchr.c, lib/strnlen.c,
11760 lib/strspn.c, lib/tempname.c: Use GPL, not LGPL.
11761
11762 * lib/obstack.c, lib/obstack.h: Sync with fileutils, except use
11763 PROTOTYPES to check for prototypes, and "defined __STDC__" to
11764 check for void *.
11765
11766 * lib/bbitset.h (BITSET_WORD_BITS): Now of type unsigned, not
11767 size_t; the old version tried to do this but casted improperly.
11768 (bitset_bindex, bitset_windex): Now size_t, not unsigned long.
11769 (bitset_test): Now returns int, not unsigned long.
11770
11771 * lib/bitset_stats.c: Include "gettext.h".
11772 (_): New macro.
11773 (bitset_stats_set, bitset_stats_reset, bitset_stats_test): Don't
11774 name locals "index", as it generates unnecessary warnings on some
11775 hosts that have an "index" function.
11776
11777 * lib/bitset_stats.c (bitset_stats_print_1, bitset_stats_print,
11778 bitset_stats_read, bitset_stats_write): Wrap strings in _() if
11779 they need translation.
11780 * src/LR0.c (state_list_append, new_itemsets, get_state,
11781 append_states, generate_states): Likewise.
11782 * src/assoc.c (assoc_to_string): Likewise.
11783 * src/closure.c (print_closure, set_firsts, closure): Likewise.
11784 * src/gram.c (grammar_dump): Likewise.
11785 * src/injections.c (injections_compute): Likewise.
11786 * src/lalr.c (lookaheads_print): Likewise.
11787 * src/relation.c (relation_transpose): Likewise.
11788 * src/scan-gram.l: Likewise.
11789 * src/tables.c (table_grow, pack_vector): Likewise.
11790
11791 * m4/Makefile.am (EXTRA_DIST): Remove codeset.m4,
11792 glibc21.m4, isc-posix.m4 lcmessage.m4, stage.m4.
11793 * m4/malloc.m4, m4/realloc.m4: Sync with diffutils.
11794 * m4/mbstate_t.m4: Sync with fileutils.
11795 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): AC_MBSTATE_T -> AC_TYPE_MBSTATE_T.
11796
11797 * po/LINGUAS: Add pt_BR.
11798 * po/POTFILES.in: Add src/assoc.c, src/closure.c, src/gram.c,
11799 src/main.c, src/relation.c, src/state.c, lib/bitset_stats.c,
11800 lib/timevar.c.
11801 Use src/parse-gram.y instead of src/parse-gram.c, as the gettext
11802 manual recommends.
11803 Similarly, use src/scan-gram.l instead of src/scan-gram.c.
11804
11805 * src/complain.c (strerror_r): Remove decl; not needed.
11806 (strerror): Use same pattern as ../lib/error.c.
11807
11808 * src/files.c, src/files.h (compute_header_macro): Remove; unused.
11809
11810 * src/gram.c (grammar_dump): Do not assume ptrdiff_t fits in int.
11811
11812 * src/main.c (main): Cast result of bindtextdomain and textdomain
11813 to void, to avoid a GCC warning when --disable-nls is in effect.
11814
11815 * src/scan-gram.l: Use strings rather than escapes when possible,
11816 to minimize the number of warnings from xgettext.
11817 (handle_action_dollar, handle_action_at): Don't use isdigit,
11818 as it mishandles negative chars and it may not work as expected
11819 outside the C locale.
11820
11821 * src/symtab.c (symbol_get): Don't cast LHS of an assignment;
11822 this is a GCC extension and is not portable to other compilers.
11823
11824 * src/system.h (alloca): Use same pattern as ../lib/error.c.
11825 Do not include <ctype.h>; no longer needed.
11826 Do not include <malloc.h>; no longer needed (and generates
11827 warnings on OpenBSD 3.0).
11828
11829 * tests/cxx-type.at (yylex): Do not pass signed char to isupper;
11830 it's not portable.
11831
11832 * tests/regression.at: Do not use 'cc -c input.c -o input';
11833 Sun C rejects this. Instead, use 'cc -c input.c -o input.o'.
11834
11835 * tests/synclines.at (AC_SYNCLINES_COMPILE): Accept any nonzero
11836 exit status as failure, not just exit status 1. Sun C exits
11837 with status 2 sometimes.
11838
11839 * tests/torture.at (AT_INCREASE_DATA_SIZE): New macro.
11840 Use it for the two large tests.
11841
11842 2002-08-02 Akim Demaille <akim@epita.fr>
11843
11844 * src/conflicts.c (conflicts_output): Don't output rules never
11845 reduced here, since anyway that computation doesn't work.
11846 * src/gram.h, src/gram.h (rule_filter_t, rule_useful_p)
11847 (rule_useless_p, rule_never_reduced_p): New.
11848 (grammar_rules_partial_print): Use a filter instead of a range.
11849 Display the title only if needed.
11850 (grammar_rules_print): Adjust.
11851 (grammar_rules_never_reduced_report): New.
11852 * src/tables.c (action_row): Move the computation of rules never
11853 reduced to...
11854 (token_actions): here.
11855 * src/main.c (main): Make the parser before making the report, so
11856 that rules never reduced are computed.
11857 Call grammar_rules_never_reduced_report.
11858 * src/print.c (print_results): Report rules never reduced.
11859 * tests/conflicts.at, tests/reduce.at: Adjust.
11860
11861 2002-08-01 Akim Demaille <akim@epita.fr>
11862
11863 Instead of attaching lookaheads and duplicating the rules being
11864 reduced by a state, attach the lookaheads to the reductions.
11865
11866 * src/state.h (state_t): Remove the `lookaheads',
11867 `lookaheads_rule' member.
11868 (reductions_t): Add a `lookaheads' member.
11869 Use a regular array for the `rules'.
11870 * src/state.c (reductions_new): Initialize the lookaheads member
11871 to 0.
11872 (state_rule_lookaheads_print): Adjust.
11873 * src/state.h, src/state.c (state_reductions_find): New.
11874 * src/conflicts.c (resolve_sr_conflict, set_conflicts)
11875 (count_rr_conflicts): Adjust.
11876 * src/lalr.c (LArule): Remove.
11877 (add_lookback_edge): Adjust.
11878 (state_lookaheads_count): New.
11879 (states_lookaheads_initialize): Merge into...
11880 (initialize_LA): this.
11881 (lalr_free): Adjust.
11882 * src/main.c (main): Don't free nullable and derives too early: it
11883 is used by --verbose.
11884 * src/print.c, src/print_graph.c, src/tables.c: Adjust.
11885
11886 2002-08-01 Akim Demaille <akim@epita.fr>
11887
11888 * src/derives.h, src/derives.c (derives): A `rule_t***' instead of
11889 `rule_number_t**'.
11890 (set_derives, free_derives): Rename as...
11891 (derives_compute, derives_free): this.
11892 Adjust all dependencies.
11893 * src/nullable.c (set_nullable, free_nullable): Rename as...
11894 (nullable_compute, nullable_free): these.
11895 (rule_list_t): Store rule_t *, not rule_number_t.
11896 * src/state.c (state_rule_lookaheads_print): Directly compare rule
11897 pointers, instead of their numbers.
11898 * src/main.c (main): Call nullable_free, and derives_free earlier,
11899 as they were lo longer used.
11900
11901 2002-08-01 Akim Demaille <akim@epita.fr>
11902
11903 * lib/timevar.c (get_time): Include children time.
11904 * src/lalr.h (LA, LArule): Don't export them: used with the
11905 state_t.
11906 * src/lalr.c (LA, LArule): Static.
11907 * src/lalr.h, src/lalr.c (lalr_free): New.
11908 * src/main.c (main): Call it.
11909 * src/tables.c (pack_vector): Check whether loc is >= to the
11910 table_size, not >.
11911 (pack_tables): Don't free froms, tos, conflict_tos, and pos...
11912 (tables_generate): do it, since that's also it which allocates
11913 them.
11914 Don't free LA and LArule, main does.
11915
11916 2002-07-31 Akim Demaille <akim@epita.fr>
11917
11918 Separate parser tables computation and output.
11919
11920 * src/output.c (nvectors, base_t, base, base_ninf, conflict_table)
11921 (conflict_list, conflict_list_cnt, table, check, table_ninf)
11922 (yydefgoto, yydefact, high): Move to...
11923 * src/tables.h, src/tables.c: here.
11924 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
11925 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
11926 (symbol_number_to_vector_number, nvectors, BASE_MAX, BASE_MIN)
11927 (froms, tos, conflict_tos, tally, width, action_t, ACTION_MAX)
11928 (ACTION_MIN, actrow, order, nentries, pos, conflrow)
11929 (conflict_list_free, table_size, lowzero, table_grow, conflict_row)
11930 (action_row, save_row, token_actions, save_column, default_goto)
11931 (goto_actions, sort_actions, matching_state, pack_vector)
11932 (table_ninf_remap, pack_table, prepare_actions): Move to...
11933 * src/tables.c: here.
11934 * src/tables.h, src/tables.c(tables_generate, tables_free): New.
11935 * src/output.c (token_actions, output_base, output_conflicts)
11936 (output_check): Merge into...
11937 (prepare_actions): this.
11938 (actions_output): Rename as...
11939 (user_actions_output): this.
11940 * src/main.c (main): Call tables_generate and tables_free.
11941
11942 2002-07-31 Akim Demaille <akim@epita.fr>
11943
11944 Steal GCC's --time-report support.
11945
11946 * lib/timevar.c, lib/timevar.h, lib/timevar.def: New,
11947 stolen/adjusted from GCC.
11948 * m4/stage.m4: Remove time related checks.
11949 * m4/timevar.m4: New.
11950 * configure.in: Adjust.
11951 * src/system.h: Adjust to using timevar.h.
11952 * src/getargs.h, src/getargs.c: Support trace_time for
11953 --trace=time.
11954 * src/main.c (stage): Remove.
11955 (main): Replace `stage' invocations with timevar calls.
11956 * src/output.c: Insert pertinent timevar calls.
11957
11958 2002-07-31 Akim Demaille <akim@epita.fr>
11959
11960 Let --trace have arguments.
11961
11962 * src/getargs.h (enum trace_e): New.
11963 * src/getargs.c (trace_args, trace_types, trace_argmatch): New.
11964 (long_options, short_options): --trace/-T takes an optional
11965 argument.
11966 Change all the uses of trace_flag to reflect the new flags.
11967 * tests/sets.at (Firsts, Nullable, Broken Closure): Use --trace=sets.
11968
11969 Strengthen `stage' portability.
11970
11971 * m4/stage.m4 (BISON_PREREQ_STAGE): New.
11972 * configure.in: Use it.
11973 Don't check for malloc.h and sys/times.h.
11974 * src/system.h: Include them when appropriate.
11975 * src/main.c (stage): Compile only when mallinfo, struct mallinfo,
11976 times and struct tms are available.
11977
11978 2002-07-30 Akim Demaille <akim@epita.fr>
11979
11980 In verbose parse error message, don't report `error' as an
11981 expected token.
11982 * tests/actions.at (Printers and Destructors): Adjust.
11983 * tests/calc.at (Calculator $1): Adjust.
11984 * data/yacc.c, data/glr.c, data/lalr1.c: When making the verbose
11985 error message, do not report the parser accepts the error token in
11986 that state.
11987
11988 2002-07-30 Akim Demaille <akim@epita.fr>
11989
11990 Normalize conflict related messages.
11991
11992 * src/complain.h, src/complain.c (warn, complain): New.
11993 * src/conflicts.c (conflicts_print): Use them.
11994 (conflict_report_yacc): New, extracted from...
11995 (conflicts_print): here.
11996 * tests/conflicts.at, tests/existing.at: Adjust.
11997
11998 2002-07-30 Akim Demaille <akim@epita.fr>
11999
12000 Report rules which are never reduced by the parser: those hidden
12001 by conflicts.
12002
12003 * src/LR0.c (save_reductions): Don't make the final state too
12004 different: save its reduction (accept) instead of having a state
12005 without any action (no shift or goto, no reduce).
12006 Note: the final state is now a ``regular'' state, i.e., the
12007 parsers now contain `reduce 0' as default reduction.
12008 Nevertheless, since they decide to `accept' when yystate =
12009 final_state, they still will not reduce rule 0.
12010 * src/print.c (print_actions, print_reduction): Adjust.
12011 * src/output.c (action_row): Track reduced rules.
12012 (token_actions): Report rules never reduced.
12013 * tests/conflicts.at, tests/regression.at: Adjust.
12014
12015 2002-07-30 Akim Demaille <akim@epita.fr>
12016
12017 `stage' was accidently included in a previous patch.
12018 Initiate its autoconfiscation.
12019
12020 * configure.in: Look for malloc.h and sys/times.h.
12021 * src/main.c (stage): Adjust.
12022 Report only when trace_flag.
12023
12024 2002-07-29 Akim Demaille <akim@epita.fr>
12025
12026 * src/state.h, src/state.c (transitions_t): Holds state_t*'s, not
12027 state_number_t.
12028 (errs_t): symbol_t*, not symbol_number_t.
12029 (reductions_t): rule_t*, not rule_number_t.
12030 (FOR_EACH_SHIFT): New.
12031 * src/LR0.c, src/conflicts.c, src/lalr.c, src/output.c
12032 * src/print.c, src/print_graph.c: Adjust.
12033
12034 2002-07-29 Akim Demaille <akim@epita.fr>
12035
12036 Use $accept and $end, as BYacc and BTYacc do, instead of $axiom and $.
12037
12038 * src/symtab.h, src/symtab.c (eoftoken, axiom): Rename as...
12039 (endtoken, accept): these.
12040 * src/reader.c (reader): Set endtoken's default tag to "$end".
12041 Set undeftoken's tag to "$undefined" instead of "$undefined.".
12042 * doc/bison.texinfo (Table of Symbols): Mention $accept and $end.
12043 Adjust.
12044
12045 2002-07-29 Akim Demaille <akim@epita.fr>
12046
12047 * src/reduce.c (reduce_grammar): When the language is empty,
12048 complain about the start symbol, not the axiom.
12049 Use its location.
12050 * tests/reduce.at (Empty Language): New.
12051
12052 2002-07-26 Akim Demaille <akim@epita.fr>
12053
12054 * src/reader.h, src/reader.c (gram_error): ... can't get
12055 yycontrol without making too strong assumptions on the parser
12056 itself.
12057 * src/output.c (prepare_tokens): Use the real 0th value of
12058 token_translations instead of `0'.
12059 * src/parse-gram.y (yyerror): Don't rely on yycontrol being
12060 visible here.
12061 * data/yacc.c (yyreport_parse_error): Rename yylocation as yylloc
12062 for the time being: %locations ought to provide it to yyerror.
12063
12064 2002-07-25 Akim Demaille <akim@epita.fr>
12065
12066 * src/output.c (prepare_tokens): Go up to ntokens, not ntokens + 1.
12067 * doc/bison.texinfo (Decl Summary): s/$illegal/$undefined./.
12068 * tests/regression.at (Web2c Actions): Adjust.
12069
12070 2002-07-25 Akim Demaille <akim@epita.fr>
12071
12072 Stop storing rules from 1 to nrules + 1.
12073
12074 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c, src/lalr.c
12075 * src/nullable.c, src/output.c, src/print.c, src/reader.c
12076 * src/reduce.c: Allocate and free from &rules[0], not &rules[1].
12077 Iterate from 0 to nrules.
12078 Use rule_number_as_item_number and item_number_as_rule_number.
12079 Adjust to `derive' now containing possibly 0.
12080 * src/gram.h (rule_number_as_item_number, item_number_as_rule_number):
12081 Handle the `- 1' part in rule numbers from/to item numbers.
12082 * src/conflicts.c (log_resolution): Fix the message which reversed
12083 shift and reduce.
12084 * src/output.c (action_row): Initialize default_rule to -1.
12085 (token_actions): Adjust.
12086 * tests/sets.at (Nullable, Firsts): Fix the previously bogus
12087 expected output.
12088 * tests/conflicts.at (Resolved SR Conflicts): Likewise.
12089
12090 2002-07-25 Akim Demaille <akim@epita.fr>
12091
12092 * data/c.m4 (b4_c_function, b4_c_ansi_args, b4_c_ansi_arg)
12093 (b4_c_knr_arg_names, b4_c_knr_arg_name, b4_c_knr_arg_decls)
12094 (b4_c_knr_arg_decl): New.
12095 * data/yacc.c: Use it to define yysymprint, yydestruct, and
12096 yyreport_parse_error.
12097
12098 2002-07-25 Akim Demaille <akim@epita.fr>
12099
12100 * data/yacc.c (yyreport_parse_error): New, extracted from...
12101 (yyparse): here.
12102 (yydestruct, yysymprint): Move above yyparse.
12103 Be K&R compliant.
12104
12105 2002-07-25 Akim Demaille <akim@epita.fr>
12106
12107 * data/c.m4 (b4_ints_in, b4_int_type, b4_int_type_for): New,
12108 replace...
12109 (b4_sint_type, b4_uint_type): these.
12110 * data/yacc.c, data/glr.c, data/lalr1.cc: Use b4_int_type_for.
12111 * tests/regression.at (Web2c Actions): Adjust.
12112
12113 2002-07-25 Akim Demaille <akim@epita.fr>
12114
12115 * src/gram.h (TIEM_NUMBER_MAX): New.
12116 (item_number_of_rule_number, rule_number_of_item_number): Rename
12117 as...
12118 (rule_number_as_item_number, item_number_as_rule_number): these.
12119 Adjust dependencies.
12120 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
12121 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
12122 (symbol_number_to_vector_number): New.
12123 (order): Of vector_number_t* type.
12124 (base_t, BASE_MAX, BASE_MIN): New.
12125 (froms, tos, width, pos, check): Of base_t type.
12126 (action_number_t, ACTION_MIN, ACTION_MAX): New.
12127 (actrow): Of action_number_t type.
12128 (conflrow): Of unsigned int type.
12129 (table_ninf, base_ninf): New.
12130 (GENERATE_MUSCLE_INSERT_TABLE): Also output the `*_min' value.
12131 (muscle_insert_int_table, muscle_insert_base_table)
12132 (muscle_insert_rule_number_table): New.
12133 (prepare_tokens): Output `toknum' as int_table.
12134 (action_row): Returns a rule_number_t.
12135 Use ACTION_MIN, not SHRT_MIN.
12136 (token_actions): yydefact is rule_number_t*.
12137 (table_ninf_remap): New.
12138 (pack_table): Use it for `base' and `table'.
12139 * data/yacc.c, data/glr.c, data/lalr1.cc (YYFLAG): Remove,
12140 replaced with...
12141 (YYPACT_NINF, YYTABLE_NINF): these.
12142 (yypact, yytable): Compute their types instead of hard-coded
12143 `short'.
12144 * tests/regression.at (Web2c Actions): Adjust.
12145
12146 2002-07-19 Akim Demaille <akim@epita.fr>
12147
12148 * src/scan-gram.l (id): Can start with an underscore.
12149
12150 2002-07-16 Akim Demaille <akim@epita.fr>
12151
12152 * src/assoc.c, src/asssoc.h (assoc_t, assoc_to_string): New.
12153 Adjust all former `associativity' dependencies.
12154 * src/symtab.c (symbol_new): Default associativity is `undef', not
12155 `right'.
12156 (symbol_check_alias_consistence): Adjust.
12157
12158 2002-07-09 Akim Demaille <akim@epita.fr>
12159
12160 * doc/bison.texinfo: Properly set the ``header'' part.
12161 Use @dircategory ``GNU programming tools'' as per Texinfo's
12162 documentation.
12163 Use @copying.
12164
12165 2002-07-09 Akim Demaille <akim@epita.fr>
12166
12167 * lib/quotearg.h: Protect against multiple inclusions.
12168 * src/location.h (location_t): Add a `file' member.
12169 (LOCATION_RESET, LOCATION_PRINT): Adjust.
12170 * src/complain.c (warn_at, complain_at, fatal_at): Drop
12171 `error_one_per_line' support.
12172
12173 2002-07-09 Akim Demaille <akim@epita.fr>
12174
12175 * src/complain.h, src/complain.c (warn, complain): Remove, unused.
12176 * src/reader.c (lineno): Remove.
12177 Adjust all dependencies.
12178 (get_merge_function): Take a location and use complain_at.
12179 * src/symtab.h, src/symtab.c (symbol_make_alias): Likewise.
12180 * tests/regression.at (Invalid inputs, Mixing %token styles):
12181 Adjust.
12182
12183 2002-07-09 Akim Demaille <akim@epita.fr>
12184
12185 * src/parse-gram.y (rules_or_grammar_declaration): Add an error
12186 recovery rule, and forbid extensions when --yacc.
12187 (gram_error): Use complain_at.
12188 * src/reader.c (reader): Exit if there were parse errors.
12189
12190 2002-07-09 Akim Demaille <akim@epita.fr>
12191
12192 * tests/synclines.at (AT_SYNCLINES_COMPILE): New.
12193 (AT_TEST_SYNCLINE): Adjust to unusual GCC outputs.
12194 Reported by R Blake <blakers@mac.com>.
12195
12196 2002-07-09 Akim Demaille <akim@epita.fr>
12197
12198 * data/yacc.c: Output the copyright notive in the header.
12199
12200 2002-07-03 Akim Demaille <akim@epita.fr>
12201
12202 * src/output.c (froms, tos): Are state_number_t.
12203 (save_column): sp, sp1, and sp2 are state_number_t.
12204 (prepare): Rename `final' as `final_state_number', `nnts' as
12205 `nterms_number', `nrules' as `rules_number', `nstates' as
12206 `states_number', and `ntokens' as `tokens_number'. Remove `nsym',
12207 unused.
12208 * data/yacc.c, data/glr.c, data/lalr1.cc: Adjust.
12209 * data/lalr1.cc (nsym_): Remove, unused.
12210
12211 2002-07-03 Akim Demaille <akim@epita.fr>
12212
12213 * src/lalr.h, src/lalr.c (goto_number_t): New.
12214 * src/lalr.c (goto_list_t): New.
12215 Propagate them.
12216 * src/nullable.c (rule_list_t): New.
12217 Propagate.
12218 * src/types.h: Remove.
12219
12220 2002-07-03 Akim Demaille <akim@epita.fr>
12221
12222 * src/closure.c (print_fderives): Use rule_rhs_print.
12223 * src/derives.c (print_derives): Use rule_rhs_print.
12224 (rule_list_t): New, replaces `shorts'.
12225 (set_derives): Add comments.
12226 * tests/sets.at (Nullable, Firsts): Adjust.
12227
12228 2002-07-03 Akim Demaille <akim@epita.fr>
12229
12230 * src/output.c (prepare_actions): Free `tally' and `width'.
12231 (prepare_actions): Allocate and free `order'.
12232 * src/symtab.c (symbols_free): Free `symbols'.
12233 * src/scan-gram.l (scanner_free): Clear Flex's scanners memory.
12234 * src/output.c (m4_invoke): Move to...
12235 * src/scan-skel.l: here.
12236 (<<EOF>>): Close yyout, and free its name.
12237
12238 2002-07-03 Akim Demaille <akim@epita.fr>
12239
12240 Fix some memory leaks, and fix a bug: state 0 was examined twice.
12241
12242 * src/LR0.c (new_state): Merge into...
12243 (state_list_append): this.
12244 (new_states): Merge into...
12245 (generate_states): here.
12246 (set_states): Don't ensure a proper `errs' state member here, do it...
12247 * src/conflicts.c (conflicts_solve): here.
12248 * src/state.h, src/state.c: Comment changes.
12249 (state_t): Rename member `shifts' as `transitions'.
12250 Adjust all dependencies.
12251 (errs_new): For consistency, also take the values as argument.
12252 (errs_dup): Remove.
12253 (state_errs_set): New.
12254 (state_reductions_set, state_transitions_set): Assert that no
12255 previous value was assigned.
12256 (state_free): New.
12257 (states_free): Use it.
12258 * src/conflicts.c (resolve_sr_conflict): Don't use an `errs_t' as
12259 temporary storage: use `errs' and `nerrs' as elsewhere.
12260 (set_conflicts): Allocate and free this `errs'.
12261
12262 2002-07-02 Akim Demaille <akim@epita.fr>
12263
12264 * lib/libiberty.h: New.
12265 * lib: Update the bitset implementation from upstream.
12266 * src/closure.c, src/lalr.c, src/output.c, src/print_graph.c,
12267 * src/state.c: Use BITSET_FOR_EACH, not BITSET_EXECUTE.
12268 * src/main.c: Adjust bitset stats calls.
12269
12270 2002-07-01 Paul Eggert <eggert@twinsun.com>
12271
12272 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>): Convert to unsigned
12273 char, so that negative chars don't collide with $.
12274
12275 2002-06-30 Akim Demaille <akim@epita.fr>
12276
12277 Have the GLR tests be `warning' checked, and fix the warnings.
12278
12279 * data/glr.c (YYFPRINTF): Always define it, not only when YYDEBUG
12280 (yyuserAction, yyreportAmbiguity): `Use' all the arguments.
12281 (yyremoveDeletes): `yyi' and `yyj' are size_t.
12282 Use YYFPRINTF when under if (YYDEBUG) to avoid empty `if' bodies.
12283 (yyaddDeferredAction): static.
12284 (yyglrReduce): yyi, yyk, amd yyposn are size_t.
12285 (yyreportParseError): yyprefix is const.
12286 yytokenp is used only when verbose.
12287 (yy__GNUC__): Replace with __GNUC__.
12288 (yypdumpstack): yyi is size_t.
12289 (yypreference): Un-yy local variables and arguments, to avoid
12290 clashes with `yyr1'. Anyway, we are not in the user name space.
12291 (yytname_size): be an int, as is compared with ints.
12292 * tests/testsuite.at (AT_COMPILE, AT_PARSER_CHECK): New.
12293 Use them.
12294 * tests/cxx-gram.at: Use quotation to protect $1.
12295 Use AT_COMPILE to enable warnings hunts.
12296 Prototype yylex and yyerror.
12297 `Use' argc.
12298 Include `string.h', not `strings.h'.
12299 Produce and prototype stmtMerge only when used.
12300 yylex takes a location.
12301
12302 2002-06-30 Akim Demaille <akim@epita.fr>
12303
12304 We spend a lot of time in quotearg, in particular when --verbose.
12305
12306 * src/symtab.c (symbol_get): Store a quoted version of the key.
12307 (symbol_tag_get, symbol_tag_get_n, symbol_tag_print): Remove.
12308 Adjust all callers.
12309
12310 2002-06-30 Akim Demaille <akim@epita.fr>
12311
12312 * src/state.h (reductions_t): Rename member `nreds' as num.
12313 (errs_t): Rename members `nerrs' and `errs' as `num' and `symbols'.
12314 * src/state.c (ERRS_ALLOC, REDUCTIONS_ALLOC): Use the correct types.
12315
12316 2002-06-30 Akim Demaille <akim@epita.fr>
12317
12318 * src/state.h, src/state.c (shift_t, SHIFT_SYMBOL, SHIFT_IS_SHIFT)
12319 (SHIFT_IS_GOTO, SHIFT_IS_ERROR, SHIFT_DISABLE, SHIFT_IS_DISABLED)
12320 (shifts_to): Rename as...
12321 (transition_t, TRANSITION_SYMBOL, TRANSITION_IS_TRANSITION)
12322 (TRANSITION_IS_GOTO, TRANSITION_IS_ERROR, TRANSITION_DISABLE)
12323 (TRANSITION_IS_DISABLED, transitions_to): these.
12324
12325 2002-06-30 Akim Demaille <akim@epita.fr>
12326
12327 * src/print.c (print_shifts, print_gotos): Merge into...
12328 (print_transitions): this.
12329 (print_transitions, print_errs, print_reductions): Align the
12330 lookaheads columns.
12331 (print_core, print_transitions, print_errs, print_state,
12332 print_grammar): Output empty lines separator before, not after.
12333 (state_default_rule_compute): Rename as...
12334 (state_default_rule): this.
12335 * tests/conflicts.at (Defaulted Conflicted Reduction),
12336 (Unresolved SR Conflicts, Resolved SR Conflicts): Adjust.
12337 * tests/regression.at (Rule Line Numbers, Web2c Report): Adjust.
12338
12339 2002-06-30 Akim Demaille <akim@epita.fr>
12340
12341 Display items as we display rules.
12342
12343 * src/gram.h, src/gram.c (rule_lhs_print): New.
12344 * src/gram.c (grammar_rules_partial_print): Use it.
12345 * src/print.c (print_core): Likewise.
12346 * tests/conflicts.at (Defaulted Conflicted Reduction),
12347 (Unresolved SR Conflicts): Adjust.
12348 (Unresolved SR Conflicts): Adjust and rename as...
12349 (Resolved SR Conflicts): this, as was meant.
12350 * tests/regression.at (Web2c Report): Adjust.
12351
12352 2002-06-30 Akim Demaille <akim@epita.fr>
12353
12354 * src/print.c (state_default_rule_compute): New, extracted from...
12355 (print_reductions): here.
12356 Pessimize, but clarify the code.
12357 * tests/conflicts.at (Defaulted Conflicted Reduction): New.
12358
12359 2002-06-30 Akim Demaille <akim@epita.fr>
12360
12361 * src/output.c (action_row): Let default_rule be always a rule
12362 number.
12363
12364 2002-06-30 Akim Demaille <akim@epita.fr>
12365
12366 * src/closure.c (print_firsts, print_fderives, closure):
12367 Use BITSET_EXECUTE.
12368 * src/lalr.c (lookaheads_print): Likewise.
12369 * src/state.c (state_rule_lookaheads_print): Likewise.
12370 * src/print_graph.c (print_core): Likewise.
12371 * src/print.c (print_reductions): Likewise.
12372 * src/output.c (action_row): Likewise.
12373 Use SHIFT_IS_DISABLED, SHIFT_IS_SHIFT and SHIFT_SYMBOL.
12374
12375 2002-06-30 Akim Demaille <akim@epita.fr>
12376
12377 * src/print_graph.c: Use report_flag.
12378
12379 2002-06-30 Akim Demaille <akim@epita.fr>
12380
12381 * src/lalr.c (traverse, digraph, matrix_print, transpose): Move
12382 to...
12383 * src/relation.h, src/relation.c (traverse, relation_digraph)
12384 (relation_print, relation_transpose): New.
12385
12386 2002-06-30 Akim Demaille <akim@epita.fr>
12387
12388 * src/state.h, src/state.c (shifts_to): New.
12389 * src/lalr.c (build_relations): Use it.
12390
12391 2002-06-30 Akim Demaille <akim@epita.fr>
12392
12393 * src/gram.h (rule_number_t, RULE_NUMBER_MAX, int_of_rule_number)
12394 (item_number_of_rule_number, rule_number_of_item_number): New.
12395 * src/LR0.c, src/closure.c, src/derives.c, src/derives.h,
12396 * src/gram.c, src/lalr.c, src/nullable.c, src/output.c, src/print.c,
12397 * src/print_graph.c, src/reader.c, src/reduce.c, src/reduce.h:
12398 Propagate their use.
12399 Much remains to be done, in particular wrt `shorts' from types.h.
12400
12401 2002-06-30 Akim Demaille <akim@epita.fr>
12402
12403 * src/symtab.c (symbol_new): Initialize the `printer' member.
12404
12405 2002-06-30 Akim Demaille <akim@epita.fr>
12406
12407 * src/LR0.c (save_reductions): Remove, replaced by...
12408 * src/state.h, src/state.c (state_reductions_set): New.
12409 (reductions, errs): Rename as...
12410 (reductions_t, errs_t): these.
12411 Adjust all dependencies.
12412
12413 2002-06-30 Akim Demaille <akim@epita.fr>
12414
12415 * src/LR0.c (state_list_t, state_list_append): New.
12416 (first_state, last_state): Now symbol_list_t.
12417 (this_state): Remove.
12418 (new_itemsets, append_states, save_reductions): Take a state_t as
12419 argument.
12420 (set_states, generate_states): Adjust.
12421 (save_shifts): Remove, replaced by...
12422 * src/state.h, src/state.c (state_shifts_set): New.
12423 (shifts): Rename as...
12424 (shifts_t): this.
12425 Adjust all dependencies.
12426 * src/state.h (state_t): Remove the `next' member.
12427
12428 2002-06-30 Akim Demaille <akim@epita.fr>
12429
12430 * src/vcg.c (quote): Use slot 2, since we often pass symbol tag
12431 escaped in slot 0.
12432
12433 2002-06-30 Akim Demaille <akim@epita.fr>
12434
12435 Use hash.h for the state hash table.
12436
12437 * src/LR0.c (STATE_HASH_SIZE, state_hash): Remove.
12438 (allocate_storage): Use state_hash_new.
12439 (free_storage): Use state_hash_free.
12440 (new_state, get_state): Adjust.
12441 * src/lalr.h, src/lalr.c (states): Move to...
12442 * src/states.h (state_t): Remove the `link' member, no longer
12443 used.
12444 * src/states.h, src/states.c: here.
12445 (state_hash_new, state_hash_free, state_hash_lookup)
12446 (state_hash_insert, states_free): New.
12447 * src/states.c (state_table, state_compare, state_hash): New.
12448 * src/output.c (output_actions): Do not free states now, since we
12449 still need to know the final_state number in `prepare', called
12450 afterwards. Do it...
12451 * src/main.c (main): here: call states_free after `output'.
12452
12453 2002-06-30 Akim Demaille <akim@epita.fr>
12454
12455 * src/state.h, src/state.c (state_new): New, extracted from...
12456 * src/LR0.c (new_state): here.
12457 * src/state.h (STATE_ALLOC): Move to...
12458 * src/state.c: here.
12459 * src/LR0.h, src/LR0.c (nstates, final_state): Move to...
12460 * src/state.h, src/state.c: here.
12461
12462 2002-06-30 Akim Demaille <akim@epita.fr>
12463
12464 * src/reader.c (gensym): Rename as...
12465 * src/symtab.h, src/symtab.c (dummy_symbol_get): this.
12466 (getsym): Rename as...
12467 (symbol_get): this.
12468
12469 2002-06-30 Akim Demaille <akim@epita.fr>
12470
12471 * src/state.h (state_number_t, STATE_NUMBER_MAX): New.
12472 * src/LR0.c, src/LR0.h, src/conflicts.c, src/lalr.c, src/lalr.h,
12473 * src/output.c, src/print.c, src/print_graph.c: Propagate.
12474 * src/LR0.h, src/LR0.h (final_state): Is a state_t*.
12475
12476 2002-06-30 Akim Demaille <akim@epita.fr>
12477
12478 Make the test suite pass with warnings checked.
12479
12480 * tests/actions.at (Printers and Destructors): Improve.
12481 Avoid unsigned vs. signed issues.
12482 * tests/calc.at: Don't exercise the scanner here, do it...
12483 * tests/input.at (Torturing the Scanner): here.
12484
12485 2002-06-28 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
12486
12487 * data/glr.c: Correct typo in Emacs-mode directive. Slightly
12488 reorganize first lines parallel to yacc.c.
12489
12490 2002-06-28 Akim Demaille <akim@epita.fr>
12491
12492 * data/c.m4 (b4_copyright, b4_sint_type, b4_uint_type, b4_token_define)
12493 (b4_token_enum, b4_token_defines): New, factored from...
12494 * data/lalr1.cc, data/yacc.c, glr.c: here.
12495
12496 2002-06-28 Akim Demaille <akim@epita.fr>
12497
12498 * data/yacc.c (yydestruct, yysymprint): Pacify GCC warnings for
12499 unused variables.
12500 * src/output.c (merger_output): static.
12501
12502 2002-06-28 Akim Demaille <akim@epita.fr>
12503
12504 * src/reader.h: s/grammer_current_rule_merge_set/grammar_.../.
12505 * src/conflicts.c (conflicts_total_count): `i' is unsigned, to
12506 pacify GCC.
12507 * src/output.c (save_row): Initialize all the variables to pacify GCC.
12508
12509 2002-06-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
12510
12511 Accumulated changelog for new GLR parsing features.
12512
12513 * src/conflicts.c (count_total_conflicts): Change name to
12514 conflicts_total_count.
12515 * src/conflicts.h: Ditto.
12516 * src/output.c (token_actions): Use the new name.
12517 (output_conflicts): Change conflp => conflict_list_heads, and
12518 confl => conflict_list for better readability.
12519 * data/glr.c: Use the new names.
12520 * NEWS: Add self to GLR announcement.
12521
12522 * src/reader.c (free_merger_functions): Cleanup: XFREE->free.
12523
12524 * doc/bison.texinfo (GLR Parsers): Make corrections suggested by
12525 Akim Demaille.
12526
12527 * data/bison.glr: Change name to glr.c
12528 * data/glr.c: Renamed from bison.glr.
12529 * data/Makefile.am: Add glr.c
12530
12531 * src/getargs.c:
12532
12533 * src/symlist.h: Add dprec and merger fields to symbol_list_s.
12534 * src/symlist.c (symbol_list_new): Initialize dprec and merger fields.
12535
12536 Originally 2002-06-16 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
12537
12538 * data/bison.glr: Be sure to restore the
12539 current #line when returning to the skeleton contents after having
12540 exposed the input file's #line.
12541
12542 Originally 2002-06-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
12543
12544 * data/bison.glr: Bring up to date with changes to bison.simple.
12545
12546 Originally 2002-06-03 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
12547
12548 * data/bison.glr: Correct definitions that use b4_prefix.
12549 Various reformatting.
12550 (GLRStack): Make yychar (in YYPURE case) and yytokenp as part of stack.
12551 (yyreportParseError, yyrecoverParseError, yyprocessOneStack): remove
12552 yytokenp argument; now part of stack.
12553 (yychar): Define to behave as documented.
12554 (yyclearin): Ditto.
12555
12556 Originally 2002-05-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
12557
12558 * src/reader.h: Add declaration for free_merger_functions.
12559
12560 * src/reader.c (merge_functions): New variable.
12561 (get_merge_function): New function.
12562 (free_merger_functions): New function.
12563 (readgram): Check for %prec that is not followed by a symbol.
12564 Handle %dprec and %merge declarations.
12565 (packgram): Initialize dprec and merger fields in rules array.
12566
12567 * src/output.c (conflict_tos, conflrow, conflict_table, conflict_list,
12568 conflict_list_cnt, conflict_list_free): New variables.
12569 (table_grow): Also grow conflict_table.
12570 (prepare_rules): Output dprec and merger tables.
12571 (conflict_row): New function.
12572 (action_row): Output conflict lists for GLR parser. Don't use
12573 default reduction in conflicted states for GLR parser so that there
12574 are spaces for the conflict lists.
12575 (save_row): Also save conflict information.
12576 (token_actions): Allocate conflict list.
12577 (merger_output): New function.
12578 (pack_vector): Pack conflict table, too.
12579 (output_conflicts): New function to output yyconflp and yyconfl.
12580 (output_check): Allocate conflict_tos.
12581 (output_actions): Output conflict tables, also.
12582 (output_skeleton): Output b4_mergers definition.
12583 (prepare): Output b4_max_rhs_length definition.
12584 Use 'bison.glr' as default skeleton for GLR parsers.
12585
12586 * src/gram.c (glr_parser): New flag.
12587 (grammar_free): Call free_merger_functions.
12588
12589 * src/conflicts.c (count_rr_conflicts): Augment to optionally count
12590 all pairs of conflicting reductions, rather than just all tokens
12591 causing conflicts. Needed to size conflict tables.
12592 (conflicts_output): Modify call to count_rr_conflicts for new
12593 interface.
12594 (conflicts_print): Ditto.
12595 (count_total_conflicts): New function.
12596
12597 * src/reader.h (merger_list): New type.
12598 (merge_functions): New variable.
12599
12600 * src/lex.h (tok_dprec, tok_merge): New token types.
12601
12602 * src/gram.h (rule_s): Add dprec and merger fields.
12603 (glr_parser): New flag.
12604
12605 * src/conflicts.h (count_total_conflicts): New function.
12606
12607 * src/options.c (option_table): Add %dprec, %merge, and %glr-parser.
12608
12609 * doc/bison.texinfo (Generalized LR Parsing): New section.
12610 (GLR Parsers): New section.
12611 (Language and Grammar): Mention GLR parsing.
12612 (Table of Symbols): Add %dprec, %glr-parser, %merge, GLR
12613 Correct typo ("tge" -> "the").
12614
12615 * data/bison.glr: New skeleton for GLR parsing.
12616
12617 * tests/cxx-gram.at: New tests for GLR parsing.
12618
12619 * tests/testsuite.at: Include cxx-gram.at.
12620
12621 * tests/Makefile.am: Add cxx-gram.at.
12622
12623 * src/parse-gram.y:
12624
12625 * src/scan-gram.l: Add %dprec, %glr-parser, %merge.
12626
12627 * src/parse-gram.y: Grammar for %dprec, %merge, %glr-parser.
12628
12629 2002-06-27 Akim Demaille <akim@epita.fr>
12630
12631 * src/options.h, src/options.c: Remove.
12632 * src/getargs.c (short_options, long_options): New.
12633
12634 2002-06-27 Akim Demaille <akim@epita.fr>
12635
12636 * data/bison.simple, data/bison.c++: Rename as...
12637 * data/yacc.c, data/lalr1.cc: these.
12638 * doc/bison.texinfo (Environment Variables): Remove.
12639
12640 2002-06-25 Raja R Harinath <harinath@cs.umn.edu>
12641
12642 * src/getargs.c (report_argmatch): Initialize strtok().
12643
12644 2002-06-20 Akim Demaille <akim@epita.fr>
12645
12646 * data/bison.simple (b4_symbol_actions): New, replaces...
12647 (b4_symbol_destructor, b4_symbol_printer): these.
12648 (yysymprint): Be sure to call YYPRINT only for tokens, and using
12649 user token numbers.
12650
12651 2002-06-20 Akim Demaille <akim@epita.fr>
12652
12653 * data/bison.simple (yydestructor): Rename as...
12654 (yydestruct): this.
12655
12656 2002-06-20 Akim Demaille <akim@epita.fr>
12657
12658 * src/symtab.h, src/symtab.c (symbol_type_set)
12659 (symbol_destructor_set, symbol_precedence_set): The location is
12660 the last argument.
12661 Adjust all callers.
12662
12663 2002-06-20 Akim Demaille <akim@epita.fr>
12664
12665 * src/parse-gram.y (YYPRINT, yyprint): Don't mess with the parser
12666 internals.
12667 * src/reader.h, src/reader.c (grammar_current_rule_prec_set):
12668 Takes a location.
12669 * src/symtab.h, src/symtab.c (symbol_class_set)
12670 (symbol_user_token_number_set): Likewise.
12671 Adjust all callers.
12672 Promote complain_at.
12673 * tests/input.at (Type Clashes): Adjust.
12674
12675 2002-06-20 Akim Demaille <akim@epita.fr>
12676
12677 * data/bison.simple (YYLEX): Fix the declaration when
12678 %pure-parser.
12679
12680 2002-06-20 Akim Demaille <akim@epita.fr>
12681
12682 * data/bison.simple (yysymprint): Don't print the token number,
12683 just its name.
12684 * tests/actions.at (Destructors): Rename as...
12685 (Printers and Destructors): this.
12686 Also exercise %printer.
12687
12688 2002-06-20 Akim Demaille <akim@epita.fr>
12689
12690 * data/bison.simple (YYDSYMPRINT): New.
12691 Use it to remove many of the #if YYDEBUG/if (yydebug).
12692
12693 2002-06-20 Akim Demaille <akim@epita.fr>
12694
12695 * src/symtab.h, src/symtab.c (symbol_t): printer and
12696 printer_location are new members.
12697 (symbol_printer_set): New.
12698 * src/parse-gram.y (PERCENT_PRINTER): New token.
12699 Handle its associated rule.
12700 * src/scan-gram.l: Adjust.
12701 (handle_destructor_at, handle_destructor_dollar): Rename as...
12702 (handle_symbol_code_at, handle_symbol_code_dollar): these.
12703 * src/output.c (symbol_printers_output): New.
12704 (output_skeleton): Call it.
12705 * data/bison.simple (yysymprint): New. Cannot be named yyprint
12706 since there are already many grammar files with a user `yyprint'.
12707 Replace the calls to YYPRINT to calls to yysymprint.
12708 * tests/calc.at: Adjust.
12709 * tests/torture.at (AT_DATA_STACK_TORTURE): Remove YYPRINT: it was
12710 taking advantage of parser very internal details (stack size!).
12711
12712 2002-06-20 Akim Demaille <akim@epita.fr>
12713
12714 * src/scan-gram.l: Complete the scanner with the missing patterns
12715 to pacify Flex.
12716 Use `quote' and `symbol_tag_get' where appropriate.
12717
12718 2002-06-19 Akim Demaille <akim@epita.fr>
12719
12720 * tests/actions.at (Destructors): Augment to test locations.
12721 * data/bison.simple (yydestructor): Pass it the current location
12722 if locations are enabled.
12723 Prototype only when __STDC__ or C++.
12724 Change the argument names to move into the yy name space: there is
12725 user code here.
12726
12727 2002-06-19 Akim Demaille <akim@epita.fr>
12728
12729 * data/bison.simple (b4_pure_if): New.
12730 Use it instead of #ifdef YYPURE.
12731
12732 2002-06-19 Akim Demaille <akim@epita.fr>
12733
12734 * data/bison.simple (b4_location_if): New.
12735 Use it instead of #ifdef YYLSP_NEEDED.
12736
12737 2002-06-19 Akim Demaille <akim@epita.fr>
12738
12739 Prepare @$ in %destructor, but currently don't bind it in the
12740 skeleton, as %location use is not cleaned up yet.
12741
12742 * src/scan-gram.l (handle_dollar, handle_destructor_at)
12743 (handle_action_at): New.
12744 (handle_at, handle_action_dollar, handle_destructor_dollar): Take
12745 a braced_code_t and a location as additional arguments.
12746 (handle_destructor_dollar): Instead of requiring `b4_eval', just
12747 unquote one when outputting `b4_dollar_dollar'.
12748 Adjust callers.
12749 * data/bison.simple (b4_eval): Remove.
12750 (b4_symbol_destructor): Adjust.
12751 * tests/input.at (Invalid @n): Adjust.
12752
12753 2002-06-19 Zack Weinberg <zack@codesourcery.com>
12754
12755 * doc/bison.texinfo: Document ability to have multiple
12756 prologue sections.
12757
12758 2002-06-18 Akim Demaille <akim@epita.fr>
12759
12760 * src/files.c (compute_base_names): When computing the output file
12761 names from the input file name, strip the directory part.
12762
12763 2002-06-18 Akim Demaille <akim@epita.fr>
12764
12765 * data/bison.simple.new: Comment changes.
12766 Reported by Andreas Schwab.
12767
12768 2002-06-18 Matt Kraai <kraai@alumni.cmu.edu>
12769
12770 * data/bison.simple (yyoverflowlab): #ifndef yyoverflow, so that
12771 there are no `label `yyoverflowlab' defined but not used' warnings
12772 when yyoverflow is defined.
12773
12774 2002-06-18 Akim Demaille <akim@epita.fr>
12775
12776 * src/symtab.h, src/symtab.c (symbol_t): destructor_location is a
12777 new member.
12778 (symbol_destructor_set): Adjust.
12779 * src/output.c (symbol_destructors_output): Output the destructor
12780 locations.
12781 Output the symbol name.
12782 * data/bison.simple (b4_symbol_destructor): Adjust.
12783
12784 2002-06-18 Cris Bailiff <c.bailiff@awayweb.com>
12785 and Akim Demaille <akim@epita.fr>
12786
12787 * data/bison.simple.new (yyerrlab1): Be sure to pop and destroy
12788 what's left on the stack when the error recovery hits EOF.
12789 * tests/actions.at (Destructors): Complete to exercise this case.
12790
12791 2002-06-17 Akim Demaille <akim@epita.fr>
12792
12793 * data/m4sugar/m4sugar.m4 (m4_map): Recognize when the list of
12794 arguments is really empty, not only equal to `[]'.
12795 * src/symtab.h, src/symtab.c (symbol_t): `destructor' is a new
12796 member.
12797 (symbol_destructor_set): New.
12798 * src/output.c (symbol_destructors_output): New.
12799 * src/reader.h (brace_code_t, current_braced_code): New.
12800 * src/scan-gram.l (BRACED_CODE): Use it to branch on...
12801 (handle_dollar): Rename as...
12802 (handle_action_dollar): this.
12803 (handle_destructor_dollar): New.
12804 * src/parse-gram.y (PERCENT_DESTRUCTOR): New.
12805 (grammar_declaration): Use it.
12806 * data/bison.simple (yystos): Is always defined.
12807 (yydestructor): New.
12808 * tests/actions.at (Destructors): New.
12809 * tests/calc.at (_AT_CHECK_CALC_ERROR): Don't rely on egrep.
12810
12811 2002-06-17 Akim Demaille <akim@epita.fr>
12812
12813 * src/symlist.h, src/symlist.c (symbol_list_length): New.
12814 * src/scan-gram.l (handle_dollar, handle_at): Compute the
12815 rule_length only when needed.
12816 * src/output.c (actions_output, token_definitions_output): Output
12817 the full M4 block.
12818 * src/symtab.c: Don't access directly to the symbol tag, use
12819 symbol_tag_get.
12820 * src/parse-gram.y: Use symbol_list_free.
12821
12822 2002-06-17 Akim Demaille <akim@epita.fr>
12823
12824 * src/reader.h, src/reader.c (symbol_list, symbol_list_new)
12825 (symbol_list_prepend, get_type_name): Move to...
12826 * src/symlist.h, src/symlist.c (symbol_list_t, symbol_list_new)
12827 (symbol_list_prepend, symbol_list_n_type_name_get): here.
12828 Adjust all callers.
12829 (symbol_list_free): New.
12830 * src/scan-gram.l (handle_dollar): Takes a location.
12831 * tests/input.at (Invalid $n): Adjust.
12832
12833 2002-06-17 Akim Demaille <akim@epita.fr>
12834
12835 * src/reader.h, src/reader.c (symbol_list_new): Export it.
12836 (symbol_list_prepend): New.
12837 * src/parse-gram.y (%union): `list' is a new member.
12838 (symbols.1): New, replaces...
12839 (terms_to_prec.1, nterms_to_type.1): these.
12840 * src/symtab.h, src/symtab.c (symbol_type_set, symbol_precedence_set)
12841 Take a location as additional argument.
12842 Adjust all callers.
12843
12844 2002-06-15 Akim Demaille <akim@epita.fr>
12845
12846 * src/parse-gram.y: Move %token in the declaration section so that
12847 we don't depend upon CVS Bison.
12848
12849 2002-06-15 Akim Demaille <akim@epita.fr>
12850
12851 * src/state.h, src/state.c (state_rule_lookaheads_print): New.
12852 * src/print.c (print_core): Use it.
12853
12854 2002-06-15 Akim Demaille <akim@epita.fr>
12855
12856 * src/conflicts.c (log_resolution): Accept the rule involved in
12857 the sr conflicts instead of the lookahead number that points to
12858 that rule.
12859 (flush_reduce): Accept the current lookahead vector as argument,
12860 instead of the index in LA.
12861 (resolve_sr_conflict): Accept the current number of lookahead
12862 bitset to consider for the STATE, instead of the index in LA.
12863 (set_conflicts): Adjust.
12864 * src/lalr.c, src/lalr.h, src/state.h: Comment changes.
12865
12866 2002-06-15 Akim Demaille <akim@epita.fr>
12867
12868 * src/state.h (state_t): Replace the `lookaheadsp' member, a
12869 short, with `lookaheads' (bitsetv), `lookaheads_rule' (rule_t**).
12870 Adjust all dependencies.
12871 * src/lalr.c (initialize_lookaheads): Split into...
12872 (states_lookaheads_count, states_lookaheads_initialize): these.
12873 (lalr): Adjust.
12874
12875 2002-06-15 Akim Demaille <akim@epita.fr>
12876
12877 * src/gram.h, src/gram.c (grammar_rules_partial_print): New, eved
12878 out of...
12879 (grammar_rules_print): here.
12880 * src/reduce.c (reduce_output): Use it.
12881 * tests/reduce.at (Useless Rules, Reduced Automaton)
12882 (Underivable Rules): Adjust.
12883
12884 2002-06-15 Akim Demaille <akim@epita.fr>
12885
12886 Copy BYacc's nice way to report the grammar.
12887
12888 * src/gram.h, src/gram.c (grammar_rhs_print, grammar_rules_print):
12889 New.
12890 Don't print the rules' location, it is confusing and useless.
12891 (rule_print): Use grammar_rhs_print.
12892 * src/print.c (print_grammar): Use grammar_rules_print.
12893
12894 2002-06-15 Akim Demaille <akim@epita.fr>
12895
12896 Complete and rationalize `useless thing' warnings.
12897
12898 * src/symtab.h, src/symtab.c (symbol_tag_get, symbol_tag_get_n)
12899 (symbol_tag_print): New.
12900 Use them everywhere in place of accessing directly the tag member.
12901 * src/gram.h, src/gram.c (rule_print): New.
12902 Use it where a rule used to be printed `by hand'.
12903 * src/reduce.c (nonterminals_reduce): Report the use nonterminals.
12904 (reduce_grammar_tables): Report the useless rules.
12905 (reduce_print): Useless things are a warning, not an error.
12906 Report it as such.
12907 * tests/reduce.at (Useless Nonterminals, Useless Rules):
12908 (Reduced Automaton, Underivable Rules): Adjust.
12909 * tests/regression.at (Web2c Report, Web2c Report): Adjust.
12910 * tests/conflicts.at (Unresolved SR Conflicts)
12911 (Solved SR Conflicts): Adjust.
12912
12913 2002-06-15 Akim Demaille <akim@epita.fr>
12914
12915 Let symbols have a location.
12916
12917 * src/symtab.h, src/symtab.c (symbol_t): Location is a new member.
12918 (getsym): Adjust.
12919 Adjust all callers.
12920 * src/complain.h, src/complain.c (complain_at, fatal_at, warn_at):
12921 Use location_t, not int.
12922 * src/symtab.c (symbol_check_defined): Take advantage of the
12923 location.
12924 * tests/regression.at (Invalid inputs): Adjust.
12925
12926 2002-06-15 Akim Demaille <akim@epita.fr>
12927
12928 * src/parse-gram.y (YYLLOC_DEFAULT, current_lhs_location): New.
12929 (input): Don't try to initialize yylloc here, do it in the
12930 scanner.
12931 * src/scan-gram.l (YY_USER_INIT): Initialize yylloc.
12932 * src/gram.h (rule_t): Change line and action_line into location
12933 and action_location, of location_t type.
12934 Adjust all dependencies.
12935 * src/location.h, src/location.c (empty_location): New.
12936 * src/reader.h, src/reader.c (grammar_start_symbol_set)
12937 (grammar_symbol_append, grammar_rule_begin, grammar_rule_end)
12938 (grammar_current_rule_symbol_append)
12939 (grammar_current_rule_action_append): Expect a location as argument.
12940 * src/reader.c (grammar_midrule_action): Adjust to attach an
12941 action's location as dummy symbol location.
12942 * src/symtab.h, src/symtab.c (startsymbol_location): New.
12943 * tests/regression.at (Web2c Report, Rule Line Numbers): Adjust
12944 the line numbers.
12945
12946 2002-06-14 Akim Demaille <akim@epita.fr>
12947
12948 Grammar declarations may be found in the grammar section.
12949
12950 * src/parse-gram.y (rules_or_grammar_declaration): New.
12951 (declarations): Each declaration may end with a semicolon, not
12952 just...
12953 (grammar_declaration): `"%union"'.
12954 (grammar): Branch to rules_or_grammar_declaration.
12955
12956 2002-06-14 Akim Demaille <akim@epita.fr>
12957
12958 * src/main.c (main): Invoke scanner_free.
12959
12960 2002-06-14 Akim Demaille <akim@epita.fr>
12961
12962 * src/output.c (m4_invoke): Extracted from...
12963 (output_skeleton): here.
12964 Free tempfile.
12965
12966 2002-06-14 Akim Demaille <akim@epita.fr>
12967
12968 * src/parse-gram.y (directives, directive, gram)
12969 (grammar_directives, precedence_directives, precedence_directive):
12970 Rename as...
12971 (declarations, declaration, grammar, grammar_declaration)
12972 (precedence_declaration, precedence_declarator): these.
12973 (symbol_declaration): New.
12974
12975 2002-06-14 Akim Demaille <akim@epita.fr>
12976
12977 * src/files.c (action_obstack): Remove, unused.
12978 (output_obstack): Remove it, and all its dependencies, as it is no
12979 longer needed.
12980 * src/reader.c (epilogue_set): Build the epilogue in the
12981 muscle_obstack.
12982 * src/output.h, src/output.c (muscle_obstack): Move to...
12983 * src/muscle_tab.h, src/muscle_tab.h: here.
12984 (muscle_init): Initialize muscle_obstack.
12985 (muscle_free): New.
12986 * src/main.c (main): Call it.
12987
12988 2002-06-14 Akim Demaille <akim@epita.fr>
12989
12990 * src/location.h: New, extracted from...
12991 * src/reader.h: here.
12992 * src/Makefile.am (noinst_HEADERS): Merge into
12993 (bison_SOURCES): this.
12994 Add location.h.
12995 * src/parse-gram.y: Use location_t instead of Bison's.
12996 * src/reader.h, src/reader.c (prologue_augment, epilogue_set):
12997 Use location_t instead of ints.
12998
12999 2002-06-14 Akim Demaille <akim@epita.fr>
13000
13001 * data/bison.simple, data/bison.c++: Be sure to restore the
13002 current #line when returning to the skeleton contents after having
13003 exposed the input file's #line.
13004
13005 2002-06-12 Akim Demaille <akim@epita.fr>
13006
13007 * src/scan-gram.l (SC_BRACED_CODE): Don't use `<.*>', it is too
13008 eager.
13009 * tests/actions.at (Exotic Dollars): New.
13010
13011 2002-06-12 Akim Demaille <akim@epita.fr>
13012
13013 * src/scan-gram.l (SC_PROLOGUE): Don't eat characters amongst
13014 ['"/] too eagerly.
13015 * tests/input.at (Torturing the Scanner): New.
13016
13017 2002-06-11 Akim Demaille <akim@epita.fr>
13018
13019 * src/scan-gram.l (YY_OBS_INIT): Remove, replace with...
13020 [SC_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,SC_PROLOGUE]
13021 [SC_EPILOGUE]: Output the quadrigraphs only when not in a comment.
13022 * src/reader.h, src/scan-gram.l (scanner_initialize): this.
13023 * src/reader.c (reader): Use it.
13024
13025 2002-06-11 Akim Demaille <akim@epita.fr>
13026
13027 * src/scan-gram.l (YY_OBS_FINISH): Don't set yylval.
13028 Adjust all callers.
13029 (scanner_last_string_free): New.
13030
13031 2002-06-11 Akim Demaille <akim@epita.fr>
13032
13033 * src/scan-gram.l (YY_INIT, YY_GROW, YY_FINISH): Rename as...
13034 (YY_OBS_INIT, YY_OBS_GROW, YY_OBS_FINISH): these.
13035 (last_string, YY_OBS_FREE): New.
13036 Use them when returning an ID.
13037
13038 2002-06-11 Akim Demaille <akim@epita.fr>
13039
13040 Have Bison grammars parsed by a Bison grammar.
13041
13042 * src/reader.c, src/reader.h (prologue_augment): New.
13043 * src/reader.c (copy_definition): Remove.
13044
13045 * src/reader.h, src/reader.c (gram_start_symbol_set, prologue_augment)
13046 (grammar_symbol_append, grammar_rule_begin, grammar_midrule_action)
13047 (grammar_current_rule_prec_set, grammar_current_rule_check)
13048 (grammar_current_rule_symbol_append)
13049 (grammar_current_rule_action_append): Export.
13050 * src/parse-gram.y (symbol_list_new, symbol_list_symbol_append_
13051 (symbol_list_action_append): Remove.
13052 Hook the routines from reader.
13053 * src/scan-gram.l: In INITIAL, characters and strings are tokens.
13054 * src/system.h (ATTRIBUTE_NORETURN, ATTRIBUTE_UNUSED): Now.
13055
13056 * src/reader.c (read_declarations): Remove, unused.
13057
13058 * src/parse-gram.y: Handle the epilogue.
13059 * src/reader.h, src/reader.c (gram_start_symbol_set): Rename as...
13060 (grammar_start_symbol_set): this.
13061 * src/scan-gram.l: Be sure to ``use'' yycontrol to keep GCC quiet.
13062 * src/reader.c (readgram): Remove, unused.
13063 (reader): Adjust to insert eoftoken and axiom where appropriate.
13064
13065 * src/reader.c (copy_dollar): Replace with...
13066 * src/scan-gram.h (handle_dollar): this.
13067 * src/parse-gram.y: Remove `%thong'.
13068
13069 * src/reader.c (copy_at): Replace with...
13070 * src/scan-gram.h (handle_at): this.
13071
13072 * src/complain.h, src/complain.c (warn_at, complain_at, fatal_at):
13073 New.
13074
13075 * src/scan-gram.l (YY_LINES): Keep lineno synchronized for the
13076 time being.
13077
13078 * src/reader.h, src/reader.c (grammar_rule_end): New.
13079
13080 * src/parse.y (current_type, current_class): New.
13081 Implement `%nterm', `%token' support.
13082 Merge `%term' into `%token'.
13083 (string_as_id): New.
13084 * src/symtab.h, src/symtab.c (symbol_make_alias): Don't pass the
13085 type name.
13086
13087 * src/parse-gram.y: Be sure to handle properly the beginning of
13088 rules.
13089
13090 * src/parse-gram.y: Handle %type.
13091 * src/reader.c (grammar_rule_end): Call grammar_current_rule_check.
13092
13093 * src/parse-gram.y: More directives support.
13094 * src/options.c: No longer handle source directives.
13095
13096 * src/parse-gram.y: Fix %output.
13097
13098 * src/parse-gram.y: Handle %union.
13099 Use the prologue locations.
13100 * src/reader.c (parse_union_decl): Remove.
13101
13102 * src/reader.h, src/reader.c (epilogue_set): New.
13103 * src/parse-gram.y: Use it.
13104
13105 * data/bison.simple, data/bison.c++: b4_stype is now either not
13106 defined, then default to int, or to the contents of %union,
13107 without `union' itself.
13108 Adjust.
13109 * src/muscle_tab.c (muscle_init): Don't predefine `stype'.
13110
13111 * src/output.c (actions_output): Don't output braces, as they are
13112 already handled by the scanner.
13113
13114 * src/scan-gram.l (SC_CHARACTER): Set the user_token_number of
13115 characters to themselves.
13116
13117 * tests/reduce.at (Reduced Automaton): End the grammars with %% so
13118 that the epilogue has a proper #line.
13119
13120 * src/parse-gram.y: Handle precedence/associativity.
13121
13122 * src/symtab.c (symbol_precedence_set): Requires the symbol to be
13123 a terminal.
13124 * src/scan-gram.l (SC_BRACED_CODE): Catch strings and characters.
13125 * tests/calc.at: Do not use `%token "foo"' as it makes not sense
13126 at all to define terminals that cannot be emitted.
13127
13128 * src/scan-gram.l: Escape M4 characters.
13129
13130 * src/scan-gram.l: Working properly with escapes in user
13131 strings/characters.
13132
13133 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR)
13134 (AT_DATA_HORIZONTAL_GRAMMAR): Respect the `%token ID NUM STRING'
13135 grammar.
13136 Use more modest sizes, as for the time being the parser does not
13137 release memory, and therefore the process swallows a huge amount
13138 of memory.
13139
13140 * tests/torture.at (AT_DATA_LOOKAHEADS_GRAMMAR): Adjust to the
13141 stricter %token grammar.
13142
13143 * src/symtab.h (associativity): Add `undef_assoc'.
13144 (symbol_precedence_set): Do nothing when passed an undef_assoc.
13145 * src/symtab.c (symbol_check_alias_consistence): Adjust.
13146
13147 * tests/regression.at (Invalid %directive): Remove, as it is now
13148 meaningless.
13149 (Invalid inputs): Adjust to the new error messages.
13150 (Token definitions): The new grammar doesn't allow too many
13151 eccentricities.
13152
13153 * src/lex.h, src/lex.c: Remove.
13154 * src/reader.c (lastprec, skip_to_char, read_signed_integer)
13155 (copy_character, copy_string2, copy_string, copy_identifier)
13156 (copy_comment, parse_token_decl, parse_type_decl, parse_assoc_decl)
13157 (parse_muscle_decl, parse_dquoted_param, parse_skel_decl)
13158 (parse_action): Remove.
13159 * po/POTFILES.in: Adjust.
13160
13161 2002-06-11 Akim Demaille <akim@epita.fr>
13162
13163 * src/reader.c (parse_action): Don't store directly into the
13164 rule's action member: return the action as a string.
13165 Don't require `rule_length' as an argument: compute it.
13166 (grammar_current_rule_symbol_append)
13167 (grammar_current_rule_action_append): New, eved out from
13168 (readgram): here.
13169 Remove `action_flag', `rulelength', unused now.
13170
13171 2002-06-11 Akim Demaille <akim@epita.fr>
13172
13173 * src/reader.c (grammar_current_rule_prec_set).
13174 (grammar_current_rule_check): New, eved out from...
13175 (readgram): here.
13176 Remove `xaction', `first_rhs': useless.
13177 * tests/input.at (Type clashes): New.
13178 * tests/existing.at (GNU Cim Grammar): Adjust.
13179
13180 2002-06-11 Akim Demaille <akim@epita.fr>
13181
13182 * src/reader.c (grammar_midrule_action): New, Eved out from
13183 (readgram): here.
13184
13185 2002-06-11 Akim Demaille <akim@epita.fr>
13186
13187 * src/reader.c (grammar_rule_begin, previous_rule, current_rule):
13188 New.
13189 (readgram): Use them as replacement of inlined code, crule and
13190 crule1.
13191
13192 2002-06-11 Akim Demaille <akim@epita.fr>
13193
13194 * src/reader.c (grammar_end, grammar_symbol_append): New.
13195 (readgram): Use them.
13196 Make the use of `p' as local as possible.
13197
13198 2002-06-10 Akim Demaille <akim@epita.fr>
13199
13200 GCJ's parser requires the tokens to be defined before the prologue.
13201
13202 * data/bison.simple: Output the token definition before the user's
13203 prologue.
13204 * tests/regression.at (Braces parsing, Duplicate string)
13205 (Mixing %token styles): Check the output from bison.
13206 (Early token definitions): New.
13207
13208 2002-06-10 Akim Demaille <akim@epita.fr>
13209
13210 * src/symtab.c (symbol_user_token_number_set): Don't complain when
13211 assigning twice the same user number to a token, so that we can
13212 use it in...
13213 * src/lex.c (lex): here.
13214 Also use `symbol_class_set' instead of hand written code.
13215 * src/reader.c (parse_assoc_decl): Likewise.
13216
13217 2002-06-10 Akim Demaille <akim@epita.fr>
13218
13219 * src/symtab.c, src/symtab.c (symbol_class_set)
13220 (symbol_user_token_number_set): New.
13221 * src/reader.c (parse_token_decl): Use them.
13222 Use a switch instead of ifs.
13223 Use a single argument.
13224
13225 2002-06-10 Akim Demaille <akim@epita.fr>
13226
13227 Remove `%thong' support as it is undocumented, unused, duplicates
13228 `%token's job, and creates useless e-mail traffic with people who
13229 want to know what it is, why it is undocumented, unused, and
13230 duplicates `%token's job.
13231
13232 * src/reader.c (parse_thong_decl): Remove.
13233 * src/options.c (option_table): Remove "thong".
13234 * src/lex.h (tok_thong): Remove.
13235
13236 2002-06-10 Akim Demaille <akim@epita.fr>
13237
13238 * src/symtab.c, src/symtab.c (symbol_type_set)
13239 (symbol_precedence_set): New.
13240 * src/reader.c (parse_type_decl, parse_assoc_decl): Use them.
13241 (value_components_used): Remove, unused.
13242
13243 2002-06-09 Akim Demaille <akim@epita.fr>
13244
13245 Move symbols handling code out of the reader.
13246
13247 * src/reader.h, src/reader.c (errtoken, undeftoken, eoftoken)
13248 (axiom): Move to...
13249 * src/symtab.h, src/symtab.c: here.
13250
13251 * src/gram.c (start_symbol): Remove: use startsymbol->number.
13252 * src/reader.c (startval): Rename as...
13253 * src/symtab.h, src/symtab.c (startsymbol): this.
13254 * src/reader.c: Adjust.
13255
13256 * src/reader.c (symbol_check_defined, symbol_make_alias)
13257 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
13258 (token_translations_init)
13259 Move to...
13260 * src/symtab.c: here.
13261 * src/reader.c (packsymbols): Move to...
13262 * src/symtab.h, src/symtab.c (symbols_pack): here.
13263 * src/symtab.h, src/symtab.c (symbol_make_alias): Takes SYMVAL as
13264 argument.
13265
13266 2002-06-03 Akim Demaille <akim@epita.fr>
13267
13268 * src/muscle_tab.c (muscle_insert, muscle_find): Declarations,
13269 then statements.
13270
13271 2002-06-03 Akim Demaille <akim@epita.fr>
13272
13273 * src/muscle_tab.c (muscle_find, muscle_insert): Don't initialize
13274 structs with non literals.
13275 * src/scan-skel.l: never-interactive.
13276 * src/conflicts.c (enum conflict_resolution_e): No trailing
13277 comma.
13278 * src/getargs.c (usage): Split long literal strings.
13279 Reported by Hans Aberg.
13280
13281 2002-05-28 Akim Demaille <akim@epita.fr>
13282
13283 * data/bison.c++: Use C++ ostreams.
13284 (cdebug_): New member.
13285
13286 2002-05-28 Akim Demaille <akim@epita.fr>
13287
13288 * src/output.c (output_skeleton): Be sure to allocate enough room
13289 for `/' _and_ for `\0' in full_skeleton.
13290
13291 2002-05-28 Akim Demaille <akim@epita.fr>
13292
13293 * data/bison.c++: Catch up with bison.simple:
13294 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
13295 and Paul Eggert <eggert@twinsun.com>: `error' handing.
13296 2002-05-26 Akim Demaille <akim@epita.fr>: stos_, token_number_,
13297 and popping traces.
13298
13299 2002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
13300
13301 * src/output.c (output_skeleton): Put an explicit path in front of
13302 the skeleton file name, rather than relying on the -I directory,
13303 to partially alleviate effects of having a skeleton file lying around
13304 in the current directory.
13305
13306 2002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
13307
13308 * src/conflicts.c (log_resolution): Correct typo:
13309 obstack_printf should be obstack_fgrow1.
13310
13311 2002-05-26 Akim Demaille <akim@epita.fr>
13312
13313 * src/state.h (state_t): `solved_conflicts' is a new member.
13314 * src/LR0.c (new_state): Set it to 0.
13315 * src/conflicts.h, src/conflicts.c (print_conflicts)
13316 (free_conflicts, solve_conflicts): Rename as...
13317 (conflicts_print, conflicts_free, conflicts_solve): these.
13318 Adjust callers.
13319 * src/conflicts.c (enum conflict_resolution_e)
13320 (solved_conflicts_obstack): New, used by...
13321 (log_resolution): this.
13322 Adjust to attach the conflict resolution to each state.
13323 Complete the description with the precedence/associativity
13324 information.
13325 (resolve_sr_conflict): Adjust.
13326 * src/print.c (print_state): Output its solved_conflicts.
13327 * tests/conflicts.at (Unresolved SR Conflicts)
13328 (Solved SR Conflicts): Exercise --report=all.
13329
13330 2002-05-26 Akim Demaille <akim@epita.fr>
13331
13332 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
13333 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
13334 * src/reader.c, src/reduce.c, src/state.h, src/symtab.h
13335 (token_number_t, item_number_as_token_number)
13336 (token_number_as_item_number, muscle_insert_token_number_table):
13337 Rename as...
13338 (symbol_number_t, item_number_as_symbol_number)
13339 (symbol_number_as_item_number, muscle_insert_symbol_number_table):
13340 these, since it is more appropriate.
13341
13342 2002-05-26 Akim Demaille <akim@epita.fr>
13343
13344 * tests/calc.at (AT_CHECK_CALC): Adjust: there are now additional
13345 `Error:' lines.
13346 * data/bison.simple (yystos) [YYDEBUG]: New.
13347 (yyparse) [YYDEBUG]: Display the symbols which are popped during
13348 error recovery.
13349 * tests/regression.at (Web2c Actions): Adjust: yystos is output now.
13350
13351 2002-05-25 Akim Demaille <akim@epita.fr>
13352
13353 * doc/bison.texinfo (Debugging): Split into...
13354 (Tracing): this new section, its former contents, and...
13355 (Understanding): this new section.
13356 * src/getargs.h, src/getargs.c (verbose_flag): Remove, replaced
13357 by...
13358 (report_flag): this.
13359 Adjust all dependencies.
13360 (report_args, report_types, report_argmatch): New.
13361 (usage, getargs): Report/support -r, --report.
13362 * src/options.h
13363 (struct option_table_struct): Rename as..,
13364 (struct option_table_s): this.
13365 Rename the `set_flag' member to `flag' to match with getopt_long's
13366 struct.
13367 * src/options.c (option_table): Split verbose into an entry for
13368 %verbose, and another for --verbose.
13369 Support --report/-r, so remove -r from the obsolete --raw.
13370 * src/print.c: Attach full item sets and lookaheads reports to
13371 report_flag instead of trace_flag.
13372 * lib/argmatch.h, lib/argmatch.c: New, from Fileutils 4.1.
13373
13374 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
13375 and Paul Eggert <eggert@twinsun.com>
13376
13377 * data/bison.simple (yyparse): Correct error handling to conform to
13378 POSIX and yacc. Specifically, after syntax error is discovered,
13379 do not reduce further before shifting the error token.
13380 Clean up the code a bit by removing the labels yyerrdefault,
13381 yyerrhandle, yyerrpop.
13382 * NEWS: Document the above.
13383
13384 2002-05-20 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
13385
13386 * data/bison.simple (yyr1): Don't use yy_token_number_type as element
13387 type; it isn't always big enough, since it doesn't necessarily
13388 include non-terminals.
13389 (yytranslate): Expand definition of yy_token_number_type, so that
13390 the latter can be removed.
13391 (yy_token_number_type): Remove, only one use.
13392 * data/bison.c++ (r1_): Parallel change to yyr1 in bison.simple---
13393 don't use TokenNumberType as element type.
13394
13395 * tests/regression.at: Modify expected output to agree with change
13396 to yyr1 and yytranslate.
13397
13398 2002-05-13 Florian Krohm <florian@edamail.fishkill.ibm.com>
13399
13400 * src/reader.c (parse_action): Use copy_character instead of
13401 obstack_1grow.
13402
13403 2002-05-13 Akim Demaille <akim@epita.fr>
13404
13405 * tests/regression.at (Token definitions): Prototype yylex and
13406 yyerror.
13407
13408 2002-05-12 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
13409
13410 * src/scan-skel.l: Correct off-by-one error in handling of __oline__.
13411 * data/bison.simple (b4_sint_type, b4_uint_type): Correct to reflect
13412 32-bit arithmetic.
13413 * data/bison.c++ (b4_sint_type, b4_uint_type): Ditto.
13414
13415 2002-05-07 Akim Demaille <akim@epita.fr>
13416
13417 * tests/synclines.at: Be sure to prototype yylex and yyerror to
13418 avoid GCC warnings.
13419
13420 2002-05-07 Akim Demaille <akim@epita.fr>
13421
13422 Kill GCC warnings.
13423
13424 * src/reduce.c (nonterminals_reduce): Don't loop over RITEM: loop
13425 over the RHS of each rule.
13426 * src/gram.h, src/gram.c (nritems): Is `unsigned int', not int.
13427 * src/state.h (state_t): Member `nitems' is unsigned short.
13428 * src/LR0.c (get_state): Adjust.
13429 * src/reader.c (packgram): Likewise.
13430 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): `max' is of type
13431 `Type'.
13432 (muscle_insert_int_table): Remove, unused.
13433 (prepare_rules): Remove `max'.
13434
13435 2002-05-06 Akim Demaille <akim@epita.fr>
13436
13437 * src/closure.c (print_firsts): Display of the symbol tags.
13438 (bitmatrix_print): Move to...
13439 * lib/bitsetv-print.h, lib/bitsetv-print.c (bitsetv_matrix_dump):
13440 here.
13441 * tests/sets.at (Nullable, Broken Closure, Firsts): Adjust.
13442
13443 2002-05-06 Akim Demaille <akim@epita.fr>
13444
13445 * src/muscle_tab.c (muscle_m4_output): Must return TRUE for
13446 hash_do_for_each.
13447
13448 2002-05-06 Akim Demaille <akim@epita.fr>
13449
13450 * src/LR0.c (new_state, get_state): Instead of using the global
13451 `kernel_size' and `kernel_base', have two new arguments:
13452 `core_size' and `core'.
13453 Adjust callers.
13454
13455 2002-05-06 Akim Demaille <akim@epita.fr>
13456
13457 * src/reader.c (packgram): No longer end `ritem' with a 0
13458 sentinel: it is not used.
13459
13460 2002-05-05 Akim Demaille <akim@epita.fr>
13461
13462 New experimental feature: display the lookaheads in the report and
13463 graph.
13464
13465 * src/print (print_core): When --trace-flag, display the rules
13466 lookaheads.
13467 * src/print_graph.c (print_core): Likewise.
13468 Swap the arguments.
13469 Adjust caller.
13470
13471 2002-05-05 Akim Demaille <akim@epita.fr>
13472
13473 * tests/torture.at (Many lookaheads): New test.
13474
13475 2002-05-05 Akim Demaille <akim@epita.fr>
13476
13477 * src/output.c (GENERATE_OUTPUT_TABLE): Replace with...
13478 (GENERATE_MUSCLE_INSERT_TABLE): this.
13479 (output_int_table, output_unsigned_int_table, output_short_table)
13480 (output_token_number_table, output_item_number_table): Replace with...
13481 (muscle_insert_int_table, muscle_insert_unsigned_int_table)
13482 (muscle_insert_short_table, muscle_insert_token_number_table)
13483 (muscle_insert_item_number_table): these.
13484 Adjust all callers.
13485 (prepare_tokens): Don't free `translations', since...
13486 * src/reader.h, src/reader.c (grammar_free): do it.
13487 Move to...
13488 * src/gram.h, src/gram.c (grammar_free): here.
13489 * data/bison.simple, data/bison.c++: b4_token_number_max is now
13490 b4_translate_max.
13491
13492 2002-05-05 Akim Demaille <akim@epita.fr>
13493
13494 * src/output.c (output_unsigned_int_table): New.
13495 (prepare_rules): `i' is unsigned.
13496 `prhs', `rline', `r2' are unsigned int.
13497 Rename muscle `rhs_number_max' as `rhs_max'.
13498 Output muscles `prhs_max', `rline_max', and `r2_max'.
13499 Free rline and r1.
13500 * data/bison.simple, data/bison.c++: Adjust to use these muscles
13501 to compute types instead of constant types.
13502 * tests/regression.at (Web2c Actions): Adjust.
13503
13504 2002-05-04 Akim Demaille <akim@epita.fr>
13505
13506 * src/symtab.h (SALIAS, SUNDEF): Rename as...
13507 (USER_NUMBER_ALIAS, USER_NUMBER_UNDEFINED): these.
13508 Adjust dependencies.
13509 * src/output.c (token_definitions_output): Be sure not to output a
13510 `#define 'a'' when fed with `%token 'a' "a"'.
13511 * tests/regression.at (Token definitions): New.
13512
13513 2002-05-03 Paul Eggert <eggert@twinsun.com>
13514
13515 * data/bison.simple (b4_token_defines): Also define YYTOKENTYPE
13516 for K&R C.
13517
13518 2002-05-03 gettextize <bug-gnu-gettext@gnu.org>
13519
13520 * Makefile.am (SUBDIRS): Remove intl.
13521 (EXTRA_DIST): Add config/config.rpath.
13522
13523 2002-05-03 Akim Demaille <akim@epita.fr>
13524
13525 * data/bison.simple (m4_if): Don't output empty enums.
13526 And actually, output valid enum definitions :(.
13527
13528 2002-05-03 Akim Demaille <akim@epita.fr>
13529
13530 * configure.bat: Remove, completely obsolete.
13531 * Makefile.am (EXTRA_DIST): Adjust.
13532 Don't distribute config.rpath...
13533 * config/Makefile.am (EXTRA_DIST): Do it.
13534
13535 2002-05-03 Akim Demaille <akim@epita.fr>
13536
13537 * configure.in (GETTEXT_VERSION): New.
13538 Suggested by Bruno Haible for the forthcoming Gettext 0.10.3.
13539
13540 2002-05-03 Akim Demaille <akim@epita.fr>
13541
13542 * data/bison.simple (b4_token_enum): New.
13543 (b4_token_defines): Use it to output tokens both as #define and
13544 enums.
13545 Suggested by Paul Eggert.
13546 * src/output.c (token_definitions_output): Don't output spurious
13547 white spaces.
13548
13549 2002-05-03 Akim Demaille <akim@epita.fr>
13550
13551 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
13552
13553 2002-05-02 Robert Anisko <robert@lrde.epita.fr>
13554
13555 * data/bison.c++: Adapt expansion of $s and @s to the C++ parser.
13556 Update the stack class, give a try to deque as the default container.
13557
13558 2002-05-02 Akim Demaille <akim@epita.fr>
13559
13560 * data/bison.simple (yyparse): Do not implement @$ = @1.
13561 (YYLLOC_DEFAULT): Adjust to do it.
13562 * doc/bison.texinfo (Location Default Action): Fix.
13563
13564 2002-05-02 Akim Demaille <akim@epita.fr>
13565
13566 * src/reader.c (parse_braces): Merge into...
13567 (parse_action): this.
13568
13569 2002-05-02 Akim Demaille <akim@epita.fr>
13570
13571 * configure.in (ALL_LINGUAS): Remove.
13572 * po/LINGUAS, hr.po: New.
13573
13574 2002-05-02 Akim Demaille <akim@epita.fr>
13575
13576 Remove the so called hairy (semantic) parsers.
13577
13578 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove.
13579 * src/gram.h, src/gram.c (semantic_parser): Remove.
13580 (rule_t): Remove the guard and guard_line members.
13581 * src/lex.h (token_t): remove tok_guard.
13582 * src/options.c (option_table): Remove %guard and %semantic_parser
13583 support.
13584 * src/output.c, src/output.h (guards_output): Remove.
13585 (prepare): Adjust.
13586 (token_definitions_output): Don't output the `T'
13587 tokens (???).
13588 (output_skeleton): Don't output the guards.
13589 * src/files.c, src/files.c (attrsfile): Remove.
13590 * src/reader.c (symbol_list): Remove the guard and guard_line
13591 members.
13592 Adjust dependencies.
13593 (parse_guard): Remove.
13594 * data/bison.hairy: Remove.
13595 * doc/bison.texinfo (Environment Variables): Remove occurrences of
13596 BISON_HAIRY.
13597
13598 2002-05-02 Akim Demaille <akim@epita.fr>
13599
13600 * src/reader.c (copy_at, copy_dollarm parse_braces, parse_action)
13601 (parse_guard): Rename the formal argument `stack_offset' as
13602 `rule_length', which is more readable.
13603 Adjust callers.
13604 (copy_at, copy_dollar): Instead of outputting the hard coded
13605 values of $$, $n and so forth, output invocation to b4_lhs_value,
13606 b4_lhs_location, b4_rhs_value, and b4_rhs_location.
13607 Note: this patch partially drops `semantic-parser' support: it
13608 always does `rule_length - n', where semantic parsers ought to
13609 always use `-n'.
13610 * data/bison.simple, data/bison.c++ (b4_lhs_value)
13611 (b4_lhs_location, b4_rhs_value, and b4_rhs_location: New.
13612
13613 2002-05-02 Akim Demaille <akim@epita.fr>
13614
13615 * configure.in (AC_INIT): Bump to 1.49b.
13616 (AM_INIT_AUTOMAKE): Short invocation.
13617
13618 2002-05-02 Akim Demaille <akim@epita.fr>
13619
13620 Version 1.49a.
13621
13622 2002-05-01 Akim Demaille <akim@epita.fr>
13623
13624 * src/skeleton.h: Remove.
13625
13626 2002-05-01 Akim Demaille <akim@epita.fr>
13627
13628 * src/skeleton.h: Fix the #endif.
13629 Reported by Magnus Fromreide.
13630
13631 2002-04-26 Paul Eggert <eggert@twinsun.com>
13632
13633 * data/bison.simple (YYSTYPE_IS_TRIVIAL, YYLTYPE_IS_TRIVIAL):
13634 Define if we define YYSTYPE and YYLTYPE, respectively.
13635 (YYCOPY): Fix [] quoting problem in the non-GCC case.
13636
13637 2002-04-25 Robert Anisko <robert@lrde.epita.fr>
13638
13639 * src/scan-skel.l: Postprocess quadrigraphs.
13640
13641 * src/reader.c (copy_character): New function, used to output
13642 single characters while replacing `[' and `]' with quadrigraphs, to
13643 avoid troubles with M4 quotes.
13644 (copy_comment): Output characters with copy_character.
13645 (read_additionnal_code): Likewise.
13646 (copy_string2): Likewise.
13647 (copy_definition): Likewise.
13648
13649 * tests/calc.at: Exercise M4 quoting.
13650
13651 2002-04-25 Akim Demaille <akim@epita.fr>
13652
13653 * tests/sets.at (AT_EXTRACT_SETS): Sed portability issue: no space
13654 between `!' and the command.
13655 Reported by Paul Eggert.
13656
13657 2002-04-24 Robert Anisko <robert@lrde.epita.fr>
13658
13659 * tests/calc.at: Exercise prologue splitting.
13660
13661 * data/bison.simple, data/bison.c++: Use `b4_pre_prologue' and
13662 `b4_post_prologue' instead of `b4_prologue'.
13663
13664 * src/output.c (prepare): Add the `pre_prologue' and `post_prologue'
13665 muscles.
13666 (output): Free pre_prologue_obstack and post_prologue_obstack.
13667 * src/files.h, src/files.c (attrs_obstack): Remove.
13668 (pre_prologue_obstack, post_prologue_obstack): New.
13669 * src/reader.c (copy_definition): Add a parameter to specify the
13670 obstack to fill, instead of using attrs_obstack unconditionally.
13671 (read_declarations): Pass pre_prologue_obstack to copy_definition if
13672 `%union' has not yet been seen, pass post_prologue_obstack otherwise.
13673
13674 2002-04-23 Paul Eggert <eggert@twinsun.com>
13675
13676 * data/bison.simple: Remove unnecessary commentary and white
13677 space differences from 1_29-branch.
13678 Depend on YYERROR_VERBOSE, not defined (YYERROR_VERBOSE).
13679
13680 (union yyalloc, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYCOPY,
13681 YYSTACK_RELOCATE): Do not define if yyoverflow is defined, or
13682 if this is a C++ parser and YYSTYPE or YYLTYPE has nontrivial
13683 constructors or destructors.
13684
13685 (yyparse) [! defined YYSTACK_RELOCATE]: Do not relocate the stack.
13686
13687 2002-04-23 Akim Demaille <akim@epita.fr>
13688
13689 * tests/sets.at (AT_EXTRACT_SETS): Don't use 8 char long sed labels.
13690 * tests/synclines.at (AT_TEST_SYNCLINE): Be robust to GCC's
13691 location with columns.
13692 * tests/conflicts.at (%nonassoc and eof): Don't use `error.h'.
13693 All reported by Paul Eggert.
13694
13695 2002-04-22 Akim Demaille <akim@epita.fr>
13696
13697 * src/reduce.c (dump_grammar): Move to...
13698 * src/gram.h, src/gram.c (grammar_dump): here.
13699 Be sure to separate long item numbers.
13700 Don't read the members of a rule's prec if its nil.
13701
13702 2002-04-22 Akim Demaille <akim@epita.fr>
13703
13704 * src/output.c (table_size, table_grow): New.
13705 (MAXTABLE): Remove, replace uses with table_size.
13706 (pack_vector): Instead of dying when the table is too big, grow it.
13707
13708 2002-04-22 Akim Demaille <akim@epita.fr>
13709
13710 * data/bison.simple (yyr1): Its type is that of a token number.
13711 * data/bison.c++ (r1_): Likewise.
13712 * tests/regression.at (Web2c Actions): Adjust.
13713
13714 2002-04-22 Akim Demaille <akim@epita.fr>
13715
13716 * src/reader.c (token_translations_init): 256 is now the default
13717 value for the error token, i.e., it will be assigned another
13718 number if the user assigned 256 to one of her tokens.
13719 (reader): Don't force 256 to error.
13720 * doc/bison.texinfo (Symbols): Adjust.
13721 * tests/torture.at (AT_DATA_HORIZONTAL_GRAMMAR)
13722 (AT_DATA_TRIANGULAR_GRAMMAR): Number the tokens as 1, 2, 3
13723 etc. instead of 10, 20, 30 (which was used to `jump' over error
13724 (256) and undefined (2)).
13725
13726 2002-04-22 Akim Demaille <akim@epita.fr>
13727
13728 Propagate more token_number_t.
13729
13730 * src/gram.h (token_number_as_item_number)
13731 (item_number_as_token_number): New.
13732 * src/output.c (GENERATE_OUTPUT_TABLE): New.
13733 Use it to create output_item_number_table and
13734 output_token_number_table.
13735 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
13736 * src/lex.c, src/nullable.c, src/output.c, src/print.c,
13737 * src/print_graph.c, src/reader.c, src/reduce.c, src/state.h,
13738 * src/symtab.c, src/symtab.h: Use token_number_t instead of shorts.
13739
13740 2002-04-22 Akim Demaille <akim@epita.fr>
13741
13742 * src/output.h, src/output.c (get_lines_number): Remove.
13743
13744 2002-04-19 Akim Demaille <akim@epita.fr>
13745
13746 * doc/bison.texinfo (Actions): Make clear that `|' is not the same
13747 as Lex/Flex'.
13748 (Debugging): More details about enabling the debugging features.
13749 (Table of Symbols): Describe $$, $n, @$, and @n.
13750 Suggested by Tim Josling.
13751
13752 2002-04-19 Akim Demaille <akim@epita.fr>
13753
13754 * doc/bison.texinfo: Remove the uses of the obsolete @refill.
13755
13756 2002-04-10 Akim Demaille <akim@epita.fr>
13757
13758 * src/system.h: Rely on HAVE_LIMITS_H.
13759 Suggested by Paul Eggert.
13760
13761 2002-04-09 Akim Demaille <akim@epita.fr>
13762
13763 * tests/calc.at (_AT_CHECK_CALC_ERROR): Receive as argument the
13764 full stderr, and strip it according to the bison options, instead
13765 of composing the error message from different bits.
13766 This makes it easier to check for several error messages.
13767 Adjust all the invocations.
13768 Add an invocation exercising the error token.
13769 Add an invocation demonstrating a stupid error message.
13770 (_AT_DATA_CALC_Y): Follow the GCS: initial column is 1, not 0.
13771 Adjust the tests.
13772 Error message are for stderr, not stdout.
13773
13774 2002-04-09 Akim Demaille <akim@epita.fr>
13775
13776 * src/gram.h, src/gram.c (error_token_number): Remove, use
13777 errtoken->number.
13778 * src/reader.c (reader): Don't specify the user token number (2)
13779 for $undefined, as it uselessly prevents using it.
13780 * src/gram.h (token_number_t): Move to...
13781 * src/symtab.h: here.
13782 (state_t.number): Is a token_number_t.
13783 * src/print.c, src/reader.c: Use undeftoken->number instead of
13784 hard coded 2.
13785 (Even though this 2 is not the same as above: the number of the
13786 undeftoken remains being 2, it is its user token number which
13787 might not be 2).
13788 * src/output.c (prepare_tokens): Rename the `maxtok' muscle with
13789 `user_token_number_max'.
13790 Output `undef_token_number'.
13791 * data/bison.simple, data/bison.c++: Use them.
13792 Be sure to map invalid yylex return values to
13793 `undef_token_number'. This saves us from gratuitous SEGV.
13794
13795 * tests/conflicts.at (Solved SR Conflicts)
13796 (Unresolved SR Conflicts): Adjust.
13797 * tests/regression.at (Web2c Actions): Adjust.
13798
13799 2002-04-08 Akim Demaille <akim@epita.fr>
13800
13801 * data/bison.c++: s/b4_item_number_max/b4_rhs_number_max/.
13802 Adding #line.
13803 Remove the duplicate `typedefs'.
13804 (RhsNumberType): Fix the declaration and various other typos.
13805 Use __ofile__.
13806 * data/bison.simple: Use __ofile__.
13807 * src/scan-skel.l: Handle __ofile__.
13808
13809 2002-04-08 Akim Demaille <akim@epita.fr>
13810
13811 * src/gram.h (item_number_t): New, the type of item numbers in
13812 RITEM. Note that it must be able to code symbol numbers as
13813 positive number, and the negation of rule numbers as negative
13814 numbers.
13815 Adjust all dependencies (pretty many).
13816 * src/reduce.c (rule): Remove this `short *' pointer: use
13817 item_number_t.
13818 * src/system.h (MINSHORT, MAXSHORT): Remove.
13819 Include `limits.h'.
13820 Adjust dependencies to using SHRT_MAX and SHRT_MIN.
13821 (shortcpy): Remove.
13822 (MAXTABLE): Move to...
13823 * src/output.c (MAXTABLE): here.
13824 (prepare_rules): Use output_int_table to output rhs.
13825 * data/bison.simple, data/bison.c++: Adjust.
13826 * tests/torture.at (Big triangle): Move the limit from 254 to
13827 500.
13828 * tests/regression.at (Web2c Actions): Ajust.
13829
13830 Trying with bigger grammars shows various phenomena: at 3000 (28Mb
13831 of grammar file) bison is killed by my system, at 2000 (12Mb) bison
13832 passes, but produces negative #line number, once fixed, GCC is
13833 killed while compiling 14Mb, at 1500 (6.7 Mb of grammar, 8.2Mb of
13834 C), it passes.
13835 * src/state.h (state_h): Code input lines on ints, not shorts.
13836
13837 2002-04-08 Akim Demaille <akim@epita.fr>
13838
13839 * src/reduce.c (reduce_grammar): First reduce the nonterminals,
13840 and then the grammar.
13841
13842 2002-04-08 Akim Demaille <akim@epita.fr>
13843
13844 * src/system.h: No longer using strndup.
13845
13846 2002-04-07 Akim Demaille <akim@epita.fr>
13847
13848 * src/muscle_tab.h (MUSCLE_INSERT_LONG_INT): New.
13849 * src/output.c (output_table_data): Return the longest number.
13850 (prepare_tokens): Output `token_number_max').
13851 * data/bison.simple, data/bison.c++ (b4_sint_type, b4_uint_type):
13852 New.
13853 Use them to define yy_token_number_type/TokenNumberType.
13854 Use this type for yytranslate.
13855 * tests/torture.at (Big triangle): Push the limit from 124 to
13856 253.
13857 * tests/regression.at (Web2c Actions): Adjust.
13858
13859 2002-04-07 Akim Demaille <akim@epita.fr>
13860
13861 * tests/torture.at (Big triangle): New.
13862 (GNU AWK Grammar, GNU Cim Grammar): Move to...
13863 * tests/existing.at: here.
13864
13865 2002-04-07 Akim Demaille <akim@epita.fr>
13866
13867 * src/gram.h, src/gram.c (nitems): Remove, it is an alias of
13868 nritems.
13869 Adjust dependencies.
13870
13871 2002-04-07 Akim Demaille <akim@epita.fr>
13872
13873 * src/reader.c: Normalize increments to prefix form.
13874
13875 2002-04-07 Akim Demaille <akim@epita.fr>
13876
13877 * src/reader.c, symtab.c: Remove debugging code.
13878
13879 2002-04-07 Akim Demaille <akim@epita.fr>
13880
13881 Rename all the `bucket's as `symbol_t'.
13882
13883 * src/gram.c, src/gram.h, src/lex.c, src/lex.h, src/output.c,
13884 * src/reader.c, src/reader.h, src/reduce.c, src/state.h,
13885 * src/symtab.c, src/symtab.h (bucket): Rename as...
13886 (symbol_t): this.
13887 (symbol_list_new, bucket_check_defined, bucket_make_alias)
13888 (bucket_check_alias_consistence, bucket_pack, bucket_translation)
13889 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
13890 (buckets_new, buckets_free, buckets_do): Rename as...
13891 (symbol_list_new, symbol_check_defined, symbol_make_alias)
13892 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
13893 (symbol_new, symbol_free, hash_compare_symbol_t, hash_symbol_t)
13894 (symbols_new, symbols_free, symbols_do): these.
13895
13896 2002-04-07 Akim Demaille <akim@epita.fr>
13897
13898 Use lib/hash for the symbol table.
13899
13900 * src/gram.c (ntokens): Initialize to 1, to reserve a slot for
13901 EOF.
13902 * src/lex.c (lex): Set the `number' member of new terminals.
13903 * src/reader.c (bucket_check_defined, bucket_make_alias)
13904 (bucket_check_alias_consistence, bucket_translation): New.
13905 (reader, grammar_free, readgram, token_translations_init)
13906 (packsymbols): Adjust.
13907 (reader): Number the predefined tokens.
13908 * src/reduce.c (inaccessable_symbols): Just use hard coded numbers
13909 for predefined tokens.
13910 * src/symtab.h (bucket): Remove all the hash table related
13911 members.
13912 * src/symtab.c (symtab): Replace by...
13913 (bucket_table): this.
13914 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
13915 (buckets_new, buckets_do): New.
13916
13917 2002-04-07 Akim Demaille <akim@epita.fr>
13918
13919 * src/gram.c (nitems, nrules, nsyms, ntokens, nvars, nritems)
13920 (start_symbol, max_user_token_number, semantic_parser)
13921 (error_token_number): Initialize.
13922 * src/reader.c (grammar, start_flag, startval, typed, lastprec):
13923 Initialize.
13924 (reader): Don't.
13925 (errtoken, eoftoken, undeftoken, axiom): Extern.
13926
13927 2002-04-07 Akim Demaille <akim@epita.fr>
13928
13929 * src/gram.h (rule_s): prec and precsym are now pointers
13930 to the bucket giving the priority/associativity.
13931 Member `associativity' removed: useless.
13932 * src/reduce.c, src/conflicts.c: Adjust.
13933
13934 2002-04-07 Akim Demaille <akim@epita.fr>
13935
13936 * src/lalr.c, src/LR0.c, src/closure.c, src/gram.c, src/reduce.c:
13937 Properly escape the symbols' TAG when outputting them.
13938
13939 2002-04-07 Akim Demaille <akim@epita.fr>
13940
13941 * src/lalr.h (LA): Is a bitsetv, not bitset*.
13942
13943 2002-04-07 Akim Demaille <akim@epita.fr>
13944
13945 * src/lalr.h, src/lalr.c (LAruleno): Replace with...
13946 (LArule): this, which is an array to rule_t*.
13947 * src/print.c, src/conflicts.c: Adjust.
13948
13949 2002-04-07 Akim Demaille <akim@epita.fr>
13950
13951 * src/gram.h (rule_t): Rename `number' as `user_number'.
13952 `number' is a new member.
13953 Adjust dependencies.
13954 * src/reduce.c (reduce_grammar_tables): Renumber rule_t.number.
13955
13956 2002-04-07 Akim Demaille <akim@epita.fr>
13957
13958 As a result of the previous patch, it is no longer needed
13959 to reorder ritem itself.
13960
13961 * src/reduce.c (reduce_grammar_tables): Don't sort RITEM.
13962
13963 2002-04-07 Akim Demaille <akim@epita.fr>
13964
13965 Be sure never to walk through RITEMS, but use only data related to
13966 the rules themselves. RITEMS should be banished.
13967
13968 * src/output.c (output_token_translations): Rename as...
13969 (prepare_tokens): this.
13970 In addition to `translate', prepare the muscles `tname' and
13971 `toknum', which were handled by...
13972 (output_rule_data): this.
13973 Remove, and move the remainder of its outputs into...
13974 (prepare_rules): this new routines, which also merges content from
13975 (output_gram): this.
13976 (prepare_rules): Be sure never to walk through RITEMS.
13977 (output_stos): Rename as...
13978 (prepare_stos): this.
13979 (output): Always invoke prepare_states, after all, just don't use it
13980 in the output if you don't need it.
13981
13982 2002-04-07 Akim Demaille <akim@epita.fr>
13983
13984 * src/LR0.c (new_state): Display `nstates' as the name of the
13985 newly created state.
13986 Adjust to initialize first_state and last_state if needed.
13987 Be sure to distinguish the initial from the final state.
13988 (new_states): Create the itemset of the initial state, and use
13989 new_state.
13990 * src/closure.c (closure): Now that the initial state has its
13991 items properly set, there is no need for a special case when
13992 creating `ruleset'.
13993
13994 As a result, now the rule 0, reducing to $axiom, is visible in the
13995 outputs. Adjust the test suite.
13996
13997 * tests/conflicts.at (Solved SR Conflicts)
13998 (Unresolved SR Conflicts): Adjust.
13999 * tests/regression.at (Web2c Report, Rule Line Numbers): Idem.
14000 * tests/conflicts.at (S/R in initial): New.
14001
14002 2002-04-07 Akim Demaille <akim@epita.fr>
14003
14004 * src/LR0.c (allocate_itemsets): Don't loop over ritem: loop over
14005 the RHS of the rules.
14006 * src/output.c (output_gram): Likewise.
14007
14008 2002-04-07 Akim Demaille <akim@epita.fr>
14009
14010 * src/gram.h (rule_t): `lhs' is now a pointer to the symbol's
14011 bucket.
14012 Adjust all dependencies.
14013 * src/reduce.c (nonterminals_reduce): Don't forget to renumber the
14014 `number' of the buckets too.
14015 * src/gram.h: Include `symtab.h'.
14016 (associativity): Move to...
14017 * src/symtab.h: here.
14018 No longer include `gram.h'.
14019
14020 2002-04-07 Akim Demaille <akim@epita.fr>
14021
14022 * src/gram.h, src/gram.c (rules_rhs_length): New.
14023 (ritem_longest_rhs): Use it.
14024 * src/gram.h (rule_t): `number' is a new member.
14025 * src/reader.c (packgram): Set it.
14026 * src/reduce.c (reduce_grammar_tables): Move the useless rules at
14027 the end of `rules', and count them out of `nrules'.
14028 (reduce_output, dump_grammar): Adjust.
14029 * src/print.c (print_grammar): It is no longer needed to check for
14030 the usefulness of a rule, as useless rules are beyond `nrules + 1'.
14031 * tests/reduce.at (Reduced Automaton): New test.
14032
14033 2002-04-07 Akim Demaille <akim@epita.fr>
14034
14035 * src/reduce.c (inaccessable_symbols): Fix a buglet: because of a
14036 lacking `+ 1' to nrules, Bison reported as useless a token if it
14037 was used solely to set the precedence of the last rule...
14038
14039 2002-04-07 Akim Demaille <akim@epita.fr>
14040
14041 * data/bison.c++, data/bison.simple: Don't output the current file
14042 name in #line, to avoid useless diffs between two identical
14043 outputs under different names.
14044
14045 2002-04-07 Akim Demaille <akim@epita.fr>
14046
14047 * src/closure.c, src/print.c, src/reader.c, src/reduce.c:
14048 Normalize loops to using `< nrules + 1', not `<= nrules'.
14049
14050 2002-04-07 Akim Demaille <akim@epita.fr>
14051
14052 * TODO: Update.
14053
14054 2002-04-07 Akim Demaille <akim@epita.fr>
14055
14056 * src/output.c, src/reader.c, src/symtab.c, src/symtab.h: Rename
14057 bucket.value as bucket.number.
14058
14059 2002-04-07 Akim Demaille <akim@epita.fr>
14060
14061 * src/closure.c, src/derives.c, src/gram.h, src/lalr.c,
14062 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
14063 * src/reader.c, src/reduce.c: Let rule_t.rhs point directly to the
14064 RHS, instead of being an index in RITEMS.
14065
14066 2002-04-04 Paul Eggert <eggert@twinsun.com>
14067
14068 * doc/bison.texinfo: Update copyright date.
14069 (Rpcalc Lexer, Symbols, Token Decl): Don't assume ASCII.
14070 (Symbols): Warn about running Bison in one character set,
14071 but compiling and/or running in an incompatible one.
14072 Warn about character code 256, too.
14073
14074 2002-04-03 Paul Eggert <eggert@twinsun.com>
14075
14076 * src/bison.data (YYSTACK_ALLOC): Depend on whether
14077 YYERROR_VERBOSE is nonzero, not whether it is defined.
14078
14079 Merge changes from bison-1_29-branch.
14080
14081 2002-03-20 Paul Eggert <eggert@twinsun.com>
14082
14083 Merge fixes from Debian bison_1.34-1.diff.
14084
14085 * configure.in (AC_PREREQ): 2.53.
14086
14087 2002-03-20 Akim Demaille <akim@epita.fr>
14088
14089 * src/conflicts.c (log_resolution): Argument `resolution' is const.
14090
14091 2002-03-19 Paul Eggert <eggert@twinsun.com>
14092
14093 * src/bison.simple (YYCOPY): New macro.
14094 (YYSTACK_RELOCATE): Use it.
14095 Remove Type arg; no longer needed. All callers changed.
14096 (yymemcpy): Remove; no longer needed.
14097
14098 * Makefile.am (AUTOMAKE_OPTIONS): 1.6.
14099 * doc/Makefile.am (AUTOMAKE_OPTIONS): Remove.
14100
14101 2002-03-19 Akim Demaille <akim@epita.fr>
14102
14103 Test and fix the #line outputs.
14104
14105 * tests/atlocal.at (GCC): New.
14106 * tests/synclines.at (AT_TEST_SYNCLINE): New macro.
14107 (Prologue synch line, %union synch line, Postprologue synch line)
14108 (Action synch line, Epilogue synch line): New tests.
14109 * src/reader.c (parse_union_decl): Define the muscle stype_line.
14110 * data/bison.simple, data/bison.c++: Use it.
14111
14112 2002-03-19 Akim Demaille <akim@epita.fr>
14113
14114 * tests/regression.at (%nonassoc and eof, Unresolved SR Conflicts)
14115 (Solved SR Conflicts, %expect not enough, %expect right)
14116 (%expect too much): Move to...
14117 * tests/conflicts.at: this new file.
14118
14119 2002-03-19 Akim Demaille <akim@epita.fr>
14120
14121 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
14122 * data/bison.simple, data/bison.c++: Handle the `#define' part, so
14123 that we can move to enums for instance.
14124 * src/output.c (token_definitions_output): Output a list of
14125 `token-name, token-number' instead of the #define.
14126 (output_skeleton): Name this list `b4_tokens', not `b4_tokendefs'.
14127
14128 2002-03-14 Akim Demaille <akim@epita.fr>
14129
14130 Use Gettext 0.11.1.
14131
14132 2002-03-09 Robert Anisko <robert@lrde.epita.fr>
14133
14134 * data/bison.c++: Make the user able to add members to the generated
14135 parser by subclassing.
14136
14137 2002-03-05 Robert Anisko <robert@lrde.epita.fr>
14138
14139 * src/reader.c (read_additionnal_code): `c' should be an integer, not
14140 a character.
14141 Reported by Nicolas Tisserand and Nicolas Burrus.
14142
14143 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
14144
14145 * src/reader.c: Warn about lacking semi-colons, do not complain.
14146
14147 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
14148
14149 * data/bison.c++: Remove a debug line.
14150
14151 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
14152
14153 * data/bison.c++: Unmerge value as yylval and value as yyval. Unmerge
14154 location as yylloc and location as yyloc. Use YYLLOC_DEFAULT, and
14155 provide a default implementation.
14156
14157 2002-03-04 Akim Demaille <akim@epita.fr>
14158
14159 * tests/input.at (Invalid $n, Invalid @n): Add the ending `;'.
14160 * tests/output.at (AT_CHECK_OUTPUT): Likewise.
14161 * tests/headers.at (AT_TEST_CPP_GUARD_H): Ditto.
14162 * tests/semantic.at (Parsing Guards): Similarly.
14163 * src/reader.at (readgram): Complain if the last rule is not ended
14164 with a semi-colon.
14165
14166 2002-03-04 Akim Demaille <akim@epita.fr>
14167
14168 * src/warshall.h, src/warshall.c (bitmatrix_print): Move to...
14169 * src/closure.c: here.
14170 (set_firsts): Use bitsetv_reflexive_transitive_closure instead of
14171 RTC.
14172 * src/warshall.h, src/warshall.c: Remove.
14173 * tests/sets.at (Broken Closure): Adjust.
14174
14175 2002-03-04 Akim Demaille <akim@epita.fr>
14176
14177 * src/output.c (output_skeleton): tempdir is const.
14178 bytes_read is unused.
14179
14180 2002-03-04 Akim Demaille <akim@epita.fr>
14181
14182 * lib/bbitset.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
14183 * lib/bitsetv.h, lib/ebitset.c, lib/lbitset.c, lib/sbitset.c:
14184 Update.
14185 From Michael Hayes.
14186
14187 2002-03-04 Akim Demaille <akim@epita.fr>
14188
14189 * src/closure.c (closure): `r' is unused.
14190
14191 2002-03-04 Akim Demaille <akim@epita.fr>
14192
14193 * tests/sets.at (Broken Closure): Add the ending `;'.
14194 * src/reader.at (readgram): Complain if a rule is not ended with a
14195 semi-colon.
14196
14197 2002-03-04 Akim Demaille <akim@epita.fr>
14198
14199 * src/conflicts.c (set_conflicts): Use bitset_disjoint_p.
14200 (count_sr_conflicts): Use bitset_count.
14201 * src/reduce.c (inaccessable_symbols): Ditto.
14202 (bits_size): Remove.
14203 * src/warshall.h, src/warshall.c: Convert to bitsetv.
14204
14205 2002-03-04 Akim Demaille <akim@epita.fr>
14206
14207 * src/closure.c, src/conflicts.c, src/lalr.c, src/print.c,
14208 * src/reduce.c: Remove the `bitset_zero's following the
14209 `bitset_create's, as now it is performed by the latter.
14210
14211 2002-03-04 Akim Demaille <akim@epita.fr>
14212
14213 * lib/bitset.c, lib/bitset.h, lib/bitsetv.c, lib/bitsetv.h,
14214 * lib/ebitset.c, lib/ebitset.h, lib/lbitset.c, lib/lbitset.h,
14215 * lib/sbitset.c, lib/sbitset.h, lib/bbitset.h: Update from the
14216 latest sources from Michael.
14217
14218 2002-03-04 Akim Demaille <akim@epita.fr>
14219
14220 * src/output.c (output): Don't free the grammar.
14221 * src/reader.c (grammar_free): New.
14222 * src/main.c (main): Call it and don't free symtab here.
14223
14224 2002-03-04 Akim Demaille <akim@epita.fr>
14225
14226 * src/lex.c (parse_percent_token): Be sure to 0-end token_buffer
14227 before returning.
14228 Reported by Benoit Perrot.
14229
14230 2002-03-04 Akim Demaille <akim@epita.fr>
14231
14232 Use bitset operations when possible, not loops over bits.
14233
14234 * src/conflicts.c (set_conflicts, count_sr_conflicts): Use
14235 bitset_or.
14236 * src/print.c (print_reductions): Use bitset_and, bitset_andn.
14237 * src/reduce.c (useless_nonterminals): Formatting changes.
14238 * src/warshall.c (TC): Use bitset_or.
14239
14240 2002-03-04 Akim Demaille <akim@epita.fr>
14241
14242 * src/lalr.h, src/lalr.c (tokensetsize): Remove, unused.
14243 * src/system.h (BITS_PER_WORD, WORDSIZE, SETBIT, RESETBIT, BITISSET):
14244 Ditto.
14245
14246 2002-03-04 Akim Demaille <akim@epita.fr>
14247
14248 * src/lalr.c (F): Now a bitset*.
14249 Adjust all dependencies.
14250
14251 2002-03-04 Akim Demaille <akim@epita.fr>
14252
14253 * src/conflicts.c (shiftset, lookaheadset): Now bitset.
14254 Adjust all dependencies.
14255
14256 2002-03-04 Akim Demaille <akim@epita.fr>
14257
14258 * src/L0.c, src/LR0.h (nstates): Be size_t.
14259 Adjust comparisons (signed vs unsigned).
14260 * src/conflics.c, src/lalr.c, src/lalr.h, src/output.c (LA): Now a
14261 bitset*.
14262 Adjust all dependencies.
14263
14264 2002-03-04 Akim Demaille <akim@epita.fr>
14265
14266 * src/closure.c (firsts): Now, also a bitset.
14267 Adjust all dependencies.
14268 (varsetsize): Remove, now unused.
14269 * src/warshall.h, src/warshall.c: Now work on arrays of bitsets.
14270
14271 2002-03-04 Akim Demaille <akim@epita.fr>
14272
14273 * src/print.c: Convert to use bitset.h, not hand coded iterations
14274 over ints.
14275
14276 2002-03-04 Akim Demaille <akim@epita.fr>
14277
14278 * src/reduce.c: Convert to use bitset.h, not hand coded BSet.
14279
14280 2002-03-04 Akim Demaille <akim@epita.fr>
14281
14282 * src/closure.c (ruleset): Be a bitset.
14283 (rulesetsize): Remove.
14284
14285 2002-03-04 Akim Demaille <akim@epita.fr>
14286
14287 * lib/bitset-int.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
14288 * lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/lbitset.c,
14289 * lib/lbitset.h, lib/sbitset.c, lib/sbitset.h: New.
14290 * src/closure.c (fderives): Be an array of bitsets.
14291
14292 2002-02-28 Robert Anisko <robert@lrde.epita.fr>
14293
14294 * data/bison.c++: Merge the two generated headers. Insert a copyright
14295 notice in each output file.
14296
14297 2002-02-28 Akim Demaille <akim@epita.fr>
14298
14299 * data/bison.c++: Copy the prologue of bison.simple to fetch
14300 useful M4 definitions, such as b4_header_guard.
14301
14302 2002-02-25 Akim Demaille <akim@epita.fr>
14303
14304 * src/getargs.c (version): Give the name of the authors, and use a
14305 translator friendly scheme for the bgr
14306 copyright notice.
14307
14308 2002-02-25 Akim Demaille <akim@epita.fr>
14309
14310 * src/output.c (header_output): Remove, now handled completely via
14311 M4.
14312
14313 2002-02-25 Akim Demaille <akim@epita.fr>
14314
14315 * m4/m4.m4: New, from CVS Autoconf.
14316 * configure.in: Invoke it.
14317 * src/output.c (output_skeleton): Use its result instead of the
14318 hard coded name.
14319
14320 2002-02-25 Akim Demaille <akim@epita.fr>
14321
14322 * lib/tempname.c, lib/mkstemp.c, m4/mkstemp.m4: New, stolen from
14323 Fileutils 4.1.5.
14324 * configure.in: Invoke UTILS_FUNC_MKSTEMP.
14325 * src/output.c (output_skeleton): Use mkstemp to create a real
14326 temporary file.
14327 Move the filling of `skeleton' and its muscle to...
14328 (prepare): here.
14329 (output): Move the definition of the prologue muscle to...
14330 (prepare): here.
14331 * src/system.h (DEFAULT_TMPDIR): New.
14332
14333 2002-02-14 Paul Eggert <eggert@twinsun.com>
14334
14335 Remove the support for C++ namespace cleanliness; it was
14336 causing more problems than it was curing, since it didn't work
14337 properly on some nonstandard C++ compilers. This can wait
14338 for a proper C++ parser.
14339
14340 * NEWS: Document this.
14341 * doc/bison.texinfo (Bison Parser, Debugging): Remove special mention
14342 of C++, as it's treated like C now.
14343 * src/bison.simple (YYSTD): Remove.
14344 (YYSIZE_T, YYFPRINTF, YYPARSE_PARAM_ARG, YYPARSE_PARAM_DECL):
14345 Treat C++ just like Standard C instead of trying to support
14346 namespace cleanliness.
14347
14348 2002-02-14 Akim Demaille <akim@epita.fr>
14349
14350 * tests/regression.at (else): Adjust to Andreas' change.
14351
14352 2002-02-14 Akim Demaille <akim@epita.fr>
14353
14354 * lib/Makefile.am (EXTRA_DIST): Ship strnlen.c.
14355
14356 2002-02-13 Andreas Schwab <schwab@suse.de>
14357
14358 * src/output.c (output_rule_data): Don't output NULL, it might
14359 not be defined yet.
14360
14361 2002-02-11 Robert Anisko <robert@lrde.epita.fr>
14362
14363 * data/bison.c++ (YYDEBUG, YYERROR_VERBOSE): After the prologue.
14364 (Copyright notice): Update.
14365
14366 2002-02-11 Akim Demaille <akim@epita.fr>
14367
14368 * tests/regression.at (%nonassoc and eof): Don't include
14369 nonportable headers.
14370
14371 2002-02-08 Robert Anisko <robert@lrde.epita.fr>
14372
14373 * data/bison.c++: Correct error recovery. Make the user able to
14374 initialize the starting location.
14375
14376 2002-02-07 Akim Demaille <akim@epita.fr>
14377
14378 * tests/input.at: New.
14379
14380 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
14381
14382 * data/bison.c++: Replace some direct m4 expansions by constants. Be
14383 more consistent when naming methods and variables. Put preprocessor
14384 directives around tables only needed for debugging.
14385
14386 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
14387
14388 * data/bison.c++ (yy::b4_name::print_): New method, replaces yyprint in
14389 C++ parsers.
14390 (yy::b4_name::parse): Use print_.
14391
14392 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
14393
14394 * data/bison.c++ (yy::b4_name::parse): Error recovery is back.
14395
14396 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
14397
14398 * data/bison.c++ (yy::b4_name::error_): New method, replaces yyerror in
14399 C++ parsers.
14400 (yy::b4_name::parse): Build verbose error messages, and use error_.
14401
14402 2002-02-06 Robert Anisko <robert@lrde.epita.fr>
14403
14404 * data/bison.c++: Fix m4 quoting in comments.
14405
14406 2002-02-06 Robert Anisko <robert@lrde.epita.fr>
14407
14408 * data/bison.c++: Adjust the parser code. Fix some muscles that were
14409 not expanded by m4.
14410
14411 2002-02-05 Akim Demaille <akim@epita.fr>
14412
14413 * data/bison.c++: Adjust to the M4 back end.
14414 More is certainly needed.
14415
14416 2002-02-05 Akim Demaille <akim@epita.fr>
14417
14418 Give a try to M4 as a back end.
14419
14420 * lib/readpipe.c: New, from wdiff.
14421 * src/Makefile.am (DEFS): Define PKGDATADIR, not BISON_SIMPLE and
14422 BISON_HAIRY.
14423 * src/system.h (BISON_HAIRY, BISON_SIMPLE): Remove the DOS and VMS
14424 specific values. Now it is m4 that performs the lookup.
14425 * src/parse-skel.y: Remove.
14426 * src/muscle_tab.c, src/muscle_tab.h (muscles_m4_output): New.
14427 * src/output.c (actions_output, guards_output)
14428 (token_definitions_output): No longer keeps track of the output
14429 line number, hence remove the second argument.
14430 (guards_output): Check against the guard member of a rule, not the
14431 action member.
14432 Adjust callers.
14433 (output_skeleton): Don't look for the skeleton location, let m4 do
14434 that.
14435 Create `/tmp/muscles.m4'. This is temporary, a proper temporary
14436 file will be used.
14437 Invoke `m4' on m4sugar.m4, muscles.m4, and the skeleton.
14438 (prepare): Given that for the time being changesyntax is not
14439 usable in M4, rename the muscles using `-' to `_'.
14440 Define `defines_flag', `output_parser_name' and `output_header_name'.
14441 * src/output.h (actions_output, guards_output)
14442 (token_definitions_output): Adjust prototypes.
14443 * src/scan-skel.l: Instead of scanning the skeletons, it now
14444 processes the output of m4: `__oline__' and `#output'.
14445 * data/bison.simple: Adjust to be used by M4(sugar).
14446 * tests/Makefile.am: Use check_SCRIPTS to make sure `bison' is up
14447 to date.
14448 * tests/bison.in: Use the secrete envvar `BISON_PKGDATADIR'
14449 instead of the dead `BISON_SIMPLE' and `BISON_HAIRY'.
14450 * data/m4sugar/m4sugar.m4, data/m4sugar/version.m4: New,
14451 shamelessly stolen from CVS Autoconf.
14452
14453 2002-02-05 Akim Demaille <akim@epita.fr>
14454
14455 * lib/hash.c, lib/hash.h: Replace with Fileutils 4.1's version.
14456 * configure.in: Check for the declarations of free and malloc.
14457 * src/muscle_tab.c: Adjust.
14458
14459 2002-02-05 Akim Demaille <akim@epita.fr>
14460
14461 * src/muscle_tab.c (muscle_init): Don't default to NULL muscle
14462 which have no values.
14463
14464 2002-02-05 Akim Demaille <akim@epita.fr>
14465
14466 * src/bison.simple, src/bison.hairy, src/bison.c++: Move to...
14467 * data/: here.
14468
14469 2002-01-29 Paul Eggert <eggert@twinsun.com>
14470
14471 * src/bison.simple (YYSIZE_T): Do not define merely because
14472 YYSTACK_USE_ALLOCA is nonzero or alloca or _ALLOCA_H are defined.
14473 On some platforms, <alloca.h> does not declare YYSTD (size_t).
14474
14475 2002-01-27 Akim Demaille <akim@epita.fr>
14476
14477 Fix `%nonassoc and eof'.
14478
14479 * src/state.c (errs_dup): Aaaah! The failure was due to bytes
14480 which were not properly copied! Replace
14481 memcpy (res->errs, src->errs, src->nerrs);
14482 with
14483 memcpy (res->errs, src->errs, src->nerrs * sizeof (src->errs[0]));
14484 !!!
14485 * tests/regression.at (%nonassoc and eof): Adjust to newest
14486 Autotest: `.' is not in the PATH.
14487
14488 2002-01-27 Akim Demaille <akim@epita.fr>
14489
14490 * tests/sets.at (AT_EXTRACT_SETS): New.
14491 (Nullable): Use it.
14492 (Firsts): New.
14493
14494 2002-01-26 Akim Demaille <akim@epita.fr>
14495
14496 * tests/actions.at, tests/calc.at, tests/headers.at,
14497 * tests/torture.at: Adjust to the newest Autotest which no longer
14498 forces `.' in the PATH.
14499
14500 2002-01-25 Akim Demaille <akim@epita.fr>
14501
14502 * tests/regression.at (%nonassoc and eof): New.
14503 Suggested by Robert Anisko.
14504
14505 2002-01-24 Akim Demaille <akim@epita.fr>
14506
14507 Bison dumps core when trying to complain about broken input files.
14508 Reported by Cris van Pelt.
14509
14510 * src/lex.c (parse_percent_token): Be sure to set token_buffer.
14511 * tests/regression.at (Invalid input: 1, Invalid input: 2): Merge
14512 into...
14513 (Invalid inputs): Strengthen: exercise parse_percent_token.
14514
14515 2002-01-24 Robert Anisko <robert.anisko@epita.fr>
14516
14517 * src/Makefile.am: Add bison.c++.
14518 * src/bison.c++: New skeleton.
14519
14520 2002-01-21 Paolo Bonzini <bonzini@gnu.org>
14521
14522 * po/it.po: New.
14523
14524 2002-01-21 Kees Zeelenberg <kzlg@users.sourceforge.net>
14525
14526 * src/files.c (skeleton_find) [MSDOS]: Fix cp definition.
14527
14528 2002-01-20 Marc Autret <marc@gnu.org>
14529
14530 * src/files.c (compute_output_file_names): Fix
14531
14532 2002-01-20 Marc Autret <marc@gnu.org>
14533
14534 * tests/output.at: New test.
14535 * src/files.c (compute_base_names): Don't map extensions when
14536 the YACC flag is set, use defaults.
14537 Reported by Evgeny Stambulchik.
14538
14539 2002-01-20 Marc Autret <marc@gnu.org>
14540
14541 * src/system.h: Need to define __attribute__ away for non-GCC
14542 compilers as well (i.e., the vendor C compiler).
14543 Suggested by Albert Chin-A-Young.
14544
14545 2002-01-11 Tim Van Holder <tim.van.holder@pandora.be>
14546
14547 * lib/hash.h, lib/hash.c: Renamed __P to PARAMS and used the
14548 canonical definition.
14549 * src/system.h: Use the canonical definition for PARAMS (avoids
14550 a conflict with the macro from lib/hash.h).
14551
14552 2002-01-11 Akim Demaille <akim@epita.fr>
14553
14554 * configure.in: Use AC_FUNC_STRNLEN.
14555 Fixes the failures observed on AIX 4.3 by H.Merijn Brand.
14556
14557 2002-01-09 Akim Demaille <akim@epita.fr>
14558
14559 * src/files.c, src/files.h (output_infix): New.
14560 (tab_extension): Remove.
14561 (compute_base_names): Compute the former, drop the latter.
14562 * src/output.c (prepare): Insert the muscles `output-infix', and
14563 `output-suffix'.
14564 * src/parse-skel.y (string, string.1): New.
14565 (section.header): Use it.
14566 (section.yacc): Remove.
14567 (prefix): Remove too.
14568 * src/scan-skel.l: Adjust.
14569 * src/bison.simple, src/bison.hairy: Adjust.
14570
14571 2002-01-09 Akim Demaille <akim@epita.fr>
14572
14573 * configure.in (WERROR_CFLAGS): Compute it.
14574 * src/Makefile.am (CFLAGS): Pass it.
14575 * tests/atlocal.in (CFLAGS): Idem.
14576 * src/files.c: Fix a few warnings.
14577 (get_extension_index): Remove, unused.
14578
14579 2002-01-08 Akim Demaille <akim@epita.fr>
14580
14581 * src/getargs.c (AS_FILE_NAME): New.
14582 (getargs): Use it to convert DOSish file names.
14583 * src/files.c (base_name): Rename as full_base_name to avoid
14584 clashes with `base_name ()'.
14585 (filename_split): New.
14586 (compute_base_names): N-th rewrite, using filename_split.
14587
14588 2002-01-08 Akim Demaille <akim@epita.fr>
14589
14590 * lib/basename.c, lib/dirname.h, lib/dirname.c, lib/memrchr.c:
14591 New, stolen from the Fileutils 4.1.
14592 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
14593 * configure.in: Check for the presence of memrchr, and of its
14594 prototype.
14595
14596 2002-01-07 Tim Van Holder <tim.van.holder@pandora.be>
14597
14598 * lib/hash.h (__P): Added definition for this macro.
14599 * src/Makefile.am: Add parse-skel.c and scan-skel.c to
14600 BUILT_SOURCES, to ensure they are generated first.
14601 * src/parse-skel.y: Use YYERROR_VERBOSE instead of
14602 %error-verbose to allow bootstrapping with bison 1.30x.
14603
14604 2002-01-06 Akim Demaille <akim@epita.fr>
14605
14606 * src/reader.c (parse_braces): Don't fetch the next char, the
14607 convention is to fetch on entry.
14608 * tests/torture.at (GNU Cim Grammar): Reintroduce their weird
14609 'switch' without a following semicolon.
14610 * tests/regression.at (braces parsing): New.
14611
14612 2002-01-06 Akim Demaille <akim@epita.fr>
14613
14614 Bison is dead wrong in its RR conflict reports.
14615
14616 * tests/torture.at (GNU Cim Grammar): New.
14617 * src/conflicts.c (count_rr_conflicts): Fix.
14618
14619 2002-01-06 Akim Demaille <akim@epita.fr>
14620
14621 Creating package.m4 from configure.ac causes too many problems.
14622
14623 * tests/Makefile.am (package.m4): Create it by hand,
14624 AC_CONFIG_TESTDIR no longer does in the most recent CVS Autoconf.
14625
14626 2002-01-06 Akim Demaille <akim@epita.fr>
14627
14628 * src/Makefile.am (bison_SOURCES): Add parse-skel.h and
14629 skeleton.h.
14630
14631 2002-01-04 Paul Eggert <eggert@twinsun.com>
14632
14633 * doc/bison.texinfo (Debugging):
14634 Remove YYSTDERR; it's no longer defined or used.
14635 Also, s/cstdio.h/cstdio/.
14636
14637 2002-01-03 Akim Demaille <akim@epita.fr>
14638
14639 * tests/bison.in, tests/atlocal.in: Adjust to CVS Autoconf.
14640
14641 2002-01-03 Akim Demaille <akim@epita.fr>
14642
14643 * src/parse-skel.y (process_skeleton): Don't bind the parser's
14644 tracing code to --trace, wait for a better --trace option, with
14645 args.
14646
14647 2002-01-03 Akim Demaille <akim@epita.fr>
14648
14649 * src/bison.simple (YYSTDERR): Remove, replace `stderr'.
14650 The ISO C++ standard is extremely clear about it: stderr is
14651 considered a macro, not a regular symbol (see table 94 `Header
14652 <cstdio> synopsis', [lib.c.files] 27.8.2 C Library files).
14653 Therefore std:: does not apply to it. It still does with fprintf.
14654 Also, s/cstdio.h/cstdio/.
14655
14656 2002-01-03 Akim Demaille <akim@epita.fr>
14657
14658 * lib/quotearg.c: Use `#include "..."' instead of `#include <...>'
14659 for non system headers.
14660
14661 2002-01-02 Akim Demaille <akim@epita.fr>
14662
14663 Equip the skeleton chain with location tracking, runtime trace,
14664 pure parser and scanner.
14665
14666 * src/parse-skel.y: Request a pure parser, locations, and prefix
14667 renaming.
14668 (%union): Having several members with the same type does not help
14669 type mismatches, simplify.
14670 (YYPRINT, yyprint): New.
14671 (yyerror): ``Rename'' (there is a #define yyerror skel_error) as...
14672 (skel_error): this.
14673 Handle locations.
14674 * src/scan-skel.l: Adjust to these changes.
14675 * src/skeleton.h (LOCATION_RESET, LOCATION_LINES, LOCATION_STEP)
14676 (LOCATION_PRINT, skel_control_t): New.
14677
14678 2001-12-30 Akim Demaille <akim@epita.fr>
14679
14680 * src/parse-skel.y: Get rid of the shift/reduce conflict:
14681 replace `gb' with BLANKS.
14682 * src/scan-skel.l: Adjust.
14683
14684 2001-12-30 Akim Demaille <akim@epita.fr>
14685
14686 * src/system.h: We don't need nor want bcopy.
14687 Throw away MS-DOS crap: we don't need getpid.
14688 * configure.in: We don't need strndup. It was even causing
14689 problems: because Flex includes the headers *before* us,
14690 _GNU_SOURCE is not defined by config.h, and therefore strndup was
14691 not visible.
14692 * lib/xstrndup.c: New.
14693 * src/scan-skel.l: Use it.
14694 Be sure to initialize yylval.muscle member when scanning a MUSCLE.
14695 * src/parse-skel.y: Use %directives instead of #defines.
14696
14697 2001-12-30 Akim Demaille <akim@epita.fr>
14698
14699 * src/skeleton.h: New.
14700 * src/output.c (output_parser, output_master_parser): Remove, dead
14701 code.
14702 * src/output.h (get_lines_number, actions_output, guards_output)
14703 (token_definitions_output): Prototype them.
14704 * src/parse-skel.y: Add the license notice.
14705 Include output.h and skeleton.h.
14706 (process_skeleton): Returns void, and takes a single parameter.
14707 * src/scan-skel.l: Add the license notice.
14708 Include skeleton.h.
14709 Don't use %option yylineno: it seems that then Flex imagines
14710 REJECT has been used, and therefore it won't reallocate its
14711 buffers (which makes no other sense to me than a bug). It results
14712 in warnings for `unused: yy_flex_realloc'.
14713
14714 2001-12-30 Robert Anisko <robert.anisko@epita.fr>
14715
14716 * src/muscle_tab.h (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
14717 (MUSCLE_INSERT_PREFIX): ...to there.
14718 * src/output.c (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
14719 (MUSCLE_INSERT_PREFIX): Move from here...
14720
14721 * src/bison.hairy: Add a section directive. Put braces around muscle
14722 names. This parser skeleton is still broken, but Bison should not
14723 choke on a bad muscle 'syntax'.
14724 * src/bison.simple: Add a section directive. Put braces around muscle
14725 names.
14726
14727 * src/files.h (strsuffix, stringappend): Add declarations.
14728 (tab_extension): Add declaration.
14729 (short_base_name): Add declaration.
14730
14731 * src/files.c (strsuffix, stringappend): No longer static. These
14732 functions are used in the skeleton parser.
14733 (tab_extension): New.
14734 (compute_base_names): Use the computations done in this function
14735 to guess if the generated parsers should have '.tab' in their
14736 names.
14737 (short_base_name): No longer static.
14738
14739 * src/output.c (output_skeleton): New.
14740 (output): Disable call to output_master_parser, and give a try to
14741 a new skeleton handling system.
14742 (guards_output, actions_output): No longer static.
14743 (token_definitions_output, get_lines_number): No longer static.
14744
14745 * configure.in: Use AM_PROG_LEX and AC_PROG_YACC.
14746
14747 * src/Makefile.am (bison_SOURCES): Add scan-skel.l and
14748 parse-skel.y.
14749
14750 * src/parse-skel.y: New file.
14751 * src/scan-skel.l: New file.
14752
14753 2001-12-29 Akim Demaille <akim@epita.fr>
14754
14755 %name-prefix is broken.
14756
14757 * src/files.c (spec_name_prefix): Initialize to NULL, not to "yy".
14758 Adjust all dependencies.
14759 * tests/headers.at (export YYLTYPE): Strengthen this test: use
14760 %name-prefix.
14761
14762 Renaming yylval but not yylloc is not consistent. Now we do.
14763
14764 * src/bison.simple: Prefix yylloc if used.
14765 * doc/bison.texinfo (Decl Summary): Document that.
14766
14767 2001-12-29 Akim Demaille <akim@epita.fr>
14768
14769 * doc/bison.texinfo: Promote `%long-directive' over
14770 `%long_directive'.
14771 Remove all references to fixed-output-files, yacc is enough.
14772
14773 2001-12-29 Akim Demaille <akim@epita.fr>
14774
14775 * src/bison.simple: Define YYDEBUG and YYERROR_VERBOSE *after* the
14776 user prologue. These are defaults.
14777 * tests/actions.at (Mid-rule actions): Make sure the user can
14778 define YYDEBUG and YYERROR_VERBOSE.
14779
14780 2001-12-29 Akim Demaille <akim@epita.fr>
14781
14782 * src/output.c (header_output): Don't forget to export YYLTYPE and
14783 yylloc.
14784 * tests/headers.at (export YYLTYPE): New, make sure it does.
14785 * tests/regression.at (%union and --defines, Invalid CPP headers):
14786 Move to...
14787 * tests/headers.at: here.
14788
14789 2001-12-29 Akim Demaille <akim@epita.fr>
14790
14791 * src/gram.h (rule_s): Member `assoc' is of type `associativity'.
14792
14793 2001-12-29 Akim Demaille <akim@epita.fr>
14794
14795 * tests/actions.at (Mid-rule actions): Output on a single line
14796 instead of several.
14797
14798 2001-12-29 Akim Demaille <akim@epita.fr>
14799
14800 * doc/bison.texinfo: Formatting changes.
14801
14802 2001-12-29 Akim Demaille <akim@epita.fr>
14803
14804 Don't store the token defs in a muscle, just be ready to output it
14805 on command. Now possible via `symbols'. Fixes a memory leak.
14806
14807 * src/output.c (token_definitions_output): New.
14808 (output_parser, header_output): Use it.
14809 * src/reader.c (symbols_save): Remove.
14810
14811 2001-12-29 Akim Demaille <akim@epita.fr>
14812
14813 * src/bison.simple: Do not provide a default for YYSTYPE and
14814 YYLTYPE before the user's prologue. Otherwise it's hardly... a
14815 default.
14816
14817 2001-12-29 Akim Demaille <akim@epita.fr>
14818
14819 Mid-rule actions are simply... ignored!
14820
14821 * src/reader.c (readgram): Be sure to attach mid-rule actions to
14822 the empty-rule associated to the dummy symbol, not to the host
14823 rule.
14824 * tests/actions.at (Mid-rule actions): New.
14825
14826 2001-12-29 Akim Demaille <akim@epita.fr>
14827
14828 Memory leak.
14829
14830 * src/reader.c (reader): Free grammar.
14831
14832 2001-12-29 Akim Demaille <akim@epita.fr>
14833
14834 Memory leak.
14835
14836 * src/LR0.c (new_itemsets): Don't allocate `shift_symbol' here,
14837 since it allocates it for each state, although only one is needed.
14838 (allocate_storage): Do it here.
14839
14840 2001-12-29 Akim Demaille <akim@epita.fr>
14841
14842 * src/options.h, src/options.c (create_long_option_table): Rename
14843 as...
14844 (long_option_table_new): this, with a clearer prototype.
14845 (percent_table): Remove, unused,
14846 * src/getargs.c (getargs): Adjust.
14847
14848 2001-12-29 Akim Demaille <akim@epita.fr>
14849
14850 * src/LR0.c, src/conflicts.c, src/lalr.c, src/lalr.h, src/output.c
14851 * src/print.c, src/print_graph.c, src/state.h: Rename state_table
14852 as states.
14853
14854 2001-12-29 Akim Demaille <akim@epita.fr>
14855
14856 * src/lalr.c (build_relations): Rename `states' as `states1'.
14857 Sorry, I don't understand exactly what it is, no better name...
14858
14859 2001-12-29 Akim Demaille <akim@epita.fr>
14860
14861 * src/closure.c, src/conflicts.c, src/derives.c, src/gram.c
14862 * src/gram.h, src/lalr.c, src/nullable.c, src/output.c, src/print.c
14863 * src/print_graph.c, src/reader.c, src/reduce.c: Rename rule_table
14864 as rules.
14865
14866 2001-12-29 Akim Demaille <akim@epita.fr>
14867
14868 * src/gram.c (rprec, rprecsym, rassoc): Remove, unused since long
14869 ago.
14870
14871 2001-12-29 Akim Demaille <akim@epita.fr>
14872
14873 * src/reader.c, src/reader.h (user_toknums): Remove.
14874 Adjust all users to use symbols[i]->user_token_number.
14875
14876 2001-12-29 Akim Demaille <akim@epita.fr>
14877
14878 * src/gram.c, src/gram.h (sprec, sassoc): Remove.
14879 Adjust all users to use symbols[i]->prec or ->assoc.
14880
14881 2001-12-29 Akim Demaille <akim@epita.fr>
14882
14883 * src/reader.c, src/reader.h (tags): Remove.
14884 Adjust all users to use symbols[i]->tag.
14885
14886 2001-12-29 Akim Demaille <akim@epita.fr>
14887
14888 * src/gram.h, src/gram.c (symbols): New, similar to state_table
14889 and rule_table.
14890 * src/reader.c (packsymbols): Fill this table.
14891 Drop sprec.
14892 * src/conflicts.c (resolve_sr_conflict): Adjust.
14893 * src/reduce.c (reduce_grammar): Adjust: just sort symbols, a
14894 single table.
14895 Use symbols[i]->tag instead of tags[i].
14896
14897 2001-12-29 Akim Demaille <akim@epita.fr>
14898
14899 * tests/calc.at (_AT_DATA_CALC_Y): Also use %union.
14900 In addition, put a comment in there, to replace...
14901 * tests/regression.at (%union and C comments): Remove.
14902
14903 2001-12-29 Akim Demaille <akim@epita.fr>
14904
14905 * tests/regression.at (Web2c Actions): Blindly move the actual
14906 output as expected output. The contents *seem* right to me, but I
14907 can't pretend reading perfectly parser tables... Nonetheless, all
14908 the other tests pass correctly, the table look OK, even though the
14909 presence of `$axiom' is to be noted: AFAICS it is useless (but
14910 harmless).
14911
14912 2001-12-29 Akim Demaille <akim@epita.fr>
14913
14914 * src/reader.c (readgram): Don't add the rule 0 if there were no
14915 rules read. In other words, add it _after_ having performed
14916 grammar sanity checks.
14917 Fixes the `tests/regression.at (Invalid input: 1)' Failure.
14918
14919 2001-12-29 Akim Demaille <akim@epita.fr>
14920
14921 * tests/regression.at (Web2c Report): Catch up: the rule 0 is now
14922 visible, and some states have now a different number.
14923
14924 2001-12-29 Akim Demaille <akim@epita.fr>
14925
14926 * src/reader.c (readgram): Bind the initial rule's lineno to that
14927 of the first rule.
14928 * tests/regression.at (Rule Line Numbers, Unresolved SR Conflicts):
14929 (Solved SR Conflicts): Adjust rule 0's line number.
14930
14931 2001-12-29 Akim Demaille <akim@epita.fr>
14932
14933 Fix the `GAWK Grammar' failure.
14934
14935 * src/LR0.c (final_state): Initialize to -1 so that we do compute
14936 the reductions of the first state which was mistakenly confused
14937 with the final state because precisely final_state was initialized
14938 to 0.
14939 * tests/sets.at (Nullable): Adjust: state 0 does have lookaheads,
14940 now noticed by Bison.
14941 * tests/regression.at (Rule Line Numbers): Adjust: state 0 does
14942 have a reduction on $default.
14943
14944 2001-12-29 Akim Demaille <akim@epita.fr>
14945
14946 * src/gram.c (ritem_print): Be sure to subtract 1 when displaying
14947 rule line numbers.
14948 * src/closure.c (print_closure): Likewise.
14949 * src/derives.c (print_derives): Likewise.
14950 * tests/sets.at (Nullable): Adjust: the rule numbers are correct
14951 now.
14952
14953 2001-12-29 Akim Demaille <akim@epita.fr>
14954
14955 * src/lalr.c (lookaheads_print): New.
14956 (lalr): Call it when --trace-flag.
14957 * tests/sets.at (Nullable): Adjust: when tracing, the lookaheads
14958 are dumped.
14959
14960 2001-12-29 Akim Demaille <akim@epita.fr>
14961
14962 * src/derives.c (print_derives): Be sure to use `>= 0', not `> 0',
14963 when walking through ritem, even via rule->rhs.
14964 * src/reduce.c (dump_grammar, useful_production, reduce_output)
14965 (useful_production, useless_nonterminals): Likewise.
14966 (reduce_grammar_tables): Likewise, plus update nritems.
14967 * src/nullable.c (set_nullable): Likewise.
14968 * src/lalr.c (build_relations): Likewise.
14969 * tests/sets.at (Nullable): Adjust.
14970 Fortunately, now, the $axiom is no longer nullable.
14971
14972 2001-12-29 Akim Demaille <akim@epita.fr>
14973
14974 * src/LR0.c (generate_states): Use nritems, not nitems, nor using
14975 the 0-sentinel.
14976 * src/gram.c (ritem_longest_rhs): Likewise.
14977 * src/reduce.c (nonterminals_reduce): Likewise.
14978 * src/print_graph.c (print_graph): Likewise.
14979 * src/output.c (output_rule_data): Likewise.
14980 * src/nullable.c (set_nullable): Likewise.
14981
14982 2001-12-29 Akim Demaille <akim@epita.fr>
14983
14984 * src/output.c: Comment changes.
14985
14986 2001-12-27 Paul Eggert <eggert@twinsun.com>
14987
14988 * src/bison.simple (YYSTACK_ALLOC, YYSIZE_T): Remove special
14989 cases for non-GNU systems like AIX, HP-UX, SGI, Sun, and
14990 Sparc, as they were causing more porting problems than the
14991 (minor) performance improvement was worth.
14992
14993 Also, catch up with 1.31's YYSTD.
14994
14995 2001-12-27 Akim Demaille <akim@epita.fr>
14996
14997 * src/output.c (output_gram): Rely on nritems, not the
14998 0-sentinel. See below.
14999 Use -1 as separator, not 0.
15000 * src/bison.simple (yyparse): Subtract 1 to the rule numbers.
15001 Rely on -1 as separator in yyrhs, instead of 0.
15002 * tests/calc.at (AT_CHECK_CALC): Now, the parsers no longer issue
15003 twice `Now at end of input', therefore there are two lines less to
15004 expect.
15005
15006 2001-12-27 Akim Demaille <akim@epita.fr>
15007
15008 * tests/regression.at (Unresolved SR Conflicts):
15009 (Solved SR Conflicts, Rule Line Numbers): Adjust to the changes
15010 below.
15011
15012 2001-12-27 Akim Demaille <akim@epita.fr>
15013
15014 * src/LR0.c (new_state): Recognize the final state by the fact it
15015 is reached by eoftoken.
15016 (insert_start_shifting_state, insert_eof_shifting_state)
15017 (insert_accepting_state, augment_automaton): Remove, since now
15018 these states are automatically computed from the initial state.
15019 (generate_states): Adjust.
15020 * src/print.c: When reporting a rule number to the user, substract
15021 1, so that the axiom rule is rule 0, and the first user rule is 1.
15022 * src/reduce.c: Likewise.
15023 * src/print_graph.c (print_core): For the time being, just as for
15024 the report, depend upon --trace-flags to dump the full set of
15025 items.
15026 * src/reader.c (readgram): Once the grammar read, insert the rule
15027 0: `$axiom: START-SYMBOL $'.
15028 * tests/set.at: Adjust: rule 0 is now displayed, and since the
15029 number of the states has changed (the final state is no longer
15030 necessarily the last), catch up.
15031
15032 2001-12-27 Akim Demaille <akim@epita.fr>
15033
15034 Try to make the use of the eoftoken valid. Given that its value
15035 is 0 which was also used as a sentinel in ritem, (i) make sure >= 0
15036 is used instead of > 0 where appropriate, (ii), depend upon nritems
15037 instead of the 0-sentinel.
15038
15039 * src/gram.h, src/gram.c (nritems): New.
15040 Expected to be duplication of nitems, but for the time being...
15041 * src/reader.c (packgram): Assert nritems and nitems are equal.
15042 * src/LR0.c (allocate_itemsets, new_itemsets): Adjust.
15043 * src/closure.c (print_closure, print_fderives): Likewise.
15044 * src/gram.c (ritem_print): Likewise.
15045 * src/print.c (print_core, print_grammar): Likewise.
15046 * src/print_graph.c: Likewise.
15047
15048 2001-12-27 Akim Demaille <akim@epita.fr>
15049
15050 * src/main.c (main): If there are complains after grammar
15051 reductions, then output the report anyway if requested, then die.
15052 * src/symtab.c (bucket_new): Initialize `value' to -1, not 0.
15053 * src/reader.c (eoftoken): New.
15054 (parse_token_decl): If the token being defined has value `0', it
15055 is the eoftoken.
15056 (packsymbols): No longer hack `tags' to insert `$' by hand.
15057 Be sure to preserve the value of the eoftoken.
15058 (reader): Make sure eoftoken is defined.
15059 Initialize nsyms to 0: now eoftoken is created just like the others.
15060 * src/print.c (print_grammar): Don't special case the eof token.
15061 * src/regression.at: Adjust: `$' has value 0, not -1, which was a
15062 lie anyway, albeit pleasant.
15063 * tests/calc.at: Exercise error messages with eoftoken.
15064 Change the grammar so that empty input is invalid.
15065 Adjust expectations.
15066 When yyungeting, be sure to use a valid yylloc: use last_yylloc.
15067
15068 2001-12-27 Akim Demaille <akim@epita.fr>
15069
15070 * configure.in: Check the protos of strchr ans strspn.
15071 Replace strchr if needed.
15072 * src/system.h: Provide the protos of strchr, strspn and memchr if
15073 missing.
15074 * lib/strchr.c: New.
15075 * src/reader.c (symbols_save): Use strchr.
15076
15077 2001-12-27 Akim Demaille <akim@epita.fr>
15078
15079 * src/print.c, src/print_graph.c (escape): New.
15080 Use it to quote the TAGS outputs.
15081 * src/print_graph.c (print_state): Now errors are in red, and
15082 reductions in green.
15083 Prefer high to wide: output the state number on a line of its own.
15084
15085 2001-12-27 Akim Demaille <akim@epita.fr>
15086
15087 * src/state.h, src/state.c (reductions_new): New.
15088 * src/LR0.c (set_state_table): Let all the states have a
15089 `reductions', even if reduced to 0.
15090 (save_reductions): Adjust.
15091 * src/lalr.c (initialize_LA, initialize_lookaheads): Adjust.
15092 * src/print.c (print_reductions, print_actions): Adjust.
15093 * src/output.c (action_row): Adjust.
15094
15095 2001-12-27 Akim Demaille <akim@epita.fr>
15096
15097 * src/state.h, src/state.c (errs_new, errs_dup): New.
15098 * src/LR0.c (set_state_table): Let all the states have an errs,
15099 even if reduced to 0.
15100 * src/print.c (print_errs, print_reductions): Adjust.
15101 * src/output.c (output_actions, action_row): Adjust.
15102 * src/conflicts.c (resolve_sr_conflict): Adjust.
15103
15104 2001-12-27 Akim Demaille <akim@epita.fr>
15105
15106 * src/lalr.c (set_goto_map, initialize_F): Use SHIFT_SYMBOL.
15107
15108 2001-12-27 Akim Demaille <akim@epita.fr>
15109
15110 * src/conflicts.c, src/conflicts.h (print_reductions): Move to...
15111 * src/print.c: here.
15112 (lookaheadset, shiftset): New, used as additional storage by
15113 print_reductions.
15114 (print_results): Adjust.
15115 (print_shifts, print_gotos, print_errs): New, extracted from...
15116 (print_actions): here.
15117 * src/print_graph.c (print_actions): Remove dead code.
15118
15119 2001-12-27 Akim Demaille <akim@epita.fr>
15120
15121 * src/reader.c (copy_dollar, copy_at): Better checking of `n' in
15122 `$n' and `@n'.
15123
15124 2001-12-27 Akim Demaille <akim@epita.fr>
15125
15126 * src/lalr.c (add_lookback_edge): Use state_t instead of ints.
15127 (build_relations): Adjust.
15128
15129 2001-12-27 Akim Demaille <akim@epita.fr>
15130
15131 * src/lalr.c (set_goto_map): Remove a wrong but benign loop
15132 duplication.
15133
15134 2001-12-27 Akim Demaille <akim@epita.fr>
15135
15136 * src/reader.c (packgram): Catch nitems overflows.
15137
15138 2001-12-27 Akim Demaille <akim@epita.fr>
15139
15140 * src/files.c, src/files.h (guard_obstack): Remove.
15141 * src/output.c (output): Adjust.
15142 * src/reader.c (parse_braces): New, factoring...
15143 (copy_action, copy_guard): these two which are renamed as...
15144 (parse_action, parse_guard): these.
15145 As a voluntary consequence, using braces around guards is now
15146 mandatory.
15147
15148 2001-12-27 Akim Demaille <akim@epita.fr>
15149
15150 * src/gram.h (rule_t): `guard' and `guard_line' are new members.
15151 * src/reader.c (symbol_list): `guard' and `guard_line' are new
15152 members.
15153 (symbol_list_new): Adjust.
15154 (copy_action): action_line is the first line, not the last.
15155 (copy_guard): Just as for actions, store the `action' only, not
15156 the switch/case/break flesh.
15157 Don't parse the user action that might follow the guard, let...
15158 (readgram): do it, i.e., now, there can be an action after a
15159 guard.
15160 In other words the guard is just explicitly optional.
15161 (packgram): Adjust.
15162 * src/output.c (guards_output): New.
15163 (output_parser): Call it when needed.
15164 (output): Also free the guard and attrs obstacks.
15165 * src/files.c, src/files.h (obstack_save): Remove.
15166 (output_files): Remove.
15167 As a result, if one needs the former `.act' file, using an
15168 appropriate skeleton which requires actions and guards is now
15169 required.
15170 * src/main.c (main): Adjust.
15171 * tests/semantic.at: New.
15172 * tests/regression.at: Use `input.y' as input file name.
15173 Avoid 8+3 problems by requiring input.c when the test needs the
15174 parser.
15175
15176 2001-12-27 Akim Demaille <akim@epita.fr>
15177
15178 * src/reader.c (symbol_list_new): Be sure to initialize all the
15179 fields.
15180
15181 2001-12-27 Akim Demaille <akim@epita.fr>
15182
15183 All the hacks using a final pseudo state are now useless.
15184
15185 * src/LR0.c (set_state_table): state_table holds exactly nstates.
15186 * src/lalr.c (nLA): New.
15187 (initialize_LA, compute_lookaheads, initialize_lookaheads): Use it
15188 instead of lookaheadsp from the pseudo state (nstate + 1).
15189
15190 2001-12-27 Akim Demaille <akim@epita.fr>
15191
15192 * src/output.c (action_row, token_actions): Use a state_t instead
15193 of a integer, and nlookaheads instead of the following state's
15194 lookaheadsp.
15195
15196 2001-12-27 Akim Demaille <akim@epita.fr>
15197
15198 * src/conflicts.c (log_resolution, flush_shift)
15199 (resolve_sr_conflict, set_conflicts, solve_conflicts)
15200 (count_sr_conflicts, count_rr_conflicts, conflicts_output)
15201 (conflicts_print, print_reductions): Use a state_t instead of an
15202 integer when referring to a state.
15203 As much as possible, depend upon nlookaheads, instead of the
15204 `lookaheadsp' member of the following state (since lookaheads of
15205 successive states are successive, the difference between state n + 1
15206 and n served as the number of lookaheads for state n).
15207 * src/lalr.c (add_lookback_edge): Likewise.
15208 * src/print.c (print_core, print_actions, print_state)
15209 (print_results): Likewise.
15210 * src/print_graph.c (print_core, print_actions, print_state)
15211 (print_graph): Likewise.
15212 * src/conflicts.h: Adjust.
15213
15214 2001-12-27 Akim Demaille <akim@epita.fr>
15215
15216 * src/bison.hairy: Formatting/comment changes.
15217 ANSIfy.
15218 Remove `register' indications.
15219 Add plenty of `static'.
15220
15221 2001-12-27 Akim Demaille <akim@epita.fr>
15222
15223 * src/output.c (prepare): Drop the muscle `ntbase' which
15224 duplicates ntokens.
15225 * src/bison.simple: Formatting/comment changes.
15226 Use YYNTOKENS only, which is documented, but not YYNTBASE, which
15227 is an undocumented synonym.
15228
15229 2001-12-22 Akim Demaille <akim@epita.fr>
15230
15231 * src/output.c (output_table_data): Change the prototype to use
15232 `int' for array ranges: some invocations do pass an int, not a
15233 short.
15234 Reported by Wayne Green.
15235
15236 2001-12-22 Akim Demaille <akim@epita.fr>
15237
15238 Some actions of web2c.y are improperly triggered.
15239 Reported by Mike Castle.
15240
15241 * src/lalr.c (traverse): s/F (i)[k] = F (j)[k]/F (j)[k] = F (i)[k]/.
15242 * tests/regression.at (Web2c): Rename as...
15243 (Web2c Report): this.
15244 (Web2c Actions): New.
15245
15246 2001-12-22 Akim Demaille <akim@epita.fr>
15247
15248 Reductions in web2c.y are improperly reported.
15249 Reported by Mike Castle.
15250
15251 * src/conflicts.c (print_reductions): Fix.
15252 * tests/regression.at (Web2c): New.
15253
15254 2001-12-18 Akim Demaille <akim@epita.fr>
15255
15256 Some host fail on `assert (!"foo")', which expands to
15257 ((!"foo") ? (void)0 : __assert("!"foo."", __FILE__, __LINE__))
15258 Reported by Nelson Beebee.
15259
15260 * src/output.c, src/vcg.c: Replace `assert (!"it succeeded")' with
15261 `#define it_succeeded 0' and `assert (it_succeeded)'.
15262
15263 2001-12-17 Marc Autret <autret_m@epita.fr>
15264
15265 * src/bison.simple: Don't hard code the skeleton line and filename.
15266 * src/output.c (output_parser): Rename 'line' as 'output_line'.
15267 New line counter 'skeleton_line' (skeleton-line muscle).
15268
15269 2001-12-17 Paul Eggert <eggert@twinsun.com>
15270
15271 * NEWS, doc/bison.texinfo, doc/bison.1, doc/bison.rnh: Document that
15272 YYDEBUG must be defined to a nonzero value.
15273
15274 * src/bison.simple (yytname): Do not assume that the user defines
15275 YYDEBUG to a properly parenthesized expression.
15276
15277 2001-12-17 Akim Demaille <akim@epita.fr>
15278
15279 * src/state.h (state_t): Rename lookaheads as lookaheadsp.
15280 nlookaheads is a new member.
15281 Adjust all users.
15282 * src/lalr.h (nlookaheads): Remove this orphan declaration.
15283 * src/lalr.c (initialize_lookaheads): Set nlookaheads for each
15284 state.
15285
15286 2001-12-17 Akim Demaille <akim@epita.fr>
15287
15288 * src/files.h, src/files.c (open_files, close_files): Remove.
15289 * src/main.c (main): Don't open/close files, nor invoke lex_free,
15290 let...
15291 * src/reader.c (reader): Do it.
15292
15293 2001-12-17 Akim Demaille <akim@epita.fr>
15294
15295 * src/conflicts.c (print_reductions): Formatting changes.
15296
15297 2001-12-17 Akim Demaille <akim@epita.fr>
15298
15299 * src/conflicts.c (flush_shift): Also adjust lookaheadset.
15300 (flush_reduce): New.
15301 (resolve_sr_conflict): Adjust.
15302
15303 2001-12-17 Akim Demaille <akim@epita.fr>
15304
15305 * src/output.c (output_obstack): Be static and rename as...
15306 (format_obstack): this, to avoid any confusion with files.c's
15307 output_obstack.
15308 * src/reader.h (muscle_obstack): Move to...
15309 * src/output.h: here, since it's defined in output.c.
15310
15311 2001-12-17 Akim Demaille <akim@epita.fr>
15312
15313 * src/output.c (action_row, save_column, default_goto)
15314 (sort_actions, matching_state, pack_vector): Better variable
15315 locality.
15316
15317 2001-12-17 Akim Demaille <akim@epita.fr>
15318
15319 * src/output.c: Various formatting changes.
15320
15321 2001-12-17 Akim Demaille <akim@epita.fr>
15322
15323 * src/files.c (output_files): Free the output_obstack.
15324 * src/main.c (main): Call print and print_graph conditionally.
15325 * src/print.c (print): Work unconditionally.
15326 * src/print_graph.c (print_graph): Work unconditionally.
15327 * src/conflicts.c (log_resolution): Output only if verbose_flag.
15328
15329 2001-12-16 Marc Autret <autret_m@epita.fr>
15330
15331 * src/output.c (actions_output): Fix. When we use %no-lines,
15332 there is one less line per action.
15333
15334 2001-12-16 Marc Autret <autret_m@epita.fr>
15335
15336 * src/bison.simple: Remove a useless #line directive.
15337 s/#line %%line %%skeleton/#line %%line "%%parser-file-name"/'.
15338 * src/output.c (get_lines_number): New.
15339 (output_parser): Adjust, now takes care about the lines of a
15340 output muscles.
15341 Fix line numbering.
15342 (actions_output): Computes the number of lines taken by actions.
15343 (output_master_parser): Insert new skeleton which is the name of
15344 the output parser file name.
15345
15346 2001-12-15 Marc Autret <autret_m@epita.fr>
15347
15348 * src/bison.simple [YYERROR_VERBOSE]: Restore backward compatibility.
15349
15350 2001-12-15 Marc Autret <autret_m@epita.fr>
15351
15352 * src/output.c (output_gram): Keep track of the hairy one.
15353
15354 2001-12-15 Akim Demaille <akim@epita.fr>
15355
15356 Make `make distcheck' work.
15357
15358 * lib/Makefile.am (INCLUDES): Add top_srcdir/intl, since hash uses
15359 system.h which uses libgettext.h.
15360
15361 2001-12-15 Akim Demaille <akim@epita.fr>
15362
15363 * src/nullable.c (set_nullable): Useless rules must be skipped,
15364 otherwise, since we range over their symbols, we might look at a
15365 nonterminal which no longer ``exists'', i.e., it is not counted in
15366 `nvars', hence we overflow our arrays.
15367
15368 2001-12-15 Akim Demaille <akim@epita.fr>
15369
15370 The header can also be produced directly, without any obstack!
15371 Yahoo!
15372
15373 * src/files.c, src/files.h (defines_obstack): Remove.
15374 (compute_header_macro): Global.
15375 (defines_obstack_save): Remove.
15376 * src/reader.c (parse_union_decl): No longer output to
15377 defines_obstack: its content can be found in the `stype' muscle
15378 anyway.
15379 (output_token_translations): Merge into...
15380 (symbols_output): this.
15381 Rename as...
15382 (symbols_save): this.
15383 (reader): Adjust.
15384 * src/output.c (header_output): New.
15385 (output): Call it.
15386
15387 2001-12-15 Akim Demaille <akim@epita.fr>
15388
15389 * src/reader.c (parse_union_decl): Instead of handling two obstack
15390 simultaneously, use one to define the `stype' muscle, and use the
15391 value of the latter to fill defines_obstack.
15392 (copy_comment): Remove.
15393 (copy_comment2): Work for a single obstack.
15394 Rename as...
15395 (copy_comment): this.
15396
15397 2001-12-15 Akim Demaille <akim@epita.fr>
15398
15399 * src/lex.c, src/lex.h (xgetc): No longer static.
15400 * src/reader.c (parse_union_decl): Revamp.
15401
15402 2001-12-15 Akim Demaille <akim@epita.fr>
15403
15404 Still making progress in separating Bison into (i) input, (ii)
15405 process, (iii) output: now we can directly output the parser file
15406 without using table_obstack at all.
15407
15408 * src/files.c, src/files.h (table_obstack): Bye bye.
15409 (parser_file_name): New.
15410 * src/files.c (compute_output_file_names): Compute it.
15411 * src/output.c (actions_output, output_parser)
15412 (output_master_parser): To a file instead of an obstack.
15413
15414 2001-12-15 Akim Demaille <akim@epita.fr>
15415
15416 Attach actions to rules, instead of pre-outputting them to
15417 actions_obstack.
15418
15419 * src/gram.h (rule_t): action and action_line are new members.
15420 * src/reader.c (symbol_list): Likewise.
15421 (copy_action): Save the actions within the rule.
15422 (packgram): Save them in rule_table.
15423 * src/output.c (actions_output): New.
15424 (output_parser): Use it on `%%actions'.
15425 (output_rule_data): Don't free rule_table.
15426 (output): Do it.
15427 (prepare): Don't save the `action' muscle.
15428 * src/bison.simple: s/%%action/%%actions/.
15429
15430 2001-12-15 Akim Demaille <akim@epita.fr>
15431
15432 * src/reader.c (copy_action): When --yacc, don't append a `;'
15433 to the user action: let it fail if lacking.
15434 Suggested by Arnold Robbins and Tom Tromey.
15435
15436 2001-12-14 Akim Demaille <akim@epita.fr>
15437
15438 * src/lex.c (literalchar): Simply return the char you decoded, non
15439 longer mess around with obstacks and int pointers.
15440 Adjust all callers.
15441
15442 2001-12-14 Akim Demaille <akim@epita.fr>
15443
15444 * src/lex.c (literalchar): Don't escape the special characters,
15445 just decode them, and keep them as char (before, eol was output as
15446 the 2 char string `\n' etc.).
15447 * src/output.c (output_rule_data): Use quotearg to output the
15448 token strings.
15449
15450 2001-12-13 Paul Eggert <eggert@twinsun.com>
15451
15452 * src/bison.simple (YYSIZE_T, YYSTACK_ALLOC, YYSTACK_FREE):
15453 Do not infringe on the global user namespace when using C++.
15454 (YYFPRINTF, YYSTDERR): New macros, needed for the above.
15455 All uses of `fprintf' and `stderr' changed.
15456
15457 * doc/bison.texinfo: Document YYFPRINTF, YYSTDERR.
15458
15459 2001-12-13 Akim Demaille <akim@epita.fr>
15460
15461 The computation of nullable is broken: it doesn't handle empty
15462 RHS's properly.
15463
15464 * tests/torture.at (GNU AWK Grammar): New.
15465 * tests/sets.at (Nullable): New.
15466 * src/nullable.c (set_nullable): Instead of blindly looping over
15467 `ritems', loop over the rules, and then over their rhs's.
15468
15469 Work around Autotest bugs.
15470
15471 * src/warshall.c (bitmatrix_print): Don't use `+--+' as table
15472 frame, because Autotest understand lines starting with a `+' as
15473 traces from the shell. Then, they are not processed properly.
15474 Admittedly an Autotest bug, but we don't have time to wait for
15475 Autotest to catch up.
15476 * tests/regression.at (Broken Closure): Adjust to the new table
15477 frames.
15478 Move to...
15479 * tests/sets.at: here.
15480
15481 2001-12-13 Akim Demaille <akim@epita.fr>
15482
15483 * src/closure.c (closure): Use nrules instead of playing tricks
15484 with BITS_PER_WORD.
15485
15486 2001-12-13 Akim Demaille <akim@epita.fr>
15487
15488 * src/print.c (print_actions): Output the handling of `$' as the
15489 traces do: shifting the token EOF. Before EOF was treated as a
15490 nonterminal.
15491 * tests/regression.at: Adjust some tests.
15492 * src/print_graph.c (print_core): Complete the set of items via
15493 closure. The next-to-final and final states are still unsatisfying,
15494 but that's to be addressed elsewhere.
15495 No longer output the rule numbers, but do output the state number.
15496 A single loop for the shifts + gotos is enough, but picked a
15497 distinct color for each.
15498 (print_graph): Initialize and finalize closure.
15499
15500 2001-12-13 Akim Demaille <akim@epita.fr>
15501
15502 * src/reader.c (readgram): Remove dead code, an strip useless
15503 braces.
15504 (get_type): Remove, unused.
15505
15506 2001-12-12 Akim Demaille <akim@epita.fr>
15507
15508 * src/complain.h, src/complain.c: Remove error_one_per_line, rely
15509 on that of lib/error.c.
15510
15511 2001-12-12 Akim Demaille <akim@epita.fr>
15512
15513 Some hosts don't like `/' in includes.
15514
15515 * src/system.h: Include libgettext.h without qualifying the path.
15516 * src/Makefile.am (INCLUDES): Add $(top_srcdir)/intl, remove
15517 $(top_srcdir).
15518
15519 2001-12-11 Marc Autret <autret_m@epita.fr>
15520
15521 * src/output.c (output_parser): Remove useless muscle.
15522
15523 2001-12-11 Marc Autret <autret_m@epita.fr>
15524
15525 * src/bison.simple: Remove #line just before %%epilogue. It
15526 is now handled in ...
15527 * src/reader.c (read_additionnal_code): Add the output of a
15528 #line for the epilogue.
15529
15530 2001-12-10 Marc Autret <autret_m@epita.fr>
15531
15532 * src/reader.c (copy_definition): Re-use CPP-outed code which
15533 replace precedent remove.
15534 * src/bison.simple: Remove #line before %%prologue because
15535 %%input-line is wrong at this time.
15536
15537 2001-12-10 Marc Autret <autret_m@epita.fr>
15538
15539 * src/reader.c (symbols_output): Clean up.
15540 * src/output.c (output_gram, output): Clean up.
15541
15542 2001-12-10 Akim Demaille <akim@epita.fr>
15543
15544 * src/lalr.c (initialize_lookaheads): New. Extracted from...
15545 * src/LR0.c (set_state_table): here.
15546 * src/lalr.c (lalr): Call it.
15547
15548 2001-12-10 Akim Demaille <akim@epita.fr>
15549
15550 * src/state.h (shifts): Remove the `number' member: shifts are
15551 attached to state, hence no longer need to be labelled with a
15552 state number.
15553
15554 2001-12-10 Akim Demaille <akim@epita.fr>
15555
15556 Now that states have a complete set of members, the linked list of
15557 shifts is useless: just fill directly the state's shifts member.
15558
15559 * src/state.h (shifts): Remove the `next' member.
15560 * src/LR0.c (first_state, last_state): Remove.
15561 Adjust the callers.
15562 (augment_automaton): Don't look for the shifts that must be added
15563 a shift on EOF: it is those of the state we looked for! But now,
15564 since shifts are attached, it is no longer needed to looking
15565 merely by its id: its number.
15566
15567 2001-12-10 Akim Demaille <akim@epita.fr>
15568
15569 * src/LR0.c (augment_automaton): Better variable locality.
15570 Remove an impossible branch: if there is a state corresponding to
15571 the start symbol being shifted, then there is shift for the start
15572 symbol from the initial state.
15573
15574 2001-12-10 Akim Demaille <akim@epita.fr>
15575
15576 * src/LR0.c (augment_automaton): Call `insert_eof_shifting_state'
15577 only when appropriate: when insert_start_shifting_state' is not
15578 invoked.
15579 * tests/regression.at (Rule Line Numbers): Adjust.
15580
15581 2001-12-10 Akim Demaille <akim@epita.fr>
15582
15583 * src/LR0.c (augment_automaton): Now that all states have shifts,
15584 merge the two cases addition shifts to the initial state.
15585
15586 2001-12-10 Akim Demaille <akim@epita.fr>
15587
15588 * src/lalr.c (set_state_table): Move to...
15589 * src/LR0.c: here.
15590 * src/lalr.c (lalr): Don't call it...
15591 * src/LR0.c (generate_states): do it.
15592 * src/LR0.h (first_state): Remove, only the table is used.
15593
15594 2001-12-10 Akim Demaille <akim@epita.fr>
15595
15596 * src/LR0.h (first_shift, first_reduction): Remove.
15597 * src/lalr.c: Don't use first_shift: find shifts through the
15598 states.
15599
15600 2001-12-10 Akim Demaille <akim@epita.fr>
15601
15602 * src/LR0.c: Attach shifts to states as soon as they are
15603 computed.
15604 * src/lalr.c (set_state_table): Instead of assigning shifts to
15605 state, just assert that the mapping was properly done.
15606
15607 2001-12-10 Akim Demaille <akim@epita.fr>
15608
15609 * src/LR0.c (insert_start_shift): Rename as...
15610 (insert_start_shifting_state): this.
15611 (insert_eof_shifting_state, insert_accepting_state): New.
15612 (augment_automaton): Adjust.
15613 Better locality of the variables.
15614 When looking if the start_symbol is shifted from the initial
15615 state, using `while (... symbol != start_symbol ...)' sounds
15616 better than `while (... symbol < start_symbol ...)': If fail
15617 to see how the order between symbols could be relevant!
15618
15619 2001-12-10 Akim Demaille <akim@epita.fr>
15620
15621 * src/getargs.h: Don't declare `spec_name_prefix' and
15622 `spec_file_prefix', declared by src/files.h.
15623 * src/files.c, src/files.h: Default for spec_name_prefix is "yy".
15624 * src/muscle_tab.c (muscle_init): Default prefix to NULL.
15625 * src/output.c (prepare): Adjust.
15626 * src/reader.c (symbols_output): Likewise.
15627 * src/vmsgetargs.c: Vaguely adjust, but who cares?
15628
15629 2001-12-10 Akim Demaille <akim@epita.fr>
15630
15631 * src/muscle_tab.c (muscle_init): NULL is a better default than
15632 `"0"'.
15633
15634 2001-12-10 Akim Demaille <akim@epita.fr>
15635
15636 * src/reader.c (reader): Calling symbols_output once is enough.
15637
15638 2001-12-10 Akim Demaille <akim@epita.fr>
15639
15640 Now that states have a complete set of members, the linked list of
15641 reductions is useless: just fill directly the state's reductions
15642 member.
15643
15644 * src/state.h (struct reductions): Remove member `number' and
15645 `next'.
15646 * src/LR0.c (first_reduction, last_reduction): Remove.
15647 (save_reductions): Don't link the new reductions, store them in
15648 this_state.
15649 * src/lalr.c (set_state_table): No need to attach reductions to
15650 states, it's already done.
15651 * src/output.c (output_actions): No longer free the shifts, then
15652 the reductions, then the states: free all the states and their
15653 members.
15654
15655 2001-12-10 Akim Demaille <akim@epita.fr>
15656
15657 * src/options.c (OPTN, DRTV, BOTH): New.
15658 (option_table): Use them.
15659
15660 * src/muscle_tab.c: Don't include xalloc.h and string.h: that's
15661 the job of system.h.
15662 * src/options.c: Don't include stdio.h and xalloc.h for the same
15663 reasons.
15664
15665 2001-12-10 Akim Demaille <akim@epita.fr>
15666
15667 * src/output.c (output, prepare): Make sure the values of the
15668 muscles `action' and `prologue' are 0-terminated.
15669
15670 2001-12-10 Akim Demaille <akim@epita.fr>
15671
15672 Clean up GCC warnings.
15673
15674 * src/reader.c (copy_action): `buf' is not used.
15675 (parse_skel_decl): Be static.
15676 * src/muscle_tab.c (mhash1, mhash2, muscle_insert): Preserve `const'.
15677 * src/options.h (create_long_option_table): Have a real prototype.
15678 * lib/hash.c, lib/hash.h (hash_insert, hash_insert_at, hash_delete)
15679 (hash_delete_at): Return const void *.
15680 Adjust casts to preserve the const.
15681
15682 2001-12-10 Akim Demaille <akim@epita.fr>
15683
15684 * configure.in: Require 2.52g.
15685 M4 is not needed, but AUTOM4TE is.
15686 * m4/m4.m4: Remove.
15687 * tests/Makefile.am: Adjust.
15688
15689 2001-12-10 Akim Demaille <akim@epita.fr>
15690
15691 One structure for states is enough, even though theoretically
15692 there are LR(0) states and LALR(1) states.
15693
15694 * src/lalr.h (state_t): Remove.
15695 (state_table): Be state_t **, not state_t *.
15696 * src/state.h (core, CORE_ALLOC): Rename as...
15697 (state_t, STATE_ALLOC): this.
15698 Add the LALR(1) members: shifts, reductions, errs.
15699 * src/LR0.c (state_table): Rename as...
15700 (state_hash): this, to avoid name clashes with the global
15701 `state_table'.
15702 * src/print_graph.c, src/LR0.c, src/LR0.h, src/conflicts.c
15703 * src/lalr.c, src/lalr.h, src/output.c, src/print.c: Adjust.
15704
15705 2001-12-10 Akim Demaille <akim@epita.fr>
15706
15707 Bison dumps core on bash.y.
15708 Reported by Pascal Bart.
15709
15710 * src/warshall.c (bitmatrix_print): New.
15711 (TC): Use it.
15712 When performing a transitive closure R(i, j) && R(j, k) => R(i, k),
15713 j must be the outer loop.
15714 * tests/regression.at (Broken Closure): New.
15715
15716 2001-12-05 Akim Demaille <akim@epita.fr>
15717
15718 * tests/atlocal.in (CPPFLAGS): Do not leave a space between -I and
15719 its argument.
15720 Reported by Peter Hamorsky.
15721
15722 2001-12-05 Akim Demaille <akim@epita.fr>
15723
15724 * src/conflicts.c (err_table): Remove.
15725 (resolve_sr_conflict): Adjust.
15726 * src/lalr.h (state_t.reduction_table, state_t.shift_table):
15727 Rename as...
15728 (state_t.reductions, state_t.shifts): this.
15729
15730 2001-12-05 Akim Demaille <akim@epita.fr>
15731
15732 * src/reduce.c (reduce_grammar_tables): No longer disable the
15733 removal of useless rules via CPP but via `if (0)', so that the
15734 compiler still check the code is valid.
15735 For instance, it should have noticed `rline' no longer exists: use
15736 the `line' member of rule_t.
15737 * src/gram.c (dummy, rline): Remove, unused.
15738
15739 2001-12-05 Akim Demaille <akim@epita.fr>
15740
15741 * src/output.c (pack_vector): Use assert, not berror.
15742 * src/main.c (berror): Remove, unused.
15743
15744 2001-12-05 Akim Demaille <akim@epita.fr>
15745
15746 New experimental feature: if --verbose --trace output all the
15747 items of a state, not only its kernel.
15748
15749 * src/print.c (print_core): If `trace_flag', then invoke closure
15750 before outputting the items of the state (print_core is no longer
15751 a correct name them).
15752 (print_results): Invoke new_closure/free_closure if needed.
15753
15754 2001-12-05 Akim Demaille <akim@epita.fr>
15755
15756 * src/LR0.c (new_itemsets): Use nshifts only, not shiftcount.
15757 * src/closure.c, src/closure.h (itemsetsize): Rename as...
15758 (nitemset): for consistency with the rest of the project.
15759
15760 2001-12-05 Akim Demaille <akim@epita.fr>
15761
15762 * src/closure.c (print_closure): Improve.
15763 (closure): Use it for printing input and output.
15764
15765 2001-12-05 Akim Demaille <akim@epita.fr>
15766
15767 * src/closure.c (FIRSTS, FDERIVES): Adjust to reality: they are
15768 indexed by nonterminals.
15769
15770 2001-12-05 Akim Demaille <akim@epita.fr>
15771
15772 * src/warshall.c (TC, RTC): De-obsfucate (source reduced to 22% of
15773 what it was!).
15774 * src/warshall.h: Remove accidental duplication of the content.
15775
15776 2001-12-05 Akim Demaille <akim@epita.fr>
15777
15778 * src/closure.c (set_fderives): De-obfuscate.
15779
15780 2001-12-05 Akim Demaille <akim@epita.fr>
15781
15782 * src/closure.c (print_firsts, print_fderives): De-obfuscate.
15783
15784 2001-12-05 Akim Demaille <akim@epita.fr>
15785
15786 * src/closure.c (set_firsts): De-obfuscate.
15787
15788 2001-12-05 Akim Demaille <akim@epita.fr>
15789
15790 * src/output.c (action_row): De-obfuscate
15791 using the good o' techniques: arrays not pointers, variable
15792 locality, BITISSET, RESETBIT etc.
15793
15794 2001-12-05 Akim Demaille <akim@epita.fr>
15795
15796 Pessimize the code to simplify it: from now on, all the states
15797 have a valid SHIFTS, which NSHIFTS is possibly 0.
15798
15799 * src/LR0.c (shifts_new): Be global and move to..
15800 * src/state.c, src/state.h: here.
15801 * src/conflicts, src/lalr.c, src/output.c, src/print.c,
15802 * src/print_graph: Adjust.
15803
15804 2001-12-05 Akim Demaille <akim@epita.fr>
15805
15806 * src/state.h (SHIFT_DISABLE, SHIFT_IS_DISABLED): New.
15807 * src/conflicts.c: Use it.
15808 Restore a few missing `if (!SHIFT_IS_DISABLED)' which were
15809 incorrectly ``simplified''.
15810
15811 2001-12-05 Akim Demaille <akim@epita.fr>
15812
15813 * src/conflicts.c (flush_shift, resolve_sr_conflict): De-obfuscate
15814 using the good o' techniques: arrays not pointers, variable
15815 locality, BITISSET, RESETBIT etc.
15816
15817 2001-12-05 Akim Demaille <akim@epita.fr>
15818
15819 * src/state.h (SHIFT_SYMBOL): New.
15820 * src/conflicts.c: Use it to deobfuscate.
15821
15822 2001-12-05 Akim Demaille <akim@epita.fr>
15823
15824 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts)
15825 (print_reductions): De-obfuscate using the good o' techniques:
15826 arrays not pointers, variable locality, BITISSET.
15827
15828 2001-12-05 Akim Demaille <akim@epita.fr>
15829
15830 * src/conflicts.c (print_reductions): Arrays, not pointers.
15831 Use BITISSET.
15832
15833 2001-12-05 Akim Demaille <akim@epita.fr>
15834
15835 * src/conflicts.c (print_reductions): Pessimize, but clarify.
15836
15837 2001-12-05 Akim Demaille <akim@epita.fr>
15838
15839 * src/conflicts.c (print_reductions): Improve variable locality.
15840
15841 2001-12-05 Akim Demaille <akim@epita.fr>
15842
15843 * src/conflicts.c (print_reductions): Pessimize, but clarify.
15844
15845 2001-12-05 Akim Demaille <akim@epita.fr>
15846
15847 * src/conflicts.c (print_reductions): Improve variable locality.
15848
15849 2001-12-05 Akim Demaille <akim@epita.fr>
15850
15851 * src/state.h (SHIFT_IS_ERROR, SHIFT_IS_GOTO, SHIFT_IS_SHIFT): New.
15852 * src/lalr.c: Use them.
15853
15854 2001-12-05 Akim Demaille <akim@epita.fr>
15855
15856 * src/LR0.c (augment_automaton): Formatting changes.
15857 Better variable locality.
15858
15859 2001-12-05 Akim Demaille <akim@epita.fr>
15860
15861 * src/lalr.c (matrix_print): New.
15862 (transpose): Use it.
15863 Use arrays instead of pointers.
15864
15865 2001-12-05 Akim Demaille <akim@epita.fr>
15866
15867 * src/lalr.c (maxrhs): Move to...
15868 * src/gram.c, src/gram.h (ritem_longest_rhs): here.
15869 * src/lalr.c (build_relations): Adjust.
15870
15871 2001-12-05 Akim Demaille <akim@epita.fr>
15872
15873 * src/lalr.c (transpose): Free the memory allocated to the
15874 argument, as it is replaced by the results by the unique caller.
15875 (build_relations): Merely invoke transpose: it handles the memory
15876 deallocation.
15877 Improve variable locality.
15878 Avoid variables used as mere abbreviations.
15879 (compute_lookaheads): Use arrays instead of pointers.
15880
15881 2001-12-05 Akim Demaille <akim@epita.fr>
15882
15883 * src/lalr.c (initialize_F): Improve variable locality.
15884 Avoid variables used as mere abbreviations.
15885
15886 2001-12-05 Akim Demaille <akim@epita.fr>
15887
15888 * src/derives.c (print_derives): Display the ruleno.
15889 * src/lalr.c (initialize_F, transpose): Better variable locality
15890 to improve readability.
15891 Avoid variables used as mere abbreviations.
15892
15893 2001-12-05 Akim Demaille <akim@epita.fr>
15894
15895 * src/lalr.c (traverse): Use arrays instead of pointers.
15896
15897 2001-12-05 Akim Demaille <akim@epita.fr>
15898
15899 * src/nullable.c (set_nullable): Use a for loop to de-obfuscate
15900 the handling of squeue.
15901 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
15902
15903 2001-12-05 Akim Demaille <akim@epita.fr>
15904
15905 Because useless nonterminals are now kept alive (instead of being
15906 `destroyed'), we now sometimes examine them, and store information
15907 related to them. Hence we need to know their number, and adjust
15908 memory allocations.
15909
15910 * src/reduce.c, src/reduce.h (nuseless_nonterminals): No longer
15911 static.
15912 * src/LR0.c (allocate_itemsets): The memory allocated to
15913 `symbol_count' was used for two different purpose: once to count
15914 the number of occurrences of each symbol, and later reassigned to
15915 `shift_symbol', containing the symbol that can be shifted from a
15916 given state.
15917 Deobfuscate, i.e., allocate, use and free `symbol_count' here
15918 only, and...
15919 (new_itemsets): Allocate `shift_symbol' here.
15920 (allocate_itemsets): symbol_count includes useless nonterminals.
15921 Make room for them.
15922 (free_storage): Use `free', not `XFREE', for pointers that cannot
15923 be null.
15924
15925 2001-12-05 Akim Demaille <akim@epita.fr>
15926
15927 * src/nullable.c (set_nullable): Deobfuscate the handling of
15928 ritem.
15929 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
15930
15931 2001-12-05 Akim Demaille <akim@epita.fr>
15932
15933 * src/gram.c, src/gram.h (ritem_print): New.
15934 * src/gram.c (dummy): Remove, now there is actual code in gram.c.
15935 (This useless function was defined only to work around VMS linkers
15936 that can't handle compilation units with variables only).
15937 * src/reduce.c (dump_grammar): Use it to trace the construction of
15938 ritem.
15939
15940 2001-12-04 Paul Eggert <eggert@twinsun.com>
15941
15942 * src/bison.simple (union yyalloc): Change member names
15943 to be the same as the stack names.
15944 (yyparse): yyptr is now union yyalloc *, not char *.
15945 (YYSTACK_RELOCATE): Likewise. This avoids a GCC warning,
15946 and may generate better code on some machines.
15947 (yystpcpy): Use prototype if __STDC__ is defined, not just
15948 if __cplusplus is defined.
15949
15950 2001-11-30 Akim Demaille <akim@epita.fr>
15951
15952 * configure.in (WARNING_CFLAGS): Add -Werror when possible.
15953 (CFLAGS): Do not include the WARNING_CFLAGS here, since GNU
15954 Gettext doesn't compile cleanly, and dies with -Werror.
15955 * src/Makefile.am, lib/Makefile.am, tests/atlocal.in (CFLAGS):
15956 Include WARNING_CFLAGS here.
15957 * lib/xstrdup.c: Include xalloc.h, so that xstrdup be declared
15958 before being defined.
15959
15960 2001-11-27 Paul Eggert <eggert@twinsun.com>
15961
15962 * lib/quotearg.h (quotearg_n, quotearg_n_style):
15963 First arg is int, not unsigned.
15964 * lib/quotearg.c (quotearg_n, quotearg_n_style): Likewise.
15965 (SIZE_MAX, UINT_MAX): New macros.
15966 (quotearg_n_options): Abort if N is negative.
15967 Avoid overflow check on hosts where size_t is 64 bits and int
15968 is 32 bits, as overflow is impossible there.
15969 Fix off-by-one typo that caused unnecessary reallocation.
15970
15971 2001-11-29 Paul Eggert <eggert@twinsun.com>
15972
15973 Name space cleanup in generated parser.
15974
15975 * doc/bison.texinfo (Bison Parser): Discuss system headers
15976 and their effect on the user name space.
15977
15978 * src/bison.simple:
15979 (YYSTACK_ALLOC, YYSTACK_FREE, union yyalloc, YYSTACK_GAP_MAX,
15980 YYSTACK_BYTES, YYSTACK_RELOCATE): Do not define unless necessary,
15981 i.e. unless ! defined (yyoverflow) || defined (YYERROR_VERBOSE).
15982
15983 (YYSIZE_T): New macro. Use it instead of size_t, to avoid infringing
15984 on user names when possible.
15985
15986 (YYSTACK_USE_ALLOCA): Do not define; just use any existing defn.
15987 Simplify test for whather <alloca.h> exists.
15988
15989 (<stdlib.h>): Include if we will use malloc, and if standard C or C++.
15990
15991 (<stdio.h>): Include if YYDEBUG.
15992
15993 (yymemcpy): Renamed from __yy_memcpy. Do not define unless
15994 ! defined (yyoverflow) && ! defined (yymemcpy).
15995
15996 (yymemcpy, yyparse): Rename local variables as needed so that
15997 they all begin with 'yy'.
15998
15999 (yystrlen, yystpcpy): New functions.
16000
16001 (YY_DECL_NON_LSP_VARIABLES): Renamed from _YY_DECL_VARIABLES.
16002 All uses changed.
16003
16004 (yyparse): size_t -> YYSIZE_T. Use yystrlen and yystpcpy
16005 instead of relying on string.h functions. Use YYSTACK_ALLOC
16006 and YYSTACK_FREE instead of malloc and free.
16007
16008 2001-11-30 Akim Demaille <akim@epita.fr>
16009
16010 * src/bison.simple (YYSTYPE, YYLTYPE): Move their definitions
16011 before their first uses.
16012 (YYBISON, YYPURE): Move to the top of the output.
16013
16014 2001-11-30 Akim Demaille <akim@epita.fr>
16015
16016 * tests/reduce.at (Useless Nonterminals): Fix.
16017
16018 2001-11-30 Akim Demaille <akim@epita.fr>
16019
16020 * src/bison.simple (YYSTACK_FREE): Use `do {;} while (0)' as empty
16021 if body instead of `;' to pacify GCC's warnings.
16022
16023 2001-11-30 Akim Demaille <akim@epita.fr>
16024
16025 Instead of mapping the LHS of unused rules to -1, keep the LHS
16026 valid, but flag the rules as invalid.
16027
16028 * src/gram.h (rule_t): `useful' is a new member.
16029 * src/print.c (print_grammar): Adjust.
16030 * src/derives.c (set_derives): Likewise.
16031 * src/reader.c (packgram, reduce_output): Likewise.
16032 * src/reduce.c (reduce_grammar_tables): Likewise.
16033 * tests/reduce.at (Underivable Rules, Useless Rules): New.
16034
16035 2001-11-30 Akim Demaille <akim@epita.fr>
16036
16037 * src/reduce.c (reduce_output): Formatting changes.
16038 * src/print.c (print_results, print_grammar): Likewise.
16039 * tests/regression.at (Rule Line Numbers)
16040 (Solved SR Conflicts, Unresolved SR Conflicts): Adjust.
16041
16042 2001-11-30 Akim Demaille <akim@epita.fr>
16043
16044 * src/reduce.c (nonterminals_reduce): Instead of throwing away
16045 useless nonterminals, move them at the end of the symbol arrays.
16046 (reduce_output): Adjust.
16047 * tests/reduce.at (Useless Nonterminals): Adjust.
16048
16049 2001-11-30 Akim Demaille <akim@epita.fr>
16050
16051 * src/reduce.c: Various comment/formatting changes.
16052 (nonterminals_reduce): New, extracted from...
16053 (reduce_grammar_tables): here.
16054 (reduce_grammar): Call nonterminals_reduce.
16055
16056 2001-11-29 Paul Eggert <eggert@twinsun.com>
16057
16058 * src/bison.simple (YYSTACK_REALLOC): Remove.
16059 (YYSTACK_ALLOC): Resurrect this macro, with its old meaning.
16060 (YYSTACK_FREE, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYSTACK_RELOCATE):
16061 New macros.
16062 (union yyalloc): New type.
16063 (__yy_memcpy): Last arg is size_t, not unsigned int, to remove
16064 an arbitrary restriction on hosts where size_t is wider than int.
16065
16066 (yyparse): Don't dump core if alloca or malloc fails; instead, report
16067 a parser stack overflow. Allocate just one block of memory for all
16068 three stacks, instead of allocating three blocks; this typically is
16069 faster and reduces fragmentation.
16070
16071 Do not limit the number of items in the stack to a value that fits
16072 in 'int', as this is an arbitrary limit on hosts with 64-bit
16073 size_t and 32-bit int.
16074
16075 2001-11-29 Marc Autret <autret_m@epita.fr>
16076
16077 * tests/calc.at [AT_DATA_CALC_Y]: Use %error-verbose instead
16078 of defining YYERROR_VERBOSE.
16079 [AT_DATA]: $4 is now out of C declarations in the prologue.
16080
16081 2001-11-28 Marc Autret <autret_m@epita.fr>
16082
16083 * src/reader.c (parse_dquoted_param): New.
16084 (parse_skel_decl): Use it.
16085 * src/lex.h: Add its prototype.
16086 * src/lex.c (literalchar): Become not static.
16087
16088 2001-11-28 Marc Autret <autret_m@epita.fr>
16089
16090 * src/output.h: And put its extern declaration here.
16091 * src/output.c (error_verbose): Define here.
16092 (prepare): Echo name modification.
16093 * src/getargs.h: Clean its extern declaration.
16094 * src/getargs.c (error_verbose_flag): Remove.
16095 (getargs): Remove case 'e'.
16096 * src/options.c (option_table): 'error-verbose' is now seen as simple
16097 percent option.
16098 Include output.h.
16099
16100 * src/reader.c (read_declarations): Remove case tok_include.
16101 (parse_include_decl): Remove.
16102 * src/lex.h (token_t): Remove tok_include.
16103 * src/options.c (option_table): 'include' is now a simple command line
16104 option.
16105
16106 2001-11-28 Marc Autret <autret_m@epita.fr>
16107
16108 * src/bison.simple: Adjust muscle names.
16109 * src/muscle_tab.c (muscle_init): Also rename the muscles.
16110 * src/output.c (prepare): s/_/-/ for the muscles names.
16111 (output_parser): When scanning for a muscle, allow '-' instead of '_'.
16112
16113 2001-11-28 Marc Autret <autret_m@epita.fr>
16114
16115 * src/bison.simple: Fix debug.
16116 [YYERROR_VERBOSE]: Re-integrate as an internal macro.
16117
16118 2001-11-28 Akim Demaille <akim@epita.fr>
16119
16120 * src/LR0.c (shifts_new): New.
16121 (save_shifts, insert_start_shift, augment_automaton): Use it.
16122
16123 2001-11-28 Akim Demaille <akim@epita.fr>
16124
16125 * src/closure.c (closure): `b' and `ruleno' denote the same value:
16126 keep ruleno only.
16127
16128 2001-11-28 Akim Demaille <akim@epita.fr>
16129
16130 * src/closure.c (closure): Instead of looping over word in array
16131 then bits in words, loop over bits in array.
16132
16133 2001-11-28 Akim Demaille <akim@epita.fr>
16134
16135 * src/closure.c (closure): No longer optimize the special case
16136 where all the bits of `ruleset[r]' are set to 0, to make the code
16137 clearer.
16138
16139 2001-11-28 Akim Demaille <akim@epita.fr>
16140
16141 * src/closure.c (closure): `r' and `c' are new variables, used to
16142 de-obfuscate accesses to RULESET and CORE.
16143
16144 2001-11-28 Akim Demaille <akim@epita.fr>
16145
16146 * src/reduce.c (reduce_print): Use ngettext.
16147 (dump_grammar): Improve the trace accuracy.
16148
16149 2001-11-28 Akim Demaille <akim@epita.fr>
16150
16151 * src/reduce.c (dump_grammar): Don't translate trace messages.
16152
16153 2001-11-28 Akim Demaille <akim@epita.fr>
16154
16155 * tests/reduce.at (Useless Terminals, Useless Nonterminals): New.
16156 * src/reduce.c (reduce_grammar_tables): Do not free useless tags,
16157 as all tags are free'ed afterwards.
16158 From Enrico Scholz.
16159
16160 2001-11-27 Paul Eggert <eggert@twinsun.com>
16161
16162 * src/bison.simple (YYSTACK_REALLOC): Fix typo that caused us to
16163 use alloca when we didn't want to, and vice versa.
16164
16165 2001-11-27 Marc Autret <autret_m@epita.fr>
16166
16167 * src/muscle_tab.c (muscle_init): Remove 'verbose' muscle
16168 initialization.
16169 * src/output.c (prepare): Remove its update.
16170
16171 2001-11-27 Marc Autret <autret_m@epita.fr>
16172
16173 * tests/torture.at [AT_DATA]: Remove YYERROR_VERBOSE definition.
16174 Use %error-verbose.
16175
16176 2001-11-27 Marc Autret <autret_m@epita.fr>
16177
16178 * src/bison.simple: Remove YYERROR_VERBOSE using.
16179 Use %%error_verbose.
16180 (yyparse): Likewise.
16181 * src/output.c (prepare): Give its final value.
16182 * src/muscle_tab.c (muscle_init): Init new muscle 'error_verbose'.
16183 * src/getargs.h: Add its extern declaration.
16184 * src/getargs.c (error_verbose_flag): New int.
16185 (getargs): Update to catch new case.
16186 * src/options.c (option_table): 'error-verbose' is a new option.
16187 (shortopts): Update.
16188
16189 2001-11-27 Akim Demaille <akim@epita.fr>
16190
16191 * src/system.h: Use intl/libgettext.h.
16192 * src/Makefile.am (INCLUDES): Add -I $(top_srcdir).
16193
16194 2001-11-27 Akim Demaille <akim@epita.fr>
16195
16196 * tests/torture.at (Exploding the Stack Size with Malloc):
16197 s/YYSTACK_USE_ALLOCA_ALLOCA/YYSTACK_USE_ALLOCA/.
16198
16199 2001-11-27 Akim Demaille <akim@epita.fr>
16200
16201 * src/files.c: Include error.h.
16202 Reported by Hans Aberg.
16203
16204 2001-11-26 Marc Autret <autret_m@epita.fr>
16205
16206 * src/reader.c (parse_include_decl): New, not yet implemented.
16207 (read_declarations): Add case tok_include.
16208 * src/getargs.h (include): Add its extern definition.
16209 * src/getargs.c (include): New const char *.
16210 (getargs): Add case '-I'.
16211 * src/options.c (option_table): Add include as command line and
16212 percent option.
16213 * src/lex.h (token_t): Add tok_include.
16214
16215 2001-11-26 Akim Demaille <akim@epita.fr>
16216
16217 * src/reader.c (readgram): Make sure rules for mid-rule actions
16218 have a lineno equal to that of their host rule.
16219 Reported by Hans Aberg.
16220 * tests/regression.at (Rule Line Numbers): New.
16221
16222 2001-11-26 Akim Demaille <akim@epita.fr>
16223
16224 * src/LR0.c (allocate_itemsets): kernel_size contains ints, not
16225 size_ts.
16226
16227 2001-11-26 Akim Demaille <akim@epita.fr>
16228
16229 * src/complain.c, src/complain.h (error): Remove, provided by
16230 lib/error.[ch].
16231
16232 2001-11-26 Akim Demaille <akim@epita.fr>
16233
16234 * src/reader.c (read_declarations): Don't abort on tok_illegal,
16235 issue an error message.
16236 * tests/regression.at (Invalid %directive): New.
16237 Reported by Hans Aberg.
16238
16239 2001-11-26 Akim Demaille <akim@epita.fr>
16240
16241 * configure.in: Invoke AC_FUNC_OBSTACK and AC_FUNC_ERROR_AT_LINE.
16242 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
16243
16244 2001-11-26 Akim Demaille <akim@epita.fr>
16245
16246 * src/conflicts.c (conflicts_print): Don't complain at all when
16247 there are no reduce/reduce conflicts, and as many shift/reduce
16248 conflicts as expected.
16249 * tests/regression.at (%expect right): Adjust.
16250
16251 2001-11-23 Akim Demaille <akim@epita.fr>
16252
16253 * lib/alloca.c: Update, from fileutils.
16254
16255 2001-11-23 Akim Demaille <akim@epita.fr>
16256
16257 * lib/Makefile.am (libbison_a_LIBADD): Add @ALLOCA@.
16258
16259 2001-11-23 Akim Demaille <akim@epita.fr>
16260
16261 * src/system.h: Include alloca.h.
16262 * src/main.c (main) [C_ALLOCA]: Call alloca (0).
16263
16264 2001-11-23 Akim Demaille <akim@epita.fr>
16265
16266 * src/print_graph.c (print_actions): Remove `rule', unused.
16267 * src/LR0.c (kernel_size): Contain `int' instead of `size_t' to
16268 pacify GCC's signed < unsigned warnings.
16269 * src/closure.c (itemsetsize): Likewise.
16270 * src/reader.c (symbol_list_new): Static.
16271
16272 2001-11-23 Akim Demaille <akim@epita.fr>
16273
16274 Attaching lineno to buckets is stupid, since only one copy of each
16275 symbol is kept, only the line of the first occurrence is kept too.
16276
16277 * src/symtab.h, src/symtab.c (bucket): Remove the line member.
16278 * src/reader.c (rline_allocated): Remove, unused.
16279 (symbol_list): Have a `line' member.
16280 (symbol_list_new): New.
16281 (readgram): Use it.
16282 * src/print.c (print_grammar): Output the rule line numbers.
16283 * tests/regression.at (Solved SR Conflicts)
16284 (Unresolved SR Conflicts): Adjust.
16285 Reported by Hans Aberg.
16286
16287 2001-11-22 Marc Autret <autret_m@epita.fr>
16288
16289 * src/bison.simple [YYERROR_VERBOSE]: Force its value to be 1 or 0.
16290
16291 2001-11-22 Marc Autret <autret_m@epita.fr>
16292
16293 * src/muscle_tab.c (muscle_init): Remove initialization of
16294 skeleton muscle.
16295 * src/output.c (output_master_parser): Do it here.
16296
16297 2001-11-20 Akim Demaille <akim@epita.fr>
16298
16299 * po/sv.po: New.
16300 * configure.in (ALL_LINGUAS): Adjust.
16301 * po/POTFILE.in: Remove `nullable.c' and `derives.c' which no
16302 longer contains strings to translate.
16303
16304 2001-11-19 Akim Demaille <akim@epita.fr>
16305
16306 * src/conflicts.c (conflicts_print): Add a missing \n.
16307
16308 2001-11-19 Akim Demaille <akim@epita.fr>
16309
16310 * src/nullable.c (nullable_print): New.
16311 (set_nullable): Call it when tracing.
16312 Better locality of variables.
16313
16314 2001-11-19 Akim Demaille <akim@epita.fr>
16315
16316 * src/print.c (print_actions): Better locality of variables.
16317
16318 2001-11-19 Akim Demaille <akim@epita.fr>
16319
16320 * src/derives.c (print_derives): Fix and enrich.
16321 * src/closure.c (print_fderives): Likewise.
16322
16323 2001-11-19 Akim Demaille <akim@epita.fr>
16324
16325 * src/closure.c (itemsetend): Remove, replaced with...
16326 (itemsetsize): new.
16327
16328 2001-11-19 Akim Demaille <akim@epita.fr>
16329
16330 * src/LR0.c (kernel_end): Remove, replaced with...
16331 (kernel_size): new.
16332
16333 2001-11-19 Akim Demaille <akim@epita.fr>
16334
16335 * src/conflicts.c (set_conflicts): Use arrays instead of pointers
16336 to clarify.
16337
16338 2001-11-19 Akim Demaille <akim@epita.fr>
16339
16340 * src/closure.c (closure): Use arrays instead of pointers to clarify.
16341
16342 2001-11-19 Akim Demaille <akim@epita.fr>
16343
16344 * src/closure.c, src/derives.c, src/nullable.c: Adjust various
16345 trace messages.
16346 * src/LR0.c: Likewise.
16347 (allocate_itemsets): Use arrays instead of pointers to clarify.
16348
16349 2001-11-19 Akim Demaille <akim@epita.fr>
16350
16351 * src/getargs.c (statistics_flag): Replace with...
16352 (trace_flag): New.
16353 (longopts): Accept --trace instead of --statistics.
16354 * src/getargs.h, src/options.c: Adjust.
16355 * src/LR0.c, src/closure.c, src/derives.c, src/nullable.c,
16356 * src/reduce.c: Use trace_flags instead of the CPP conditional TRACE.
16357
16358 2001-11-19 Akim Demaille <akim@epita.fr>
16359
16360 * src/LR0.c (new_itemsets, get_state): Use more arrays and fewer
16361 pointers to clarify the code.
16362 (save_reductions, save_shifts): Factor common parts of alternatives.
16363
16364 2001-11-19 Akim Demaille <akim@epita.fr>
16365
16366 * src/LR0.c (new_state, get_state): Complete TRACE code.
16367 * src/closure.c: Include `reader.h' to get `tags', needed by the
16368 trace code.
16369 Rename the conditional DEBUG as TRACE.
16370 Output consistently TRACEs to stderr, not stdout.
16371 * src/derives.c: Likewise.
16372 * src/reduce.c: (inaccessable_symbols): Using if is better style
16373 than goto.
16374 Use `#if TRACE' instead of `#if 0' for tracing code.
16375
16376 2001-11-19 Akim Demaille <akim@epita.fr>
16377
16378 * src/system.h (LIST_FREE, shortcpy): New.
16379 * src/LR0.c: Use them.
16380 * src/output.c (free_itemsets, free_reductions, free_shifts):
16381 Remove, replaced by LIST_FREE.
16382
16383 2001-11-19 Akim Demaille <akim@epita.fr>
16384
16385 * src/state.h (CORE_ALLOC, SHIFTS_ALLOC, ERRS_ALLOC)
16386 (REDUCTIONS_ALLOC): New.
16387 * src/LR0.c, src/conflicts.c: Use them to de-obfuscate memory
16388 allocation.
16389
16390 2001-11-19 Akim Demaille <akim@epita.fr>
16391
16392 * src/LR0.c (new_state): Complete trace code.
16393 * src/nullable.c (set_nullable): Don't translate traces.
16394
16395 2001-11-19 Akim Demaille <akim@epita.fr>
16396
16397 * src/print_graph.c (print_core): Better locality of variables.
16398 * src/print.c (print_core): Likewise.
16399
16400 2001-11-19 Akim Demaille <akim@epita.fr>
16401
16402 * src/vcg.c: You do the output, so you are responsible of the
16403 handling of VCG syntax, in particular: use quotearg.
16404 * src/print_graph.c: Don't.
16405 (print_actions): Don't output the actions as part of the nodes,
16406 since that's the job of the edges.
16407 (print_state): Don't output by hand: fill the node description,
16408 and ask for its output.
16409
16410 2001-11-19 Akim Demaille <akim@epita.fr>
16411
16412 * src/bison.simple (yyparse): When verbosely reporting an error,
16413 no longer put additional quotes around token names.
16414 * tests/calc.at: Adjust.
16415
16416 2001-11-19 Akim Demaille <akim@epita.fr>
16417
16418 * src/symtab.h, src/symtab.c: `line' is a new member of `bucket'.
16419 * src/reader.c (record_rule_lines, rline, rline_allocated): Remove.
16420 * src/output.c: Adjust.
16421
16422 2001-11-19 Akim Demaille <akim@epita.fr>
16423
16424 * src/gram.h (rprec, rprecsym, rassoc): Remove, now part of...
16425 (rule_t): this.
16426 * src/conflicts.c, src/reader.c, src/reduce.c: Adjust.
16427
16428 2001-11-19 Akim Demaille <akim@epita.fr>
16429
16430 * src/gram.h (rule_t): New.
16431 (rule_table): New.
16432 (rrhs, rlhs): Remove, part of state_t.
16433 * src/print_graph.c, src/closure.c, src/conflicts.c, src/derives.c,
16434 * src/lalr.c, src/nullable.c, src/output.c, src/print.c,
16435 * src/reader.c, src/reduce.c: Adjust.
16436
16437 2001-11-19 Akim Demaille <akim@epita.fr>
16438
16439 * src/reader.c (symbols_output): New, extracted from...
16440 (packsymbols): Here.
16441 (reader): Call it.
16442
16443 2001-11-19 Akim Demaille <akim@epita.fr>
16444
16445 * src/lalr.c (set_maxrhs, maxrhs): Remove, replaced with...
16446 (maxrhs): this new function.
16447
16448 2001-11-19 Akim Demaille <akim@epita.fr>
16449
16450 * src/lalr.c (F): New macro to access the variable F.
16451 Adjust.
16452
16453 2001-11-19 Akim Demaille <akim@epita.fr>
16454
16455 * src/lalr.h (LA): New macro to access the variable LA.
16456 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
16457 * src/lalr.c: Adjust.
16458
16459 2001-11-19 Akim Demaille <akim@epita.fr>
16460
16461 * src/lalr.c (initialize_LA): Only initialize LA. Let...
16462 (set_state_table): handle the `lookaheads' members.
16463
16464 2001-11-19 Akim Demaille <akim@epita.fr>
16465
16466 * src/lalr.h (lookaheads): Removed array, whose contents is now
16467 a member of...
16468 (state_t): this structure.
16469 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
16470 Adjust.
16471
16472 2001-11-19 Akim Demaille <akim@epita.fr>
16473
16474 * src/lalr.h (consistent): Removed array, whose contents is now
16475 a member of...
16476 (state_t): this structure.
16477 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
16478 Adjust.
16479
16480 2001-11-19 Akim Demaille <akim@epita.fr>
16481
16482 * src/lalr.h (reduction_table, shift_table): Removed arrays, whose
16483 contents are now members of...
16484 (state_t): this structure.
16485 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
16486 Adjust.
16487
16488 2001-11-19 Akim Demaille <akim@epita.fr>
16489
16490 * src/lalr.h (state_t): New.
16491 (state_table): Be a state_t * instead of a core **.
16492 (accessing_symbol): Remove, part of state_t.
16493 * src/lalr.c: Adjust.
16494 (set_accessing_symbol): Merge into...
16495 (set_state_table): this.
16496 * src/print_graph.c, src/conflicts.c: Adjust.
16497
16498 2001-11-14 Akim Demaille <akim@epita.fr>
16499
16500 * tests/calc.at, tests/output.at, tests/regression.at,
16501 * tests/testsuite.at, tests/torture.at: Rely on Autotest 2.52g:
16502 now the tests are run in private dirs, therefore AC_CLEANUP and
16503 family can be simplified to 0-ary.
16504 * tests/atlocal.in: Now that we run `elsewhere' than in tests/,
16505 use abs. path to find config.h.
16506 * tests/calc.at (AT_CHECK_CALC): Don't try to check the compiler's
16507 stderr, there can be way too much random noise.
16508 Instead pass -Werror to GCC and rely on the exit status.
16509 Reported by Wolfram Wagner.
16510
16511 2001-11-14 Akim Demaille <akim@epita.fr>
16512
16513 * src/bison.simple (yyparse): Let yyls1, yyss1 and yyvs1 be
16514 defined only if yyoverflow is defined, to avoid `warning: unused
16515 variable `yyvs1''.
16516 Reported by The Test Suite.
16517
16518 2001-11-14 Akim Demaille <akim@epita.fr>
16519
16520 * src/print.c: Include reduce.h.
16521 Reported by Hans Aberg.
16522
16523 2001-11-14 Akim Demaille <akim@epita.fr>
16524
16525 * src/lex.c, src/lex.h (token_buffer, unlexed_token_buffer):
16526 Revert a previous patch: these are really const.
16527 * src/conflicts.c (conflict_report): Additional useless pair of
16528 braces to pacify GCC's warnings for `if () if () {} else {}'.
16529 * src/lex.c (parse_percent_token): Replace equal_offset with
16530 arg_offset.
16531 arg is const.
16532 Be sure to strdup `arg' when used, since there is no reason for
16533 token_buffer not to change.
16534
16535 2001-11-14 Akim Demaille <akim@epita.fr>
16536
16537 * src/system.h (EXIT_SUCCESS, EXIT_FAILURE): Ensure a proper
16538 definition.
16539 * src/main.c (main): Use them.
16540 Suggested by Hans Aberg.
16541
16542 2001-11-12 Akim Demaille <akim@epita.fr>
16543
16544 * src/system.h (ngettext): Now that we use ngettext, be sure to
16545 provide a default definition when NLS are not used.
16546
16547 2001-11-12 Akim Demaille <akim@epita.fr>
16548
16549 * doc/bison.texinfo: Use `$' as shell prompt, not `%'.
16550 Use @kbd to denote user input.
16551 (Language and Grammar): ANSIfy the example.
16552 Adjust its layout for info/notinfo.
16553 (Location Tracking Calc): Output error messages to stderr.
16554 Output locations in a more GNUtically correct way.
16555 Fix a couple of Englishos.
16556 Adjust @group/@end group pairs.
16557
16558 2001-11-12 Akim Demaille <akim@epita.fr>
16559
16560 %expect was not functioning at all.
16561
16562 * src/conflicts.c (expected_conflicts): Set to -1.
16563 (conflict_report): Use ngettext.
16564 (conflicts_print): Check %expect and make its violation an error.
16565 * doc/bison.texinfo (Expect Decl): Adjust.
16566 * configure.in (AM_GNU_GETTEXT): Ask for ngettext.
16567 * tests/regression.at (%expect not enough, %expect right)
16568 (%expect too much): New.
16569
16570 2001-11-12 Akim Demaille <akim@epita.fr>
16571
16572 * tests/regression.at (Conflicts): Rename as...
16573 (Unresolved SR Conflicts): this.
16574 (Solved SR Conflicts): New.
16575
16576 2001-11-12 Akim Demaille <akim@epita.fr>
16577
16578 * src/reduce.c (print_results): Rename as...
16579 (reduce_output): This.
16580 Output to OUT, passed as argument, instead of output_obstack.
16581 (dump_grammar): Likewise.
16582 (reduce_free): New.
16583 Also free V1.
16584 (reduce_grammar): No longer call reduce_output, since...
16585 * src/print.c (print_results): do it.
16586 * src/main.c (main): Call reduce_free;
16587
16588 2001-11-12 Akim Demaille <akim@epita.fr>
16589
16590 * src/conflicts.c (print_reductions): Accept OUT as argument.
16591 Output to it, not to output_obstack.
16592 * src/print.c (print_actions): Adjust.
16593
16594 2001-11-12 Akim Demaille <akim@epita.fr>
16595
16596 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts): Return
16597 the result instead of using...
16598 (src_total, rrc_total, src_count, rrc_count): Remove.
16599 (any_conflicts): Remove.
16600 (print_conflicts): Split into...
16601 (conflicts_print, conflicts_output): New.
16602 * src/conflicts.h: Adjust.
16603 * src/main.c (main): Invoke both conflicts_output and conflicts_print.
16604 * src/print.c (print_grammar): Issue `\n' between two rules.
16605 * tests/regression.at (Conflicts): New.
16606 Reported by Tom Lane.
16607
16608 2001-11-12 Akim Demaille <akim@epita.fr>
16609
16610 * tests/regression.at (Invalid input): Remove, duplicate with
16611 ``Invalid input: 1''.
16612
16613 2001-11-12 Akim Demaille <akim@epita.fr>
16614
16615 * tests/torture.at (AT_DATA_STACK_TORTURE)
16616 (Exploding the Stack Size with Alloca)
16617 (Exploding the Stack Size with Malloc): New.
16618
16619 2001-11-12 Akim Demaille <akim@epita.fr>
16620
16621 * src/bison.simple (YYSTACK_REALLOC): New.
16622 (yyparse) [!yyoverflow]: Use it and free the old stack.
16623 Reported by Per Allansson.
16624
16625 2001-11-12 Pascal Bart <pascal.bart@epita.fr>
16626
16627 * src/bison.simple: Define type yystype instead of YYSTYPE, and
16628 define CPP macro, which substitute YYSTYPE by yystype.
16629 * src/reader.c (parse_union_decl): Output yystype/YYSTYPE as we do
16630 with yyltype/YYLTYPE. This allows inclusion of the generated
16631 header within the parser if the compiler, such as GGC, accepts
16632 multiple equivalent #defines.
16633 From Akim.
16634
16635 2001-11-05 Akim Demaille <akim@epita.fr>
16636
16637 * src/reader.c (symbols_output): New, extracted from...
16638 (packsymbols): here.
16639 (reader): Adjust.
16640
16641 2001-11-05 Akim Demaille <akim@epita.fr>
16642
16643 * src/lex.c (parse_percent_token): s/quotearg/quote/.
16644
16645 2001-11-05 Akim Demaille <akim@epita.fr>
16646
16647 * tests/regression.at (AT_TEST_CPP_GUARD_H): Adjust the clean up
16648 pattern.
16649
16650 2001-11-05 Akim Demaille <akim@epita.fr>
16651
16652 * src/options.h (struct option_table_struct): set_flags is void*.
16653 * src/options.c (longopts): Support `--output' and `%output'.
16654 (usage): Adjust.
16655 * src/lex.h (tok_setopt): Remove, replaced with...
16656 (tok_intopt, tok_stropt): these new guys.
16657 * src/lex.c (getopt.h): Not needed.
16658 (token_buffer, unlexed_token_buffer): Not const.
16659 (percent_table): Promote `-' over `_' in directive names.
16660 Active `%name-prefix', `file-prefix', and `output'.
16661 (parse_percent_token): Accept possible arguments to directives.
16662 Promote `-' over `_' in directive names.
16663
16664 2001-11-04 Akim Demaille <akim@epita.fr>
16665
16666 * doc/bison.texinfo (Decl Summary): Split the list into
16667 `directives for grammars' and `directives for bison'.
16668 Sort'em.
16669 Add description of `%name-prefix', `file-prefix', and `output'.
16670 Promote `-' over `_' in directive names.
16671 (Bison Options): s/%locactions/%locations/. Nice Freudian slip.
16672 Simplify the description of `--name-prefix'.
16673 Promote `-' over `_' in directive names.
16674 Promote `--output' over `--output-file'.
16675 Fix the description of `--defines'.
16676 * tests/output.at: Exercise %file-prefix and %output.
16677
16678 2001-11-02 Akim Demaille <akim@epita.fr>
16679
16680 * doc/refcard.tex: Update.
16681
16682 2001-11-02 Akim Demaille <akim@epita.fr>
16683
16684 * src/symtab.h (SUNDEF): New.
16685 * src/symtab.c (bucket_new): Init user_token_number to SUNDEF to
16686 stand for `uninitialized', instead of 0.
16687 * src/reader.c (packsymbols, parse_thong_decl): Adjust.
16688 * src/lex.c (lex): Adjust.
16689
16690 * tests/calc.at (_AT_DATA_CALC_Y): Declare a token for EOF.
16691 Number it 0.
16692 Let yylex return it instead of a plain 0.
16693 Reported by Dick Streefland.
16694
16695 2001-11-02 Akim Demaille <akim@epita.fr>
16696
16697 * tests/regression.at (Mixing %token styles): New test.
16698
16699 2001-11-02 Akim Demaille <akim@epita.fr>
16700
16701 * src/reader.c (parse_thong_decl): Formatting changes.
16702 (token_translations_init): New, extracted from...
16703 (packsymbols): Here.
16704 Adjust.
16705
16706 2001-11-01 Akim Demaille <akim@epita.fr>
16707
16708 * tests/regression.at (AT_TEST_CPP_GUARD_H): New.
16709 Check that `9foo.y' produces correct cpp guards.
16710 * src/files.c (compute_header_macro): Prepend `BISON_' to CPP
16711 guards.
16712 Reported by Wwp.
16713
16714 2001-11-01 Akim Demaille <akim@epita.fr>
16715
16716 * tests/regression.at (Invalid input: 2): New.
16717 * src/lex.c (unlexed_token_buffer): New.
16718 (lex, unlex): Adjust: when unlexing, be sure to save token_buffer
16719 too.
16720 Reported by Wwp.
16721
16722 2001-11-01 Akim Demaille <akim@epita.fr>
16723
16724 * tests/calc.at: Catch up with 1.30.
16725 * configure.in: Bump to 1.49a.
16726 Adjust to newer Autotest.
16727
16728 2001-10-19 Pascal Bart <pascal.bart@epita.fr>
16729
16730 * src/conflicts.c: Move global variables rrc_total and src_total ...
16731 (print_conflicts): here.
16732 * src/output.c (output): Free global variable user_toknums.
16733 * src/lex.c (token_obstack): Become static.
16734
16735 2001-10-18 Akim Demaille <akim@epita.fr>
16736
16737 * tests/atlocal.in (GCC): Add.
16738 * tests/calc.at: s/m4_match/m4_bmatch/.
16739 s/m4_patsubst/m4_bpatsubst/.
16740 (AT_CHECK_CALC): Check the compiler's stderr only if it's GCC.
16741 * configure.in: AC_SUBST(GCC).
16742
16743 2001-10-14 Marc Autret <autret_m@epita.fr>
16744
16745 * src/options.c (create_long_option_table): Fix.
16746
16747 2001-10-10 Akim Demaille <akim@epita.fr>
16748
16749 * src/bison.simple: Be sure to set YYSTACK_USE_ALLOCA.
16750
16751 2001-10-04 Akim Demaille <akim@epita.fr>
16752
16753 * src/reader.c (parse_union_decl): Push the caracters in
16754 union_obstack, not attrs_obstack.
16755
16756 2001-10-04 Akim Demaille <akim@epita.fr>
16757
16758 Merge in the branch 1.29.
16759
16760 * src/reader.c (packsymbols): Use a temporary obstack for
16761 `%%tokendef', since output_stack is already used elsewhere.
16762
16763 2001-10-02 Akim Demaille <akim@epita.fr>
16764
16765 Bump 1.29d.
16766
16767 2001-10-02 Akim Demaille <akim@epita.fr>
16768
16769 Version 1.29c.
16770
16771 2001-10-02 Akim Demaille <akim@epita.fr>
16772
16773 * tests/regression.at (Invalid CPP headers): New.
16774 From Alexander Belopolsky.
16775 * src/files.c (compute_header_macro): Map non alnum chars to `_'.
16776
16777 2001-10-02 Akim Demaille <akim@epita.fr>
16778
16779 * tests/regression.at (Invalid input): New.
16780 * src/lex.c (lex): Be sure to set `token_buffer' in any case.
16781 Reported by Shura.
16782
16783 2001-10-02 Akim Demaille <akim@epita.fr>
16784
16785 * tests/calc.at: Now that --debug works, the tests must be adjusted.
16786
16787 2001-10-02 Akim Demaille <akim@epita.fr>
16788
16789 * src/output.c (output_parser): Assert `skeleton'.
16790 * src/files.c (skeleton_find): Look harder for skeletons on DOSish
16791 systems.
16792 From Shura.
16793
16794 2001-10-01 Marc Autret <autret_m@epita.fr>
16795
16796 * src/lex.h: Echo modifications.
16797 * src/lex.c (unlex): Parameter is now token_t.
16798 From Hans Aberg.
16799
16800 2001-10-01 Marc Autret <autret_m@epita.fr>
16801
16802 * src/main.c: Include lex.h.
16803 From Hans Aberg.
16804
16805 2001-09-29 Akim Demaille <akim@epita.fr>
16806
16807 * src/getargs.c (longopts): `--debug' is `-t', not `-d'.
16808
16809 2001-09-28 Akim Demaille <akim@epita.fr>
16810
16811 * tests/testsuite.at: Update to newer Autotest.
16812 * tests/Makefile.am (EXTRA_DIST): bison is not to be shipped.
16813
16814 2001-09-27 Akim Demaille <akim@epita.fr>
16815
16816 Position independent wrapper.
16817
16818 * tests/bison: Remove.
16819 * tests/bison.in: New.
16820 * configure.in: Adjust.
16821
16822 2001-09-27 Paul Eggert <eggert@twinsun.com>
16823
16824 Port quotearg fixes from tar 1.13.24.
16825
16826 * lib/quotearg.c: BSD/OS 4.1 wchar.h requires FILE and struct
16827 tm to be declared.
16828 (HAVE_MBSINIT): Undef if !HAVE_MBRTOWC.
16829 (mbsinit): Define to 1 if !defined mbsinit && !HAVE_MBSINIT.
16830
16831 * m4/Makefile.am (EXTRA_DIST): Add mbrtowc.m4.
16832 * m4/mbrtowc.m4: New file.
16833 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Check for mbsinit and stddef.h.
16834 Use jm_FUNC_MBRTOWC instead of AC_CHECK_FUNCS(mbrtowc).
16835
16836 2001-09-27 Akim Demaille <akim@epita.fr>
16837
16838 Bump to 1.29c.
16839
16840 2001-09-27 Akim Demaille <akim@epita.fr>
16841
16842 Version 1.29b.
16843
16844 2001-09-25 Akim Demaille <akim@epita.fr>
16845
16846 * src/system.h: Include `xalloc.h'.
16847 Remove it from the C files.
16848 * src/files.c (output_files): Free the obstacks.
16849 * src/lex.c (init_lex): Rename as...
16850 (lex_init): this.
16851 (lex_free): New.
16852 * src/main.c (main): Use it.
16853
16854 2001-09-24 Marc Autret <autret_m@epita.fr>
16855
16856 * src/vcg.c (open_edge, close_edge, open_node, close_node): Change
16857 to output informations in fout (FILE*).
16858 (open_graph, close_graph): Likewise.
16859 (output_graph, output_edge, output_node): Likewise.
16860 * src/vcg.h: Update function prototypes.
16861 * src/print_graph.c (print_graph): Open output graph file.
16862 (print_actions): Adjust.
16863 * src/files.h: Remove extern declaration.
16864 * src/files.c: Remove graph_obstack declaration.
16865 (open_files): Remove graph_obstack initialization.
16866 (output_files): Remove graph_obstack saving.
16867
16868 2001-09-24 Marc Autret <autret_m@epita.fr>
16869
16870 * src/files.c (compute_output_file_names): Fix.
16871
16872 2001-09-24 Marc Autret <autret_m@epita.fr>,
16873 Akim Demaille <akim@epita.fr>
16874
16875 * src/reader.c (reader): Remove call to free_symtab ().
16876 * src/main.c (main): Call it here.
16877 Include symtab.h.
16878 * src/conflicts.c (initialize_conflicts): Rename as...
16879 (solve_conflicts): this.
16880 * src/print.c (print_core, print_actions, print_state)
16881 (print_grammar): Dump to a file instead a `output_obstack'.
16882 (print_results): Dump `output_obstack', and then proceed with the
16883 FILE *.
16884 * src/files.c (compute_output_file_names, close_files): New.
16885 (output_files): Adjust.
16886 * src/main.c (main): Adjust.
16887
16888 2001-09-23 Marc Autret <autret_m@epita.fr>
16889
16890 * src/files.c (compute_header_macro): Computes header macro name
16891 from spec_defines_file when given.
16892
16893 2001-09-23 Marc Autret <autret_m@epita.fr>
16894
16895 * src/files.c (output_files): Add default extensions.
16896
16897 2001-09-22 Akim Demaille <akim@epita.fr>
16898
16899 * src/conflicts.c (finalize_conflicts): Rename as...
16900 (free_conflicts): this.
16901
16902 2001-09-22 Akim Demaille <akim@epita.fr>
16903
16904 * src/gram.c (gram_free): Rename back as...
16905 (dummy): this.
16906 (output_token_translations): Free `token_translations'.
16907 * src/symtab.c (free_symtab): Free the tag field.
16908
16909 2001-09-22 Akim Demaille <akim@epita.fr>
16910
16911 Remove `translations' as it is always set to true.
16912
16913 * src/gram.h: Adjust.
16914 * src/reader.c (packsymbols, parse_token_decl): Adjust
16915 * src/print.c (print_grammar): Adjust.
16916 * src/output.c (output_token_translations): Adjust.
16917 * src/lex.c (lex): Adjust.
16918 * src/gram.c: Be sure the set pointers to NULL.
16919 (dummy): Rename as...
16920 (gram_free): this.
16921
16922 2001-09-22 Akim Demaille <akim@epita.fr>
16923
16924 * configure.in: Invoke AM_LIB_DMALLOC.
16925 * src/system.h: Use dmalloc.
16926 * src/LR0.c: Be sure to have pointers initialized to NULL.
16927 (allocate_itemsets): Allocate kernel_items only if needed.
16928
16929 2001-09-22 Akim Demaille <akim@epita.fr>
16930
16931 * configure.in: Bump to 1.29b.
16932 * tests/Makefile.am (DISTCLEANFILES): Add package.m4.
16933 * tests/calc.at (_AT_DATA_CALC_Y): #undef malloc so that we don't
16934 need xmalloc.c in calc.y.
16935 From Pascal Bart.
16936
16937 2001-09-21 Akim Demaille <akim@epita.fr>
16938
16939 Version 1.29a.
16940 * Makefile.maint, config/config.guess, config/config.sub,
16941 * config/missing: Update from masters.
16942 * tests/Makefile.am ($(srcdir)/$(TESTSUITE)): No longer depend
16943 upon package.m4.
16944 * configure.in (ALL_LINGUAS): Add `tr'.
16945
16946 2001-09-21 Akim Demaille <akim@epita.fr>
16947
16948 * tests/Makefile.am (package.m4): Move to...
16949 ($(srcdir)/$(TESTSUITE)): here.
16950
16951 2001-09-20 Akim Demaille <akim@epita.fr>
16952
16953 * src/complain.c: No longer try to be standalone: use system.h.
16954 Don't assume __STDC__ is defined to 1. Just test if it is defined.
16955 * src/complain.h: Likewise.
16956 * src/reduce.c (useless_nonterminals, inaccessable_symbols):
16957 Remove the unused variable `n'.
16958 From Albert Chin-A-Young.
16959
16960 2001-09-18 Marc Autret <autret_m@epita.fr>
16961
16962 * doc/bison.1: Update.
16963 * doc/bison.texinfo (Bison Options): Update --defines and --graph
16964 descriptions.
16965 (Option Cross Key): Update.
16966 Add --graph.
16967
16968 2001-09-18 Marc Autret <autret_m@epita.fr>
16969
16970 * tests/regression.at: New test (comment in %union).
16971
16972 2001-09-18 Marc Autret <autret_m@epita.fr>
16973
16974 * src/reader.c (parse_union_decl): Do not output '/'. Let copy_comment
16975 do that.
16976 Reported by Keith Browne.
16977
16978 2001-09-18 Marc Autret <autret_m@epita.fr>
16979
16980 * tests/output.at: Add tests for --defines and --graph.
16981
16982 2001-09-18 Marc Autret <autret_m@epita.fr>
16983
16984 * tests/output.at: Removes tests of %{header,src}_extension features.
16985
16986 2001-09-18 Akim Demaille <akim@epita.fr>
16987
16988 * tests/Makefile.am (package.m4): New.
16989 * tests/calc.at (_AT_CHECK_CALC): Just run `calc input'.
16990 (_AT_CHECK_CALC_ERROR): Likewise.
16991 Factor the `, ' part of verbose error messages.
16992
16993 2001-09-18 Marc Autret <autret_m@epita.fr>
16994
16995 * src/getargs.c (longopts): Declare --defines and --graph as options
16996 with optional arguments.
16997 * src/files.h: Add extern declarations.
16998 * src/files.c (spec_graph_file, spec_defines_file): New.
16999 (output_files): Update.
17000 Remove CPP-outed code.
17001
17002 2001-09-18 Marc Autret <autret_m@epita.fr>
17003
17004 Turn off %{source,header}_extension feature.
17005
17006 * src/files.c (compute_exts_from_gf): Update.
17007 (compute_exts_from_src): Update.
17008 (output_files): CPP-out useless code.
17009 * src/files.h: Remove {header,source}_extension extern declarations.
17010 * src/reader.c (parse_dquoted_param): CPP-out.
17011 (parse_header_extension_decl): Remove.
17012 (parse_source_extension_decl): Remove.
17013 (read_declarations): Remove cases tok_{hdrext,srcext}.
17014 * src/lex.c (percent_table): Remove {header,source}_extension entries.
17015 * src/lex.h (token_t): Remove tok_hdrext and tok_srcext.
17016
17017 2001-09-10 Akim Demaille <akim@epita.fr>
17018
17019 * tests/output.at (AT_CHECK_BISON_FLAGS, AT_CHECK_BISON_PERCENT):
17020 (AT_CHECK_BISON_PERCENT_FLAGS): Merge into...
17021 (AT_CHECK_OUTPUT): this.
17022 Merely check ls' exit status, its output is useless.
17023
17024 2001-09-10 Akim Demaille <akim@epita.fr>
17025
17026 * tests/calc.at: Use m4_match.
17027 (_AT_DATA_CALC_Y): Check `yyin != NULL', not `stdin != NULL'.
17028
17029 2001-09-10 Marc Autret <autret_m@epita.fr>,
17030 Akim Demaille <akim@epita.fr>
17031
17032 * src/vcg.h (graph_s): color, textcolor, bordercolor are now
17033 enum color_e.
17034 * src/print_graph.c (print_graph): Initalize graph.layoutalgorithm
17035 to `normal'.
17036 * src/reader.c (parse_token_decl): Initialize token with tok_eof.
17037 * src/lex.h: Adjust prototype.
17038 (token_t): Add `tok_undef'.
17039 * src/lex.c (struct percent_table_struct): Retval is now a token_t.
17040 (parse_percent_token): Now returns token_t.
17041 Add default statement in switch.
17042 (lex): Separate `c' as an input variable, from the token_t result
17043 part.
17044 (unlexed): Is a token_t.
17045
17046 2001-09-10 Akim Demaille <akim@epita.fr>
17047
17048 * configure.in: Bump to 1.29a.
17049
17050 2001-09-07 Akim Demaille <akim@epita.fr>
17051
17052 Version 1.29.
17053
17054 2001-08-30 Akim Demaille <akim@epita.fr>
17055
17056 * tests/atgeneral.m4, tests/atconfig.in, tests/suite.at: Remove.
17057 * m4/atconfig.m4: Remove.
17058 * tests/testsuite.at, tests/atlocal.in, tests/output.at,
17059 * tests/bison: New.
17060 * tests/regression.at, tests/calc.at: Use m4_define, AT_BANNER,
17061 m4_if, m4_patsubst, and m4_regexp.
17062 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Use an
17063 `input' file instead of echo.
17064
17065 2001-08-29 Akim Demaille <akim@epita.fr>
17066
17067 Bump to 1.28e.
17068
17069 2001-08-29 Akim Demaille <akim@epita.fr>
17070
17071 Version 1.28d.
17072
17073 2001-08-29 Paul Eggert <eggert@twinsun.com>
17074
17075 * src/bison.simple (yyparse): Don't take the address of an
17076 item before the start of an array, as that doesn't conform to
17077 the C Standard.
17078
17079 2001-08-29 Robert Anisko <anisko_r@epita.fr>
17080
17081 * doc/bison.texinfo (Location Tracking Calc): New node.
17082
17083 2001-08-29 Paul Eggert <eggert@twinsun.com>
17084
17085 * src/output.c (output): Do not define const, as this now
17086 causes more problems than it cures.
17087
17088 2001-08-29 Akim Demaille <akim@epita.fr>
17089
17090 * doc/bison.texinfo: Modernize `@node' and `@top' use: just name
17091 the nodes.
17092 Be sure to tag the `detailmenu'.
17093
17094 2001-08-29 Akim Demaille <akim@epita.fr>
17095
17096 * Makefile.maint (do-po-update): Wget refuses to overwrite files:
17097 download in a tmp dir.
17098
17099 2001-08-28 Marc Autret <autret_m@epita.fr>
17100
17101 * config/depcomp: New file.
17102
17103 2001-08-28 Marc Autret <autret_m@epita.fr>
17104
17105 * doc/bison.1 (mandoc): Adjust.
17106 From Juan Manuel Guerrero.
17107
17108 2001-08-28 Marc Autret <autret_m@epita.fr>
17109
17110 * src/print_graph.c (print_state): Fix.
17111
17112 2001-08-27 Marc Autret <autret_m@epita.fr>
17113
17114 * src/vcg.h (classname_s, infoname_s, node_s): Constify the
17115 char * members.
17116 Echo modifications to the functions prototypes.
17117 * src/vcg.c (add_classname, add_infoname): Adjust arguments.
17118
17119 2001-08-27 Marc Autret <autret_m@epita.fr>
17120
17121 * src/vcg.c: Include `xalloc.h'.
17122 (add_colorentry): New.
17123 (add_classname): New.
17124 (add_infoname): New.
17125 * src/vcg.h: Add new prototypes.
17126
17127 2001-08-27 Akim Demaille <akim@epita.fr>
17128
17129 * Makefile.maint: Sync. again with CVS Autoconf.
17130
17131 2001-08-27 Akim Demaille <akim@epita.fr>
17132
17133 * Makefile.maint: Formatting changes.
17134 (po-update, cvs-update, update): New targets.
17135 (AMTAR): Remove.
17136
17137 2001-08-27 Akim Demaille <akim@epita.fr>
17138
17139 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
17140 * Makefile.maint: Sync. with CVS Autoconf.
17141
17142 2001-08-27 Marc Autret <autret_m@epita.fr>
17143
17144 * src/vcg.h (struct infoname_s): New.
17145 (struct colorentry_s): New.
17146 (graph_s): New fields {vertical,horizontal}_order in structure.
17147 Add `infoname' field.
17148 Add `colorentry' field;
17149 * src/vcg_defaults.h (G_VERTICAL_ORDER): New.
17150 (G_HORIZONTAL_ORDER): New.
17151 (G_INFONAME): New.
17152 (G_COLORENTRY): New.
17153 * src/vcg.c (output_graph): Add output of {vertical,horizontal}_order.
17154 Add output of `infoname'.
17155 Add output of `colorentry'.
17156
17157 2001-08-27 Marc Autret <autret_m@epita.fr>
17158
17159 * src/reader.c (parse_dquoted_param): Rename variable `index' to `i'.
17160 This one shadowed a global parameter.
17161
17162 2001-08-24 Marc Autret <autret_m@epita.fr>
17163
17164 * src/print_graph.c (node_output_size): Declared POSIX `size_t' type,
17165 instead of `unsigned'.
17166 (print_state): Do not call obstack_object_size () in obstack_grow ()
17167 to avoid macro variables shadowing.
17168
17169 2001-08-23 Marc Autret <autret_m@epita.fr>
17170
17171 * src/lex.c (percent_table): Typo: s/naem/name/.
17172 Add graph option.
17173 Normalize new options declarations.
17174
17175 2001-08-20 Pascal Bart <pascal.bart@epita.fr>
17176
17177 * tests/suite.at: Exercise %header_extension and %source_extension.
17178
17179 2001-08-16 Marc Autret <autret_m@epita.fr>
17180
17181 * src/reader.c (parse_dquoted_param): New.
17182 (parse_header_extension_decl): Use it.
17183 (parse_source_extension_decl): Likewise.
17184
17185 2001-08-16 Marc Autret <autret_m@epita.fr>
17186
17187 * src/vcg.c: Remove includes of `complain.h' and `xalloc.h'.
17188 (get_xxxx_str): Use assert () instead of complain ().
17189 Remove return invokations in default cases.
17190 (get_decision_str): Modify default behaviour. Remove second argument.
17191 Echo modifications on calls.
17192 (output_graph): Fix.
17193
17194 2001-08-16 Marc Autret <autret_m@epita.fr>
17195
17196 * src/getargs.c (usage): Update with ``-g, --graph''.
17197
17198 2001-08-16 Marc Autret <autret_m@epita.fr>
17199
17200 * doc/bison.texinfo (Bison Options): Add items `-g', `--graph'.
17201 (Option Cross Key): Likewise.
17202 * doc/bison.1: Update.
17203
17204 2001-09-25 Pascal Bart <pascal.bart@epita.fr>
17205
17206 * src/output.c (output_master_parser): Don't finish action_obstack.
17207 (output_parser): Don't care about the muscle action, here.
17208 (prepare): Copy the action_obstack in the action muscle.
17209 (output): Free action_obstack.
17210
17211 2001-09-23 Pascal Bart <pascal.bart@epita.fr>
17212
17213 * src/reader.c (parse_union_decl): Add new obstack union_obstack. Which
17214 will contain `%union' declaration.
17215 (parse_union_decl): Delete #line directive output.
17216 (parse_union_decl): Substitute /attrs_obstack/union_obstack for all
17217 informations about %union.
17218 (parse_union_decl): Copy the union_obstack in the muscle stype.
17219 * src/bison.simple: Add new #line directive.
17220 Add typdef %%stype YYSTYPE.
17221
17222 2001-09-23 Pascal Bart <pascal.bart@epita.fr>
17223
17224 * src/bison.simple: Add new `#line' directive.
17225
17226 2001-09-22 Pascal Bart <pascal.bart@epita.fr>
17227
17228 * src/bison.simple: New `#line' directive.
17229 * src/output.c (output_parser): Support new dynamic muscle input_line.
17230
17231 2001-09-22 Marc Autret <autret_m@epita.fr>
17232
17233 * src/output.c (output_master_parser): New.
17234 (output_parser): Be more re-entrant.
17235
17236 2001-09-21 Marc Autret <autret_m@epita.fr>
17237
17238 * src/reader.c (copy_definition, parse_union_decl): Update and use
17239 `linef' muscle.
17240 (copy_action): Likewise.
17241 Use obstack_1grow ().
17242 * src/muscle_tab.c (muscle_init): Add muscle `linef'.
17243
17244 2001-09-21 Marc Autret <autret_m@epita.fr>
17245
17246 * src/options.c (option_table): Adjust.
17247 * src/lex.c (parse_percent_token): Fix.
17248
17249 2001-09-20 Pascal Bart <pascal.bart@epita.fr>
17250
17251 * src/options.c (symtab.h): Include it, need by lex.h.
17252
17253 2001-09-20 Pascal Bart <pascal.bart@epita.fr>
17254
17255 * src/lex.c (parse_percent_token): Change type of variable `tx', which
17256 is now an option_table_struct*.
17257 (option_strcmp): New function option_strcmp.
17258 (parse_percent_token): Call option_strcmp.
17259 * src/getargs.c (xalloc.h, options.h): Include it.
17260 (getargs): Call create_long_option_table.
17261 (getargs): Free longopts at the end of the function.
17262 (shortopts): Move in options.c.
17263 * src/options.c (create_long_option_table): New function. Convert
17264 information from option_table to option structure.
17265 * src/reader.c (options.h): Include it.
17266
17267 * src/Makefile.am: Adjust.
17268 * src/options.c (option_table): Create from longopts and percent_table.
17269 * src/getargs.c (longopts): Delete.
17270 * src/lex.c (struct percent_table_struct): Delete.
17271 (percent_table): Delete.
17272 (options.h): Include it.
17273 * src/options.c: Create.
17274 * src/options.h: Create.
17275 Declare enum opt_access_e.
17276 Define struct option_table_struct.
17277
17278 2001-09-20 Marc Autret <autret_m@epita.fr>
17279
17280 * doc/bison.texinfo: Adjust terminologies about prologue and epilogue
17281 sections of Bison.
17282
17283 2001-09-19 Pascal Bart <pascal.bart@epita.fr>
17284
17285 * src/bison.simple: s/%%filename/%%skeleton.
17286 * src/muscle_tab.c (getargs.h): Include it.
17287 (muscle_init): Insert new muscle skeleton.
17288
17289 2001-09-18 Pascal Bart <pascal.bart@epita.fr>
17290
17291 * src/output.c (output_parser): Delete unused variable actions_dumped.
17292
17293 2001-09-07 Pascal Bart <pascal.bart@epita.fr>
17294
17295 * src/output.c (output): Delete call to reader_output_yylsp.
17296 * src/reader.c (reader): Likewise.
17297 * src/reader.h: Delete declaration of reader_output_yylsp.
17298
17299 2001-09-02 Marc Autret <autret_m@epita.fr>
17300
17301 * src/reader.c: Include muscle_tab.h.
17302 (parse_union_decl): Update.
17303 (parse_macro_decl): Rename parse_muscle_decl.
17304 Update to use renamed functions and variable.
17305 (read_declarations, copy_action, read_additionnal_code, : Updated
17306 with correct variables and functions names.
17307 (packsymbols, reader): Likewise.
17308
17309 * src/reader.h (muscle_obstack): Extern declaration update.
17310
17311 * src/output.c: Include muscle_tab.h
17312 In all functions using macro_insert, change by using muscle_insert ().
17313 (macro_obstack): Rename muscle_obstack.
17314 Echo modifications in the whole file.
17315 (MACRO_INSERT_INT): Rename MUSCLE_INSERT_INT.
17316 (MACRO_INSERT_STRING): Rename MUSCLE_INSERT_STRING.
17317 (MACRO_INSERT_PREFIX): Rename MUSCLE_INSERT_PREFIX.
17318
17319 * src/muscle_tab.h: Update double inclusion macros.
17320 (macro_entry_s): Rename muscle_entry_s.
17321 Update prototypes.
17322
17323 * src/muscle_tab.c: Include muscle_tab.h.
17324 Rename macro_tabble to muscle_table.
17325 (mhash1, mhash2, mcmp): Use muscle_entry.
17326 (macro_init): Rename muscle_init. Update.
17327 (macro_insert): Rename muscle_insert. Update.
17328 (macro_find): Rename muscle_find. Update.
17329
17330 * src/main.c: Include muscle_tab.h.
17331 (main): Call muscle_init ().
17332 * src/Makefile.am (bison_SOURCES): Echo modifications.
17333
17334 2001-09-02 Marc Autret <autret_m@epita.fr>
17335
17336 Now the files macro_tab.[ch] are named muscle_tab.[ch].
17337
17338 * src/muscle_tab.c, src/muscle_tab.h: Add files.
17339
17340 2001-09-02 Marc Autret <autret_m@epita.fr>
17341
17342 * src/macrotab.c, src/macrotab.h: Remove.
17343
17344 2001-09-01 Pascal Bart <pascal.bart@epita.fr>
17345
17346 * src/reader.c (copy_guard): Use muscle to specify the `#line'
17347 filename.
17348
17349 2001-09-01 Marc Autret <autret_m@epita.fr>
17350
17351 * tests/calc.at (exp): Now, YYERROR_VERBOSE need to be set
17352 to an explicit value to activate the feature. We do it here.
17353
17354 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
17355
17356 * src/output.c (prepare): Delete the `filename' muscule insertion.
17357 * src/reader.c (copy_action): Use `filename' muscule with `#line'.
17358 (parse_union_decl): Likewise.
17359 * src/macrotab.c (macro_init): Initialize filename by infile.
17360
17361 2001-08-31 Marc Autret <autret_m@epita.fr>
17362
17363 * src/bison.simple (YYLSP_NEEDED): New definition.
17364 * src/output.c (prepare): Add macro insertion of `locations_flag'
17365
17366 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
17367
17368 * src/output.c (prepare): Delete insertion of previous muscles,
17369 and insert the `prefix' muscles.
17370 * src/macrotab.c (macro_init): Likewise.
17371 (macro_init): Initialization prefix directive by `yy'.
17372 * src/bison.simple: Substitute all %%yylex, %%yychar, %%yylval,
17373 %%yydebug, %%yyerror, %%yynerrs and %%yyparse by yylex, yychar,
17374 yylval, yydebug, yyerror, yynerrs and yyparse.
17375 New directive `#define' to substitute yydebug, ... with option
17376 name_prefix.
17377
17378 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
17379
17380 * src/main.c (main): Standardize.
17381 * src/output.c (output_table_data, output_parser): Likewise.
17382 * src/macrotab.h, src/macrotab.c, src/bison.simple: Likewise.
17383
17384 2001-08-31 Pascal Bart <pascal.bart@epita.fr>, Marc Autret <autret_m@epita.fr>
17385
17386 * src/reader.c (read_additionnal_code): Rename %%user_code to
17387 %%epilogue.
17388 * src/output.c (output): Rename %%declarations to %%prologue.
17389 * src/bison.simple: Echo modifications.
17390
17391 2001-08-31 Marc Autret <autret_m@epita.fr>
17392
17393 * src/reader.c (readgram): CleanUp.
17394 (output_token_defines): Likewise.
17395 (packsymbols): Likewise.
17396 (reader): Likewise.
17397 * src/output.c (output): CPP-out useless code.
17398
17399 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
17400
17401 * src/reader.c (reader): Delete obsolete call to function
17402 output_trailers and output_headers.
17403 * src/output.h: Remove obsolete functions prototypes of output_headers
17404 and output_trailers.
17405
17406 2001-08-30 Pascal Bart <pascal.bart@epita.fr>
17407
17408 * src/main.c: Include macrotab.h.
17409 * src/macrotab.h (macro_entry_s): Constify fields.
17410 Adjust functions prototypes.
17411 * src/macrotab.c (macro_insert): Constify key and value.
17412 (macro_find): Constify key.
17413 (macro_insert): Include 'xalloc.h'
17414 (macro_insert): Use XMALLOC.
17415 (macro_find): Constify return value.
17416 * src/output.c (output_table_data): Rename table to table_data.
17417 (output_parser): Constify macro_key, macro_value.
17418
17419 2001-08-30 Marc Autret <autret_m@epita.fr>
17420
17421 * src/reader.c (parse_skel_decl): New.
17422 (read_declarations): Add case `tok_skel', call parse_skel_decl ().
17423 * src/lex.h (token_t): New token `tok_skel'.
17424 * src/lex.c (percent_table): Add skeleton option entry.
17425 Standardize.
17426
17427 2001-08-29 Marc Autret <autret_m@epita.fr>
17428
17429 * src/bison.simple: Add %%user_code directive at the end.
17430 * src/reader.c (read_additionnal_code): New.
17431 (reader): Use it.
17432 * src/output.c (output_program): Remove.
17433 (output): Update.
17434
17435 2001-08-28 Marc Autret <autret_m@epita.fr>
17436
17437 * src/output.c (output_actions): Clean up.
17438 (output_gram): CPP-out useless code.
17439 * src/reader.c (reader): Clean up, CPP-out useless code.
17440
17441 2001-08-28 Pascal Bart <pascal.bart@epita.fr>
17442
17443 * src/output.c (output): Copy attrs_obstack in the '%%definitions'
17444 directive.
17445 * src/bison.simple: Add `%%definitions'.
17446
17447 2001-08-28 Marc Autret <autret_m@epita.fr>
17448
17449 * config/depcomp: New file.
17450
17451 2001-08-27 Paul Eggert <eggert@twinsun.com>
17452
17453 * src/bison.simple (yyparse): Don't take the address of an
17454 item before the start of an array, as that doesn't conform to
17455 the C Standard.
17456
17457 2001-08-27 Robert Anisko <robert.anisko@epita.fr>
17458
17459 * src/output.c (output): Remove the initialization of the macro
17460 obstack. It was done too late here.
17461
17462 * src/reader.c (parse_macro_decl): Fix. Use of the macro obstack was
17463 completely wrong.
17464 (reader): Initialize the macro obstack here, since we need it to grow
17465 '%define' directives.
17466
17467 * src/reader.h: Declare the macro obstack as extern.
17468
17469 2001-08-27 Robert Anisko <robert.anisko@epita.fr>
17470
17471 * src/output.c (output_parser): Fix. Store single '%' characters in
17472 the output obstack instead of throwing them away.
17473
17474 2001-08-27 Akim Demaille <akim@epita.fr>
17475
17476 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
17477
17478 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
17479
17480 * lib/Makefile.am: Adjust.
17481
17482 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
17483
17484 * src/bison.simple: Update and add '%%' directives.
17485
17486 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
17487
17488 * src/reader.c (reader): Remove calls to 'output_headers' and
17489 'output_trailers'. Remove some C output.
17490 (readgram): Disable a piece of code that was writing a default
17491 definition for 'YYSTYPE'.
17492 (reader_output_yylsp): Remove.
17493 (packsymbols): Output token defintions to a macro.
17494 (copy_definition): Disable C output.
17495
17496 * src/reader.c (parse_macro_decl): New function used to parse macro
17497 declarations.
17498 (copy_string2): Put the body of copy_string into this new function.
17499 Add a parameter to let the caller choose whether he wants to copy the
17500 string delimiters or not.
17501 (copy_string): Be a simple call to copy_string2 with the last argument
17502 bound to true.
17503 (read_declarations): Add case for macro definition.
17504 (copy_identifier): New.
17505 (parse_macro_decl): Read macro identifiers using copy_identifier
17506 rather than lex.
17507
17508 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
17509
17510 * src/output.c (prepare): Add prefixed names.
17511 (output_parser): Output semantic actions.
17512 (output_parser): Fix bug on '%%line' directives.
17513
17514 * src/output.c (output_headers): Remove. The C code printed by this
17515 function should now be in the skeletons.
17516 (output_trailers): Remove.
17517 (output): Disable call to 'reader_output_yylsp'.
17518 (output_rule_data): Do not output tables to the table obstack.
17519
17520 * src/output.c: Remove some C dedicated output.
17521 Improve the use of macro and output obstacks.
17522 (output_defines): Remove.
17523
17524 * src/output.c (output_token_translations): Associate 'translate'
17525 table with a macro. No output to the table obstack.
17526 (output_gram): Same for 'rhs' and 'prhs'.
17527 (output_stos): Same for 'stos'.
17528 (output_rule_data): Same for 'r1' and 'r2'.
17529 (token_actions): Same for 'defact'.
17530 (goto_actions): Same for 'defgoto'.
17531 (output_base): Same for 'pact' and 'pgoto'.
17532 (output_table): Same for 'table'.
17533 (output_check): Same for 'check'.
17534
17535 * src/output.c (output_table_data): New function.
17536 (output_short_table): Remove.
17537 (output_short_or_char_table): Remove.
17538
17539 * src/output.c (output_parser): Replace most of the skeleton copy code
17540 with something new. Skeletons are now processed character by character
17541 rather than line by line, and Bison looks for '%%' macros. This is the
17542 first step in making Bison's output process (a lot) more flexible.
17543 (output_parser): Use the macro table.
17544
17545 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
17546
17547 * src/main.c (main): Initialize the macro table.
17548
17549 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
17550
17551 * src/lex.c (percent_table): Add tok_define.
17552 * src/lex.h: Add tok_define.
17553
17554 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
17555
17556 * src/macrotab.c: New file.
17557 * src/macrotab.h: New file.
17558 * src/Makefile.am: Update.
17559
17560 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
17561
17562 * lib/hash.c: New file.
17563 * lib/hash.h: New file.
17564 * lib/Makefile.am: Update.
17565
17566 2001-08-15 Akim Demaille <akim@epita.fr>
17567
17568 Version 1.28c.
17569
17570 2001-08-15 Marc Autret <autret_m@epita.fr>
17571
17572 * src/reader.c (readgram): Indent output macro YYSTYPE.
17573 (packsymbols): Likewise.
17574 (output_token_defines): Likewise.
17575 * src/files.c: Standardize.
17576 (compute_header_macro): New.
17577 (defines_obstack_save): New. Use compute_header_macro.
17578 (output_files): Update. Use defines_obstack_save.
17579
17580 2001-08-15 Akim Demaille <akim@epita.fr>
17581
17582 * doc/bison.texinfo (Table of Symbols): Document
17583 YYSTACK_USE_ALLOCA.
17584
17585 2001-08-15 Akim Demaille <akim@epita.fr>
17586
17587 * missing: Update from CVS Automake.
17588 * config/config.guess, config/config.sub, config/texinfo.tex:
17589 Update from gnu.org.
17590
17591 2001-08-15 Akim Demaille <akim@epita.fr>
17592
17593 * Makefile.maint: Sync with CVS Autoconf.
17594
17595 2001-08-14 Pascal Bart <pascal.bart@epita.fr>
17596
17597 * doc/bison.texinfo: Include GNU Free Documentation License from
17598 `fdl.texi'.
17599 * doc/fdl.texi: Add to package.
17600
17601 2001-08-14 Marc Autret <autret_m@epita.fr>
17602
17603 Turn on %{source,header}_extension features.
17604
17605 * src/lex.c (percent_table): Un-CPP out header_extension and
17606 source_extension.
17607 * src/files.c (compute_exts_from_gf): Compare pointers with NULL.
17608 (compute_exts_from_src): Remove conditions. It restores priorities
17609 between options.
17610
17611 2001-08-14 Marc Autret <autret_m@epita.fr>
17612
17613 * src/files.c (compute_base_names): Add extensions computing when
17614 `--file-prefix' used.
17615 Standardize function calls.
17616
17617 2001-08-13 Marc Autret <autret_m@epita.fr>
17618
17619 * src/bison.simple (YYSTACK_USE_ALLOCA): Changed to allow users
17620 defining it (defined but null disables alloca).
17621
17622 2001-08-13 Marc Autret <autret_m@epita.fr>
17623
17624 * src/bison.simple (_yy_memcpy): CPP reformat.
17625
17626 2001-08-13 Pascal Bart <pascal.bart@epita.fr>
17627
17628 * tests/atconfig.in (CPPFLAGS): Fix.
17629
17630 2001-08-10 Pascal Bart <pascal.bart@epita.fr>
17631
17632 * doc/bison.texinfo: Include GNU General Public License from
17633 `gpl.texi'.
17634 * doc/gpl.texi: Add to package.
17635
17636 2001-08-10 Marc Autret <autret_m@epita.fr>
17637
17638 * src/print_graph.h: Fix.
17639 * src/reader.c (read_declarations): Use parse_header_extension_decl ().
17640
17641 2001-08-10 Akim Demaille <akim@epita.fr>
17642
17643 * src/system.h: Provide default declarations for stpcpy, strndup,
17644 and strnlen.
17645
17646 2001-08-10 Robert Anisko <anisko_r@epita.fr>
17647
17648 * doc/bison.texinfo (Locations): Update @$ stuff.
17649
17650 2001-08-09 Robert Anisko <anisko_r@epita.fr>
17651
17652 * src/bison.simple (YYLLOC_DEFAULT): Update.
17653 (yyparse): Adjust.
17654
17655 2001-08-08 Marc Autret <autret_m@epita.fr>
17656
17657 * doc/bison.texinfo: Change @samp{$<@dots{}>} to
17658 @samp{$<@dots{}>@var{n}} in Section Actions in Mid-Rule.
17659 Reported by Fabrice Bauzac.
17660
17661 2001-08-08 Marc Autret <autret_m@epita.fr>
17662
17663 * src/vcg_default.h: Use NULL instead of 0 to initialize pointers.
17664 * src/vcg.c (output_node): Fix.
17665 * src/vcg.h: Cleanup.
17666 * src/print_graph.c: Add comments.
17667 (node_output_size): New global variable. Simplify the formatting of
17668 the VCG graph output.
17669 (print_actions): Unused code is now used. It notifies the final state
17670 and no action states in the VCG graph. It also give the reduce actions.
17671 The `shift and goto' edges are red and the `go to state' edges are
17672 blue.
17673 Get the current node name and node_obstack by argument.
17674 (node_obstack): New variable.
17675 (print_state): Manage node_obstack.
17676 (print_core): Use node_obstack given by argument.
17677 A node is not only computed here but in print_actions also.
17678 (print_graph): CPP out useless code instead of commenting it.
17679
17680 2001-08-07 Pascal Bart <pascal.bart@epita.fr>
17681
17682 * tests/atconfig.in (CPPFLAGS): Fix.
17683
17684 2001-08-07 Akim Demaille <akim@epita.fr>
17685
17686 * src/print_graph.c (quote): New.
17687 (print_core): Use it.
17688
17689 2001-08-06 Akim Demaille <akim@epita.fr>, Marc Autret <autret_m@epita.fr>
17690
17691 * src/vcg.c (complain.h): Include it.
17692 Unepitaize `return' invocations.
17693 [NDEBUG] (main): Remove.
17694 * src/vcg.h (node_t, edge_t, graph_t): Constify the char * members.
17695 * src/files.c (open_files): Initialize graph_obstack.
17696 * src/print_graph.c (print_actions): CPP out useless code.
17697 (print_core): Don't output the last `\n' in labels.
17698 Use `quote'.
17699 * src/files.c (output_files): Output the VCG file.
17700 * src/main.c (main): Invoke print_graph ();
17701
17702 2001-08-06 Marc Autret <autret_m@epita.fr>
17703
17704 Automaton VCG graph output.
17705 Using option ``-g'' or long option ``--graph'', you can generate
17706 a gram_filename.vcg file containing a VCG description of the LALR (1)
17707 automaton of your grammar.
17708
17709 * src/main.c: Call to print_graph() function.
17710 * src/getargs.h: Update.
17711 * src/getargs.c (options): Update to catch `-g' and `--graph' options.
17712 (graph_flag): New flag.
17713 (longopts): Update.
17714 (getargs): Add case `g'.
17715 * src/files.c (graph_obstack): New obstack struct.
17716 (open_files): Initialize new obstack.
17717 (output_files): Saves graph_obstack if required.
17718 * src/files.h (graph_obstack): New extern declaration.
17719 * src/Makefile.am: Add new source files.
17720
17721 2001-08-06 Marc Autret <autret_m@epita.fr>
17722
17723 * src/print_graph.c, src/print_graph.h (graph): New.
17724 * src/vcg.h: New file.
17725 * src/vcg.c: New file, VCG graph handling.
17726
17727 2001-08-06 Marc Autret <autret_m@epita.fr>
17728
17729 Add of %source_extension and %header_extension which specify
17730 the source or/and the header output file extension.
17731
17732 * src/files.c (compute_base_names): Remove initialisation of
17733 src_extension and header_extension.
17734 (compute_exts_from_gf): Update.
17735 (compute_exts_from_src): Update.
17736 (output_files): Update.
17737 * src/reader.c (parse_header_extension_decl): New.
17738 (parse_source_extension_decl): New.
17739 (read_declarations): New case statements for the new tokens.
17740 * src/lex.c (percent_table): Add entries for %source_extension
17741 and %header_extension.
17742 * src/lex.h (token_e): New tokens tok_hdrext and tok_srcext.
17743
17744 2001-08-06 Marc Autret <autret_m@epita.fr>
17745
17746 * configure.in: Bump to 1.28c.
17747 * doc/bison.texinfo: Texinfo thingies.
17748
17749 2001-08-04 Pascal Bart <pascal.bart@epita.fr>
17750
17751 * tests/atconfig.in (CPPFLAGS): Add.
17752 * tests/calc.at (AT_CHECK): Use CPPFLAGS.
17753
17754 2001-08-03 Akim Demaille <akim@epita.fr>
17755
17756 Version 1.28b.
17757
17758 2001-08-03 Akim Demaille <akim@epita.fr>
17759
17760 * tests/Makefile.am (check-local): Ship testsuite.
17761 * tests/calc.at (_AT_DATA_CALC_Y): Prototype all the functions.
17762 Include `string.h'.
17763
17764 2001-08-03 Akim Demaille <akim@epita.fr>
17765
17766 * configure.in: Try using -Wformat when compiling.
17767
17768 2001-08-03 Akim Demaille <akim@epita.fr>
17769
17770 * configure.in: Bump to 1.28b.
17771
17772 2001-08-03 Akim Demaille <akim@epita.fr>
17773
17774 * src/complain.c: Adjust strerror_r portability issues.
17775
17776 2001-08-03 Akim Demaille <akim@epita.fr>
17777
17778 Version 1.28a.
17779
17780 2001-08-03 Akim Demaille <akim@epita.fr>
17781
17782 * src/getargs.c, src/getarg.h (skeleton)): Constify.
17783 * src/lex.c (literalchar): Avoid name clashes on `buf'.
17784 * src/getargs.c: Include complain.h.
17785 * src/files.c, src/files.h (skeleton_find): Avoid name clashes.
17786 * lib/quotearg.c, lib/quotearg.h: Update from fileutils 4.1.
17787
17788 2001-08-03 Akim Demaille <akim@epita.fr>
17789
17790 * src/reader.c (readgram): Display hidden chars in error messages.
17791
17792 2001-08-03 Akim Demaille <akim@epita.fr>
17793
17794 Update to gettext 0.10.39.
17795
17796 2001-08-03 Akim Demaille <akim@epita.fr>
17797
17798 * lib/strspn.c: New.
17799
17800 2001-08-01 Marc Autret <autret_m@epita.fr>
17801
17802 * doc/bison.texinfo: Update.
17803 * doc/bison.1 (mandoc): Update.
17804 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove .c and .h.
17805 * src/files.c: Support output files extensions computing.
17806 (src_extension): New static variable.
17807 (header_extension): New static variable.
17808 (tr): New function.
17809 (get_extension_index): New function, gets the index of an extension
17810 filename in a string.
17811 (compute_exts_from_gf): New function, computes extensions from the
17812 grammar file extension.
17813 (compute_exts_from_src): New functions, computes extensions from the
17814 C source file extension, file given by ``-o'' option.
17815 (compute_base_names): Update.
17816 (output_files): Update.
17817
17818 2001-08-01 Robert Anisko <anisko_r@epita.fr>
17819
17820 * doc/bison.texi: Document @$.
17821 (Locations): New section.
17822
17823 2001-07-18 Akim Demaille <akim@epita.fr>
17824
17825 * Makefile.maint, GNUmakefile: New, from Autoconf 2.52.
17826 * config/prev-version.txt, config/move-if-change: New.
17827 * Makefile.am: Adjust.
17828
17829 2001-07-08 Pascal Bart <pascal.bart@epita.fr>
17830
17831 * src/bison.simple (yyparse): Suppress warning `comparaison
17832 between signed and unsigned'.
17833
17834 2001-07-05 Pascal Bart <pascal.bart@epita.fr>
17835
17836 * src/getargs.h (raw_flag): Remove.
17837 * src/getargs.c: Die on `-r'/`--raw'.
17838 * src/lex.c (parse_percent_token): Die on `%raw'.
17839 * src/reader.c (output_token_defines): Suppress call to `raw_flag'.
17840 * tests/calc.at: Suppress test with option `--raw'.
17841
17842 2001-07-14 Akim Demaille <akim@epita.fr>
17843
17844 * config/: New.
17845 * configure.in: Require Autoconf 2.50.
17846 Update to gettext 0.10.38.
17847
17848 2001-03-16 Akim Demaille <akim@epita.fr>
17849
17850 * doc/bison.texinfo: ANSIfy the examples.
17851
17852 2001-03-16 Akim Demaille <akim@epita.fr>
17853
17854 * getargs.c (skeleton): New variable.
17855 (longopts): --skeleton is a new option.
17856 (shortopts, getargs): -S is a new option.
17857 * getargs.h: Declare skeleton.
17858 * output.c (output_parser): Use it.
17859
17860 2001-03-16 Akim Demaille <akim@epita.fr>
17861
17862 * m4/strerror_r.m4: New.
17863 * m4/error.m4: Run AC_FUNC_STRERROR_R.
17864 * lib/error.h, lib/error.c: Update.
17865
17866 2001-03-16 Akim Demaille <akim@epita.fr>
17867
17868 * src/getargs.c (longopts): Clean up.
17869
17870 2001-02-21 Akim Demaille <akim@epita.fr>
17871
17872 * src/reader.c (gensym): `gensym_count' is your own.
17873 Use a static buf to create the symbol name, as token_buffer is no
17874 longer a buffer.
17875
17876 2001-02-08 Akim Demaille <akim@epita.fr>
17877
17878 * src/conflicts.c (conflict_report): Be sure not to append to res
17879 between two calls, which could happen if both first sprintf were
17880 skipped, but not the first cp += strlen.
17881
17882 2001-02-08 Akim Demaille <akim@epita.fr>
17883
17884 * lib/memchr.c, lib/stpcpy.c, lib/strndup.c, lib/strnlen.c:
17885 New, from fileutils 4.0.37.
17886 * configure.in: Require Autoconf 2.49c. I took some time before
17887 making this decision. This is the only way out for portability
17888 issues in Bison, it would mean way too much duplicate effort to
17889 import in Bison features implemented in 2.49c since 2.13.
17890 AC_REPLACE_FUNCS and AC_CHECK_DECLS the functions above.
17891
17892 2001-02-02 Akim Demaille <akim@epita.fr>
17893
17894 * lib/malloc.c, lib/realloc.c: New, from the fileutils 4.0.37.
17895 * lib/xalloc.h, lib/xmalloc.c: Update.
17896
17897 2001-01-19 Akim Demaille <akim@epita.fr>
17898
17899 Get rid of the ad hoc handling of token_buffer in the scanner: use
17900 the obstacks.
17901
17902 * src/lex.c (token_obstack): New.
17903 (init_lex): Initialize it. No longer call...
17904 (grow_token_buffer): this. Remove it.
17905 Adjust all the places which used it to use the obstack.
17906
17907 2001-01-19 Akim Demaille <akim@epita.fr>
17908
17909 * src/lex.h: Rename all the tokens:
17910 s/\bENDFILE\b/tok_eof/g;
17911 s/\bIDENTIFIER\b/tok_identifier/g;
17912 etc.
17913 Let them be enums, not #define, to ease debugging.
17914 Adjust all the code.
17915
17916 2001-01-18 Akim Demaille <akim@epita.fr>
17917
17918 * src/lex.h (MAXTOKEN, maxtoken, grow_token_buffer): Remove, private.
17919 * src/lex.c (maxtoken, grow_token_buffer): Static.
17920
17921 2001-01-18 Akim Demaille <akim@epita.fr>
17922
17923 Since we now use obstacks, more % directives can be enabled.
17924
17925 * src/lex.c (percent_table): Also accept `%yacc',
17926 `%fixed_output_files', `%defines', `%no_parser', `%verbose', and
17927 `%debug'.
17928 Handle the actions for `%semantic_parser' and `%pure_parser' here,
17929 instead of returning a token.
17930 * src/lex.h (SEMANTIC_PARSER, PURE_PARSER): Remove, unused.
17931 * src/reader.c (read_declarations): Adjust.
17932 * src/files.c (open_files): Don't call `compute_base_names', don't
17933 compute `attrsfile' since they depend upon data which might be
17934 *in* the input file now.
17935 (output_files): Do it here.
17936 * src/output.c (output_headers): Document the fact that this patch
17937 introduces a guaranteed SEGV for semantic parsers.
17938 * doc/bison.texinfo: Document them.
17939 * tests/suite.at: Exercise these %options.
17940
17941 2000-12-20 Akim Demaille <akim@epita.fr>
17942
17943 Also handle the output file (--verbose) with obstacks.
17944
17945 * files.c (foutput): Remove.
17946 (output_obstack): New.
17947 Adjust all dependencies.
17948 * src/conflicts.c: Return a string.
17949 * src/system.h (obstack_grow_string): Rename as...
17950 (obstack_sgrow): this. Be ready to work with non literals.
17951 (obstack_fgrow4): New.
17952
17953 2000-12-20 Akim Demaille <akim@epita.fr>
17954
17955 * src/files.c (open_files): Fix the computation of short_base_name
17956 in the case of `-o foo.tab.c'.
17957
17958 2000-12-20 Akim Demaille <akim@epita.fr>
17959
17960 * src/reader.c (copy_string, copy_comment, copy_comment2, copy_at)
17961 (copy_dollar): Now that everything uses obstacks, get rid of the
17962 FILE * parameters.
17963
17964 2000-12-20 Akim Demaille <akim@epita.fr>
17965
17966 * src/files.c (open_files): Actually the `.output' file is based
17967 on the short_base_name, not base_name.
17968 * tests/suite.at (Checking output file names): Adjust.
17969
17970 2000-12-20 Akim Demaille <akim@epita.fr>
17971
17972 * src/bison.s1: Remove, we now use directly...
17973 * src/bison.simple: this.
17974 * src/Makefile.am: Use pkgdata instead of data.
17975
17976 2000-12-20 Akim Demaille <akim@epita.fr>
17977
17978 * src/files.c (guard_obstack): New.
17979 (open_files): Initialize it.
17980 (output_files): Dump it...
17981 * src/files.h: Export it.
17982 * src/reader.c (copy_guard): Use it.
17983
17984 2000-12-19 Akim Demaille <akim@epita.fr>
17985
17986 * src/files.c (outfile, defsfile, actfile): Removed as global
17987 vars.
17988 (open_files): Don't compute them.
17989 (output_files): Adjust.
17990 (base_name, short_base_name): Be global.
17991 Adjust dependencies.
17992
17993 2000-12-19 Akim Demaille <akim@epita.fr>
17994
17995 * src/files.c (strsuffix): New.
17996 (stringappend): Be just like strcat but allocate.
17997 (base_names): Eve out from open_files.
17998 Try to simplify the rather hairy computation of base_name and
17999 short_base_name.
18000 (open_files): Use it.
18001 * tests/suite.at (Checking output file names): New test.
18002
18003 2000-12-19 Akim Demaille <akim@epita.fr>
18004
18005 * src/system.h (obstack_grow_literal_string): Rename as...
18006 (obstack_grow_string): this.
18007 * src/output.c (output_parser): Recognize `%% actions' instead of
18008 `$'.
18009 * src/bison.s1: s/$/%% actions/.
18010 * src/bison.hairy: Likewise.
18011
18012 2000-12-19 Akim Demaille <akim@epita.fr>
18013
18014 * src/output.c (output_parser): Compute the `#line' lines when
18015 there are.
18016 * src/Makefile.am (bison.simple): Be a simple copy of bison.s1.
18017 Suggested by Hans Aberg.
18018
18019 2000-12-19 Akim Demaille <akim@epita.fr>
18020
18021 Let the handling of the skeleton files be local to the procedures
18022 that use it.
18023
18024 * src/files.c (xfopen, xfclose, skeleton_find, guardfile): No
18025 longer static.
18026 (fparser, open_extra_files): Remove.
18027 (open_files, output_files): Don't take care of fparser.
18028 * src/files.h: Adjust.
18029 * src/output.c (output_parser): Open and close the file to the
18030 skeleton.
18031 * src/reader.c (read_declarations): When %semantic_parser, open
18032 fguard.
18033
18034 2000-12-19 Akim Demaille <akim@epita.fr>
18035
18036 * src/file.h (BISON_SIMPLE, BISON_HAIRY): Move from here...
18037 * src/system.h (BISON_SIMPLE, BISON_HAIRY): ... to here.
18038
18039 2000-12-19 Akim Demaille <akim@epita.fr>
18040
18041 * src/files.c (open_files): Yipee! We no longer need all the code
18042 looking for `/tmp' since we have no tmp file.
18043
18044 2000-12-19 Akim Demaille <akim@epita.fr>
18045
18046 * src/system.h (EXT_TAB, EXT_OUTPUT, EXT_STYPE_H, EXT_GUARD_C):
18047 New macros.
18048 * src/files.c (open_files): Less dependency on MSDOS etc.
18049
18050 2000-12-14 Akim Demaille <akim@epita.fr>
18051
18052 * src/bison.s1 (YYLLOC_DEFAULT): New macro.
18053 Provide a default definition.
18054 Use it when executing the default @ action.
18055 * src/reader.c (reader_output_yylsp): No longer include
18056 `timestamp' and `text' in the default YYLTYPE.
18057
18058 2000-12-12 Akim Demaille <akim@epita.fr>
18059
18060 * src/reader.c (copy_definition, parse_union_decl, copy_action)
18061 (copy_guard): Quote the file names.
18062 Reported by Laurent Mascherpa.
18063
18064 2000-12-12 Akim Demaille <akim@epita.fr>
18065
18066 * src/output.c (output_headers, output_program, output): Be sure
18067 to escape special characters when outputting filenames.
18068 (ACTSTR_PROLOGUE, ACTSTR_EPILOGUE): Remove.
18069 (output_headers): Don't depend on them, Use ACTSTR.
18070
18071 2000-11-17 Akim Demaille <akim@epita.fr>
18072
18073 * lib/obstack.h: Formatting changes.
18074 (obstack_grow, obstack_grow0): Don't cast WHERE at all: it
18075 prevents type checking.
18076 (obstack_ptr_grow, obstack_ptr_grow_fast): When assigning, don't
18077 cast the value to (void *): assigning a `foo *' to a `void *'
18078 variable is valid.
18079 (obstack_int_grow, obstack_int_grow_fast): Don't cast AINT to int.
18080 * src/reader.c (parse_union_decl): Typo: use obstack_1grow to
18081 append characters.
18082
18083 2000-11-17 Akim Demaille <akim@epita.fr>
18084
18085 * tests/Makefile.am (suite.m4, regression.m4, calc.m4): Rename
18086 as...
18087 (suite.m4, regression.m4, calc.m4): these.
18088 * tests/atgeneral.m4: Update from CVS Autoconf.
18089
18090 2000-11-17 Akim Demaille <akim@epita.fr>
18091
18092 * tests/regression.m4 (%union and --defines): New test,
18093 demonstrating a current bug in the obstack implementation.
18094
18095 2000-11-17 Akim Demaille <akim@epita.fr>
18096
18097 * src/bison.s1 (_YY_DECL_VARIABLES, YY_DECL_VARIABLES): New
18098 macros.
18099 Use them to declare the variables which are global or local to
18100 `yyparse'.
18101
18102 2000-11-17 Akim Demaille <akim@epita.fr>
18103
18104 * acconfig.h: Remove, no longer used.
18105
18106 2000-11-07 Akim Demaille <akim@epita.fr>
18107
18108 * src: s/Copyright (C)/Copyright/g.
18109
18110 2000-11-07 Akim Demaille <akim@epita.fr>
18111
18112 * src/reader.c (reader): #define YYLSP_NEEDED to 1 instead of just
18113 defining.
18114 * src/bison.s1: s/#ifdef YYLSP_NEEDED/#if YYLSP_NEEDED/.
18115
18116 2000-11-07 Akim Demaille <akim@epita.fr>
18117
18118 * src/bison.s1 (YYLEX): Use #if instead of #ifdef.
18119 Merge in a single CPP if/else.
18120
18121 2000-11-07 Akim Demaille <akim@epita.fr>
18122
18123 * src/output.c (output): Remove useless variables.
18124 * lib/obstack.c (obstack_grow, obstack_grow0): Rename the second
18125 argument `data' for consistency with the prototypes.
18126 Qualify it `const'.
18127 (obstack_copy, obstack_copy0): Rename the second argument as
18128 `address' for consistency. Qualify it `const'.
18129 * lib/obstack.h (obstack_copy, obstack_copy0, obstack_grow)
18130 (obstack_grow0, obstack_ptr_grow, obstack_ptr_grow_fast): Qualify
18131 `const' their input argument (`data' or `address').
18132 Adjust the corresponding macros to include `const' in casts.
18133
18134 2000-11-03 Akim Demaille <akim@epita.fr>
18135
18136 * src/Makefile.am (INCLUDES): s/PFILE/BISON_SIMPLE/.
18137 s/PFILE1/BISON_HAIRY/.
18138 Adjust dependencies.
18139
18140 2000-11-03 Akim Demaille <akim@epita.fr>
18141
18142 For some reason, this was not applied.
18143
18144 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
18145 `unlink': it's no longer used.
18146
18147 2000-11-03 Akim Demaille <akim@epita.fr>
18148
18149 * src/files.c (skeleton_find): New function, eved out of...
18150 (open_files, open_extra_files): here.
18151
18152 2000-11-03 Akim Demaille <akim@epita.fr>
18153
18154 Don't use `atexit'.
18155
18156 * src/files.c (obstack_save): New function.
18157 (done): Rename as...
18158 (output_files): this.
18159 Use `obstack_save'.
18160 * src/main.c (main): Don't use `atexit' to register `done', since
18161 it no longer has to remove tmp files, just call `output_files'
18162 when there are no errors.
18163
18164 2000-11-02 Akim Demaille <akim@epita.fr>
18165
18166 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
18167 `unlink': it's no longer used.
18168 * src/files.h: Formatting changes.
18169
18170 2000-11-02 Akim Demaille <akim@epita.fr>
18171
18172 Remove the last uses of mktemp and unlink/delete.
18173
18174 * src/files.c (fdefines, ftable): Removed.
18175 (defines_ostack, table_obstack): New.
18176 Adjust dependencies of the former into uses of the latter.
18177 * src/output.c (output_short_or_char_table, output_short_table):
18178 Convert to using obstacks.
18179 * src/reader.c (copy_comment2): Accept one FILE * and two
18180 obstacks.
18181 (output_token_defines, reader_output_yylsp): Use obstacks.
18182 * src/system.h (obstack_fgrow3): New.
18183 * po/POTFILES.in: Adjust.
18184
18185 2000-11-01 Akim Demaille <akim@epita.fr>
18186
18187 Change each use of `fattrs' into a use of `attrs_obstack'.
18188
18189 * src/reader.c (copy_at): Typo: s/yylloc/yyloc/.
18190 * src/files.c (fattrs): Remove.
18191 (attrs_obstack): New.
18192 Adjust all dependencies.
18193 (done): If SEMANTIC_PARSER, dump attrs_obstack into attrsfile.
18194
18195 2000-11-01 Akim Demaille <akim@epita.fr>
18196
18197 Introduce obstacks.
18198 Change each use of `faction' into a use of `action_obstack'.
18199
18200 * lib/obstack.h, lib/obstack.c: New files.
18201 * src/files.c (faction): Remove.
18202 (action_obstack): New.
18203 Adjust all dependencies.
18204
18205 2000-10-20 Akim Demaille <akim@epita.fr>
18206
18207 * lib/quote.h (PARAMS): New macro. Use it.
18208
18209 2000-10-16 Akim Demaille <akim@epita.fr>
18210
18211 * src/output.c (output_short_or_char_table): New function.
18212 (output_short_table, output_token_translations): Use it.
18213 (goto_actions): Use output_short_table.
18214
18215 2000-10-16 Akim Demaille <akim@epita.fr>
18216
18217 * src/symtab.c (bucket_new): New function.
18218 (getsym): Use it.
18219
18220 * src/output.c (output_short_table): New argument to display the
18221 comment associated with the table.
18222 Adjust dependencies.
18223 (output_gram): Use it.
18224 (output_rule_data): Nicer output layout for YYTNAME.
18225
18226 2000-10-16 Akim Demaille <akim@epita.fr>
18227
18228 * src/lex.c (read_typename): New function.
18229 (lex): Use it.
18230 * src/reader.c (copy_dollar): Likewise.
18231
18232 2000-10-16 Akim Demaille <akim@epita.fr>
18233
18234 * src/reader.c (copy_comment2): Expect the input stream to be on
18235 the `/' which is suspected to open a comment, instead of being
18236 called after `//' or `/*' was read.
18237 (copy_comment, copy_definition, parse_union_decl, copy_action)
18238 (copy_guard): Adjust.
18239
18240 2000-10-16 Akim Demaille <akim@epita.fr>
18241
18242 * src/reader.c (parse_expect_decl): Use `skip_white_space' and
18243 `read_signed_integer'.
18244
18245 2000-10-16 Akim Demaille <akim@epita.fr>
18246
18247 * src/reader.c (copy_dollar): New function.
18248 (copy_guard, copy_action): Use it.
18249
18250 2000-10-16 Akim Demaille <akim@epita.fr>
18251
18252 * lib/quote.h, lib/quote.c, lib/quotearg.h, lib/quotearg.c:
18253 * m4/prereq.m4, m4/c-bs-a.m4, m4/mbstate.m4:
18254 New files, from Fileutils 4.0.27.
18255 * src/main.c (printable_version): Remove.
18256 * src/lex.c, src/reader.c: Use `quote'.
18257
18258 2000-10-04 Akim Demaille <akim@epita.fr>
18259
18260 * lib/error.c, lib/error.h: New files, needed by xmalloc.c.
18261
18262 2000-10-04 Akim Demaille <akim@epita.fr>
18263
18264 * doc/bison.texinfo: Various typos spotted by Neil Booth.
18265
18266 2000-10-04 Akim Demaille <akim@epita.fr>
18267
18268 When a literal string is used to define two different tokens,
18269 `bison -v' segfaults.
18270 Reported by Piotr Gackiewicz, and fixed by Neil Booth.
18271
18272 * tests/regression.m4: New file.
18273 Include the core of the sample provided by Piotr Gackiewicz.
18274 * src/reader.c (parse_token_decl): Diagnose bad cases, and proceed
18275 properly.
18276
18277 2000-10-04 Akim Demaille <akim@epita.fr>
18278
18279 * src/reader.c (parse_expect_decl): Keep `count' within the size
18280 of `buffer'.
18281 From Neil Booth.
18282
18283 2000-10-02 Paul Eggert <eggert@twinsun.com>
18284
18285 * bison.s1 (yyparse): Assign the default value
18286 unconditionally, to avoid a GCC warning and make the parser a
18287 tad smaller.
18288
18289 2000-10-02 Akim Demaille <akim@epita.fr>
18290
18291 * src/getargs.c (getargs): Don't dump `--help' on unrecognized
18292 options.
18293
18294 2000-10-02 Akim Demaille <akim@epita.fr>
18295
18296 * src/derives.c, src/print.c, src/reduce.c: To ease the
18297 translation, move some `\n' out of the translated strings.
18298
18299 2000-10-02 Akim Demaille <akim@epita.fr>
18300
18301 The location tracking mechanism is precious for parse error
18302 messages. Nevertheless, it is enabled only when `@n' is used in
18303 the grammar, which is a different issue (you can use it in error
18304 message, but not in the grammar per se). Therefore, there should
18305 be another means to enable it.
18306
18307 * src/getargs.c (getargs): Support `--locations'.
18308 (usage): Report it.
18309 * src/getargs.h (locationsflag): Export it.
18310 * src/lex.c (percent_table): Support `%locations'.
18311 * src/reader.c (yylsp_needed): Remove this variable, now replaced
18312 with `locationsflag'.
18313 * doc/bison.texinfo: Document `--locations' and `%locations'.
18314 Sort the options.
18315 * tests/calc.m4: Test it.
18316
18317 For regularity of the names, replace each
18318 (nolineflag, toknumflag, rawtokenumflag, noparserflag): with...
18319 (no_lineflag, token_tableflag, rawflag, no_parserflag): this.
18320 In addition replace each `flag' with `_flag'.
18321
18322 2000-10-02 Akim Demaille <akim@epita.fr>
18323
18324 Also test parse error messages, including with YYERROR_VERBOSE.
18325
18326 * tests/calc.m4 (calc.y): Add support for `exp = exp' (non
18327 associative).
18328 Use it to check the computations.
18329 Use it to check `nonassoc' is honored.
18330 (AT_DATA_CALC_Y): Equip `calc.y' with YYERROR_VERBOSE when passed
18331 `--yyerror-verbose'.
18332 (_AT_CHECK_CALC): Adjust to this option.
18333 (_AT_CHECK_CALC_ERROR): New macro to check parse error messages.
18334
18335 2000-10-02 Akim Demaille <akim@epita.fr>
18336
18337 Test also `--verbose', `--defines' and `--name-prefix'. Testing
18338 the latter demonstrates a flaw in the handling of non debugging
18339 parsers introduced by myself on 2000-03-16: `#define yydebug 0'
18340 was used in order to simplify:
18341
18342 #if YYDEBUG
18343 if (yydebug)
18344 {
18345 ...
18346 }
18347 #endif
18348
18349 into
18350
18351 if (yydebug)
18352 {
18353 ...
18354 }
18355
18356 unfortunately this leads to a CPP conflict when
18357 `--name-prefix=foo' is used since it produces `#define yydebug
18358 foodebug'.
18359
18360 * src/bison.s1 [!YYDEBUG]: Do not define yydebug.
18361 (YYDPRINTF): New macro.
18362 Spread its use.
18363 * tests/calc.m4 (AT_CHECK_CALC): Do require a title, build it from
18364 the bison options.
18365 Also test `--verbose', `--defines' and `--name-prefix'.
18366
18367 2000-10-02 Akim Demaille <akim@epita.fr>
18368
18369 Improve the readability of the produced parsers.
18370
18371 * src/bison.s1: Formatting changes.
18372 Improve the comment related to the `$' mark.
18373 (yydefault): Don't fall through to `yyresume': `goto' there.
18374 * src/output.c (output_parser): When the `$' is met, skip the end
18375 of its line.
18376 New variable, `number_of_dollar_signs', to check there's exactly
18377 one `$' in the parser skeleton.
18378
18379 2000-10-02 Akim Demaille <akim@epita.fr>
18380
18381 * lib/xstrdup.c: New file, from the fileutils.
18382 * src/reader.c (parse_token_decl, get_type_name, parse_type_decl)
18383 (parse_assoc_decl, parse_thong_decl, get_type): Use `xstrdup'
18384 instead of strlen + xmalloc + strcpy.
18385 * src/symtab.c (copys): Remove, use xstrdup instead.
18386
18387 2000-10-02 Akim Demaille <akim@epita.fr>
18388
18389 * src/gram.h (associativity): New enum type which replaces the
18390 former CPP macros `RIGHT_ASSOC', `LEFT_ASSOC' and `NON_ASSOC' with
18391 `right_assoc', `left_assoc' and `non_assoc'.
18392 Adjust all dependencies.
18393 * src/reader.c: Formatting changes.
18394 (LTYPESTR): Don't define it, use it as a literal in
18395 `reader_output_yylsp'.
18396 * src/symtab.h (symbol_class): New enum type which replaces the
18397 former CPP macros `SUNKNOWN', `STOKEN and `SNTERM' with
18398 `sunknown', `stoken and `snterm'.
18399
18400 2000-10-02 Akim Demaille <akim@epita.fr>
18401
18402 * src/getargs.c (fixed_outfiles): Rename as...
18403 (yaccflag): for consistency and accuracy.
18404 Adjust dependencies.
18405
18406 2000-10-02 Akim Demaille <akim@epita.fr>
18407
18408 Use the more standard files `xalloc.h' and `xmalloc.c' instead of
18409 Bison's `allocate.c' and `alloc.h'. This patch was surprisingly
18410 difficult and introduced a lot of core dump. It turns out that
18411 Bison used an implementation of `xmalloc' based on `calloc', and
18412 at various places it does depend upon the initialization to 0. I
18413 have not tried to isolate the pertinent places, and all the former
18414 calls to Bison's `xmalloc' are now using `XCALLOC'. Someday,
18415 someone should address this issue.
18416
18417 * src/allocate.c, src/alloc.h, m4/bison-decl.m4: Remove.
18418 * lib/xmalloc.c, lib/xalloc.h, m4/malloc.m4, m4/realloc.m4: New
18419 files.
18420 Adjust dependencies.
18421 * src/warshall.h: New file.
18422 Propagate.
18423
18424 2000-10-02 Akim Demaille <akim@epita.fr>
18425
18426 Various anti-`extern in *.c' changes.
18427
18428 * src/system.h: Include `assert.h'.
18429
18430 2000-10-02 Akim Demaille <akim@epita.fr>
18431
18432 * src/state.h (nstates, final_state, first_state, first_shift)
18433 (first_reduction): Move their exportation from here...
18434 * src/LR0.h: to here.
18435 Adjust dependencies.
18436 * src/getargs.c (statisticsflag): New variable.
18437 Add support for `--statistics'.
18438 Adjust dependencies.
18439
18440 Remove a lot of now useless `extern' statements in most files.
18441
18442 2000-10-02 Akim Demaille <akim@epita.fr>
18443
18444 * src/LR0.h: New file.
18445 Propagate its use.
18446
18447 2000-10-02 Akim Demaille <akim@epita.fr>
18448
18449 * src/print.h: New file.
18450 Propagate its use.
18451 * src/print.c: Formatting and ordering changes.
18452 (verbose, terse): Replace with...
18453 (print_results): this new function.
18454 Adjust dependencies.
18455
18456 2000-10-02 Akim Demaille <akim@epita.fr>
18457
18458 * src/conflicts.c (conflict_report): New function.
18459 (conflict_log, verbose_conflict_log): Replace with...
18460 (print_conflicts): this function.
18461 Adjust dependencies.
18462 * src/conflicts.h: New file.
18463 Propagate its inclusion.
18464
18465 2000-10-02 Akim Demaille <akim@epita.fr>
18466
18467 * src/nullable.h: New file.
18468 Propagate its inclusion.
18469 * src/nullable.c: Formatting changes.
18470
18471 2000-10-02 Akim Demaille <akim@epita.fr>
18472
18473 * src/reduce.h: New file.
18474 Propagate its inclusion.
18475 * src/reduce.c: Topological sort and other formatting changes.
18476 (bool, TRUE, FALSE): Move their definition to...
18477 * src/system.h: here.
18478
18479 2000-10-02 Akim Demaille <akim@epita.fr>
18480
18481 * src/files.c: Formatting changes.
18482 (tryopen, tryclose, openfiles): Rename as...
18483 (xfopen, xfclose, open_files): this.
18484 (stringappend): static.
18485 * src/files.h: Complete the list of exported symbols.
18486 Propagate its use.
18487
18488 2000-10-02 Akim Demaille <akim@epita.fr>
18489
18490 * src/reader.h: New file.
18491 Propagate its use instead of tedious list of `extern' and
18492 prototypes.
18493 * src/reader.c: Formatting changes, topological sort,
18494 s/register//.
18495
18496 2000-10-02 Akim Demaille <akim@epita.fr>
18497
18498 * src/lex.h: Prototype `lex.c' exported functions.
18499 * src/reader.c: Adjust.
18500 * src/lex.c: Formatting changes.
18501 (safegetc): Rename as...
18502 (xgetc): this.
18503
18504 2000-10-02 Akim Demaille <akim@epita.fr>
18505
18506 * src/lalr.h: New file.
18507 Propagate its inclusion instead of prototypes and `extern'.
18508 * src/lalr.c: Formatting changes, topological sorting etc.
18509
18510 2000-10-02 Akim Demaille <akim@epita.fr>
18511
18512 * src/output.c (token_actions): Introduce a temporary array,
18513 YYDEFACT, that makes it possible for this function to use
18514 output_short_table.
18515
18516 2000-10-02 Akim Demaille <akim@epita.fr>
18517
18518 `user_toknums' is output as a `short[]' in `output.c', while it is
18519 defined as a `int[]' in `reader.c'. For consistency with the
18520 other output tables, `user_toknums' is now defined as a table of
18521 shorts.
18522
18523 * src/reader.c (user_toknums): Be a short table instead of an int
18524 table.
18525 Adjust dependencies.
18526
18527 Factor the short table outputs.
18528
18529 * src/output.c (output_short_table): New function.
18530 * src/output.c (output_gram, output_stos, output_rule_data)
18531 (output_base, output_table, output_check): Use it.
18532
18533 2000-10-02 Akim Demaille <akim@epita.fr>
18534
18535 * src/output.c (output): Topological sort of the functions, in
18536 order to get rid of the `static' prototypes.
18537 No longer use `register'.
18538 * src/output.h: New file.
18539 Propagate its inclusion in files explicitly prototyping functions
18540 from output.c.
18541
18542 2000-09-21 Akim Demaille <akim@epita.fr>
18543
18544 * src/atgeneral.m4: Update from Autoconf.
18545
18546 2000-09-21 Akim Demaille <akim@epita.fr>
18547
18548 * src/closure.h: New file.
18549 * src/closure.c: Formatting changes, topological sort over the
18550 functions, use of closure.h.
18551 (initialize_closure, finalize_closure): Rename as...
18552 (new_closure, free_closure): these. Adjust dependencies.
18553 * src/LR0.c: Formatting changes, topological sort, use of
18554 cloture.h.
18555 (initialize_states): Rename as...
18556 (new_states): this.
18557 * src/Makefile.am (noinst_HEADERS): Adjust.
18558
18559 2000-09-20 Akim Demaille <akim@epita.fr>
18560
18561 * src/acconfig.h: Don't protect config.h against multiple
18562 inclusion.
18563 Don't define PARAMS.
18564 * src/system.h: Define PARAMS.
18565 Remove some of the ad-hoc CPP magic for DOS, VMS etc.: this is the
18566 purpose of config.h. system.h must not try to fix wrong
18567 definitions in config.h.
18568
18569 2000-09-20 Akim Demaille <akim@epita.fr>
18570
18571 * src/derives.h: New file.
18572 * src/main.c, src/derives.h: Use it.
18573 Formatting changes.
18574 * src/Makefile.am (noinst_HEADERS): Adjust.
18575
18576 2000-09-20 Akim Demaille <akim@epita.fr>
18577
18578 * tests/atgeneral.m4: Update from Autoconf.
18579 * tests/calc.m4 (_AT_DATA_CALC_Y, AT_DATA_CALC_Y, _AT_CHECK_CALC)
18580 (AT_CHECK_CALC): New macros.
18581 Use these macros to test bison with options `', `--raw',
18582 `--debug', `--yacc', `--yacc --debug'.
18583
18584 2000-09-19 Akim Demaille <akim@epita.fr>
18585
18586 * src/output.c: Formatting changes.
18587 * src/machine.h: Remove, leaving its contents in...
18588 * src/system.h: here.
18589 Include stdio.h.
18590 Adjust all dependencies on stdio.h and machine.h.
18591 * src/getargs.h: New file.
18592 Let all `extern' declarations about getargs.c be replaced with
18593 inclusion of `getargs.h'.
18594 * src/Makefile.am (noinst_HEADERS): Adjust.
18595
18596 * tests/calc.m4 (yyin): Be initialized in main, not on the global
18597 scope.
18598 (yyerror): Returns void, not int.
18599 * doc/bison.texinfo: Formatting changes.
18600
18601 2000-09-19 Akim Demaille <akim@epita.fr>
18602
18603 * tests/calc.m4 (calc.y): Do not assign to stdin, as it's not
18604 portable.
18605
18606 2000-09-18 Akim Demaille <akim@epita.fr>
18607
18608 * configure.in: Append WARNING_CFLAGS to CFLAGS.
18609 * src/Makefile.am (INCLUDES): Don't.
18610 Be ready to fetch headers in lib/.
18611
18612 2000-09-18 Akim Demaille <akim@epita.fr>
18613
18614 * doc/bison.texinfo: Update the copyright.
18615 ANSIfy and GNUify the examples.
18616 Remove the old menu.
18617
18618 2000-09-18 Akim Demaille <akim@epita.fr>
18619
18620 First set of tests: use the `calc' example from the documentation.
18621
18622 * src/bison.s1 (yyparse): Condition the code using `yytname' which
18623 is defined only when YYDEBUG is.
18624 * m4/atconfig.m4 (AT_CONFIG): Adjust to Autoconf 2.13.
18625 * src/files.c (tryopen, tryclose): Formatting changes.
18626 Move to the top and be static.
18627 * src/reader.c (read_signed_integer): Likewise.
18628 * tests/calc.m4: New file.
18629 * Makefile.am, suite.m4: Adjust.
18630 * m4/atconfig.m4: Set BISON_SIMPLE and BISON_HAIRY.
18631
18632 2000-09-18 Akim Demaille <akim@epita.fr>
18633
18634 Add support for an Autotest test suite for Bison.
18635
18636 * m4/m4.m4, m4/atconfig.m4: New files.
18637 * m4/Makefile.am (EXTRA_DIST): Adjust.
18638 * tests/suite.m4, tests/Makefile.am, tests/atgeneral.m4: New
18639 files.
18640 * src/getargs.c: Display a more standard --version message.
18641 * src/reader.c (reader): Formatting changes.
18642 No longer depend upon VERSION_STRING.
18643 * configure.in: No longer use `dnl'.
18644 Set up the test suite and the new directory `tests/.
18645 (VERSION_STRING): Remove.
18646
18647 2000-04-14 Akim Demaille <akim@epita.fr>
18648
18649 * src/reader.c (copy_comment2): New function, same as former
18650 `copy_comment', but outputs into two FILE *.
18651 (copy_comment): Use it.
18652 (parse_union_decl): Use it.
18653 (get_type, parse_start_decl): Use the same `invalid' message.
18654 (parse_start_decl, parse_union_decl): Use the same `multiple'
18655 message.
18656 (parse_union_decl, copy_guard, copy_action): Use the same
18657 `unmatched' message.
18658 * m4/Makefile.am (EXTRA_DIST): Add `warning.m4'.
18659
18660 2000-03-31 Akim Demaille <akim@epita.fr>
18661
18662 * src/files.c (tryopen, tryclose): Move to the top.
18663 Be static.
18664
18665 2000-03-31 Akim Demaille <akim@epita.fr>
18666
18667 * src/main.c (main): Don't call `done', exit does it.
18668
18669 2000-03-31 Akim Demaille <akim@epita.fr>
18670
18671 * allocate.c: s/return (foo)/return foo/.
18672 * lalr.c: Likewise.
18673 * LR0.c: Likewise.
18674 * output.c: Likewise.
18675 * reader.c: Likewise.
18676 * symtab.c: Likewise.
18677 * vmsgetargs.c: Likewise.
18678
18679 2000-03-31 Akim Demaille <akim@epita.fr>
18680
18681 Clean up the error reporting functions.
18682
18683 * src/report.c: New file.
18684 * src/report.h: Likewise.
18685 * src/Makefile.am: Adjust.
18686 * m4/error.m4: New file.
18687 * m4/Makefile.am: Adjust.
18688 * configure.in (jm_PREREQ_ERROR): Call it.
18689 * src/main.c (int_to_string, banner, fatal_banner, warn_banner):
18690 Remove.
18691 (fatal, fatals): Remove. All callers use complain.c::fatal.
18692 (warn, warni, warns, warnss, warnss): Remove. All callers use
18693 complain.c::complain.
18694 (toomany): Remove, use fatal instead.
18695 * src/files.c (done): No argument, use complain_message_count.
18696 * src/main.c (main): Register `done' to `atexit'.
18697
18698 * src/getargs.c (usage): More `fputs', less `fprintf'.
18699
18700 2000-03-28 Akim Demaille <akim@epita.fr>
18701
18702 * lib/: New directory.
18703 * Makefile.am (SUBDIRS): Adjust.
18704 * configure.in: Adjust.
18705 (LIBOBJS): Although not used yet, AC_SUBST it, otherwise it's
18706 useless.
18707 * src/alloca.c: Moved to lib/.
18708 * src/getopt.c: Likewise.
18709 * src/getopt1.c: Likewise.
18710 * src/getopt.h: Likewise.
18711 * src/ansi2knr.c: Likewise.
18712 * src/ansi2knr.1: Likewise.
18713 * src/Makefile.am: Adjust.
18714 * lib/Makefile.am: New file.
18715
18716 2000-03-28 Akim Demaille <akim@epita.fr>
18717
18718 * src/getargs.c (usage): Refresh the help message.
18719
18720 2000-03-17 Akim Demaille <akim@epita.fr>
18721
18722 * src/getopt1.c: Updated from textutils 2.0e
18723 * src/getopt.c: Likewise.
18724 * src/getopt.h: Likewise.
18725
18726 2000-03-17 Akim Demaille <akim@epita.fr>
18727
18728 * src/Makefile.am (bison.simple): Fix the awk program: quote only
18729 the file name, not the whole `#line LINE FILE'.
18730
18731 2000-03-17 Akim Demaille <akim@epita.fr>
18732
18733 On syntax errors, report the token on which we choked.
18734
18735 * src/bison.s1 (yyparse): In the label yyerrlab, when
18736 YYERROR_VERBOSE, add yychar in msg.
18737
18738 2000-03-17 Akim Demaille <akim@epita.fr>
18739
18740 * src/reader.c (copy_at): New function.
18741 (copy_guard): Use it.
18742 (copy_action): Use it.
18743
18744 2000-03-17 Akim Demaille <akim@epita.fr>
18745
18746 Be kind to translators, save some useless translations.
18747
18748 * src/main.c (banner): New function.
18749 (fatal_banner): Use it.
18750 (warn_banner): Use it.
18751
18752 2000-03-17 Akim Demaille <akim@epita.fr>
18753
18754 * src/reader.c (copy_definition): Use copy_string and
18755 copy_comment. Removed now unused `match', `ended',
18756 `cplus_comment'.
18757 (copy_comment, copy_string): Moved, to be visible from
18758 copy_definition.
18759
18760 2000-03-17 Akim Demaille <akim@epita.fr>
18761
18762 * src/reader.c (copy_string): Declare `static inline'. No
18763 problems with inline, since it is checked by configure.
18764 (copy_comment): Likewise.
18765
18766 2000-03-17 Akim Demaille <akim@epita.fr>
18767
18768 * src/reader.c (packsymbols): Formatting changes.
18769
18770 2000-03-17 Akim Demaille <akim@epita.fr>
18771
18772 * src/reader.c (copy_comment): New function, factored out from:
18773 (copy_action): Use it. Removed now unused `match', `ended',
18774 `cplus_comment'.
18775 (copy_guard): Likewise.
18776
18777 2000-03-17 Akim Demaille <akim@epita.fr>
18778
18779 * src/reader.c (copy_string): New function, factored out from:
18780 (copy_action): Use it.
18781 (copy_guard): Likewise.
18782
18783 2000-03-17 Akim Demaille <akim@epita.fr>
18784
18785 Change the handling of @s so that they behave exactly like $s.
18786 There is now a pseudo variable @$ (readble and writable), location
18787 of the lhs of the rule (by default ranging from the location of
18788 the first symbol of the rhs, to the location of the last symbol,
18789 or, if the rhs is empty, YYLLOC).
18790
18791 * src/bison.s1 [YYLSP_NEEDED] (yyloc): New variable, twin of
18792 yyval.
18793 (yyparse): When providing a default semantic action, provide a
18794 default location action.
18795 (after the $): No longer change `*YYLSP', just stack YYLOC the
18796 same way you stack YYVAL.
18797 * src/reader.c (read_declarations): Use warns.
18798 (copy_guard, case '@'): Also recognize `@$', expanded as `YYLOC'.
18799 (copy_action, case '@'): Likewise.
18800 Use a standard error message, to save useless work from
18801 translators.
18802
18803 2000-03-17 Akim Demaille <akim@epita.fr>
18804
18805 * src/bison.s1: Formatting and cosmetics changes.
18806 * src/reader.c: Likewise.
18807 Update the Copyright notice.
18808
18809 2000-03-17 Akim Demaille <akim@epita.fr>
18810
18811 * src/bison.s1 (#line): All set to `#line' only, since the
18812 Makefile now handles them.
18813
18814 2000-03-16 Akim Demaille <akim@epita.fr>
18815
18816 * src/output.c (output_rule_data): Output the documentation of
18817 some of the tables.
18818 (Copyright notice): Update.
18819 Formatting changes.
18820
18821 2000-03-16 Akim Demaille <akim@epita.fr>
18822
18823 * src/bison.s1 [!YYDEBUG]: Define yydebug to 0. This allows to
18824 remove most `#if YYDEBUG != 0', since `if (yydebug)' is enough.
18825 One `#if YYDEBUG' remains, since it uses variables which are
18826 defined only if `YYDEBUG != 0'.
18827
18828 2000-03-16 Akim Demaille <akim@epita.fr>
18829
18830 * src/bison.s1 (yyparse): Reorganize the definitions of the stacks
18831 and related variables so that the similarities are highlighted.
18832
18833 2000-03-16 Akim Demaille <akim@epita.fr>
18834
18835 * src/bison.s1: Properly indent CPP directives.
18836
18837 2000-03-16 Akim Demaille <akim@epita.fr>
18838
18839 * src/bison.s1: Properly indent the `alloca' CPP section.
18840
18841 2000-03-16 Akim Demaille <akim@epita.fr>
18842
18843 Do not hard code values of directories in `configure.in'.
18844 Update the `configure' tool chain.
18845
18846 * configure.in (XPFILE, XPFILE1, LOCALEDIR): Remove, handled by
18847 src/makefile.am.
18848 (VERSION_STRING): Use the third arg of AC_DEFINE_UNQUOTED.
18849 (AC_OUTPUT): Add m4/Makefile.
18850 Bump to bison 1.28a, 1.29 has never been released.
18851 * acconfig.h (XPFILE, XPFILE1, LOCALEDIR): Remove, since they are
18852 handled via src/Makefile.am.
18853 (VERSION_STRING, PROTOTYPES, ENABLE_NLS, HAVE_CATGETS,
18854 HAVE_GETTEXT, HAVE_LC_MESSAGES, HAVE_STPCPY): Remove, handled by
18855 autoheader.
18856 * Makefile.am (SUBDIRS): Add m4.
18857 (ACLOCAL_AM_FLAGS): New variable.
18858 (AUTOMAKE_OPTIONS): Add check-news.
18859 * src/Makefile.am (bison.simple): Use awk to replace #line lines with
18860 the proper line number and file name.
18861 (DEFS): Propagate the location of bison library files and of the
18862 locale files.
18863 (INCLUDES): Added `-I ..' so that one can compile with srcdir !=
18864 builddir.
18865 * acinclude.m4: Remove, replaced by the directory m4.
18866 * m4/Makefile.am (EXTRA_DIST): New variable.
18867 * m4/gettext.m4: New file, from the fileutils.
18868 * m4/lcmessage.m4: Likewise
18869 * m4/progtest.m4: Likewise.
18870 * m4/bison-decl.m4: New file, extracted from former acinclude.m4.
18871
18872 2000-03-10 Akim Demaille <akim@epita.fr>
18873
18874 * src/closure.c:
18875 Formatting changes of various comments.
18876 Respect the GNU coding standards at various places.
18877 Don't use `_()' when no translation is needed.
18878
18879 1999-12-13 Jesse Thilo <jthilo@gnu.org>
18880
18881 * src/files.c:
18882 OS/2 honors TMPDIR environment variable.
18883
18884 1999-12-13 Jesse Thilo <jthilo@gnu.org>
18885
18886 * doc/bison.texinfo: Tweaked spelling and grammar.
18887 Updated ISBN.
18888 Removed reference to price of printed copy.
18889 Mention BISON_SIMPLE and BISON_HAIRY.
18890
18891 1999-12-13 Jesse Thilo <jthilo@gnu.org>
18892
18893 * configure.in, NEWS:
18894 Bison 1.29 released.
18895
18896 1999-10-27 Jesse Thilo <jthilo@gnu.org>
18897
18898 * doc/.cvsignore, doc/Makefile.am, doc/refcard.tex:
18899 Added reference card.
18900
18901 1999-07-26 Jesse Thilo <jthilo@gnu.org>
18902
18903 * po/ru.po: Added Russian translation.
18904
18905 1999-07-26 Jesse Thilo <jthilo@gnu.org>
18906
18907 * configure.in: Added Russian translation.
18908
18909 1999-07-06 Jesse Thilo <jthilo@gnu.org>
18910
18911 * configure.in, NEWS, README:
18912 Released version 1.28.
18913
18914 1999-06-14 Jesse Thilo <jthilo@gnu.org>
18915
18916 * src/system.h:
18917 Squashed redefinition warning on some systems.
18918
18919 * src/getargs.c, src/Makefile.am, src/reader.c, src/version.c:
18920 Have configure build version string instead of relying on ANSI string
18921 concatentation.
18922
18923 1999-06-14 Jesse Thilo <jthilo@gnu.org>
18924
18925 * po/POTFILES.in: Got rid of version.c.
18926
18927 1999-06-14 Jesse Thilo <jthilo@gnu.org>
18928
18929 * acconfig.h, configure.in:
18930 Have configure build version string instead of relying on ANSI string
18931 concatentation.
18932
18933 1999-06-08 Jesse Thilo <jthilo@gnu.org>
18934
18935 * doc/bison.1:
18936 Dropped mention of `+' for long-named options.
18937
18938 1999-05-30 Jesse Thilo <jthilo@gnu.org>
18939
18940 * src/files.c: Added <unistd.h> for unlink().
18941
18942 * src/Makefile.am, src/system.h:
18943 I18n fixes.
18944
18945 1999-05-30 Jesse Thilo <jthilo@gnu.org>
18946
18947 * README: Added a FAQ list.
18948
18949 * configure.in, acconfig.h:
18950 I18n fixes.
18951
18952 1999-05-30 Jesse Thilo <jthilo@gnu.org>
18953
18954 * doc/FAQ, doc/Makefile.am:
18955 Added a FAQ list.
18956
18957 1999-05-19 Jesse Thilo <jthilo@gnu.org>
18958
18959 * src/alloc.h, src/symtab.h, src/version.c:
18960 Protected inclusion of "config.h" with HAVE_CONFIG_H.
18961
18962 1999-04-18 Jesse Thilo <jthilo@gnu.org>
18963
18964 * src/.cvsignore, src/Makefile.am:
18965 Reorganized: sources in `src', documentation in `doc'.
18966
18967 * src/lex.c (literalchar):
18968 fixed the code for escaping double quotes (thanks
18969 Jonathan Czisny.)
18970
18971 1999-04-18 Jesse Thilo <jthilo@gnu.org>
18972
18973 * po/de.po, po/es.po, po/fr.po, po/nl.po, po/POTFILES.in:
18974 Adjusted paths to reflect directory reorganization.
18975
18976 1999-04-18 Jesse Thilo <jthilo@gnu.org>
18977
18978 * doc/.cvsignore, doc/Makefile.am:
18979 Reorganized: sources in `src', documentation in `doc'.
18980
18981 1999-04-18 Jesse Thilo <jthilo@gnu.org>
18982
18983 * configure.in:
18984 Updated AC_INIT file to reflect directory reorganization.
18985
18986 * configure.in, .cvsignore, Makefile.am, POTFILES.in:
18987 Reorganized: sources in `src', documentation in `doc'.
18988
18989 1999-04-13 Jesse Thilo <jthilo@gnu.org>
18990
18991 * src/allocate.c:
18992 Don't declare calloc() and realloc() if not necessary.
18993
18994 1999-04-13 Jesse Thilo <jthilo@gnu.org>
18995
18996 * configure.in, acconfig.h, acinclude.m4:
18997 Don't declare calloc() and realloc() if not necessary.
18998
18999 1999-03-23 Jesse Thilo <jthilo@gnu.org>
19000
19001 * po/.cvsignore: Added i18n support.
19002
19003 1999-03-23 Jesse Thilo <jthilo@gnu.org>
19004
19005 * acconfig.h, configure.in, Makefile.am:
19006 Added i18n support.
19007
19008 1999-03-22 Jesse Thilo <jthilo@gnu.org>
19009
19010 * src/bison.s1: Fixed #line numbers.
19011
19012 1999-03-15 Jesse Thilo <jthilo@gnu.org>
19013
19014 * po/es.po, po/fr.po, po/nl.po, po/de.po:
19015 Added PO files from Translation Project.
19016
19017 1999-03-03 Jesse Thilo <jthilo@gnu.org>
19018
19019 * Makefile.am:
19020 Added support for non-ANSI compilers (ansi2knr).
19021
19022 1999-02-16 Jesse Thilo <jthilo@gnu.org>
19023
19024 * configure.in: Bumped version number to 1.27.
19025
19026 * Makefile.am:
19027 Added `bison.simple' to list of files removed by `make distclean'.
19028
19029 1999-02-12 Jesse Thilo <jthilo@gnu.org>
19030
19031 * src/files.c, src/files.h:
19032 Defined locations of parser files in config.h instead of Makefile.
19033
19034 1999-02-12 Jesse Thilo <jthilo@gnu.org>
19035
19036 * acconfig.h, acinclude.m4, configure.in, Makefile.am:
19037 Defined locations of parser files in config.h instead of Makefile.
19038
19039 1999-02-09 Jesse Thilo <jthilo@gnu.org>
19040
19041 * Makefile.am:
19042 Removed inappropriate use of $< macro.
19043
19044 1999-02-05 Jesse Thilo <jthilo@gnu.org>
19045
19046 * po/Makefile.in.in, po/POTFILES.in:
19047 Add `po' directory skeleton.
19048
19049 1999-01-27 Jesse Thilo <jthilo@gnu.org>
19050
19051 * README: Document help-bison list.
19052
19053 * configure.in: Add check for mkstemp().
19054
19055 1999-01-20 Jesse Thilo <jthilo@gnu.org>
19056
19057 * src/conflicts.c, src/LR0.c, src/output.c, src/reader.c:
19058 Hush a few compiler warnings.
19059
19060 * src/files.c:
19061 Add tryclose(), which verifies that fclose was successful.
19062 Hush a couple of compiler warnings.
19063
19064 1999-01-20 Jesse Thilo <jthilo@gnu.org>
19065
19066 * Makefile.am, OChangeLog:
19067 ChangeLog is now automatically generated. Include the old version as
19068 OChangeLog.
19069
19070 1999-01-14 Jesse Thilo <jthilo@gnu.org>
19071
19072 * 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:
19073 Update FSF address.
19074
19075 1999-01-14 Jesse Thilo <jthilo@gnu.org>
19076
19077 * doc/bison.texinfo: Fix formatting glitch.
19078
19079 * doc/bison.texinfo: Update FSF address.
19080
19081 1999-01-14 Jesse Thilo <jthilo@gnu.org>
19082
19083 * acconfig.h: Update FSF address.
19084
19085 1999-01-08 Jesse Thilo <jthilo@gnu.org>
19086
19087 * src/system.h:
19088 Don't define PACKAGE here, since config.h defines it.
19089
19090 1998-12-30 Jesse Thilo <jthilo@gnu.org>
19091
19092 * src/reader.c: Update copyright date.
19093
19094 * src/main.c:
19095 Ditch sprintf to statically-sized buffers in fatal/warn functions in
19096 favor of output directly to stderr (avoids buffer overruns).
19097
19098 * src/reader.c: Some checks for premature EOF.
19099
19100 * 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:
19101 Use prototypes if the compiler understands them.
19102
19103 * src/files.c: Honor TMPDIR on Unix hosts.
19104 Use prototypes if the compiler understands them.
19105
19106 * src/reader.c:
19107 Fix a couple of buffer overrun bugs.
19108 Use prototypes if the compiler understands them.
19109
19110 * src/system.h: Include unistd.h and ctype.h.
19111 Use #ifdef instead of #if for NLS symbols.
19112
19113 1998-12-30 Jesse Thilo <jthilo@gnu.org>
19114
19115 * doc/bison.texinfo:
19116 Delete comment "consider using @set for edition number, etc..." since
19117 we now are doing so.
19118
19119 1998-12-30 Jesse Thilo <jthilo@gnu.org>
19120
19121 * configure.in:
19122 Use prototypes if the compiler understands them.
19123
19124 * NEWS: Document 1.26 highlights.
19125
19126 * Makefile.am: Require Automake 1.3 or later.
19127
19128 * acconfig.h:
19129 Use prototypes if the compiler understands them.
19130
19131 1998-12-29 Jesse Thilo <jthilo@gnu.org>
19132
19133 * src/version.c:
19134 Use VERSION symbol from automake for version number.
19135
19136 1998-12-29 Jesse Thilo <jthilo@gnu.org>
19137
19138 * acconfig.h, configure.in, version.cin:
19139 Use VERSION symbol from automake for version number.
19140
19141 1998-11-28 Jesse Thilo <jthilo@gnu.org>
19142
19143 * Makefile.am:
19144 Distribute original version of simple parser (bison.s1), not built
19145 version (bison.simple).
19146
19147 1998-11-28 Jesse Thilo <jthilo@gnu.org>
19148
19149 * doc/bison.texinfo: Add info dir entry.
19150
19151 * doc/bison.texinfo:
19152 Let automake put version number into documentation.
19153
19154 1998-11-26 Jesse Thilo <jthilo@gnu.org>
19155
19156 * src/bison.cld, src/build.com, src/vmshlp.mar:
19157 Add non-RCS files from /gd/gnu/bison.
19158
19159 1998-11-26 Jesse Thilo <jthilo@gnu.org>
19160
19161 * doc/bison.1:
19162 Document the BISON_HAIRY and BISON_SIMPLE variables.
19163
19164 1998-11-25 Jesse Thilo <jthilo@gnu.org>
19165
19166 * src/version.c: Build version.c automatically.
19167
19168 * src/reader.c:
19169 Fix token numbering (used to start at 258, not 257).
19170
19171 * src/system.h: Include config.h.
19172
19173 * src/getargs.c: Update bug report address.
19174
19175 * src/alloca.c, src/getopt1.c, src/getopt.c, src/getopt.h:
19176 Get latest copies of alloca.c, getopt.c, getopt.h, getopt1.c from gnu.org.
19177
19178 1998-11-25 Jesse Thilo <jthilo@gnu.org>
19179
19180 * Makefile.am:
19181 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
19182
19183 * configure.in, version.cin:
19184 Build version.c automatically.
19185
19186 * AUTHORS: Add AUTHORS file.
19187
19188 * README: Update bug report address.
19189
19190 * bison.simple:
19191 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
19192
19193 * configure.in, Makefile.am, Makefile.in, stamp-h.in:
19194 Add automake stuff.
19195
19196 1998-11-25 Jesse Thilo <jthilo@gnu.org>
19197
19198 * doc/bison.texinfo: Clean up some formatting.
19199
19200 1998-05-05 Richard Stallman <rms@gnu.org>
19201
19202 * doc/bison.texinfo:
19203 Explain better why to make a pure parser.
19204
19205 1998-01-05 Richard Stallman <rms@gnu.org>
19206
19207 * src/files.c (openfiles):
19208 [_WIN32 && !__CYGWIN32__] Use TEMP or Temp to
19209 find a temporary directory, if possible. Do not unlink files while
19210 they are open.
19211
19212 1997-08-25 Richard Stallman <rms@gnu.org>
19213
19214 * src/reader.c (stack_offset;):
19215 Change some warni to warns.
19216
19217 * src/lex.c (literalchar): Use warns, not warni.
19218
19219 1997-06-28 Richard Stallman <rms@gnu.org>
19220
19221 * src/bison.s1: Add a Bison version comment.
19222
19223 * src/main.c (fatal, warn, berror):
19224 Use program_name.
19225
19226 1997-06-28 Richard Stallman <rms@gnu.org>
19227
19228 * Makefile.in (bison_version): New variable.
19229 (dist): Use that variable.
19230 (bison.s1): Substitute the Bison version into bison.simple.
19231
19232 * bison.simple: Add a Bison version comment.
19233
19234 1997-06-18 Richard Stallman <rms@gnu.org>
19235
19236 * src/main.c (fatal, warn, berror):
19237 Make error messages standard.
19238 (toomany): Improve error message text.
19239
19240 * 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:
19241 new.h renamed to alloc.h.
19242
19243 1997-06-18 Richard Stallman <rms@gnu.org>
19244
19245 * Makefile.in: new.h renamed to alloc.h.
19246
19247 1997-05-24 Richard Stallman <rms@gnu.org>
19248
19249 * src/lex.c (literalchar):
19250 Fix the code for escaping \, " and '.
19251
19252 (lex): Avoid trouble when there are many chars
19253 to discard in a char literal with just several chars in it.
19254
19255 1997-05-17 Richard Stallman <rms@gnu.org>
19256
19257 * src/bison.s1:
19258 Use malloc, if using alloca is troublesome.
19259 (YYSTACK_USE_ALLOCA): New flag macro.
19260 Define it for some systems and compilers.
19261 (YYSTACK_ALLOC): New macro.
19262 (yyparse): Use YYSTACK_ALLOC to allocate stack.
19263 If it was malloc'd, free it.
19264
19265 1997-05-17 Richard Stallman <rms@gnu.org>
19266
19267 * bison.simple:
19268 Use malloc, if using alloca is troublesome.
19269 (YYSTACK_USE_ALLOCA): New flag macro.
19270 Define it for some systems and compilers.
19271 (YYSTACK_ALLOC): New macro.
19272 (yyparse): Use YYSTACK_ALLOC to allocate stack.
19273 If it was malloc'd, free it.
19274
19275 1997-04-23 Richard Stallman <rms@gnu.org>
19276
19277 * src/bison.s1:
19278 (alloca) [__hpux]: Always define as __builtin_alloca.
19279
19280 1997-04-23 Richard Stallman <rms@gnu.org>
19281
19282 * bison.simple:
19283 (alloca) [__hpux]: Always define as __builtin_alloca.
19284
19285 1997-04-22 Richard Stallman <rms@gnu.org>
19286
19287 * src/bison.s1:
19288 [__hpux]: Include alloca.h (right for HPUX 10)
19289 instead of declaring alloca (right for HPUX 9).
19290
19291 * src/bison.s1 (__yy_memcpy):
19292 Declare arg `count' as unsigned int.
19293 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
19294
19295 1997-04-22 Richard Stallman <rms@gnu.org>
19296
19297 * bison.simple:
19298 [__hpux]: Include alloca.h (right for HPUX 10)
19299 instead of declaring alloca (right for HPUX 9).
19300
19301 * bison.simple (__yy_memcpy):
19302 Declare arg `count' as unsigned int.
19303 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
19304
19305 1997-01-03 Richard Stallman <rms@gnu.org>
19306
19307 * src/allocate.c: [__STDC__ or _MSC_VER]:
19308 Declare calloc and realloc to return void *.
19309
19310 1997-01-02 Richard Stallman <rms@gnu.org>
19311
19312 * src/system.h:
19313 [_MSC_VER]: Include stdlib.h and process.h.
19314 [_MSC_VER] (getpid): Define as macro--translate it to _getpid.
19315
19316 * src/main.c (main): Return FAILURE as a value.
19317 (printable_version): Declare arg as int, not char.
19318
19319 1997-01-02 Richard Stallman <rms@gnu.org>
19320
19321 * Makefile.in (dist):
19322 Explicitly check for symlinks, and copy them.
19323
19324 1996-12-19 Richard Stallman <rms@gnu.org>
19325
19326 * src/files.c:
19327 [_MSC_VER] (XPFILE, XPFILE1): Define, if not already defined.
19328
19329 1996-12-18 Paul Eggert <eggert@gnu.org>
19330
19331 * src/bison.s1 (yyparse):
19332 If __GNUC__ and YYPARSE_PARAM are both defined,
19333 declare yyparse to have a void * argument.
19334
19335 1996-12-18 Paul Eggert <eggert@gnu.org>
19336
19337 * bison.simple (yyparse):
19338 If __GNUC__ and YYPARSE_PARAM are both defined,
19339 declare yyparse to have a void * argument.
19340
19341 1996-12-17 Richard Stallman <rms@gnu.org>
19342
19343 * src/reduce.c (nbits): Add some casts.
19344
19345 1996-08-12 Richard Stallman <rms@gnu.org>
19346
19347 * src/bison.s1: Test _MSDOS as well as _MSDOS_.
19348
19349 1996-08-12 Richard Stallman <rms@gnu.org>
19350
19351 * bison.simple: Test _MSDOS as well as _MSDOS_.
19352
19353 1996-07-31 Richard Stallman <rms@gnu.org>
19354
19355 * src/bison.s1:
19356 [__sun && __i386]: Include alloca.h.
19357
19358 1996-07-31 Richard Stallman <rms@gnu.org>
19359
19360 * bison.simple:
19361 [__sun && __i386]: Include alloca.h.
19362
19363 1996-07-30 Richard Stallman <rms@gnu.org>
19364
19365 * src/bison.s1: Comment change.
19366
19367 * src/bison.s1: Test _MSDOS_, not MSDOS.
19368
19369 1996-07-30 Richard Stallman <rms@gnu.org>
19370
19371 * bison.simple: Comment change.
19372
19373 * bison.simple: Test _MSDOS_, not MSDOS.
19374
19375 1996-06-01 Richard Stallman <rms@gnu.org>
19376
19377 * 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:
19378 Insert `_' macro around many string constants.
19379
19380 * src/main.c:
19381 Insert `_' macro around many string constants.
19382
19383 (main): Call setlocale, bindtextdomain and textdomain.
19384
19385 * src/system.h: [HAVE_LOCALE_H]: Include locale.h.
19386 [! HAVE_LOCALE_H] (setlocale): Define as no-op.
19387 [ENABLE_NLS]: Include libintl.h.
19388 [ENABLE_NLS] (gettext): Define.
19389 [! ENABLE_NLS] (bintextdomain, textdomain, _): Consolation definitions.
19390 (N_, PACKAGE, LOCALEDIR): New macros.
19391
19392 1996-06-01 Richard Stallman <rms@gnu.org>
19393
19394 * POTFILES.in: New file.
19395
19396 * Makefile.in (allocate.o):
19397 Define target explicitly.
19398
19399 * Makefile.in (CFLAGS): Set to @CFLAGS@.
19400 (LDFLAGS): Set to @LDFLAGS@.
19401 (configure): Run autoconf only if preceding `cd' succeeds.
19402 (bison.s1): Redirect output to temporary file then move the
19403 temporary to the target, rather than redirecting directly to bison.s1.
19404 (clean): Remove config.status and config.log.
19405 (distclean): Don't remove config.status here.
19406
19407 1996-05-12 Richard Stallman <rms@gnu.org>
19408
19409 * src/bison.s1:
19410 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
19411
19412 1996-05-12 Richard Stallman <rms@gnu.org>
19413
19414 * bison.simple:
19415 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
19416
19417 1996-05-11 Richard Stallman <rms@gnu.org>
19418
19419 * src/bison.s1 (__yy_memcpy):
19420 Really reorder the args, as was supposedly done on Feb 14 1995.
19421 (yyparse): Calls changed accordingly.
19422
19423 1996-05-11 Richard Stallman <rms@gnu.org>
19424
19425 * Makefile.in (dist): Don't use $(srcdir).
19426
19427 * bison.simple (__yy_memcpy):
19428 Really reorder the args, as was supposedly done on Feb 14 1995.
19429 (yyparse): Calls changed accordingly.
19430
19431 1996-01-27 Richard Stallman <rms@gnu.org>
19432
19433 * src/output.c (output_rule_data):
19434 Test YYERROR_VERBOSE in the conditional
19435 around the definition of ttyname.
19436
19437 1995-12-29 Richard Stallman <rms@gnu.org>
19438
19439 * src/bison.s1:
19440 Fix line numbers in #line commands.
19441
19442 1995-12-29 Richard Stallman <rms@gnu.org>
19443
19444 * bison.simple:
19445 Fix line numbers in #line commands.
19446
19447 1995-12-27 Richard Stallman <rms@gnu.org>
19448
19449 * src/bison.s1 (YYPARSE_PARAM_DECL):
19450 In C++, make it always null.
19451 (YYPARSE_PARAM_ARG): New macro.
19452 (yyparse): Use YYPARSE_PARAM_ARG.
19453
19454 1995-12-27 Richard Stallman <rms@gnu.org>
19455
19456 * bison.simple (YYPARSE_PARAM_DECL):
19457 In C++, make it always null.
19458 (YYPARSE_PARAM_ARG): New macro.
19459 (yyparse): Use YYPARSE_PARAM_ARG.
19460
19461 1995-11-29 Richard Stallman <rms@gnu.org>
19462
19463 * doc/bison.texinfo:
19464 Describe literal string tokens, %raw, %no_lines, %token_table.
19465
19466 1995-11-29 Daniel Hagerty <hag@gnu.org>
19467
19468 * doc/bison.texinfo: Fixed update date
19469
19470 1995-10-16 Richard Stallman <rms@gnu.org>
19471
19472 * src/version.c: Version 1.25.
19473
19474 1995-10-16 Richard Stallman <rms@gnu.org>
19475
19476 * NEWS: *** empty log message ***
19477
19478 1995-10-16 Richard Stallman <rms@gnu.org>
19479
19480 * doc/bison.1, doc/bison.rnh:
19481 Add new options.
19482
19483 1995-10-15 Richard Stallman <rms@gnu.org>
19484
19485 * src/vmsgetargs.c, src/getargs.c:
19486 Added -n, -k, and -raw switches.
19487 (noparserflag, toknumflag, rawtoknumflag): New variables.
19488
19489 * src/symtab.h (SALIAS):
19490 New #define for adding aliases to %token.
19491 (struct bucket): Added `alias' field.
19492
19493 * src/reduce.c (reduce_grammar):
19494 Revise error message.
19495 (print_notices): Remove final `.' from error message.
19496
19497 * src/reader.c (reader_output_yylsp):
19498 New function.
19499 (readgram): Use `#if 0' around code that accepted %command
19500 inside grammar rules: The documentation doesn't allow it,
19501 and it will fail since the %command processors scan for the next %.
19502 (parse_token_decl): Extended the %token
19503 declaration to allow a multi-character symbol as an alias.
19504 (parse_thong_decl): New function.
19505 (read_declarations): Added %thong declarations.
19506 (read_declarations): Handle NOOP to deal with allowing
19507 % declarations as another means to specify the flags.
19508 (readgram): Allow %prec prior to semantics embedded in a rule.
19509 (skip_to_char, read_declarations, copy_definition)
19510 (parse_token_decl, parse_start_decl, parse_type_decl)
19511 (parse_assoc_decl, parse_union_decl, parse_expect_decl)
19512 (get_type_name, copy_guard, copy_action, readgram)
19513 (get_type, packsymbols): Revised most error messages.
19514 Changed `fatal' to `warnxxx' to avoid aborting for error.
19515 Revised and use multiple warnxxx functions to avoid using VARARGS1.
19516 (read_declarations): Improve the error message for
19517 an invalid character. Do not abort.
19518 (read_declarations, copy_guard, copy_action): Use
19519 printable_version to avoid unprintable characters in printed output.
19520 (parse_expect_decl): Error if argument to %expect exceeds 10 digits.
19521 (parse_token_decl, parse_assoc_decl, parse_type_decl, get_type):
19522 Allow the type of a non-terminal can be given
19523 more than once, as long as all specifications give the same type.
19524
19525 * src/output.c:
19526 (output_headers, output_trailers, output, output_gram)
19527 (output_rule_data): Implement noparserflag variable.
19528 Implement toknumflag variable.
19529 (output): Call reader_output_yylsp to output LTYPESTR.
19530
19531 * src/main.c (main):
19532 If reader sees an error, don't process the grammar.
19533 (fatals): Updated to not use VARARGS1.
19534 (printable_version, int_to_string, warn, warni, warns, warnss)
19535 (warnsss): New error reporting functions. Avoid abort for error.
19536
19537 * src/lex.h:
19538 Added THONG and NOOP for alias processing.
19539 Added SETOPT for the new code that allows setting options with %flags.
19540
19541 * src/lex.c:
19542 Include getopt.h. Add some extern decls.
19543 (safegetc): New function to deal with EOF gracefully.
19544 (literalchar); new function to deal with reading \ escapes.
19545 (lex): Use literalchar.
19546 (lex): Implemented "..." tokens.
19547 (literalchar, lex, parse_percent_token): Made tokenbuffer
19548 always contain the token. This includes growing the token
19549 buffer while reading an integer.
19550 (parse_percent_token): Replaced if-else statement with percent_table.
19551 (parse_percent_token): Added % declarations as another
19552 way to specify the flags -n, -l, and -r. Also added hooks for
19553 -d, -k, -y, -v, -t, -p, -b, -o, but implementation requires
19554 major changes to files.c.
19555 (lex) Retain in the incoming stream a character following
19556 an incorrect '/'.
19557 (skip_white_space, lex): Revised most error messages
19558 and changed fatal to warn to avoid aborting.
19559 (percent_table): Added %thong declarations.
19560
19561 * src/gram.h: Comment changes.
19562
19563 * src/files.c (openfiles, open_extra_files, done):
19564 Add faction flag
19565 and actfile file. Handle noparserflag. Both for -n switch.
19566
19567 * src/conflicts.c (resolve_sr_conflict):
19568 Remove use of alloca.
19569
19570 1995-06-01 Jim Meyering <meyering@gnu.org>
19571
19572 * doc/bison.texinfo: *** empty log message ***
19573
19574 1995-05-06 Richard Stallman <rms@gnu.org>
19575
19576 * src/bison.s1: Comment change.
19577
19578 1995-05-06 Richard Stallman <rms@gnu.org>
19579
19580 * bison.simple: Comment change.
19581
19582 1995-05-03 Richard Stallman <rms@gnu.org>
19583
19584 * src/version.c: Version now 1.24.
19585
19586 * src/bison.s1: Change distribution terms.
19587
19588 * src/version.c: Version now 1.23.
19589
19590 1995-05-03 Richard Stallman <rms@gnu.org>
19591
19592 * doc/bison.texinfo:
19593 Rewrite "Conditions for Using Bison".
19594 Update version to 1.24.
19595
19596 1995-05-03 Richard Stallman <rms@gnu.org>
19597
19598 * bison.simple: Change distribution terms.
19599
19600 1995-02-23 Richard Stallman <rms@gnu.org>
19601
19602 * src/files.c: Test __VMS_POSIX as well as VMS.
19603
19604 1995-02-14 Jim Meyering <meyering@gnu.org>
19605
19606 * src/bison.s1 (__yy_memcpy):
19607 Renamed from __yy_bcopy to avoid
19608 confusion. Reverse FROM and TO arguments to be consistent with
19609 those of memcpy.
19610
19611 1995-02-14 Jim Meyering <meyering@gnu.org>
19612
19613 * bison.simple (__yy_memcpy):
19614 Renamed from __yy_bcopy to avoid
19615 confusion. Reverse FROM and TO arguments to be consistent with
19616 those of memcpy.
19617
19618 1994-11-10 David J. MacKenzie <djm@gnu.org>
19619
19620 * NEWS: reformat
19621
19622 * NEWS: New file.
19623
19624 * Makefile.in (DISTFILES): Include NEWS.
19625
19626 * Makefile.in (DISTFILES):
19627 Include install-sh, not install.sh.
19628
19629 * configure.in: Update to Autoconf v2 macro names.
19630
19631 1994-10-05 David J. MacKenzie <djm@gnu.org>
19632
19633 * Makefile.in: fix typo
19634
19635 * Makefile.in (prefix, exec_prefix):
19636 Let configure set them.
19637
19638 1994-09-28 David J. MacKenzie <djm@gnu.org>
19639
19640 * Makefile.in: Set datadir to $(prefix)/share.
19641
19642 1994-09-15 Richard Stallman <rms@gnu.org>
19643
19644 * src/bison.s1:
19645 Update copyright notice and GPL version.
19646
19647 1994-09-15 Richard Stallman <rms@gnu.org>
19648
19649 * bison.simple:
19650 Update copyright notice and GPL version.
19651
19652 1994-07-12 Richard Stallman <rms@gnu.org>
19653
19654 * src/reduce.c, src/reader.c:
19655 entered into RCS
19656
19657 1994-05-05 David J. MacKenzie <djm@gnu.org>
19658
19659 * Makefile.in: entered into RCS
19660
19661 1994-03-26 Richard Stallman <rms@gnu.org>
19662
19663 * src/bison.s1: entered into RCS
19664
19665 1994-03-26 Richard Stallman <rms@gnu.org>
19666
19667 * bison.simple: entered into RCS
19668
19669 1994-03-25 Richard Stallman <rms@gnu.org>
19670
19671 * src/main.c: entered into RCS
19672
19673 1994-03-24 Richard Stallman <rms@gnu.org>
19674
19675 * src/conflicts.c: entered into RCS
19676
19677 1994-01-02 Richard Stallman <rms@gnu.org>
19678
19679 * Makefile.in: *** empty log message ***
19680
19681 1993-11-21 Richard Stallman <rms@gnu.org>
19682
19683 * src/bison.s1: *** empty log message ***
19684
19685 1993-11-21 Richard Stallman <rms@gnu.org>
19686
19687 * doc/bison.texinfo: entered into RCS
19688
19689 * doc/bison.texinfo: *** empty log message ***
19690
19691 1993-11-21 Richard Stallman <rms@gnu.org>
19692
19693 * bison.simple: *** empty log message ***
19694
19695 1993-10-25 David J. MacKenzie <djm@gnu.org>
19696
19697 * doc/bison.texinfo: *** empty log message ***
19698
19699 1993-10-19 Richard Stallman <rms@gnu.org>
19700
19701 * src/bison.s1: *** empty log message ***
19702
19703 1993-10-19 Richard Stallman <rms@gnu.org>
19704
19705 * bison.simple: *** empty log message ***
19706
19707 1993-10-14 Richard Stallman <rms@gnu.org>
19708
19709 * src/bison.s1: *** empty log message ***
19710
19711 1993-10-14 Richard Stallman <rms@gnu.org>
19712
19713 * bison.simple: *** empty log message ***
19714
19715 1993-09-14 David J. MacKenzie <djm@gnu.org>
19716
19717 * doc/bison.texinfo: *** empty log message ***
19718
19719 1993-09-13 Noah Friedman <friedman@gnu.org>
19720
19721 * Makefile.in: *** empty log message ***
19722
19723 1993-09-10 Richard Stallman <rms@gnu.org>
19724
19725 * src/conflicts.c: *** empty log message ***
19726
19727 * src/system.h: entered into RCS
19728
19729 1993-09-10 Richard Stallman <rms@gnu.org>
19730
19731 * doc/bison.1: entered into RCS
19732
19733 1993-09-06 Noah Friedman <friedman@gnu.org>
19734
19735 * src/version.c: entered into RCS
19736
19737 1993-09-06 Noah Friedman <friedman@gnu.org>
19738
19739 * Makefile.in: *** empty log message ***
19740
19741 1993-07-30 David J. MacKenzie <djm@gnu.org>
19742
19743 * Makefile.in: *** empty log message ***
19744
19745 1993-07-24 Richard Stallman <rms@gnu.org>
19746
19747 * src/bison.s1: *** empty log message ***
19748
19749 1993-07-24 Richard Stallman <rms@gnu.org>
19750
19751 * bison.simple: *** empty log message ***
19752
19753 1993-07-08 David J. MacKenzie <djm@gnu.org>
19754
19755 * Makefile.in: *** empty log message ***
19756
19757 1993-07-04 Richard Stallman <rms@gnu.org>
19758
19759 * src/bison.s1: *** empty log message ***
19760
19761 1993-07-04 Richard Stallman <rms@gnu.org>
19762
19763 * bison.simple: *** empty log message ***
19764
19765 1993-06-26 David J. MacKenzie <djm@gnu.org>
19766
19767 * src/getargs.c: entered into RCS
19768
19769 1993-06-26 David J. MacKenzie <djm@gnu.org>
19770
19771 * doc/bison.texinfo: *** empty log message ***
19772
19773 * doc/bison.1: New file.
19774
19775 1993-06-25 Richard Stallman <rms@gnu.org>
19776
19777 * src/getargs.c: New file.
19778
19779 1993-06-16 Richard Stallman <rms@gnu.org>
19780
19781 * src/bison.s1: *** empty log message ***
19782
19783 1993-06-16 Richard Stallman <rms@gnu.org>
19784
19785 * bison.simple: *** empty log message ***
19786
19787 1993-06-03 Richard Stallman <rms@gnu.org>
19788
19789 * src/bison.s1: New file.
19790
19791 1993-06-03 Richard Stallman <rms@gnu.org>
19792
19793 * doc/bison.texinfo: *** empty log message ***
19794
19795 1993-06-03 Richard Stallman <rms@gnu.org>
19796
19797 * bison.simple: New file.
19798
19799 1993-05-19 Richard Stallman <rms@gnu.org>
19800
19801 * doc/bison.texinfo: New file.
19802
19803 1993-05-07 Noah Friedman <friedman@gnu.org>
19804
19805 * Makefile.in: *** empty log message ***
19806
19807 1993-04-28 Noah Friedman <friedman@gnu.org>
19808
19809 * src/reader.c: *** empty log message ***
19810
19811 1993-04-23 Noah Friedman <friedman@gnu.org>
19812
19813 * src/alloc.h: entered into RCS
19814
19815 1993-04-20 David J. MacKenzie <djm@gnu.org>
19816
19817 * src/version.c: *** empty log message ***
19818
19819 * src/files.c, src/allocate.c:
19820 entered into RCS
19821
19822 * src/reader.c: *** empty log message ***
19823
19824 * src/lex.c: entered into RCS
19825
19826 * src/conflicts.c: New file.
19827
19828 * src/symtab.c: entered into RCS
19829
19830 * src/alloc.h: New file.
19831
19832 * src/LR0.c: entered into RCS
19833
19834 1993-04-18 Noah Friedman <friedman@gnu.org>
19835
19836 * src/reader.c: New file.
19837
19838 * src/version.c: *** empty log message ***
19839
19840 1993-04-18 Noah Friedman <friedman@gnu.org>
19841
19842 * Makefile.in: *** empty log message ***
19843
19844 1993-04-17 Noah Friedman <friedman@gnu.org>
19845
19846 * Makefile.in: *** empty log message ***
19847
19848 1993-04-15 Richard Stallman <rms@gnu.org>
19849
19850 * src/main.c, src/files.c:
19851 New file.
19852
19853 1993-04-15 Noah Friedman <friedman@gnu.org>
19854
19855 * configure.in: entered into RCS
19856
19857 * configure.in: *** empty log message ***
19858
19859 * configure.in: New file.
19860
19861 1993-04-14 Richard Stallman <rms@gnu.org>
19862
19863 * Makefile.in: New file.
19864
19865 1993-04-13 Richard Stallman <rms@gnu.org>
19866
19867 * src/version.c: New file.
19868
19869 1993-03-25 Richard Stallman <rms@gnu.org>
19870
19871 * src/output.c: entered into RCS
19872
19873 1992-09-25 Richard Stallman <rms@gnu.org>
19874
19875 * configure.bat: entered into RCS
19876
19877 1992-06-22 Richard Stallman <rms@gnu.org>
19878
19879 * src/vmsgetargs.c: entered into RCS
19880
19881 1992-06-22 Richard Stallman <rms@gnu.org>
19882
19883 * doc/bison.rnh: entered into RCS
19884
19885 1992-04-20 David J. MacKenzie <djm@gnu.org>
19886
19887 * README: entered into RCS
19888
19889 1992-01-22 Richard Stallman <rms@gnu.org>
19890
19891 * src/machine.h: entered into RCS
19892
19893 1991-12-21 Richard Stallman <rms@gnu.org>
19894
19895 * src/lalr.c, src/closure.c:
19896 entered into RCS
19897
19898 1991-12-20 Richard Stallman <rms@gnu.org>
19899
19900 * src/state.h: entered into RCS
19901
19902 1991-12-18 Richard Stallman <rms@gnu.org>
19903
19904 * src/print.c, src/nullable.c, src/derives.c:
19905 entered into RCS
19906
19907 1991-11-03 David J. MacKenzie <djm@gnu.org>
19908
19909 * src/warshall.c, src/types.h, src/symtab.h, src/lex.h, src/gram.c, src/gram.h, src/files.h:
19910 entered into RCS
19911
19912 1988-09-09 Richard Stallman <rms@gnu.org>
19913
19914 * src/bison.hairy: entered into RCS
19915
19916 1987-12-16 Richard Stallman <rms@gnu.org>
19917
19918 * REFERENCES: entered into RCS
19919
19920
19921 -----
19922
19923 Copyright (C) 1987, 1988, 1991, 1992, 1993, 1994, 1995, 1996,
19924 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007
19925 Free Software Foundation, Inc.
19926
19927 Copying and distribution of this file, with or without
19928 modification, are permitted provided the copyright notice and this
19929 notice are preserved.
19930
19931 $Id$