]> git.saurik.com Git - bison.git/blob - ChangeLog
a24f3c53dfef5517a95cc2966861e202f9dce7c1
[bison.git] / ChangeLog
1 2007-11-09 Joel E. Denny <jdenny@ces.clemson.edu>
2
3 * data/bison.m4 (b4_cat): Put a newline after the end delimiter of the
4 here document and before the EOF so that BSD's implementation of Bourne
5 shell doesn't parse the delimiter as part of the here document.
6 * doc/.cvsignore: Add cross-options.texi.
7 * src/getargs.c (usage): Add a blank line after the warning categories.
8
9 2007-11-08 Paolo Bonzini <bonzini@gnu.org>
10
11 * data/lalr1.java (Lexer): Remove usage of b4_pure_if.
12
13 2007-11-05 Akim Demaille <akim@epita.fr>
14
15 Remove Id: from bison.1.
16 * doc/Makefile.am (remove_time_stamp): Include the sed invocation.
17 (perl -0777 -pi -e 's/\.PP\nId): New.
18 (.x.1): Use it to ignore the version control revision.
19
20 2007-11-05 Akim Demaille <demaille@gostai.com>
21
22 * build-aux/Makefile.am: Ship cross-options.pl.
23 * doc/Makefile.am: Always refer to cross-options.texi with
24 $(srcdir).
25 (MAINTAINERCLEANFILES): Add it.
26
27 2007-11-04 Akim Demaille <demaille@gostai.com>
28
29 Generate the long/short option cross-table.
30 * build-aux/cross-options.pl: New.
31 * doc/Makefile.am (cross-options.texi): New.
32 * doc/bison.texinfo: Use it.
33
34 2007-11-04 Akim Demaille <demaille@gostai.com>
35
36 Generate bison.1 using help2man.
37 * doc/common.x, doc/bison.x: New.
38 * doc/Makefile.am (bison.1, .x.1): New.
39 The code is taken from autoconf-2.61/man/Makefile.am.
40 * configure.ac: Look for help2man.
41
42 2007-11-04 Akim Demaille <demaille@gostai.com>
43
44 Complete --help.
45 * src/getargs.c (usage): Document -W, make it clear that -d,
46 -g and -x have optional arguments.
47
48 2007-11-04 Akim Demaille <demaille@gostai.com>
49
50 Find sha1sum when named gsha1sum.
51 * bootstrap (find_tool): New.
52 ($SHA1SUM): New.
53
54 2007-10-28 Joel E. Denny <jdenny@ces.clemson.edu>
55
56 Deprecate %pure-parser and add `%define api.pure'. Discussed starting
57 at
58 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00006.html>.
59 * NEWS (2.3a+): Mention.
60 * data/bison.m4 (b4_pure_if): Don't define it here.
61 * data/c.m4 (b4_identification): Depend on individual skeletons to
62 define b4_pure_flag, b4_push_flag, or b4_pull_flag if they use the
63 values of the %define variables api.pure or api.push_pull. Define
64 YYPURE, YYPUSH, and YYPULL accordingly.
65 * data/glr.c: Define b4_pure_if based on `%define api.pure' unless
66 glr.cc has already defined b4_pure_flag.
67 * data/push.c: Define b4_pure_if based on `%define api.pure'.
68 Remove YYPUSH and YYPULL since they're back in b4_identification again.
69 * data/yacc.c Define b4_pure_if based on `%define api.pure'.
70 * doc/bison.texinfo (Pure Decl): Update.
71 (Push Decl): Update.
72 (Decl Summary): Add api.pure to %define entry.
73 In %pure-parser entry, say it's deprecated and reference %define.
74 (Pure Calling): Update.
75 (Error Reporting): Update.
76 (C++ Scanner Interface): Update.
77 (How Can I Reset the Parser): Update.
78 (Table of Symbols): In %pure-parser entry, say it's deprecated and
79 reference %define.
80 * src/getargs.c (pure_parser): Remove global variable.
81 * src/getargs.h (pure_parser): Remove extern.
82 * src/output.c (prepare): Don't define pure_flag muscle.
83 * src/parse-gram.y (prologue_declaration): Implement %pure-parser as a
84 wrapper around `%define api.pure'.
85 * tests/calc.at (Simple LALR Calculator): Update.
86 (Simple GLR Calculator): Update.
87 * tests/cxx-type.at (GLR: Resolve ambiguity, pure, no locations):
88 Update.
89 (GLR: Resolve ambiguity, pure, locations): Update.
90 (GLR: Merge conflicting parses, pure, no locations): Update.
91 (GLR: Merge conflicting parses, pure, locations): Update.
92 * tests/glr-regression.at (Uninitialized location when reporting
93 ambiguity): Update
94 * tests/input.at (Unused %define api.pure): New test case.
95 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Update definition for
96 AT_PURE_IF and AT_PURE_AND_LOC_IF.
97 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Update.
98
99 2007-10-28 Joel E. Denny <jdenny@ces.clemson.edu>
100
101 %define push_pull -> %define api.push_pull. Discussed starting at
102 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00005.html>.
103 * data/push.c: Expect the new name.
104 * data/yacc.c: Likewise.
105 * doc/bison.texinfo (Push Decl): Update.
106 (Decl Summary): Update %define entry.
107 (Push Parser Function): Update.
108 (Pull Parser Function): Update.
109 (Parser Create Function): Update.
110 (Parser Delete Function): Update.
111 * tests/calc.at (Simple LALR Calculator): Update.
112 * tests/input.at (%define enum variables): Update.
113 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Update.
114 (Push Parsing: Multiple impure instances): Update.
115 (Push Parsing: Unsupported Skeletons): Update.
116 * tests/torture.at (Exploding the Stack Size with Alloca): Update.
117 (Exploding the Stack Size with Malloc): Update.
118
119 * NEWS (2.3a+): Add an entry for the push parser, and clean up the
120 other entries some.
121
122 2007-10-27 Joel E. Denny <jdenny@ces.clemson.edu>
123
124 For the XML output's terminal element, rename @number to @token-number,
125 and add @symbol-number. In the nonterminal element, rename @number to
126 @symbol-number. Discussed starting at
127 <http://lists.gnu.org/archive/html/bison-patches/2007-10/msg00040.html>.
128 * data/xslt/xml2text.xsl (xsl:template match="terminal"): Update for
129 renames.
130 (xsl:template match="nonterminal"): Likewise.
131 * data/xslt/xml2xhtml.xsl (xsl:template match="terminal"): Likewise.
132 (xsl:template match="nonterminal"): Likewise.
133 * src/print-xml.c (print_grammar): Implement.
134
135 2007-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
136
137 * data/xslt/xml2dot.xsl (xsl:template match="automaton/state"): After
138 2007-10-11 change, the child elements here are items not rules.
139 (<xsl:template match="item"): New.
140 (xsl:template match="rule"): Update for new reduced itemset.
141 (xsl:template match="point"): Remove.
142 (xsl:template match="empty"): For consistency with --graph, don't
143 output "/* empty */".
144 * data/xslt/xml2text.xsl (xsl:template match="terminal"): When invoking
145 line-wrap, don't pass a negative value as first-line-length since this
146 won't work with the following changes.
147 (xsl:template name="line-wrap"): Simplify slightly.
148 (xsl:template name="ws-search"): Eliminate recursion.
149 * src/print_graph.c (print_core): Don't print a reduction's lookahead
150 set next to an item whose dot is not at the end of the RHS even if it
151 happens to be associated with the same rule.
152
153 2007-10-19 Joel E. Denny <jdenny@ces.clemson.edu>
154
155 Add %define lr.keep_unreachable_states.
156 * NEWS (2.3a+): Mention it in the entry for unreachable state removal.
157 * doc/bison.texinfo (Decl Summary): Mention it in the %define entry.
158 * src/main.c (main): Implement it.
159 * tests/conflicts.at (Unreachable States After Conflict Resolution):
160 Extend to test it, and fix a typo.
161
162 2007-10-19 Joel E. Denny <jdenny@ces.clemson.edu>
163
164 * NEWS (2.3a+): Add entry for recent .output file lookahead set fix.
165 * doc/bison.texinfo (Understanding): Remove a bogus lookahead set in
166 the example .output text.
167 * tests/regression.at (Extra lookahead sets in report): Improve wording
168 of comments.
169
170 2007-10-17 Wojciech Polak <polak@gnu.org>
171
172 * src/print-xml.c (print_grammar): Renamed
173 <terminal> and <nonterminal> attributes:
174 "type" to "number" and "symbol" to "name".
175 * data/xslt/xml2text.xsl (xsl:template match="terminal"):
176 Use new attribute names.
177 (xsl:template match="nonterminal"): Likewise.
178 * data/xslt/xml2xhtml.xsl: Likewise.
179
180 2007-10-17 Joel E. Denny <jdenny@ces.clemson.edu>
181
182 * doc/bison.texinfo (Bison Options): Add entry for --print-datadir.
183 (Option Cross Key): Likewise.
184
185 * src/print-xml.c (print_core): Don't print a reduction's lookahead set
186 next to an item whose dot is not at the end of the RHS even if it
187 happens to be associated with the same rule.
188 * src/print.c (print_core): Likewise.
189 * tests/conflicts.at (Unresolved SR Conflicts): Update output.
190 (Resolved SR Conflicts): Update output.
191 * tests/regression.at (Extra lookahead sets in report): New test case.
192
193 2007-10-11 Wojciech Polak <polak@gnu.org>
194
195 * src/print-xml.c (print_core): Remove item set
196 redundancy.
197 * data/xslt/bison.xsl (bison:ruleNumber): New key.
198 Improve processing time. Suggested by Joel E. Denny.
199 * data/xslt/xml2dot.xsl (xsl:template name="escape"):
200 Write xsl:param "required" attribute as comment.
201 * data/xslt/xml2text.xsl (xsl:template match="item"): New.
202 (xsl:template match="rule"): Support new reduced itemset.
203 (xsl:template match="point"): Remove.
204 * data/xslt/xml2xhtml.xsl: Likewise.
205
206 2007-10-09 Joel E. Denny <jdenny@ces.clemson.edu>
207
208 * src/getargs.c (version): Update copyright year.
209
210 2007-10-09 Joel E. Denny <jdenny@ces.clemson.edu>
211
212 Make xml2dot.xsl and --graph produce the same output.
213 * data/xslt/xml2dot.xsl (xsl:template match="rule"): Use a `&#10;'
214 instead of a `\n'. That is, don't add escapes yet or they'll be doubly
215 escaped later.
216 (xsl:template name="output-node"): Use the new escape template instead
217 of the string-replace template directly.
218 (xsl:template name="output-edge"): Likewise.
219 (xsl:template name="escape"): New, escapes backslashes and newlines in
220 addition to quotation marks.
221 * src/graphviz.c (start_graph, output_node, output_edge): Add
222 whitespace to output for legibility.
223
224 Make xml2text.xsl and --report produce the same output, and remove the
225 XML "conflicts" element since a conflict summary is easily extracted
226 from the automaton.
227 * data/xslt/bison.xsl: New.
228 (xsl:template match="state" mode="bison:count-conflicts): New.
229 * data/xslt/xml2text.xsl: Import bison.xsl.
230 (xsl:template match="bison-xml-report"): Instead of styling the
231 "conflicts" element, style the "automaton" element with mode
232 "conflicts". Unlike the former, the latter lists S/R and R/R
233 conflicts for a state on the same line.
234 (xsl:template match="conflicts"): Remove.
235 (xsl:template match="conflict"): Remove.
236 (xsl:template match="terminal"): Line-wrap the list of rules in which
237 the terminal is used.
238 (xsl:template match="nonterminal"): Likewise for nonterminals.
239 (xsl:template match="automaton" mode="conflicts"): New.
240 (xsl:template match="state" mode="conflicts"): New.
241 (xsl:template name="line-wrap"): New.
242 (xsl:template name="ws-search"): New.
243 * data/xslt/xml2xhtml.xsl: Import bison.xsl.
244 (xsl:template match="bison-xml-report"): Instead of styling the
245 "conflicts" element, style the "automaton" element with mode
246 "conflicts."
247 (xsl:template match="conflicts"): Remove.
248 (xsl:template match="conflict"): Remove.
249 (xsl:template match="automaton" mode="conflicts"): New.
250 (xsl:template match="state" mode="conflicts): New.
251 * src/conflicts.c (conflicts_output_xml): Remove.
252 * src/conflicts.h (conflicts_output_xml): Remove prototype.
253 * src/print-xml.c (print_xml): Don't invoke conflicts_output_xml.
254 * src/print.c (print_grammar): Consistently wrap at the 66th column so
255 the corresponding XSLT is easier. Also, never wrap between a word and
256 the comma that follows it.
257
258 2007-10-08 Joel E. Denny <jdenny@ces.clemson.edu>
259
260 Improve C++ namespace support. Discussed starting at
261 <http://lists.gnu.org/archive/html/help-bison/2007-09/msg00016.html>.
262 * data/c++.m4: (b4_namespace_ref, b4_namespace_open,
263 b4_namespace_close): New macros that interpret the %define variable
264 "namespace" so its value can contain "::" to indicate nested
265 namespaces.
266 * data/glr.cc (b4_namespace): Don't define, and replace all uses with
267 the above macros.
268 * data/lalr1.cc (b4_namespace): Likewise.
269 * data/location.cc (b4_namespace): Likewise.
270 * doc/bison.texinfo (Decl Summary): Move `%define push_pull' entry
271 inside a new table in the general %define entry. Document `%define
272 namespace' there as well. Point the %name-prefix entry to it since it
273 explains it more completely in the case of C++.
274 (C++ Bison Interface): Mention `%define namespace' instead of
275 %name-prefix.
276 (Table of Symbols): Remove the `%define push_pull' entry. The %define
277 entry suffices.
278 * tests/c++.at (Relative namespace references): New test case.
279 (Absolute namespace references): New test case.
280 (Syntactically invalid namespace references): New test case.
281 * tests/input.at (C++ namespace reference errors): New test case.
282
283 2007-10-08 Joel E. Denny <jdenny@ces.clemson.edu>
284
285 Add syncline support and location accessor to internal %define
286 interfaces.
287 * data/bison.m4 (b4_percent_define_get_loc): New.
288 (b4_percent_define_get_syncline): New.
289 (b4_percent_define_flag_if): Use b4_percent_define_get_loc.
290 (b4_percent_define_default): Record defining location as line 1 rather
291 than 0 for the sake of synchronizing #line's, and define
292 b4_percent_define_syncline(VARIABLE).
293 (b4_percent_define_check_values): Use b4_percent_define_get_loc.
294 * src/muscle_tab.c (muscle_syncline_grow): New.
295 (muscle_code_grow): Use muscle_syncline_grow.
296 (muscle_percent_define_insert): Use muscle_percent_define_get_loc, and
297 define b4_percent_define_syncline(VARIABLE).
298 (muscle_percent_define_get_loc): New.
299 (muscle_percent_define_get_syncline): New.
300 (muscle_percent_define_flag_if): Use muscle_percent_define_get_loc, and
301 remove some unused variables.
302 (muscle_percent_define_default): Record defining location as line 1
303 rather than 0 for the sake of synchronizing #line's, and define
304 b4_percent_define_syncline(VARIABLE).
305 (muscle_percent_define_check_values): Use
306 muscle_percent_define_get_loc.
307 * src/muscle_tab.h (muscle_percent_define_get_loc): Prototype.
308 (muscle_percent_define_get_syncline): Prototype.
309 * tests/skeletons.at (%define Boolean variables: invalid skeleton
310 defaults): Update output for location change.
311 (Complaining during macro argument expansion): Extend to test
312 b4_percent_define_get_loc and b4_percent_define_get_syncline errors.
313
314 2007-10-07 Joel E. Denny <jdenny@ces.clemson.edu>
315
316 Fix some error-reporting macro bugs.
317 * data/bison.m4 (b4_cat): New.
318 (b4_error, b4_error_at): Use b4_cat to send error directives directly
319 to stdout so they don't become arguments to other macros. Update
320 comments and add examples.
321 (b4_warn, b4_warn_at, b4_complain, b4_complain_at): Update comments and
322 add examples.
323 (b4_fatal, b4_fatal_at): Likewise, and invoke m4_exit(1) immediately
324 after printing the error directive so that M4 doesn't report subsequent
325 problems that are induced by this problem.
326 * src/scan-skel.l: Recognize @` digraph outside of directive arguments
327 instead of just in them. Recognize @\n in both places. Both expand to
328 the empty string. Needed by b4_cat.
329 * tests/skeletons.at (Complaining during macro argument expansion):
330 New test case.
331 (Fatal errors make M4 exit immediately): New test case.
332
333 2007-10-04 Joel E. Denny <jdenny@ces.clemson.edu>
334
335 Implement --print-datadir.
336 * src/getargs.c (usage): Mention.
337 (PRINT_DATADIR_OPTION): New anonymous enum member.
338 (long_options): Add entry for it.
339 (getargs): Add case for it calling compute_pkgdatadir.
340 * src/output.c (output_skeleton): Encapsulate data directory
341 computation from here...
342 (prepare): ... and from here...
343 (compute_pkgdatadir): ... into this new function.
344 * src/output.h (compute_pkgdatadir): Prototype.
345
346 2007-09-29 Joel E. Denny <jdenny@ces.clemson.edu>
347
348 * src/print-xml.c (escape_bufs): New static global variable
349 replacing...
350 (xml_escape_n): ... the static local variable buf here.
351 (print_xml): Free memory for escape_bufs.
352 * src/reduce.c (reduce_xml): XML-escape terminal symbol tags.
353
354 2007-09-25 Joel E. Denny <jdenny@ces.clemson.edu>
355
356 Replace `%push-parser' and `%push-pull-parser' with
357 `%define push_pull "push"' and `%define push_pull "both"'.
358 `%define push_pull "pull"' is the default.
359 * doc/bison.texinfo (Push Decl, Push Parser Function,
360 Pull Parser Function, Parser Create Function, Parser Delete Function):
361 Update declarations.
362 (Decl Summary, Table of Symbols): Replace %push-parser and
363 %push-pull-parser entries with a %define push_pull entry.
364 * data/bison.m4 (b4_percent_define_check_values): New macro.
365 (b4_pull_if, b4_push_if, b4_use_push_for_pull_if): Move these
366 definitions...
367 * data/c.m4 (b4_identification): ... and the YYPUSH and YYPULL cpp
368 definitions...
369 * data/push.c: ... to here and compute them from the value of the
370 %define variable push_pull.
371 * data/c-skel.m4: Instead of choosing the push.c skeleton for push
372 parsing requests here...
373 * data/yacc.c: ... hack this to switch to push.c any time
374 b4_use_push_pull_flag or the %define variable push_pull is set. This
375 will go away when we mv push.c yacc.c.
376 * data/c++-skel.m4, data/glr.c, data/java-skel.m4: Don't report that
377 push parsing is not supported since unused %define variables are
378 reported anyway.
379 * src/getargs.c, src/getargs.h (pull_parser, push_parser): Remove.
380 * src/muscle_tab.h (muscle_percent_define_check_values): Update
381 comments for consistency with b4_percent_define_check_values.
382 * src/output.c (prepare): Don't insert b4_pull_flag and b4_push_flag
383 muscles.
384 * src/parse-gram.y (PERCENT_PUSH_PARSER, PERCENT_PUSH_PULL_PARSER):
385 Remove.
386 (prologue_declaration): Remove %push-parser and %push-pull-parser
387 rules.
388 * src/scan-gram.l (%push-parser, %push-pull-parser): Remove rules.
389 * tests/calc.at: Update declarations.
390 * tests/input.at (%define enum variables): New test case.
391 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Update
392 declaration.
393 (Push Parsing: Multiple impure instances): Update declaration.
394 (Push Parsing: Unsupported Skeletons): New test case.
395 * tests/torture.at (Exploding the Stack Size with Alloca): Update
396 declaration.
397 (Exploding the Stack Size with Malloc): Update declaration.
398
399 2007-09-24 Wojciech Polak <polak@gnu.org>
400
401 Add XSLT transformations.
402
403 * data/xslt/xml2dot.xsl: Transform XML into DOT.
404 * data/xslt/xml2text.xsl: Transform XML into plain text.
405 * data/xslt/xml2xhtml.xsl: Transform XML into XHTML.
406 * data/Makefile.am (xsltdir): New variable.
407 (dist_xslt_DATA): Add xslt/*.xsl files.
408
409 2007-09-23 Paul Eggert <eggert@cs.ucla.edu>
410
411 * src/conflicts.c (log_resolution): Fix indenting bugs I introduced.
412 Problem reported by Wojciech Polak.
413 * src/print-xml.c (xml_puts): Work even if LEVEL exceeds INT_MAX/2.
414 (xml_printf): Undo change I made on 21 September; that is,
415 indent 2 spaces, not 1.
416
417 2007-09-23 Joel E. Denny <jdenny@ces.clemson.edu>
418
419 Pacify ./configure --enable-gcc-warnings.
420 * src/print-xml.c, src/print-xml.h (xml_puts): Make third argument
421 `char const *' instead of `char *'.
422 * src/state.c (state_rule_lookahead_tokens_print_xml): Remove unused
423 local variable `sep'.
424
425 2007-09-21 Paul Eggert <eggert@cs.ucla.edu>
426
427 * src/gram.c (rule_rhs_print_xml): Now static, since it isn't used
428 elsewhere.
429 * src/print-xml.c: Prefer "const" after types; that's more consistent.
430 (xml_printf): Indent just 1 space for level.
431 (e_char, xlate_char): Remove.
432 (xml_escape_string): Rewrite to avoid undefined behavior (used
433 storage that was freed from the stack).
434 (xml_escape_n): Don't bother checking for subscript error.
435
436 2007-09-21 Wojciech Polak <polak@gnu.org>
437
438 Add Bison XML Automaton Report.
439
440 Add support for an -x option to generate an XML report.
441 It is not documented yet.
442 * src/print-xml.c: New file.
443 * src/print-xml.h: Likewise.
444 * lib/timevar.def (TV_XML): New var.
445 * src/Makefile.am (bison_SOURCES): Add print-xml.c, print-xml.h.
446 * src/conflicts.c: Include print-xml.h.
447 (solved_conflicts_xml_obstack): New var.
448 (log_resolution, conflicts_solve, conflicts_free):
449 Add support for XML report.
450 (conflicts_output_val): New function.
451 * src/conflicts.h (conflicts_output_val): New decl.
452 * src/files.c (spec_xml_file): New var.
453 (compute_output_file_names, output_file_names_free): Add XML support.
454 * src/files.h (spec_xml_file): New decl.
455 * src/getargs.c (xml_flag): New var.
456 (usage, short_options, long_options, getargs): Add XML support.
457 * src/getargs.h (xml_flag): New decl.
458 * src/gram.c: Include print-xml.h.
459 (rule_lhs_print_xml, rule_rhs_print_xml):
460 (grammar_rules_partial_print_xml, grammar_rules_print_xml):
461 New functions.
462 * src/gram.h: Declare external ones.
463 * src/main.c: Include print-xml.h.
464 (main): Add XML support.
465 * src/reduce.c: Include print-xml.h.
466 (reduce_xml): New function.
467 * src/reduce.h: Declare it.
468 * src/state.c: Include print-xml.h.
469 (state_new): Add XML support.
470 (state_rule_lookahead_tokens_print_xml): New function.
471 * src/state.h: Declare it.
472 (struct state): New member solved_conflicts_xml.
473 * src/symtab.c (symbol_class_get_string): New function.
474 * src/symtab.h: Declare it.
475
476 2007-09-21 Paul Eggert <eggert@cs.ucla.edu>
477
478 * GNUmakefile: Switch to coreutils's version.
479 * bootstrap: Likewise.
480 * Makefile.cfg: Adjust to new GNUmakefile.
481 * README-hacking: Likewise.
482
483 Import from gnulib:
484
485 2006-08-18 Paul Eggert <eggert@cs.ucla.edu>
486 Bruno Haible <bruno@clisp.org>
487
488 * m4/bison-i18n.m4 (BISON_I18N): Also handle the case where yacc exists
489 and is a script that invokes bison. Tighten the code. Add comments.
490
491 2007-08-28 Joel E. Denny <jdenny@ces.clemson.edu>
492
493 Spell "boolean" as "Boolean". Reported by Akim Demaille.
494 * data/bison.m4 (b4_percent_define_flag_if): Fix complaint.
495 * doc/bison.texinfo (Decl Summary): Fix.
496 * src/muscle_tab.c (muscle_percent_define_flag_if): Fix complaint.
497 * tests/input.at (Boolean %define variables): Update output.
498 * tests/skeletons.at (%define boolean variables: invalid skeleton
499 defaults): Rename to...
500 (%define Boolean variables: invalid skeleton defaults): ... this and
501 update output.
502
503 2007-08-17 Joel E. Denny <jdenny@ces.clemson.edu>
504
505 In impure push mode, don't allow more than one yypstate to be allocated
506 since multiple impure parsers would corrupt yynerrs.
507 * data/push.c (yypstate_allocated): New static global variable
508 initialized to 0.
509 (yypull_parse): If yypstate_new returns 0, don't report it as memory
510 exhaustion if yypstate_allocated is 1, but still return 2.
511 (yypstate_new): Invoke yyerror and return 0 if yypstate_allocated is
512 already 1. Otherwise, set it to 1.
513 (yypstate_delete): Set it to 0.
514 * tests/push.at (Push Parsing: Multiple impure instances): New test
515 case.
516
517 2007-08-17 Bob Rossi <bob@brasko.net>
518
519 * doc/bison.texinfo (Push Decl): Document the push parser.
520 (Table of Symbols): Ditto.
521 (Pure Decl): Ditto.
522 (Decl Summary): Ditto.
523 (Multiple Parsers, Push Parser Function, Pull Parser Function,
524 Parser Create Function, Parser Delete Function):
525 Add new push parser symbols.
526 (Table of Symbols): Document push-parser, push-pull-parser,
527 yypush_parse, yypull_parse, yypstate_new and yypstate_delete.
528
529 2007-08-15 Paul Eggert <eggert@cs.ucla.edu>
530
531 Update to GPLv3.
532 * doc/gpl-3.0.texi: New file.
533 * doc/gpl.texi: Remove.
534 * COPYING, GNUmakefile, HACKING, Makefile.am, Makefile.cfg:
535 * Makefile.maint, NEWS, PACKAGING, README, README-alpha:
536 * README-hacking, TODO, bootstrap, bootstrap.conf:
537 * configure.ac, data/Makefile.am, data/README, data/bison.m4:
538 * data/c++-skel.m4, data/c++.m4, data/c-skel.m4, data/c.m4:
539 * data/glr.c, data/glr.cc, data/java-skel.m4, data/java.m4:
540 * data/lalr1.cc, data/lalr1.java, data/location.cc:
541 * data/push.c, data/yacc.c, data/m4sugar/m4sugar.m4:
542 * djgpp/Makefile.maint, djgpp/README.in, djgpp/config.bat:
543 * djgpp/config.sed, djgpp/config.site, djgpp/config_h.sed:
544 * djgpp/djunpack.bat, djgpp/subpipe.c, djgpp/subpipe.h:
545 * djgpp/testsuite.sed, doc/Makefile.am, doc/bison.texinfo:
546 * doc/fdl.texi, doc/refcard.tex, etc/Makefile.am, etc/README:
547 * etc/bench.pl.in, examples/Makefile.am, examples/extexi:
548 * examples/calc++/Makefile.am, lib/Makefile.am, lib/abitset.c:
549 * lib/abitset.h, lib/bbitset.h, lib/bitset.c, lib/bitset.h:
550 * lib/bitset_stats.c, lib/bitset_stats.h, lib/bitsetv-print.c:
551 * lib/bitsetv-print.h, lib/bitsetv.c, lib/bitsetv.h:
552 * lib/ebitset.c, lib/ebitset.h, lib/get-errno.c:
553 * lib/get-errno.h, lib/lbitset.c, lib/lbitset.h:
554 * lib/libiberty.h, lib/main.c, lib/subpipe.c, lib/subpipe.h:
555 * lib/timevar.c, lib/timevar.def, lib/timevar.h:
556 * lib/vbitset.c, lib/vbitset.h, lib/yyerror.c:
557 * m4/c-working.m4, m4/cxx.m4, m4/m4.m4, m4/subpipe.m4:
558 * m4/timevar.m4, src/LR0.c, src/LR0.h, src/Makefile.am:
559 * src/assoc.c, src/assoc.h, src/closure.c, src/closure.h:
560 * src/complain.c, src/complain.h, src/conflicts.c:
561 * src/conflicts.h, src/derives.c, src/derives.h, src/files.c:
562 * src/files.h, src/flex-scanner.h, src/getargs.c:
563 * src/getargs.h, src/gram.c, src/gram.h, src/graphviz.c:
564 * src/lalr.c, src/lalr.h, src/location.c, src/location.h:
565 * src/main.c, src/muscle_tab.c, src/muscle_tab.h:
566 * src/nullable.c, src/nullable.h, src/output.c, src/output.h:
567 * src/parse-gram.c, src/parse-gram.h, src/parse-gram.y:
568 * src/print.c, src/print.h, src/print_graph.c:
569 * src/print_graph.h, src/reader.c, src/reader.h, src/reduce.c:
570 * src/reduce.h, src/relation.c, src/relation.h:
571 * src/revision.h, src/scan-code.h, src/scan-code.l:
572 * src/scan-gram.h, src/scan-gram.l, src/scan-skel.h:
573 * src/scan-skel.l, src/state.c, src/state.h, src/symlist.c:
574 * src/symlist.h, src/symtab.c, src/symtab.h, src/system.h:
575 * src/tables.c, src/tables.h, src/uniqstr.c, src/uniqstr.h:
576 * tests/Makefile.am, tests/actions.at, tests/c++.at:
577 * tests/calc.at, tests/conflicts.at, tests/cxx-type.at:
578 * tests/existing.at, tests/glr-regression.at:
579 * tests/headers.at, tests/input.at, tests/java.at:
580 * tests/local.at, tests/output.at, tests/push.at:
581 * tests/reduce.at, tests/regression.at, tests/sets.at:
582 * tests/skeletons.at, tests/synclines.at, tests/testsuite.at:
583 * tests/torture.at:
584 Update to GPLv3.
585
586 2007-08-11 Joel E. Denny <jdenny@ces.clemson.edu>
587
588 Get rid of broken %no-parser, -n, and --no-parser implementation and
589 documentation.
590 * TODO: Don't mention them.
591 * doc/bison.1: Likewise.
592 * doc/bison.texinfo (Decl Summary): Likewise.
593 (Bison Options): Likewise.
594 (Option Cross Key): Likewise.
595 * src/getargs.c (no_parser_flag): Remove global variable.
596 (usage): Don't print description of -n and --no-parser.
597 (long_options): Remove --no-parser entry here.
598 (getargs): Remove -n case in the switch here.
599 * src/getargs.h (no_parser_flag): Remove extern.
600 * tests/regression.at (Web2c Actions): Remove comment that mentions
601 --no-parser.
602
603 2007-08-11 Joel E. Denny <jdenny@ces.clemson.edu>
604
605 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Do not
606 name user variables starting with `yy'. Just pass NULL instead of a
607 dummy local &yylval to yypush_parse.
608 * tests/torture.at (AT_DATA_STACK_TORTURE): Do not name user variables
609 starting with `yy'.
610
611 2007-08-03 Joel E. Denny <jdenny@ces.clemson.edu>
612
613 * data/yacc.c (yyexhaustedlab): Define it when YYERROR_VERBOSE is
614 true since it's then always used regardless of whether yyoverflow is
615 defined. Reported by Christian Burger at
616 <http://lists.gnu.org/archive/html/bug-bison/2007-07/msg00031.html>.
617 * THANKS: Add Christian Burger.
618
619 * ChangeLog: For changes in doc/bison.texinfo, consistently reference
620 node names: say "Decl Summary" not "Bison Declaration Summary".
621
622 2007-07-28 Joel E. Denny <jdenny@ces.clemson.edu>
623
624 * src/muscle_tab.c (muscle_percent_define_flag_if): In order to
625 determine whether this function has already complained about an invalid
626 value for a %define boolean variable, don't check whether Bison has
627 ever examined the value. As written, the check was a tautology.
628 Instead, record and check for this complaint using a separate muscle.
629
630 2007-07-27 Joel E. Denny <jdenny@ces.clemson.edu>
631
632 Fix push parsing memory leak reported by Brandon Lucia at
633 <http://lists.gnu.org/archive/html/bug-bison/2007-07/msg00032.html>.
634 * THANKS: Add Brandon Lucia.
635 * data/push.c (yypstate_delete): Free the stack if it was reallocated
636 but the parse never completed and thus freed it.
637 * tests/Makefile.am (TESTSUITE_AT): Add push.at.
638 * tests/testsuite.at: Include push.at.
639 * test/push.at: New.
640 (Push Parsing: Memory Leak for Early Deletion): New test case.
641
642 2007-07-17 Joel E. Denny <jdenny@ces.clemson.edu>
643
644 Improve handling of multiple S/R conflicts in the same state and of S/R
645 conflicts involving multiple reductions.
646 * src/conflicts.c (resolve_sr_conflict): Don't assign the error action
647 set for a state here or Bison will abort if it is reassigned on a
648 later conflicted reduction in the same state.
649 Similarly, don't finalize and assign the solved conflicts report here
650 or it will be lost if it is reassigned on a later conflicted reduction
651 in the same state.
652 (set_conflicts): Instead, assign them both here after all S/R conflicts
653 in the state have been fully examined.
654 * src/print.c (shift_set): Rename to...
655 (no_reduce_set): ... this.
656 (print_reductions): Update for rename, and add %nonassoc error action
657 tokens to no_reduce_set so that, when printing the first remaining
658 reduction on an error action token, the reduction is enclosed in
659 brackets.
660 (print_results): Update for rename.
661 * tests/conflicts.at (Solved conflicts report for multiple reductions
662 in a state): New test case.
663 (%nonassoc error actions for multiple reductions in a state): New test
664 case.
665
666 * src/main.c (main): Don't depend on C99 features.
667
668 2007-07-16 Joel E. Denny <jdenny@ces.clemson.edu>
669
670 * build-aux/.cvsignore: Add compile.
671 * lib/.cvsignore: Add charset.alias, ref-add.sed, ref-del.sed, and
672 uniwidth.
673
674 2007-07-10 Joel E. Denny <jdenny@ces.clemson.edu>
675
676 * bootstrap (slurp): Create target directories that don't exist.
677 Specifically, we need lib/uniwidth/ because of recent Gnulib changes.
678
679 2007-07-09 Joel E. Denny <jdenny@ces.clemson.edu>
680
681 * LR0.c (new_itemsets): Fix wording in comments: say item index rather
682 than item number.
683 * closure.c (closure): Likewise.
684 * state.h (reductions): Comment sorting of rules.
685 (state): Comment sorting of items.
686
687 2007-07-02 Joel E. Denny <jdenny@ces.clemson.edu>
688
689 Fix C++ test cases after recent Gnulib changes. Discussed starting at
690 <http://lists.gnu.org/archive/html/bug-bison/2007-07/msg00000.html>.
691 * examples/calc++/Makefile.am (DEFAULT_INCLUDES): Override Automake's
692 definition in order to avoid Gnulib headers since we don't use config.h
693 here.
694 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): Use AT_DATA_GRAMMAR
695 rather than AT_DATA so that config.h is included.
696
697 2007-07-01 Joel E. Denny <jdenny@ces.clemson.edu>
698
699 * data/glr.c (yy_yypstack, yypstates, yypdumpstack): Use YYFPRINTF
700 instead of fprintf. Guard these functions with #if YYDEBUG instead of
701 #ifdef YYDEBUG for consistency with all other uses of YYDEBUG in Bison
702 and so that YYFPRINTF is guaranteed to be defined here.
703
704 2007-05-29 Joel E. Denny <jdenny@ces.clemson.edu>
705
706 * src/muscle_tab.c (muscle_percent_define_invalid_value): Replace
707 with...
708 (muscle_percent_define_check_values): ... this more helpful function.
709 Again, it's not used yet, but it will be.
710 * src/muscle_tab.h: Likewise.
711
712 Improve some comments in parser table construction.
713 * src/LR0.c (new_itemsets): Explain sorting of itemset and kernel_base.
714 (generate_states): Don't mention ruleset, which is internal to closure.
715 * src/closure.c (closure): Explain sorting of core and itemset, which
716 is required for this function to behave correctly.
717 * src/closure.h (closure): Mention sorting.
718
719 2007-05-28 Joel E. Denny <jdenny@ces.clemson.edu>
720
721 * src/lalr.c (state_lookahead_tokens_count): For code readability,
722 move the check for disabled transitions to an aver since conflict
723 resolution hasn't happened yet.
724
725 * src/lalr.c (state_lookahead_tokens_count): Remove the check that
726 labels a state as inconsistent just because it has error transitions.
727 The original form of this check appeared in revision 1.1 of lalr.c,
728 which was committed on 1991-12-21. Now (at least), changing the
729 consistency label on such a state appears to have no useful effect in
730 any of the places it is examined, which I enumerate below. The key
731 point to understanding each item in this enumeration is that a state
732 with an error transition is labelled consistent in the first place only
733 if it has no rules, so the check cannot matter for states that have
734 rules. (1) Labelling a state as inconsistent will cause set_conflicts
735 to try to identify its conflicts, and a state must have *rules* to have
736 conflicts. (2) Labelling a state as inconsistent will affect how
737 action_row sets the default *rule* for the state. (3) Labelling a
738 state as inconsistent will cause build_relations to add lookback edges
739 to *rules* in that state.
740 * src/state.h (struct state): Word the comment for member consistent
741 more carefully.
742
743 2007-05-27 Joel E. Denny <jdenny@ces.clemson.edu>
744
745 Don't depend on C99 features.
746 * src/conflicts.c (conflicts_update_state_numbers): Fix for-loop.
747 * src/lalr.c (lalr_update_state_numbers): Fix for-loop.
748 * src/reader.c (check_and_convert_grammar): Fix for-loop.
749 * src/state.c (state_mark_reachable_states): Fix for-loop.
750 (state_remove_unreachable_states): Fix for-loop.
751
752 Don't widen struct state with member reachable just to temporarily
753 record reachability. Instead, use a local bitset.
754 * src/state.h (struct state): Remove member.
755 * src/state.c (state_new): Don't initialize it.
756 (state_mark_reachable_states): Rename to...
757 (state_record_reachable_states): ... this, and use bitset.
758 (state_remove_unreachable_states): Use bitset.
759
760 2007-05-26 Joel E. Denny <jdenny@ces.clemson.edu>
761
762 * src/Makefile.am (yacc): Quote target action commands properly so
763 that the yacc script isn't corrupt. Reported by Hans Aberg at
764 <http://lists.gnu.org/archive/html/bug-bison/2007-05/msg00003.html>.
765
766 * data/glr.c (yylval): As in yacc.c, don't extern in the header for
767 the case of pure parsers. Reported by Frans Englich at
768 <http://lists.gnu.org/archive/html/help-bison/2007-05/msg00018.html>.
769 * THANKS: Add Frans Englich.
770
771 * NEWS (2.3a+): In the %code entry, reference section `Bison
772 Declaration Summary' from the manual now since the %code summary has
773 moved there.
774 * doc/bison.texinfo (Prologue Alternatives): Mention that directives
775 in the rules section must be terminated by semicolons.
776
777 2007-05-20 Joel E. Denny <jdenny@ces.clemson.edu>
778
779 Extend the front-end API for %define variables to more completely
780 mirror the back-end. This will be useful in the future.
781 * data/bison.m4 (b4_percent_define_get, b4_percent_define_ifdef):
782 Update comments to mention the new front-end counterparts of these
783 macros.
784 * src/muscle_tab.c (MUSCLE_COMMON_DECODE): New macro with common code
785 for muscle_string_decode and muscle_location_decode.
786 (muscle_string_decode): New static function.
787 (muscle_location_decode): Use MUSCLE_COMMON_DECODE.
788 (muscle_percent_define_get, muscle_percent_define_ifdef): New
789 functions.
790 (muscle_percent_define_flag_if): Use muscle_percent_define_ifdef and
791 muscle_percent_define_get to mimic the b4_percent_define_flag_if
792 implementation more closely.
793 (muscle_percent_define_invalid_value): New function.
794 * src/muscle_tab.h (muscle_percent_define_get,
795 muscle_percent_define_ifdef, muscle_percent_define_invalid_value):
796 Prototype.
797
798 2007-05-07 Joel E. Denny <jdenny@ces.clemson.edu>
799
800 * NEWS (2.3a+): Mention yesterday's state-removal change.
801 (2.3a): Remove the %language entry, which was added after 2.3a.
802 * src/LR0.c, src/closure.c, src/closure.h, src/conflicts.c,
803 src/conflicts.h, src/lalr.c, src/lalr.h, src/print.c,
804 src/print_graph.c, src/state.c, src/state.h, tests/conflicts.at,
805 tests/existing.at: Update copyright date.
806
807 2007-05-06 Joel E. Denny <jdenny@ces.clemson.edu>
808
809 If conflict resolution makes states unreachable, remove those states,
810 report rules that are then unused, and don't report conflicts in those
811 states.
812 * src/conflicts.c, src/conflicts.h (conflicts_update_state_numbers):
813 New global function.
814 * src/lalr.c, src/lalr.h (lalr_update_state_numbers): New global
815 function.
816 * src/main.c (main): After conflict resolution, remove the unreachable
817 states and update all data structures that reference states by number.
818 * src/state.c (state_new): Initialize each state's reachable member to
819 false.
820 (state_mark_reachable_states): New static function.
821 (state_remove_unreachable_states): New global function.
822 * src/state.h (struct state): Add member bool reachable.
823 (state_remove_unreachable_states): Prototype.
824 * tests/conflicts.at (Unreachable States After Conflict Resolution):
825 New test case.
826 * tests/existing.at (GNU pic Grammar): Update test case output now that
827 an unused rule is discovered.
828
829 2007-05-06 Joel E. Denny <jdenny@ces.clemson.edu>
830
831 Minor code cleanup in parser table construction.
832 * src/LR0.c (new_itemsets): Use item_number_is_symbol_number.
833 (new_itemsets, save_reductions): Update for rename to nitemset.
834 * src/closure.c (nritemset): Rename to...
835 (nitemset): ... this since the "r" appears to meaningless and isn't
836 used in the comments.
837 (closure): Update for rename.
838 * src/closure.h (nritemset): Update extern to...
839 (nitemset): ... this.
840 * src/lalr.c (LA): Fix a typo in comments.
841 * src/print.c (print_core): Update for rename to nitemset.
842 * src/print_graph.c (print_graph): Likewise.
843 * src/state.h: Fix some typos in header comments.
844
845 2007-04-04 Paul Eggert <eggert@cs.ucla.edu>
846
847 * THANKS: Use ASCII for Sebastien Fricker's name. Bison source
848 still sticks to ASCII. Sorry!
849
850 * README-hacking: New file, taken mostly from coreutils, with changes
851 for Bison. Contains much of the contents of:
852 * README-cvs: Remove.
853 * bootstrap: Sync from gnulib.
854 * build-aux/.cvsignore: Remove *.t, mkinstalldirs.
855 * lib/.cvsignore: Add wchar.h, wctype.h. Remove exit.h.
856
857 2007-03-10 Joel E. Denny <jdenny@ces.clemson.edu>
858
859 * doc/bison.texinfo (Destructor Decl): Fix typo reported by Sebastian
860 Setzer.
861 (Java Differences): Fix some typos.
862 * THANKS: Add Sebastian Setzer.
863
864 2007-03-07 Paolo Bonzini <bonzini@gnu.org>
865
866 * data/java.m4 (b4_single_class_if): Remove.
867 (b4_abstract_if): Look at "%define abstract".
868 (b4_lexer_if): New.
869 (b4_union_name): Rename...
870 (b4_yystype): ... to this. Map to "%define stype".
871 (b4_rhs_value, b4_parse_param_decl, b4_lex_param_decl,
872 b4_maybe_throws): Fix quoting.
873 (b4_lex_param_call): Move below to keep b4_*_param_decl close.
874 * data/lalr1.java (Lexer interface): Always define.
875 (Lexer interface within parser class): Remove.
876 (YYLexer class): New, used when "%code lexer" is present.
877 (constructor): When "%code lexer" is used, pass %lex-param
878 to the lexer constructor.
879 (yylex, yyparse): Remove %lex-param from method invocations
880 (YYStack, yyaction, yyparse): Rename b4_union_name to b4_yystype.
881
882 * doc/bison.texinfo (Java Bison Interface): Mention "%define
883 abstract". Rename "%define union_name" to "%define stype".
884 Rename method names according to previous patch.
885 (Java Scanner Interface): Describe "%code lexer" instead of
886 "%pure-parser" and "%define single_class".
887 (Java Differences): Mention "%code lexer".
888
889 * tests/java.at (_AT_DATA_JAVA_CALC_Y): Remove final argument.
890 Include scanner here, using macros from tests/local.at.
891 (AT_DATA_CALC_Y): Remove final argument.
892 (_AT_CHECK_JAVA_CALC): Likewise.
893 (AT_CHECK_JAVA_CALC): Likewise. Test all four combinations
894 of %locations and %error-verbose.
895 (main): Test with and without %lex-param.
896 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Push AT_LEXPARAM_IF.
897 (AT_BISON_OPTION_POPDEFS): Pop it.
898
899 2007-03-07 Juan Manuel Guerrero <juan.guerrero@gmx.de>
900
901 DJGPP spefic issue. Inhibit the use of disallowed characters for
902 file name genertion on Win98, WinXP, etc. These are |<>":?*\
903 and concern testsuite case 46.
904 * Makefile.am: djgpp/testsuite.sed added to EXTRA_DIST
905 * djgpp/testsuite.sed: Inhibit the use of disallowed characters.
906 * djgpp/config.bat: Inhibit the use of disallowed characters.
907
908 2007-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
909
910 Miscellaneous %define and %code cleanup.
911 * data/bison.m4 (b4_percent_define_flag_if): Correct comments on how
912 values are interpreted.
913 * doc/bison.texinfo (Decl Summary): Clean up and extend %define
914 documentation a little more.
915 * src/muscle_tab.c (MUSCLE_USER_NAME_CONVERT,
916 muscle_percent_define_insert, muscle_percent_code_grow): New
917 functions/macros.
918 * src/muscle_tab.h (muscle_percent_define_insert,
919 muscle_percent_code_grow): Prototype.
920 * src/parse-gram.y (prologue_declaration): Use
921 muscle_percent_define_insert and muscle_percent_code_grow when parsing
922 %define and %code directives.
923
924 Make it easy to share %define boolean variables between the front-end
925 and back-end. Though not used yet, this will be useful in the future.
926 * data/bison.m4 (b4_check_user_names): Rewrite comments to talk about
927 Bison uses of names rather than just skeleton uses of names.
928 (b4_percent_define_get, b4_percent_define_ifdef): Rename
929 b4_percent_define_skeleton_variables(VARIABLE) to
930 b4_percent_define_bison_variables(VARIABLE).
931 (b4_percent_code_get, b4_percent_code_ifdef): Rename
932 b4_percent_code_skeleton_qualifiers(QUALIFIER) to
933 b4_percent_code_bison_qualifiers(QUALIFIER).
934 (b4_check_user_names_wrap): Update for renames.
935 * src/muscle_tab.c, src/muscle_tab.h (muscle_percent_define_flag_if,
936 muscle_percent_define_default): New functions mimicking
937 b4_percent_define_flag_if and b4_percent_define_default.
938
939 For %define variables, report locations for invalid values and
940 redefinitions.
941 * data/bison.m4 (b4_percent_define_flag_if): Read
942 b4_percent_define_loc(VARIABLE) to report the location of an invalid
943 value for VARIABLE.
944 (b4_percent_define_default): Save a special location in
945 b4_percent_define_loc(VARIABLE) in case the default value for VARIABLE
946 must later be reported as invalid.
947 * src/muscle_tab.c (muscle_location_grow, muscle_location_decode): New
948 functions.
949 (muscle_percent_define_insert): Record the location of VARIABLE in
950 muscle percent_define_loc(VARIABLE), and use it to report the previous
951 location for a redefinition.
952 (muscle_percent_define_flag_if): Update like b4_percent_define_flag_if.
953 (muscle_percent_define_default): Update like b4_percent_define_default.
954 (muscle_grow_user_name_list): Rename to...
955 (muscle_user_name_list_grow): ... this for consistency and use
956 muscle_location_grow.
957 * src/muscle_tab.h (muscle_location_grow): Prototype.
958 * tests/input.at (%define errors): Update expected output.
959 * tests/skeletons.at (%define boolean variables: invalid skeleton
960 defaults): New test case.
961
962 2007-02-28 Joel E. Denny <jdenny@ces.clemson.edu>
963
964 * src/print.c (lookahead_set, state_default_rule): Remove.
965 (print_reductions): Replace state_default_rule invocation with
966 equivalent use of yydefact, which was computed in token_actions in
967 tables.c.
968 (print_results): Don't allocate lookahead_set.
969
970 2007-02-27 Paolo Bonzini <bonzini@gnu.org>
971
972 * data/lalr1.java: Prefix all private members with yy.
973
974 2007-02-24 Joel E. Denny <jdenny@ces.clemson.edu>
975
976 Use YYFPRINTF instead of fprintf where appropriate. Reported by
977 Sebastien Fricker at
978 <http://lists.gnu.org/archive/html/bug-bison/2007-02/msg00035.html>.
979 * THANKS: Add Sebastien Fricker.
980 * data/glr.c, data/push.c, data/yacc.c (yy_reduce_print): Implement.
981 * doc/bison.texinfo (Tracing): Make it clearer that YYFPRINTF must
982 accept a variable number of arguments.
983
984 2007-02-19 Joel E. Denny <jdenny@ces.clemson.edu>
985
986 * bootstrap: Remove occurrences of .#bootmp from lib/Makefile.
987
988 2007-02-13 Juan Manuel Guerrero <juan.guerrero@gmx.de>
989
990 * djgpp/config.bat: Adjustments concerning the use of autoconf 2.61.
991 * djgpp/config.sed: Adjustments concerning the use of autoconf 2.61.
992 * djgpp/config.site: Adjustments concerning the use of autoconf 2.61.
993
994 2007-02-11 Paul Eggert <eggert@cs.ucla.edu>
995
996 Undo my 2007-02-07 change, switching back to the c-strcase module
997 introduced in the 2007-02-03 change. Bruno Haible reported that
998 the 2007-02-07 change would be dangerous in Turkish if we add a
999 language whose name contains "i", since "i" is not lowercase "I"
1000 in Turkish.
1001 * bootstrap.conf (gnulib_modules): Add c-strcase. Remove strcase.
1002 * lib/.cvsignore: Add c-ctype.c, c-ctype.h, c-strcase.h,
1003 c-strcasecomp.c, c-strncasecmp.c. Remove strcasecmp.c, strncasecmp.c.
1004 * m4/.cvsignore: Remove strcase.m4.
1005 * src/getargs.c: Revert 2007-02-07 change, as follows.
1006 Include c-strcase.h.
1007 (language_argmatch): Use c_strcasecmp rather than strcasecmp.
1008
1009 2007-02-11 Bruno Haible <bruno@clisp.org>
1010
1011 Enable the Java related testsuite tests when the only Java compiler
1012 found is a gcj < 4.3. Discussed at
1013 <http://lists.gnu.org/archive/html/bug-bison/2007-02/msg00016.html>.
1014 * configure.ac (gt_JAVACOMP): Don't specify a target_version.
1015
1016 2007-02-11 Joel E. Denny <jdenny@ces.clemson.edu>
1017
1018 * data/Makefile.am: Update copyright date.
1019 * data/push.c (yypull_parse): Report memory exhaustion and return 2 if
1020 yypstate_new returns NULL.
1021 (yypstate_new): Return NULL if malloc does.
1022 * src/reader.c (packgram): Move translation of rule actions from the
1023 beginning of packgram to...
1024 (check_and_convert_grammar): ... here right before packgram is invoked
1025 so it's easier to write more complete comments, and remove redundant
1026 code.
1027
1028 2007-02-10 Joel E. Denny <jdenny@ces.clemson.edu>
1029
1030 As in semantic actions, make @$ in %initial-action, %destructor, and
1031 %printer imply %locations.
1032 * src/scan-code.l (SC_SYMBOL_ACTION): Set locations_flag = true when
1033 scanning @$.
1034 * tests/actions.at (AT_CHECK_ACTION_LOCATIONS): New macro supporting...
1035 (@$ in %initial-action implies %locations,
1036 @$ in %destructor implies %locations,
1037 @$ in %printer implies %locations): ... these new test cases.
1038
1039 2007-02-07 Paul Eggert <eggert@cs.ucla.edu>
1040
1041 Undo most of the 2007-02-03 change, switching to the strcase module
1042 now that gnulib strcase has been fixed.
1043 * bootstrap.conf (gnulib_modules): Remove c-strcase. Add strcase.
1044 * lib/.cvsignore: Remove c-ctype.c, c-ctype.h, c-strcase.h,
1045 c-strcasecomp.c, c-strncasecmp.c. Add strcasecmp.c, strncasecmp.c
1046 * m4/.cvsignore: Add strcase.m4.
1047 * src/getargs.c: Revert 2007-02-03 change, as follows.
1048 Don't include c-strcase.h.
1049 (language_argmatch): Use strcasecmp rather than c_strcasecmp.
1050 strcasecmp has "unspecified behavior" outside the POSIX locale,
1051 but it works fine in practice if at least one argument is ASCII,
1052 as is the case in Bison.
1053
1054 2007-02-07 Paolo Bonzini <bonzini@gnu.org>
1055
1056 * tests/java.at: Skip tests if only one of javac/java is present.
1057 Reported by Joel E. Denny.
1058 * tests/atlocal.in: Adjust copyright years.
1059
1060 2007-02-05 Paolo Bonzini <bonzini@gnu.org>
1061
1062 * data/lalr1.java (Stack): Work around old verifiers that disallow
1063 access to the private fields of an inner class, from the outer class.
1064 We can make Stack's fields public because user code doesn't have access
1065 to the instance of Stack used by parse(). Reported by Paul Eggert.
1066
1067 2007-02-03 Paul Eggert <eggert@cs.ucla.edu>
1068
1069 * .cvsignore: Add javacomp.sh, javaexec.sh. Is this really
1070 the right spot for these files?
1071 * bootstrap.conf (gnulib_modules): Add c-strcase.
1072 * lib/.cvsignore: Add c-ctype.c c-ctype.h, c-strcasecomp.c,
1073 c-strncasecmp.c.
1074 * src/getargs.c: Include c-strcase.h.
1075 (language_argmatch): Use c_strcasecmp rather than strcasecmp,
1076 to avoid unspecified behavior.
1077
1078 2007-02-01 Joel E. Denny <jdenny@ces.clemson.edu>
1079
1080 * doc/bison.texinfo (Decl Summary): Correct typo.
1081
1082 2007-01-30 Paolo Bonzini <bonzini@gnu.org>
1083
1084 * data/bison.m4 (b4_percent_define_flag_if): Don't treat 0 as false.
1085 Complain if the value does not match empty, "true" or "false".
1086 * data/c++.m4: Adjust default definitions of %define variables.
1087 * data/java.m4: Adjust default definitions of %define variables.
1088 * doc/bison.texinfo (Decl Summary): Adjust the %define entry according
1089 to above behavior.
1090 * tests/input.at (Boolean %define variables): Test new behavior.
1091
1092 2007-01-29 Paolo Bonzini <bonzini@gnu.org>
1093
1094 * NEWS: Mention java.
1095 * TODO: Remove things that are done.
1096 * bootstrap.conf: Add javacomp-script and javaexec-script.
1097 * configure.ac: Invoke gt_JAVACOMP and gt_JAVAEXEC.
1098
1099 * data/Makefile.am: Add new files.
1100 * data/java-skel.m4: New.
1101 * data/java.m4: New.
1102 * data/lalr1.java: New.
1103
1104 * doc/bison.texinfo: Put "A Complete C++ Example" under
1105 C++ Parsers. Add Java Parsers. Put C++ Parsers and Java Parsers
1106 under Other Languages.
1107
1108 * src/getargs.c (valid_languages): Add Java.
1109 * src/getargs.h (struct bison_language): Update size of string fields.
1110
1111 * tests/Makefile.am: Add java.at.
1112 * tests/atlocal.in: Add CONF_JAVA and CONF_JAVAC.
1113 * tests/java.at: New.
1114 * tests/testsuite.at: Include it.
1115
1116 2007-01-28 Joel E. Denny <jdenny@ces.clemson.edu>
1117
1118 Clean up.
1119 * src/scan-skel.l (at_directive_perform): Add at_directive_argc and
1120 at_directive_argv arguments so these no longer have to be global
1121 variables. Also, update the implementation for the following changes.
1122 (fail_for_at_directive_too_many_args,
1123 fail_for_at_directive_too_few_args): Add at_directive_name argument.
1124 (at_directive_name): Remove as at_directive_argv[0] will be used for
1125 this now.
1126 (AT_DIRECTIVE_ARGC_MAX): Increment to make space in at_directive_argv
1127 for the directive name.
1128 (at_directive_argc, at_directive_argv): Make these local within
1129 skel_lex instead of global.
1130 (INITIAL): Update directive start action for above changes.
1131 (SC_AT_DIRECTIVE_ARG): Rename to...
1132 (SC_AT_DIRECTIVE_ARGS): ... this, and update for above changes.
1133 (SC_AT_DIRECTIVE_SKIP_WS): Update.
1134 (scan_skel): Move yylex_destroy to...
1135 (skel_scanner_free): ... here.
1136 * tests/skeletons.at (installed skeleton file name): Rename to...
1137 (installed skeleton file names): ... this.
1138
1139 2007-01-27 Joel E. Denny <jdenny@ces.clemson.edu>
1140
1141 * ChangeLog: For changes in doc/bison.texinfo, consistently reference
1142 node names: say "Table of Symbols" not "Bison Symbols", and say "Decl
1143 Summary" not "Directives".
1144 * doc/bison.texinfo (Decl Summary, Calc++ Parser): Cross-reference the
1145 %code entry in "Decl Summary" rather than the one in "Table of Symbols"
1146 since the former is now the more complete one.
1147 (Prologue Alternatives): Likewise and do the same for %defines.
1148 (Table of Symbols): Add summary of %code, add summary of %define, and
1149 move full %code documentation to...
1150 (Decl Summary): ... here for consistency with other entries in these
1151 sections.
1152 Move %define entry in order to keep this list alphabetized.
1153 Reword %define entry a little to put less emphasis on the skeleton
1154 concept, which most users shouldn't have to think about.
1155
1156 2007-01-26 Paul Eggert <eggert@cs.ucla.edu>
1157
1158 Adjust to recent gnulib changes.
1159 * lib/.cvsignore: Remove stpcpy.h, strndup.h, strnlen.h.
1160 Add string.h, string_.h, unistd_.h, wchar_.h.
1161 * m4/.cvsignore: Add gnulib-common.m4, string_h.m4, wchar.m4.
1162 * src/system.h: Don't include <stpcpy.h>; this is now done by
1163 <string.h>.
1164
1165 2007-01-23 Paolo Bonzini <bonzini@gnu.org>
1166
1167 Simplify implementation of unqualified %code, implement macros for
1168 uniform treatment of boolean %define flags. Document %define.
1169 * data/bison.m4 (b4_percent_define_ifdef, b4_percent_define_flag_if,
1170 b4_percent_code_ifdef): New.
1171 (b4_percent_code_get): Map unqualified %code to b4_percent_code().
1172 * data/c++.m4: Define default value for global_tokens_and_yystype.
1173 * data/glr.cc: Likewise.
1174 * data/location.cc: Use b4_percent_define_flag_if.
1175
1176 * doc/bison.texinfo (Decl Summary): Document %define.
1177
1178 * src/parse-gram.y (Unqualified %code): Change muscle name to
1179 b4_percent_code().
1180 (content.opt): Default to empty.
1181
1182 2007-01-17 Joel E. Denny <jdenny@ces.clemson.edu>
1183
1184 Implement support for relative and absolute skeleton file names.
1185 Discussed starting at
1186 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00071.html>.
1187 * doc/bison.texinfo (Decl Summary): Document in %skeleton entry.
1188 (Bison Options): Document in --skeleton entry.
1189 * src/output.c (output_skeleton): Use strncpy rather than strcpy since
1190 full_skeleton can't necessarily hold all of pkgdatadir.
1191 If the specified skeleton file name contains a `/', don't prepend
1192 pkgdatadir.
1193 * src/parse-gram.y (prologue_declaration): If the specified skeleton
1194 file name contains a `/', prepend the grammar file directory.
1195 * tests/Makefile.am (TESTSUITE_AT): Add skeletons.at.
1196 * skeletons.at: New file.
1197 (relative skeleton file names): New test case.
1198 (installed skeleton file names): New test case.
1199 * tests/testsuite.at: Include skeletons.at.
1200
1201 * bootstrap: Update copyright to 2007.
1202
1203 2007-01-17 Paolo Bonzini <bonzini@gnu.org>
1204
1205 * bootstrap: Remove occurrences of .#bootmp from the files.
1206
1207 2007-01-17 Akim Demaille <akim@epita.fr>
1208
1209 * doc/bison.texinfo (Calc++ Parser): Don't try to alias
1210 nonterminals.
1211 Use per-type %printer.
1212
1213 2007-01-17 Joel E. Denny <jdenny@ces.clemson.edu>
1214
1215 * NEWS, data/c++-skel.m4, data/c++.m4, data/c-skel.m4, data/c.m4,
1216 data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
1217 djgpp/config.site, src/files.c, src/files.h, src/main.c,
1218 src/muscle_tab.c, src/muscle_tab.h, src/parse-gram.y, src/reader.h,
1219 src/scan-skel.h, src/scan-skel.l, tests/actions.at, tests/calc.at,
1220 tests/glr-regression.at, tests/input.at, tests/local.at,
1221 tests/output.at, tests/torture.at: Update copyright to 2007.
1222
1223 2007-01-16 Akim Demaille <akim@epita.fr>
1224
1225 * doc/bison.texinfo (Calc++ Parsing Driver): Let "parse" return an
1226 error code.
1227 (Calc++ Scanner): Exit with failure if we can't open the input
1228 file.
1229 Accept "-" standing for stdin.
1230 (Calc++ Top Level): Print the result only if the parsing was
1231 successful.
1232
1233 2007-01-16 Akim Demaille <akim@epita.fr>
1234
1235 * data/lalr1.cc (yy_reduce_print_): Add a missing end-of-line.
1236
1237 2007-01-15 Paolo Bonzini <bonzini@gnu.org>
1238 and Joel E. Denny <jdenny@ces.clemson.edu>
1239
1240 Clean up %define and %code implementation in M4 some. Most
1241 importantly, rename all related macros to be in the b4_percent_define
1242 and b4_percent_code namespaces. Also, complete support for `.' in
1243 %define variable names and %code qualifiers.
1244 * data/bison.m4 (b4_check_user_names): Check for special
1245 "SKELETON-NAMESPACE(name)" macros instead of using two nested
1246 m4_foreach loops.
1247 (b4_get_percent_define, b4_get_percent_code): Rename to...
1248 (b4_percent_define_get, b4_percent_code_get): ... these.
1249 Extend documentation with examples.
1250 For SKELETON-NAMESPACE (as documented for b4_check_user_names), use
1251 b4_percent_define_skeleton_variables and
1252 b4_percent_code_skeleton_qualifiers.
1253 Expect any value for the %define variable `foo' to be stored in the
1254 macro named `b4_percent_define(foo)'; expect any %code blocks for the
1255 qualifier `foo' to be stored in a macro named `b4_percent_code(foo)';
1256 expect any unqualified %code blocks to be stored in a macro named
1257 `b4_percent_code_unqualified'.
1258 Use m4_indir so that %define variable names and %code qualifiers can
1259 contain `.', which is allowed by the grammar parser.
1260 (b4_percent_define_default): New macro to set a default value for a
1261 %define variable.
1262 (m4_wrap): Update wrapped code, and fix some underquoting.
1263 (b4_check_user_names_wrap): Update and define outside the m4_wrap.
1264 Expect grammar uses of %define variables and %code qualifiers to be
1265 defined in b4_percent_define_user_variables and
1266 b4_percent_code_user_qualifiers.
1267 * data/c++.m4: Use b4_percent_define_default rather than
1268 m4_define_default. Fix some underquoting. Skeleton usage of %define
1269 variable define_location_comparison now implies skeleton usage of
1270 %define variable filename_type.
1271 * data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
1272 data/push.c, data/yacc.c: Update macro names.
1273 * src/parse-gram.y (prologue_declaration, grammar_declaration): Update
1274 muscle names.
1275
1276 2007-01-14 Juan Manuel Guerrero <juan.guerrero@gmx.de>
1277
1278 DJGPP specific issues.
1279
1280 * djgpp/config.site: Set ac_cv_path_mkdir to a sane DJGPP specific
1281 default. Set gl_cv_absolute_wctype_h to a sane DJGPP specific default.
1282
1283 2007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
1284
1285 * tests/glr-regression.at: Use AT_PARSER_CHECK rather than AT_CHECK to
1286 run parsers in all tests so that Valgrind is invoked during
1287 maintainer-check-valgrind.
1288 (Duplicate representation of merged trees): Free all semantic values.
1289 (Duplicated user destructor for lookahead): Likewise.
1290
1291 2007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
1292
1293 * tests/local.at (AT_PARSER_CHECK): Add a PRE argument to specify a
1294 command-line prefix.
1295 * tests/torture.at (Exploding the Stack Size with Alloca): Stderr is
1296 ignored, so use that PRE to set --log-fd=1 in VALGRIND_OPTS so we don't
1297 miss Valgrind messages.
1298 (Exploding the Stack Size with Malloc): Likewise.
1299
1300 2007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
1301
1302 Ignore YYSTACK_USE_ALLOCA for push parsers since the stacks can't be
1303 locals. Reported by Juan Manuel Guerrero at
1304 <http://lists.gnu.org/archive/html/bug-bison/2007-01/msg00000.html>.
1305 * data/push.c: Enclose the #ifdef YYSTACK_USE_ALLOCA in b4_push_if.
1306 Fix some indentation also.
1307 * tests/torture.at (Exploding the Stack Size with Alloca): Add comment
1308 explaining this issue.
1309
1310 2007-01-09 Paolo Bonzini <bonzini@gnu.org>
1311 and Joel E. Denny <jdenny@ces.clemson.edu>
1312
1313 Simplify union and prologue handling, and escape union and lex/parse
1314 params with digraphs.
1315 * data/bison.m4 (b4_pre_prologue, b4_post_prologue): Set their default
1316 values to the empty string since these are no longer guaranteed
1317 initialized by the front-end.
1318 * data/glr.c, data/glr.cc, data/lalr1.cc, data/push.c, data/yacc.c: Add
1319 braces around b4_user_stype since this is no longer done by the
1320 front-end.
1321 * src/files.c, src/files.h (pre_prologue_obstack,
1322 post_prologue_obstack): Remove.
1323 * src/muscle_tab.c (muscle_pair_list_grow): Don't duplicate header
1324 comments here. Use MUSCLE_OBSTACK_SGROW so that values are escaped
1325 with digraphs. This fixes lex params and parse params.
1326 * src/muscle_tab.h (muscle_pair_list_grow): Update comments.
1327 * src/output.c (prepare): Remove muscle insertion of the prologues.
1328 (output): Remove freeing of pre_prologue_obstack and
1329 post_prologue_obstack.
1330 * src/parse-gram.y (prologue_declaration): Use muscle_code_grow rather
1331 than prologue_augment for prologue parsing so you don't need prologue
1332 obstacks.
1333 (grammar_declaration): For %union RHS, use `braceless' instead of
1334 "{...}" so that braces are already stripped and code is escaped with
1335 digraphs.
1336 * src/reader.c (prologue_augment): Remove.
1337 (reader): Remove initialization of pre_prologue_obstack and
1338 post_prologue_obstack.
1339 * src/reader.h (prologue_augment): Remove.
1340
1341 * data/c.m4: Remove stray parenthesis.
1342
1343 2007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
1344
1345 Remove quotes from variables names in %define directives and from
1346 qualifiers in %code directives, and restrict the characters that are
1347 allowed in them to M4-friendly ones. For %define, continue to support
1348 the quoted form as a deprecated feature. Discussed starting at
1349 <http://lists.gnu.org/archive/html/bison-patches/2007-01/msg00023.html>.
1350 * NEWS (2.3a+): Add entry for the change to %define. Update entry for
1351 %code.
1352 * doc/bison.texinfo (Prologue Alternatives): Update.
1353 (Decl Summary): In %defines entry, update mention of `%code requires'
1354 and `%code provides'.
1355 (C++ Location Values): Update %define uses.
1356 (Calc++ Parser Interface): Likewise.
1357 (Calc++ Parser): Likewise, and update `%code requires' uses.
1358 (Table of Symbols): Update %code documentation.
1359 * src/parse-gram.y (prologue_declaration): For %define variables, use
1360 `variable' instead of `STRING'.
1361 (grammar_declaration): For %code qualifiers, use `ID' instead of
1362 `STRING'.
1363 (variable): New nonterminal that takes an `ID' or a `STRING'.
1364 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Update %code
1365 and %define uses.
1366 * tests/calc.at (_AT_DATA_CALC_Y): Update %define use.
1367 * tests/input.at (Reject unused %code qualifiers): Update %code uses.
1368 (%define errors): Update %define uses.
1369
1370 2007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
1371
1372 * src/parse-gram.y (prologue_declaration): Use MUSCLE_INSERT_STRING
1373 instead of muscle_insert for %define values so that M4-special
1374 characters are replaced with digraphs.
1375 * tests/input.at (%define errors): Extend to check weird values.
1376
1377 2007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
1378
1379 Instead of having skeletons declare all valid %define variables and
1380 %code qualifiers, provide macros that retrieve the associated values
1381 and build these lists automatically. Thus Bison will now warn when a
1382 variable or qualifier is not used by the skeleton in the current
1383 invocation regardless of whether it might sometimes be used by that
1384 skeleton in other invocations. Also, move all %define value macros to
1385 the b4_percent_define_ namespace, and remove the %define "NAME" {CODE}
1386 form, which is replaced by %code.
1387 * data/bison.m4 (b4_check_for_unrecognized_names): Rename to...
1388 (b4_check_user_names): ... this, and change the series of valid name
1389 arguments to a single list argument for names used in the skeleton
1390 similar to the existing list argument for names used in the grammar.
1391 Warn instead of complaining.
1392 (b4_get_percent_define, b4_get_percent_code): New to retrieve %define
1393 values and %code code, to format %code code properly, and to build
1394 lists of all %define variables and %code qualifiers used in the
1395 skeleton: b4_skeleton_percent_define_variables and
1396 b4_skeleton_percent_code_qualifiers.
1397 (b4_check_percent_define_variables, b4_check_percent_code_qualifiers):
1398 Remove, and...
1399 (m4_wrap): ... m4_wrap b4_check_user_names invocations instead so that
1400 the skeleton names lists can finish building first. In place of
1401 b4_used_percent_define_variables and b4_used_percent_code_qualifiers,
1402 expect the lists b4_user_percent_define_variables and
1403 b4_user_percent_code_qualifiers.
1404 * data/c++.m4: Where setting default values for b4_parser_class_name,
1405 b4_location_type, b4_filename_type, b4_namespace, and
1406 b4_define_location_comparison, update their names to the
1407 b4_percent_define_ namespace.
1408 * data/glr.c: Don't use b4_check_percent_define_variables and
1409 b4_check_percent_code_qualifiers. Use b4_get_percent_code.
1410 * data/glr.cc, data/lalr1.cc: Likewise, and use b4_get_percent_define.
1411 (b4_parser_class_name, b4_namespace): Define these using
1412 b4_get_percent_define for parser_class_name and namespace.
1413 * data/location.cc: Use b4_get_percent_define.
1414 * data/push.c: Don't use b4_check_percent_define_variables and
1415 b4_check_percent_code_qualifiers. Use b4_get_percent_code.
1416 * data/yacc.c: Likewise, and don't call m4_exit in
1417 b4_use_push_for_pull_if or m4_wrap code will never execute.
1418 * src/muscle_tab.c, src/muscle_tab.h (muscle_grow_used_name_list):
1419 Rename to...
1420 (muscle_grow_user_name_list): ... this for consistency with the
1421 terminology used in bison.m4.
1422 * src/parse-gram.y (prologue_declaration): Prepend "percent_define_" to
1423 %define variable names, and rename muscle used_percent_define_variables
1424 to user_percent_define_variables.
1425 (grammar_declaration): Rename muscle used_percent_code_qualifiers to
1426 user_percent_code_qualifiers.
1427 (content): Remove.
1428 (content.opt): Replace content RHS with STRING RHS so %define "NAME"
1429 {CODE} form is no longer accepted.
1430 * tests/input.at (Reject bad %code qualifiers): Rename to...
1431 (Reject unused %code qualifiers): ... this, and update test output.
1432 (%define error): Update test output.
1433
1434 2007-01-07 Joel E. Denny <jdenny@ces.clemson.edu>
1435
1436 Check for unrecognized %define variables similar to checking for
1437 unrecognized %code qualifiers. Check for redefined %define variables.
1438 * data/bison.m4 (b4_check_for_unrecognized_names): New macro that
1439 generalizes...
1440 (b4_check_percent_code_qualifiers): ... this, which now wraps it.
1441 (b4_check_percent_define_variables): New, also wraps it.
1442 * data/glr.c: Unless glr.cc is wrapping glr.c, declare no valid %define
1443 variables using b4_check_percent_define_variables.
1444 * data/glr.cc, data/lalr1.cc: Declare the valid %define variables as
1445 all those exercised in the test suite and all those listed in the
1446 `Default values' section of c++.m4. Are there others?
1447 * data/push.c, data/yacc.c: Declare no valid %define variables.
1448 * src/muscle_tab.c, src/muscle_tab.h (muscle_find_const): New function,
1449 similar to muscle_find, but it works even when the muscle stores a
1450 const value.
1451 (muscle_grow_used_name_list): New function for constructing the used
1452 name list muscles that b4_check_for_unrecognized_names requires.
1453 * src/parse-gram.y (prologue_declaration): Warn if a variable is
1454 %define'd more than once. Define the b4_used_percent_define_variables
1455 muscle with muscle_grow_used_name_list.
1456 (grammar_declaration): Abbreviate %code code with
1457 muscle_grow_used_name_list.
1458 * tests/input.at (%define errors): New.
1459
1460 2007-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
1461
1462 Provide warn_at, complain_at, and fatal_at function callbacks to the
1463 skeletons, and use this for %code qualifier complaints.
1464 * data/bison.m4 (b4_error_at): New, invoked by...
1465 (b4_warn_at, b4_complain_at, b4_fatal_at): ... these new macros to wrap
1466 the skeleton scanner's new @warn_at(...@), @complain_at(...@), and
1467 @fatal_at(...@) directives.
1468 (b4_check_percent_code_qualifiers): Rewrite to expect locations for
1469 qualifiers in b4_used_percent_code_qualifiers and to use
1470 b4_complain_at.
1471 * src/location.c, src/location.h (boundary_set_from_string): New global
1472 function.
1473 * src/muscle_tab.c, src/muscle_tab.h (muscle_boundary_grow): New global
1474 function.
1475 * src/parse-gram.y (grammar_declaration): Add locations for qualifiers
1476 to b4_used_percent_code_qualifiers.
1477 * src/scan-skel.l (fail_for_at_directive_too_few_args): New static
1478 function.
1479 (AT_DIRECTIVE_ARGC_MAX): Increase for boundary arguments.
1480 (lineno): Rename to...
1481 (out_lineno): ... this so I don't misunderstand it again.
1482 (SC_AT_DIRECTIVE_SKIP_WS): Don't increment out_lineno for newlines
1483 here; these newlines are in the input but not the output file.
1484 (SC_AT_DIRECTIVE_ARG): Likewise. Extract directive execution to...
1485 (at_directive_perform): ... this new static function, and add handling
1486 of new @warn_at(...@), @complain_at(...@), and @fatal_at(...@)
1487 directives.
1488 * tests/input.at (Reject bad %code qualifiers): Update test output with
1489 locations and extend.
1490
1491 * tests/output.at (Output file name: [, Output file name: ]): Remove
1492 bogus comment about these tests failing.
1493
1494 2007-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
1495
1496 Clean up b4_check_percent_code_qualifiers a little.
1497 * data/bison.m4 (b4_check_percent_code_qualifiers): Expect qualifiers
1498 in b4_used_percent_code_qualifiers to be double-M4-quoted. Rewrite
1499 documentation and add examples.
1500 * src/parse-gram.y (grammar_declaration): Double-M4-quote those
1501 qualifiers here.
1502
1503 2007-01-05 Joel E. Denny <jdenny@ces.clemson.edu>
1504
1505 Don't use m4_divert since it makes m4_divert_push and m4_divert_pop
1506 unreliable -- especially when they're hidden inside another macro.
1507 * data/bison.m4, data/c++-skel.m4, data/c++.m4, data/c-skel.m4,
1508 data/c.m4: Remove m4_divert(-1).
1509 * data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
1510 data/push.c, data/yacc.c: Likewise, and replace m4_divert(0) with
1511 m4_divert_push(0) and m4_divert_pop(0).
1512 * src/output.c (output_skeleton): Don't add an m4_divert_push(0) and
1513 an m4_wrap([m4_divert_pop(0)]) to the M4. Diversion -1, which is
1514 pushed and popped by m4sugar, should be first on the stack.
1515
1516 Provide warn, complain, and fatal function callbacks to the skeletons.
1517 This provides more flexibility than m4_fatal, improves the error
1518 message format, and captures messages for translation. Discussed
1519 starting at
1520 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00063.html>.
1521 * data/bison.m4 (b4_error): New, invoked by...
1522 (b4_warn, b4_complain, b4_fatal): ... these new macros to wrap the
1523 skeleton scanner's new @warn(...@), @complain(...@), and @fatal(...@)
1524 directives. Because these M4 macros might be called when the current
1525 diversion is -1 or 0, m4_divert_push and m4_divert_pop is used; thus
1526 the previous removal of uses of m4_divert, which caused trouble.
1527 (b4_check_percent_code_qualifiers): Use b4_complain instead of
1528 m4_fatal to report unrecognized %code qualifiers.
1529 * data/c++-skel.m4: Use b4_complain instead of m4_fatal to report C++
1530 push parser requests.
1531 * data/glr.c: Use b4_complain instead of m4_fatal to report
1532 non-deterministic push parser requests.
1533 Update @output usage to @output(...@) form.
1534 * data/glr.cc, data/lalr1.cc: Use b4_fatal instead of m4_fatal to
1535 report missing %defines. Update @output usage to @output(...@) form.
1536 * data/location.cc, data/push.c, data/yacc.c: Update @output usage to
1537 @output(...@) form.
1538 * src/main.c (main): Invoke skel_scanner_free.
1539 * src/scan-skel.h (skel_scanner_free): Prototype new function.
1540 * src/scan-skel.l (FLEX_NO_OBSTACK): Don't define; we now need the
1541 obstack_for_string from flex-scanner.h.
1542 (YY_DECL): Use to declare skel_lex static.
1543 (decode_at_digraphs): Remove; now handled in the new
1544 SC_AT_DIRECTIVE_ARG start condition.
1545 (fail_for_at_directive_too_many_args, fail_for_invalid_at): New static
1546 functions.
1547 (at_directive_name, AT_DIRECTIVE_ARGC_MAX, at_directive_argc,
1548 at_directive_argv): New static globals.
1549 (INITIAL): Use fail_for_invalid_at.
1550 Don't parse `@output file_name\n' or `@basename(...@)'. Instead,
1551 recognize the start of a generalized `@directive(...@)' form and
1552 start...
1553 (SC_AT_DIRECTIVE_ARG): ... this new start condition to parse the
1554 directive args (using the new obstack_for_string), to decode the
1555 contained @ diagraphs, and to perform the directive. It recognizes
1556 @basename(...@), @warn(...@), @complain(...@), @fatal(...@), and
1557 @output(...@).
1558 (SC_AT_DIRECTIVE_SKIP_WS): New start condition started by
1559 SC_AT_DIRECTIVE_ARG to skip whitespace after the argument delimiter,
1560 `@,'.
1561 (scan_skel): Initialize obstack_for_string on the first call.
1562 (skel_scanner_free): New function to free obstack_for_string.
1563 * tests/input.at (Reject bad %code qualifiers): Update test output.
1564
1565 2007-01-04 Joel E. Denny <jdenny@ces.clemson.edu>
1566
1567 Consolidate the 4 prologue alternative directives (%code, %requires,
1568 %provides, and %code-top) into a single %code directive with an
1569 optional qualifier field. Discussed at
1570 <http://lists.gnu.org/archive/html/bison-patches/2007-01/msg00012.html>.
1571 * NEWS (2.3a+): Rewrite the existing entry for the prologue
1572 alternatives.
1573 * doc/bison.texinfo (Prologue Alternatives): Update.
1574 (Decl Summary): Update to %code "requires" and %code "provides".
1575 (Calc++ Parser): Update to %code "requires".
1576 (Table of Symbols): Remove entries for %requires, %provides, and
1577 %code-top. Rewrite %code entry, and add a %code "QUALIFIER" entry.
1578 * data/bison.m4 (b4_user_provides, b4_user_requires): Remove as these
1579 are replaced by b4_percent_code_provides and b4_percent_code_requires,
1580 which are skeleton-specific.
1581 (b4_check_percent_code_qualifiers): New. A skeleton can use this to
1582 declare what %code qualifiers it supports and to complain if any other
1583 qualifiers were used in the grammar.
1584 * data/glr.cc: Update to use b4_user_code([b4_percent_code_requires])
1585 and b4_user_code([b4_percent_code_provides]) in place of
1586 b4_user_requires and b4_user_provides.
1587 * data/glr.c, data/lalr1.cc, data/push.c, data/yacc.c: Likewise.
1588 Add b4_user_code([b4_percent_code_top]) and
1589 b4_user_code([b4_percent_code]).
1590 Invoke b4_check_percent_code_qualifiers.
1591 * src/parse-gram.y (PERCENT_CODE_TOP, PERCENT_PROVIDES,
1592 PERCENT_REQUIRES): Remove.
1593 (grammar_declaration): Remove RHS's for %code-top, %provides, and
1594 %requires. Rewrite the %code RHS as the unqualified form defining the
1595 muscle b4_percent_code. Add another RHS for the qualified %code form,
1596 which defines muscles of the form b4_percent_code_QUALIFIER and the
1597 b4_used_percent_code_qualifiers muscle.
1598 * src/scan-gram.l (PERCENT_CODE_TOP, PERCENT_PROVIDES,
1599 PERCENT_REQUIRES): Remove.
1600 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Update to use
1601 %code "requires" and %code "provides".
1602 * tests/input.at (Reject bad %code qualifiers): New.
1603
1604 2007-01-03 Joel E. Denny <jdenny@ces.clemson.edu>
1605
1606 Use the new code_props interface for destructors and printers.
1607 * src/symtab.h (symbol, semantic_type): Remove destructor_location and
1608 printer_location members, and change the type of the destructor and
1609 printer members to code_props.
1610 (symbol_destructor_set, symbol_destructor_get, symbol_printer_set,
1611 symbol_printer_get, semantic_type_destructor_set,
1612 semantic_type_printer_set, default_tagged_destructor_set,
1613 default_tagless_destructor_set, default_tagged_printer_set,
1614 default_tagless_printer_set): Use code_props in arguments and return
1615 types in place of char const * and location.
1616 (symbol_destructor_location_get, symbol_printer_location_get): Remove
1617 since the locations are now contained in the return of
1618 symbol_destructor_get and symbol_printer_get.
1619 * src/output.c (symbol_destructors_output, symbol_printers_output):
1620 Replace with...
1621 (symbol_code_props_output): ... this to eliminate duplicate code.
1622 (output_skeleton): Update to use symbol_code_props_output.
1623 * src/reader.c (symbol_should_be_used): Update use of
1624 symbol_destructor_get.
1625 * src/symlist.c (symbol_list_destructor_set, symbol_list_printer_set):
1626 Update uses of the various _destructor_set and _printer_set functions.
1627 * src/symtab.c: (default_tagged_destructor_location,
1628 default_tagless_destructor_location, default_tagged_printer_location,
1629 default_tagless_printer_location): Remove since we...
1630 (default_tagged_destructor, default_tagless_destructor,
1631 default_tagged_printer, default_tagless_printer): ... change the type
1632 of these to code_props.
1633 (symbol_new, semantic_type_new, symbol_destructor_set,
1634 semantic_type_destructor_set, symbol_destructor_get,
1635 symbol_printer_set, semantic_type_printer_set, symbol_printer_get,
1636 symbol_check_alias_consistency, default_tagged_destructor_set,
1637 default_tagless_destructor_set, default_tagged_printer_set,
1638 default_tagless_printer_set): Update.
1639 (symbol_destructor_location_get, symbol_printer_location_get): Remove.
1640 (SYMBOL_CODE_PRINT): New similar to SYMBOL_ATTR_PRINT but for
1641 code_props members.
1642 (symbol_print): Use SYMBOL_CODE_PRINT.
1643
1644 2007-01-03 Joel E. Denny <jdenny@ces.clemson.edu>
1645
1646 Use the new code_props interface for rule actions.
1647 * src/symlist.h (symbol_list): Replace action, action_location, and
1648 used members with a code_props action_props member.
1649 * src/reader.c (symbol_should_be_used, grammar_rule_check,
1650 grammar_midrule_action, grammar_current_rule_merge_set,
1651 grammar_current_rule_symbol_append, packgram): Update.
1652 * src/scan-code.h (translate_rule_action): Remove, no longer used.
1653 * src/scan-code.l (handle_action_dollar): Update.
1654 (translate_rule_action): Remove, no longer used.
1655 * src/symlist.c (symbol_list_sym_new, symbol_list_syms_print): Update.
1656
1657 2007-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
1658
1659 Use the new code_props interface in parse-gram.y.
1660 * src/parse-gram.y (prologue_declaration, braceless, epilogue.opt):
1661 Update all uses of translate_* functions to use the new code_props
1662 interface and to use gram_scanner_last_string_free and
1663 code_scanner_last_string_free where possible.
1664 (grammar_declaration): symbol_list_destructor_set and
1665 symbol_list_printer_set now perform the translation, so don't do it
1666 here. Use gram_scanner_last_string_free where possible.
1667 * src/scan-code.h, src/scan-code.l (translate_symbol_action,
1668 translate_code): Remove, no longer used.
1669 * src/symlist.h, src/symlist.c (symbol_list_destructor_set,
1670 symbol_list_printer_set): Perform code translation here rather than
1671 depending on the caller to do so.
1672
1673 * src/symlist.h (struct symbol_list): Correct some documentation typos.
1674 * src/scan-gram.h (gram_last_string): Remove declaration.
1675 * src/scan-gram.l (last_string): Declare it static.
1676
1677 2007-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
1678
1679 Encapsulate code properties and related functionality for the various
1680 destructors, printers, and actions into a code_props structure and
1681 interface. This patch merely implements code_props in scan-code.h and
1682 scan-code.l. Future patches will rewrite other modules to use it.
1683 Discussed starting at
1684 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00020.html>.
1685 * src/location.h (EMPTY_LOCATION_INIT): Define so that it's easier to
1686 consistently initialize const structs that have an empty location
1687 field.
1688 * src/location.c (empty_location): Initialize with EMPTY_LOCATION_INIT
1689 to ensure consistency.
1690 * src/scan-code.h (code_props): New structure.
1691 (code_props_none_init, CODE_PROPS_NONE_INIT, code_props_none): New
1692 function, macro, and const global variable for initializing a
1693 code_props with no code.
1694 (code_props_plain_init, code_props_symbol_action_init,
1695 code_props_rule_action_init, code_props_translate_code): The rest of
1696 the new code_props functional interface. Among other things, the init
1697 functions set the code_props kind field so that
1698 code_props_translate_code will know whether to behave like
1699 translate_symbol_action, translate_rule_action, or translate_code.
1700 These old translate functions must remain until all other modules are
1701 updated to use the new code_props interface.
1702 (code_scanner_last_string_free): New function similar to
1703 gram_scanner_last_string_free.
1704 (code_scanner_free): Add documentation.
1705 * src/scan-code.l: Implement the new interface.
1706 (code_lex): Make it static, add a code_props* argument, and remove the
1707 rule argument.
1708 (last_string): New static global similar to the one in scan-gram.l.
1709 (SC_RULE_ACTION): Update to use the code_props* argument to code_lex
1710 instead of rule.
1711 (SC_SYMBOL_ACTION): For $$, set the is_value_used member of the
1712 code_props since Bison may one day use this information for destructors
1713 and printers.
1714 (<*><<EOF>>): Use STRING_FINISH so that last_string is set.
1715 (handle_action_dollar): Use symbol_list_n_get and set used flag
1716 directly since symbol_list_n_used_set is removed.
1717 (translate_action): Add a code_props* argument and remove the rule,
1718 action, and location arguments. Pass the code_props* on to code_lex.
1719 (translate_rule_action, translate_symbol_action, translate_code):
1720 Rewrite as wrappers around the new code_props interface.
1721 * src/symlist.h, src/symlist.c (symbol_list_n_used_set): Remove since
1722 it would eventually need to break the encapsulation of code_props.
1723
1724 2007-01-01 Joel E. Denny <jdenny@ces.clemson.edu>
1725
1726 * etc/.cvsignore: New.
1727
1728 2007-01-01 Joel E. Denny <jdenny@ces.clemson.edu>
1729
1730 Add maintainer-push-check to run maintainer-check using push parsing in
1731 place of pull parsing where available.
1732 * Makefile.am (maintainer-push-check): New.
1733 * data/bison.m4 (b4_use_push_for_pull_if): New.
1734 * data/push.c: Redefine b4_push_if and b4_use_push_for_pull_if
1735 appropriately based on their existing values.
1736 (yypush_parse): Don't print push-parser-specific diagnostics if push
1737 parsing is being used in place of pull parsing.
1738 * data/yacc.c: If push parsing should replace pull parsing, redirect to
1739 push.c.
1740 * src/output.c (prepare): Check BISON_USE_PUSH_FOR_PULL environment
1741 variable, and insert b4_use_push_for_pull_flag into muscles.
1742 * tests/Makefile.am (maintainer-push-check): New.
1743
1744 2006-12-31 Joel E. Denny <jdenny@ces.clemson.edu>
1745
1746 * data/push.c (yypush_parse): Set yynew = 1 at the end of a parse
1747 (whether successful or failed) so that yypush_parse can be invoked
1748 again to start a new parse using the same yypstate.
1749 * tests/torture.at (AT_DATA_STACK_TORTURE): For push mode, extend to
1750 check multiple yypull_parse invocations on the same yypstate. For pull
1751 mode, extend to check multiple yyparse invocations.
1752 (Exploding the Stack Size with Alloca): Extend to try with
1753 %push-pull-parser.
1754 (Exploding the Stack Size with Malloc): Likewise.
1755
1756 * tests/calc.at (Simple LALR Calculator): Don't specify
1757 %skeleton "push.c" since %push-pull-parser implies that now.
1758 * tests/headers.at (export YYLTYPE): Don't check for the push
1759 declarations. Otherwise, this test case can't be used to see if push
1760 mode can truly emulate pull mode.
1761 * tests/input.at (Torturing the Scanner): Likewise.
1762 * tests/local.at (AT_YACC_OR_PUSH_IF, AT_PUSH_IF): Remove.
1763 (AT_YYERROR_SEES_LOC_IF): Rather than AT_YACC_OR_PUSH_IF, use
1764 AT_YACC_IF, which now includes the case of push mode since %skeleton
1765 need not be used for push mode. This will be more intuitive once
1766 push.c is renamed to yacc.c.
1767
1768 2006-12-31 Joel E. Denny <jdenny@ces.clemson.edu>
1769
1770 For push mode, convert yyparse from a macro to a function, invoke yylex
1771 instead of passing a yylexp argument to yypull_parse, and don't
1772 generate yypull_parse or yyparse unless %push-pull-parser is declared.
1773 Discussed starting at
1774 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00163.html>.
1775 * data/bison.m4 (b4_pull_if): New.
1776 * data/c.m4 (b4_identification): Define YYPULL similar to YYPUSH.
1777 * data/push.c: Improve M4 quoting a little.
1778 (b4_generate_macro_args, b4_parenthesize): Remove.
1779 (yyparse): If there's a b4_prefix, #define this to b4_prefix[parse]
1780 any time a pull parser is requested.
1781 Don't #define this as a wrapper around yypull_parse. Instead, when
1782 both push and pull are requested, make it a function that does that
1783 same thing.
1784 (yypull_parse): If there's a b4_prefix, #define this to
1785 b4_prefix[pull_parse] when both push and pull are requested.
1786 Don't define this as a function unless both push and pull are
1787 requested.
1788 Remove the yylexp argument and hard-code yylex invocation instead.
1789 * etc/bench.pl.in (bench_grammar): Use %push-pull-parser instead of
1790 %push-parser.
1791 * src/getargs.c (pull_parser): New global initialized to true.
1792 * getargs.h (pull_parser): extern it.
1793 * src/output.c (prepare): Insert pull_flag muscle.
1794 * src/parse-gram.y (PERCENT_PUSH_PULL_PARSER): New token.
1795 (prologue_declaration): Set both push_parser and pull_parser = true for
1796 %push-pull-parser. Set push_parser = true and pull_parser = false for
1797 %push-parser.
1798 * src/scan-gram.l: Don't accept %push_parser as an alternative to
1799 %push-parser since there's no backward-compatibility concern here.
1800 Scan %push-pull-parser.
1801 * tests/calc.at (Simple LALR(1) Calculator): Use %push-pull-parser
1802 instead of %push-parser.
1803 * tests/headers.at (export YYLTYPE): Make yylex static, and don't
1804 prototype it in the module that calls yyparse.
1805 * tests/input.at (Torturing the Scanner): Likewise.
1806 * tests/local.at (AT_PUSH_IF): Check for %push-pull-parser as well.
1807
1808 2006-12-26 Joel E. Denny <jdenny@ces.clemson.edu>
1809
1810 Update etc/bench.pl. Optimize push mode a little (the yyn change
1811 deserves most of the credit).
1812 * Makefile.am (SUBDIRS): Add etc subdirectory.
1813 * configure.ac (AC_CONFIG_FILES): Add etc/bench.pl and etc/Makefile.
1814 * data/push.c (b4_declare_parser_state_variables): Move yyn, yyresult,
1815 yytoken, yyval, and yyloc declarations to...
1816 (yyparse or yypush_parse): ... here to improve performance. For
1817 yypush_parse invocations after the first, be sure to assign yyn its old
1818 value again.
1819 (yypstate_new): Don't bother initializing the yyresult field since the
1820 initial value isn't used.
1821 (yyn, yyresult, yytoken, yyval, yyloc): For each NAME in this list,
1822 remove the #define that, in push mode, set it to yyps->NAME.
1823 * etc/Makefile.am: New.
1824 * etc/bench.pl: Remove and build it instead from...
1825 * etc/bench.pl.in: ... this new file. Use @abs_top_builddir@ to invoke
1826 "tests/bison" from the build directory by default rather than just
1827 invoking "bison" from $PATH.
1828 (calc_grammar): Update push parser code: don't declare yylval globally,
1829 don't define yyparse_wrapper, and don't #define yyparse.
1830 (bench_grammar): Update to check all working combinations of yacc.c,
1831 push.c, impure, pure, pull, and push.
1832
1833 2006-12-25 Joel E. Denny <jdenny@ces.clemson.edu>
1834
1835 For push mode, add pull wrappers around yypush_parse.
1836 * data/push.c: (b4_generate_macro_args, b4_parenthesize): New macros.
1837 (yypull_parse): New function wrapping yypush_parse.
1838 (yyparse): New #define wrapping yypull_parse.
1839 * tests/calc.at (_AT_DATA_CALC_Y): Call yyparse even when %push-parser
1840 is declared.
1841 * tests/headers.at (export YYLTYPE): Make yylex global. For push mode,
1842 prototype yylex in the module that calls yyparse, and don't prototype
1843 yyparse there. Otherwise, the yyparse expansion won't compile.
1844 * tests/input.at (Torturing the Scanner): Likewise.
1845
1846 2006-12-25 Joel E. Denny <jdenny@ces.clemson.edu>
1847
1848 Enable push parsers to operate in impure mode. Thus, %push-parser no
1849 longer implies %pure-parser. The point of this change is to move
1850 towards being able to test the push parser code by running the entire
1851 test suite as if %push-parser had been declared.
1852 * data/push.c (yypush_parse): For impure mode, remove the
1853 yypushed_char, yypushed_val, and yypushed_loc arguments.
1854 Instead, declare these as local variables initialized to the global
1855 yychar, yylval, and yylloc.
1856 For the first yypush_parse invocation only, restore the initial values
1857 of these global variables when it's time to read a token since they
1858 have been overwritten.
1859 * src/parse-gram.y (prologue_declaration): Don't set pure_parser for
1860 %push-parser.
1861 * tests/calc.at (Simple LALR(1) Calculator): Always declare
1862 %pure-parser along with %push-parser since this test case was designed
1863 for pure push parsers.
1864 * tests/local.at (AT_PURE_OR_PUSH_IF): Remove unused.
1865 (AT_YACC_OR_PUSH_IF): New.
1866 (AT_YYERROR_SEES_LOC_IF): Fix enough that the test suite passes, but
1867 add a note that it's still wrong for some cases (as it has been for a
1868 while).
1869 (AT_PURE_LEX_IF): Use AT_PURE_IF instead of AT_PURE_OR_PUSH_IF since
1870 %push-parser no longer implies %pure-parser.
1871
1872 2006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
1873
1874 Remove some unnecessary differences between the pull parser code and
1875 the push parser code. This patch enables yynerrs in push mode.
1876 * data/push.c: Reformat M4 a little.
1877 (b4_yyerror_range): Remove and convert all uses to just yyerror_range.
1878 (b4_declare_scanner_communication_variables): Don't omit yynerrs just
1879 because push mode is on. Instead, if pure mode is on, move yynerrs
1880 to...
1881 (b4_declare_parser_state_variables): ... here.
1882 (yynerrs, yyerror_range): For push mode, #define each NAME in this list
1883 to yyps->NAME so it can be used in yypush_parse.
1884 (yypush_parse): Don't omit uses of yynerrs in push mode.
1885
1886 2006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
1887
1888 Fix bug such that the first pushed token's value and location are
1889 sometimes overwritten (sometimes by %initial-action) before being used.
1890 * data/push.c (yypush_parse): Rename arguments yynchar, yynlval, and
1891 yynlloc to yypushed_char, yypushed_val, and yypushed_loc for clarity.
1892 For the first yypush_parse invocation, initialize yychar to YYEMPTY to
1893 more closely mimic the pull parser logic.
1894 Don't copy the pushed token to yychar, yylval, and yylloc until it's
1895 time to read a token, which is after any initialization of yylval and
1896 yylloc.
1897 (gottoken): Rename label to...
1898 (yyread_pushed_token): ... for clarity and to avoid infringing on the
1899 user namespace.
1900
1901 2006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
1902
1903 Rearrange initialization of the parser state variables so that the
1904 skeleton doesn't have to have a copy for pull mode and another for push
1905 mode. This patch also fixes at least a bug such that yylloc was not
1906 initialized (with b4_location_initial_line and
1907 b4_location_initial_column) upon calling yypush_parse. However, that
1908 initialization now overwrites the first token's location;
1909 %initial-action assigning @$ already did the same thing, and both bugs
1910 will be fixed in a later patch.
1911 * data/push.c (b4_yyssa): Remove and convert all uses to just yyssa.
1912 (b4_declare_parser_state_variables): Remove initialization of yytoken,
1913 yyss, yyvs, yyls, and yystacksize.
1914 (yypstate_new): Remove initialization of some yypstate fields: yystate,
1915 yyerrstatus, yytoken, yyss, yyvs, yyls, yystacksize, yyssp, yyvsp, and
1916 yylsp.
1917 (yyssa, yyvsa, yylsa): For push mode, #define each NAME in this list to
1918 yyps->NAME so it can be used in yypush_parse.
1919 (yyparse or yypush_parse): For yypush_parse, don't print the
1920 "Starting parse" diagnostic for invocations after the first.
1921 Add initialization of yytoken, yyss, yyvs, yyls, and yystacksize; for
1922 yypush_parse, only do it for the first invocation.
1923 Allow yystate, yyerrstatus, yyssp, yyvsp, yylsp, and yylloc
1924 initialization to occur in yypush_parse but only on the first
1925 invocation.
1926
1927 2006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
1928
1929 * data/push.c: Add CPP guards around push parser declarations in both
1930 the header and the code file.
1931 In the code file, move the push parser declarations to the same place
1932 they appear in the header file.
1933 Clean up the M4 some, especially the inconsistent underquoting in
1934 some b4_c_function_def and b4_c_function_decl uses.
1935
1936 2006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
1937
1938 Encapsulate the push parser state variables into an M4 macro so the
1939 push skeleton doesn't have to list them again for pull mode's yyparse.
1940 For push mode, remove yypush_parse's local equivalents of these
1941 variables to eliminate unnecessary copying between the two sets at
1942 run-time. This patch also fixes at least a bug related to multiple
1943 %initial-action invocations in push mode.
1944 * data/push.c (b4_declare_parser_variables): Rename to...
1945 (b4_declare_scanner_communication_variables): ... this for clarity and
1946 update both uses.
1947 (b4_declare_yyparse_variables): Remove and move its contents to the one
1948 spot where it was invoked.
1949 (b4_declare_parser_state_variables): New macro containing the parser
1950 state variables required by push mode.
1951 (struct yypstate): Replace all fields but yynew with
1952 b4_declare_parser_state_variables.
1953 (yystate, yyn, yyresult, yyerrstatus, yytoken, yyss, yyssp, yyvs,
1954 yyvsp, yyls, yylsp, yystacksize, yyval, yyloc): For push mode, #define
1955 each NAME in this list to yyps->NAME so it can be used in yypush_parse.
1956 (yyparse or yypush_parse): For yyparse in pull mode, replace local
1957 parser state variable declarations with
1958 b4_declare_parser_state_variables.
1959 Don't initialize parser state variables when calling yypush_parse since
1960 yypstate_new already does that.
1961 Invoke the user's initial action only upon the first yypush_parse
1962 invocation.
1963 Remove all code that copies between the local parser state variables
1964 and the yypstate.
1965
1966 2006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
1967
1968 * data/push.c (union yyalloc): Rename yyss, yyvs, and yyls fields to
1969 prevent a name collision in a future patch where these names will
1970 sometimes be #define'd.
1971 (YYSTACK_RELOCATE): Add an argument to select a union yyalloc field
1972 since it no longer has the same name as the existing argument.
1973 (yyparse or yypush_parse): Update all uses of YYSTACK_RELOCATE.
1974
1975 2006-12-19 Paolo Bonzini <bonzini@gnu.org>
1976 and Joel E. Denny <jdenny@ces.clemson.edu>
1977
1978 * doc/bison.texinfo (Decl Summary): In the %language entry, mention
1979 that the argument is case-insensitive, and there's no `=' here.
1980 For the %skeleton entry, mention that %language is better.
1981 (Bison Options): Likewise for --language and --skeleton. Move the
1982 --skeleton entry so that the `Tuning the parser' section is sorted
1983 alphabetically on long options.
1984 (C++ Bison Interface): Don't use the word skeleton. Don't explain the
1985 %language directive in detail here; cross-reference the %language
1986 documentation instead.
1987 (Calc++ Parser): Use `%require "@value{VERSION}"' rather than
1988 `%require "2.3b"' so that the example is always up-to-date.
1989 (Table of Symbols): Add entries for %language and %skeleton.
1990 * examples/extexi (normalize): Instead of replacing every %require
1991 argument with the current Bison version, just substitute for
1992 `@value{VERSION}'. This guarantees that we're testing what actually
1993 appears in the documentation.
1994 * examples/calc++/Makefile.am ($(calc_extracted)): Use `$(VERSION)'
1995 rather than `@VERSION@'.
1996
1997 2006-12-18 Paul Eggert <eggert@cs.ucla.edu>
1998
1999 * NEWS: Reword the %language news a bit, and put it earlier.
2000
2001 * src/getargs.c (skeleton_arg): Last arg is now location const *.
2002 Rewrite to simplify the logic.
2003 (language_argmatch): Likewise.
2004 (program_name): We now own this var.
2005 * src/getargs.h (struct bison_language): Use char[] rather than
2006 const char *.
2007
2008 * doc/bison.texinfo (Decl Summary, Bison Options): Don't claim
2009 Java is supported.
2010 * src/complain.c (program_name): Remove decl; no longer needed.
2011 * src/main.c (program_name): Remove; now belongs to getargs.
2012
2013 2006-12-18 Paolo Bonzini <bonzini@gnu.org>
2014
2015 * NEWS: Document %language.
2016
2017 * data/Makefile.am (dist_pkgdata_DATA): Add c-skel.m4, c++-skel.m4.
2018
2019 * data/c-skel.m4, data/c++-skel.m4: New files.
2020 * data/glr.c: Complain on push parsers.
2021
2022 * doc/bison.texinfo (C++ Parser Interface): Prefer %language
2023 over %skeleton.
2024 (Decl Summary): Document %language and %skeleton.
2025 (Command line): Document -L.
2026
2027 * examples/extexi: Rewrite %require directive.
2028 * examples/calc++/Makefile.am: Pass VERSION to extexi.
2029
2030 * src/files.c (compute_exts_from_gc): Look in language structure
2031 for .y extension.
2032 (compute_file_name_parts): Check whether .tab should be added.
2033 * src/getargs.c (valid_languages, skeleton_prio, language_prio):
2034 (language, skeleton_arg, language_argmatch): New.
2035 (long_options): Add --language.
2036 (getargs): Use skeleton_arg, add -L/--language.
2037 * src/getargs.h: Include location.h.
2038 (struct bison_language, language, skeleton_arg, language_argmatch): New.
2039 * src/output.c (prepare): Pick default skeleton from struct language.
2040 Don't dispatch C skeletons here.
2041 * src/parse-gram.y (PERCENT_LANGUAGE): New.
2042 (prologue_declaration): Add "%language" rule, use skeleton_arg.
2043 * src/scan-gram.l ("%language"): New rule.
2044
2045 * tests/calc.at: Test %skeleton and %language.
2046 * tests/local.at (AT_SKEL_CC_IF): Look for %language.
2047 (AT_GLR_IF): Look for %skeleton "glr.cc".
2048 (AT_LALR1_CC_IF, AT_GLR_CC_IF): Rewrite.
2049 (AT_YACC_IF): Reject %language.
2050
2051 2006-12-18 Paul Eggert <eggert@cs.ucla.edu>
2052
2053 * src/symtab.h (struct semantic_type): Remove the tag 'semantic_type',
2054 since it wasn't used; only the typedef name 'semantic_type' is needed.
2055 Also, omit trailing white space.
2056
2057 * bootstrap: Sync from coreutils.
2058 (gnulib_extra_files): Add build-aux/announce.gen.
2059 (slurp): Adjust .gitignore files like .cvsignore files.
2060 * build-aux/announce-gen: Remove from CVS, since bootstrap
2061 now creates this.
2062
2063 2006-12-16 Joel E. Denny <jdenny@ces.clemson.edu>
2064
2065 Make %push-parser imply %pure-parser. This fixes several bugs; see
2066 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00148.html>.
2067 * src/parse-gram.y (prologue_declaration): For %push-parser, also set
2068 pure_parser = true.
2069 * data/push.c: Don't bother testing b4_push_if when deciding whether
2070 to expand b4_declare_parser_variables globally.
2071 (yypush_parse): Likewise in here.
2072
2073 * data/push.c (yypush_parse): Add b4_parse_param to arguments.
2074 (yy_reduce_print): Reformat M4 for readability.
2075
2076 2006-12-15 Bob Rossi <bob@brasko.net>
2077 and Joel Denny <jdenny@ces.clemson.edu>
2078
2079 * data/push.c (yypstate): Add typedef, and update all uses of
2080 struct yypstate to just yypstate.
2081 * tests/calc.at (_AT_DATA_CALC_Y): Update here as well.
2082
2083 2006-12-14 Bob Rossi <bob@brasko.net>
2084
2085 * data/push.c (yypush_parse): Declare prototype regardless of
2086 %locations option.
2087
2088 2006-12-14 Bob Rossi <bob@brasko.net>
2089
2090 * data/push.c (yyparse): Remove the prototype and the #define when in
2091 push-parser mode.
2092
2093 2006-12-13 Bob Rossi <bob@brasko.net>
2094
2095 * data/push.c (yypstate_init): Rename to...
2096 (yypstate_new): ... this and use b4_c_function_def.
2097 (yypstate_delete): New.
2098 (yypush_parse): Change parameters yynval and yynlloc to be const.
2099 * tests/calc.at (_AT_DATA_CALC_Y): Use new yypstate_new and
2100 yypstate_delete functions.
2101
2102 2006-12-13 Joel E. Denny <jdenny@ces.clemson.edu>
2103
2104 * configure.ac (AC_PREREQ): Require Autoconf 2.61 because of our
2105 strange test case titles. Reported by Bob Rossi.
2106
2107 2006-12-13 Paul Eggert <eggert@cs.ucla.edu>
2108
2109 * TODO: Add pointer to Sylvain Schmitz's work on static detection
2110 of potential ambiguities in GLR grammers.
2111
2112 2006-12-12 Joel E. Denny <jdenny@ces.clemson.edu>
2113
2114 * tests/testsuite.at (AT_CHECK): When checking if $1 starts with
2115 `bison ', use m4_index instead of m4_substr since chopping up a string
2116 containing M4-special characters causes problems here.
2117
2118 Fix a couple of bugs related to special characters in user-specified
2119 file names, and make it easier for skeletons to compute output file
2120 names with the same file name prefix as Bison-computed output file
2121 names.
2122 * data/glr.cc, data/push.c, data/yacc.c: In @output, use
2123 b4_parser_file_name and b4_spec_defines_file instead of
2124 @output_parser_name@ and @output_header_name@, which are now redundant.
2125 * data/glr.c, data/lalr1.cc: Likewise. Also, in header #include's, use
2126 b4_parser_file_name, b4_spec_defines_file, and the new
2127 @basename(FILENAME@) instead of @output_parser_name@ and
2128 @output_header_name@, which inappropriately escaped the file names as
2129 C string literals.
2130 * src/files.c (all_but_ext): Remove static qualifier.
2131 (compute_output_file_names): Move `free (all_but_ext)' to...
2132 (output_file_names_free): ... here since all_but_ext is needed later.
2133 * src/files.h (all_but_ext): Extern.
2134 * src/muscle_tab.h (MUSCLE_INSERT_STRING_RAW): New macro that does
2135 exactly what MUSCLE_INSERT_STRING used to do.
2136 (MUSCLE_INSERT_STRING): Use MUSCLE_OBSTACK_SGROW so that M4-special
2137 characters are escaped properly.
2138 * src/output.c (prepare): Define muscle file_name_all_but_ext as
2139 all_but_ext.
2140 For pkgdatadir muscle, maintain previous functionality by using
2141 MUSCLE_INSERT_STRING_RAW instead of MUSCLE_INSERT_STRING. The problem
2142 is that b4_pkgdatadir is used inside m4_include in the skeletons, so
2143 digraphs would never be expanded. Hopefully no one has M4-special
2144 characters in his Bison installation path.
2145 * src/scan-skel.l: Don't parse @output_header_name@ and
2146 @output_parser_name@ anymore since they're now redundant.
2147 In @output, use decode_at_digraphs.
2148 Parse a new @basename command that invokes last_component.
2149 (decode_at_digraphs): New.
2150 (BASE_QPUTS): Remove unused.
2151 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): New macro.
2152 (Output file name): New tests.
2153
2154 2006-12-09 Joel E. Denny <jdenny@ces.clemson.edu>
2155
2156 Warn about output files that are generated by the skeletons and that
2157 conflict with other output files.
2158 * data/glr.c: Don't generate the header file here when glr.cc does.
2159 * src/files.c (file_names, file_names_count): New static globals.
2160 (compute_output_file_names): Invoke output_file_name_check for files
2161 not generated by the skeletons and remove existing checks.
2162 (output_file_name_check): New function that warns about conflicting
2163 output file names.
2164 (output_file_names_free): Free file_names.
2165 * src/files.h (output_file_name_check): Declare.
2166 * src/scan-skel.l: Invoke output_file_name_check for files generated by
2167 the skeletons.
2168 * tests/output.at (AT_CHECK_CONFLICTING_OUTPUT): New.
2169 (Conflicting output files): New tests.
2170
2171 2006-12-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2172
2173 * doc/bison.texinfo: Fix a couple of typos.
2174
2175 2006-12-08 Bob Rossi <bob@brasko.net>
2176
2177 * data/push.c: (yypvarsinit, yypvars, struct yypvars, yypushparse):
2178 Rename to...
2179 (yypstate_init, yypstate, struct yypstate, yypush_parse): ... these and
2180 update all uses.
2181 (b4_yyssa, b4_yyerror_range, yypstate_init): Rename pv to yyps.
2182 (yypush_parse): Rename yypvars argument to yyps and remove redundant
2183 local pv.
2184 (yypstate_init, yypush_parse): Declare in Bison-generated header file.
2185 * tests/calc.at (_AT_DATA_CALC_Y): Use newly named functions.
2186
2187 2006-12-07 Bob Rossi <bob@brasko.net>
2188 and Joel Denny <jdenny@ces.clemson.edu>
2189
2190 * data/push.c (yypvarsinit): Change return type from void* to struct
2191 yypvars*. No longer cast to void* on return.
2192 (struct yypvars): Remove yylen since it need not be remembered between
2193 yypushparse invocations.
2194 (yypushparse): Don't copy between yylen and pv->yylen.
2195
2196 2006-12-05 Bob Rossi <bob@brasko.net>
2197
2198 * data/push.c (yychar_set, yylval_set, yylloc_set): Delete.
2199 (yypushparse): Add yynchar, yynlval, yynlloc parameters.
2200 (b4_declare_parser_variables): Do not declare yynerrs for push mode.
2201 (struct yypvars): Remove b4_declare_parser_variables.
2202 (yypvarsinit): Remove init code for removed variables.
2203 (global scope): Do not declare b4_declare_parser_variables if
2204 push or pure mode.
2205 (yypushparse): Add b4_declare_parser_variables.
2206 Init new local variables, and remove init code for removed
2207 yypvars variables.
2208 (yyparse): Delete.
2209 * tests/calc.at (_AT_DATA_CALC_Y): Call yypushparse for push mode
2210 and yyparse for other modes.
2211 (AT_CHECK_CALC_LALR): Added '%skeleton "push.c"' for push tests.
2212 * tests/local.at (AT_PUSH_IF, AT_PURE_OR_PUSH_IF): Added.
2213 (AT_YYERROR_SEES_LOC_IF): push-parser makes this false.
2214 (AT_PURE_LEX_IF): True if pure or push parser.
2215
2216 2006-12-05 Joel E. Denny <jdenny@ces.clemson.edu>
2217
2218 Document Yacc prologue alternatives and default %destructor's and
2219 %printer's as experimental. Don't mention Java yet. Discussed at
2220 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00002.html>.
2221 * NEWS (2.3a+): Say they're experimental. Remove any mention of Java.
2222 (2.3a): Annotate this entry to say the old forms of these features were
2223 also experimental.
2224 * doc/bison.texinfo (Prologue Alternatives, Freeing Discarded Symbols,
2225 Table of Symbols): Say they're experimental. Comment out any mention
2226 of Java (we'll want this back eventually).
2227
2228 2006-12-01 Joel E. Denny <jdenny@ces.clemson.edu>
2229
2230 Support a file name argument to %defines. Deprecate `=' in
2231 %file-prefix, %name-prefix, and %output. Discussed at
2232 <http://lists.gnu.org/archive/html/help-bison/2006-09/msg00001.html>.
2233 * NEWS (2.3a+): Mention.
2234 * doc/bison.texinfo (Decl Summary, Table of Symbols): Add entry for new
2235 form of %defines, and remove `=' from entries for %file-prefix,
2236 %name-prefix, and %output.
2237 * src/parse-gram.y (prologue_declaration): Implement.
2238 * tests/calc.at (Simple LALR Calculator, Simple GLR Calculator, Simple
2239 LALR1 C++ Calculator, Simple GLR C++ Calculator): Remove the `=' from
2240 all but one occurrence of %name-prefix.
2241 * tests/headers.at (export YYLTYPE): Remove the `=' from %name-prefix.
2242 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Likewise.
2243 * tests/output.at (AT_CHECK_OUTPUT): Remove the `=' from all but one
2244 occurrence of each of %file-prefix and %output. Add check for %defines
2245 with argument.
2246 * tests/reduce.at (Useless Terminals, Useless Nonterminals,
2247 Useless Rules, Reduced Automaton, Underivable Rules, Empty Language):
2248 Remove the `=' from %output.
2249
2250 2006-11-21 Joel E. Denny <jdenny@ces.clemson.edu>
2251
2252 Don't escape $ in test case titles since Autoconf 2.61 now does that
2253 correctly.
2254 * tests/actions.at (Default %printer and %destructor are not for error
2255 or $undefined): Here.
2256 (Default %printer and %destructor are not for $accept): Here.
2257 * tests/input.at (Invalid $n and @n): Here.
2258
2259 2006-11-20 Joel E. Denny <jdenny@ces.clemson.edu>
2260
2261 Rename <!> to <>. Discussed starting at
2262 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00039.html>.
2263 * NEWS (2.3a+): Update.
2264 * doc/bison.texinfo (Freeing Discarded Symbols, Table of Symbols):
2265 Update.
2266 * src/parse-gram.y (TYPE_TAG_NONE, generic_symlist_item): Implement.
2267 * src/scan-gram.l (INITIAL): Implement.
2268 * src/symlist.c (symbol_list_default_tagless_new): Update comment.
2269 * src/symlist.h (symbol_list, symbol_list_default_tagless_new): Update
2270 comment.
2271 * tests/actions.at (Default tagless %printer and %destructor,
2272 Default tagged and per-type %printer and %destructor,
2273 Default %printer and %destructor are not for error or $undefined,
2274 Default %printer and %destructor are not for $accept,
2275 Default %printer and %destructor for mid-rule values): Update.
2276 * tests/input.at (Default %printer and %destructor redeclared,
2277 Unused values with default %destructor): Update.
2278
2279 2006-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
2280
2281 Don't let %prec take a nonterminal.
2282 * src/reader.c (grammar_current_rule_prec_set): Make the %prec symbol a
2283 token.
2284 * tests/input.at (%prec takes a token): New test checking that %prec
2285 won't take a nonterminal.
2286
2287 2006-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
2288
2289 * tests/testsuite.at (AT_CHECK): Don't miss an exit value of 0 because
2290 it was double-quoted.
2291 * src/Makefile.am (YACC): Use --warnings=all,error so that Bison's own
2292 grammar is maintained with Bison's highest standards.
2293 * src/getargs.c: Fix some typos in Doxygen comments.
2294
2295 2006-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
2296
2297 Fix memory leaks in scanners generated by at least Flex 2.5.9 and
2298 later. Reported by Paul Eggert in
2299 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00014.html>.
2300 * src/flex-scanner.h (yylex_destroy): Define for Flex before 2.5.9.
2301 * src/scan-code.l (translate_action): Don't bother invoking
2302 yy_delete_buffer (YY_CURRENT_BUFFER) before creating the first buffer.
2303 (code_scanner_free): Instead of invoking
2304 yy_delete_buffer (YY_CURRENT_BUFFER) directly, invoke yylex_destroy,
2305 which frees more.
2306 * src/scan-gram.l (gram_scanner_free): Likewise.
2307 * src/scan-skel.l (scan_skel): Likewise.
2308
2309 2006-11-09 Joel E. Denny <jdenny@ces.clemson.edu>
2310
2311 * src/files.c (tr): Change return type to void.
2312 * src/muscle_tab.c (muscle_insert): Free storage in case muscle_grow
2313 has been called previously for the same key.
2314 (muscle_find): Return storage instead of value so that
2315 --enable-gcc-warnings doesn't produce warnings that the return discards
2316 const. aver that the value and storage are the same since storage
2317 could potentially be NULL when value is not.
2318 * tests/testsuite.at (AT_CHECK): Treat an unspecified exit value the
2319 same as 0.
2320
2321 2006-11-08 Paul Eggert <eggert@cs.ucla.edu>
2322
2323 * bootstrap.conf (excluded_files): Exclude m4/codeset.m4 (undoing
2324 the earlier change today), m4/intl.m4, m4/intldir.m4. This gives
2325 us a slightly cleaner distribution, and also works.
2326 * m4/.cvsignore: Add inline.m4, wint_t.m4 to accommodate recent
2327 gnulib changes.
2328
2329 2006-11-08 Joel E. Denny <jdenny@ces.clemson.edu>
2330 and Paul Eggert <eggert@cs.ucla.edu>
2331
2332 Don't let Bison leak memory except when it complains.
2333 * src/files.h (parser_file_name, spec_verbose_file, spec_graph_file):
2334 (spec_defines_file, dir_prefix): Now char *, not const char *,
2335 since they are freed.
2336 * src/files.c: Likewise.
2337 (all_but_ext, all_but_tab_ext, src_extension, header_extension):
2338 Likewise.
2339 (tr): Now operates in-place. All uses changed.
2340 (compute_exts_from_gf, compute_exts_from_src): Don't leak temporary
2341 values.
2342 (compute_file_name_parts, compute_output_file_names): Don't store
2343 read-only data in variables that will be freed.
2344 (compute_output_file_names): Free all_but_ext, all_but_tab_ext,
2345 src_extension, and header_extension.
2346 (output_file_names_free): New public function to free
2347 spec_verbose_file, spec_graph_file, spec_defines_file,
2348 parser_file_name, and dir_prefix.
2349 * src/getargs.c (getargs): Don't store read-only data in variables that
2350 will be freed.
2351 * src/main.c (main): Invoke output_file_names_free, code_scanner_free
2352 (which previously existed but was unused), and quotearg_free.
2353 * src/muscle_tab.h (muscle_insert): value arg is now a `char const *'.
2354 * src/muscle_tab.c: Likewise.
2355 (muscle_entry): Make the value char const *,
2356 and add a new storage member that is char * and can be freed.
2357 (muscle_entry_free): New private function.
2358 (muscle_init): Use it instead of free.
2359 (muscle_insert, muscle_grow): Update and use new storage member.
2360 (muscle_code_grow): Free the string passed to muscle_grow
2361 since it's not needed anymore.
2362 * src/parse-gram.y (%union): Make `chars' member a `char const *', and
2363 add a new `char *code' member.
2364 ("{...}"): Declare semantic type as code.
2365 * src/scan-code.h (translate_rule_action):
2366 (translate_symbol_action, translate_code, translate_action): Return
2367 `char const *' rather than `char *' since external code should not free
2368 these strings.
2369 * src/scan-code.l: Likewise.
2370 * src/scan-gram.l (<SC_BRACED_CODE>): Use val->code for BRACED_CODE,
2371 which is "{...}" in the parser.
2372 * tests/Makefile.am (maintainer-check-valgrind): Set
2373 VALGRIND_OPTS='--leak-check=full --show-reacheable=yes' before invoking
2374 Valgrind.
2375 * tests/calc.at (_AT_DATA_CALC_Y): fclose the FILE* so Valgrind doesn't
2376 complain.
2377 * tests/testsuite.at (AT_CHECK): Redefine so that running Bison and
2378 expecting a non-zero exit status sets --leak-check=summary and
2379 --show-reachable=no for Valgrind. Bison unabashedly leaks memory in
2380 this case, and we don't want to hear about it.
2381
2382 2006-11-08 Paul Eggert <eggert@cs.ucla.edu>
2383
2384 * bootstrap (runtime-po/Makevars): Derive from po/Makevars
2385 instead of from the template, to simplify configuration a bit.
2386 * bootstrap.conf (excluded_files): Don't exclude m4/codeset.m4
2387 and m4/wint_t.m4, as they are needed with the latest gnulib.
2388
2389 2006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
2390
2391 Disable unset/unused mid-rule value warnings by default, and recognize
2392 --warnings=midrule-values to enable them. Discussed starting at
2393 <http://lists.gnu.org/archive/html/help-bison/2006-10/msg00030.html>.
2394 * NEWS (2.3a+): Mention.
2395 * src/getargs.c, src/getargs.h (warnings_args, warnings_types, enum
2396 warnings): Add entry for midrule-values subargument.
2397 * src/reader.c (symbol_should_be_used): Don't return true just because
2398 the value is a set/used mid-rule value unless
2399 --warnings=midrule-values was specified.
2400 * tests/input.at (Unused values, Unused values before symbol
2401 declarations): Run tests with and without --warnings=midrule-values.
2402
2403 * src/reader.c (check_and_convert_grammar): Use symbol_list_free rather
2404 than LIST_FREE directly.
2405
2406 2006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
2407
2408 Finish implementing --warnings=error, which should not be implied by
2409 --warnings=all (or by its synonyms -W and --warnings without
2410 subarguments).
2411 * src/complain.c (set_warning_issued): New function to report that
2412 warnings are being treated as errors and to record an error if so.
2413 Invoke...
2414 (warn_at, warn): ... here.
2415 * src/getargs.c (warnings_args, warnings_types): Reorder so that
2416 "error - warnings are errors" does not appear above "all - all of the
2417 above".
2418 (getargs): For -W and --warnings without subarguments, don't let
2419 FLAGS_ARGMATCH set warnings_error in warnings_flag.
2420 * src/getargs.h (enum warnings): Unset warnings_error in warnings_all.
2421
2422 2006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
2423
2424 * src/getargs.c (flags_argmatch): Don't cause segmentation fault for
2425 empty subargument list. For example: `bison --warnings= parser.y'.
2426
2427 2006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
2428
2429 * data/push.c, data/yacc.c: Make sure there's a newline at the end of
2430 the parser header file so that gcc doesn't warn.
2431
2432 2006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
2433
2434 Split the default %destructor/%printer into two kinds: <*> and <!>.
2435 Discussed starting at
2436 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00060.html>.
2437 * NEWS (2.3a+): Mention.
2438 * doc/bison.texinfo (Freeing Discarded Symbols): Document this and the
2439 previous change today related to mid-rules.
2440 (Table of Symbols): Remove %symbol-default and add <*> and <!>.
2441 * src/parse-gram.y (PERCENT_SYMBOL_DEFAULT): Remove.
2442 (TYPE_TAG_ANY): Add as <*>.
2443 (TYPE_TAG_NONE): Add as <!>.
2444 (generic_symlist_item): Remove RHS for %symbol-default and add RHS's
2445 for <*> and <!>.
2446 * src/scan-gram.l (PERCENT_SYMBOL_DEFAULT): Remove.
2447 (TYPE_TAG_ANY, TYPE_TAG_NONE): Add.
2448 * src/symlist.c (symbol_list_default_new): Split into tagged and
2449 tagless versions.
2450 (symbol_list_destructor_set, symbol_list_printer_set): Split
2451 SYMLIST_DEFAULT case into SYMLIST_DEFAULT_TAGGED and
2452 SYMLIST_DEFAULT_TAGLESS.
2453 * src/symlist.h: Update symbol_list_default*_new prototypes.
2454 (symbol_list.content_type): Split enum value SYMLIST_DEFAULT into
2455 SYMLIST_DEFAULT_TAGGED and SYMLIST_DEFAULT_TAGLESS.
2456 * src/symtab.c (default_destructor, default_destructor_location,
2457 default_printer, default_printer_location): Split each into tagged and
2458 tagless versions.
2459 (symbol_destructor_get, symbol_destructor_location_get,
2460 symbol_printer_get, symbol_printer_location_get): Implement tagged
2461 default and tagless default cases.
2462 (default_destructor_set, default_printer_set): Split each into tagged
2463 and tagless versions.
2464 * src/symtab.h: Update prototypes.
2465 * tests/actions.at (Default %printer and %destructor): Rename to...
2466 (Default tagless %printer and %destructor): ... this, and extend.
2467 (Per-type %printer and %destructor): Rename to...
2468 (Default tagged and per-type %printer and %destructor): ... this, and
2469 extend.
2470 (Default %printer and %destructor for user-defined end token): Extend.
2471 (Default %printer and %destructor are not for error or $undefined):
2472 Update.
2473 (Default %printer and %destructor are not for $accept): Update.
2474 (Default %printer and %destructor for mid-rule values): Extend.
2475 * tests/input.at (Default %printer and %destructor redeclared): Extend.
2476 (Unused values with default %destructor): Extend.
2477
2478 2006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
2479
2480 Don't apply the default %destructor/%printer to an unreferenced midrule
2481 value. Mentioned at
2482 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00104.html>.
2483 * src/symtab.c (dummy_symbol_get): Name all dummy symbols initially
2484 like $@n instead of just @n so that the default %destructor/%printer
2485 logic doesn't see them as user-defined symbols.
2486 (symbol_is_dummy): Check for both forms of the name.
2487 * src/reader.c (packgram): Remove the `$' from each midrule symbol
2488 name for which the midrule value is referenced in any action.
2489 * tests/actions.at (Default %printer and %destructor for mid-rule
2490 values): New test.
2491 * tests/regression.at (Rule Line Numbers, Web2c Report): Update output
2492 for change to dummy symbol names.
2493
2494 2006-10-20 Joel E. Denny <jdenny@ces.clemson.edu>
2495
2496 Warn about unset midrule $$ if the corresponding $n is used.
2497 * src/reader.c (symbol_should_be_used): Check midrule parent rule for
2498 $n usage.
2499 (packgram): Before invoking grammar_rule_check on any rule, make sure
2500 all actions have already been scanned in order to set `used' flags.
2501 Otherwise, checking that a midrule's $$ is set will not always work
2502 properly because the midrule check must forward-reference the midrule's
2503 parent rule.
2504 * tests/input.at (AT_CHECK_UNUSED_VALUES): Extend to check the new
2505 warning.
2506
2507 2006-10-20 Joel E. Denny <jdenny@ces.clemson.edu>
2508
2509 More improvements to the documentation of the prologue alternatives:
2510 * NEWS (2.3a+): Mention the new `Prologue Alternatives' section in the
2511 Bison manual.
2512 * doc/bison.texinfo (Prologue Alternatives): Correct some errors. Add
2513 some text to clarify the relative importance of the new directives and
2514 to show how these directives may be viewed as code labels.
2515
2516 2006-10-16 Joel E. Denny <jdenny@ces.clemson.edu>
2517
2518 Similar to the recently removed %before-header, add %code-top as the
2519 alternative to the pre-prologue. Mentioned at
2520 <http://lists.gnu.org/archive/html/bison-patches/2006-10/msg00063.html>.
2521 Also, let the prologue alternatives appear in the grammar section.
2522 * src/parse-gram.y (PERCENT_CODE_TOP): New token.
2523 (prologue_declaration): Move the existing prologue alternatives to...
2524 (grammar_declaration): ... here and add %code-top.
2525 * src/scan-gram.l (PERCENT_CODE_TOP): New token.
2526
2527 Clean up and extend documentation for the prologue alternatives.
2528 * NEWS (2.3a+): Describe prologue alternatives.
2529 * doc/bison.texinfo (Prologue): Move discussion of prologue
2530 alternatives to...
2531 (Prologue Alternatives): ... this new section, and extend it to discuss
2532 all 4 directives in detail.
2533 (Table of Symbols): Clean up discussion of prologue alternatives and
2534 add %code-top.
2535
2536 2006-10-16 Juan Manuel Guerrero <juan.guerrero@gmx.de>
2537
2538 DJGPP specific issues.
2539
2540 * djgpp/config.bat: config.hin has been moved to lib. Adjust
2541 config.bat accordingly.
2542 * djgpp/config.sed: Adjust config.sed for the use of autoconf 2.60.
2543 * djgpp/config.site: Likewise.
2544
2545 2006-10-16 Paolo Bonzini <bonzini@gnu.org>
2546
2547 Replace %*-header with %provides, %requires, %code. See discussion at
2548 http://lists.gnu.org/archive/html/bison-patches/2006-10/msg00002.html
2549
2550 * data/bison.m4 (b4_user_requires, b4_user_provides): New.
2551 (b4_user_start_header): Remove.
2552 * data/glr.c: Use new macros instead of b4_*start_header
2553 and b4_*end_header.
2554 * data/glr.cc: Likewise.
2555 * data/lalr1.cc: Likewise.
2556 * data/push.c: Likewise.
2557 * data/yacc.c: Likewise.
2558
2559 * doc/bison.texinfo: Remove %before-header, rename
2560 %{start,end,after}-header to %requires, %provides, %code.
2561
2562 * src/parse-gram.y: Likewise (also rename token names accordingly).
2563 * src/scan-gram.l: Likewise.
2564 * tests/actions.at: Likewise.
2565
2566 2006-10-14 Paul Eggert <eggert@cs.ucla.edu>
2567
2568 * lib/Makefile.am (AM_CFLAGS): Remove $(WERROR_CFLAGS).
2569 Problem reported by Joel E. Denny.
2570
2571 2006-10-14 Jim Meyering <jim@meyering.net>
2572
2573 (Sync from coreutils.)
2574 Work also when the working directory (with e.g. coreutils sources)
2575 is version controlled with git, rather than CVS.
2576 * bootstrap (CVS_only_file): Test for the existence of README-cvs,
2577 rather than CVS.
2578 In messages and comments, say e.g., "checked-out sources",
2579 rather than "CVS sources".
2580 (version_controlled_file): New function. Work for git as well as
2581 for CVS. Don't use grep's -q option.
2582 (slurp): Call it here, in place of CVS-specific code.
2583
2584 2006-10-14 Joel E. Denny <jdenny@ces.clemson.edu>
2585
2586 Fix testsuite for ./configure --enable-gcc-warnings:
2587 * configure.ac (gcc-warnings): Move -Wall before -Wno-sign-compare.
2588 Otherwise, gcc 4.1.0 (at least) warns about sign comparisons in
2589 __AT_CHECK_PRINTER_AND_DESTRUCTOR in tests/actions.at.
2590 * test/input.at (Torturing the Scanner): #include <stdlib.h> for abort.
2591 * test/regression.at (Diagnostic that expects two alternatives):
2592 Likewise.
2593
2594 2006-10-12 Paul Eggert <eggert@cs.ucla.edu>
2595
2596 * bootstrap.conf (gnulib_modules): Add config-h.
2597 * djgpp/subpipe.c: Include <config.h> unconditionally; don't
2598 worry about HAVE_CONFIG_H.
2599 * lib/abitset.c: Likewise.
2600 * lib/bitset.c: Likewise.
2601 * lib/bitset_stats.c: Likewise.
2602 * lib/bitsetv-print.c: Likewise.
2603 * lib/bitsetv.c: Likewise.
2604 * lib/ebitset.c: Likewise.
2605 * lib/get-errno.c: Likewise.
2606 * lib/lbitset.c: Likewise.
2607 * lib/subpipe.c: Likewise.
2608 * lib/timevar.c: Likewise.
2609 * lib/vbitset.c: Likewise.
2610 * lib/bitset.c: Include "bitset.h" first, to test interface.
2611 * lib/bitset_stats.c: Include "bitset_stats.h" first.
2612 * lib/bitsetv-print.c: Include "bitsetv-print.h" first.
2613 * lib/bitsetv.c: Include "bitsetv.h" first.
2614 * lib/get-errno.c: Include "get-errno.h" first.
2615 * m4/.cvsignore: Add config-h.m4.
2616 * tests/actions.at (Default %printer and %destructor for ...):
2617 Adjust expected line numbers in output to reflect removal of #if
2618 HAVE_CONFIG_H lines.
2619 * tests/glr-regression.at (Missed %merge type warnings when ...):
2620 Likewise.
2621 * tests/regression.at (Braced code in declaration in rules section):
2622 Likewise.
2623 * tests/atlocal.in (CPPFLAGS): Don't define HAVE_CONFIG_H.
2624 * tests/local.at (AT_DATA_GRAMMAR_PROLOGUE):
2625 Include <config.h> unconditionally.
2626
2627 * bootstrap: Sync from coreutils, as follows:
2628
2629 2006-10-11 Paul Eggert <eggert@cs.ucla.edu>
2630
2631 * bootstrap (symlink_to_gnulib): Fix bug: the dot_dots shell
2632 variable was sometimes used without being initialized. This
2633 messed up the installation of the INSTALL file in some cases.
2634
2635 2006-10-09 Paul Eggert <eggert@cs.ucla.edu>
2636
2637 * bootstrap (usage, main program, symlink_to_gnulib): Add option
2638 --copy. Inspired by a suggestion from Bruno Haible.
2639
2640 2006-10-03 Jim Meyering <jim@meyering.net>
2641
2642 * bootstrap: Undo last change to this file, since now gnulib-tool
2643 sticks with the automake default in generating dependencies.
2644
2645 2006-10-12 Paul Eggert <eggert@cs.ucla.edu>
2646
2647 * configure.ac: Use AC_PROG_CC_STDC; this is more modern than
2648 the old AC_PROG_CC / AM_PROG_CC_STDC combination.
2649
2650 * doc/bison.1: Add copyright notice.
2651
2652 * data/glr.c: Don't include <stdarg.h>; not used.
2653
2654 * NEWS: The -g and --graph options now output graphs in Graphviz
2655 DOT format, not VCG format.
2656 * doc/bison.1: Likewise.
2657 * doc/bison.texinfo (Understanding, Bison Options): Likewise.
2658 * THANKS: Add Satya Kiran Popuri, who proposed the initial version
2659 of this change in
2660 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00158.html>.
2661 * TODO: Remove Graphviz entry.
2662 * src/Makefile.am (bison_SOURCES): Add graphviz.c and graphviz.h;
2663 remove vcg.c, vcg.h, vcg_defaults.h.
2664 * src/vcg.c, src/vcg.h, src/vcg_defaults.h: Remove.
2665 * src/graphviz.c, src/graphviz.h: New files.
2666 * src/files.c (compute_output_file_names): Output .dot, not .vcg.
2667 * src/files.h: Make comment more generic.
2668 * src/main.c (main): Likewise.
2669 * src/print_graph.h: Likewise.
2670 * src/getargs.c (usage): Make usage description more generic.
2671 * src/print_graph.c: Include graphviz.h rather than vcg.h.
2672 (static_graph, fgraph): Remove. All uses changed to pass
2673 arguments instead of sharing a static var.
2674 (print_core, print_actions, print_state, print_graph):
2675 Output graphviz format rather than VCG format.
2676 * tests/.cvsignore: Remove *.vcg; add *.dot.
2677 * tests/output.at: Expect *.dot files, not *.vcg files.
2678
2679 * data/Makefile.am (dist_pkgdata_DATA): Add bison.m4; this
2680 accommodates the 2006-10-08 change.
2681
2682 2006-10-11 Bob Rossi <bob@brasko.net>
2683
2684 * data/push.c (yypushparse, yypvarsinit, yypvars): Wrap in b4_push_if.
2685 (b4_yyssa, b4_yyerror_range): New macros.
2686 (struct yypvars): Remove yyssa_ptr and yyerror_range_ptr fields.
2687 (yypvarsinit): Remove init of removed fields.
2688 (yypushparse): Remove use of removed fields; use new macros instead.
2689
2690 2006-10-11 Paul Eggert <eggert@cs.ucla.edu>
2691
2692 * data/push.c (yypushparse): Fix memory leak if yymsg is malloced
2693 in a push parser. Reindent slightly to match yacc.c better.
2694
2695 2006-10-11 Bob Rossi <bob@brasko.net>
2696
2697 * data/push.c (struct yypvars): Remove yymsgbuf, yymsgbuf_ptr, yymsg,
2698 yymsg_alloc fields.
2699 (yypvarsinit, yypushparse): Remove init of removed fields.
2700 (yypushparse): Use yymsgbuf instead of yymsgbuf_ptr.
2701
2702 2006-10-09 Paul Eggert <eggert@cs.ucla.edu>
2703
2704 * THANKS: Add Paolo Bonzini and Bob Rossi.
2705
2706 2006-10-08 Paolo Bonzini <bonzini@gnu.org>
2707
2708 * data/c.m4 (b4_copyright, b4_epilogue, b4_location_initial_column,
2709 b4_location_initial_line, p4_parse_param, b4_ints_in, b4_flag_if,
2710 b4_define_flag_if and uses, b4_basename, b4_syncline, b4_user_code,
2711 b4_define_user_cde and uses): Remove.
2712 (b4_comment, b4_prefix, b4_sync_start): New.
2713 * data/bison.m4: New file, with most of the content removed from c.m4.
2714 * src/muscle_tab.h: Use "do {...} while(0)" throughout.
2715 * src/output.c (output_skeleton): Pass bison.m4.
2716 (prepare): Pass glr_flag and nondeterministic_flag. Pass prefix
2717 only if specified.
2718
2719 2006-10-05 Paul Eggert <eggert@cs.ucla.edu>
2720
2721 Fix test failure reported by Tom Lane in
2722 <http://lists.gnu.org/archive/html/bug-bison/2006-10/msg00000.html>
2723 and try to make such failures easier to catch in the future.
2724 * data/glr.c (YYTRANSLATE): Don't check for nonpositive arg;
2725 that's now the caller's responsibility.
2726 (yyprocessOneStack, yyrecoverSyntaxError, yyparse):
2727 Set yychar = YYEOF if it's negative.
2728 * tests/actions.at (yylex): Abort if asked to read past EOF.
2729 * tests/conflicts.at (yylex): Likewise.
2730 * tests/cxx-type.at (yylex): Likewise.
2731 * tests/glr-regression.at (yylex): Likewise.
2732 * tests/input.at (yylex): Likewise.
2733 * tests/regression.at (yylex): Likewise.
2734 * tests/torture.at (yylex): Likewise.
2735
2736 2006-10-01 Paul Eggert <eggert@cs.ucla.edu>
2737
2738 Fix problems with translating English-language diagnostics.
2739 * bootstrap: Fix bug introduced in recent bootstrap changes, with
2740 respect to bison-runtime pot generation. The YY_ stuff
2741 wasn't being captured.
2742 * bootstrap.conf (XGETTEXT_OPTIONS_RUNTIME): New var.
2743 * po/POTFILES.in: Add src/location.c, src/scan-code.l.
2744 * runtime-po/POTFILES.in: Add data/push.c.
2745
2746 2006-09-29 Paul Eggert <eggert@cs.ucla.edu>
2747
2748 Merge bootstrap changes from coreutils.
2749
2750 2006-09-28 Jim Meyering <jim@meyering.net>
2751
2752 Automatically generated dependencies are important even
2753 when all of the sources in a directory come from gnulib.
2754 * bootstrap (gnulib_tool): Remove the "no-dependencies" automake
2755 option that gnulib-tool adds to what becomes our lib/gnulib.mk.
2756
2757 2006-09-23 Jim Meyering <jim@meyering.net>
2758
2759 * bootstrap (gnulib_tool_options): Add "--local-dir gl".
2760
2761 2006-09-20 Paul Eggert <eggert@cs.ucla.edu>
2762
2763 * bootstrap: Add support for --force.
2764 (usage): New function. Describe usage less tersely.
2765 (CVS_only_file): New var.
2766
2767 2006-09-21 Paul Eggert <eggert@cs.ucla.edu>
2768
2769 * data/push.c (YYPUSH_MORE): Make it an enum instead.
2770 (yypushparse): Use YYPUSH_MORE instead of the mystery constant.
2771 Adjust white space and comments to match GNU style better.
2772
2773 2006-09-20 Bob Rossi <bob@brasko.net>
2774
2775 * data/push.c (yyresult_get): Remove function.
2776 (YYPUSH_MORE): Add #define.
2777 (yypushparse): Modify return value.
2778
2779 2006-09-20 Paul Eggert <eggert@cs.ucla.edu>
2780
2781 * stamp-h.in: Remove; no longer needed.
2782 * .cvsignore: Replace autom4te.cache and config.cache with *.cache.
2783 Remove config.h, config.hin, intl (no longer created).
2784 * lib/.cvsignore: Add config.h, config.hin, configmake.h, inttypes.h,
2785 stamp-h1.
2786
2787 Sync bootstrap from coreutils, as follows:
2788
2789 2006-09-18 Paul Eggert <eggert@cs.ucla.edu>
2790
2791 * bootstrap (symlink_to_gnulib): New function.
2792 (cp_mark_as_generated): Use it, to prefer symlinks-to-gnulib
2793 to copies-of-gnulib.
2794 (cp_mark_as_generated, slurp, gnulib_files):
2795 Avoid making a copy if it's the same as the old version.
2796 (gnulib_files): Add support for this variable (used by Bison).
2797
2798 2006-09-20 Paul Eggert <eggert@cs.ucla.edu>
2799
2800 * src/getargs.c (usage): Rework to use conventions similar to
2801 coreutils, to make translation a bit easier and the code a bit
2802 smaller. Problem reported by Tim Van Holder.
2803
2804 2006-09-15 Paul Eggert <eggert@cs.ucla.edu>
2805
2806 Use some of gnulib's new modules, taken from coreutils.
2807
2808 * bootstrap: Sync from coreutils, except add support for gnulib_files.
2809 * bootstrap.conf: New file.
2810 (gnulib_modules): Add configmake, inttypes, unistd.
2811 (XGETTEXT_OPTIONS): Add complain, complain_at,
2812 fatal, fatal_at, warn, warn_at, unexpected_end.
2813 * configure.ac (AC_CONFIG_HEADERS): config.h is now in lib, not here.
2814 (gl_USE_SYSTEM_EXTENSIONS): Remove; gl_EARLY now does this.
2815 (gl_EARLY): Add.
2816 (AM_STDBOOL_H): Remove; gl_INIT now dows this.
2817 (gl_INIT): Add
2818 (GNULIB_AUTOCONF_SNIPPET): Remove.
2819 (AM_GNU_GETTEXT): Add; require formatstring macros since that's
2820 the pickiest.
2821 * lib/.cvsignore: Add inttypes_.h.
2822 * lib/Makefile.am: Include gnulib.mk first so we can append to it.
2823 (AM_CFLAGS): Add WERROR_CFLAGS, to be more like coreutils.
2824 (BUILT_SOURCES, EXTRA_DIST, MOSTLYCLEANFILES): Remove
2825 no-longer-necessary initializations.
2826 (lib_SOURCES): Remove, replacing by libbison_a_SOURCES.
2827 * lib/subpipe.c: Include <unistd.h> unconditionally, now that we
2828 use the unistd module.
2829 * src/system.h: Likewise.
2830 * m4/.cvsignore: Remove *_gl.m4, gnulib.m4, inttypes_h.m4, uintmax_t.m4,
2831 ulonglong.m4. Add gettext.m4, gnulib-cache.m4, gnulib-comp.m4,
2832 gnulib-tool.m4, inttypes-h.m4, inttypes-pri.m4, inttypes.m4.
2833 * src/Makefile.am (DEFS): Remove, since configmake does this for us.
2834 (AM_CPPFLAGS): Remove -I../lib, since Automake does that for us.
2835 * src/system.h: Include inttypes.h unconditionally, now that we
2836 use the inttypes module. Don't bother to include stdint.h, since
2837 inttypes.h now does that for us.
2838 (LOCALEDIR): Remove, now that we use the configmake module.
2839 * src/getargs.c: Include configmake.h.
2840 * src/main.c: Likewise.
2841 * src/output.c: Likewise.
2842 * tests/atlocal.in (CPPFLAGS): Include from $abs_top_builddir/lib,
2843 not from $abs_top_builddir, since config.h moved.
2844
2845
2846 Port to GCC 2.95. First two problems reported by Michael Deutschmann in
2847 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00018.html>.
2848
2849 * src/parse-gram.y (symbol_declaration): Don't put statements
2850 before declarations; it's not portable to C89.
2851 * src/scan-code.l (handle_action_at): Likewise.
2852
2853 * src/scan-code.l: Always initialize braces_level; the old code
2854 left it uninitialized and therefore had undefined behavior.
2855
2856 Don't attempt to redefine 'assert', since it runs afoul of
2857 systems where standard headers (mistakenly) include <assert.h>.
2858 Instead, define and use our own alternative, called 'aver'.
2859 * src/reader.c: Don't include assert.h, since we no longer
2860 use assert.
2861 * src/scan-code.l: Likewise.
2862 * src/system.h (assert): Remove, replacing with....
2863 (aver): New function, taking a bool arg. All uses changed.
2864 * src/tables.c (pack_vector): Ensure that aver arg is bool,
2865 not merely an integer.
2866
2867 2006-09-15 Bob Rossi <bob@brasko.net>
2868
2869 * data/Makefile.am (dist_pkgdata_DATA): Add push.c.
2870 * data/c.m4 (YYPUSH): New.
2871 (b4_push_if): New macro. Use it instead of #ifdef YYPUSH.
2872 * src/getargs.c (push_parser): New var.
2873 * src/getargs.h (push_parser): New declaration.
2874 * src/output.c (prepare): Add macro insertion of `push_flag'.
2875 * src/parse-gram.y (PERCENT_PUSH_PARSER): New token.
2876 (prologue_declaration): Parse %push-parser.
2877 * src/scan-gram.l: Scan new PERCENT_PUSH_PARSER token.
2878 * tests/calc.at (_AT_CHECK_CALC_ERROR): Add "Return" and "Now" to
2879 list of removed lines from the traces observed.
2880 (AT_CHECK_CALC_LALR): Added push parser tests.
2881
2882 2006-09-13 Paul Eggert <eggert@cs.ucla.edu>
2883
2884 * NEWS: Version 2.3a.
2885 * configure.ac (AC_INIT): Likewise.
2886
2887 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Remove
2888 "#define YYSTYPE int" that caused "make maintainer-check" to fail
2889 due to header ordering dependencies. I don't know why the #define
2890 was there.
2891
2892 Fix glr.cc and lalr1.cc's use of YYDEBUG so that there's zero
2893 runtime cost when YYDEBUG is not defined, and so that some tests
2894 that used to fail now work. Problem and initial suggestion by
2895 Paolo Bonzini.
2896 * data/c++.m4 (b4_parse_param_cons): Omit leading ','.
2897 * data/glr.cc (b4_parser_class_name):
2898 Initialize yycdebug_ only if YYDEBUG. Also, initialize yydebug_.
2899 (debug_level, set_debug_level): Affect yydebug_, not ::yydebug.
2900 (yydebug_) [YYDEBUG]: New member.
2901 (yycdebug_): Now defined only if YYDEBUG.
2902 * data/lalr1.cc (yydebug_, yycdebug_): Now defined only if YYDEBUG.
2903 (YYCDEBUG) [!YYDEBUG]: Don't use yydebug_ and yycdebug_.
2904 (b4_parser_class_name): Initialize yydebug_ and yycdebug_ only
2905 if YYYDEBUG.
2906 (debug_stream, set_debug_stream, debug_level, set_debug_level):
2907 Define only if YYDEBUG.
2908 * tests/calc.at (_AT_DATA_CALC_Y) [!YYDEBUG]: Omit call to
2909 set_debug_level.
2910 * tests/regression.at (_AT_DATA_DANCER_Y) [!YYDEBUG]: Likewise.
2911 * tests/calc.at (AT_CHECK_CALC_GLR_CC): Uncomment calls to
2912 AT_CHECK_CALC_GLR_CC that are working now.
2913
2914 2006-09-12 Paul Eggert <eggert@cs.ucla.edu>
2915
2916 * data/glr.cc (YYERROR_VERBOSE, YYTOKEN_TABLE): Remove.
2917 We don't need them in glr.cc, and glr.c defines them.
2918 Defining YYERROR_VERBOSE to 0 here breaks glr.c, since glr.c
2919 assumes that defining it to anything is the same as defining
2920 it to 1. Problem reported by Paolo Bonzini.
2921
2922 2006-09-12 Paolo Bonzini <bonzini@gnu.org> (tiny change)
2923
2924 * data/c.m4 (b4_null, b4_case): Define.
2925 * src/output.c (prepare_symbols): Use b4_null.
2926 (user_actions_output): Use b4_case.
2927
2928 2006-09-11 Paul Eggert <eggert@cs.ucla.edu>
2929
2930 * data/glr.c (b4_shared_declarations): Put start-header first,
2931 before any #includes that we generate, so that feature-test
2932 macros work. Problem reported by Michael Deutschmann in
2933 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00004.html>.
2934 * data/lalr1.cc: Likewise.
2935 * doc/bison.texinfo (Prologue): Document that feature-test macros
2936 should be defined before any Bison declarations.
2937 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Put defns
2938 that depend on location.hh after, not before, Bison decls, since
2939 we now include location.hh after the first user prologue.
2940
2941 * doc/bison.texinfo (Calc++ Parser): Fix memory leak reported by
2942 Sander Brandenburg in
2943 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00002.html>.
2944 Also, fix minor white space and comment issues.
2945 (Prologue): Mention that it's better to define feature-test macros
2946 before Bison declarations. Problem reported by Michael Deutschmann.
2947
2948 * README-cvs: Fix typo: "&" should be "&&". Problem reported
2949 by Jim Meyering.
2950 * m4/.cvsignore: Add argmatch.m4. Remove obstack.m4, strerror_r.m4.
2951 This adjusts to recent gnulib changes.
2952
2953 2006-09-04 Joel E. Denny <jdenny@ces.clemson.edu>
2954
2955 Finish implementation of per-type %destructor/%printer. Discussed
2956 starting at
2957 <http://lists.gnu.org/archive/html/bison-patches/2006-02/msg00064.html>
2958 and
2959 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00091.html>.
2960 * NEWS (2.3+): Add a description of this feature to the default
2961 %destructor/%printer description.
2962 * doc/bison.texinfo (Freeing Discarded Symbols): Likewise.
2963 * src/symlist.c (symbol_list_destructor_set, symbol_list_printer_set):
2964 Invoke semantic_type_destructor_set or semantic_type_printer_set when a
2965 list node contains a semantic type.
2966 * src/symtab.c, src/symtab.h: Extend with a table that associates
2967 semantic types with their %destructor's and %printer's.
2968 (semantic_type_from_uniqstr, semantic_type_get,
2969 semantic_type_destructor_set, semantic_type_printer_set): New functions
2970 composing the public interface of that table.
2971 (symbol_destructor_get, symbol_destructor_location_get,
2972 symbol_printer_get, symbol_printer_location_get): If there's no
2973 per-symbol %destructor/%printer, look up the per-type before trying
2974 the default.
2975 * tests/actions.at (Per-type %printer and %destructor): New test case.
2976 * tests/input.at (Default %printer and %destructor redeclared):
2977 Extend to check that multiple occurrences of %symbol-default in a
2978 single %destructor/%printer declaration is an error.
2979 (Per-type %printer and %destructor redeclared, Unused values with
2980 per-type %destructor): New test cases.
2981
2982 2006-09-04 Joel E. Denny <jdenny@ces.clemson.edu>
2983
2984 Require default %destructor/%printer to be declared using
2985 %symbol-default instead of an empty symbol list, and start working on
2986 new per-type %destructor/%printer. Discussed at
2987 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00007.html>.
2988 * NEWS (2.3+): Add %symbol-default to example.
2989 * bison.texinfo (Freeing Discarded Symbols): Likewise.
2990 (Table of Symbols): Add entry for %symbol-default.
2991 * src/parse-gram.y (PERCENT_SYMBOL_DEFAULT): New token.
2992 (generic_symlist, generic_symlist_item): New nonterminals for creating
2993 a list in which each item is a symbol, semantic type, or
2994 %symbol-default.
2995 (grammar_declaration): Use generic_symlist in %destructor and %printer
2996 declarations instead of symbols.1 or an empty list.
2997 (symbol_declaration, precedence_declaration, symbols.1): Update actions
2998 for changes to symbol_list.
2999 * src/reader.c: Update for changes to symbol_list.
3000 * src/scan-code.l: Likewise.
3001 * src/scan-gram.l: Scan new PERCENT_SYMBOL_DEFAULT token.
3002 * src/symlist.c, src/symlist.h: Extend such that a list node may
3003 represent a semantic type or a %symbol-default in addition to just an
3004 ordinary symbol. Add switched functions for setting %destructor's and
3005 %printer's.
3006 * tests/actions.at, tests/input.at: Add %symbol-default to all default
3007 %destructor/%printer declarations.
3008
3009 2006-08-23 Joel E. Denny <jdenny@ces.clemson.edu>
3010
3011 Whether the default %destructor/%printer applies to a particular symbol
3012 isn't a question of whether the user *declares* that symbol (in %token,
3013 for example). It's a question of whether the user by any means
3014 *defines* the symbol at all (by simply using a char token, for
3015 example). $end is defined by Bison whereas any other token with token
3016 number 0 is defined by the user. The error token is always defined by
3017 Bison regardless of whether the user declares it with %token, but we
3018 may one day let the user define error as a nonterminal instead.
3019 * NEWS (2.3+): Say "user-defined" instead of "user-declared".
3020 * doc/bison.texinfo (Freeing Discarded Symbols): Likewise, and document
3021 the meaning of "user-defined".
3022 * tests/actions.at (Default %printer and %destructor for user-declared
3023 end token): Rename to...
3024 (Default %printer and %destructor for user-defined end token): ...
3025 this.
3026
3027 * src/symtab.c (symbol_destructor_get, symbol_printer_get): In the
3028 computation of whether to apply the default, don't maintain a list of
3029 every Bison-defined symbol. Instead, just check for a first character
3030 of '$', which a user symbol cannot have, and check for the error token.
3031
3032 2006-08-21 Joel E. Denny <jdenny@ces.clemson.edu>
3033
3034 Don't apply the default %destructor or %printer to the error token,
3035 $undefined, or $accept. This change fits the general rule that the
3036 default %destructor and %printer are only for user-declared symbols,
3037 and it solves several difficulties that are described in the new test
3038 cases listed below.
3039 * src/symtab.c (symbol_destructor_get, symbol_printer_get): Implement.
3040 * tests/actions.at (Default %printer and %destructor are not for error
3041 or $undefined, Default %printer and %destructor are not for $accept):
3042 New test cases.
3043
3044 2006-08-19 Joel E. Denny <jdenny@ces.clemson.edu>
3045
3046 Allow %start after the first rule.
3047 * src/reader.c (grammar_current_rule_begin): Don't set the start symbol
3048 when parsing the first rule.
3049 (check_and_convert_grammar): Search for it here after all grammar
3050 declarations have been parsed. Skip midrules, which have dummy LHS
3051 nonterminals.
3052 * src/symtab.c (symbol_is_dummy): New function.
3053 * src/symtab.h (symbol_is_dummy): Declare it.
3054 * tests/input.at (%start after first rule): New test.
3055
3056 2006-08-18 Joel E. Denny <jdenny@ces.clemson.edu>
3057
3058 Redo some of the previous commit: add back the ability to use
3059 non-aliased/undeclared string literals since it might be useful to
3060 those declaring %token-table.
3061 * src/reader.c (check_and_convert_grammar): Undo changes in previous
3062 commit: don't worry about complaints from symbols_pack.
3063 * src/symtab.c (symbol_new, symbol_class_set,
3064 symbol_check_alias_consistency): Undo changes in previous commit: count
3065 each string literal as a new symbol and token, assign it a symbol
3066 number, and don't complain about non-aliased string literals.
3067 (symbols_pack): Since symbol_make_alias still does not decrement symbol
3068 and token counts but does still set aliased tokens to the same number,
3069 symbol_pack_processor now leaves empty slots in the symbols array.
3070 Remove those slots.
3071 * tests/regression.at (Undeclared string literal): Remove test case
3072 added in previous commit since non-aliased string literals are allowed
3073 again.
3074 (Characters Escapes, Web2c Actions): Undo changes in previous commit:
3075 remove unnecessary string literal declarations.
3076 * tests/sets.at (Firsts): Likewise.
3077
3078 2006-08-18 Joel E. Denny <jdenny@ces.clemson.edu>
3079
3080 Don't allow an undeclared string literal, but allow a string literal to
3081 be used before its declaration.
3082 * src/reader.c (check_and_convert_grammar): Don't invoke packgram if
3083 symbols_pack complained.
3084 * src/symtab.c (symbol_new): Don't count a string literal as a new
3085 symbol.
3086 (symbol_class_set): Don't count a string literal as a new token, and
3087 don't assign it a symbol number since symbol_make_alias does that.
3088 (symbol_make_alias): It's not necessary to decrement the symbol and
3089 token counts anymore. Don't assume that an alias declaration occurs
3090 before any uses of the identifier or string, and thus don't assert that
3091 one of them has the highest symbol number so far.
3092 (symbol_check_alias_consistency): Complain if there's a string literal
3093 that wasn't declared as an alias.
3094 (symbols_pack): Bail if symbol_check_alias_consistency failed since
3095 symbol_pack asserts that every token has been assigned a symbol number
3096 although undeclared string literals have not.
3097 * tests/regression.at (String alias declared after use, Undeclared
3098 string literal): New test cases.
3099 (Characters Escapes, Web2c Actions): Declare string literals as
3100 aliases.
3101 * tests/sets.at (Firsts): Likewise.
3102
3103 2006-08-14 Joel E. Denny <jdenny@ces.clemson.edu>
3104
3105 In the grammar scanner, STRING_FINISH unclosed constructs and return
3106 them to the parser in order to improve error messages.
3107 * src/scan-gram.l (SC_ESCAPED_STRING, SC_ESCAPED_CHARACTER,
3108 SC_BRACED_CODE, SC_PROLOGUE): Implement.
3109 * tests/input.at (Unclosed constructs): New test case.
3110 * tests/regression.at (Invalid inputs): Update now that unclosed %{ is
3111 seen.
3112
3113 * src/scan-gram.h, src/scan-gram.l (gram_last_braced_code_loc): Remove
3114 unused global.
3115
3116 2006-08-13 Joel E. Denny <jdenny@ces.clemson.edu>
3117
3118 Handle string aliases for character tokens correctly.
3119 * src/symtab.c (symbol_user_token_number_set): If the token has an
3120 alias, check and set its alias's user token number instead of its own,
3121 which is set to indicate the alias. Previously, every occurrence of
3122 the character token in the grammar overwrote that alias indicator with
3123 the character code.
3124 * tests/input.at (String aliases for character tokens): New test.
3125
3126 2006-08-12 Joel E. Denny <jdenny@ces.clemson.edu>
3127
3128 * src/parse-gram.y: Add `%expect 0' so we don't overlook conflicts.
3129
3130 2006-08-11 Paul Eggert <eggert@cs.ucla.edu>
3131
3132 * bootstrap: Put in need-ngettext argument to AM_GNU_GETTEXT,
3133 to prevent failures when building on older platforms.
3134 Check for autopoint failure.
3135 Set XGETTEXT_OPTIONS to values that check for C format strings,
3136 so that translators are warned about them (this also helps
3137 prevent core dumps).
3138
3139 * lib/subpipe.c (create_subpipe): Use new gnulib pipe_safer
3140 function, since it simplifies our code a bit.
3141
3142 * configure.ac (AC_ARG_ENABLE): Use -Wextra -Wno-sign-compare
3143 rather than -W, so we don't get bogus warnings about sign comparisons.
3144 Add -Wpointer-arith, since that warning is useful (it reports code
3145 that does not conform to C89 and that some compilers reject).
3146 * data/c.m4, data/glr.c, data/lalr1.cc, data/yacc.c: Undo latest change,
3147 since it's no longer needed.
3148
3149 2006-08-10 Joel E. Denny <jdenny@ces.clemson.edu>
3150
3151 Clean up scanners a bit.
3152 * src/flex-scanner.h (FLEX_NO_OBSTACK): New macro that blocks obstack
3153 definitions so gcc won't warn when obstack_for_string is unused.
3154 * src/scan-code.l: config.h and system.h are already #include'd by
3155 scan-code-c.c, so get rid of them here.
3156 * src/scan-gram.l: Likewise.
3157 * src/scan-skel.l: Likewise, and use flex-scanner.h without obstack
3158 definitions rather than duplicating the rest of it.
3159 * src/scan-gram-c.c, scan-skel-c.c: #include "system.h".
3160
3161 2006-08-09 Joel E. Denny <jdenny@ces.clemson.edu>
3162
3163 Suppress signed/unsigned comparison warnings for yycheck.
3164 * data/c.m4 (b4_safest_int_type): New macro.
3165 * data/glr.c, data/lalr1.cc: Wherever you compare yycheck[i] against
3166 a signed int type, cast it to b4_safest_int_type first.
3167 * data/yacc.c: Likewise.
3168 (b4_safest_int_type): Overwrite the one from c.m4 since b4_int_type is
3169 also overwritten.
3170
3171 2006-08-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de> (tiny change)
3172
3173 * doc/bison.texinfo: Fix some typos.
3174
3175 2006-08-02 Paul Eggert <eggert@cs.ucla.edu>
3176
3177 * m4/.cvsignore: Add inttypes_h.m4,lib-ld.m4, lib-prefix.m4,
3178 po.m4, stdint_h.m4, uintmax_t.m4, ulonglong.m4, warning.m4.
3179
3180 * bootstrap (gnulib_tool): Stop using --assume-autoconf;
3181 the latest gnulib does this a different way.
3182 (get_translations): Sharuzzaman Ahmat Raslan reported that the ms
3183 translation was patched, so stop omitting it.
3184
3185 2006-07-29 Joel E. Denny <jdenny@ces.clemson.edu>
3186
3187 Enable declaration of default %printer/%destructor. Make the parser
3188 use these for all user-declared grammar symbols for which the user does
3189 not declare a specific %printer/%destructor. Thus, the parser uses it
3190 for token 0 if the user declares it but not if Bison generates it as
3191 $end. Discussed starting at
3192 <http://lists.gnu.org/archive/html/bison-patches/2006-02/msg00064.html>,
3193 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00091.html>,
3194 and
3195 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00019.html>.
3196 * NEWS (2.3+): Mention.
3197 * doc/bison.texinfo (Actions in Mid-Rule): It's no longer impossible to
3198 declare a %destructor for a mid-rule's semantic value. It's just
3199 impossible to declare one specific to it.
3200 (Freeing Discarded Symbols): Mention that @$ can be used in %destructor
3201 code. Describe default %destructor form.
3202 * src/parse-gram.y (grammar_declaration): Parse default
3203 %printer/%destructor declarations.
3204 * src/output.c (symbol_destructors_output): Use symbol_destructor_get
3205 and symbol_destructor_location_get rather than accessing the destructor
3206 and destructor_location members of struct symbol.
3207 (symbol_printers_output): Likewise but for %printer's.
3208 * src/reader.c (symbol_should_be_used): Likewise but for %destructor's
3209 again.
3210 * src/symtab.c (default_destructor, default_destructor_location,
3211 default_printer, default_printer_location): New static global
3212 variables to record the default %destructor and %printer.
3213 (symbol_destructor_get, symbol_destructor_location_get,
3214 symbol_printer_get, symbol_printer_location_get): New functions to
3215 compute the appropriate %destructor and %printer for a symbol.
3216 (default_destructor_set, default_printer_set): New functions to set the
3217 default %destructor and %printer.
3218 * src/symtab.h: Prototype all those new functions.
3219 * tests/actions.at (Default %printer and %destructor): New test to
3220 check that the right %printer and %destructor are called, that they're
3221 not called for $end, and that $$ and @$ work correctly.
3222 (Default %printer and %destructor for user-declared end token): New
3223 test to check that the default %printer and %destructor are called for
3224 a user-declared end token.
3225 * tests/input.at (Default %printer and %destructor redeclared, Unused
3226 values with default %destructor): New tests to check related grammar
3227 warnings and errors.
3228
3229 2006-07-29 Joel E. Denny <jdenny@ces.clemson.edu>
3230
3231 Clean up handling of %destructor for the end token (token 0).
3232 Discussed starting at
3233 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00019.html>
3234 and
3235 <http://lists.gnu.org/archive/html/help-bison/2006-07/msg00013.html>.
3236
3237 Make the skeletons consistent in how they pop the end token and invoke
3238 its %destructor.
3239 * data/glr.c (yyrecoverSyntaxError, yyparse): Don't pop the start
3240 state, which has token number 0, since this would invoke the
3241 %destructor for the end token.
3242 * data/lalr1.cc (yy::parser::parse): Don't check for the final state
3243 until after shifting the end token, or else it won't be popped.
3244 * data/yacc.c (yyparse): Likewise.
3245
3246 * data/glr.c (yyparse): Clear the lookahead after shifting it even when
3247 it's the end token. Upon termination, destroy an unshifted lookahead
3248 even when it's the end token.
3249 * data/lalr1.cc (yy::parser::parse): Likewise.
3250 * data/yacc.c (yyparse): Likewise.
3251
3252 * src/reader.c (packgram): Don't check rule 0. This suppresses unused
3253 value warnings for the end token when the user gives the end token a
3254 %destructor.
3255
3256 * tests/actions.at (Printers and Destructors): Test all the above.
3257
3258 2006-07-24 Paul Eggert <eggert@cs.ucla.edu>
3259
3260 Update to latest gnulib and gettext versions.
3261 * bootstrap (gnulib-modules): Remove hard-locale, stdio-safer.
3262 Add fopen-safer.
3263 (gnulib_files): Add m4/warning.m4. Don't worry about files
3264 overwritten by autopoint.
3265 Replace gt_INTL_SUBDIR_CORE with an empty body in m4/gettext_gl.m4.
3266 Suppress "id", "ms", "tr" translations for now, since gettext 0.15
3267 rejects them.
3268 Don't use autoreconf; instead, invoke autopoint etc. by hand,
3269 so that we can remove the intl files at a better time.
3270 (intl_files_to_remove): Remove aclocal.m4, since it gets
3271 rebuilt anyway. Remove m4/inttypes_h.m4, m4/inttypes.m4,
3272 m4/isc-posix.m4, m4/lib-ld.m4, m4/lib-prefix.m4, m4/po.m4,
3273 m4/stdint_h.m4, m4/uintmax_t.m4, m4/ulonglong.m4.
3274 Add m4/inttypes-h.m4, m4/lock.m4, m4/visibility.m4.
3275 Remove datarootdir hack; no longer needed.
3276 * configure.ac: Use gl_WARNING_CFLAGS rather than BISON_WARNING.
3277 (AM_GNU_GETTEXT_VERSION): Bump from 0.12 to 0.15.
3278 * lib/.cvsignore: Remove hard-locale.c, hard-locale.h, strdup.c,
3279 strdup.h.
3280 * m4/.cvsignore: Remove hard-locale.m4, strdup.m4.
3281 * m4/warning.m4: Remove from CVS, since we now use gnulib's version.
3282
3283 2006-07-20 Paul Eggert <eggert@cs.ucla.edu>
3284
3285 * bootstrap: Adjust to today's change to gnulib-tool by invoking
3286 it with --assume-autoconf='latest-stable'.
3287
3288 2006-07-13 Joel E. Denny <jdenny@ces.clemson.edu>
3289
3290 * src/parse-gram.y (grammar_declaration): Don't confuse Doxygen (at
3291 least 1.4.7 and 1.4.4) by putting a #line between `typedef union
3292 YYSTYPE' and `{'.
3293 * src/muscle_tab.h (muscle_grow): Replace the header comments with
3294 those from muscle_tab.c since the old ones are misleading.
3295
3296 2006-07-13 Akim Demaille <akim@epita.fr>
3297
3298 Support %define "KEY" {VALUE}.
3299 * src/scan-code.h, src/scan-code.l (translate_action)
3300 (translate_rule_action, translate_symbol_action, translate_code):
3301 Return char *, not const char *.
3302 * src/parse-gram.y (declaration): Rename as...
3303 (prologue_declaration): this.
3304 (string_content): Remove this nonterminal, use STRING.
3305 (braceless, content, content.opt): New nonterminal.
3306 Use them.
3307 (%define): Now accept content.opt, i.e., accept also BRACED_CODE
3308 as value.
3309 * src/scan-gram.l (getargs.h): Don't include it.
3310
3311 2006-07-12 Paul Eggert <eggert@cs.ucla.edu>
3312
3313 * data/lalr1.cc (YYCDEBUG): Use 'if (yydebug_) (*yycdebug_)'
3314 rather than a for-loop that declares a local bool variable. This
3315 should work around a compatibility problem with a Cray x1e C++
3316 compiler reported by Hung Nguyen in
3317 <http://lists.gnu.org/archive/html/help-bison/2006-07/msg00022.html>.
3318 The for-loop was introduced in the 2004-11-17 change but I don't
3319 know why it was needed.
3320
3321 2006-07-12 Akim Demaille <akim@epita.fr>
3322
3323 * data/c.m4: Comment changes.
3324
3325 2006-07-10 Akim Demaille <akim@lrde.epita.fr>
3326
3327 * src/complain.c (error_message, ERROR_MESSAGE): New.
3328 To factor...
3329 (fatal_at, fatal, warn_at, warn, complain_at, complain): these.
3330 * src/complain.h, src/complain.c (warning_issued): Remove, unused.
3331
3332 2006-07-09 Paul Eggert <eggert@cs.ucla.edu>
3333
3334 * NEWS: Instead of %union, you can define and use your own union type
3335 YYSTYPE if your grammar contains at least one <type> tag.
3336 Your YYSTYPE need not be a macro; it can be a typedef.
3337 * doc/bison.texinfo (Value Type, Multiple Types, Location Type):
3338 (Union Decl, Decl Summary): Document this.
3339 * data/glr.c (YYSTYPE): Implement this.
3340 * data/glr.cc (YYSTYPE): Likewise.
3341 * data/lalr1.cc (YYSTYPE): Likewise.
3342 * data/yacc.c (YYSTYPE): Likewise.
3343 * src/output.c (prepare): Output tag_seen_flag.
3344 * src/parse-gram.y (declaration, grammar_declaration):
3345 Use 'union_seen' rather than 'typed' to determine whether
3346 %union has been seen, since grammars can now be typed without
3347 %union.
3348 (symbol_declaration, type.opt, symbol_def):
3349 Keep track of whether a tag has been seen.
3350 * src/reader.c (union_seen, tag_seen): New vars.
3351 (typed): remove.
3352 * src/reader.h (union_seen, tag_seen, typed): Likewise.
3353 * src/scan-code.l (untyped_var_seen): New variable.
3354 (handle_action_dollar): Adjust to above changes.
3355 (handle_action_dollar, handle_action_at):
3356 Improve overflow checking for outlandish numbers.
3357 * tests/input.at (AT_CHECK_UNUSED_VALUES): Redo test to
3358 avoid new diagnostics generated by above changes.
3359 * tests/regression.at (YYSTYPE typedef): Add test to check
3360 for type tags without %union.
3361
3362 * src/symlist.c (symbol_list_length): Return int, not unsigned
3363 int, since callers expect int. This may need to get revisited
3364 once we have proper integer overflow checking.
3365
3366 * src/scan-gram.h (gram_scanner_cursor): Remove decl, since this
3367 object is now static.
3368
3369 * src/getargs.c (flags_argmatch): Return void, not int,
3370 to pacify ./configure --enable-gcc-warnings.
3371
3372 * src/flex-scanner.h (STRING_FREE): Don't use FLEX_PREFIX (last_string)
3373 since last_string is already defined to FLEX_PREFIX (last_string).
3374
3375 2006-07-09 Akim Demaille <akim@lrde.epita.fr>
3376
3377 Implement --warnings/-W.
3378 * src/getargs.c (report_argmatch, trace_argmatch): Remove,
3379 replaced by...
3380 (flags_argmatch, FLAGS_ARGMATCH): this new function and macro.
3381 Adjust callers.
3382 * src/getargs.h, src/getargs.c (warnings, warnings_flags)
3383 (warnings_args, warnings_types): New.
3384 (getargs, short_options, long_options): Accept -W/--warnings.
3385 Sort the options by alphabetical order, upper case letter right
3386 before its lower case.
3387
3388 2006-07-09 Joel E. Denny <jdenny@ces.clemson.edu>
3389
3390 Change %merge result type clash warnings to errors. Discussed at
3391 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00026.html>.
3392 * src/reader.c (record_merge_function_type): Use complain_at.
3393 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
3394 declared later): Update test case results.
3395
3396 2006-07-09 Akim Demaille <akim@lrde.epita.fr>
3397
3398 * src/getargs.h, src/getargs.c: Swap --report and --trace handling
3399 to be in alphabetical order.
3400 (trace_args): Spelling fixes.
3401
3402 2006-07-09 Paul Eggert <eggert@cs.ucla.edu>
3403
3404 * data/yacc.c (YYID, yy_stack_print): Prefix local vars with "yy"
3405 so they don't collide with user-defined macros.
3406 (yy_stack_print): Don't assume that yytype_int16 promotes to int;
3407 this was never guaranteed, and now that we're using gnulib stdint,
3408 which defines int_fast16_t to long int, the problem is exposed.
3409
3410 2006-07-08 Paul Eggert <eggert@cs.ucla.edu>
3411
3412 * data/c.m4 (b4_basename): Simplify a bit, since we don't
3413 need the full POSIX semantics (and weren't implementing them
3414 anyway).
3415
3416 Adjust to Autoconf 2.60 and today's gnulib.
3417 * bootstrap (gnulib_modules): Add stdint.
3418 Remove special case for m4/onceonly_2_57.m4, since gnulib-tool
3419 no longer copies it.
3420 (intl_files_to_remove): Remove m4/longlong.m4 and m4/wchar_t.m4,
3421 since stdint needs the former and wcwidth (which is now required
3422 by mbswidth) needs the latter.
3423 Append 'datarootdir = @datarootdir@' to po/Makefile.in.in, to
3424 work around a compatibility glitch between gettext 0.14.6 and
3425 Autoconf 2.60.
3426 * configure.ac (AC_PREREQ): Require Autoconf 2.60.
3427 Do not check for uintptr_t, since new stdint module does the right
3428 thing.
3429 * lib/.cvsignore: Remove alloca.c, alloca.h, alloca_.h.
3430 Add stdint.h, stdint_.h, wcwidth.h.
3431 * m4/.cvsignore: Remove alloca.m4, onceonly.m4.
3432 Add absolute-header.m4, double-slash-root.m4, longlong.m4,
3433 stdint.m4, wchar_t.m4, wcwidth.m4.
3434 * src/files.c: Include <dirname.h> and <stdio-safer.h> in the
3435 usual order for ../lib/*.h files.
3436 (file_name_split): Use last_component, not base_name, to adjust
3437 to gnulib changes.
3438 * src/parse-gram.h: Include <strverscmp.h> in the usual order
3439 for ../lib/*.h files.
3440 (YYTYPE_INT16, YYTYPE_INT8, YYTYPE_UINT16, YYTYPE_UINT8):
3441 Define unconditionally, since we now assume the stdint module.
3442 * src/scan-skel.l: Include <dirname.h>.
3443 (BASE_QPUTS): Use last_component, not base_name.
3444 * src/system.h: Include <unlocked-io.h> in the usual order
3445 for ../lib/*.h files. Include <stdint.h> unconditionally,
3446 since we now use the stdint module.
3447 (uintptr_t): Declare if UINTPTR_MAX is not defined, not
3448 HAVE_UINTPTR_T, since we now use the stdint module.
3449 (base_name): Remove decl, since files now include <dirname.h>
3450 to get the decl.
3451
3452 2006-07-08 Akim Demaille <akim@lrde.epita.fr>
3453
3454 * data/c.m4 (b4_location_initial_column, b4_location_initial_line):
3455 New, default to 1.
3456 * data/yacc.c, data/glr.c, data/location.cc: Use them.
3457 * NEWS, doc/bison.texinfo: The initial column and line are 1 by
3458 default.
3459 * tests/calc.at: Adjust.
3460
3461 2006-07-08 Akim Demaille <akim@lrde.epita.fr>
3462
3463 * data/c.m4 (b4_basename): New.
3464 (b4_syncline): Also output the location of its invocation (from
3465 the skeleton).
3466 (b4_user_action, b4_define_user_action, b4_user_actions)
3467 (b4_user_initial_action, b4_user_post_prologue, b4_user_start_header)
3468 (b4_user_stype): New.
3469 * data/yacc.c, data/glr.c, data/lalr1.cc, data/glr.cc: Use them.
3470
3471 2006-07-07 Joel E. Denny <jdenny@ces.clemson.edu>
3472
3473 In the grammar file, the first column is 1 not 0 on the first line as
3474 on every other line.
3475 * src/parse-gram.y (%initial-action): Initialize @$ correctly.
3476 * tests/input.at (Torturing the Scanner): Update output.
3477
3478 * src/scan-gram.l (scanner_cursor): Declare it static.
3479
3480 2006-07-07 Joel E. Denny <jdenny@ces.clemson.edu>
3481
3482 In warnings, say "previous declaration" rather than "first
3483 declaration".
3484 * src/symtab.c (redeclaration): Do that here.
3485 * src/reader.c (record_merge_function_type): In the case of a result
3486 type clash, report the previous declaration rather than the very first
3487 one in the grammar file.
3488 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
3489 declared later): Add a third declaration to check this behavior.
3490 * tests/input.at (Incompatible Aliases): Update output.
3491
3492 2006-06-27 Akim Demaille <akim@epita.fr>
3493
3494 * doc/Doxyfile.in: New.
3495 * doc/Makefile.am: Use it.
3496 * src/lalr.h, src/symtab.h: Initial doxygenation.
3497
3498 2006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
3499
3500 Don't miss %merge result type warnings just because the LHS types are
3501 declared after the %merge. This continues the effort of the previous
3502 patch.
3503 * src/reader.c (get_merge_function): Don't set the merger type yet.
3504 (record_merge_function_type): New function for setting the merger type
3505 and checking for clashes.
3506 (grammar_current_rule_merge_set): Set the location of the %merge for
3507 the current rule.
3508 (packgram): Invoke record_merge_function_type for each rule now that
3509 all symbol type declarations have been parsed.
3510 * src/reader.h (merger_list.type_declaration_location): New member
3511 storing the location of the first %merge from which the type for this
3512 merging function was derived.
3513 * src/symlist.h (symbol_list.merger_declaration_location): New member
3514 storing the location of a rule's %merge, if any.
3515 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
3516 declared later): New test to catch the error fixed by the above patch.
3517
3518 2006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
3519
3520 Get action warnings (grammar_rule_check) right even when symbol
3521 declarations appear after the rules. Discussed at
3522 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00108.html>
3523 and
3524 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00151.html>.
3525 Don't mistake the type of $$ in a midrule to be that of its parent
3526 rule's $$.
3527 * src/reader.c (grammar_current_rule_end): Don't invoke
3528 grammar_rule_check yet since not all symbol declarations may have been
3529 parsed yet.
3530 (grammar_midrule_action): Likewise.
3531 Don't record whether the midrule's $$ has been used yet since actions
3532 haven't been translated yet.
3533 Record the midrule's parent rule and its RHS index within the parent
3534 rule.
3535 (grammar_current_rule_action_append): Don't translate the action yet
3536 since not all symbol declarations may have been parsed yet and, thus,
3537 warnings about types for $$, $n, @$, and @n can't be reported yet.
3538 (packgram): Translate the action and invoke grammar_rule_check now that
3539 all symbol declarations have been parsed.
3540 * src/scan-code.l (handle_action_dollar): Now that this is invoked
3541 after parsing the entire grammar file, the symbol list here in the case
3542 of a midrule is actually the midrule's empty RHS, so reference its
3543 parent rule's RHS where necessary.
3544 On the other hand, now that you can already know it's a midrule, you
3545 aren't forced to think $$ has the same type as its parent rule's $$.
3546 (handle_action_at): In the case of a midrule, reference the parent rule
3547 where necessary.
3548 * src/symlist.c (symbol_list_new): Initialize new midrule-related
3549 members.
3550 (symbol_list_length): Now that this is invoked after all rules have
3551 been parsed, a NULL symbol (rather than a NULL symbol list node)
3552 terminates a rule. symbol_list_print already does this correctly.
3553 * src/symlist.h (symbol_list.midrule_parent_rule,
3554 symbol_list.midrule_parent_rhs_index): New members so that midrules can
3555 remember their relationships with their parents.
3556 * tests/input.at (Type Clashes): Extend to catch the midrule $$ error
3557 fixed by the above patch.
3558 (_AT_UNUSED_VALUES_DECLARATIONS, AT_CHECK_UNUSED_VALUES): New m4 macros
3559 implementing...
3560 (Unused values): ... this old test case and...
3561 (Unused values before symbol declarations): ... this new test case.
3562 This one is the same as `Unused values' except that all symbol
3563 declarations appear after the rules in order to catch the rest of the
3564 errors fixed by the above patch.
3565
3566 2006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
3567
3568 More cleanup.
3569 * src/reader.c (current_rule): Declare it static since it's no longer
3570 used outside this file.
3571 (grammar_current_rule_action_append): Remove redundant arguments from
3572 translate_rule_action invocation.
3573 * src/reader.h (current_rule): Remove this unused extern.
3574 * src/scan-code.h (translate_rule_action): Remove redundant arguments.
3575 * src/scan-code.l (translate_rule_action): Likewise.
3576
3577 2006-06-25 Joel E. Denny <jdenny@ces.clemson.edu>
3578
3579 Clean up yesterday's patch.
3580 * parse-gram.y (rhs): Move grammar_midrule_action invocation from here
3581 to...
3582 * src/reader.c (grammar_current_rule_action_append): ... here for
3583 consistency with grammar_current_rule_symbol_append.
3584 * tests/regression.at (Braced code in declaration in rules section):
3585 Make yyerror and yylex static as usual.
3586
3587 2006-06-24 Joel E. Denny <jdenny@ces.clemson.edu>
3588
3589 Fix bug that mistakes braced code in a declaration in the rules section
3590 to be a rule action. Mentioned at
3591 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00105.html>.
3592 * src/scan-gram.l: Move midrule action detection from the start of the
3593 scanning of any braced code to...
3594 * src/parse-gram.y (rhs): ... the parsing of braced code as a rule
3595 action. For readability, use $2 and @2 rather than the equivalent
3596 global variables.
3597 * tests/regression.at (Braced code in declaration in rules section):
3598 New test to catch the error fixed by the above patch.
3599
3600 Work on code readability some.
3601 * src/scan-code.l (current_rule): Get rid of this misleading and
3602 redundant declaration: it's actually extern'ed in reader.h.
3603 (YY_DECL, code_lex, handle_action_dollar, handle_action_at,
3604 translate_action): Add a rule argument and use it instead of the global
3605 current_rule.
3606 (translate_rule_action): This already receives current_rule through an
3607 argument, so pass it on to translate_action instead of assigning
3608 current_rule to current_rule.
3609 (translate_symbol_action, translate_code): Pass rule = NULL to
3610 translate_action.
3611
3612 2006-06-23 Joel E. Denny <jdenny@ces.clemson.edu>
3613
3614 Rename %before-definitions to %start-header and %after-definitions to
3615 %end-header. Don't use these declarations to separate pre-prologue
3616 blocks from post-prologue blocks. Add new order-independent
3617 declarations %before-header and %after-header as alternatives to the
3618 traditional Yacc pre-prologue and post-prologue blocks. Discussed at
3619 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00110.html>.
3620 * NEWS (2.3+): Update for these changes.
3621 * data/glr.c (b4_before_definitions): Update to...
3622 (b4_start_header): ... this.
3623 (b4_after_definitions): Update to...
3624 (b4_end_header): ... this.
3625 * data/glr.cc: Likewise.
3626 * data/lalr1.cc: Likewise.
3627 * data/yacc.c: Likewise.
3628 * doc/bison.texinfo (The prologue): Update names, and replace remaining
3629 prologue blocks with %*-header declarations.
3630 (Calc++ Parser): Likewise.
3631 (Decl Summary): Update names.
3632 (Table of Symbols): Update description.
3633 * src/parse-gram.y (PERCENT_AFTER_DEFINITIONS): Update to...
3634 (PERCENT_END_HEADER): ... this.
3635 (PERCENT_BEFORE_DEFINITIONS): Update to...
3636 (PERCENT_START_HEADER): ... this.
3637 (PERCENT_AFTER_HEADER, PERCENT_BEFORE_HEADER): New tokens.
3638 (declaration): Update token names and m4 macro names.
3639 When parsing %end-header and %start-header, invoke translate_code
3640 before muscle_code_grow, and no longer set global booleans to remember
3641 whether these declarations have been seen.
3642 Parse new %after-header and %before-header.
3643 * src/reader.c (before_definitions, after_definitions): Remove.
3644 (prologue_augment): Accept a new bool argument to specify whether to
3645 augment the pre-prologue or post-prologue.
3646 * src/reader.h (before_definitions, after_definitions): Remove these
3647 extern's.
3648 (prologue_augment): Add new bool argument.
3649 * src/scan-gram.l (PERCENT_AFTER_DEFINITIONS): Update to...
3650 (PERCENT_END_HEADER): ... this.
3651 (PERCENT_BEFORE_DEFINITIONS): Update to...
3652 (PERCENT_START_HEADER): ... this.
3653 (PERCENT_AFTER_HEADER, PERCENT_BEFORE_HEADER): New tokens.
3654 * tests/actions.at (Printers and Destructors): Update names.
3655
3656 2006-06-22 Joel E. Denny <jdenny@ces.clemson.edu>
3657
3658 Add comparison operators for C++ location classes. Discussed at
3659 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00092.html>.
3660 * data/c++.m4 (b4_define_location_comparison): New boolean %define
3661 declaration indicating whether filename_type has an operator==. If
3662 filename_type is `std::string', it defaults to `1', `0' otherwise.
3663 * data/location.cc: Iff b4_define_location_comparison is `1', add
3664 operator== and operator!= for class position and for class location.
3665
3666 Some minor fixes.
3667 * src/scan-action.l: Remove unused file.
3668 * src/symtab.c (symbol_printer_set): Use printer_location not
3669 destructor_location.
3670 * src/symtab.h (struct symbol): Replace incorrect source comment for
3671 printer members.
3672 * tests/input.at (Incompatible Aliases): Update output with correct
3673 printer location.
3674
3675 2006-06-20 Joel E. Denny <jdenny@ces.clemson.edu>
3676
3677 Don't put the pre-prologue in the header file. For the yacc.c code
3678 file and the glr.c header and code files, move the pre-prologue before
3679 the token definitions. Add new %before-definitions and
3680 %after-definitions to declare code that will go in both the header file
3681 and code file. Discussed at
3682 <http://lists.gnu.org/archive/html/bison-patches/2005-12/msg00000.html>,
3683 <http://lists.gnu.org/archive/html/bison-patches/2006-01/msg00016.html>,
3684 and
3685 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00055.html>.
3686 * NEWS (2.3+): Describe these changes.
3687 * data/glr.c (b4_pre_prologue): Move from within to before...
3688 (b4_shared_declarations): ... this.
3689 Add new b4_before_definitions before b4_token_enums.
3690 Add new b4_after_definitions at the end.
3691 * data/glr.cc (b4_pre_prologue): Replace with...
3692 (b4_before_definitions): ... this in the header file.
3693 (b4_after_definitions): New near the end of the header file.
3694 * data/lalr1.cc (b4_pre_prologue): Move from the header file to the
3695 code file right before including the header file.
3696 (b4_before_definitions): New in the previous position of
3697 b4_pre_prologue in the header file.
3698 (b4_after_definitions): New near the end of the header file.
3699 * data/yacc.c: Clean up some m4 quoting especially in the header file.
3700 (b4_token_enums_defines): In the code file, move to right before
3701 YYSTYPE for consistency with the header file.
3702 (b4_before_definitions): New right before b4_token_enums_defines in
3703 both the header and code file.
3704 (b4_after_definitions): New right after YYLTYPE and yylloc in both the
3705 header and code file.
3706 * doc/bison.texinfo (Prologue): Show use of %before-definitions instead
3707 of prologues for %union dependencies.
3708 (Decl Summary): In %defines description, mention the effect of
3709 %before-definitions and %after-definitions on the header file.
3710 (Calc++ Parser): Forward declare driver in a %before-definitions rather
3711 than in the pre-prologue so that make check succeeds.
3712 (Table of Symbols): Add entries for %before-definitions and
3713 %after-definitions.
3714 * src/parse-gram.y (PERCENT_BEFORE_DEFINITIONS): New token for
3715 %before-definitions.
3716 (PERCENT_AFTER_DEFINITIONS): New token for %after-definitions.
3717 (declaration): Parse those declarations and append to
3718 b4_before_definitions and b4_after_definitions, respectively.
3719 * src/reader.c (before_definitions, after_definitions): New bools to
3720 track whether those declarations have been seen.
3721 (prologue_augment): Add to the post-prologue if %union,
3722 %before-definitions, or %after-definitions has been seen.
3723 * src/reader.h (before_definitions, after_definitions): New extern's.
3724 * src/scan-gram.l: Scan the new declarations.
3725 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Place the second
3726 prologue block in a %before-definitions or a %after-definitions based
3727 on whether the %union is declared.
3728 * tests/regression.at (Early token definitions with --yacc, Early token
3729 definitions without --yacc): Move tests for token definitions into the
3730 post-prologue since token names are no longer defined in the
3731 pre-prologue.
3732
3733 2006-06-20 Akim Demaille <akim@epita.fr>
3734
3735 * src/symtab.h, src/symtab.c (symbol_from_uniqstr): New.
3736 (symbol_get): Use it.
3737 * src/parse-gram.y: Use it.
3738
3739 2006-06-19 Joel E. Denny <jdenny@ces.clemson.edu>
3740
3741 * src/scan-gram.l: Remove unused declaration of last_string_1 so the
3742 build succeeds when configured with --enable-gcc-warnings.
3743
3744 2006-06-19 Paul Eggert <eggert@cs.ucla.edu>
3745
3746 * src/parse-gram.y (char_name): New function.
3747 (CHAR, STRING, string_content): For %printer, properly escape.
3748 (ID): Prefer fputs to fprintf.
3749 (id): Reindent to be consistent with other rules.
3750 Properly quote char.
3751
3752 The Translation Project changed its way of publishing translations
3753 to maintainers. I haven't received any responses to my request
3754 for supporting the old way, or for documenting the new way. I
3755 have modified 'bootstrap' to use screen scraping
3756 (in this case, HTML scraping). This is unreliable and inelegant,
3757 but I don't see any better way. Yuck.
3758 * bootstrap (TP_URL, WGET_COMMAND): New vars.
3759 (get_translations): New function, which uses HTML scraping to
3760 deduce locations of latest translations.
3761 Use this function to grab both bison and bison-runtime .po files.
3762 Don't bother priming the pump for the runtime-po domain any more,
3763 as it's now translated better than bison is.
3764
3765 2006-06-19 Akim Demaille <akim@epita.fr>
3766
3767 * src/scan-gram.l: No longer "parse" things after `%union' until
3768 `{'. Rather, return a single "%union" token.
3769 No longer make symbols: return strings, and leave the conversion
3770 to symbols to the parser.
3771 (SC_PRE_CODE, token_type): Remove.
3772 * src/parse-gram.y (%union): New field `character'.
3773 Sort tokens.
3774 (CHAR): New token.
3775 (ID, ID_COLON): Now that the scanner no longer makes them
3776 identifiers, adjust all uses to invoke symbol_get.
3777 (id_colon): New, wraps the conversion from string to symbol.
3778 (%union): Accept a possible union_name.
3779 (symbol): Now can be a char.
3780 * data/c.m4 (b4_union_name): Leave a default value.
3781 * data/glr.c, data/yacc.c: Use it.
3782
3783 2006-06-11 Joel E. Denny <jdenny@ces.clemson.edu>
3784
3785 For associating token numbers with token names for "yacc.c", don't use
3786 #define statements unless `--yacc' is specified; always use enum
3787 yytokentype. Most important discussions start at:
3788 <http://lists.gnu.org/archive/html/bison-patches/2005-09/msg00053.html>,
3789 <http://lists.gnu.org/archive/html/bison-patches/2005-12/msg00052.html>,
3790 and
3791 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00043.html>.
3792 * NEWS (2.3+): Mention.
3793 * data/c.m4 (b4_yacc_if): New.
3794 (b4_token_enums_defines): Use b4_yacc_if to decide whether to add the
3795 token #define's.
3796 * doc/bison.texinfo (Bison Options): Describe the effect of `--yacc'
3797 on token name definitions.
3798 * src/getargs.c (usage): Capitalize `Yacc' in English.
3799 * src/output.c (prepare): Define b4_yacc_flag.
3800 * tests/regression.at (Early token definitions): Test that tokens names
3801 are defined before the pre-prologue not just before the post-prologue.
3802 Remove this test case and copy to...
3803 (Early token definitions with --yacc): ... this to test #define's.
3804 (Early token definitions without --yacc): ... and this to test enums.
3805
3806 2006-06-11 Paul Eggert <eggert@cs.ucla.edu>
3807
3808 * NEWS: Reword the post-2.3 change to not be so optimistic about
3809 removing the old "look-ahead" spelling.
3810 Update previous look-ahead/lookahead change reports.
3811 * REFERENCES: look-ahead -> lookahead (since that's
3812 what he actually wrote).
3813 * doc/refcard.tex: look ahead -> lookahead,
3814 look-ahead -> lookahead
3815
3816 2006-06-09 Joel E. Denny <jdenny@ces.clemson.edu>
3817
3818 For consistency, use `lookahead' instead of `look-ahead' or
3819 `look_ahead'. Discussed starting at
3820 <http://lists.gnu.org/archive/html/bison-patches/2006-01/msg00049.html>
3821 and then at
3822 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00017.html>.
3823 * NEWS: For the next release, note the change to `--report'.
3824 * TODO, doc/bison.1: Update English.
3825 * doc/bison.texinfo: Update English.
3826 (Understanding Your Parser, Bison Options): Document as
3827 `--report=lookahead' rather than `--report=look-ahead'.
3828 * src/conflicts.c: Update English in comments.
3829 (lookahead_set): Rename from look_ahead_set.
3830 (flush_reduce): Rename argument look_ahead_tokens to lookahead_tokens.
3831 (resolve_sr_conflict): Rename local look_ahead_tokens to
3832 lookahead_tokens, and update other uses.
3833 (flush_shift, set_conflicts, conflicts_solve, count_sr_conflicts,
3834 count_rr_conflicts, conflicts_free): Update uses.
3835 * src/getargs.c (report_args): Move "lookahead" before alternate
3836 spellings.
3837 (report_types): Update uses.
3838 (usage): For `--report' usage description, state `lookahead' spelling
3839 rather than `look-ahead'.
3840 * src/getargs.h (report.report_lookahead_tokens): Rename from
3841 report_look_ahead_tokens.
3842 * src/lalr.c: Update English in comments.
3843 (compute_lookahead_tokens): Rename from compute_look_ahead_tokens.
3844 (state_lookahead_tokens_count): Rename from
3845 state_look_ahead_tokens_count.
3846 Rename local n_look_ahead_tokens to n_lookahead_tokens.
3847 (lookahead_tokens_print): Rename from look_ahead_tokens_print.
3848 Rename local n_look_ahead_tokens to n_lookahead_tokens.
3849 Update other uses.
3850 Update English in output.
3851 (add_lookback_edge, initialize_LA, lalr, lalr_free): Update uses.
3852 * src/print.c: Update English in comments.
3853 (lookahead_set): Rename from look_ahead_set.
3854 (print_reduction): Rename argument lookahead_token from
3855 look_ahead_token.
3856 (print_core, state_default_rule, print_reductions, print_results):
3857 Update uses.
3858 * src/print_graph.c: Update English in comments.
3859 (print_core): Update uses.
3860 * src/state.c: Update English in comments.
3861 (reductions_new): Update uses.
3862 (state_rule_lookahead_tokens_print): Rename from
3863 state_rule_look_ahead_tokens_print, and update other uses.
3864 * src/state.h: Update English in comments.
3865 (reductions.lookahead_tokens): Rename from look_ahead_tokens.
3866 (state_rule_lookahead_tokens_print): Rename from
3867 state_rule_look_ahead_tokens_print.
3868 * src/tables.c: Update English in comments.
3869 (conflict_row, action_row): Update uses.
3870 * tests/glr-regression.at
3871 (Incorrect lookahead during deterministic GLR,
3872 Incorrect lookahead during nondeterministic GLR): Rename
3873 print_look_ahead to print_lookahead.
3874 * tests/torture.at: Update English in comments.
3875 (AT_DATA_LOOKAHEAD_TOKENS_GRAMMAR): Rename from
3876 AT_DATA_LOOK_AHEAD_TOKENS_GRAMMAR.
3877 (Many lookahead tokens): Update uses.
3878 * data/glr.c: Update English in comments.
3879 * lalr1.cc: Likewise.
3880 * yacc.c: Likewise.
3881 * src/conflicts.h: Likewise.
3882 * src/lalr.h: Likewise.
3883 * src/main.c: Likewise.
3884 * src/output.c: Likewise.
3885 * src/parse-gram.c: Likewise.
3886 * src/tables.h: Likewise.
3887 * tests/calc.at: Likewise.
3888
3889 2006-06-08 Joel E. Denny <jdenny@ces.clemson.edu>
3890
3891 * src/flex-scanner.h (yytext): Remove stray `*/' in #define.
3892
3893 2006-06-07 Paul Eggert <eggert@cs.ucla.edu>
3894
3895 * TODO: Add request from Nelson H. F. Beebe to be able to install
3896 Bison without installing the yacc script.
3897
3898 2006-06-07 Joel E. Denny <jdenny@ces.clemson.edu>
3899
3900 * src/flex-scanner.h: For the sake of Flex 2.5.4, don't #define yyleng
3901 and yytext if they're already #define'd.
3902 * src/flex-scanner.h, src/location.h: Move #include "system.h" to...
3903 * src/scan-code-c.c: ... here.
3904 * src/scan-code.l, src/scan-gram.l: ... and here. Also #include
3905 <config.h>.
3906
3907 2006-06-07 Joel E. Denny <jdenny@ces.clemson.edu>
3908
3909 Get Bison to build again when configured with --enable-gcc-warnings.
3910 * src/location.c, src/location.h, src/main.c, src/scan-code.l: Add some
3911 missing #include's.
3912 * src/scan-code.l (handle_action_dollar, handle_action_at): Rename
3913 loc argument as it shadows a global.
3914 * src/scan-gram.l: Remove stray comma that prevents boundary_set
3915 invocation.
3916
3917 * src/.cvsignore: Add scan-code.c.
3918
3919 2006-06-07 Akim Demaille <akim@epita.fr>
3920
3921 * src/scan-gram.l: Move the "add a trailing ; to actions" code
3922 to...
3923 * src/scan-code.l: here.
3924 * tests/input.at (Torturing the Scanner): Fix another location
3925 error.
3926
3927 2006-06-07 Akim Demaille <akim@epita.fr>
3928
3929 * src/Makefile.am (BUILT_SOURCES): Fix the trailing backslash.
3930
3931 2006-06-06 Akim Demaille <akim@epita.fr>
3932
3933 Extract the parsing of user actions from the grammar scanner.
3934 As a consequence, the relation between the grammar scanner and
3935 parser is much simpler. We can also split "composite tokens" back
3936 into simple tokens.
3937 * src/gram.h (ITEM_NUMBER_MAX, RULE_NUMBER_MAX): New.
3938 * src/scan-gram.l (add_column_width, adjust_location): Move to and
3939 rename as...
3940 * src/location.h, src/location.c (add_column_width)
3941 (location_compute): these.
3942 Fix the column count: the initial column is 0.
3943 (location_print): Be robust to ending column being 0.
3944 * src/location.h (boundary_set): New.
3945 * src/main.c: Adjust to scanner_free being renamed as
3946 gram_scanner_free.
3947 * src/output.c: Include scan-code.h.
3948 * src/parse-gram.y: Include scan-gram.h and scan-code.h.
3949 Use boundary_set.
3950 (PERCENT_DESTRUCTOR, PERCENT_PRINTER, PERCENT_INITIAL_ACTION)
3951 (PERCENT_LEX_PARAM, PERCENT_PARSE_PARAM): Remove the {...} part,
3952 which is now, again, a separate token.
3953 Adjust all dependencies.
3954 Whereever actions with $ and @ are used, use translate_code.
3955 (action): Remove this nonterminal which is now useless.
3956 * src/reader.c: Include assert.h, scan-gram.h and scan-code.h.
3957 (grammar_current_rule_action_append): Use translate_code.
3958 (packgram): Bound check ruleno, itemno, and rule_length.
3959 * src/reader.h (gram_in, gram__flex_debug, scanner_cursor)
3960 (last_string, last_braced_code_loc, max_left_semantic_context)
3961 (scanner_initialize, scanner_free, scanner_last_string_free)
3962 (gram_out, gram_lineno, YY_DECL_): Move to...
3963 * src/scan-gram.h: this new file.
3964 (YY_DECL): Rename as...
3965 (GRAM_DECL): this.
3966 * src/scan-code.h, src/scan-code.l, src/scan-code-c.c: New.
3967 * src/scan-gram.l (gram_get_lineno, gram_get_in, gram_get_out):
3968 (gram_get_leng, gram_get_text, gram_set_lineno, gram_set_in):
3969 (gram_set_out, gram_get_debug, gram_set_debug, gram_lex_destroy):
3970 Move these declarations, and...
3971 (obstack_for_string, STRING_GROW, STRING_FINISH, STRING_FREE):
3972 these to...
3973 * src/flex-scanner.h: this new file.
3974 * src/scan-gram.l (rule_length, rule_length_overflow)
3975 (increment_rule_length): Remove.
3976 (last_braced_code_loc): Rename as...
3977 (gram_last_braced_code_loc): this.
3978 Adjust to the changes of the parser.
3979 Move all the handling of $ and @ into...
3980 * src/scan-code.l: here.
3981 * src/scan-gram.l (handle_dollar, handle_at): Remove.
3982 (handle_action_dollar, handle_action_at): Move to...
3983 * src/scan-code.l: here.
3984 * src/Makefile.am (bison_SOURCES): Add flex-scanner.h,
3985 scan-code.h, scan-code-c.c, scan-gram.h.
3986 (EXTRA_bison_SOURCES): Add scan-code.l.
3987 (BUILT_SOURCES): Add scan-code.c.
3988 (yacc): Be robust to white spaces.
3989
3990 * tests/conflicts.at, tests/input.at, tests/reduce.at,
3991 * tests/regression.at: Adjust the column numbers.
3992 * tests/regression.at: Adjust the error message.
3993
3994 2006-06-06 Joel E. Denny <jdenny@ces.clemson.edu>
3995
3996 * src/getargs.c (usage): Mention GLR not just LALR(1) in --help output.
3997 Use Akim's wording from
3998 <http://lists.gnu.org/archive/html/bison-patches/2006-05/msg00056.html>.
3999
4000 2006-06-06 Joel E. Denny <jdenny@ces.clemson.edu>
4001
4002 Between Bison releases, manually append `+' to the previous Bison
4003 release number, and use that as a signal to automatically print the
4004 ChangeLog's CVS Id keyword from --version. Discussed starting at
4005 <http://lists.gnu.org/archive/html/bison-patches/2006-05/msg00028.html>.
4006 * ChangeLog: Add Id header.
4007 * configure.ac (AC_INIT): Append `+' to `2.3'.
4008 * src/.cvsignore: Add revision.c.
4009 * src/Makefile.am (bison_SOURCES): Add revision.c and revision.h.
4010 (BUILT_SOURCES): Add revision.c.
4011 (revision.c): New target rule. This file defines a new global variable
4012 named revision. It initializes it with either the Id from ChangeLog
4013 or, if VERSION doesn't contain `+', with the empty string.
4014 * src/getargs.c (version): Print the value of revision.
4015 * src/revision.h: Extern revision.
4016
4017 2006-06-05 Paul Eggert <eggert@cs.ucla.edu>
4018
4019 * NEWS: Version 2.3.
4020 * configure.ac (AC_INIT): Likewise.
4021
4022 2006-05-30 Paul Eggert <eggert@cs.ucla.edu>
4023
4024 * data/glr.c (YYRECOVERING): Define to be a function-like macro
4025 with no arguments, not as an object-like macro. This is for
4026 compatibility with data/yacc.c. Problem reported by John P. Hartmann in
4027 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00059.html>.
4028 * doc/bison.texinfo (Action Features, Error Recovery, Table of Symbols):
4029 Document this.
4030
4031 2006-05-30 Joel E. Denny <jdenny@ces.clemson.edu>
4032
4033 * src/getargs.c (usage): Back out yesterday's modification of the
4034 --help output so that we don't have to wait for translation before
4035 releasing 2.3.
4036
4037 2006-05-29 Paul Eggert <eggert@cs.ucla.edu>
4038
4039 * doc/bison.texinfo (Introduction): Don't say "GLR grammar".
4040 Problem reported by Akim Demaille.
4041
4042 2006-05-29 Joel E. Denny <jdenny@ces.clemson.edu>
4043
4044 * src/getargs.c (usage): Mention GLR not just LALR(1) in --help output.
4045
4046 2006-05-26 Paul Eggert <eggert@cs.ucla.edu>
4047
4048 * data/yacc.c (yy_reduce_print): Omit trailing white space in
4049 generated source code. Problem reported by Frans Englich in
4050 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00049.html>.
4051
4052 2006-05-22 Paul Eggert <eggert@cs.ucla.edu>
4053
4054 * Makefile.maint (gzip_rsyncable, GZIP_ENV): Compute within the
4055 shell, not within 'make', so that 'make' by an ordinary builder
4056 (using GNU make) does not worry about configuring gzip. This also
4057 works around a bug reported independently by Keith Thompson and by
4058 Georg Schwarz, whereby gzip 1.2.4 --help would output usage on
4059 stderr rather than stdout, messing up the build logs.
4060
4061 2006-05-21 Joel E. Denny <jdenny@ces.clemson.edu>
4062
4063 * data/yacc.c (yyparse): Wrap the final return from yyparse inside YYID
4064 to make sure that YYID will never be unused. This fixes a 'make
4065 maintainer-check' failure caused by the recent changes to the 'Trivial
4066 grammars' test case, which caused g++ 4.1.0 to complain that YYID was
4067 not used.
4068 * data/glr.c (yyparse): Wrap yyparse's return inside YYID just in case.
4069
4070 2006-05-21 Joel E. Denny <jdenny@ces.clemson.edu>
4071
4072 * data/glr.c (yyresolveLocations): Remove bogus YYASSERT that the
4073 state before an empty RHS is always resolved here. Only the location
4074 of that state is guaranteed to be resolved, and that's enough. This
4075 fixes the remaining bug reported by Derek M. Jones in
4076 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00027.html>.
4077 * tests/glr-regression.at (Uninitialized location when reporting
4078 ambiguity): Test the above case.
4079 Also, the embedded comments in this test case claim it checks the case
4080 of an empty RHS that has inherited the initial location. However, the
4081 corresponding LHS was already resolved, so yyresolveLocations didn't
4082 actually have reason to modify it. Fix this by forcing
4083 nondeterministic operation at the beginning of the parse.
4084
4085 2006-05-20 Paul Eggert <eggert@cs.ucla.edu>
4086
4087 * data/c.m4 (b4_yy_symbol_print_generate):
4088 (b4_yy_symbol_print_generate): Use 'YYSTYPE const' rather than
4089 'const YYSTYPE', and similarly for YYLTYPE. This fixes one
4090 of the bugs reported today by Derek M Jones in
4091 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00027.html>.
4092 * doc/bison.texinfo (Value Type): Document that YYSTYPE must be
4093 defined to be a type name without parens or brackets.
4094 (Location Type): Similarly for YYLTYPE.
4095 * tests/regression.at (Trivial grammars): Put in a test for this
4096 bug that will be caught by 'make maintainer-check' (though not,
4097 alas, by 'make check' unless your compiler is picky).
4098
4099 2006-05-19 Paul Eggert <eggert@cs.ucla.edu>
4100
4101 * NEWS: Version 2.2.
4102 * configure.ac (AC_INIT): Likewise.
4103
4104 2006-05-17 Joel E. Denny <jdenny@ces.clemson.edu>
4105
4106 * data/glr.c (yyreportTree): Make room in yystates for the state
4107 preceding the RHS. This fixes the segmentation fault reported by Derek
4108 M. Jones in
4109 <http://lists.gnu.org/archive/html/help-bison/2006-05/msg00035.html>.
4110 (yyreportTree, yypdumpstack): Subtract 1 from yyrule before printing
4111 to the user. Reported for yyreportTree by Derek M. Jones later in the
4112 same thread.
4113 * THANKS: Add Derek M. Jones.
4114 Update my email address.
4115 Fix typo in Steve Murphy's name.
4116
4117 2006-05-14 Paul Eggert <eggert@cs.ucla.edu>
4118
4119 * data/glr.c (yyreportSyntaxError): Fix off-by-one error in
4120 checking against YYLAST that caused the parser to miss a potential
4121 alternative in its diagnostic.
4122 Problem reported by Maria Jose Moron Fernandez in
4123 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00024.html>.
4124 * data/lalr1.cc (yysyntax_error_): Likewise.
4125 * data/yacc.c (yysyntax_error): Likewise.
4126 * tests/regression.at (_AT_DATA_DANCER_Y): Use static array for
4127 tokens, in case we run into an older C compiler.
4128 (_AT_DATA_EXPECT2_Y, AT_CHECK_EXPECT2): New macros.
4129 Use them to check for the off-by-one error fixed above.
4130
4131 * data/yacc.c (yytnamerr): Fix typo: local var should be of type
4132 YYSIZE_T, not size_t.
4133 * tests/regression.at (Trivial grammars): New test, to catch
4134 the error fixed by the above patch.
4135
4136 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
4137
4138 * doc/bison.texinfo (C++ Bison Interface): Clarify the naming
4139 scheme.
4140 Reported by Steve Murphy.
4141
4142 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
4143
4144 * data/glr.cc, data/lalr1.cc: Using %defines is mandatory.
4145 * data/glr.cc: b4_location_flag is now b4_locations_flag.
4146
4147 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
4148
4149 Implement --trace=m4.
4150 * src/getargs.c (trace_types, trace_args): Accept trace_m4.
4151 * src/output.c (output_skeleton): When set, pass -dV to m4.
4152
4153 Factor the handling of flags in m4.
4154 * src/output.c (prepare): Rename the muscle names debug, defines,
4155 error_verbose to debug_flag, defines_flag, error_verbose_flag.
4156 * data/c.m4: Adjust.
4157 (_b4_define_flag_if, b4_define_flag_if, b4_defines_if): New.
4158 Use b4_define_flag_if to define other b4_FLAG_if macros.
4159 (b4_location_if): As a consequence, rename as...
4160 (b4_locations_if): this, for consistency.
4161 Adjust all the skeletons.
4162
4163 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
4164
4165 * etc/bench.pm: Shorten bench names.
4166
4167 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
4168
4169 * src/output.h, src/output.c (error_verbose): Move to...
4170 * src/getargs.h, src/getargs.c: here.
4171 Sort the flags.
4172 Adjust dependencies.
4173
4174 2006-05-13 Paul Eggert <eggert@cs.ucla.edu>
4175
4176 * data/c.m4 (b4_copyright): Put the special exception for Bison
4177 skeletons here, so we don't have to put it in each skeleton. All
4178 uses changed. Suggested by Akim Demaille. Also, wrap the
4179 copyright notice, in case it is longer than 80 columns. Replace
4180 comma by newline after title.
4181
4182 2006-05-11 Paul Eggert <eggert@cs.ucla.edu>
4183
4184 * doc/bison.texinfo (Calc++ Scanner): The flex behavior is an
4185 incompatibility, not a bug. Mention that it wasn't fixed as of
4186 flex 2.5.33.
4187
4188 2006-05-11 Akim Demaille <akim@lrde.epita.fr>
4189
4190 * examples/extexi: Enforce the precedence of concatenation over
4191 >>.
4192 Reported by Tommy Nordgren.
4193
4194 2006-05-11 Akim Demaille <akim@lrde.epita.fr>
4195
4196 * data/lalr1.cc (yytranslate_): Rename token as t to avoid clashes
4197 with the member "token".
4198 Reported by Martin Nylin.
4199
4200 2006-05-08 Paul Eggert <eggert@cs.ucla.edu>
4201
4202 * data/glr.c: Switch to Bison 2.2 special-exception language in
4203 the copyright notice. Use more-regular format for titles and
4204 copyright notices.
4205 * data/glr.cc: Likewise.
4206 * data/location.cc: Likewise.
4207 * data/yacc.cc: Likewise.
4208 * doc/bison.texinfo (Conditions): Document this.
4209 * NEWS: likewise. Upgrade version to 2.2.
4210
4211 2006-04-27 Akim Demaille <akim@lrde.epita.fr>
4212
4213 * data/glr.cc: Remove dead code.
4214
4215 2006-04-25 Paul Eggert <eggert@cs.ucla.edu>
4216
4217 * bootstrap: Comment out the AM_CPPFLAGS line, since we don't use
4218 that variable and the line breaks the bootstrap. Problem reported
4219 by Juan M. Guerrero.
4220
4221 2006-04-24 Akim Demaille <akim@lrde.epita.fr>
4222
4223 * doc/bison.texinfo (Multiple start-symbols): New.
4224
4225 2006-04-24 Akim Demaille <akim@lrde.epita.fr>
4226
4227 * etc/README, etc/bench.pl: New.
4228
4229 2006-04-03 Akim Demaille <akim@lrde.epita.fr>
4230
4231 * src/scan-gram.l: Be robust to BRACED_CODE appearing before any
4232 rule.
4233 Reported by Mickael Labau.
4234 * tests/input.at (Torturing the Scanner): Test it.
4235
4236 2006-03-16 Paul Eggert <eggert@cs.ucla.edu>
4237
4238 * doc/bison.texinfo (Decl Summary): Don't mention yylloc twice.
4239 Problem reported by Bob Rossi.
4240
4241 2006-03-13 Paul Eggert <eggert@cs.ucla.edu>
4242
4243 * doc/bison.texinfo: Remove @shorttitlepage stuff; it wasn't used
4244 and didn't really work.
4245 For the index, use @ifnotinfo, not @iftex.
4246 Minor cleanups of spacing and terminology.
4247
4248 2006-03-12 Akim Demaille <akim@lrde.epita.fr>
4249
4250 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Fix the definition
4251 of AT_NAME_PREFIX when %name-prefix is not used.
4252
4253 2006-03-12 Akim Demaille <akim@lrde.epita.fr>
4254
4255 Apply --prefix to C++ skeletons too: they change the namespace.
4256 The test suite already exercize these cases.
4257 * data/c++.m4 (b4_namespace): New.
4258 * data/lalr1.cc, data/glr.cc, data/location.cc: Use it instead of `yy'.
4259 * data/lalr1.cc (yytnameerr_): Move its definition into the namespace.
4260 * data/yacc.c, data/glr.c: Remove a useless `[]'.
4261 * doc/bison.texinfo: Document it.
4262 (Option Cross Key): Use @multitable in all formats. It looks
4263 nicer, even in TeX outputs.
4264 (Rules): Use the same code whatever the output type is.
4265 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS)
4266 (_AT_BISON_OPTION_POPDEFS): Support AT_NAME_PREFIX.
4267 * tests/calc.at: Use it, instead of hard coding `yy'.
4268
4269 2006-03-10 Akim Demaille <akim@lrde.epita.fr>
4270
4271 * TODO: Remove dead items.
4272
4273 2006-03-10 Akim Demaille <akim@lrde.epita.fr>
4274
4275 * doc/FAQ: Remove, merged into...
4276 * doc/bison.texinfo (FAQ): this.
4277 * doc/Makefile.am (EXTRA_DIST): Adjust.
4278
4279 2006-03-10 Akim Demaille <akim@lrde.epita.fr>
4280
4281 * data/c.m4 (b4_token_enum): Always define the enum of tokens,
4282 even if empty.
4283 * data/lalrl1.cc, data/glr.cc (parser::token_type): New.
4284 * doc/bison.texinfo (Calc++ Scanner): Use it.
4285
4286 2006-03-09 Paul Eggert <eggert@cs.ucla.edu>
4287
4288 Fix two nits reported by twlevo, plus one more that I discovered.
4289
4290 * src/assoc.h (assoc_to_string): Give a name to the arg, as
4291 this is the usual Bison style.
4292 * src/location.h (location_print): Likewise.
4293
4294 * src/reader.h (token_name): Likewise.
4295
4296 2006-03-08 Paul Eggert <eggert@cs.ucla.edu>
4297
4298 Fix some nits reported by twlevo.
4299 * doc/FAQ: Remove ancient Y2K FAQ, replacing it with "secure"
4300 and "POSIX". Use more-modern syntax for URLs. Mention C++
4301 and ask for Java. Don't hardwire OS version numbers. Add
4302 copyright notice.
4303 * m4/.cvsignore: Add unistd_h.m4, for latest gnulib.
4304 * src/conflicts.c (solved_conflicts_obstack): Now static.
4305
4306 2006-03-08 Joel E. Denny <jdenny@ces.clemson.edu>
4307
4308 * doc/bison.texinfo (Introduction): Mention GLR and C++ as on the web
4309 page. Say "you can use it" not "you may use it" as on the web page;
4310 we're describing capabilities not granting permission.
4311
4312 2006-03-06 Paul Eggert <eggert@cs.ucla.edu>
4313
4314 * data/glr.c (yyresolveLocations): Rename local variables to avoid
4315 shadowing warnings. Use usual patter for iterating through RHS.
4316 * tests/glr-regression.at
4317 (Uninitialized location when reporting ambiguity):
4318 Modify yylex so that it uses its argument, rather than trying
4319 to rely on ARGSUSED (which doesn't work for gcc with warnings).
4320 const char -> char const.
4321
4322 * tests/Makefile.am ($(srcdir)/package.m4, maintainer-check-valgrind):
4323 Don't use tabs inside commands; it messes up 'ps'.
4324 Problem reported by twlevo.
4325
4326 2006-03-06 Joel E. Denny <jdenny@ces.clemson.edu>
4327
4328 * tests/glr-regression.at (Uninitialized location when reporting
4329 ambiguity): New test case.
4330 * data/glr.c (yyresolveLocations): New function, which uses
4331 YYLLOC_DEFAULT.
4332 (yyresolveValue): Invoke yyresolveLocations before reporting an
4333 ambiguity.
4334 * doc/bison.texinfo (Default Action for Locations): Note
4335 YYLLOC_DEFAULT's usage for ambiguity locations.
4336 (GLR Semantic Actions): Cross-reference those notes.
4337
4338 2006-03-04 Joel E. Denny <jdenny@ces.clemson.edu>
4339
4340 * tests/glr-regression.at (Leaked semantic values when reporting
4341 ambiguity): Remove unnecessary union and type declarations.
4342 (Leaked lookahead after nondeterministic parse syntax error): New test
4343 case.
4344 * data/glr.c (yyparse): Check for zero stacks remaining before
4345 attempting to shift the lookahead so that you don't lose it.
4346
4347 2006-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
4348
4349 Avoid memory leaks by not invoking longjmp in yyreportAmbiguity.
4350 * tests/glr-regression.at (Leaked semantic values when reporting
4351 ambiguity): New test case.
4352 * data/glr.c (yyreportAmbiguity): Invoke yyyerror directly and return
4353 yyabort rather than invoking yyFail, which invokes longjmp. Remove the
4354 now unnecessary yystackp parameter.
4355 (yyresolveValue): Return yyreportAmbiguity's result. Now the necessary
4356 destructors can be called.
4357
4358 * tests/glr-regression.at: Don't invoke bison with `-t' unnecessarily
4359 in existing testcases.
4360
4361 2006-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
4362
4363 Don't leak semantic values for parent RHS when a user action cuts the
4364 parser, and clean up related code a bit.
4365 * tests/glr-regression.at (Leaked merged semantic value if user action
4366 cuts parse): Rename to...
4367 (Leaked semantic values if user action cuts parse): ... this. Add check
4368 for leaked parent RHS values.
4369 * data/glr.c (yydestroyGLRState): In debugging output, distinguish
4370 between an unresolved state (non-empty chain of semantic options) and
4371 an incomplete one (signaled by an empty chain).
4372 (yyresolveStates): Document the interface. Move all manipulation of a
4373 successfully or unsuccessfully resolved yyGLRState to...
4374 (yyresolveValue): ... here so that yyresolveValue always leaves a
4375 yyGLRState with consistent data and thus is easier to understand.
4376 Remove the yyvalp and yylocp parameters since they are always just
4377 taken from the yys parameter. When reporting a discarded merged value
4378 in debugging output, note that it is incompletely merged. Document the
4379 interface.
4380 (yyresolveAction): If resolving any of the RHS states fails, destroy
4381 them all rather than leaking them. Thus, as long as user actions are
4382 written to clean up the RHS correctly, yyresolveAction always cleans up
4383 the RHS of a semantic option. Document the interface.
4384
4385 2006-02-27 Paul Eggert <eggert@cs.ucla.edu>
4386
4387 * data/glr.c (yyexpandGLRStack): Catch an off-by-one error that
4388 led to a segmentation fault in GNU Pascal. Problem reported
4389 by Waldek Hebisch.
4390
4391 2006-02-21 Joel E. Denny <jdenny@ces.clemson.edu>
4392
4393 * doc/bison.texinfo (Mid-Rule Actions): Explain how to bury a
4394 mid-rule action inside a nonterminal symbol in order to declare a
4395 destructor for its semantic value.
4396
4397 2006-02-16 Paul Eggert <eggert@cs.ucla.edu>
4398
4399 * data/yacc.c [(! defined yyoverflow || YYERROR_VERBOSE) && !
4400 YYSTACK_USE_ALLOCA && ! defined YYSTACK_ALLOC && defined
4401 __cplusplus && ! defined _STDLIB_H && !
4402 ((defined YYMALLOC || defined malloc) && (defined YYFREE ||
4403 defined free))]: Include <stdlib.h> rather than rolling our own
4404 declarations of malloc and free, to avoid problems with
4405 incompatible declarations (using 'throw') C++'s stdlib.h. This
4406 should fix Debian bug 340012
4407 <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=340012>,
4408 reported by Guillaume Melquiond.
4409
4410 2006-02-13 Paul Eggert <eggert@cs.ucla.edu>
4411
4412 * NEWS: Clarify symbols versus types in unused-value warnings.
4413
4414 * configure.ac (AC_INIT): Bump version number.
4415
4416 2006-02-13 Paul Eggert <eggert@cs.ucla.edu>
4417
4418 * NEWS: Version 2.1a.
4419 * tests/headers.at (AT_TEST_CPP_GUARD_H): Declare yyerror and yylex,
4420 since C99 requires this.
4421
4422 2006-02-11 Paul Eggert <eggert@cs.ucla.edu>
4423
4424 * m4/c-working.m4: New file.
4425 * configure.ac (BISON_TEST_FOR_WORKING_C_COMPILER): Use it.
4426
4427 2006-02-10 Paul Eggert <eggert@cs.ucla.edu>
4428
4429 * Makefile.maint: Merge from coreutils.
4430
4431 2006-02-09 Paul Eggert <eggert@cs.ucla.edu>
4432
4433 More portability fixes for problems summarized by Nelson H. F. Beebe.
4434
4435 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Catch a
4436 configuration screwup "./configure CC=/opt/SUNWspro/bin/c89
4437 CFLAGS="-xarch=generic64" CXX=/opt/SUNWspro/bin/CC
4438 LDFLAGS="-xarch=generic64" with Sun C 5.7 on Solaris 10; this
4439 messes up because C++ code is compiled in 32-bit mode but linked
4440 in 64-bit mode.
4441
4442 2006-02-08 Paul Eggert <eggert@cs.ucla.edu>
4443
4444 More portability fixes for problems summarized by Nelson H. F. Beebe.
4445
4446 * doc/bison.texinfo (Calc++ Scanner): Work around a bug in flex
4447 2.5.31. This resembles the 2005-10-10 patch to src/scan-skel.l.
4448
4449 * examples/calc++/Makefile.am (check_PROGRAMS): Renamed from
4450 nodist_PROGRAMS, since we don't need to actually compile the
4451 example if we're just doing a plain 'make'. This avoids bothering
4452 the installer unnecessarily about problems due to weird C++
4453 compilers.
4454
4455 2006-02-06 Paul Eggert <eggert@cs.ucla.edu>
4456
4457 More portability fixes for problems summarized by Nelson H. F. Beebe.
4458
4459 * tests/headers.at (AT_TEST_CPP_GUARD_H): Use #include <...> rather
4460 than #include "...", and compile with -I'.'. The old method was
4461 not portable, according to Posix and the C standard, and it does
4462 not work with Sun C 5.7, where previous #line directives affect
4463 the working directory used in later #include "..." directives.
4464
4465 2006-02-06 Juan Manuel Guerrero <juan.guerrero@gmx.de>
4466
4467 Various DJGGP specific issues in /djgpp
4468
4469 2006-02-02 Paul Eggert <eggert@cs.ucla.edu>
4470
4471 More portability fixes for problems summarized by Nelson H. F. Beebe.
4472
4473 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check that
4474 '#include <map>' works and that you can apply ++ to iterators.
4475
4476 2006-02-01 Paul Eggert <eggert@cs.ucla.edu>
4477
4478 Work around portability problems summarized by Nelson H. F. Beebe in
4479 <http://lists.gnu.org/archive/html/bug-bison/2005-09/msg00021.html>.
4480
4481 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check
4482 that '#include <string>' works.
4483
4484 * data/lalr1.cc (yytranslate_): No longer inline, to work around a
4485 porting problem to g++ 3.4.3 on Darwin 7.9.0, where g++ complained
4486 "warning: sorry: semantics of inline function static data `const
4487 unsigned char translate_table[262]' are wrong (you'll wind up with
4488 multiple copies)".
4489
4490 * lib/bbitset.h (struct bitset_vtable): Rename members not, and,
4491 or, xor to not_, and_, or_, and xor_, respectively. This works
4492 around a bug in GCC 3.4.3 on Irix 6.5, which apparently has a
4493 random system header somewhere that includes the equivalent of
4494 <iso646.h>.
4495
4496 * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that "$CC
4497 -E" works; it apparently doesn't work with PathScale EKO Compiler
4498 Suite Version 2.0.
4499
4500 2006-01-30 Joel E. Denny <jdenny@ces.clemson.edu>
4501
4502 During deterministic GLR operation, user actions should be able to
4503 influence the parse by changing yychar. To make this easier to fix and
4504 to make glr.c easier to evolve in general, don't maintain yytoken in
4505 parallel with yychar; just compute yytoken when needed.
4506 * tests/glr-regression.at (Incorrect lookahead during deterministic
4507 GLR): Check that setting yychar in a user action has the intended
4508 effect.
4509 * data/glr.c (yyGLRStack): Remove yytokenp member.
4510 (yyclearin): Don't set *yytokenp.
4511 (yyprocessOneStack, yyreportSyntaxError, yyrecoverSyntaxError): Examine
4512 yychar rather than *yytokenp to determine the current lookahead.
4513 Compute yytoken locally when needed.
4514 (yyparse): Likewise. Remove the local yytoken that yytokenp used to
4515 point to.
4516
4517 * doc/bison.texinfo (Bison Options): Remove stray sentence fragment
4518 after `--report' documentation.
4519
4520 2006-01-30 Paul Eggert <eggert@cs.ucla.edu>
4521
4522 * src/parse-gram.y (grammar_declaration): Location of printer
4523 symbol is @1, not list->location. Bug reported by twlevo.
4524 * tests/input.at (Incompatible Aliases): Adjust to above change.
4525
4526 2006-01-29 Paul Eggert <eggert@cs.ucla.edu>
4527
4528 * tests/input.at (AT_CHECK_UNUSED_VALUES): Remove. Instead, do
4529 all the test at once. This makes the output easier to read in the
4530 normal case.
4531
4532 Fix a longstanding bug uncovered by bro-0.9a9/src/parse.y, which I
4533 got from <http://bro-ids.org/download.html>. The bug is that
4534 when two actions appeared in succession, the second one was
4535 scanned before the first one was added to the grammar rule
4536 as a midrule action. Bison then output the incorrect warning
4537 "parse.y:905.17-906.36: warning: unused value: $3".
4538 * src/parse-gram.y (BRACED_CODE, action): These are no longer
4539 associated with a value.
4540 (rhs): Don't invoke grammar_current_rule_action_append.
4541 (action): Invoke it here instead.
4542 * src/reader.c (grammar_midrule_action): Now extern.
4543 (grammar_current_rule_action_append): Don't invoke
4544 grammar_midrule_action; that is now the scanner's job.
4545 * src/reader.h (last_string, last_braced_code_loc):
4546 (grammar_midrule_action): New decls.
4547 * src/scan-gram.l (last_string): Now extern, sigh.
4548 (last_braced_code_loc): New extern variable.
4549 (<INITIAL>"{"): Invoke grammar_midrule_action if the current
4550 rule already has an action.
4551 (<SC_BRACED_CODE>"}"): Set last_braced_code_loc before returning.
4552 * tests/input.at (AT_CHECK_UNUSED_VALUES):
4553 Add some tests to check that the above changes fixed the bug.
4554
4555 2006-01-27 Paul Eggert <eggert@cs.ucla.edu>
4556
4557 * src/reader.c (symbol_should_be_used): Renamed from symbol_typed_p.
4558 All used changed. Check whether the symbol has a destructor,
4559 not whether it is typed.
4560 * tests/input.at (AT_CHECK_UNUSED_VALUES): Add a destructor, so
4561 that the values are still reported as unused. All line numbers
4562 adjusted.
4563
4564 2006-01-23 Paul Eggert <eggert@cs.ucla.edu>
4565
4566 Work around a bug in bro 0.8, which underparenthesizes its
4567 definition of YYLLOC_DEFAULT.
4568 * data/glr.c: Change all uses of YYLLOC_DEFAULT to parenthesize
4569 their arguments.
4570 * data/lalr1.cc: Likewise.
4571 * data/yacc.cc: Likewise.
4572
4573 2006-01-22 Paul Eggert <eggert@cs.ucla.edu>
4574
4575 Work around a bug in Pike 7.0, and give the Pike folks a
4576 better way to override the usual int widths.
4577 * data/yacc.c (b4_int_type): Use yytype_uint8, etc., so that the
4578 user can override the types.
4579 (short): #undef, to work around a bug in Pike 7.0.
4580 (yytype_uint8, yytype_int8, yytype_uint16, yytype_int16): New types.
4581 (union yyalloc.yyss): Use yytype_int16 rather than short.
4582 All uses changed.
4583 (yysigned_char): Remove.
4584 * src/parse-gram.y (YYTYPE_UINT8, YYTYPE_INT8, YYTYPE_UINT16):
4585 (YYTYPE_INT16): New macros, to test the new facility in yacc.c.
4586 * tests/regression.at (Web2c Actions): Adjust to above changes.
4587
4588 * src/reader.c (check_and_convert_grammar): New function.
4589 (reader): Close the input file even if something went wrong during
4590 parsing. Minor file descriptor leak reported by twlevo.
4591
4592 * src/assoc.c (assoc_to_string): Use a default: abort (); case
4593 to pacify gcc -Wswitch-default.
4594 * src/scan-gram.l (adjust_location): Use a default: break; case
4595 to pacify gcc -Wswitch-default.
4596 * src/scan-skel.h (skel_get_lineno, skel_get_in, skel_get_out):
4597 (skel_get_leng, skel_get_text, skel_set_lineno, skel_set_in):
4598 (skel_set_out, skel_get_debug, skel_set_debug, skel_lex_destroy):
4599 Move these decls to scan-skel.l, since they don't need to be
4600 visible elsewhere.
4601 * src/scan-skel.l: Accept the above decls.
4602 (skel_lex): New decl, to pacify GCC when unpatched flex 2.5.31
4603 is used.
4604
4605 2006-01-21 Paul Eggert <eggert@cs.ucla.edu>
4606
4607 * Makefile.cfg (local-checks-to-skip): Add changelog-check,
4608 since we don't want to insist on a version number at the start
4609 of the changelog every time.
4610 * Makefile.maint: Sync from coreutils a bit better.
4611 (sc_trailing_blank): Renamed from sc_trailing_space.
4612 All uses changed.
4613 (sc_no_if_have_config_h, sc_require_config_h):
4614 (sc_prohibit_assert_without_use): New rules.
4615 (sc_obsolete_symbols): Don't catch Makefile.maint itself.
4616 (sc_dd_max_sym_length): Fix leading spaces in rule.
4617 (sc_system_h_headers): Prefix with @.
4618 (sc_useless_cpp_parens, m4-check): Output line numbers.
4619 (changelog-check): Allow version only in head.
4620 * data/c.m4: Use "defined FOO" instead of "defined (FOO)", to
4621 satisfy new Makefile.maint rule.
4622 * data/glr.c: Likewise.
4623 * data/glr.cc: Likewise.
4624 * data/lalr1.cc: Likewise.
4625 * data/yacc.c: Likewise.
4626 * lib/ebitsetv.c: Likewise.
4627 * lib/lbitset.c: Likewise.
4628 * lib/subpipe.c: Likewise.
4629 * lib/timevar.c: Likewise.
4630 * src/system.h: Likewise.
4631 * data/yacc.c (YYSTYPE): Don't generate trailing spaces in output.
4632 * djgpp/Makefile.maint: Add copyright notice.
4633 * djgpp/README.in: Likewise.
4634 * djgpp/config.bat: Likewise.
4635 * djgpp/config.site: Likewise.
4636 * djgpp/config_h.sed: Likewise.
4637 * djgpp/djunpack.bat: Likewise.
4638 * djgpp/config.sed: Fix copyright notice to match standard format.
4639 * djgpp/subpipe.h: Likewise.
4640 * lib/bitsetv-print.c: Likewise.
4641 * lib/bitsetv.c: Likewise.
4642 * lib/subpipe.h: Likewise.
4643 * lib/timevar.c: Likewise.
4644 * lib/timevar.h: Likewise.
4645 * djgpp/subpipe.c: Use standard recipe for config.h.
4646 * lib/abitset.c: Likewise.
4647 * lib/bitset.c: Likewise.
4648 * lib/bitset_stats.c: Likewise.
4649 * lib/bitsetv-print.c: Likewise.
4650 * lib/bitsetv.c: Likewise.
4651 * lib/ebitsetv.c: Likewise.
4652 * lib/get-errno.c: Likewise.
4653 * lib/lbitset.c: Likewise.
4654 * lib/subpipe.c: Likewise.
4655 * lib/timevar.c: Likewise.
4656 * lib/vbitset.c: Likewise.
4657 * tests/local.at: Likewise.
4658 * src/scan-gram.l: Don't include verify.h, since system.h does
4659 that for us.
4660 * .x-sc_require_config_h: New file.
4661 * .x-sc_unmarked_diagnostics: New file.
4662
4663 2006-01-20 Paul Eggert <eggert@cs.ucla.edu>
4664
4665 Be a bit more systematic about using 'abort'.
4666 * lib/abitset.c (abitset_test): Remove ATTRIBUTE_UNUSED; not needed.
4667 * lib/bitset.c (bitset_bytes, bitset_init, bitset_op4_cmp):
4668 Put 'default: abort ();' before some other case, to satisfy older
4669 pedantic compilers.
4670 * lib/bitset_stats.c (bitset_stats_init): Likewise.
4671 * lib/ebitset.c (ebitset_elt_find, ebitset_op3_cmp): Likewise.
4672 * lib/lbitset.c (lbitset_elt_find, lbitset_op3_cmp): Likewise.
4673 * src/conflicts.c (resolve_sr_conflict): Likewise.
4674 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str):
4675 (get_decision_str, get_orientation_str, get_node_alignment_str):
4676 (get_arrow_mode_str, get_crossing_type_str, get_view_str):
4677 (get_linestyle_str, get_arrowstyle_str): Likewise.
4678 * src/conflicts.c (resolve_sr_conflict):
4679 Use a default case rather than one for the one remaining enum
4680 value, to catch invalid enum values as well.
4681 * src/lalr.c (set_goto_map, map_goto):
4682 Prefer "assert (FOO);" to "if (!FOO) abort ();".
4683 * src/nullable.c (nullable_compute, token_definitions_output):
4684 Likewise.
4685 * src/reader.c (packgram, reader): Likewise.
4686 * src/state.c (transitions_to, state_new, state_reduction_find):
4687 Likewise.
4688 * src/symtab.c (symbol_user_token_number_set, symbol_make_alias):
4689 (symbol_pack): Likewise.
4690 * src/tables.c (conflict_row, pack_vector): Likewise.
4691 * src/scan-skel.l (QPUTS): Remove unnecessary parens.
4692 (BASE_QPUTS, "@output ".*\n): Remove unnecessary asserts.
4693 * src/system.h: Don't include <assert.h>.
4694 (assert): New macro.
4695
4696 * doc/bison.texinfo (Prologue, Rules, Actions, Union Decl, Action Decl):
4697 (Destructor Decl, Parser Function, Pure Calling):
4698 Describe rules for braces inside C code more carefully.
4699
4700 2006-01-19 Paul Eggert <eggert@cs.ucla.edu>
4701
4702 Fix some porting glitches found by Nelson H. F. Beebe.
4703 * lib/abitset.c (abitset_resize): Rewrite to avoid warnings from
4704 compilers that don't understand that abort () does not return.
4705 * src/state.c (transitions_to): Likewise.
4706 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check
4707 that '#include <cstdlib>' works.
4708 * src/system.h (INT8_MIN, INT16_MIN, INT32_MIN, INT8_MAX):
4709 (INT16_MAX, UINT8_MAX, INT32_MAX, UINT16_MAX, UINT32_MAX):
4710 #undef if ! defined __STDC_VERSION__ || __STDC_VERSION__ < 199901,
4711 for the benefit of some pre-C99 compilers.
4712
4713 * bootstrap: Undo changes to gnulib files that autoreconf made.
4714
4715 Minor fixups to get 'make maintainer-check' to work.
4716 * configure.ac: Don't use -Wnested-externs, as it's incompatible
4717 with the new verify.h implementation.
4718 * data/c.m4 (b4_yy_symbol_print_generate): YYUSE (yyoutput).
4719 * data/glr.c (YYUSE): Depend on __GNUC__ as well.
4720 * data/yacc.c (YYUSE): Likewise.
4721 * data/lalr1.cc (yysyntax_error_): YYUSE (yystate).
4722 * lib/subpipe.c (end_of_output_subpipe): The args are unused.
4723 * src/parse-gram.y (declaration): Don't pass a string constant
4724 to a function that expects char *, since GCC might complain
4725 about the constant value.
4726 * src/reader.c (symbol_typed_p): Add parens to pacify GCC.
4727 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): #undef yylloc and yylval
4728 before #defining them.
4729 * tests/glr-regression.at
4730 (Incorrectly initialized location for empty right-hand side in GLR):
4731 In yyerror, use the msg arg.
4732 (Corrupted semantic options if user action cuts parse):
4733 (Incorrect lookahead during deterministic GLR):
4734 (Incorrect lookahead during nondeterministic GLR):
4735 Don't name a local var 'index'; it shadows string.h's 'index'.
4736
4737 2006-01-19 Akim Demaille <akim@epita.fr>
4738
4739 * tests/calc.at (_AT_DATA_CALC_Y): Initialize the whole initial
4740 location, not just parts of it.
4741
4742 2006-01-18 Paul Eggert <eggert@cs.ucla.edu>
4743
4744 * NEWS: Document the fact that multiple %unions are now allowed.
4745 * doc/bison.texinfo (Union Decl): Likewise.
4746 * TODO: This feature is now implemented, so remove it from
4747 the wishlist.
4748
4749 * Makefile.maint: Merge with coreutils Makefile.maint.
4750 (CVS_LIST): Use build-aux version if available.
4751 (VERSION_REGEXP): New macro.
4752 (syntax-check-rules): Add sc_no_if_have_config_h,
4753 sc_prohibit_assert_without_use, sc_require_config_h,
4754 sc_useless_cpp_parens.
4755 (sc_obsolete_symbols): Check for O_NDELAY.
4756 (sc_dd_max_sym_length): Track coreutils.
4757 (sc_unmarked_diagnostics): Look in all files, not just *.c.
4758 (sc_useless_cpp_parens): New rule.
4759 (news-date-check): Look for version or today's date.
4760 (changelog-check): Don't require version number near head.
4761 (copyright-check): Use current year instead of hardwiring 2005.
4762 (my-distcheck): Depend on $(release_archive_dir)/$(prev-tgz).
4763 (announcement): Add --gpg-key-ID.
4764
4765 * djgpp/config.sed: Add copyright notice, and replace "filesystem"
4766 with "file system".
4767
4768 Avoid undefined behavior that addressed just before the start of an
4769 array. Problem reported by twlevo.
4770 * src/reader.c (packgram): Prepend a new sentinel before ritem.
4771 * src/lalr.c (build_relations): Rely on new sentinel.
4772 * src/gram.c (gram_free): Adjust to new sentinel.
4773
4774 2006-01-12 Joel E. Denny <jdenny@ces.clemson.edu>
4775
4776 * data/glr.c (yyGLRStateSet): Rename yylookaheadStatuses to
4777 yylookaheadNeeds. All uses updated.
4778 (yysplitStack): Rename local yynewLookaheadStatuses to
4779 yynewLookaheadNeeds.
4780 * data/glr-regression.at (Incorrect lookahead during nondeterministic
4781 GLR): In comments, change `lookahead status' to `lookahead need'.
4782
4783 2006-01-11 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
4784
4785 * data/glr.c (yysplitStack): A little stylistic rewrite.
4786
4787 2006-01-11 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
4788
4789 * data/glr.c (yyaddDeferredAction): Flesh out the comment.
4790
4791 2006-01-11 Joel E. Denny <jdenny@ces.clemson.edu>
4792
4793 * doc/bison.texinfo: Fix some typos.
4794 (GLR Semantic Actions): New subsection discussing special
4795 considerations because GLR semantic actions might be deferred.
4796 (Actions): Mention look-ahead usage of yylval.
4797 (Actions and Locations): Mention look-ahead usage of yylloc.
4798 (Special Features for Use in Actions): Add YYEOF entry and mention it
4799 in the yychar entry.
4800 In the yychar entry, remove mention of the local yychar case (pure
4801 parser) since this is irrelevant information when writing semantic
4802 actions and since it's already discussed in `Table of Symbols' where
4803 yychar is otherwise described as an external variable.
4804 In the yychar entry, don't call it the `current' look-ahead since it
4805 isn't when semantic actions are deferred.
4806 In the yychar and yyclearin entries, add note about deferred semantic
4807 actions.
4808 Add yylloc and yylval entries discussing look-ahead usage.
4809 (Look-Ahead Tokens): When discussing yychar, don't call it the
4810 `current' look-ahead, and do mention yylval and yylloc.
4811 (Error Recovery): Cross-reference `Action Features' when mentioning
4812 yyclearin.
4813 (Table of Symbols): In the yychar entry, don't call it the `current'
4814 look-ahead.
4815 In the yylloc and yylval entries, mention look-ahead usage.
4816
4817 2006-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
4818
4819 * tests/glr-regression.at: Update copyright year to 2006.
4820
4821 2006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
4822
4823 * data/glr.c (yyGLRStateSet): Add yybool* yylookaheadStatuses member to
4824 use during nondeterministic operation to track which stacks have
4825 actually needed the current lookahead.
4826 (yyinitStateSet, yyfreeStateSet, yyremoveDeletes, yysplitStack):
4827 Allocate, deallocate, resize, and otherwise shuffle space for
4828 yylookaheadStatuses in parallel with yystates member of yyGLRStateSet.
4829 (yysplitStack, yyprocessOneStack, yyparse): Set lookahead status
4830 appropriately during nondeterministic operation.
4831 (yySemanticOption): Add int yyrawchar, YYSTYPE yyval, and YYLTYPE yyloc
4832 members to store the current lookahead to be used by the deferred
4833 user action.
4834 (yyaddDeferredAction): Add size_t yyk parameter specifying the stack
4835 from which the RHS is taken. Set the lookahead members of the new
4836 yySemanticOption according to the lookahead status for stack yyk.
4837 (yyglrShiftDefer, yyglrReduce): Pass yyk parameter on to
4838 yyaddDeferredAction.
4839 (yyresolveAction): Set yychar, yylval, and yylloc to the lookahead
4840 members of yySemanticOption before invoking yyuserAction, and then set
4841 them back to their current values afterward.
4842 (yyparse): Set yychar = YYEMPTY where yytoken = YYEMPTY.
4843 (yyreportAmbiguity): Add /*ARGSUSED*/ to pacify lint.
4844 * tests/glr-regression.at: Remove `.' from the ends of recent test case
4845 titles for consistency.
4846 (Leaked merged semantic value if user action cuts parse): In order to
4847 suppress lint warnings, use arguments in merge function, and assign
4848 char value < 128 in main.
4849 (Incorrect lookahead during deterministic GLR): New test case.
4850 (Incorrect lookahead during nondeterministic GLR): New test case.
4851
4852 2006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
4853
4854 * data/c.m4 (b4_yy_symbol_print_generate): In yy_symbol_print, accept
4855 !yyvaluep as signal that no semantic value is available to print.
4856 * data/glr.c (yydestroyGLRState): If state is not resolved, don't try
4857 to print a semantic value.
4858
4859 2006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
4860
4861 * tests/glr-regression.at: For consistency with my newer test cases,
4862 don't thank myself.
4863
4864 2006-01-05 Joel E. Denny <jdenny@ces.clemson.edu>
4865
4866 * data/glr.c (yyresolveValue): When merging semantic options, if at
4867 least one user action succeeds but a later one cuts the parse, then
4868 destroy the semantic value before returning rather than leaking it.
4869 (yyresolveStates): If a user action cuts the parse and thus
4870 yyresolveValue fails, ignore the (unset) semantic value rather than
4871 corrupting the yyGLRState, and empty the semantic options list since
4872 the user actions should have called all necessary destructors.
4873 Simplify code with YYCHK.
4874 * tests/glr-regression.at (Corrupted semantic options if user action
4875 cuts parse): New test case.
4876 (Undesirable destructors if user action cuts parse): New test case.
4877 Before applying any of this patch, this test case never actually failed
4878 for me... but only because the corrupted semantic options usually
4879 masked this bug.
4880 (Leaked merged semantic value if user action cuts parse): New test
4881 case.
4882
4883 2006-01-05 Akim Demaille <akim@epita.fr>
4884
4885 * src/reader.c, src/symlist.h, src/symlist.c: s/mid_rule/midrule/.
4886
4887 2006-01-04 Paul Eggert <eggert@cs.ucla.edu>
4888
4889 * data/c.m4 (b4_c_modern): New macro, with a new provision for
4890 _MSC_VER. Problem reported by Cenzato Marco.
4891 (b4_c_function_def): Use it.
4892 * data/yacc.c (YYMODERN_C): Remove. All uses replaced by
4893 b4_c_modern.
4894 (yystrlen, yystpcpy, yyparse): Use b4_c_function... macros rather
4895 than rolling our own.
4896
4897 2006-01-04 Akim Demaille <akim@epita.fr>
4898
4899 Also warn about non-used mid-rule values.
4900 * src/symlist.h, src/symlist.c (symbol_list): Add a mid_rule
4901 member.
4902 (symbol_list_new): Adjust.
4903 * src/reader.c (symbol_typed_p): New.
4904 (grammar_rule_check): Use it.
4905 (grammar_midrule_action): Bind a mid-rule LHS to its rule.
4906 Check its rule.
4907 * tests/input.at (AT_CHECK_UNUSED_VALUES): New.
4908 Use it.
4909 * tests/actions.at (Exotic Dollars): Adjust.
4910
4911 2006-01-04 Akim Demaille <akim@epita.fr>
4912
4913 * src/reader.c (grammar_midrule_action): If $$ is set in a
4914 mid-rule, move the `used' bit to its lhs.
4915 * tests/input.at (Unused values): New.
4916 * tests/actions.at (Exotic Dollars): Adjust: exp is not typed.
4917
4918 2006-01-03 Paul Eggert <eggert@cs.ucla.edu>
4919
4920 * doc/bison.texinfo (Bison Options): Say more accurately what
4921 --yacc does.
4922 * src/parse-gram.y (rules_or_grammar_declaration): Don't complain
4923 about declarations in the grammar when in Yacc mode, as POSIX does
4924 not require a diagnostic when the grammar uses extensions.
4925
4926 * src/reduce.c (reduce_grammar): Remove unnecessary cast to bool.
4927
4928 Warn about dubious constructions like "%token T T".
4929 Reported by twlevo.
4930 * src/symtab.h (struct symbol.declared): New member.
4931 * src/symtab.c (symbol_new): Initialize it to false.
4932 (symbol_class_set): New arg DECLARING, specifying whether
4933 this is a declaration that we want to warn about, if there
4934 is more than one of them. All uses changed.
4935
4936 * data/glr.c, data/glr.cc, data/lalr1.cc, data/yacc.c:
4937 Allow multiple %union directives, whose contents concatenate.
4938 * src/parse-gram.y (grammar_declaration): Likewise.
4939 Use muscle_code_grow, so that we don't need stype_line any more.
4940 All uses changed.
4941
4942 * src/muscle_tab.c (muscle_grow): Fix comment.
4943
4944 * ChangeLog, data/c.m4, data/glr.c, data/glr.cc, data/location.cc:
4945 * data/yacc.c, src/getargs.c, src/output.c, tests/cxx-type.at:
4946 Update copyright year to 2006.
4947
4948 2006-01-03 Akim Demaille <akim@epita.fr>
4949
4950 Have glr.cc pass (some of) the calc.at tests.
4951 * data/glr.cc (b4_parse_param_orig): New.
4952 (b4_parse_param): Improve its definition, and bound it more
4953 clearly in the skeleton.
4954 (b4_epilogue): Append, instead of prepending, in order to keep
4955 #line consistency.
4956 Simplify the generation of auxiliary functions: locations and
4957 purity are mandated.
4958 (b4_global_tokens_and_yystype): Honor it.
4959 * data/location.cc (c++.m4): Don't include it.
4960 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Define AT_GLR_CC_IF
4961 and AT_SKEL_CC_IF.
4962 * tests/calc.at (AT_CHECK_CALC): Rely on AT_SKEL_CC_IF instead of
4963 AT_LALR1_CC_IF.
4964 Be sure to initialize the first position's filename.
4965 (AT_CHECK_CALC_LALR1_CC): Add %location and %defines, they are
4966 mandated anyway.
4967 (AT_CHECK_CALC_GLR_CC): New.
4968 Use it to exercise glr.cc as a lalr1.cc drop-in replacement.
4969
4970 2006-01-02 Akim Demaille <akim@epita.fr>
4971
4972 * src/output.c (output_skeleton): Don't hard wire the inclusion of
4973 c.m4.
4974 * data/c++.m4, data/glr.c, data/yacc.c: Include c.m4.
4975 * data/glr.cc: Do not include stack.hh.
4976
4977 2006-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
4978
4979 * data/glr.c: Reformat whitespace with tabs.
4980 (b4_lpure_formals): Remove this unused m4 macro.
4981 * tests/cxx-type.at: Reformat whitespace with tabs.
4982 (_AT_TEST_GLR_CXXTYPES): In union Node, rename node_info to nodeInfo
4983 since it's a member. Rename type to isNterm for clarity.
4984
4985 2005-12-29 Akim <akim@sulaco.local>
4986
4987 Let glr.cc catch up with symbol_value_print.
4988 * data/glr.cc (b4_yysymprint_generate): Replace by...
4989 (b4_yy_symbol_print_generate): this.
4990 (yy_symbol_print, yy_symbol_value_print): Declare them.
4991
4992 2005-12-28 Paul Eggert <eggert@cs.ucla.edu>
4993
4994 * src/location.h (boundary): Note that a line or column equal
4995 to INT_MAX indicates an overflow.
4996 * src/scan-gram.l: Include verify.h. Don't include get-errno.h.
4997 (rule_length_overflow, increment_rule_length, add_column_width):
4998 New functions.
4999 (<INITIAL>{id}, <SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'"):
5000 (<SC_BRACED_CODE>"}"):
5001 Use increment_rule_length rather than incrementing it by hand.
5002 (adjust_location, handle_syncline): Diagnose overflow.
5003 (handle_action_dollar, handle_action_at):
5004 Fix bug with monstrosities like $-2147483648.
5005 Remove now-unnecessary checks.
5006 (scan_integer): Verify assumptions and remove now-unnecessary checks.
5007 (convert_ucn_to_byte): Verify assumptions.
5008 (handle_syncline): New arg LOC. All callers changed.
5009 Don't store through a value derived from char const * pointer.
5010
5011 * src/reader.c (grammar_rule_check): Rewrite slightly to avoid
5012 GCC warnings.
5013
5014 2005-12-27 Paul Eggert <eggert@cs.ucla.edu>
5015
5016 * src/reader.c (grammar_midrule_action, grammar_symbol_append):
5017 Remove unnecessary forward static decls.
5018
5019 2005-12-27 Akim Demaille <akim@epita.fr>
5020
5021 * src/reader.c (grammar_current_rule_check): Also check that $$
5022 is used.
5023 Take the rule to check as argument, hence rename as...
5024 (grammar_rule_check): this.
5025 * src/reader.h, src/reader.c (grammar_rule_begin, grammar_rule_end):
5026 Rename as...
5027 (grammar_rule_begin, grammar_rule_end): these, for consistency.
5028 (grammar_midrule_action, grammar_symbol_append): Now static.
5029 * tests/torture.at (input): Don't rely on the default action
5030 being always performed.
5031 * tests/calc.at: "Set" $$ even when the action is "cut" with
5032 YYERROR or other.
5033 * tests/actions.at (Exotic Dollars): Instead of using unused
5034 values, check that the warning is issued.
5035
5036 2005-12-22 Paul Eggert <eggert@cs.ucla.edu>
5037
5038 * NEWS: Improve wording for unused-value warnings.
5039
5040 2005-12-22 Akim Demaille <akim@epita.fr>
5041
5042 * data/lalr1.cc, data/yacc.c, data/glr.c, data/c.m4
5043 (b4_yysymprint_generate): Rename as...
5044 (b4_yy_symbol_print_generate): this.
5045 Generate yy_symbol_print instead of yysymprint.
5046 Generate also yy_symbol_value_print, and use it.
5047
5048 2005-12-22 Akim Demaille <akim@epita.fr>
5049
5050 * NEWS: Warn about unused values.
5051 * src/symlist.h, src/symlist.c (symbol_list, symbol_list_new): Add
5052 a `used' member.
5053 (symbol_list_n_get, symbol_list_n_used_set): New.
5054 (symbol_list_n_type_name_get): Use symbol_list_n_get.
5055 * src/scan-gram.l (handle_action_dollar): Flag used symbols.
5056 * src/reader.c (grammar_current_rule_check): Check that values are
5057 used.
5058 * src/symtab.c (symbol_print): Accept 0.
5059 * tests/existing.at: Remove the type information.
5060 Empty the actions.
5061 Remove useless actions (beware of mid-rule actions: perl -000
5062 -pi -e 's/\s*\{\}(?=[\n\s]*[|;])//g').
5063 * tests/actions.at (Exotic Dollars): Use unused values.
5064 * tests/calc.at: Likewise.
5065 * tests/glr-regression.at (No users destructors if stack 0 deleted):
5066 Likewise.
5067
5068 * src/gram.c (rule_useful_p, rule_never_reduced_p): Use
5069 rule_useful_p.
5070
5071 2005-12-21 Paul Eggert <eggert@cs.ucla.edu>
5072
5073 Undo 2005-12-01 tentative license wording change. The wording is
5074 still being reviewed by the lawyers, and we don't want to wait for
5075 them before publishing a test release. For now, revert to the
5076 previous wording.
5077 * NEWS: Undo 2005-12-01 change.
5078 * data/glr.c: Revert to previous license wording.
5079 * data/glr.cc: Likewise.
5080 * data/lalr1.cc: Likewise.
5081 * data/location.cc: Likewise.
5082 * data/yacc.c: Likewise.
5083
5084 * NEWS: Reword %destructor vs YYABORT etc.
5085 * data/glr.c: Use American spacing, for consistency.
5086 * data/glr.cc: Likewise.
5087 * data/lalr1.cc: Likewise.
5088 * data/yacc.c: Likewise.
5089 * data/yacc.c: Reformat comments slightly.
5090 * doc/bison.texinfo: Replace "non-" with "non" when that makes sense,
5091 for consistency. Fix some spelling errors and reword recently-included
5092 text slightly.
5093 * tests/cxx-type.at: Cast results of malloc, for C++.
5094
5095 2005-12-21 Joel E. Denny <address@hidden>
5096
5097 * tests/cxx-type.at: Construct a tree, count the parents of shared
5098 nodes, and free each node once and only once. Previously, the memory
5099 for semantic values was leaked instead.
5100
5101 2005-12-21 Joel E. Denny <address@hidden>
5102
5103 * data/glr.c (struct yyGLRStack): If pure, add yyval and yyloc members.
5104 (yylval, yylloc): If pure, #define to yystackp->yyval and
5105 yystackp->yyloc similar to yychar and yynerrs.
5106 (yyparse): If pure, remove local yylval and yylloc. Add local
5107 yystackp to accommodate pure definitions of yylval and yylloc.
5108 (b4_lex_param, b4_lyyerror_args, b4_lpure_args): If pure, change
5109 yylvalp and yyllocp to &yylval and &yylloc.
5110 (nerrs, char, lval, lloc): If pure, add #define's for b4_prefix[]
5111 namespace. Previously, nerrs and char were missing, but lval and lloc
5112 weren't necessary.
5113 (yyprocessOneStack, yyreportSyntaxError, yyrecoverSyntaxError): Remove
5114 yylvalp and yyllocp parameters since, if pure, these are now always
5115 accessible through yystackp. If not pure, they are still accessible
5116 globally.
5117 * data/glr.c, data/yacc.c (YYLLOC_DEFAULT): Change `if (N)' to
5118 `if (YYID (N))' to pacify lint.
5119
5120 2005-12-21 Akim Demaille <akim@epita.fr>
5121
5122 YYACCEPT, YYERROR, and YYABORT, as user actions, should not
5123 destroy the RHS symbols of a rule.
5124 * data/yacc.c (yylen): Initialize to 0.
5125 Keep its value to the number of items to possibly shift.
5126 In particular, a regular successful parse that ends on YYFINAL by
5127 a (internal) YYACCEPT must not have yylen != 0.
5128 (yyerrorlab, yyreturn): Pop the RHS.
5129 Reorder a bit to emphasize the `shifting' bits of code.
5130 (YYPOPSTACK): Now accept a number of items to pop.
5131 * data/lalr1.cc: Likewise.
5132 * data/glr.c: Formatting changes.
5133 Use goto instead of fall through.
5134 * doc/bison.texinfo (Destructor Decl): Complete.
5135
5136 2005-12-20 Juan Manuel Guerrero <juan.guerrero@gmx.de>
5137
5138 * Makefile.am: DJGPP specific files added to EXTRA_DIST.
5139 * djgpp/Makefile.maint: Fix PACKAGE variable computation.
5140 * djgpp/config.bat: Replace every occurence of the file name
5141 scan-gram-c.c with c-scan-gram.c. The same for scan-skel-c.c with
5142 c-scan-skel.c to conform with the 8.3 file name restriction on MSDOS.
5143 * djgpp/config.sed: Replace every occurence of the file name
5144 scan-gram-c.c with c-scan-gram.c. The same for scan-skel-c.c with
5145 c-scan-skel.c to conform with the 8.3 file name restriction on MSDOS.
5146 * djgpp/djunpack.bat: DJGPP specific file.
5147 * djgpp/fnchange.lst: DJGPP specific file.
5148 * djgpp/README.in: Add new information about how to unpack the bison
5149 source on MSDOS and other systems which have 8.3 file name restrictions
5150 using djunpack.bat and fnchange.lst.
5151
5152 2005-12-12 Paul Eggert <eggert@cs.ucla.edu>
5153
5154 * bootstrap (build_cvs_prefix): Remove; unused.
5155 (CVS_PREFIX): Adjust to yesterday's Savannah reorganization
5156 when getting gnulib.
5157
5158 2005-12-12 "Joel E. Denny" <jdenny@ces.clemson.edu>
5159
5160 * data/glr.c: Reorder typedef declarations for structs to match order
5161 of struct declarations.
5162 Rename yystack everywhere to yystackp except in yyparse where it's not
5163 a pointer.
5164 (yyglrShift): Change parameter YYSTYPE yysval to YYSTYPE* yyvalp for
5165 consistency.
5166 (yyis_table_ninf): Change 0 to YYID (0) to pacify lint.
5167 (yyreportSyntaxError): Add /*ARGSUSED*/ to pacify lint.
5168 (yyparse): Change while (yytrue) to while ( YYID (yytrue)) to pacify
5169 lint.
5170
5171 2005-12-09 Paul Eggert <eggert@cs.ucla.edu>
5172
5173 * tests/sets.at (Accept): Fix typos in regular expression used to
5174 sed out the final state number.
5175
5176 Work around portability problem on Solaris 10: flex-generated
5177 files include <stdio.h> before <config.h>, which messes up
5178 because the latter defines __EXTENSIONS__. Address the problem
5179 by creating two new little files that include <config.h> first,
5180 then include the flex-generated files. Rewrite everyone else
5181 to include <config.h> first, as well.
5182 * lib/timevar.c: Always include "config.h".
5183 * src/Makefile.am (bison_SOURCES): Replace scan-gram.l with
5184 scan-gram-c.c, and scan-skel.l with scan-skel-c.c.
5185 (EXTRA_bison_SOURCES): New macro.
5186 * src/scan-gram-c.c, src/scan-skel-c.c: New files.
5187 * src/system.h: Don't include config.h.
5188 * src/LR0.c: Include <config.h> first.
5189 * src/assoc.c: Likewise.
5190 * src/closure.c: Likewise.
5191 * src/complain.c: Likewise.
5192 * src/conflicts.c: Likewise.
5193 * src/derives.c: Likewise.
5194 * src/files.c: Likewise.
5195 * src/getargs.c: Likewise.
5196 * src/gram.c: Likewise.
5197 * src/lalr.c: Likewise.
5198 * src/location.c: Likewise.
5199 * src/main.c: Likewise.
5200 * src/muscle_tab.c: Likewise.
5201 * src/nullable.c: Likewise.
5202 * src/output.c: Likewise.
5203 * src/parse-gram.y: Likewise.
5204 * src/print.c: Likewise.
5205 * src/print_graph.c: Likewise.
5206 * src/reader.c: Likewise.
5207 * src/reduce.c: Likewise.
5208 * src/relation.c: Likewise.
5209 * src/state.c: Likewise.
5210 * src/symlist.c: Likewise.
5211 * src/symtab.c: Likewise.
5212 * src/tables.c: Likewise.
5213 * src/uniqstr.c: Likewise.
5214 * src/vcg.c: Likewise.
5215
5216 * src/parse-gram.y: Fix minor problems uncovered by lint.
5217 (current_lhs, current_lhs_location): Now static.
5218 (current_assoc): Remove unused variable.
5219
5220 Cleanups so that Bison-generated parsers have less lint.
5221 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate):
5222 Prepend /*ARGSUSED*/, for lint's sake.
5223 * data/glr.c (YYUSE): Properly parenthesize, and use an alternate
5224 definition if 'lint' is defined.
5225 (YYID): New macro (or function, if lint).
5226 All uses of /*CONSTCOND*/0 replaced by YYID(0).
5227 * data/yacc.c: Likewise.
5228 * data/glr.c (yyuserAction, yyuserMerge, yy_reduce_print):
5229 (yyrecoverSyntaxError): Prepend /*ARGSUSED*/.
5230 * data/glr.cc (YYLLOC_DEFAULT): Omit /*CONSTCOND*/ since this code
5231 is C++ only.
5232 * data/lalr1.cc (YYUSE): Just use a cast, since this code is C++ only.
5233 * data/yacc.c (YYSTACK_FREE) [defined YYSTACK_ALLOC]:
5234 Use YYID(0) rather than 0, for lint.
5235 (yystrlen): Rewrite to avoid lint warning about ptrdiff_t overflow.
5236 (yysyntax_error): Rewrite to avoid lint warnings about parenthesization.
5237
5238 2005-12-07 Paul Eggert <eggert@cs.ucla.edu>
5239
5240 * tests/glr-regression.at
5241 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
5242 Close memory leak reported by twlevo.
5243
5244 2005-12-06 "Joel E. Denny" <jdenny@ces.clemson.edu>
5245
5246 * data/glr.c (yyprocessOneStack, yyparse): Synchronize the shift for
5247 all stacks.
5248 (yyparse): Iterate another stack in order to call user destructors.
5249 * tests/glr-regression.at (No users destructors if stack 0 deleted):
5250 New test case.
5251 (Duplicated user destructor for lookahead): This test now is expected
5252 to succeed.
5253
5254 2005-12-01 Paul Eggert <eggert@cs.ucla.edu>
5255
5256 * NEWS: Document the following change.
5257 * data/yacc.c: Say "parser skeleton" rather than "file", since
5258 it's no longer just a file.
5259 * data/glr.c: Grant a special exception for C GLR parsers, that
5260 reads like the already-existing exception for C LALR(1) parsers.
5261 * data/glr.cc: Likewise.
5262 * data/lalr1.cc: Likewise.
5263 * data/location.cc: Likewise.
5264 * data/yacc.c: Reword the "written by" statement to clarify that
5265 it was the parser skeleton, not the entire output file.
5266 * data/glr.c: Written by Paul Hilfinger.
5267 * data/glr.cc: Written by Akim Demaille.
5268 * data/lalr1.cc: Likewise.
5269
5270 2005-11-18 Paul Eggert <eggert@cs.ucla.edu>
5271
5272 * data/yacc.c (yy_reduce_print, YY_REDUCE_PRINT):
5273 Fix typos in previous change that broke 'make check'.
5274 YY_REDUCE_PRINT cannot be a pseudo-varargs macro; that isn't
5275 supported in C.
5276 * tests/calc.at (_AT_CHECK_CALC,_AT_CHECK_CALC_ERROR):
5277 Don't check NUM-STDERR-LINES, since the output format is fluctuating.
5278 We can revert this once things settle down.
5279
5280 * src/conflicts.c (conflicts_print): Don't print file name twice
5281 when %expect fails because there were no conflicts.
5282 * doc/bison.texinfo (Expect Decl): Tighten up wording in previous
5283 change.
5284 * tests/conflicts.at (%expect not enough, %expect too much):
5285 (%expect with reduce conflicts): Adjust to new behavior.
5286
5287 2005-11-18 Akim Demaille <akim@epita.fr>
5288
5289 * src/conflicts.c (conflicts_print): Unsatisfied %expectation are
5290 errors.
5291 * NEWS: Document this.
5292 * doc/bison.texinfo (Expect Decl): Likewise.
5293
5294 2005-11-16 Akim Demaille <akim@epita.fr>
5295
5296 Generalize the display of semantic values and locations in traces.
5297 * data/glr.c (yy_reduce_print): Fix indices (again).
5298 * data/c++.m4 (b4_rhs_value, b4_rhs_location): Don't expect
5299 literal integers.
5300 * data/lalr1.cc (yyreduce_print): Rename as...
5301 (yy_reduce_print): this.
5302 Display values and locations.
5303 * data/yacc.c (yy_reduce_print): Likewise.
5304 (YY_REDUCE_PRINT): Adjust to pass the required arguments.
5305 (yysymprint): Move higher to be visible from yy_reduce_print).
5306 (yyparse): Adjust.
5307 * tests/calc.at: Adjust the expected length of the traces.
5308
5309 2005-11-14 Akim Demaille <akim@epita.fr>
5310
5311 * data/glr.c (yy_reduce_print): The loop was quite wrong: type are
5312 from 1 to N, while values and location start at 0.
5313 (b4_rhs_location, b4_rhs_value): Add parens around $1 and $2.
5314
5315 2005-11-14 Akim Demaille <akim@epita.fr>
5316
5317 * data/glr.c (yy_reduce_print): Fix the $ number.
5318
5319 2005-11-14 Akim Demaille <akim@epita.fr>
5320
5321 "Use" parse parameters.
5322 * data/c.m4 (b4_parse_param_for, b4_parse_param_use): New.
5323 * data/glr.c, data/glr.cc: Use them.
5324 * data/glr.c (YYUSE): Have a C++ definition that supports
5325 non-pointer types.
5326
5327 2005-11-14 Akim Demaille <akim@epita.fr>
5328
5329 * data/glr.c (yyexpandGLRStack): Declare only if defined.
5330
5331 2005-11-14 Akim Demaille <akim@epita.fr>
5332
5333 * data/glr.cc: New.
5334 * data/m4sugar/m4sugar.m4 (m4_prepend): New.
5335
5336 2005-11-12 Akim Demaille <akim@epita.fr>
5337
5338 Let position and location be PODs.
5339 * data/location.cc (position::initialize, location::initialize): New.
5340 (position::position, location::location): Define only if
5341 b4_location_constructors is defined.
5342 * data/lalr1.cc (b4_location_constructors): Define it for backward
5343 compatibility.
5344 * doc/bison.texinfo (Initial Action Decl): Use initialize.
5345
5346 2005-11-12 Akim Demaille <akim@epita.fr>
5347
5348 * data/lalr1.cc: Move the body of the ctor and dtor into the
5349 parser file (instead of the header).
5350 Wrap the implementations in a "namespace yy".
5351
5352 2005-11-12 Akim Demaille <akim@epita.fr>
5353
5354 Have glr.c include its header file when created.
5355 * data/glr.c (b4_shared_declarations): New.
5356 Output them verbatim in the parser if !%defines, otherwise
5357 output then in the header file, and include it instead.
5358
5359 2005-11-11 Akim Demaille <akim@epita.fr>
5360
5361 * data/glr.c: Comment changes.
5362
5363 2005-11-11 Akim Demaille <akim@epita.fr>
5364
5365 When yydebug, report semantic and location values for reductions.
5366 * data/glr.c (yy_reduce_print): Report the semantic values and the
5367 locations.
5368 (YY_REDUCE_PRINT): Adjust.
5369 (yyglrReduce): Use them.
5370 (b4_rhs_value, b4_rhs_location): Remove m4_eval invocations.
5371 * data/c.m4 (b4_yysymprint_generate): Specify the const arguments.
5372 * tests/calc.at (_AT_CHECK_CALC_ERROR): Remove the reduction
5373 traces.
5374
5375 2005-11-10 Akim Demaille <akim@epita.fr>
5376
5377 * data/glr.c (yynewGLRStackItem, YY_RESERVE_GLRSTACK): New.
5378 (yyaddDeferredAction, yyglrShift, yyglrShiftDefer): Use them.
5379 (yyexpandGLRStack, YYRELOC): Define only when YYSTACKEXPANDABLE.
5380
5381 2005-11-09 Albert Chin-A-Young <china@thewrittenword.com>
5382
5383 * m4/cxx.m4, examples/Makefile.am: Don't build
5384 examples/calc++ if no C++ compiler is available. (trivial change)
5385
5386 2005-11-09 Akim Demaille <akim@epita.fr>
5387
5388 * src/scan-skel.l: Use a couple of asserts.
5389
5390 2005-11-03 Akim Demaille <akim@epita.fr>
5391
5392 In some (weird) cases, the final state number is incorrect.
5393 Reported by Alexandre Duret-Lutz.
5394 * src/LR0.c (state_list_append): Remove the computation of
5395 final_state.
5396 (save_reductions): Do it here.
5397 (get_state): Alpha conversion.
5398 (generate_states): Use a for loop.
5399 * src/gram.h (item_number_is_rule_number)
5400 (item_number_is_symbol_number): New.
5401 * src/state.c: Use assert.
5402 * src/system.h: Include assert.h.
5403 * tests/sets.at (Accept): New.
5404
5405 2005-10-30 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
5406
5407 * data/glr.c (yyfill): Adjust comment.
5408 (yyresolveAction): Initialize default location properly
5409 for empty right-hand sides.
5410 (yydoAction): Ditto.
5411 Add comment explaining apparently dead code.
5412 * tests/glr-regression.at
5413 (Incorrectly initialized location for empty right-hand side in GLR):
5414 New test.
5415
5416 2005-10-30 Paul Eggert <eggert@cs.ucla.edu>
5417
5418 * bootstrap (cleanup_gnulib): New function. Use it to clean up
5419 gnulib when interrupted. This fixes some race conditions and
5420 works around some portability problems (one noted by Paul
5421 Hilfinger).
5422
5423 2005-10-22 Akim <akim@epita.fr>
5424
5425 * Makefile.cfg: Adjust to config -> build-aux.
5426 Reported by twledo.
5427
5428 2005-10-21 Akim Demaille <akim@epita.fr>
5429
5430 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate): Pass
5431 the %parse-params.
5432 * data/glr.c (YY_SYMBOL_PRINT, yydestroyGLRState): Adjust.
5433 * data/yacc.c (b4_Pure_if): Rename as...
5434 (b4_yacc_pure_if): this.
5435 (YY_SYMBOL_PRINT, yyparse): Adjust.
5436 * doc/bison.texinfo: Formatting changes.
5437
5438 2005-10-21 Akim Demaille <akim@epita.fr>
5439
5440 Finish the transition config -> build-aux.
5441 * configure.ac, Makefile.am: Use build-aux.
5442 * config/prev-version, config/announce-gen, config/Makefile.am:
5443 Move to...
5444 * build-aux/prev-version, build-aux/announce-gen,
5445 * build-aux/Makefile.am: here.
5446
5447 2005-10-14 Akim Demaille <akim@epita.fr>
5448
5449 * examples/calc++/test: Use set -x only when VERBOSE.
5450
5451 2005-10-13 Paul Eggert <eggert@cs.ucla.edu>
5452
5453 * NEWS: Bison now warns if it finds a stray `$' or `@' in an action.
5454 * src/scan-gram.l (<SC_BRACED_CODE>[$@]): Implement this.
5455
5456 2005-10-13 Akim Demaille <akim@epita.fr>
5457
5458 * src/scan-skel.l: Output the base name parts of the parser and
5459 header file names.
5460 * tests/output.at (AT_CHECK_OUTPUT): Support subdirectories, and
5461 additional checks.
5462 Use this to exercise C++ outputs in subdirs.
5463 Reported by Oleg Smolsky.
5464
5465 2005-10-12 Paul Eggert <eggert@cs.ucla.edu>
5466
5467 * data/c.m4 (b4_c_function_def): Look at __C99_FUNC__, not at
5468 __STDC_VERSION__, as IBM cc 7.0 doesn't define the latter either.
5469 Problem reported by John P. Hartmann.
5470 * data/yacc.c (YYMODERN_C): Likewise. Don't define if the user has
5471 already defined it.
5472
5473 2005-10-12 Akim Demaille <akim@epita.fr>
5474
5475 * src/parse-gram.y (version_check): Exit 63 to please missing
5476 (stands for "version mismatch).
5477 * tests/input.at, doc/bison.texinfo: Adjust.
5478
5479 2005-10-10 Paul Eggert <eggert@cs.ucla.edu>
5480
5481 Work around portability problems with Visual Age C compiler
5482 (xlc and xlC_r) reported by John P. Hartmann.
5483 * data/location.cc (initial_column, initial_line): Remove.
5484 All uses replaced by 0 and 1.
5485 * src/scan-gram.l (gram_wrap): Redefine to avoid bug in flex 2.5.31
5486 that xlc complains about.
5487 * src/scan-skel.l (skel_wrap): Likewise.
5488 * data/c.m4 (b4_c_function_def): Look at __STDC_VERSION__ as well
5489 as __STDC__.
5490 * data/yacc.c (YYMODERN_C): New macro, which also looks at
5491 __STDC_VERSION__. Use it everywhere instead of looking at
5492 __STDC__ and __cplusplus.
5493
5494 2005-10-10 Akim Demaille <akim@epita.fr>
5495
5496 * examples/calc++/test: Be quiet unless VERBOSE.
5497
5498 2005-10-05 Paul Eggert <eggert@cs.ucla.edu>
5499
5500 * data/c.m4 (yydestruct, yysymprint):
5501 Use YYUSE instead of casting to void.
5502 * data/glr.c (YYUSE): New macro.
5503 (yyuserMerge, yyreportAmbiguity, yyreportSyntaxError):
5504 Use it instead of rolling our own.
5505 (YYLLOC_DEFAULT, YYCHK, YYDPRINTF, YY_SYMBOL_PRINT, YY_REDUCE_PRINT):
5506 (YYCHK1):
5507 Use /*CONSTCOND*/ to suppress lint warnings.
5508 * data/lalr1.cc (YYLLOC_DEFAULT, YY_SYMBOL_PRINT, YY_REDUCE_PRINT):
5509 (YY_STACK_PRINT): Use 'false' not '0'.
5510 (YYUSE): New macro.
5511 (yysymprint_, yydestruct_): Use it instead of rolling our own.
5512 * data/yacc.c (YYUSE): New macro.
5513 (YYCOPY, YYSTACK_RELOCATE, YYBACKUP, YYLLOC_DEFAULT):
5514 (YYDPRINTF, YY_SYMBOL_PRINT, YY_STACK_PRINT, YY_REDUCE_PRINT):
5515 (yyerrorlab): Use /*CONSTCOND*/ to suppress lint warnings.
5516
5517
5518 * data/m4sugar/m4sugar.m4 (_m4_map): New macro.
5519 (m4_map, m4_map_sep): Use it. Handle the empty list correctly.
5520
5521 2005-10-04 Paul Eggert <eggert@cs.ucla.edu>
5522
5523 Undo the parts of the unlocked-I/O change that substituted
5524 putc or puts for printf. This might hurt performance a bit,
5525 but some people prefer the printf style.
5526 * data/c.m4 (yysymprint): Prefer printf to puts and putc.
5527 * data/glr.c (YYFPUTC, YYFPUTS, YYDPUTS): Remove.
5528 All uses replaced by YYFPRINTF and YYDPRINTF.
5529 * data/yacc.c: Likewise.
5530 * lib/bitset.c (bitset_print): Likewise.
5531 * lib/bitsetv.c (bitsetv_dump, debug-bitsetv): Prefer printf to
5532 putc and puts.
5533 * lib/lbitset.c (debug_lbitset): Likewise.
5534 * src/closure.c (print_firsts, print_fderives): Likewise.
5535 * src/gram.c (grammar_dump): Likewise.
5536 * src/lalr.c (look_ahead_tokens_print): Likewise.
5537 * src/output.c (escaped_output): Likewise.
5538 (user_actions_output): Break apart two printfs.
5539 * src/parse-gram.y (%printer): Prefer printf to putc and puts.
5540 * src/reduce.c (reduce_print): Likewise.
5541 * src/state.c (state_rule_look_ahead_tokens_print): Likewise.
5542 * src/system.h: Include unlocked-io.h rathe than stdio.h.
5543
5544 * data/glr.c (yyuserMerge, yyreportAmbiguity, yyreportSyntaxError):
5545 Use assignments rather than casts-to-void to suppress
5546 unused-variable warnings. This pacifies 'lint'.
5547 * data/lalr1.cc (yysymprint_, yydestruct_): Use a call to suppress
5548 unused-variable warnings.
5549
5550 2005-10-03 Juan Manuel Guerrero <juan.guerrero@gmx.de>
5551
5552 * Makefile.am: DJGPP specific files added to EXTRA_DIST.
5553
5554 2005-10-02 Paul Eggert <eggert@cs.ucla.edu>
5555
5556 Use unlocked I/O for a minor performance improvement on hosts like
5557 GNU/Linux and Solaris that support unlocked I/O. The basic idea
5558 is to use the gnlib unlocked-io module, and to prefer putc and
5559 puts to printf when either will work (since the latter doesn't
5560 come in an unlocked flavor).
5561 * bootstrap (gnulib_modules): Add unlocked-io.
5562 * data/c.m4 (yysymprint): Prefer puts and putc to printf.
5563 * data/glr.c (YYFPUTC, YYFPUTS, YYDPUTS): New macros.
5564 Prefer them to YYFPRINTF and YYDPRINTF if either will do,
5565 and similarly for puts and putc and printf.
5566 * data/yacc.c: Likewise.
5567 * lib/bitset.c (bitset_print): Likewise.
5568 * lib/bitset.h [USE_UNLOCKED_IO]: Include unlocked-io.h.
5569 * lib/bitsetv.c (bitsetv_dump, debug-bitsetv): Prefer putc and puts
5570 to printf.
5571 * lib/lbitset.c (debug_lbitset): Likewise.
5572 * src/closure.c (print_firsts, print_fderives): Likewise.
5573 * src/gram.c (grammar_dump): Likewise.
5574 * src/lalr.c (look_ahead_tokens_print): Likewise.
5575 * src/output.c (escaped_output): Likewise.
5576 (user_actions_output): Coalesce two printfs.
5577 * src/parse-gram.y (%printer): Prefer putc and puts to printf.
5578 * src/reduce.c (reduce_print): Likewise.
5579 * src/state.c (state_rule_look_ahead_tokens_print): Likewise.
5580 * src/system.h: Include unlocked-io.h rather than stdio.h.
5581
5582 * data/lalr1.cc: Don't put an unmatched ' in a dnl comment, as
5583 this confuses xgettext.
5584
5585 2005-10-02 Akim Demaille <akim@epita.fr>
5586
5587 * bootstrap (gnulib_modules): Add strverscmp.
5588 * lib/.cvsignore: Add strverscmp.c, strverscmp.h.
5589 * m4/.cvsignore: Add strverscmp.m4.
5590 * src/parse-gram.y (%require): New token, new rule.
5591 (version_check): New.
5592 * src/scan-gram.l (%require): Adjust.
5593 * tests/input.at (AT_REQUIRE): New.
5594 Use it.
5595 * doc/bison.texinfo (Require Decl): New.
5596 (Calc++ Parser): Use %require.
5597
5598 2005-10-02 Akim Demaille <akim@epita.fr>
5599
5600 * data/location.cc: New.
5601
5602 2005-10-02 Paul Eggert <eggert@cs.ucla.edu>,
5603 Akim Demaille <akim@epita.fr>
5604
5605 Make sure -odir/foo.cc creates dir/location.hh etc.
5606 * src/files.h (spec_outfile, parser_file_name, spec_name_prefix)
5607 (spec_file_prefix, spec_verbose_file, spec_graph_file)
5608 (spec_defines_file): Now const.
5609 (dir_prefix): New.
5610 (short_base_name): Remove.
5611 * src/files.c: Adjust.
5612 (dirname.h): Include.
5613 (base_name): Don't prototype it.
5614 (finput): Remove, duplicates gram_in.
5615 (full_base_name, short_base_name): Replace by...
5616 (all_but_ext, all_but_tab_ext): these.
5617 (compute_base_names): Rename as...
5618 (compute_file_name_parts): this.
5619 Update to compute the new variables, including dir_prefix.
5620 Adjust dependencies.
5621 * src/output.c (prepare): Output them.
5622 * src/reader.c: Adjust to use gram_in, not finput.
5623 * src/scan-skel.l (@dir_prefix@): New.
5624
5625 2005-10-02 Juan Manuel Guerrero <juan.guerrero@gmx.de>
5626
5627 * lib/subpipe.c: New function end_of_output_subpipe() added
5628 to allow support for non-posix systems. This is a no-op function
5629 for posix systems.
5630
5631 * lib/subpipe.h: New function end_of_output_subpipe() added
5632 to allow support for non-posix systems. This is a no-op function
5633 for posix systems.
5634
5635 * src/output.c (output_skeleton): Use end_of_output_subpipe() to
5636 handle the lack of pipe/fork functionality on non-posix systems.
5637
5638 * djgpp/Makefile.maint: DJGPP specific file.
5639
5640 * djgpp/README.in: DJGPP specific file.
5641
5642 * djgpp/config.bat: DJGPP specific configuration file.
5643
5644 * djgpp/config.sed: DJGPP specific configuration file.
5645
5646 * djgpp/config.site: DJGPP specific configuration file.
5647
5648 * djgpp/config_h.sed: DJGPP specific configuration file.
5649
5650 * djgpp/subpipe.c: DJGPP specific replacement file for lib/subpipe.c.
5651
5652 * djgpp/subpipe.h: DJGPP specific replacement file for lib/subpipe.h.
5653
5654 2005-10-02 Akim Demaille <akim@epita.fr>
5655
5656 * data/location.cc: New, extract from...
5657 * data/lalr1.cc: here.
5658 (location.hh): Include it after the user prologue, in case the
5659 filename type is defined by the user.
5660 Forward declation location and position before the pre-prologue.
5661 (yyresult_): Rename as...
5662 (yyresult): this, it's a local variable, not an attribute.
5663 * data/Makefile.am (dist_pkgdata_DATA): Adjust.
5664
5665 2005-10-01 Akim Demaille <akim@epita.fr>
5666
5667 * examples/extexi: Restore the #line generation.
5668
5669 2005-09-30 Akim Demaille <akim@epita.fr>,
5670 Alexandre Duret-Lutz <adl@gnu.org>
5671
5672 Move the token type and YYSTYPE in the parser class.
5673 * data/lalr1.cc (stack.hh, location.hh): Include earlier.
5674 (parser::token): New, from the moved free definition of tokens.
5675 (parser::semantic_value): Now a full definition instead of an
5676 indirection to YYSTYPE.
5677 (b4_post_prologue): No longer included in the header file, but
5678 in the implementation file.
5679 * doc/bison.texi (C+ Language Interface): Update.
5680 * src/parse-gram.y: Support unary %define.
5681 * tests/actions.at: Define global_tokens_and_yystype for backward
5682 compatibility until we update the tests.
5683 * tests/calc.at: Idem.
5684 (first_line, first_column, last_line, last_column): Define for lalr1.cc
5685 to simplify the code.
5686
5687 2005-09-29 Paul Eggert <eggert@cs.ucla.edu>
5688
5689 Port to SunOS 4.1.4, which lacks strtoul and strerror.
5690 Ah, the good old days! Problem reported by Peter Klein.
5691 * bootstrap (gnulib_modules): Add strerror, strtoul.
5692 * lib/.cvsignore: Add strerror.c, strtol.c, strtoul.c
5693 * m4/.cvsignore: Add strerror.m4, strtol.m4, strtoul.m4.
5694
5695 2005-09-29 Akim Demaille <akim@epita.fr>
5696
5697 * data/c.m4 (b4_error_verbose_if): New.
5698 * data/lalr1.cc: Use it.
5699 (YYERROR_VERBOSE_IF): Remove.
5700 (yyn_, yylen_, yystate_, yynerrs_, yyerrstatus_): Remove as
5701 parser members, replaced by...
5702 (yyn, yylen, yystate, yynerss, yyerrstatus): these parser::parse
5703 local variables.
5704 (yysyntax_error_): Takes the state number as argument.
5705 (yyreduce_print_): Use the argument yyrule, not the former
5706 attribute yyn_.
5707
5708 2005-09-26 Paul Eggert <eggert@cs.ucla.edu>
5709
5710 * bootstrap (gnulib_modules): Add verify.
5711 * lib/.cvsignore: Add verify.h.
5712 * src/getargs.c: Use ARGMATCH_VERIFY rather than verify.
5713 * src/system.h (verify): Remove.
5714 Include verify.h instead.
5715 * src/tables.c (tables_generate): Use new API for 'verify'.
5716
5717 2005-09-21 Paul Eggert <eggert@cs.ucla.edu>
5718
5719 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Do not use
5720 local variables whose names begin with 'yy'.
5721 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
5722 Trivial changes from Joel E. Denny.
5723
5724 * bootstrap (gnulib_modules): Remove alloca. Bison doesn't need
5725 it itself.
5726 * src/main.c (main) [C_ALLOCA]: Don't flush alloca'ed memory; we
5727 don't use alloca any more.
5728
5729 * data/yacc.c [YYSTACK_USE_ALLOCA && !defined __GNUC__ && ! defined
5730 __BUILTIN_VA_ARG_INCR && ! defined _AIX && ! defined _MSC_VER &&
5731 defined _ALLOCA_H]: Don't include <stdlib.h>; not needed in this case.
5732 * tests/torture.at (Exploding the Stack Size with Alloca): Adjust
5733 to match yacc.c, to test more hosts.
5734
5735 2005-09-20 Paul Eggert <eggert@cs.ucla.edu>
5736
5737 * data/yacc.c (YYSIZE_T): Reindent to make it clearer. This
5738 doesn't affect behavior.
5739 (YYSTACK_ALLOC) [YYSTACK_USE_ALLOCA]: Improve support for
5740 Solaris, AIX, MSC.
5741 (_STDLIB_H): Renamed from YYINCLUDED_STDLIB_H. All uses changed.
5742 This works a bit better with glibc, if user code has already included
5743 stdlib.h.
5744 * doc/bison.texinfo (Bison Parser): Document that users can't
5745 arbitrarily use malloc and free for other purposes. Document
5746 that <alloca.h> and <malloc.h> might be included.
5747 (Table of Symbols): Under YYSTACK_USE_ALLOCA, Don't claim that the
5748 user must declare alloca.
5749
5750 * HACKING (release): Forwarn the Translation Project about
5751 stable releses.
5752
5753 2005-09-20 Akim Demaille <akim@epita.fr>
5754
5755 * data/glr.c: Use b4_token_enums, not b4_token_enums_defines.
5756
5757 2005-09-19 Paul Eggert <eggert@cs.ucla.edu>
5758
5759 * data/yacc.c (YYSIZE_MAXIMUM): New macro.
5760 (YYSTACK_ALLOC_MAXIMUM): Use it.
5761 (yysyntax_error): New function.
5762 (yyparse) [YYERROR_VERBOSE]: Don't leak memory indefinitely if
5763 multiple syntax errors are reported, and alloca is being used.
5764 Instead, reallocate buffers twice as big each time, so that
5765 we waste at most half the allocated memory. Start with a small
5766 (128-byte) buffer that will suffice in most cases anyway.
5767 Use yysyntax_error to do most of the work.
5768
5769 * doc/bison.texinfo (Error Reporting, Table of Symbols):
5770 yynerrs is the number of errors reported, not the number of
5771 errors encountered.
5772
5773 * tests/glr-regression.at (Duplicated user destructor for lookahead):
5774 Mark it as expected to fail.
5775 Cast result of malloc; problem reported by twlevo@xs4all.nl.
5776 * tests/actions.at, tests/calc.at, tests/glr-regression.at:
5777 Don't start user-code symbols with "yy", to avoid name space problems.
5778
5779 2005-09-19 Akim Demaille <akim@epita.fr>
5780
5781 Remove the traits, failed experiment.
5782 It never proved useful, and anyway because of the current
5783 definition, it was not possible to have several specialization of
5784 this traits, making it useless.
5785 * data/lalr1.cc (yy:traits): Remove.
5786 Inline its definitions in the parser class.
5787
5788 2005-09-19 Akim Demaille <akim@epita.fr>
5789
5790 * tests/atlocal.in (LIBS): Pass INTLLIBS to address failures on at
5791 least Mac OSX with a /usr/local install of gettext.
5792
5793 2005-09-19 Akim Demaille <akim@epita.fr>
5794
5795 * data/lalr1.cc (yyparse): Rename yylooka and yyilooka as yychar
5796 and yytoken for similarity with the other skeletons.
5797
5798 2005-09-19 Akim Demaille <akim@epita.fr>
5799
5800 * NEWS, configure.ac: update version number to 2.1a.
5801
5802 2005-09-16 Paul Eggert <eggert@cs.ucla.edu>
5803
5804 * NEWS: Version 2.1.
5805
5806 * NEWS: Remove notice of yytname change, since it was never in an
5807 official release.
5808 * data/glr.c (yydestroyGLRState): Rename local var to avoid shadowing
5809 diagnostic.
5810 * src/output.c (prepare): Likewise.
5811 * data/lalr1.cc (YYERROR_VERBOSE_IF): New macro.
5812 (yysyntax_error_): Use it to avoid GCC warning when YYERROR_VERBOSE
5813 is not defined. This is an awful hack, but it's enough for now.
5814 All callers changed.
5815 * tests/glr-regression-at (make_value): Args are const pointers now,
5816 to avoid GCC warning.
5817 (Duplicated user destructor for lookahead): New test. Currently
5818 skipped. It fails on my host but I'm not sure it'll always fail.
5819
5820 2005-09-16 Akim Demaille <akim@epita.fr>
5821
5822 * src/symtab.h (struct symbol): Declare the printer and destructor
5823 as const, to avoid accidental calls to free.
5824 (symbol_destructor_set, symbol_printer_set): Adjust.
5825 * src/symtab.c: Adjust.
5826
5827 2005-09-16 Akim Demaille <akim@epita.fr>
5828
5829 * data/c.m4 (b4_token_enums): New.
5830 (b4_token_defines): Rename as...
5831 (b4_token_enums_defines): this.
5832 (b4_token_defines): New, output only the #defines.
5833 * data/yacc.c, data/glr.c: Adjust.
5834 * data/lalr1.cc: Use b4_token_enums instead of b4_token_enums_defines.
5835 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate): Define
5836 as default values.
5837
5838 2005-09-16 Akim Demaille <akim@epita.fr>
5839
5840 * data/lalr1.cc (yylex_): Remove, inline its code.
5841 (yyreport_syntax_error_): Remove, replaced by...
5842 (yysyntax_error_): this which returns a string and leaves to the
5843 caller the call to the users' error function.
5844 (yylooka_, yyilooka_, yylval, yylloc, yyerror_range_, yyval, yyloc):
5845 Move from members of the parser object...
5846 (yylooka, yyilooka, yylval, yylloc, yyerror_range, yyval, yyloc):
5847 to local variables of the parse function.
5848
5849 2005-09-16 Akim Demaille <akim@epita.fr>
5850
5851 * doc/bison.texinfo (Calc++ Parser): Don't promote defining YYEOF
5852 since it's in Bison's name space.
5853
5854 2005-09-15 Paul Eggert <eggert@cs.ucla.edu>
5855
5856 * data/glr.c (yyresolveValue): Add default case to pacify
5857 gcc -Wswitch-default. Problem reported by twlevo@xs4all.nl.
5858
5859 * NEWS: Document when yyparse started to return 2.
5860 * doc/bison.texinfo (Parser Function): Document when yyparse
5861 returns 2.
5862
5863 * data/lalr1.cc: Revert part of previous change, as it's incompatible.
5864 (b4_filename_type): Renamed back from b4_file_name_type. All uses
5865 changed.
5866 (class position): file_name -> filename (reverting). All uses changed.
5867
5868 2005-09-14 Paul Eggert <eggert@cs.ucla.edu>
5869
5870 * examples/calc++/Makefile.am ($(calc_sources_generated)): Don't
5871 do anything if $@ exists. This reverts part of the 2005-07-07
5872 patch.
5873
5874 2005-09-11 Paul Eggert <eggert@cs.ucla.edu>
5875
5876 * Makefile.am (EXTRA_DIST): Do not distribute REFERENCES; it
5877 contains obsolete information and isn't worth distributing as a
5878 separate file anyway.
5879 * data/glr.c [defined YYSETJMP]: Don't include <setjmp.h>.
5880 (YYJMP_BUF, YYSETJMP, YYLONGJMP) [!defined YYSETJMP]: New macros.
5881 All uses of jmp_buf, setjmp, longjmp changed to use these instead.
5882 (yyparse): Abort if user code uses longjmp to throw an unexpected
5883 value.
5884
5885 2005-09-09 Paul Eggert <eggert@cs.ucla.edu>
5886
5887 * data/c.m4 (b4_identification): Define YYBISON_VERSION.
5888 Suggested by twlevo@xs4all.nl.
5889
5890 * data/glr.c (YYCHK1): Do not assume YYE is in range.
5891 This avoids a diagnostic from gcc -Wswitch-enum.
5892 Problem reported by twlevo@xs4all.nl.
5893
5894 * doc/bison.texinfo: Don't use "filename", as per GNU coding
5895 standards. Use "file name" or "file" or "name", depending on
5896 the context.
5897 (Invocation): The output of "bison hack/foo.y" goes to foo.tab.c,
5898 not to hack/foo.tab.c.
5899 (Calc++ Top Level): 2nd arg of main is not const.
5900 * data/glr.c: b4_filename -> b4_file_name.
5901 * data/lalr1.cc: Likewise. Also, b4_filename_type -> b4_file_name_type.
5902 All uses changed.
5903 (class position): filename -> file_name. All uses changed.
5904 * data/yacc.c: b4_filename -> b4_file_name.
5905 * lib/bitset.h: filename -> file_name in local vars.
5906 * lib/bitset_stats.c: Likewise.
5907 * src/files.c: Likewise.
5908 * src/scan-skel.l ("@output ".*\n): Likewise.
5909 * src/files.c (file_name_split): Renamed from filename_split.
5910 * src/muscle_tab.c (muscle_init): Output b4_file_name, not b4_filename.
5911
5912 2005-09-08 Paul Eggert <eggert@cs.ucla.edu>
5913
5914 * lib/.cvsignore: Add pipe-safer.c, stdio--.h, unistd--.h,
5915 to accommodate latest gnulib.
5916
5917 * tests/glr-regression.at (Duplicate representation of merged trees):
5918 Add casts to pacify g++. Problem reported by twlevo@xs4all.nl.
5919
5920 * bootstrap: Add comment as to why the AM_LANGINFO_CODESET hack is
5921 needed.
5922
5923 2005-08-26 Paul Eggert <eggert@cs.ucla.edu>
5924
5925 * data/glr.c (yydestroyGLRState): Renamed from yydestroyStackItem.
5926 All uses changed. Invoke user destructor after an error during a
5927 split parse (trivial change from Joel E. Denny).
5928
5929 * tests/glr-regression.at
5930 (User destructor after an error during a split parse): New test case.
5931 Problem reported by Joel E. Denny in:
5932 http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00029.html
5933
5934 2005-08-25 Paul Eggert <eggert@cs.ucla.edu>
5935
5936 * README-cvs: Give URLs for recommended tools.
5937 Mention Gzip version problem, and bootstrapping issues.
5938 Remove troubleshooting section, as it's somewhat obsolete.
5939
5940 * bootstrap (no_cache): New var, to accommodate different wget
5941 variants. Use it instead of '-C off'. Problem reported by
5942 twlevo@xs4all.nl.
5943
5944 * data/glr.c (yydestroyStackItem): New function.
5945 (yyrecoverSyntaxError, yyreturn): Use it to improve quality of
5946 debugging information. Problem reported by Joel E. Denny.
5947
5948 2005-08-25 Akim Demaille <akim@epita.fr>
5949
5950 * tests/local.at (AT_COMPILE_CXX): Pass $LINKS too.
5951
5952 2005-08-24 Paul Eggert <eggert@cs.ucla.edu>
5953
5954 * data/glr.c (yyrecoverSyntaxError, yyreturn):
5955 Don't invoke destructor on unresolved entries.
5956 * tests/glr-regression.at
5957 (User destructor for unresolved GLR semantic value): New test case.
5958 Problem reported by Joel E. Denny in:
5959 http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00016.html
5960
5961 2005-08-21 Paul Eggert <eggert@cs.ucla.edu>
5962
5963 * lib/.cvsignore: Remove realloc.c, strncasecmp.c, xstrdup.c.
5964 Add strnlen.c.
5965 * m4/.cvsignore: Remove codeset.m4, gettext.m4, lib-ld.m4,
5966 lib-prefix.m4, po.m4.
5967
5968 * data/glr.c (yyreturn): Use "Cleanup:" rather than "Error:"
5969 in yydestruct diagnostic, since it might not be an error.
5970 Problem reported by Joel Denny near end of
5971 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00040.html>.
5972 * data/lalr1.cc (yyerturn): Likewise.
5973 * data/yacc.c (yyreturn): Likewise.
5974 * tests/calc.at (_AT_CHECK_CALC_ERROR): Adjust to the above change.
5975
5976 * src/files.c: Remove obsolete FIXME comment.
5977
5978 * data/glr.c (YY_SYMBOL_PRINT): Append a newline, for consistency
5979 with the other templates, and to fix bogus run-on messages such
5980 as the one reported at the end of
5981 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00040.html>.
5982 All callers changed to avoid the newline.
5983 (yyprocessOneStack): Output two lines rather than one, to accommodate
5984 the above change. This changes the debug output format slightly.
5985
5986 * data/glr.c (yyresolveValue): Fix redundant parse tree problem
5987 reported by Joel E. Denny in
5988 <http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00004.html>
5989 (trivial change).
5990 * tests/glr-regression.at (Duplicate representation of merged trees):
5991 New test, from Joel E. Denny in:
5992 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00013.html>.
5993 * THANKS: Add Joel E. Denny.
5994
5995 * configure.ac (AC_INIT): Bump to 2.0c.
5996
5997 2005-07-24 Paul Eggert <eggert@cs.ucla.edu>
5998
5999 * NEWS: Version 2.0b.
6000
6001 * Makefile.am (SUBDIRS): Put examples before tests, so that
6002 "make check" doesn't finish with "All 1 tests passed".
6003
6004 * tests/regression.at (Token definitions): Don't rely on
6005 AT_PARSER_CHECK for data that contains backslashes. It currently
6006 uses 'echo', and 'echo' isn't portable if its argument contains
6007 backslashes. Problem found on OpenBSD 3.4. Also, do not assume
6008 that the byte '\0xff' is not printable in the C locale; it is,
6009 under OpenBSD 3.4 (!). Luckily, '\0x80' through '\0x9e' are
6010 not printable, so use '\0x81' to test.
6011
6012 * data/glr.c (YYOPTIONAL_LOC): Define even if it's not a recent
6013 version of GCC, since the macro is used with non-GCC compilers.
6014
6015 Fix core dump reported by Pablo De Napoli in
6016 <http://lists.gnu.org/archive/html/bug-bison/2005-07/msg00053.html>.
6017 * tests/regression.at (Invalid inputs with {}): New test.
6018 * src/parse-gram.y (token_name): Translate type before using
6019 it as an index.
6020
6021 * data/glr.c (ATTRIBUTE_UNUSED): Remove, since it infringes on
6022 the user's name space. All uses changed to __attribute__
6023 ((__unused__)).
6024 (yyFail, yyMemoryExhausted, yyreportAmbiguity):
6025 Add __attribute__ ((__noreturn__)).
6026
6027 * etc/clcommit: Remove. We weren't using it, and it failed
6028 "make maintainer-distcheck".
6029 * Makefile.maint: Merge from coreutils.
6030 (CVS_LIST, CVS_LIST_EXCEPT): New macros.
6031 (syntax-check-rules): Change list of rules as described below.
6032 (sc_cast_of_alloca_return_value, sc_dd_max_sym_length):
6033 (sc_file_system, sc_obsolete_symbols, sc_prohibit_atoi_atof):
6034 (sc_prohibit_jm_in_m4, sc_root_tests, sc_tight_scope):
6035 (sc_trailing_space): New rules.
6036 (sc_xalloc_h_in_src): Remove.
6037 (sc_cast_of_argument_to_free, sc_cast_of_x_alloc_return_value):
6038 (sc_space_tab, sc_error_exit_success, sc_changelog):
6039 (sc_system_h_headers, sc_sun_os_names, sc_unmarked_diagnostics):
6040 (makefile-check, po-check, author_mark_check):
6041 (makefile_path_separator_check, copyright-check):
6042 Use grep -n, to make it easier to find violations.
6043 Use CVS_LIST and CVS_LIST_EXCEPT.
6044 (header_regexp, h_re): Remove.
6045 (dd_c): New macro.
6046 (sc_dd_max_sym_length, .re-list, news-date-check): New rules.
6047 (my-distcheck): Use more-modern GCC flags.
6048 (signatures, %.asc): Remove.
6049 (rel-files, announcement): Remove signatures.
6050 Restore old updating code, even though we don't use it, so
6051 that we're the same as coreutils.
6052 (alpha, beta, major): Depend on news-date-check.
6053 Make the upload commands.
6054
6055 * data/c.m4, data/lalr1.cc, data/yacc.c: Normalize white space.
6056 * lib/abitset.h, lib/bbitset.h, lib/bitset.h: Likewise.
6057 * lib/bitset_stats.c, lib/ebitset.h, lib/lbitset.c: Likewise.
6058 * lib/libitset.h, lib/timevar.c, lib/vbitset.h: Likewise.
6059 * src/Makefile.am, src/gram.c, src/muscle_tab.h: Likewise.
6060 * src/parse-gram.y, src/system.h, src/tables.c, src/vcg.c: Likewise.
6061 * src/vcg_defaults.h, tests/cxx-type.at, tests/existing.at: Likewise.
6062 * tests/sets.at: Likewise.
6063
6064 * data/m4sugar/m4sugar.m4: Sync from Autoconf, except that
6065 we comment out the Autoconf version number.
6066 * doc/bison.texinfo (Calc++ Scanner): Don't use atoi, as
6067 it's error-prone and "make maintainer-distcheck" rejects it.
6068
6069 * lib/subpipe.c: Include <fcntl.h> without checking for HAVE_FCNTL_H.
6070 Indent calls to "error" to pacify "make maintainer-distcheck",
6071 when the calls are not intended to be translated.
6072 * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't check for fcntl.h.
6073
6074 * src/Makefile.am (DEFS): Use +=, to pacify
6075 "make maintainer-distcheck".
6076 (bison_SOURCES): Add scan-skel.h.
6077 (sc_tight_scope): New rule, from coreutils.
6078
6079 * src/files.c (src_extension, header_extension):
6080 Now static, not extern.
6081 * src/getargs.c (short_options): Likewise.
6082 * src/muscle_tab.c (muscle_table): Likewise.
6083 * src/parse-gram.y (current_class, current_type, current_prec):
6084 Likewise.
6085 * src/reader.c (grammar_end, previous_rule_end): Likewise.
6086 * src/getargs.h: Redo comments to pacify "make maintainer-distcheck".
6087 * src/main.c (main): Cast bindtextdomain and textdomain calls to
6088 void, to avoid warning when NLS is disabled.
6089 * src/output.c: Include scan-skel.h.
6090 (scan_skel): Remove decl, since scan-skel.h does this.
6091 (output_skeleton):
6092 Indent calls to "error" to pacify "make maintainer-distcheck".
6093 * src/print_graph.c: Don't include <obstack.h>, as system.h does this.
6094 * src/reader.h (gram_end, gram_lineno): New decls to pacify
6095 "make maintainer-distcheck".
6096 * src/scan-skel.l (skel_lex, skel_get_lineno, skel_get_in):
6097 (skel_get_out, skel_get_leng, skel_get_text, skel_set_lineno):
6098 (skel_set_in, skel_set_out, skel_get_debug, skel_set_debug):
6099 (skel_lex_destroy, scan_skel): Move these decls to...
6100 * src/scan-skel.h: New file.
6101 * src/uniqstr.c (uniqstr_assert):
6102 Indent calls to "error" to pacify "make maintainer-distcheck".
6103
6104 * tests/Makefile.am ($(srcdir)/package.m4): Use $(VAR),
6105 not @VAR@.
6106
6107 * tests/torture.at: Revamp to avoid misuse of atoi that
6108 "make maintainer-distcheck" complained about.
6109
6110 * examples/extexi (message): Don't print a message more than once,
6111 and omit line-number decoration that makes Emacs compile think
6112 that informative messages are worth worrying about.
6113
6114 2005-07-22 Paul Eggert <eggert@cs.ucla.edu>
6115
6116 * configure.ac: Update version number.
6117
6118 * Makefile.am (SUBDIRS): Add examples; somehow this got removed
6119 accidentally.
6120 * examples/calc++/calc++-parser.yy: Remove from CVS, as it's
6121 autogenerated by the maintainer.
6122 * examples/calc++/.cvsignore: Add *.yy.
6123
6124 * lib/bitset.c (bitset_alloc): Don't cast xcalloc result.
6125 * lib/bitset_stats.c (bitset_stats_init): Likewise.
6126 * lib/bitsetv.c (bitsetv_alloc): Likewise.
6127
6128 * po/POTFILES.in: Add lib/xalloc-die.c; remove lib/xmalloc.c.
6129
6130 * src/relation.c (relation_transpose): Rewrite to avoid bogus complaint
6131 from maintainer-distcheck about casting the argument of 'free'.
6132
6133 * NEWS: Mention recent yytname changes.
6134 * THANKS: Add Anthony Heading, twlevo@xs4all.nl.
6135
6136 * bootstrap: For translations that have not yet been upgraded to
6137 the new runtime-po domain, prime the pump by extracting the
6138 relevant strings from the obsolete translations. This code can be
6139 removed once the bison-runtime domain has been translated by each
6140 team.
6141
6142 * src/scan-gram.l (<SC_PRE_CODE>.): Don't double-quote token names,
6143 now that token names are already quoted.
6144
6145 Fix problem reported by Anthony Heading.
6146 * data/glr.c (YYTOKEN_TABLE): New macro.
6147 (yytname): Define if YYTOKEN_TABLE.
6148 * data/yacc.c (YYTOKEN_TABLE, yytname): Likewise.
6149 * data/lalr1.cc (YYTOKEN_TABLE, yytname_): Likewise.
6150 (YYERROR_VERBOSE): Define the same way the other skeletons do.
6151 * src/output.c (prepare_symbols): Output token_table_flag.
6152
6153 2005-07-21 Paul Eggert <eggert@cs.ucla.edu>
6154
6155 * data/glr.c (yyinitGLRStack, yyreturn): Don't call malloc
6156 again if the first call fails.
6157
6158 * data/glr.c (yytnamerr): New function.
6159 (yyreportSyntaxError): Use it to dequote most string literals.
6160 * data/lalr1.c (yytname_): Renamed from yyname_, for compatibility
6161 with other skeletons. All uses changed.
6162 (yytnameerr_): New function.
6163 (yyreport_syntax_error): Use it to dequote most string literals.
6164 * data/yacc.c (yytnamerr): New function.
6165 (yyerrlab): Use it to decode most string literals.
6166 * doc/bison.texinfo (Decl Summary, Calling Convention):
6167 Clarify quoting convention of yytname.
6168 * src/output.c (prepare_symbols): Quote all names. This undoes
6169 the 2005-04-17 change, which is now accomplished (mostly) via
6170 changes in the parsers as described above.
6171 * tests/regression.at (Token definitions, Web2c Actions):
6172 Undo most 2005-04-17 change here, too.
6173
6174 2005-07-20 Paul Eggert <eggert@cs.ucla.edu>
6175
6176 Fix more problems reported by twlevo@xs4all.nl.
6177 * tests/cxx-type.at: Don't pipe output of ./types through sed to
6178 remove trailing spaces. This loses the exit status of ./types,
6179 and isn't needed since ./types shouldn't be emitting trailing
6180 spaces.
6181 * data/glr.c (yyreturn): Don't pop stack if yyinitStateSet failed,
6182 as the stack isn't valid in that case.
6183
6184 * src/scan-gram.l (gram_get_lineno, gram_get_in, gram_get_out):
6185 (gram_get_leng, gram_get_text, gram_set_lineno, gram_set_in):
6186 (gram_set_out, gram_get_debug, gram_set_debug, gram_lex_destroy):
6187 Add declarations to pacify "gcc -Wmissing-prototypes" when flex 2.5.31
6188 is used.
6189 * src/scan-skel.l (skel_get_lineno, skel_get_in, skel_get_out):
6190 (skel_get_leng, skel_get_text, skel_set_lineno, skel_set_in):
6191 (skel_set_out, skel_get_debug, skel_set_debug, skel_lex_destroy):
6192 Likewise.
6193
6194 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Work even with
6195 overly-picky compilers that reject 'char *foo = "bar";'.
6196
6197 * src/symtab.c (SYMBOL_ATTR_PRINT, symbol_print): Direct output
6198 to FILE * parameter, not to stderr. This fixes a typo introduced
6199 in the 2005-07-12 change.
6200
6201 * lib/subpipe.c (create_subpipe): Rewrite slightly to avoid
6202 warnings from GCC 4.
6203
6204 * data/glr.c (yyexpandGLRStack, yyaddDeferredAction, yyexpandGLRStack):
6205 (yyglrShiftDefer, yysplitStack):
6206 Remove unused parameters b4_pure_formals. All uses changed.
6207 (yyglrShift): Remove unused parameters b4_user_formals.
6208 All uses changed.
6209 (yyglrReduce): Removed unused parameter yylocp. All uses changed.
6210
6211 2005-07-18 Paul Eggert <eggert@cs.ucla.edu>
6212
6213 Destructor cleanups and regularization among the three skeletons.
6214 * NEWS: Document the behavior changes.
6215 * data/glr.c (yyrecoverSyntaxError): Don't bother to pop the
6216 stack before failing, as the cleanup code will do it for us now.
6217 * data/lalr1.cc (yyerrlab): Likewise.
6218 * data/glr.c (yyparse): Pop everything off the stack before
6219 freeing it, so that destructors get called properly.
6220 * data/lalr1.cc (yyreturn): Likewise.
6221 * data/yacc.c (yyreturn): Pop and destroy the start symbol, too.
6222 This is more consistent.
6223 * doc/bison.texinfo (Destructor Decl): Mention more reasons
6224 why destructors might be called. 1.875 -> 2.1.
6225 (Destructor Decl, Decl Summary, Table of Symbols):
6226 Some English-language cleanups for %destructor.
6227 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
6228 Add output line for destructor of start symbol.
6229 * tests/calc.at (AT_CHECK_CALC): Add one to line counts,
6230 because of that same extra output line.
6231
6232 * NEWS: Document minor wording changes in diagnostics of
6233 Bison-generated parsers.
6234 * data/glr.c (yyMemoryExhausted): Renamed from yyStackOverflow.
6235 Remove unused formals. All uses changed.
6236 (yyreportAmbiguity): "ambiguity detected" -> "syntax is ambiguous".
6237 (yyparse): Rename yyoverflowlab to yyexhaustedlab.
6238 * data/yacc.c (yyparse): "parser stack overflow" -> "memory exhausted".
6239 Rename yyoverflowab to yyexhaustedlab.
6240 When memory exhaustion occurs during syntax-error reporting,
6241 report it separately rather than in a single diagnostic; this
6242 eases translation.
6243 * doc/bison.texinfo (Memory Management): Renamed from Stack Overflow.
6244 (Memory Exhausted): Renamed from Parser Stack Overflow.
6245 Revamp wording slightly to prefer "memory exhaustion".
6246 * tests/actions.at: "parser stack overflow" -> "memory exhausted".
6247
6248 * data/c.m4 (b4_yysymprint_generate): Use YYFPRINTF, not fprintf.
6249
6250 Add i18n support to the GLR skeleton. Partially fix the C++
6251 skeleton; a C++ expert needs to finish this. Remove debugging
6252 msgids; there's little point to having them translated, since they
6253 can be understood only by someone who can read the
6254 (English-language) source code.
6255
6256 Generate runtime-po/bison-runtime.pot automatically, so that we
6257 don't have to worry about garbage getting in that file. We'll
6258 make sure after the next official release that old msgids don't
6259 get lost. See
6260 <http://lists.gnu.org/archive/html/bison-patches/2005-07/msg00119.html>.
6261
6262 * runtime-po/Makefile.in.in, runtime-po/bison-runtime.pot: Remove.
6263 Now auto-generated.
6264 * PACKAGING: Don't claim that Gawk, GCC, Perl use this method yet.
6265 Fix typos in explanations of the runtime file.
6266 * bootstrap: Change gettext keyword from YYI18N to YY_.
6267 Use standard Makefile.in.in in runtime-po, since we'll arrange
6268 for backward-compatible bison-runtime.po files in a different way.
6269 * data/glr.c (YY_): New macro, from yacc.c.
6270 (yyuserAction, yyreportAmbiguity, yyreportSyntaxError, yyparse):
6271 Translate messages intended for users.
6272 (yyreportSyntaxError): Change "virtual memory" to "memory" to match
6273 the wording in the other skeletons. We don't know that the memory
6274 is virtual.
6275 * data/lalr1.cc (YY_): Renamed from _. All uses changed.
6276 Use same method that yacc.c uses.
6277 Don't translate debugging messages.
6278 (yy::yyreport_syntax_error): Put in a FIXME for the i18n stuff;
6279 it doesn't work (yet), and requires C++ expertise to fix.
6280 * data/yacc.c (YY_): Renamed from YY18N. All uses changed.
6281 Move defn to a more logical place, to be consistent with other
6282 skeletons.
6283 Don't translate debugging messages.
6284 Don't assume line numbers fit in unsigned int; use unsigned long fmts.
6285 * doc/bison.texinfo: Mention <libintl.h>. Change glibc cross reference
6286 to gettext cross reference. Add indexing terms. Mention YYENABLE_NLS.
6287 * runtime-po/POTFILES.in: Add data/glr.c, data/lalr1.cc.
6288
6289 Fix yyerror / yylex test glitches noted by twlevo@xs4all.nl.
6290 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Have yyerror return
6291 void, not int.
6292 * tests/glr-regression.at (Badly Collapsed GLR States):
6293 Likewise.
6294 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
6295 yylex should return 0 at EOF rather than aborting.
6296
6297 Improve tests for stack overflow in GLR parser.
6298 Problem reported by twlevo@xs4all.nl.
6299 * data/glr.c (struct yyGLRStack): Remove yyerrflag member.
6300 All uses removed.
6301 (yyStackOverflow): Just longjmp, but with value 2 so that caller
6302 can handle the problem.
6303 (YYCHK1): Use goto (a la yacc.c) rather than setting a flag.
6304 (yyparse): New local variable yyresult to record the result.
6305 Use result of setjmp to set it, rather than storing itinto
6306 struct.
6307 (yyDone): Remove label.
6308 (yyacceptlab, yyabortlab, yyoverflowlab, yyreturn): New labels,
6309 to mimic yacc.c. Do not discard lookahead if it's EOF (possible
6310 if YYABORT is used).
6311 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Exit with
6312 yyparse status; put status > 1 into diagnostic.
6313 Check that status==2 works.
6314 * tests/calc.at, tests/cxx-type.at, tests/glr-regression.at:
6315 Use exit status 3 for failure to open (which shouldn't happen).
6316
6317 2005-07-17 Paul Eggert <eggert@cs.ucla.edu>
6318
6319 * tests/conflicts.at (%nonassoc and eof): Don't exit with status
6320 1 on syntax error; just let yyparse do its thing.
6321 * tests/glr-regression.at (Badly Collapsed GLR States): Likewise.
6322 * tests/torture.at (AT_DATA_STACK_TORTURE): Likewise.
6323 (Exploding the Stack Size with Alloca):
6324 (Exploding the Stack Size with Malloc):
6325 Expect exit status 2, not 1, since the parser is supposed to blow
6326 its stack. Problem reported by twlevo@xs4all.nl.
6327
6328 * data/glr.c (yyparse): Don't assume that the initial calls
6329 to YYMALLOC succeed; in that case, yyparse incorrectly returned 0.
6330 Print a stack-overflow message and fail instead.
6331 Initialize the line-number information before creating the stack,
6332 so that the stack-overflow message can report line zero safely.
6333
6334 2005-07-14 Paul Eggert <eggert@cs.ucla.edu>
6335
6336 Fix problems reported by twlevo@xs4all.nl.
6337 * data/glr.c (YYSTACKEXPANDABLE): Don't define if already defined.
6338 (yyuserMerge): Provide a default case if b4_mergers is empty.
6339 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Define YYSTACKEXPANDABLE.
6340 * tests/glr-regression.at
6341 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
6342 Add casts to pacify C++ compilers.
6343 * tests/glr-regression.at (Improper merging of GLR delayed action
6344 sets): Declare yylex before using it.
6345 * tests/Makefile.am (maintainer-check-g++): Fix a stray
6346 $(GXX) that escaped the renaming of GXX to CXX. Remove bogus
6347 test for valgrind; valgrind is independent of g++.
6348 (maintainer-check-posix): Add _POSIX2_VERSION=200112, to check
6349 for compatibility with POSIX 1003.1-2001 (if running coreutils).
6350 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Port to stricter C++.
6351 Use a destructor, so that we can expand the stack. Change
6352 YYSTYPE to char * so that we can free it. Cast result of malloc.
6353
6354 2005-07-13 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
6355
6356 * data/glr.c (yyuserAction): Fix uninitialized variable that caused
6357 a valgrind failure. Problem reported by twlevo@xs4all.nl.
6358
6359 2005-07-13 Paul Eggert <eggert@cs.ucla.edu>
6360
6361 * PACKAGING: New file, suggested by Bruno Haible and taken from
6362 similar wording in gettext's PACKAGING file.
6363 * NEWS: Mention PACKAGING.
6364 * Makefile.am (EXTRA_DIST): Add PACKAGING.
6365
6366 2005-07-12 Paul Eggert <eggert@cs.ucla.edu>
6367
6368 * NEWS: Document recent i18n improvements.
6369 * bootstrap: Get runtime translations into runtime-po.
6370 Create runtime-po files automatically, if possible.
6371 * configure.ac: Invoke BISON_I18N, so that we eat our own dog food.
6372 * data/yacc.c: Rewrite inclusion of <libintl.h> so that ENABLE_NLS
6373 does not infringe on the user's name space.
6374 (YYENABLE_NLS): Renamed from ENABLE_BISON_NLS.
6375 * doc/bison.texinfo (Internationalization): Revamp the English
6376 and Texinfo syntax a bit, to try to make it clearer.
6377 (Bison Options, Option Cross Key): Mention --print-localedir.
6378 * m4/bison-i18n.m4 (BISON_I18N): Rename ENABLE_BISON_NLS to
6379 YYENABLE_NLS. Quote a bit more.
6380 * runtime-po/.cvsignore: New file.
6381 * runtime-po/Makefile.in.in (mostlyclean): Remove *.old.pot.
6382 * runtime-po/Rules-quot: Remove; now created by bootstrap.
6383 * runtime-po/quot.sed: Likewise.
6384 * runtime-po/boldquot.sed: Likewise.
6385 * runtime-po/en@quot.header: Likewise.
6386 * runtime-po/en@boldquot.header: Likewise.
6387 * runtime-po/insert-header.sin: Likewise.
6388 * runtime-po/remove-potcdate.sin: Likewise.
6389 * runtime-po/Makevars: Likewise.
6390 * runtime-po/LINGUAS: Likewise.
6391 * runtime-po/de.po: Likewise; we will rely on the translation project
6392 to maintain this, so "bootstrap" should get it.
6393 * src/getarg.c (PRINT_LOCALEDIR_OPTION): Let the C compiler determine
6394 its value.
6395 * src/main.c (main): Bind the bison-runtime domain, too.
6396
6397 2005-07-12 Bruno Haible <bruno@clisp.org>
6398
6399 * data/yacc.c: Include <libintl.h> when NLS is enabled.
6400 (YYI18N): Renamed from _. Use dgettext when NLS is enabled.
6401 * po/POTFILES.in: Remove autogenerated file src/parse-gram.c.
6402 * runtime-po: New directory.
6403 * runtime-po/Makefile.in.in: New file, copied from po/, with modified
6404 $(DOMAIN).pot-update rule, so that old messages are never dropped.
6405 * runtime-po/Rules-quot: New file, copied from po/.
6406 * runtime-po/quot.sed: Likewise.
6407 * runtime-po/boldquot.sed: Likewise.
6408 * runtime-po/en@quot.header: Likewise.
6409 * runtime-po/en@boldquot.header: Likewise.
6410 * runtime-po/insert-header.sin: Likewise.
6411 * runtime-po/remove-potcdate.sin: Likewise.
6412 * runtime-po/Makevars: New file.
6413 * runtime-po/POTFILES.in: New file.
6414 * runtime-po/LINGUAS: New file.
6415 * runtime-po/bison-runtime.pot: New file.
6416 * runtime-po/de.po: New file.
6417 * m4/bison.m4: New file.
6418 * Makefile.am (SUBDIRS): Add runtime-po.
6419 (aclocaldir, aclocal_DATA): New variables.
6420 * configure.ac: Add AC_CONFIG_FILES of runtime-po/Makefile.in.
6421 Define aclocaldir.
6422 * src/getargs.c (usage): Document --print-localedir option.
6423 (PRINT_LOCALEDIR_OPTION): New enum item.
6424 (long_options): Add --print-localedir option.
6425 (getargs): Handle --print-localedir option.
6426 * doc/bison.texinfo (Bison Parser): Remove paragraph about _().
6427 (Internationalization): New section.
6428
6429 2005-07-12 Akim Demaille <akim@epita.fr>
6430
6431 * src/symtab.h, src/symtab.c (symbol_print): Swap the arguments,
6432 for consistency with the rest of the code.
6433 * src/symlist.h, src/symlist.c (symbol_list_print): Ditto.
6434 Add separators.
6435
6436 2005-07-12 Akim Demaille <akim@epita.fr>
6437
6438 * src/parse-gram.y: Use %printer instead of YYPRINT.
6439
6440 2005-07-12 Akim Demaille <akim@epita.fr>
6441
6442 * src/symtab.h, src/symtab.c (symbol_print): New.
6443 * src/symlist.h, src/symlist.c (symbol_list_print): New.
6444 * src/symlist.c (symbol_list_n_type_name_get): Report the culprit.
6445
6446 2005-07-12 Akim Demaille <akim@epita.fr>
6447
6448 * data/glr.c (b4_syncline): Fix (swap) the definitions of
6449 b4_at_dollar and b4_dollar_dollar.
6450
6451 2005-07-11 Paul Eggert <eggert@cs.ucla.edu>
6452
6453 * doc/bison.texinfo (Mystery Conflicts): Add reference to DeRemer
6454 and Pennello's paper.
6455
6456 2005-07-09 Paul Eggert <eggert@cs.ucla.edu>
6457
6458 * data/yacc.c (yyparse): Undo previous patch. Instead,
6459 set yylsp[0] and yyvsp[0] only if the initial action
6460 sets yylloc and yylval, respectively.
6461
6462 * data/yacc.c (yyparse): In the initial action, set
6463 yylsp[0] and yyvsp[0] rather than yylloc and yylval.
6464 This avoids the use of undefined variables if the initial
6465 action does not set yylloc and/or yylval.
6466
6467 2005-07-07 Paul Eggert <eggert@cs.ucla.edu>
6468
6469 * examples/calc++/calc++-driver.cc, examples/calc++/calc++-driver.hh:
6470 * examples/calc++/calc++-scanner.ll, examples/calc++/calc++.cc:
6471 Remove from CVS. These files are automatically generated.
6472 * examples/extexi: Clarify that this file is now part of Bison,
6473 not GNU M4, and that it works with any POSIX-compatible Awk.
6474 * examples/calc++/Makefile.am (run_extexi): Remove; not used.
6475 ($(calc_extracted)): Renamed from $(calc_sources_extracted),
6476 so that we also get calc++-parser.yy. Geneate it.
6477 Use $(AWK), not gawk, since any conforming Awk will do.
6478 Put comment before action, since older 'make' can't handle comment
6479 in action.
6480 $(BUILT_SOURCES): List all built sources, not just some of them.
6481 $(MAINTAINERCLEANFILES): Remove *.stamp, and all built sources.
6482 $($(srcdir)/calc++-parser.stamp): Work even if POSIXLY_CORRECT.
6483 $($(calc_sources_generated)): Remove unnecessary test for existence
6484 of target. (This had a shell syntax error anyway; a stray "x".)
6485 (calc_extracted): List $(srcdir)/calc++-parser.yy, not
6486 calc++-parser.yy.
6487 * examples/.cvsignore, examples/calc++/.cvsignore: New files.
6488
6489 * bootstrap (gnulib_modules): Add gettext, now that it's no longer
6490 implied by the other modules.
6491
6492 2005-07-06 Akim Demaille <akim@epita.fr>
6493
6494 Bind examples/calc++ to the package.
6495 * examples/calc++/Makefile: Remove, replaced by...
6496 * examples/calc++/Makefile.am: ... this new file.
6497 * examples/calc++/test: Remove input.
6498 * examples/calc++/compile: Remove.
6499 * examples/Makefile.am: New.
6500 * configure.ac, Makefile.am: Adjust.
6501 * doc/Makefile.am (clean-local): New, for more recent texi2dvis.
6502
6503 2005-07-05 Paul Eggert <eggert@cs.ucla.edu>
6504
6505 * data/glr.c (yyFail): Drastically simplify; since the format argument
6506 never had any % directives, we can simply pass it to yyerror.
6507 (yyparse): Use "t a; a=b;" rather than "t a = b;" when a will
6508 be modified later, as that is the usual style in glr.c.
6509 Problems reported by Paul Hilfinger.
6510
6511 Rewrite GLR parser to catch more buffer overrun, storage exhaustion,
6512 and size overflow errors.
6513 * data/glr.c: Include <stdio.h> etc. after user prolog, not before,
6514 in case the user prolog sets feature-test macros like _GNU_SOURCE.
6515 (YYSIZEMAX): New macro.
6516 (yystpcpy): New function, taken from yacc.c.
6517 (struct yyGLRStack.yyspaceLeft): Now size_t, not int.
6518 (yyinitGLRStack, yyfreeGLRstack): Remove unnecessary forward decls,
6519 so that we don't have to maintain their signatures.
6520 (yyFail): Check for buffer overflow, by using vsnprintf rather
6521 than vsprintf. Allocate a bigger buffer if possible.
6522 Report an error if buffer allocation fails.
6523 (yyStackOverflow): New function.
6524 (yyinitStateSet, yyinitGLRStack): Return a boolean indicating whether
6525 the initialization was successful. It might fail if storage was
6526 exhausted.
6527 (yyexpandGLRStack): Add more checks for storage allocation failure.
6528 Use yyStackOverflow to report failures.
6529 (yymarkStackDeleted, yyglrShift, yyglrShiftDefer, yydoAction):
6530 (yysplitStack, yyprocessOneStack, yyparse, yypstack):
6531 Don't assume stack number fits in int.
6532 (yysplitStack): Check for storage allocation failure.
6533 (yysplitStack, yyprocessOneStack): Add pure_formals, so that we
6534 can print diagnostics on storage allocation failure. All callers
6535 changed.
6536 (yyresolveValue): Use yybool for boolean.
6537 (yyreportSyntaxError): Check for size-calculation overflow.
6538 This code is taken from yacc.c.
6539 (yyparse): Check for storage allocation errors when allocating
6540 the initial stack.
6541
6542 2005-07-05 Akim Demaille <akim@epita.fr>
6543
6544 Extract calc++ from the documentation.
6545 * doc/bison.texinfo (Calc++): Add the extraction marks.
6546 * examples/extexi: New, from the aborted GNU Programming 2E.
6547 Separate the different paragraph of a file with empty lines.
6548 * examples/Makefile: Use it to extract the whole calc++ example.
6549
6550 2005-06-24 Akim Demaille <akim@epita.fr>
6551
6552 * doc/bison.texinfo (C++ Parser Interface): Use defcv to define
6553 class typedefs.
6554
6555 2005-06-22 Akim Demaille <akim@epita.fr>
6556
6557 * doc/bison.texinfo (C++ Language Interface): First stab.
6558 (C++ Parsers): Remove.
6559
6560 2005-06-22 Akim Demaille <akim@epita.fr>
6561
6562 * data/lalr1.cc (yylex_): Honor %lex-param.
6563
6564 2005-06-22 Akim Demaille <akim@epita.fr>
6565
6566 Start a set of simple examples.
6567 * examples/calc++/Makefile, examples/calc++/calc++-driver.cc,
6568 * examples/calc++/calc++-driver.hh,
6569 * examples/calc++/calc++-parser.yy,
6570 * examples/calc++/calc++-scanner.ll, examples/calc++/calc++.cc,
6571 * examples/calc++/compile, examples/calc++/test: New.
6572
6573 2005-06-09 Paul Eggert <eggert@cs.ucla.edu>
6574
6575 * data/yacc.c (malloc, free) [defined __cplusplus]: Wrap inside
6576 extern "C" {}. This fixes a problem reported by Paul Hilfinger,
6577 which stems from the 2005-05-27 patch.
6578
6579 2005-06-06 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
6580
6581 * data/glr.c: Modify treatment of unused parameters to permit use
6582 of g++ (which doesn't allow __attribute__ ((unused)) for parameters).
6583
6584 2005-05-30 Paul Eggert <eggert@cs.ucla.edu>
6585
6586 Fix infringement on user name space reported by Janos Zoltan Szabo.
6587 * data/yacc.c (yyparse): strlen -> yystrlen.
6588
6589 2005-05-30 Akim Demaille <akim@epita.fr>
6590
6591 * data/lalr1.cc (_): New.
6592 Translate the various messages.
6593
6594 2005-05-27 Paul Eggert <eggert@cs.ucla.edu>
6595
6596 Fix infringement on user name space reported by Bruno Haible.
6597 * data/yacc.c (YYSIZE_T): Define first, so that later decls can use it.
6598 Prefer GCC's __SIZE_TYPE__ if available, so that we don't infringe on
6599 the user's name space.
6600 (alloca): Include <stdlib.h> to get it, if it's not built in.
6601 (YYMALLOC, YYFREE): Define only if needed.
6602 (malloc, free): Declare, but only if needed, as this infringes on
6603 the user name space.
6604
6605 2005-05-25 Paul Eggert <eggert@cs.ucla.edu>
6606
6607 Fix BeOS, FreeBSD, MacOS porting problems reported by Bruno Haible.
6608 * lib/bitset.c (bitset_print): Don't assume size_t can be printed
6609 with %d format.
6610 * lib/ebitset.c (min, max): Undef before defining.
6611 * lib/vbitset.c (min, max): Likewise.
6612 * lib/subpipe.c (create_subpipe): Save local variables in case
6613 vfork clobbers them.
6614
6615 2005-05-24 Bruno Haible <bruno@clisp.org>
6616
6617 * tests/synclines.at (AT_SYNCLINES_COMPILE): Add support for the
6618 error message syntax used by gcc-4.0.
6619
6620 2005-05-23 Paul Eggert <eggert@cs.ucla.edu>
6621
6622 * README: Mention m4 1.4.3. Remove obsolete advice about
6623 Sun Forte Developer 6 update 2, VMS, and MS-DOS.
6624
6625 * bootstrap: Remove workaround for problem I encountered with
6626 gettext 0.14.1; it seems to be fixed now.
6627
6628 2005-05-22 Paul Eggert <eggert@cs.ucla.edu>
6629
6630 * NEWS: Version 2.0a.
6631
6632 * src/files.c: Include "stdio-safer.h"; this fixes a typo in
6633 the previous change.
6634
6635 Various maintainer cleanups.
6636 * .cvsignore: Add a.exe, a.out, b.out,, conf[0-9]*, confdefs*,
6637 conftest*, for benefit of CVS commands run at the same time as
6638 "configure". Add build-aux, since "bootstrap" now creates it and
6639 its subfiles.
6640 * Makefile.cfg (move_if_change): Remove.
6641 * Makefile.maint: Remove the update stuff; we now use "bootstrap".
6642 (ftp-gnu, www-gnu, move_if_change, local_updates, update):
6643 (po_repo, do-po-update, po-update, wget_files, get-targets):
6644 (config.guess-url_prefix, config.sub-url_prefix):
6645 (ansi2knr.c-url_prefix, texinfo.tex-url_prefix):
6646 (standards.texi-url_prefix, make-stds.texi-url_prefix, taget, url):
6647 ($(get-targets), cvs-files, automake_repo, wget-update, cvs-update):
6648 Remove.
6649 * configure.ac (AC_CONFIG_AUX_DIR): Change from config to build-aux;
6650 this is now the recommended name.
6651 * config/.cvsignore: Remove config.guess, config.rpath, config.sub,
6652 depcomp, install-sh, mdate-sh, missing, mkinstalldirs, texinfo.tex,
6653 ylwrap. These files now go into build-aux.
6654 * config/move-if-change: Remove.
6655 * config/prev-version.txt: Bump from 1.75 to 2.0.
6656
6657 * bootstrap: Add stdio-safer, unistd-safer modules.
6658 Remove m4/glibc2.m4 (introduced by latest gnulib, but
6659 we don't need it).
6660 * lib/.cvsignore: Add dup-safer.c, fd-safer.c,
6661 fopen-safer.c, stdio-safer.h, unistd-safer.h.
6662 * lib/subpipe.c: Include "unistd-safer.h".
6663 (create_subpipe): Make sure all the newly-created
6664 file descriptors are > 2, so that diagnostics don't
6665 get sent down them (which might cause Bison to hang, in theory).
6666 * m4/.cvsignore: Add stdio-safer.m4, unistd-safer.m4.
6667 * src/files.c (xfopen): Use fopen_safer, not fopen.
6668
6669 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Port
6670 yesterday's yacc.c fix.
6671
6672 2005-05-21 Paul Eggert <eggert@cs.ucla.edu>
6673
6674 * data/glr.c, data/lalr1.cc: Update copyright date.
6675
6676 Fix a destructor bug reported by Wolfgang Spraul in
6677 <http://lists.gnu.org/archive/html/bug-bison/2005-05/msg00042.html>.
6678 * data/yacc.c (yyabortlab): Don't call destructor, and
6679 don't set yychar to EMPTY.
6680 (yyoverflowlab): Don't call destructor.
6681 (yyreturn): Call destructor, if yychar is neither YYEOF nor YYEMPTY.
6682 * tests/calc.at (AT_CHECK_CALC): Expect one fewer output lines,
6683 since we no longer output the message "discarding lookahead token
6684 end of input ()".
6685
6686 2005-05-20 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
6687
6688 * data/glr.c (YY_SYMBOL_PRINT): Don't print newline at end to
6689 fix a small glitch in debugging output.
6690 (yyprocessOneStack, yyrecoverSyntaxError, yyparse): Print newline
6691 after YY_SYMBOL_PRINT where needed.
6692
6693 (struct yyGLRState): Add some comments.
6694 (struct yySemanticOption): Add some comments.
6695 (union yyGLRStackItem): Add comment.
6696
6697 (yymergeOptionSets): Correct this to properly perform the union,
6698 avoiding infinite reported by Michael Rosien.
6699 Update comment.
6700
6701 * tests/glr-regression.at: Add test for GLR merging error reported
6702 by M. Rosien.
6703
6704 2005-05-13 Paul Eggert <eggert@cs.ucla.edu>
6705
6706 * COPYING, ChangeLog, GNUmakefile, HACKING, Makefile.am,
6707 Makefile.cfg, Makefile.maint, NEWS, README, README-alpha,
6708 README-cvs, TODO, bootstrap, configure.ac, data/Makefile.am,
6709 data/README, data/c.m4, data/glr.c, data/lalr1.cc, data/yacc.c,
6710 data/m4sugar/m4sugar.m4, doc/Makefile.am, doc/bison.texinfo,
6711 doc/fdl.texi, doc/gpl.texi, doc/refcard.tex, lib/Makefile.am,
6712 lib/abitset.c, lib/abitset.h, lib/bbitset.h, lib/bitset.c,
6713 lib/bitset.h, lib/bitset_stats.c, lib/bitset_stats.h,
6714 lib/bitsetv-print.c, lib/bitsetv-print.h, lib/bitsetv.c,
6715 lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/get-errno.c,
6716 lib/get-errno.h, lib/lbitset.c, lib/lbitset.h, lib/libiberty.h,
6717 lib/main.c, lib/subpipe.c, lib/subpipe.h, lib/timevar.c,
6718 lib/timevar.def, lib/timevar.h, lib/vbitset.c, lib/vbitset.h,
6719 lib/yyerror.c, m4/cxx.m4, m4/m4.m4, m4/subpipe.m4, m4/timevar.m4,
6720 m4/warning.m4, src/LR0.c, src/LR0.h, src/Makefile.am, src/assoc.c,
6721 src/assoc.h, src/closure.c, src/closure.h, src/complain.c,
6722 src/complain.h, src/conflicts.c, src/conflicts.h, src/derives.c,
6723 src/derives.h, src/files.c, src/files.h, src/getargs.c,
6724 src/getargs.h, src/gram.c, src/gram.h, src/lalr.c, src/lalr.h,
6725 src/location.c, src/location.h, src/main.c, src/muscle_tab.c,
6726 src/muscle_tab.h, src/nullable.c, src/nullable.h, src/output.c,
6727 src/output.h, src/parse-gram.c, src/parse-gram.h,
6728 src/parse-gram.y, src/print.c, src/print.h, src/print_graph.c,
6729 src/print_graph.h, src/reader.c, src/reader.h, src/reduce.c,
6730 src/reduce.h, src/relation.c, src/relation.h, src/scan-gram.l,
6731 src/scan-skel.l, src/state.c, src/state.h, src/symlist.c,
6732 src/symlist.h, src/symtab.c, src/symtab.h, src/system.h,
6733 src/tables.c, src/tables.h, src/uniqstr.c, src/uniqstr.h,
6734 src/vcg.c, src/vcg.h, src/vcg_defaults.h, tests/Makefile.am,
6735 tests/actions.at, tests/c++.at, tests/calc.at, tests/conflicts.at,
6736 tests/cxx-type.at, tests/existing.at, tests/glr-regression.at,
6737 tests/headers.at, tests/input.at, tests/local.at, tests/output.at,
6738 tests/reduce.at, tests/regression.at, tests/sets.at,
6739 tests/synclines.at, tests/testsuite.at, tests/torture.at:
6740 Update FSF postal mail address.
6741
6742 2005-05-11 Paul Eggert <eggert@cs.ucla.edu>
6743
6744 * tests/local.at (AT_COMPILE_CXX): Treat LDFLAGS like AT_COMPILE does.
6745 Problem reported by Ralf Menzel.
6746
6747 2005-05-01 Paul Eggert <eggert@cs.ucla.edu>
6748
6749 * tests/actions.at: Test that stack overflow invokes destructors.
6750 From Marcus Holland-Moritz.
6751 * data/yacc.c (yyerrlab): Move the code that destroys the stack
6752 from here....
6753 (yyreturn): to here. That way, destructors are called properly
6754 even if the stack overflows, or the user calls YYACCEPT or
6755 YYABORT. Stack-overflow problem reported by Marcus Holland-Moritz.
6756 (yyoverflowlab): Destroy the lookahead.
6757
6758 2005-04-24 Paul Eggert <eggert@cs.ucla.edu>
6759
6760 * data/yacc.c (YYSTACK_ALLOC_MAXIMUM): Add more-descriptive comment.
6761
6762 2005-04-17 Paul Eggert <eggert@cs.ucla.edu>
6763
6764 * NEWS: Bison-generated C parsers no longer quote literal strings
6765 associated with tokens.
6766 * src/output.c (prepare_symbols): Don't escape strings,
6767 since users don't want to see C escapes.
6768 * tests/calc.at (AT_CHECK_CALC): Adjust to lack of quotes
6769 in diagnostics.
6770 * tests/input.at (Torturing the Scanner): Likewise.
6771 * tests/regression.at (Token definitions, Web2c Actions): Likewise.
6772
6773 2005-04-16 Paul Eggert <eggert@cs.ucla.edu>
6774
6775 * tests/torture.at (AT_INCREASE_DATA_SIZE): Skip the test if
6776 the data size is known to be too small and we can't increase it.
6777 This works around an HP-UX 11.00 glitch reported by Andrew Benham.
6778
6779 2005-04-15 Paul Eggert <eggert@cs.ucla.edu>
6780
6781 * src/parse-gram.y: Include quotearg.h.
6782 (string_as_id): Quote $1 before using it as a key, since the
6783 lexer no longer quotes it for us.
6784 (string_content): Don't strip quotes, since lexer no longer
6785 quotes it for us.
6786 * src/scan-gram.l: Include quotearg.h.
6787 ("\""): Omit quote.
6788 ("'"<SC_ESCAPED_CHARACTER>): Quote symbol before using it as
6789 a key, since the rest of the lexer doesn't quote it.
6790 * src/symtab.c (symbol_get): Don't quote symbol; caller does it now.
6791 * tests/regression.at (Token definitions): Check for backslashes
6792 in token strings.
6793
6794 * data/yacc.c (YYSTACK_ALLOC_MAXIMUM): New macro.
6795 (YYSIZE_T): Define to unsigned long int when using an older compiler.
6796 (yyparse): Revamp code to generate long syntax error message, to
6797 make it easier to translate, and to avoid problems with arithmetic
6798 overflow. Change "virtual memory" to "memory" in diagnostic, since
6799 we don't know whether the memory is virtual.
6800
6801 2005-04-13 Paul Eggert <eggert@cs.ucla.edu>
6802
6803 * NEWS: Bison-generated C parsers now use the _ macro to
6804 translate strings.
6805 * data/yacc.c (_) [!defined _]: New macro.
6806 All English strings wrapped inside this macro.
6807 * doc/bison.texinfo (Bison Parser): Document _.
6808 * po/POTFILES.in: Include src/parse-gram.c, since it now
6809 includes translateable strings that parse-gram.y doesn't.
6810
6811 2005-04-12 Paul Eggert <eggert@cs.ucla.edu>
6812
6813 * src/symtab.c (symbol_make_alias): Call symbol_type_set,
6814 reverting the 2004-10-11 change to this function.
6815 (symbol_check_alias_consistency): Don't call symbol_type_set
6816 if the type name is already correct.
6817 * tests/input.at (Typed symbol aliases): New test, from Tim Van Holder.
6818
6819 2005-03-25 Paul Eggert <eggert@cs.ucla.edu>
6820
6821 * tests/regression.at (Token definitions): Don't use a token named
6822 c, as that generates a "#define c ..." that runs afoul of buggy
6823 stdlib.h that uses the identifier c as a member of struct
6824 drand48_data. Problem reported by Horst Wente.
6825
6826 2005-03-21 Paul Eggert <eggert@cs.ucla.edu>
6827
6828 * bootstrap: Change translation URL from
6829 http://www2.iro.umontreal.ca/~gnutra/po/maint/bison/ to
6830 http://www.iro.umontreal.ca/translation/maint/bison/ to avoid
6831 redirection glitches. Problem reported by twlevo@xs4all.nl.
6832
6833 2005-03-20 Paul Eggert <eggert@cs.ucla.edu>
6834
6835 * tests/local.at (AT_COMPILE, AT_COMPILE_CXX): Don't put options
6836 after operands; POSIX says this isn't portable for the c99 command.
6837
6838 2005-03-18 Paul Eggert <eggert@cs.ucla.edu>
6839
6840 * tests/glr-regression.at (glr-regr2a.y): Try to dump core
6841 immediately if a data overrun has occurred; this may help us track
6842 down what may be a spurious failure on MacOS.
6843
6844 2005-03-17 Paul Eggert <eggert@cs.ucla.edu>
6845
6846 Respond to problems reported by twlevo@xs4all.nl.
6847
6848 * bootstrap: Use "trap - 0" rather than the unportable "trap 0".
6849
6850 * src/vcg.h: Comment fix.
6851 * src/vcg_defaults.h: Parenthesize macro bodies to make them safe.
6852 (G_CMAX): Change to -1 instead of INT_MAX.
6853
6854 * data/yacc.c (yyparse): Omit spaces before #line.
6855
6856 2005-03-15 Paul Eggert <eggert@cs.ucla.edu>
6857
6858 * src/tables.c (state_number_to_vector_number): Put it inside an
6859 "#if 0", since it's not currently used. Problem reported by
6860 Roland McGrath.
6861
6862 2005-03-06 Paul Eggert <eggert@cs.ucla.edu>
6863
6864 * src/output.c (escaped_output): Renamed from
6865 escaped_file_name_output, since we now use it for symbol tags as
6866 well. All uses changed.
6867 (symbol_destructors_output, symbol_printers_output):
6868 Escape symbol tags too.
6869 Problem reported by Matyas Forstner in
6870 <http://lists.gnu.org/archive/html/bug-bison/2005-03/msg00009.html>.
6871
6872 * src/muscle_tab.c (muscle_code_grow): Don't quote numbers; it's
6873 not needed.
6874 * src/output.c (user_actions_output, token_definitions_output,
6875 symbol_destructors_output, symbol_printers_output): Likewise.
6876 * src/reader.c (prologue_augment): Likewise.
6877 * src/scan-gram.l (handle_action_dollar, handle_action_at): Likewise.
6878
6879 * src/vcg.c (output_edge): Don't quote linestyle arg.
6880 Problem reported by twlevo@xs4all.nl.
6881
6882 2005-02-28 Paul Eggert <eggert@cs.ucla.edu>
6883
6884 * doc/bison.texinfo (Semantic Tokens): Fix scoping problem in
6885 example, reported by Derek M Jones. Also, make the example even
6886 more outrageous, to better illustrate how bad the problem is.
6887
6888 2005-02-24 Paul Eggert <eggert@cs.ucla.edu>
6889
6890 * doc/bison.texinfo (Mfcalc Symtab): Correct the prototype for
6891 putsym. Typo reported by Sebastian Piping.
6892
6893 2005-02-23 Paul Eggert <eggert@cs.ucla.edu>
6894
6895 * doc/bison.texinfo (Language and Grammar): some -> same
6896 (Epilogue): int he -> in the
6897 Typos reported by Sebastian Piping via Justin Pence.
6898
6899 2005-02-07 Paul Eggert <eggert@cs.ucla.edu>
6900
6901 * tests/glr-regression.at (Improper handling of embedded actions
6902 and dollar(-N) in GLR parsers): Renamed from "Improper handling of
6903 embedded actions and $-N in GLR parsers", work around an Autoconf bug
6904 with dollar signs in test names.
6905 * tests/input.at (Invalid dollar-n): Renamed from "Invalid \$n",
6906 for a similar reason.
6907
6908 2005-01-28 Paul Eggert <eggert@cs.ucla.edu>
6909
6910 * src/vcg.c (output_graph): G_VIEW -> normal_view in case someone
6911 wants to redefine G_VIEW.
6912
6913 2005-01-27 Paul Eggert <eggert@cs.ucla.edu>
6914
6915 * src/vcg.c (get_view_str): Remove case for normal_view.
6916 Problem reported by twlevo@xs4all.nl.
6917
6918 2005-01-24 Paul Eggert <eggert@cs.ucla.edu>
6919
6920 * configure.ac (O0CFLAGS, O0CXXFLAGS): Fix quoting bug.
6921 Problem reported by twlevo@xs4all.nl.
6922
6923 * doc/bison.texinfo: Change @dircategory from "GNU programming
6924 tools" to "Software development". Requested by Richard Stallman
6925 via Karl Berry.
6926
6927 2005-01-23 Paul Eggert <eggert@cs.ucla.edu>
6928
6929 * tests/c++.at (AT_CHECK_DOXYGEN): Don't use options after operands.
6930 Problem reported by twlevo@xs4all.nl.
6931
6932 2005-01-21 Paul Eggert <eggert@cs.ucla.edu>
6933
6934 * data/yacc.c (YYCOPY, yystpcpy, yyparse): Remove "register"
6935 keyword; it's not needed with modern compilers, and it doesn't
6936 affect correctness with older compilers. Suggested by
6937 twlevo@xs4all.nl.
6938
6939 2005-01-17 Paul Eggert <eggert@cs.ucla.edu>
6940
6941 * data/glr.c (yyuserAction): Add "default: break;" case to pacify
6942 gcc -Wswitch-default.
6943 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
6944 * data/yacc.c (yyparse): Likewise.
6945
6946 2005-01-12 Paul Eggert <eggert@cs.ucla.edu>
6947
6948 * src/system.h (OUTPUT_EXT, TAB_EXT): Define only if not defined
6949 already. Let config.h define any nonstandard values.
6950
6951 2005-01-10 Paul Eggert <eggert@cs.ucla.edu>
6952
6953 * tests/calc.at (_AT_DATA_CALC_Y): Use alarm (100), not alarm (10),
6954 for the benefit of slower hosts. Problem reported by
6955 Nelson H. F. Beebe.
6956
6957 2005-01-07 Paul Eggert <eggert@cs.ucla.edu>
6958
6959 * data/yacc.c (yyparse): Pacify non-GCC compilers about yyerrorlab
6960 being defined and not used.
6961 * data/lalr1.cc (yyparse): Likewise.
6962 Use "if (false)" rather than "if (0)".
6963
6964 2005-01-05 Paul Eggert <eggert@cs.ucla.edu>
6965
6966 * TODO: Mention that we should allow NUL bytes in tokens.
6967
6968 2005-01-02 Paul Eggert <eggert@cs.ucla.edu>
6969
6970 * src/scan-skel.l (<<EOF>>): Don't close standard output.
6971 Problem reported by Hans Aberg.
6972
6973 2005-01-01 Paul Eggert <eggert@cs.ucla.edu>
6974
6975 * src/getargs.c (version): Happy new year; update overall
6976 program copyright date from 2004 to 2005.
6977
6978 * src/scan-skel.l ("@output ".*\n): Don't close standard output.
6979 Problem reported by Hans Aberg.
6980 * tests/output.at (AT_CHECK_OUTPUT): New arg SHELLIO.
6981 (Output file names.): Add a test for the case when standard output
6982 is closed.
6983
6984 2004-12-26 Paul Eggert <eggert@cs.ucla.edu>
6985
6986 * doc/bison.texinfo (@copying): Update FDL version number to 1.2,
6987 to fix an oversight in the Bison 2.0 manual.
6988
6989 2004-12-25 Paul Eggert <eggert@cs.ucla.edu>
6990
6991 * NEWS: Version 2.0. Reformat the existing news items since
6992 1.875, so that related items are grouped together.
6993 * configure.ac (AC_INIT): Bump version to 2.0.
6994 * src/parse-gram.c, src/parse-gram.h: Regenerate with 2.0.
6995
6996 * tests/torture.at (Exploding the Stack Size with Alloca): Set
6997 YYSTACK_USE_ALLOCA to 1 if __GNUC__ or alloca are defined;
6998 otherwise, we're not testing alloca. Unfortunately there's no
6999 simple way to consult HAVE_ALLOCA here.
7000
7001 * data/lalr1.cc (yydestruct_): Pacify unused variable warning
7002 for yymsg, too.
7003
7004 * src/LR0.c (new_itemsets): Use memset rather than zeroing by
7005 hand. This avoids a warning about comparing int to size_t when
7006 GCC warnings are enabled.
7007
7008 2004-12-22 Paul Eggert <eggert@cs.ucla.edu>
7009
7010 * NEWS: Bison-generated parsers no longer default to using the
7011 alloca function (when available) to extend the parser stack, due
7012 to widespread problems in unchecked stack-overflow detection.
7013 * data/glr.c (YYMAXDEPTH): Remove undef when zero. It's the user's
7014 responsibility to set it to a positive value. This lets the user
7015 specify a value that is not a preprocessor constant.
7016 * data/yacc.c (YYMAXDEPTH): Likewise.
7017 (YYSTACK_ALLOC): Define only if YYSTACK_USE_ALLOCA is nonzero.
7018 * doc/bison.texinfo (Stack Overflow): YYMAXDEPTH no longer needs
7019 to be a compile-time constant. However, explain the constraints on it.
7020 Also, explain the constraints on YYINITDEPTH.
7021 (Table of Symbols): Explain that alloca is no longer the default.
7022 Explain the user's responsibility if they define YYSTACK_USE_ALLOCA
7023 to 1.
7024
7025 * doc/bison.texinfo (Location Default Action): Mention that n must
7026 be zero when k is zero. Suggested by Frank Heckenbach.
7027
7028 2004-12-22 Akim Demaille <akim@epita.fr>
7029
7030 * data/lalr1.cc (parser::token_number_type, parser::rhs_number_type)
7031 (parser::state_type, parser::semantic_type, parser::location_type):
7032 Private, not public.
7033 (parser::parse): Return ints, not bool.
7034 Returning a bool introduces a problem: 0 corresponds to false, and
7035 it seems weird to return false on success. Returning true changes
7036 the conventions for yyparse.
7037 Alternatively we could return void and send an exception.
7038 There is no clear consensus (yet?).
7039 (state_stack, semantic_stack, location_stack): Rename as...
7040 (state_stack_type, semantic_stack_type, location_stack_type): these.
7041 Private, not public.
7042 * tests/c++.at: New.
7043 * tests/testsuite.at, tests/Makefile.am: Adjust.
7044
7045 2004-12-21 Akim Demaille <akim@epita.fr>
7046
7047 * data/lalr1.cc (parser::parse): Return a bool instead of an int.
7048
7049 2004-12-21 Akim Demaille <akim@epita.fr>
7050
7051 Don't impose std::string for filenames.
7052
7053 * data/lalr1.cc (b4_filename_type): New.
7054 (position::filename): Use it.
7055 (parser.hh): Move the inclusion of stack.hh and location.hh below
7056 the user code, so that needed headers for the filename type can be
7057 included first.
7058 Forward declare them before the user code.
7059 * tests/Makefile.am (check-local, installcheck-local): Pass
7060 TESTSUITEFLAGS to the TESTSUITE.
7061
7062 2004-12-20 Akim Demaille <akim@epita.fr>
7063
7064 Use more STL like names: my_class instead of MyClass.
7065
7066 * data/lalr1.cc (LocationStack, LocationType, RhsNumberType)
7067 (SemanticStack, SemanticType, StateStack, StateType)
7068 (TokenNumberType, Stack, Slice, Traits, Parser::location)
7069 (Parser::value): Rename as...
7070 (location_stack, location_type, rhs_number_type, semantic_stack)
7071 (semantic_type, state_stack, state_type, token_number_type, stack)
7072 (slice, traits, parser::yylloc, parser::yylval): these.
7073
7074 * tests/calc.at, tests/regression.at, tests/actions.at: Adjust.
7075
7076 2004-12-19 Paul Eggert <eggert@cs.ucla.edu>
7077
7078 * data/glr.c (YYLLOC_DEFAULT): Use GNU spacing conventions.
7079 * data/yacc.c (YYLLOC_DEFAULT): Likewise.
7080
7081 2004-12-17 Paul Eggert <eggert@cs.ucla.edu>
7082
7083 Remove uses of 'short int' and 'unsigned short int'. This raises
7084 some arbitrary limits. It uses more memory but nowadays that's
7085 not much of an issue.
7086
7087 This change does not affect the generated parsers; that's a different
7088 task, as some users will want to conserve memory there.
7089
7090 Ideally we should use size_t to represent all object counts, and
7091 something like ptrdiff_t to represent signed differences of object
7092 counts; but that will require more code-cleanup than I have the
7093 time to do right now.
7094
7095 * src/LR0.c (allocate_itemsets, new_itemsets, save_reductions):
7096 Use size_t, not int or short int, to count objects.
7097 * src/closure.c (nritemset, closure): Likewise.
7098 * src/closure.h (nritemset, closure): Likewise.
7099 * src/nullable.c (nullable_compute): Likewise.
7100 * src/print.c (print_core): Likewise.
7101 * src/print_graph.c (print_core): Likewise.
7102 * src/state.c (state_compare, state_hash): Likewise.
7103 * src/state.h (struct state): Likewise.
7104 * src/tables.c (default_goto, goto_actions): Likewise.
7105
7106 * src/gram.h (rule_number, rule): Use int, not short int.
7107 * src/output.c (prepare_rules): Likewise.
7108 * src/state.h (state_number, STATE_NUMBER_MAXIMUM, transitions,
7109 errs, reductions): Likewise.
7110 * src/symtab.h (symbol_number, SYMBOL_NUMBER_MAXIMUM, struct symbol):
7111 Likewise.
7112 * src/tables.c (vector_number, tally, action_number,
7113 ACTION_NUMBER_MINIMUM): Likewise.
7114 * src/output.c (muscle_insert_short_int_table): Remove.
7115
7116 2004-12-17 Akim Demaille <akim@epita.fr>
7117
7118 * data/lalr1.cc: Extensive Doxygenation.
7119 (error_): Rename as...
7120 (error): this, since it is visible to the user.
7121 Adjust callers.
7122 (Parser::message): Now an automatic variable from...
7123 (Parser::yyreport_syntax_error_): here.
7124 * tests/actions.at, tests/calc.at, tests/regression.at: Adjust to
7125 Parser::error.
7126 * tests/input.at: Escape $.
7127
7128 2004-12-16 Paul Eggert <eggert@cs.ucla.edu>
7129
7130 * data/glr.c (b4_lhs_value, b4_rhs_value, b4_rhs-location):
7131 Parenthesize rhs to avoid obscure problems with mistakes like
7132 "foo$$bar = foo$1bar;". Problem reported by twlevo at xs4all.
7133 * data/lalr1.cc (b4_lhs_value, b4_rhs_value, b4_lhs_location,
7134 b4_rhs_location): Likewise.
7135 * data/yacc.c (b4_lhs_value, b4_rhs_value, b4_lhs_location,
7136 b4_rhs_location): Likewise.
7137
7138 2004-12-16 Akim Demaille <akim@epita.fr>
7139
7140 * data/lalr1.cc (yyreport_syntax_error_): Catch up with glr.c and
7141 yacc.c: be sure to stay within yycheck_.
7142 * tests/actions.at: Re-enable C++ tests.
7143
7144 2004-12-16 Akim Demaille <akim@epita.fr>
7145
7146 * src/print_graph.c (print_graph): Remove layoutalgorithm uses for
7147 real.
7148
7149 2004-12-16 Akim Demaille <akim@epita.fr>
7150
7151 Use #define to handle the %name-prefix.
7152
7153 * data/glr.c, data/yacc.c: Comment changes.
7154 * data/lalr1.cc (yylex): Use #define to select the name of yylex,
7155 so that one can refer to yylex in the parser file, and have it
7156 renamed, as is the case with other skeletons.
7157
7158 2004-12-16 Akim Demaille <akim@epita.fr>
7159
7160 Move lalr1.cc internals into yy*.
7161
7162 * data/lalr1.cc (semantic_stack_, location_stack_, state_stack_)
7163 (semantic_stack_, location_stack_, pact_, pact_ninf_, defact_)
7164 (pgoto_, defgoto_, table_, table_ninf_, check_, stos_, r1_, r2_)
7165 (name_, rhs_, prhs_, rline_, token_number_, eof_, last_, nnts_)
7166 (empty_, final_, terror_, errcode_, ntokens_)
7167 (user_token_number_max_, undef_token_, n_, len_, state_, nerrs_)
7168 (looka_, ilooka_, error_range_, nerrs_):
7169 Rename as...
7170 (yysemantic_stack_, yylocation_stack_, yystate_stack_)
7171 (yysemantic_stack_, yylocation_stack_, yypact_, yypact_ninf_)
7172 (yydefact_, yypgoto_, yydefgoto_, yytable_, yytable_ninf_)
7173 (yycheck_, yystos_, yyr1_, yyr2_, yyname_, yyrhs_, yyprhs_)
7174 (yyrline_, yytoken_number_, yyeof_, yylast_, yynnts_, yyempty_)
7175 (yyfinal_, yyterror_, yyerrcode_, yyntokens_)
7176 (yyuser_token_number_max_, yyundef_token_, yyn_, yylen_, yystate_)
7177 (yynerrs_, yylooka_, yyilooka_, yyerror_range_, yynerrs_):
7178 these.
7179
7180 2004-12-15 Paul Eggert <eggert@cs.ucla.edu>
7181
7182 Fix some problems reported by twlevo at xs4all.
7183 * src/symtab.c (symbol_new): Report an error if the input grammar
7184 contains too many symbols. This is better than calling abort() later.
7185 * src/vcg.h (enum layoutalgorithm): Remove. All uses removed.
7186 (struct node, struct graph):
7187 Rename member expand to stretch. All uses changed.
7188 (struct graph): Remove member layoutalgorithm. All uses removed.
7189 * src/vcg.c (get_layoutalgorithm_str): Remove. All uses removed.
7190 * src/vcg_defaults.h (G_STRETCH): Renamed from G_EXPAND.
7191 All uses changed.
7192 (N_STRETCH): Rename from N_EXPAND. All uses changed.
7193
7194 2004-12-15 Akim Demaille <akim@epita.fr>
7195
7196 * data/lalr1.cc: Normalize /** \brief ... */ to ///.
7197 Add more Doxygen comments.
7198 (symprint_, stack_print_, reduce_print_, destruct_, pop)
7199 (report_syntax_error_, translate_): Rename as...
7200 (yysymprint_, yystack_print_, yyreduce_print_, yydestruct_)
7201 (yypop_, yyreport_syntax_error_, yytranslate_): this.
7202
7203 2004-12-15 Akim Demaille <akim@epita.fr>
7204
7205 * data/lalr1.cc (lex_): Rename as...
7206 (yylex_): this.
7207 Move the trace here.
7208 Take the %name-prefix into account.
7209 Reported by Alexandre Duret-Lutz.
7210
7211 2004-12-15 Akim Demaille <akim@epita.fr>
7212
7213 Simplify the C++ parser constructor.
7214
7215 * data/lalr1.cc (debug_): Rename as...
7216 (yydebug_): so that the parser's internals are always in the yy*
7217 pseudo namespace.
7218 Adjust uses.
7219 (b4_parse_param_decl): Remove the leading comma as it is now only
7220 called as unique argument list.
7221 (Parser::Parser): Remove the constructor accepting a location and
7222 an initial debugging level.
7223 Remove from the other ctor the argument for the debugging level.
7224 (debug_level_type, debug_level, set_debug_level): New.
7225
7226 * tests/actions.at, tests/calc.at, tests/regression.at: Adjust
7227 constructor calls.
7228
7229 2004-12-15 Akim Demaille <akim@epita.fr>
7230
7231 Remove b4_root related material: failure experiment
7232 (which goal was to allow to derive from a class).
7233
7234 * data/lalr1.cc (b4_root, b4_param, b4_constructor): Remove
7235 definitions and uses.
7236
7237 2004-12-14 Paul Eggert <eggert@cs.ucla.edu>
7238
7239 * data/glr.c (struct yyGLRStack): yyerror_range now has 3 items,
7240 not 2, since it's not portable to subtract 1 from the start of an
7241 array. The new item 0 is never set or used. All uses changed.
7242
7243 (yyrecoverSyntaxError): Use YYLLOC_DEFAULT instead of assuming
7244 the default definition of YYLLOC_DEFAULT. Problem reported
7245 by Frank Heckenbach.
7246
7247 2004-12-12 Paul Eggert <eggert@cs.ucla.edu>
7248
7249 * data/glr.c (YYRHSLOC): Don't have two definitions, one for
7250 the normal case and one for the error case. Just use the
7251 first one uniformly. Problem reported by Frank Heckenbach.
7252 (YYLLOC_DEFAULT): Use the conventions of yacc.c, so we can
7253 use exactly the same macro in both places.
7254 (yyerror_range): Now of type yyGLRStackItem, not YYLTYPE,
7255 so that the normal-case YYRHSLOC works for the error case too.
7256 All uses changed.
7257 * data/yacc.c (YYRHSLOC): New macro, taken from glr.c.
7258 (YYLLOC_DEFAULT): Use the same macro as glr.c.
7259 * doc/bison.texinfo (Location Default Action): Don't claim that
7260 we have an array of locations. Use the same macro for both glr
7261 and lalr parsers. Mention YYRHSLOC. Mention what happens when
7262 the index is 0.
7263
7264 2004-12-10 Paul Eggert <eggert@cs.ucla.edu>
7265
7266 * HACKING: Update email addresses to send announcements to.
7267
7268 * configure.ac (AC_INIT): Bump version to 1.875f.
7269
7270 2004-12-10 Paul Eggert <eggert@cs.ucla.edu>
7271
7272 * NEWS: Version 1.875e.
7273 * src/parse-gram.c, src/parse-gram.h: Regenerate with 1.875e.
7274
7275 * src/scan-skel.l: Include "complain.h", for "fatal".
7276
7277 * src/relation.h (relation_print, relation_digraph):
7278 Relation sizes are of type relation_node, not size_t (this is
7279 merely a doc fix, since the two types are equivalent).
7280 (relation_transpose): Relation sizes are of type relation_node,
7281 not int.
7282 * src/relation.c: Likewise.
7283 (top, infinity): Now of type relation_node, not int.
7284 (traverse, relation_transpose): Use relation_node, not int.
7285
7286 * data/glr.c (yyuserAction, yyrecoverSyntaxError): Mark args
7287 with ATTRIBUTE_UNUSED if they're not used, to avoid GCC warning.
7288 (yyparse): Remove unused local introduced in 2004-10-25 patch.
7289
7290 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): New arg
7291 specifying whether the test should be skipped. Use it tp
7292 specify that the [%defines %skeleton "lalr1.cc"] tests currently
7293 fail on some hosts, and should be skipped.
7294
7295 2004-12-08 Paul Eggert <eggert@cs.ucla.edu>
7296
7297 * src/system.h (CALLOC, MALLOC, REALLOC): Remove. All callers
7298 changed to use xcalloc, xnmalloc, xnrealloc, respectively,
7299 unless otherwise specified below.
7300
7301 * src/LR0.c (allocate_itemsets): Use xnmalloc, not xcalloc,
7302 to allocate kernel_base, kernel_items, kernel_size, since
7303 they needn't be initialized to 0.
7304 (allocate_storgae): Likewise, for shiftset, redset, shift_symbol.
7305 * src/closure.c (new_closure): Likewise, for itemset.
7306 * src/derives.c (derives_compute): Likewise, for delts, derives, q.
7307 * src/lalr.c (set_goto_map): Likewise, for temp_map.
7308 (initialize_F): Likewise, for reads, edge, reads[i], includes[i].
7309 (build_relations): Likewise for edge, states1, includes.
7310 * src/nullable.c (nullable_compute): Likewise, for squeue, relts.
7311 * src/reader.c (packgram): Likewise, for ritem, rules.
7312 * src/reduce.c (nonterminals_reduce): Likewise for nontermmap.
7313 * src/relation.c (relation_digraph): Likewise for VERTICES.
7314 (relation_transpose): Likewise for new_R, end_R.
7315 * src/symtab.c (symbols_token_translations_init): Likewise for
7316 token_translations.
7317 * src/tables.c (save_row): Likewise for froms, tos, conflict_tos.
7318 (token_actions): Likewise for yydefact, actrow, conflrow,
7319 conflict_list.
7320 (save_column): Likewise for froms[symno], tos[symno].
7321 (goto_actions): Likewise for state_count.
7322 (pack_table): Likewise for base, pos, check.
7323 (tables_generate): Likewise for width.
7324
7325 * src/LR0.c (set_states): Don't reuse kernel_size and kernel_base
7326 for initial core. Just have a separate core, so we needn't worry
7327 about whether kernel_size and kernel_base are initialized.
7328
7329 * src/LR0.c (shift_symbol, redset, shiftset, kernel_base,
7330 kernel_size, kernel_items): Remove unnecessary initialization.
7331 * src/conflicts.c (conflicts): Likewise.
7332 * src/derives.c (derives): Likewise.
7333 * src/muscle_tablc (muscle_insert): Likewise.
7334 * src/relation.c (relation_digraph): Likewise.
7335 * src/tables.c (froms, tos, conflict_tos, tally, width, actrow, order,
7336 conflrow, conflict_table, conflict_list, table, check):
7337 Likewise.
7338
7339 * src/closure.c (new_closure): Arg is of type unsigned int, not int.
7340 This is because all callers pass unsigned int.
7341 * src/closure.h (new_closure): Likewise.
7342
7343 * src/lalr.c (initialize_F): Initialize reads[i] in all cases.
7344 (build_relations): Initialize includes[i] in all cases.
7345 * src/reader.c (packgram): Always initialize rules[ruleno].prec
7346 and rules[ruleno].precsym. Initialize members in order.
7347 * src/relation.c (relation_transpose): Always initialize new_R[i]
7348 and end_R[i].
7349 * src/table.c (conflict_row): Initialize 0 at end of conflict_list.
7350
7351 * src/output.c (prepare_actions): Pass 0 instead of conflict_list[0];
7352 conflict_list[0] was always 0, but now it isn't initialized.
7353
7354 * src/table.c (table_grow): When conflict_table grew, the grown
7355 area wasn't cleared. Fix this.
7356
7357 * lib/.cvsignore: Add strdup.c, strdup.h.
7358 * m4/.cvsignore: Add strdup.m4.
7359
7360 2004-12-07 Paul Eggert <eggert@cs.ucla.edu>
7361
7362 * src/lalr.h (GOTO_NUMBER_MAXIMUM): New macro.
7363 * src/lalr.c (set_goto_map): Don't allow ngotos to equal
7364 GOTO_NUMBER_MAXIMUM, since we occasionally compute
7365 ngotos + 1 without checking for overflow.
7366 (build_relations): Use END_NODE, not -1, to denote end of edges.
7367 * src/lalr.c (set_goto_map, map_goto, initialize_F, add_loopback_edge,
7368 build_relations): Use goto_number, not int, for goto numbers.
7369 * src/tables.c (save_column, default_goto): Likewise.
7370
7371 2004-11-23 Akim Demaille <akim@epita.fr>
7372
7373 * data/lalr1.cc (YYSTYPE): Define it as is done for C, instead
7374 of #defining from yystype.
7375 Don't typedef yystype, C++ does not need it.
7376 This lets it possible to forward declare it as union.
7377
7378 2004-11-23 Paul Eggert <eggert@cs.ucla.edu>
7379
7380 * bootstrap (gnulib_modules): Add extensions.
7381 Problem reported by Jim Meyering.
7382
7383 2004-11-22 Paul Eggert <eggert@cs.ucla.edu>
7384
7385 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c,
7386 src/lalr.c, src/nullable.c, src/relation.c, src/scan-skel.l,
7387 src/system.h, src/tables.c: XFREE -> free, to accommodate
7388 recent change to gnulib xalloc.h.
7389 Problem reported by Jim Meyering.
7390
7391 2004-11-17 Akim Demaille <akim@epita.fr>
7392
7393 * data/lalr1.cc (symprint_): Use cdebug_ to avoid warnings.
7394
7395 2004-11-17 Akim Demaille <akim@epita.fr>,
7396 Alexandre Duret-Lutz <adl@gnu.org>
7397
7398 * data/lalr1.cc (Parser::yycdebug_): New, a pointer, to allow
7399 changes.
7400 (YYCDEBUG): Adjust.
7401 Use it instead of cdebug_.
7402 (Parser::debug_stream, Parser::set_debug_stream): New.
7403 (Parser::symprint_): Define cdebug_ for temporary backward
7404 compatibility.
7405 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use
7406 debug_stream ().
7407
7408 2004-11-17 Akim Demaille <akim@epita.fr>
7409
7410 * data/lalr1.cc (Parser:print_): Remove, use %printer instead.
7411 * tests/regression.at (_AT_DATA_DANCER_Y): Adjust.
7412 * tests/calc.at (_AT_DATA_CALC_Y): Ditto.
7413 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
7414
7415 2004-10-27 Paul Eggert <eggert@cs.ucla.edu>
7416
7417 * data/glr.c (yyloc_default): Remove; not used.
7418 Problem reported by Frank Heckenbach.
7419
7420 2004-10-25 Akim Demaille <akim@epita.fr>
7421
7422 * data/glr.c (YYRHSLOC): Move its definition next to its uses.
7423 Introduce another definition to address simple location arrays.
7424 (yyGLRStack): New member: yyerror_range.
7425 (yyrecoverSyntaxError, yyparse): Update it.
7426 (yyrecoverSyntaxError): Use it when shifting the error token to
7427 have an accurate range, equivalent to the one computed by both
7428 yacc.c and lalr1.cc.
7429 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Change its yylex so
7430 that column numbers start at column 0, as per GNU Coding
7431 Standards, the others tests, and the doc.
7432 (_AT_RESOLVED_GLR_OUTPUT_WITH_LOC, _AT_AMBIG_GLR_OUTPUT_WITH_LOC):
7433 Adjust to the above change (first column is 0).
7434 And adjust the location of the "<error>", now covering the whole
7435 line.
7436
7437 2004-10-22 Akim Demaille <akim@epita.fr>
7438 and Paul Eggert <eggert@cs.ucla.edu>
7439
7440 Remove some arbitrary limits on goto numbers and relations.
7441 * src/lalr.c (goto_map, ngotos, from_state, to_state): Omit
7442 initial values, since they're never used.
7443 (set_goto_map): ngotos is now unsigned, so test for overflow
7444 by seeing whether it wraps around to zero.
7445 * src/lalr.h (goto_number): Now size_t, not short int.
7446 (GOTO_NUMBER_MAXIMUM): Remove.
7447 * src/relation.c (relation_print, traverse, relation_transpose):
7448 Check for END_NODE rather than looking at sign.
7449 * src/relation.h (END_NODE): New macro.
7450 (relation_node): Now size_t, not short int.
7451
7452 2004-10-22 Paul Eggert <eggert@cs.ucla.edu>
7453
7454 * doc/bison.texinfo (Language and Grammar): In example, "int" is a
7455 keyword, not an identifier. Problem reported by Baron Schwartz in
7456 <http://lists.gnu.org/archive/html/bug-bison/2004-10/msg00017.html>.
7457
7458 2004-10-11 Akim Demaille <akim@epita.fr>
7459
7460 * src/symtab.c (symbol_check_alias_consistency): Also check
7461 type names, destructors, and printers.
7462 Reported by Alexandre Duret-Lutz.
7463 Recode the handling of associativity and precedence in terms
7464 of symbol_precedence_set.
7465 Accept no redeclaration at all, not even equal to the previous
7466 value.
7467 (redeclaration): New.
7468 Use it to factor redeclaration complaints.
7469 (symbol_make_alias): Don't set the type of the alias, let
7470 symbol_check_alias_consistency do it as for other features.
7471 * src/symtab.h (symbol): Add new member prec_location, and
7472 type_location.
7473 * src/symtab.c (symbol_precedence_set, symbol_type_set): Set them.
7474 * tests/input.at (Incompatible Aliases): New.
7475
7476 2004-10-09 Paul Eggert <eggert@cs.ucla.edu>
7477
7478 .cvsignore fixes to accommodate gnulib changes,
7479 and the practice of naming build directories "_build".
7480 * .cvsignore: Add "_*". Sort.
7481 * lib/.cvsignore: Add getopt_.h, xalloc-die.c.
7482 * m4/.cvsignore: Add "*_gl.m4".
7483
7484 2004-10-06 Akim Demaille <akim@epita.fr>
7485
7486 * src/parse-gram.y (add_param): Fix the truncation of trailing
7487 spaces.
7488
7489 2004-10-05 Akim Demaille <akim@epita.fr>
7490
7491 In Bison 1.875's yacc.c, YYLLOC_DEFAULT was called regardless
7492 whether the reducion was empty or not. This leaves room to
7493 improve the use of YYLLOC_DEFAULT in such a case.
7494 lalr1.cc is still experimental, so changing this is acceptable.
7495 And finally, there are probably not many users who changed the
7496 handling of locations in GLR, so changing is admissible too.
7497
7498 * data/glr.c, data/lalr1.cc, data/yacc.c (YYLLOC_DEFAULT): On an
7499 empty reduction, set @$ to an empty location ending the previously
7500 stacked symbol.
7501 Adjust uses to make sure the code is triggered on empty
7502 reductions.
7503 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust the
7504 expected output: empty reductions have empty locations.
7505
7506 2004-09-29 Akim Demaille <akim@epita.fr>
7507
7508 * data/lalr1.cc: Move towards a more standard C++ coding style
7509 for templates: Class < T > -> Class<T>.
7510
7511 2004-09-29 Akim Demaille <akim@epita.fr>
7512
7513 * data/lalr1.cc: Reinstall the former ctor, for sake of
7514 compatibility, but warn it will be removed.
7515 Move towards a more standard C++ coding style (i.e., type *var ->
7516 type* var).
7517
7518 2004-09-27 Paul Eggert <eggert@cs.ucla.edu>
7519
7520 * src/parse-gram.y (add_param): Rewrite to avoid strchr,
7521 since it's less likely to work if NULs are involved in the future.
7522
7523 2004-09-27 Akim Demaille <akim@epita.fr>
7524
7525 * data/yacc.c (YY_LOCATION_PRINT): Fix its default declaration.
7526
7527 2004-09-27 Akim Demaille <akim@epita.fr>
7528
7529 * data/lalr1.cc (b4_parse_param_decl_1): New.
7530 (b4_parse_param_decl): Use it to have different names between attribute
7531 and argument names.
7532 (b4_cc_constructor_call): Likewise.
7533
7534 2004-09-24 Akim Demaille <akim@epita.fr>
7535
7536 * src/parse-gram.y (add_param): Strip the leading and trailing
7537 blanks from a formal argument declaration.
7538 (YY_LOCATION_PRINT): New.
7539
7540 2004-09-24 Akim Demaille <akim@epita.fr>
7541
7542 * data/c.m4 (b4_yysymprint_generate): Move the YYINPUT invocation
7543 after the location.
7544
7545 2004-09-24 Akim Demaille <akim@epita.fr>
7546
7547 * doc/bison.texinfo (Table of Symbols): Sort.
7548
7549 2004-09-21 Akim Demaille <akim@epita.fr>
7550
7551 * data/yacc.c, data/glr.c (b4_at_dollar, b4_dollar_dollar): Remove
7552 the useless parentheses.
7553 Suggested by Paul Eggert.
7554
7555 2004-09-20 Akim Demaille <akim@epita.fr>
7556
7557 Let the initial-action act on the look-ahead, and use it for the
7558 "initial push" (corresponding to an hypothetical beginning-of-file).
7559 And let lalr1.cc honor %initial-action.
7560
7561 * doc/bison.texinfo (Initial Action Decl): Clarify, and add an
7562 example.
7563 * data/lalr1.cc (Parser::initlocation_): Remove, bad experiment.
7564 (Parser::Parser): Remove the ctor that used to initialize it.
7565 (Parser::parse): Like in the other skeletons, issue the "starting
7566 parse" message before any action.
7567 Honor %initial-action.
7568 Initialize the stacks with the lookahead.
7569 * data/yacc.c: Let $$ and @$ in %initial-action designate the
7570 look-ahead.
7571 Push them in the stacks.
7572 * tests/actions.at, tests/calc.at: Adjust the C++ ctor invocations.
7573
7574 2004-09-20 Akim Demaille <akim@epita.fr>
7575
7576 * doc/bison.texinfo (Initial Action Decl): New.
7577
7578 2004-09-20 Akim Demaille <akim@epita.fr>
7579
7580 * data/yacc.c (YY_LOCATION_PRINT): Use YYLTYPE_IS_TRIVIAL as a
7581 clearer criterion to define it.
7582 (parse): Initialize the initial location when YYLTYPE_IS_TRIVIAL.
7583 When reducing on an empty RHS, use the latest stacked location as
7584 location.
7585 yylloc is not always available.
7586 * data/glr.c: Likewise.
7587 Also, honor initial-actions.
7588
7589 2004-09-20 Akim Demaille <akim@epita.fr>
7590
7591 * data/yacc.c (YY_LOCATION_PRINT): New.
7592 Define when we know YYLTYPE's structure, i.e., when the default
7593 YYLLOC_DEFAULT is used.
7594 * data/c.m4 (b4_yysymprint_generate): Use it.
7595 * data/lalr1.cc (YYLLOC_DEFAULT): Stop relying on the initial
7596 value of the result.
7597 (error_start_): Replace with...
7598 (error_range_): this location array.
7599 This allows to replace code relying on the implementation of
7600 locations by portable code.
7601 * data/yacc.c (yylerrsp): Replace with...
7602 (yyerror_range): this.
7603 Every time a token is popped, update yyerror_range[0], to have an
7604 accurate location for the error token.
7605 * data/glr.c (YY_LOCATION_PRINT): New.
7606 (yyprocessOneStack): Fix an invocation of YY_SYMBOL_PRINT:
7607 deference a pointer.
7608 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): No longer
7609 report the location in %printers.
7610
7611 * src/scan-skel.l: Instead of abort, report error messages to ease
7612 understanding skeleton scanning failures.
7613
7614 2004-09-16 Akim Demaille <akim@epita.fr>
7615
7616 * data/lalr1.cc (Stack::Iterator, Stack::ConstIterator): Rename as...
7617 (iterator, const_iterator): these, to be more in the C++ spirit.
7618 Also, return reverse iterators so that when displaying the stack
7619 we display its bottom first.
7620 (Parser::stack_print_, Parser::reduce_print_): Match the messages
7621 from yacc.c.
7622 We should probably use vector here though.
7623
7624 2004-09-16 Akim Demaille <akim@epita.fr>
7625
7626 Have more complete shift traces.
7627
7628 * data/yacc.c, data/lalr1.c, data/glr.c: Use YY_SYMBOL_PRINT
7629 to report Shifts instead of ad hoc YYDPRINTF invocations,
7630 including for the error token.
7631 * data/lalr1.cc (symprint_): Output the location.
7632 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): In C++, don't
7633 output the location within the %printer.
7634 Activate GLR tests, at least to make sure they compile properly.
7635 They still don't pass though.
7636 * tests/calc.at: Adjust expect verbose output, since now "Entering
7637 state..." is on a different line than the "Shifting" message.
7638
7639 2004-09-08 Akim Demaille <akim@epita.fr>
7640
7641 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Move the
7642 Bison directive from the Bison file to the invocation of this
7643 macro, so that these directives are passed to
7644 AT_BISON_OPTION_PUSHDEFS to get correct help macros.
7645 Use these helping macros (e.g., AT_LOC, AT_VAL and so forth).
7646 Move the AT_SETUP/AT_CLEANUP outside, to report as test title
7647 the extra Bison directives instead of the whole series.
7648 Change the grammar so that there are recoverable errors, and
7649 unrecoverable errors. Now we can have the parser give up before
7650 consuming the whole input. As a result we now can observe that
7651 the lookahead is freed when needed.
7652 Change the parser source to parse argv[1] instead of a hard coded
7653 string.
7654 Simplify yylex, and give a value and location to EOF.
7655 Simplify some invocations of AT_CHECK_PRINTER_AND_DESTRUCTOR that
7656 passed directives already coded in the file.
7657 Add some tests to check the location of "error".
7658 For some tests, the C++ parser is correct, and not yacc.c.
7659 For other tests, they provide different, but unsatisfying, values,
7660 so keep the C++ value so that at least one parser is "correct"
7661 according to the test suite.
7662 (Actions after errors): Remove, this is subsumed by the
7663 AT_CHECK_PRINTER_AND_DESTRUCTOR series.
7664
7665 2004-09-06 Akim Demaille <akim@epita.fr>
7666
7667 * data/lalr1.cc: Adjust the indentation of the labels.
7668 (Parser::pop): New.
7669 Use it.
7670
7671 2004-09-06 Akim Demaille <akim@epita.fr>
7672
7673 * data/yacc.cc, data/glr.cc (yydestruct): Accept an additional
7674 argument, an informative message.
7675 Call YY_SYMBOL_PRINT.
7676 Adjust all callers: integrate the associated YY_SYMBOL_PRINT.
7677 * data/lalr1.cc (destruct_): Likewise.
7678 In addition, no longer depend on b4_yysymprint_generate and
7679 b4_yydestruct_generate to generate these functions, do it "by
7680 hand".
7681
7682 2004-09-03 Akim Demaille <akim@epita.fr>
7683
7684 * data/glr.c, data/lalr1.cc, data/yacc.c: When YYABORT was
7685 invoked, yydestruct the lookahead.
7686 * tests/calc.at (Calculator $1): Update the expected lengths of
7687 traces: there is an added line for the discarded lookahead.
7688 * doc/bison.texinfo (Destructor Decl): Some rewording.
7689 Define "discarded" symbols.
7690
7691 2004-09-02 Akim Demaille <akim@epita.fr>
7692
7693 * data/lalr1.cc (translate_, destruct_): No reason to be static.
7694
7695 2004-09-02 Akim Demaille <akim@epita.fr>
7696
7697 * data/glr.c, yacc.c (YYDSYMPRINT): Remove, not used.
7698 (YYDSYMPRINTF): Rename as...
7699 (YY_SYMBOL_PRINT): this.
7700 * data/lalr1.cc (YY_SYMBOL_PRINT): New, modeled after the previous
7701 two.
7702 Use it instead of direct symprint_ calls.
7703 (yybackup): Tweak the "Now at end of input" case to match yacc.c's
7704 one.
7705
7706 2004-09-02 Akim Demaille <akim@epita.fr>
7707
7708 * data/lalr1.cc (b4_yysymprint_generate): New.
7709 (symprint_): New member function, defined when YYDEBUG.
7710 Use it consistently instead of token/nterm debugging output by
7711 hand.
7712 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust
7713 %printer calls to use cdebug_ when using lalr1.cc.
7714
7715 2004-08-30 Florian Krohm <florian@edamail.fishkill.ibm.com>
7716
7717 * data/glr.c: Guard the declarations of yypstack and yypdumpstack
7718 with #ifdef YYDEBUG.
7719
7720 2004-08-26 Akim Demaille <akim@epita.fr>
7721
7722 * doc/bison.texinfo (Implementing Loops): Rename as...
7723 (Implementing Gotos/Loops): this.
7724
7725 2004-08-13 Paul Eggert <eggert@cs.ucla.edu>
7726
7727 Adjust to latest gnulib.
7728 * bootstrap (gnulib_modules): Add xalloc-die.
7729 Set LC_ALL=C so that file names sort consistently.
7730 Prefer the gnulib copies of gettext.m4, glibc21.m4,
7731 inttypes_h.m4, lib-ld.m4, lib-prefix.m4, po.m4, stdint_h.m4,
7732 uintmax_t.m4, ulonglong.m4.
7733 (intl_files_to_remove): Add gettext.m4, lib-ld.m4, lib-prefix.m4,
7734 po.m4 since we are now using _gl.m4 instead.
7735
7736 2004-08-10 Florian Krohm <florian@edamail.fishkill.ibm.com>
7737
7738 * src/scan-action.l: Remove. Scanning of semantic actions is
7739 handled in scan-gram.l.
7740
7741 2004-08-07 Florian Krohm <florian@edamail.fishkill.ibm.com>
7742
7743 * src/scan-gram.l (handle_syncline): Use uniqstr_new not xstrdup.
7744
7745 * src/location.h (struct): The file member is a uniqstr.
7746 (equal_boundaries): Use UNIQSTR_EQ for comparison.
7747
7748 2004-07-22 Paul Eggert <eggert@cs.ucla.edu>
7749
7750 Fix bug with non-%union parsers that have printers or destructors,
7751 which led to a Bison core dump. Reported by Peter Fales in
7752 <http://lists.gnu.org/archive/html/bug-bison/2004-07/msg00014.html>.
7753
7754 * data/c.m4 (b4_symbol_actions): Don't assume %union was used.
7755 * data/lalr1.cc (yystype) [defined YYSTYPE]: Define to YYSTYPE,
7756 not to our own type.
7757 * src/output.c (symbol_destructors_output, symbol_printers_output):
7758 Don't assume %union.
7759 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR,
7760 AT_CHECK_PRINTER_AND_DESTRUCTOR): New argument
7761 UNION-FLAG. All callers changed.
7762 (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Don't assume %union.
7763 Use type char, not unsigned int, when declaring an array of char;
7764 this lets us remove a cast.
7765 (Printers and Destructors): Add non-%union test cases.
7766
7767 2004-06-21 Paul Eggert <eggert@cs.ucla.edu>
7768
7769 * doc/bison.texinfo: Minor editorial changes, mostly to the new
7770 GLR writeups. E.g., avoid frenchspacing and the future tense,
7771 change "lookahead" to "look-ahead", and change "wrt" to "with
7772 respect to".
7773
7774 2004-06-21 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
7775
7776 * doc/bison.texinfo (Merging GLR Parses, Compiler Requirements):
7777 New sections, split off from the GLR Parsers section. Put the new
7778 Simple GLR Parser near the start of the GLR section, for clarity.
7779 Rewrite connective text.
7780
7781 2004-06-21 Frank Heckenbach <frank@g-n-u.de>
7782
7783 * doc/bison.texinfo (Simple GLR Parsers): New section.
7784
7785 2004-06-21 Paul Eggert <eggert@cs.ucla.edu>
7786
7787 * NEWS, TODO, doc/bison.texinfo:
7788 Use "look-ahead" instead of "lookahead", to be consistent.
7789 * REFERENCES: Fix incorrect reference to DeRemer and Pennello,
7790 while we're fixing "look-ahead".
7791 * src/conflicts.c (shift_set): Renamed from shiftset.
7792 (look_ahead_set): Renamed from lookaheadset.
7793 * src/print.c: Likewise.
7794 * src/getargs.c (report_args): Add "look-ahead" as the new canonical
7795 name for "lookahead".
7796 (report_types, usage): Likewise.
7797 * src/getargs.h (report_look_ahead_tokens): Renamed from
7798 report_lookaheads.
7799 * src/lalr.c (compute_look_ahead_tokens): Renamed from
7800 compute_lookaheads.
7801 (state_look_ahead_tokens_count): Renamed from state_lookaheads_count.
7802 (look_ahead_tokens_print): Renamed from lookaheads_print.
7803 * src/state.c (state_rule_look_ahead_tokens_print): Renamed from
7804 state_rule_lookaheads_print.
7805 * src/state.h: Likewise.
7806 (reductions.look_ahead_tokens): Renamed from lookaheads.
7807 * tests/torture.at (AT_DATA_LOOK_AHEAD_TOKENS_GRAMMAR): Renamed from
7808 AT_DATA_LOOKAHEADS_GRAMMAR.
7809
7810 2004-06-03 Paul Eggert <eggert@cs.ucla.edu>
7811
7812 * README: Update location of patched M4 distribution.
7813
7814 2004-05-30 Albert Chin-A-Young <china@thewrittenword.com>
7815
7816 Don't assume the C++ compiler takes the same arguments as the C compiler
7817 (trivial change).
7818 * configure.ac (O0CXXFLAGS): New var.
7819 * tests/atlocal.in (CXXFLAGS): Use it.
7820
7821 2004-05-29 Paul Eggert <eggert@cs.ucla.edu>
7822
7823 Fix some "make check" problems with C++ reported by
7824 Albert Chin-A-Young for Tru64 C++ in this thread:
7825 http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00049.html
7826
7827 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check for std::cerr.
7828 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
7829 Output to a .cc file for C++, not to a .c file.
7830 * tests/calc.at (AT_CHECK_CALC): Likewise.
7831 * tests/regression.at (AT_CHECK_DANCER): Likewise.
7832 * tests/local.at (AT_COMPILE_CXX): Default to OUTPUT.cc, not OUTPUT.c.
7833
7834 2004-05-28 Albert Chin-A-Young <china@thewrittenword.com>
7835
7836 * tests/calc.at, tests/actions.at: Workaround for SGI
7837 C++ compiler. (trivial change)
7838
7839 2004-05-27 Paul Eggert <eggert@cs.ucla.edu>
7840
7841 Spent a few hours checking out which prerequisite versions the
7842 current sources actually require. I went all the way back to
7843 Gettext 0.10.40, Automake 1.4, and Autoconf 2.57 and investigated
7844 a seemingly endless set of combinations of versions more recent
7845 than that. The bottom line is that the current sources require
7846 fairly recent versions of the build tools, and it'll be some work
7847 to change this.
7848 * configure.ac (AC_PREREQ): Increase from 2.58 to 2.59.
7849 (AM_INIT_AUTOMAKE): Increase from 1.7 to 1.8.
7850 (AM_GNU_GETTEXT_VERSION): Increase from 0.11.5 to 0.12.
7851 Add comments explaining why those particular versions are
7852 currently needed.
7853
7854 * src/parse-gram.y (lloc_default): Rewrite to avoid compiler bug
7855 in SGI MIPSpro 7.4.1m. Problem reported by Albert Chin-A-Young in
7856 <http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00037.html>.
7857
7858 * configure.ac (AC_PREREQ): Bump to 2.58, since 2.57 doesn't work
7859 (it fails with a Autoconf-without-aclocal-m4 diagnostic).
7860
7861 2004-05-26 Paul Eggert <eggert@cs.ucla.edu>
7862
7863 * configure.ac (AM_GNU_GETTEXT_VERSION): Lower it from 0.14.1 to
7864 0.11.5. Suggested by Bruno Haible.
7865 * bootstrap: Remove gettext version checking.
7866
7867 * doc/bison.texinfo (Decl Summary): Also mention that %union
7868 can depend on prerequisite types. Problem reported by Tim
7869 Van Holder.
7870
7871 2004-05-25 Paul Eggert <eggert@cs.ucla.edu>
7872
7873 * README: Mention GNU m4 1.4 bugs and Akim's patched version.
7874 * README-alpha: Don't tell people not to package this.
7875
7876 * bootstrap: Don't assume $(...) works; use `...` instead.
7877 Problem reported by Paul Hilfinger. Also, diagnose non-GNU
7878 gettext better.
7879
7880 * doc/bison.texinfo (Decl Summary, Bison Options): Clarify what's
7881 put into the -d output file, and mention what to do if YYSTYPE is
7882 defined as a macro.
7883
7884 2004-05-24 Paul Eggert <eggert@cs.ucla.edu>
7885
7886 Undo change made earlier today: it caused autopoint to not bring
7887 in ABOUT-NLS. Ouch. Instead, substitute our own diagnostic for
7888 autopoint's.
7889
7890 * bootstrap: Check that gettext version matches what's in
7891 configure.ac. Warn users to ignore robots.txt ERROR 404.
7892 * bootstrap: Undo today's earlier change (logged below).
7893 * configure.ac (AM_GNU_GETTEXT_VERSION): Likewise.
7894
7895 The gettext version checking is causing more trouble than it's
7896 curing; remove it. Problem reported by Paul Hilfinger.
7897
7898 * bootstrap: Issue a warning that one can expect a message
7899 'AM_GNU_GETTEXT is used, but not AM_GNU_GETTEXT_VERSION'.
7900 * configure.ac (AM_GNU_GETTEXT_VERSION): Remove.
7901
7902 2004-05-23 Paul Eggert <eggert@cs.ucla.edu>
7903
7904 Ensure that the C++ compiler used for testing actually works on a
7905 simple test program; if not, skip the C++-related tests. Problem
7906 reported by Vin Shelton in:
7907 http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00026.html
7908
7909 * m4/cxx.m4: New file.
7910 * configure.ac (BISON_TEST_FOR_WORKING_CXX_COMPILER): Add.
7911 * tests/atlocal.in (BISON_CXX_WORKS): Add.
7912 * tests/local.at (AT_COMPILE_CXX): Use it.
7913
7914 2004-05-21 Paul Eggert <eggert@cs.ucla.edu>
7915
7916 * data/glr.c (yylloc): Output this macro even if locations are not
7917 being generated, as the GLR parser needs it even in that case.
7918 Problem reported by Troy A. Johnson
7919 <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=195946>.
7920
7921 * configure.ac (AC_INIT): Update to 1.875e.
7922
7923 2004-05-21 Paul Eggert <eggert@cs.ucla.edu>
7924
7925 * NEWS: Version 1.875d.
7926 * configure.ac (AC_INIT): Likewise.
7927 * src/parse-gram.c, src/parse-gram.h: Regenerate with 1.875d.
7928
7929 * configure.ac (--enable-gcc-warnings): Do not enable -Wshadow,
7930 -Wmissing-prototypes, or -Wstrict-prototypes for C++. The current
7931 lalr1.cc runs afoul of the first, and the last two are no longer
7932 supported by GCC 3.4.0.
7933 * README: Mention GNU m4 1.4 or later; mention m4 patches.
7934 * HACKING: Use ./bootstrap, not "make update" to import foreign files.
7935
7936 2004-05-06 Paul Eggert <eggert@cs.ucla.edu>
7937
7938 * src/muscle_tab.c (hash_muscle): Accept and return size_t, not
7939 unsigned int, for compatibility with latest gnulib hash module.
7940 * src/state.c (state_hash, state_hasher): Likewise.
7941 * src/symtab.c (hash_symbol, hash_symbol_hasher): Likewise.
7942 * src/uniqstr.c (hash_uniqstr): Likewise.
7943
7944 2004-05-03 Paul Eggert <eggert@cs.ucla.edu>
7945
7946 * NEWS: Unescaped newlines are no longer allowed in char & strings.
7947
7948 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER,
7949 SC_CHARACTER,SC_STRING>): Reject unescaped newlines in
7950 character and string literals.
7951 (unexpected_end): New function.
7952 (unexpected_eof): Use it.
7953 (unexpected_newline): New function.
7954 (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>): Coalesce duplicate
7955 actions.
7956
7957 * NEWS: Document %expect-rr.
7958
7959 * bootstrap (--gnulib-srcdir=*, --cvs-user=*):
7960 Fix typo by replacing $1 with $option.
7961 Remove more 'intl'-related files.
7962 Don't DEFUN AM_INTL_SUBDIR twice.
7963
7964 * lib/.cvsignore: Add strndup.h. Remove memchr.c, memcmp.c,
7965 memrchr.c, strcasecmp.c, strchr.c, strrchr.c, strspn.c, strtol.c,
7966 strtoul.c.
7967 * m4/.cvsignore: Add exitfail.m4, extensions.m4, gnulib.m4,
7968 hard-locale.m4, mbstate_t.m4, strerror_r.m4, strndup.m4,
7969 xstrndup.m4. Remove glibc21.m4, intdiv0.m4, inttypes-pri.m4,
7970 inttypes.m4, inttypes_h.m4, isc-posix.m4, lcmessage.m4,
7971 stdint_h.m4, uintmax_t.m4, ulonglong.m4.
7972 * src/.cvsignore: Add *.output.
7973
7974 * src/parse-gram.y: Put copyright notice inside %{ %} so it
7975 gets copied to the output file.
7976
7977 2004-04-28 Paul Eggert <eggert@twinsun.com>
7978
7979 Get files from the gnulib and po repositories, instead of relying
7980 on them being in our CVS. Upgrade to latest versions of gnulib
7981 and Automake.
7982
7983 * Makefile.am (SUBDIRS): Remove m4; Automake now does m4.
7984 * bootstrap: Bootstrap from gnulib and po repositories.
7985 Much of this code was stolen from GNU diff and GNU tar's bootstrap.
7986 * README-cvs: Document these changes. Remove version numbers from
7987 mentions of build tools, since they change so often. Mention Flex.
7988
7989 * configure.ac (AC_CONFIG_MACRO_DIR): Add, with m4 as arg.
7990 (gl_USE_SYSTEM_EXTENSIONS): Add.
7991 (AC_GNU_SOURCE, AC_AIX, AC_MINIX):
7992 Remove; no longer needed, as gl_USE_SYSTEM_EXTENSIONS
7993 does this for us.
7994 (AC_ISC_POSIX): Remove; we no longer support this
7995 ancient OS, as it gets in the way of latest Autoconf & gnulib.
7996 (AC_HEADER_STDC): Remove: we now assume C89 or better.
7997 (AC_CHECK_HEADERS_ONCE): Use instead of AC_CHECK_HEADERS.
7998 Do not check for C89 headers, except for locale.h which is used
7999 by the Yacc library and must port to K&R hosts.
8000 (AC_CHECK_FUNCS_ONCE): Use instead of AC_CHECK_FUNCS.
8001 Do not check for C89 functions, except for setlocale which is
8002 used by the Yacc library.
8003 (AC_CHECK_DECLS, AC_REPLACE_FUNCS): Remove; no longer needed.
8004 (gl_DIRNAME, gl_ERROR, gl_FUNC_ALLOCA, gl_FUNC_MEMCHR,
8005 gl_FUNC_MEMRCHR, gl_FUNC_STPCPY, gl_FUNC_STRNLEN, gl_FUNC_STRTOL,
8006 gl_GETOPT, gl_HASH, gl_MBSWIDTH, gl_OBSTACK, gl_QUOTE,
8007 gl_QUOTEARG, gl_XALLOC, jm_FUNC_GLIBC_UNLOCKED_IO, jm_FUNC_MALLOC,
8008 AM_GNU_GETTEXT): Remove; now done by:
8009 (GNULIB_AUTOCONF_SNIPPET): Add. "bootstrap" builds this for us.
8010 (AC_CONFIG_FILES): Remove m4/Makefile, as Automake now does this
8011 for us.
8012
8013 * lib/Makefile.am: Include gnulib.mk, built for us by "bootstrap".
8014 (BUILT_SOURCES, EXTRA_DIST, MOSTLYCLEANFILES):
8015 Define to empty, as gnulib.mk will do the rest for us.
8016 ($(libbison_a_OBJECTS), stdbool.h): Remove, as gnulib.mk does this
8017 for us.
8018 (libbison_a_SOURCES): Define to $(lib_SOURCES) now.
8019 (lib_SOURCES): New symbol, containing only the non-gnulib libs.
8020
8021 * src/files.c: Include gnulib's xstrndup.h.
8022
8023 * src/system.h (MALLOC): Use xnmalloc, for better overflow checking.
8024 (REALLOC): Use xnrealloc, for likewise.
8025 (xstrndup, stpcpy): Remove decls, as gnulib does this for us now.
8026 (strnlen, memrchr): Remove decls; functions no longer used.
8027 Include <stpcpy.h>.
8028
8029 * config/depcomp, config/install-sh, lib/alloca.c, lib/argmatch.c,
8030 lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
8031 lib/error.c, lib/error.h, lib/getopt.c, lib/getopt.h,
8032 lib/getopt1.c, lib/gettext.h, lib/hash.c, lib/hash.h,
8033 lib/malloc.c, lib/mbswidth.c, lib/mbswidth.h, lib/memchr.c,
8034 lib/memcmp.c, lib/memrchr.c, lib/obstack.c, lib/obstack.h,
8035 lib/quote.c, lib/quote.h, lib/quotearg.c, lib/quotearg.h,
8036 lib/realloc.c, lib/stdbool_.h, lib/stpcpy.c, lib/strcasecmp.c,
8037 lib/strchr.c, lib/strncasecmp.c, lib/strnlen.c, lib/strrchr.c,
8038 lib/strspn.c, lib/strtol.c, lib/strtoul.c, lib/unlocked-io.h,
8039 lib/xalloc.h, lib/xmalloc.c, lib/xstrdup.c, lib/xstrndup.c,
8040 m4/Makefile.am, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
8041 m4/error.m4, m4/getopt.m4, m4/hash.m4, m4/malloc.m4,
8042 m4/mbrtowc.m4, m4/mbswidth.m4, m4/memchr.m4, m4/memcmp.m4,
8043 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/prereq.m4,
8044 m4/quote.m4, m4/quotearg.m4, m4/realloc.m4, m4/stdbool.m4,
8045 m4/stpcpy.m4, m4/strnlen.m4, m4/strtol.m4, m4/strtoul.m4,
8046 m4/unlocked-io.m4, m4/xalloc.m4, po/LINGUAS, po/Makefile.in.in,
8047 po/Makevars, po/da.po, po/de.po, po/es.po, po/et.po, po/fr.po,
8048 po/hr.po, po/id.po, po/it.po, po/ja.po, po/ms.po, po/nl.po,
8049 po/pt_BR.po, po/ro.po, po/ru.po, po/sv.po, po/tr.po:
8050 Remove, as these files are now generated automatically
8051 by bootstrap or automake.
8052
8053 * po/ChangeLog: Remove: all but one entry was a duplicate
8054 of this file, and I moved that 2000-11-02 entry here.
8055
8056 * config/.cvsignore: Add Makefile, depcomp, install-sh.
8057 * lib/.cvsignore: Add alloca.c, alloca.h, alloca_.h, argmatch.c,
8058 argmatch.h, basename.c, dirname.c, dirname.h, error.c, error.h,
8059 exit.h, exitfail.c, exitfail.h, getopt.c, getopt.h, getopt1.c,
8060 getopt_int.h, gettext.h, gnulib.mk, hard-locale.c, hard-locale.h,
8061 hash.c, hash.h, malloc.c, mbswidth.c, mbswidth.h, memchr.c,
8062 memcmp.c, memrchr.c, obstack.c, obstack.h, quote.c, quote.h,
8063 quotearg.c, quotearg.h, realloc.c, stdbool_.h, stpcpy.c, stpcpy.h,
8064 strcasecmp.c, strchr.c, stripslash.c, strncasecmp.c, strndup.c,
8065 strnlen.c, strrchr.c, strspn.c, strtol.c, strtoul.c,
8066 unlocked-io.h, xalloc.h, xmalloc.c, xstrdup.c, xstrndup.c,
8067 xstrndup.h.
8068 * m4/.cvsignore: Remove Makefile, Makefile.in. Add alloca.m4,
8069 dirname.m4, dos.m4, error.m4, getopt.m4, hash.m4, mbrtowc.m4,
8070 mbswidth.m4, obstack.m4, onceonly.m4, quote.m4, quotearg.m4,
8071 stdbool.m4, stpcpy.m4, strnlen.m4, unlocked-io.m4, xalloc.m4.
8072 * po/.cvsignore: Add *.po, LINGUAS, Makefile.in.in, Makevars.
8073 * src/.cvsignore: Remove *_.c.
8074
8075
8076 * Makefile.maint (GZIP_ENV): Don't use --rsyncable if gzip doesn't
8077 support it. (The latest stable gzip doesn't.)
8078
8079 2004-04-27 Paul Eggert <eggert@twinsun.com>
8080
8081 * data/lalr1.cc (Parser::stos_) [! YYDEBUG]: Define even in this
8082 case, as stos_ is now used by destructors due to the 2004-02-09
8083 change.
8084
8085 Remove more K&R C support.
8086 * lib/libiberty.y (PARAMS): Remove. All uses removed.
8087 * lib/subpipe.c (errno): Remove decl.
8088 Include <stdlib.h> unconditionally.
8089 (EXIT_FAILURE): Remove macro.
8090 * src/complain.c (vfprintf, strerror): Remove.
8091 * src/system.h: Include limits.h, stdlib.h, string.h, locale.h
8092 unconditionally.
8093 (EXIT_FAILURE, EXIT_SUCCESS, setlocale): Remove defns.
8094 Use latest Autoconf recommendations for including inttypes.h, stdint.h.
8095 (strchr, strspn, memchr): Remove decls.
8096 * tests/calc.at (_AT_DATA_CALC_Y): Include stdlib.h, string.h
8097 unconditionally. Do not declare perror.
8098 * tests/conflicts.at (%nonassoc and eof): Include stdlib.h
8099 unconditionally.
8100
8101 * src/complain.c (_): Remove useless defn, as system.h defines this.
8102
8103 * lib/bitset.h (__INT_TO_PTR): Remove; workaround no longer needed
8104 with latest obstack.h.
8105 * lib/ebitset.c (ebitset_elt_alloc): Don't bother to cast args
8106 to procedure types, as obstack.h now does that for us.
8107 * lib/lbitset.c (lbitset_elt_alloc): Likewise.
8108
8109 * lib/subpipe.h [HAVE_SYS_TYPES_H]: Include <sys/types.h>,
8110 so that this include file can stand alone.
8111 * lib/subpipe.c: Do not include <sys/types.h>, as subpipe.h
8112 does this now. Include subpipe.h first after config.h, to
8113 test whether it can stand alone.
8114
8115 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Don't
8116 declare yyerror when using lalr.cc, as GCC 3.4.0 warns about the
8117 unused declaration.
8118
8119 * tests/synclines.at (%union synch line): Put a dummy member in
8120 the union, because empty unions aren't allowed in C. Caught
8121 by GCC 3.4.0.
8122
8123 2004-04-13 Jim Meyering <jim@meyering.net>
8124
8125 * src/conflicts.c (conflicts_print): Correct format string typo:
8126 use `%%' to produce literal `%'. (trivial change)
8127
8128 2004-03-30 Paul Eggert <eggert@twinsun.com>
8129
8130 * src/getargs.c (version): Update copyright year to 2004.
8131
8132 * data/c.m4 (b4_int_type): Use 'short int' rather than
8133 'short', and similarly for 'long', 'unsigned', etc.
8134 * data/glr.c (YYTRANSLATE, yyconfl, yySymbol, yyItemNum,
8135 yygetLRActions, yyprocessOneStack, yyrecoverSyntaxError,
8136 yy_yypstack, yydumpstack): Likewise.
8137 * data/lalr1.cc (user_token_number_max_, user_token_number_max_,
8138 translate_, seq_, [], pop, Slice, range_, operator+, operator+=):
8139 Likewise.
8140 * data/yacc.c (b4_int_type, yyss, YYSTACK_BYTES, yysigned_char,
8141 yy_stack_print, yyparse): Likewise.
8142 * doc/bison.texinfo (Prologue, Multiple Types): Likewise.
8143 * lib/bbitset.h (bitset_word, BITSET_WORD_BITS): Likewise.
8144 * lib/bitset.c (bitset_print): Likewise.
8145 * lib/bitset_stats.c (bitste_log_histogram_print): Likewise.
8146 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
8147 * lib/bitsetv.c (bitsetv_dump): Likewise.
8148 * lib/ebitset.c (EBITSET_ELT_BITS, ebitset_elt_alloc): Likewise.
8149 * lib/lbitset.c (LBITSET_ELT_BITS, lbitset_elt_alloc, debug_lbitset):
8150 Likewise.
8151 * src/LR0.c (allocate_itemsets): Likewise.
8152 * src/gram.h (rule_number, rule): Likewise.
8153 * src/lalr.h (goto_number): Likewise.
8154 * src/nullable.c (nullable_compute): Likewise.
8155 * src/output.c (prepare_rules): Likewise.
8156 * src/relation.c (relation_print, relation_digraph): Likewise.
8157 * src/relation.h (relation_node): Likewise.
8158 * src/state.h (state_number, transitions, errs, reductions,
8159 struct state): Likewise.
8160 * src/symtab.h (symbol_number, struct symbol): Likewise.
8161 * src/tables.c (vector_number, tally, action_number,
8162 default_goto, goto_actions): Likewise.
8163 * tests/existing.at (GNU Cim Grammar): Likewise.
8164 * tests/regression.at (Web2c Actions): Likewise.
8165
8166 * src/output.c (muscle_insert_short_int_table): Renamed from
8167 muscle_insert_short_table. All uses changed.
8168
8169 2004-03-25 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
8170
8171 * src/parse-gram.y: Define PERCENT_EXPECT_RR.
8172 (declaration): Replace expected_conflicts with expected_sr_conflicts.
8173 Add %expect-rr rule.
8174
8175 * src/scan-gram.l: Recognize %expect-rr.
8176
8177 * src/conflicts.h (expected_sr_conflicts): Rename from
8178 expected_conflicts.
8179 (expected_rr_conflicts): Declare.
8180
8181 * src/conflicts.c (expected_sr_conflicts): Rename from
8182 expected_conflicts.
8183 (expected_rr_conflicts): Define.
8184 (conflicts_print): Check r/r conflicts against expected_rr_conflicts
8185 for GLR parsers.
8186 Use expected_sr_conflicts in place of expected_conflicts.
8187 Warn if expected_rr_conflicts used in non-GLR parser.
8188
8189 * doc/bison.texinfo: Add documentation for %expect-rr.
8190
8191 2004-03-08 Paul Eggert <eggert@gnu.org>
8192
8193 Add support for hex token numbers. Suggested by Odd Arild Olsen in
8194 <http://lists.gnu.org/archive/html/bison-patches/2004-03/msg00000.html>.
8195
8196 * NEWS: Document hexadecimal tokens, no NUL bytes, %destructor
8197 in lalr1.cc.
8198 * doc/bison.texinfo (Token Decl): Add hexadecimal token numbers.
8199 * src/scan-gram.l (scan_integer): New function.
8200 ({int}): Use it.
8201 (0[xX][0-9abcdefABCDEF]+): New pattern, to support hex numbers.
8202 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>, \\x[0-9abcdefABCDEF]+,
8203 handle_action_dollar, handle_action_at, convert_ucn_to_byte):
8204 Say "long int", not "long", for uniformity with GNU style.
8205
8206 2004-02-25 Paul Eggert <eggert@twinsun.com>
8207
8208 * tests/local.at (AT_COMPILE, AT_COMPILE_CXX): Ignore stdout from
8209 compilers. This fixes a problem with Intel's C++ compiler being
8210 chatty, reported by Guido Trentalancia in
8211 <http://lists.gnu.org/archive/html/bug-bison/2004-02/msg00030.html>.
8212
8213 2004-02-09 Alexandre Duret-Lutz <adl@gnu.org>
8214
8215 Support %destructor and merge error locations in lalr1.cc.
8216
8217 * data/lalr1.cc (b4_cxx_destruct_def): New macro.
8218 (Parser::stos_): Define unconditionally.
8219 (Parser::destruct_): New method. Generate its body with
8220 b4_yydestruct_generate.
8221 (Parser::error_start_): New attribute.
8222 (Parser::parse) <yyerrlab, yyerrlab1>: Call destruct_ on erroneous
8223 token which are discarded.
8224 (Parser::parse) <yyerrlab, yyerrorlab, yyerrlab1>: Update
8225 error_start_ when erroneous token are discarded.
8226 (Parser::parse) <yyerrlab1>: Compute the location of the error
8227 token so that it covers all the discarded tokens.
8228 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust so
8229 it can be called with `%skeleton "lalr1.cc"', and do that.
8230
8231 2004-02-02 Paul Eggert <eggert@twinsun.com>
8232
8233 * src/Makefile.am (AM_CPPFLAGS): New macro. It mentions
8234 $(top_srcdir)/lib and ../lib. This fixes a bug reported
8235 by Paul Hilfinger; the old INCLUDES value didn't mention ../lib.
8236 There's no need to mention top_builddir since Automake does that
8237 for us.
8238 (INCLUDES): Remove, as Automake says it's obsolescent.
8239 Contents migrated into AM_CPPFLAGS as described above.
8240 * lib/Makefile.am (INCLUDES): Remove; obsolescent.
8241
8242 2004-01-14 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
8243
8244 * data/glr.c (yytokenName): Bullet-proof against YYEMPTY token.
8245 (yyreportSyntaxError): Handle case where lookahead token is
8246 YYEMPTY.
8247
8248 2004-01-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
8249
8250 * data/glr.c: Put casts on uses of YYREALLOC and YYMALLOC so that
8251 resulting parsers are compilable with C++.
8252
8253 2003-12-23 Paul Eggert <eggert@twinsun.com>
8254
8255 * config/depcomp, config/install-sh: Sync with Automake 1.8.
8256 * src/output.c (output_skeleton): Rename local var.
8257 * tests/input.at (Torturing the Scanner): Don't use \x0 or \0 in
8258 Bison tokens, as this runs afoul of the 2003-10-07 change that
8259 disallowed NUL bytes in character constants or string literals.
8260
8261 * tests/local.at: Require Autoconf 2.59's Autotest.
8262 * tests/testsuite.at: Don't include local.at, since we now assume
8263 Autoconf 2.59 or later. Autoconf 2.59 had some problems with
8264 including it.
8265 * tests/Makefile.am ($(TESTSUITE)): Remove warning about ignoring
8266 multiple inclusion warnings.
8267
8268 2003-12-02 Akim Demaille <akim@epita.fr>
8269
8270 * doc/bison.texinfo (How Can I Reset the Parser): More about start
8271 conditions.
8272 From Bruno Haible.
8273
8274 2003-11-18 Alexandre Duret-Lutz <adl@gnu.org>
8275
8276 * doc/bison.texinfo (Bison Options): Escape `@' in `$@'.
8277
8278 2003-10-07 Paul Eggert <eggert@twinsun.com>
8279
8280 * tests/Makefile.am (clean-local): Don't run 'testsuite --clean'
8281 if testsuite doesn't exist.
8282
8283 * doc/bison.texinfo (Symbols): NUL bytes are not allowed in string
8284 literals, unfortunately.
8285 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>):
8286 Complain about NUL bytes in character constants or string literals.
8287
8288 2003-10-05 Paul Eggert <eggert@twinsun.com>
8289
8290 * NEWS: Don't document %no-default-prec, as it's still
8291 too experimental.
8292 * doc/bison.texinfo: Document %no-default-prec only if
8293 the defaultprec flag is set. Normally it's not.
8294
8295 2003-10-04 Paul Eggert <eggert@twinsun.com>
8296
8297 * data/glr.c (b4_rhs_value, b4_rhs_location): Yield a
8298 non-modifiable lvalue, instead of a modifiable one.
8299 * doc/bison.texinfo (Actions): Document that $$ can
8300 be assigned to. Do not claim that $$ and $N are
8301 array element references: user code should not rely on this.
8302
8303 2003-10-01 Paul Eggert <eggert@twinsun.com>
8304
8305 * src/parse-gram.h (PERCENT_NO_DEFAULT_PREC): New token.
8306 (grammar_declaration): Use it.
8307 * src/scan-gram.l: New token %no-default-prec.
8308 * tests/conflicts.at: Revamp tests to use %no-default-prec.
8309 * NEWS, doc/bison.texinfo: Document the above.
8310
8311 2003-10-01 Akim Demaille <akim@epita.fr>
8312
8313 VCG no longer supports long_straight_phase.
8314
8315 * src/vcg.c, src/vcg.h: Remove the handling of long_straight_phase.
8316 * src/print_graph.c (print_graph): Adjust.
8317
8318 2003-09-30 Frank Heckenbach <frank@g-n-u.de>
8319 and Paul Eggert <eggert@twinsun.com>
8320
8321 * doc/bison.texinfo (Decl Summary, Contextual Precedence,
8322 Table of Symbols): Document %default-prec.
8323 * src/parse-gram.y (PERCENT_DEFAULT_PREC): New token.
8324 (grammar_declaration): Set default_prec on %default-prec.
8325 * src/scan-gram.l (%default-prec): New token.
8326 * src/reader.h (default_prec): New flag.
8327 * src/reader.c: Likewise.
8328 (packgram): Handle it.
8329 * tests/conflicts.at (%default-prec without %prec,
8330 %default-prec with %prec, %default-prec 1): New tests.
8331
8332 2003-09-30 Paul Eggert <eggert@twinsun.com>
8333
8334 * tests/testsuite.at: Include local.at, not input.at, fixing
8335 a typo in the 2003-08-25 patch.
8336
8337 2003-08-27 Akim Demaille <akim@epita.fr>
8338
8339 * data/lalr1.cc (yyparse) [__GNUC__]: "Use" yyerrorlab to pacify
8340 GCC warnings.
8341
8342 2003-08-26 Akim Demaille <akim@epita.fr>
8343
8344 * config/announce-gen (print_changelog_deltas): Neutralize "<#" as
8345 "<\#" to avoid magic from Gnus when posting parts of this script.
8346
8347 2003-08-26 Akim Demaille <akim@epita.fr>
8348
8349 * data/lalr1.cc (Parser::report_syntax_error_): New, extracted from
8350 (Parser::parse): here.
8351 Adjust: nerrs and errstatus is now replaced by...
8352 (Parser::nerrs_, Parser::errstatus_): New.
8353
8354 2003-08-25 Akim Demaille <akim@epita.fr>
8355
8356 * config/announce-gen, Makefile.cfg: New.
8357 * Makefile.am: Adjust.
8358 * GNUmakefile, Makefile.maint: Update from CVS Autoconf, but
8359 keeping local WGET and WGETFLAGS modifications from Paul Eggert.
8360
8361 2003-08-25 Akim Demaille <akim@epita.fr>
8362
8363 When reducing initial empty rules, Bison parser read an initial
8364 location that is not defined. This results in garbage, and that
8365 affects Bison's own parser. Therefore we need (i) to extend Bison
8366 to support a means to initialize this location, and (ii) to use
8367 this CVS Bison to fix CVS Bison's parser.
8368
8369 * src/reader.h, reader.c (epilogue_augment): Remove, replace
8370 with...
8371 * src/muscle_tab.h, src/muscle_tab.c (muscle_code_grow): this.
8372 * src/parse-gram.y: Adjust.
8373 (%initial-action): New.
8374 (%error-verbose): Since we require CVS Bison, there is no reason
8375 not to use it.
8376 * src/scan-gram.l: Adjust.
8377 * src/Makefile.am (YACC): New, to make sure we use our own parser.
8378 * data/yacc.c (yyparse): Use b4_initial_action.
8379
8380 2003-08-25 Akim Demaille <akim@epita.fr>
8381
8382 * doc/bison.texinfo: Don't promote stdout for error messages.
8383
8384 2003-08-25 Akim Demaille <akim@epita.fr>
8385
8386 * data/lalr1.cc (Parser::reduce_print_): Remove unused yyi.
8387 From Alexandre Duret-Lutz.
8388
8389 2003-08-25 Akim Demaille <akim@epita.fr>
8390
8391 Version 1.875c.
8392
8393 2003-08-25 Akim Demaille <akim@epita.fr>
8394
8395 * data/lalr1.cc (Parser::stack_print_, YY_STACK_PRINT): New.
8396 Use them.
8397
8398 2003-08-25 Akim Demaille <akim@epita.fr>
8399
8400 * data/lalr1.cc (Parser::reduce_print_): New.
8401 Use it.
8402
8403 2003-08-25 Akim Demaille <akim@epita.fr>
8404
8405 Have lalr1.cc catch with Paul Eggert's patch to fix the infinite
8406 error recovery loops. This patch is based on
8407 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00000.html>.
8408 Also, augment the similarity between lalr1.cc and yacc.c.
8409 Note: the locations of error recovery rules are not correct yet.
8410
8411 * data/lalr1.cc: Comment changes to augment the similarity between
8412 lalr1.cc and yacc.c.
8413 (YYERROR): Goto to yyerrorlab, not yyerrlab1.
8414 (yyerrlab1): Remove, but where it used to be (now the bottom part of
8415 yyerrlab), when hitting EOF, pop the whole stack here instead of
8416 merely falling thru the default error handling mechanism.
8417 (yyerrorlab): New label, with the old contents of YYERROR,
8418 plus the following change: pop the stack of rhs corresponding
8419 to the production that invoked YYERROR. That is how Yacc
8420 behaves (required by POSIX).
8421 * tests/calc.at (AT_CHECK_CALC_LALR1_CC): No longer expected to
8422 fail.
8423
8424 2003-08-25 Akim Demaille <akim@epita.fr>
8425
8426 Tune local.at so that people can "autom4te -l autotest calc.at -o
8427 calc" for instance, to extract a sub test suite.
8428
8429 * tests/testsuite.at: Move the initialization, Autotest version
8430 requirement, and AT_TESTED invocation into...
8431 * tests/local.at: here.
8432 * tests/testsuite.at: Include it for compatibility with Autoconf
8433 2.57.
8434 * tests/Makefile.am ($(TESTSUITE)): Report that the warning should
8435 be ignore.
8436
8437 2003-08-04 Paul Eggert <eggert@twinsun.com>
8438
8439 Rework code slightly to avoid gcc -Wtraditional warnings.
8440 * data/glr.c (yyuserMerge): Return void, not YYSTYPE.
8441 The returned value is now stored in *YY0. All callers changed.
8442 * src/output.c (merge_output): Adjust to the above change.
8443
8444 2003-07-26 Paul Eggert <eggert@twinsun.com>
8445
8446 * data/glr.c (YYASSERT): New macro.
8447 (yyfillin, yydoAction, yyglrReduce, yysplitStack,
8448 yyresolveStates, yyprocessOneStack):
8449 Use `YYASSERT (FOO);' rather than `if (! (FOO)) abort ();'.
8450 Derived from a suggestion by Frank Heckenbach.
8451
8452 2003-07-25 Paul Eggert <eggert@twinsun.com>
8453
8454 * data/glr.c (yyglrReduce): Don't use C89 string concatenation,
8455 for portability to K&R C (after ansi2knr, presumably). See
8456 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>
8457 by Frank Heckenbach, though I have omitted the structure-initialization
8458 part of his glr-knr.diff patch since I recall that the Portable
8459 C Compiler didn't require that change.
8460
8461 Let the user specify how to allocate and free memory.
8462 Derived from a suggestion by Frank Heckenbach in
8463 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>.
8464 * data/glr.c (YYFREE, YYMALLOC, YYREALLOC): New macros.
8465 All uses of free, malloc, realloc changed to use these macros,
8466 and unnecessary casts removed.
8467 * data/yacc.c (YYFREE, YYMALLOC): Likewise.
8468
8469 2003-07-06 Matthias Mann <MatthiasMann@gmx.de>
8470
8471 * data/lalr1.cc (operator<<(std::ostream&, const Position&)):
8472 use s.empty() rather than s == "" to test for empty string; see
8473 <http://lists.gnu.org/archive/html/bison-patches/2003-07/msg00003.html>
8474 (trivial change)
8475
8476 2003-06-25 Akim Demaille <akim@epita.fr>
8477
8478 * config/depcomp, config/install-sh: Update from masters.
8479
8480 2003-06-20 Paul Eggert <eggert@twinsun.com>
8481
8482 * data/glr.c (YYLLOC_DEFAULT): Parenthesize arguments as needed,
8483 and return properly parenthesized result.
8484 * data/lalar1.cc (YYLLOC_DEFAULT): Likewise.
8485 * data/yacc.c (YYLLOC_DEFAULT): Likewise.
8486 Remove unnecessary parentheses from uses.
8487 * doc/bison.texinfo (Location Default Action): Describe the
8488 conventions for parentheses.
8489
8490 2003-06-19 Paul Eggert <eggert@twinsun.com>
8491
8492 * data/glr.c (yyremoveDeletes, yy_reduce_print, yyglrReduce,
8493 yyreportTree): Do not assume that size_t is the same width as int,
8494 when printing sizes. Print sizes using an unsigned format.
8495 Problem reported by Frank Heckenbach in
8496 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00035.html>.
8497
8498 Port to Forte Developer 7 C compiler.
8499 * data/glr.c (struct YYLTYPE): If locations are not being used,
8500 declare a single dummy member, as empty structs do not conform
8501 to the C standard.
8502 (YYERROR, YYBACKUP): Do not use "do { ...; return foo; } while (0)";
8503 the Forte Developer 7 C compiler complains that end-of-loop
8504 code is not reached.
8505
8506 2003-06-17 Paul Eggert <eggert@twinsun.com>
8507
8508 * lib/libiberty.h (PARAMS): Spell argument as Args, not as X, to
8509 avoid warnings from picky compilers about redefinition of PARAMS.
8510
8511 2003-06-17 Paul Eggert <eggert@twinsun.com>
8512
8513 Version 1.875b.
8514
8515 * NEWS: Document 1.875b.
8516
8517 * lib/bbitset.h: Do not include config.h; that's the includer's job.
8518 Do not include <sys/types.h>; shouldn't be needed on a C89 host.
8519 * lib/bitset.h (bitset_compatible_p): Indent as per GNU standard.
8520 Don't use 'index' in comments, as it's a builtin fn on some hosts.
8521 * lib/bitset_stats.c: Include gettext.h unconditionally, as
8522 per recent gettext manual's suggestion.
8523 * lib/ebitset.c (ebitset_resize, ebitset_unused_clear):
8524 Use prototypes, not old-style definitions.
8525 * lib/lbitset.c (lbitset_unused_clear): Likewise.
8526 * lib/vbitset.c (vbitset_resize, vbitset_ones, vbitset_zero,
8527 vbitset_empty_p, vbitset_copy1, vbitset_not, vbitset_equal_p,
8528 vbitset_subset_p, vbitset_disjoint_p, vbitset_and, vbitset_and_cmp,
8529 vbitset_andn, vbitset_andn_cmp, vbitset_or, vbitset_or_cmp,
8530 vbitset_xor, vbitset_xor_cmp, vbitset_and_or, vbitset_and_or_cmp,
8531 vbitset_andn_or, vbitset_andn_or_cmp, vbitset_or_and,
8532 vbitset_or_and_cmp, vbitset_copy): Likewise.
8533
8534 * lib/libiberty.h: Do not include config.h; that's the includer's job.
8535 Do not include <stdlib.h>.
8536 (PARAMS): Define unconditionally for C89.
8537 (ATTRIBUTE_NORETURN): Remove.
8538 (ATTRIBUTE_UNUSED): Define unconditionally.
8539
8540 Upgrade to 2003-06-08 libbitset, submitted by Michael Hayes in:
8541 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00005.html>
8542 * lib/Makefile.am (bitsets_sources): Add vbitset.c, vbitset.h.
8543 * lib/vbitset.c, lib/vbitset.h: New files.
8544 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
8545 lib/bitset_stats.c, lib/ebitset.c, lib/lbitset.c: Import
8546 from libbitset.
8547
8548 * doc/bison.texinfo (How Can I Reset the Parser): Renamed from
8549 `How Can I Reset @code{yyparse}', since texinfo does not allow
8550 arbitrary @ in node names.
8551
8552 * m4/Makefile.am (EXTRA_DIST): Add the following files, which
8553 shouldn't be needed according to the gettext 0.12.1 documentation
8554 but which seem to be needed anyway: codeset.m4 glibc21.m4
8555 intdiv0.m4 inttypes-pri.m4 inttypes.m4 inttypes_h.m4 isc-posix.m4
8556 lcmessage.m4 nls.m4 po.m4 stdint_h.m4 uintmax_t.m4 ulonglong.m4.
8557 * po/Makefile.in.in: Upgrade to gettext 0.12.1 version.
8558
8559 * lib/.cvsignore: Add stdbool.h.
8560 * m4/.cvsignore: Add nls.m4, po.m4.
8561
8562 Upgrade to CVS gnulib.
8563 * stdbool_.h: File renamed from stdbool.h.in.
8564 * configure.ac (AM_STDBOOL_H): Invoke this instead of
8565 AC_HEADER_STDBOOL.
8566 (AM_GNU_GETTEXT): Put brackets around args, as latest manual suggests.
8567 (AM_GNU_GETTEXT_VERSION): Update to 0.12.1.
8568 * lib/Makefile.am (EXTRA_DIST): Add stdbool_.h.
8569 (MOSTLYCLEANFILES): New var.
8570 ($(libbison_a_OBJECTS)): Depend on $(STDBOOL_H).
8571 (stdbool.h): New rule.
8572 * lib/dirname.c, lib/dirname.h, lib/hash.c, lib/hash.h,
8573 lib/malloc.c, lib/obstack.h, lib/quote.c, lib/realloc.c,
8574 lib/strcasecmp.c, lib/xalloc.h, m4/alloca.m4, m4/onceonly.m4,
8575 m4/quote.m4: Upgrade to today's gnulib.
8576
8577 * tests/calc.at (AT_CHECK_CALC): New option EXPECTED-TO-FAIL.
8578 (AT_CHECK_CALC_LALR1_CC): Use it, since the C++ LALR parser fails
8579 the tests right now.
8580 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Ensure yylex and
8581 yyerror are declared before use; C99 requires this.
8582
8583 2003-06-09 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
8584
8585 * data/glr.c (YYERROR): Update definition to reset yyerrState to 0
8586 first.
8587 (yyrecoverSyntaxError): Correct the logic for setting and testing
8588 yyerrState.
8589 Correct comment on handling EOF.
8590 Allow states with only a default reduction, rather than failing
8591 (I can't quite reconstruct why these were not allowed before).
8592
8593 Fixes to avoid problem that $-N rules in GLR parsers can cause
8594 buffer overruns, corrupting state.
8595
8596 * src/output.c (prepare_rules): Output max_left_semantic_context
8597 definition.
8598 * src/reader.h (max_left_semantic_context): New variable declaration.
8599 * src/scan-gram.l (max_left_semantic_context): Define.
8600 (handle_action_dollar): Update max_left_semantic_context.
8601 * data/glr.c (YYMAXLEFT): New definition.
8602 (yydoAction): Increase size of yyrhsVals by YYMAXLEFT.
8603 (yyresolveAction): Ditto.
8604
8605 Fixes to problems with location handling in GLR parsers reported by
8606 Frank Heckenbach (2003/06/05).
8607
8608 * data/glr.c (YYLTYPE): Make trivial if locations not used.
8609 (YYRHSLOC): Add parentheses, and define only if locations used.
8610 (YYLLOC_DEFAULT): Add parentheses, and give trivial definition if
8611 locations not used.
8612 (yyuserAction): Use YYLLOC_DEFAULT to set *yylocp.
8613 (yydoAction): Remove redundant initialization of *yyvalp and *yylocp.
8614
8615 * tests/cxx-type.at: Exercise location information; update tests
8616 to differentiate output with and without locations.
8617 Remove forward declarations of yylex and yyerror---caused errors
8618 because default YYLTYPE not yet defined.
8619 Change semantic actions to compute strings, rather than printing
8620 them directly (to test proper passing of semantics values). Change
8621 output to prefix notation and update test data and expected results.
8622 (yylex): Track locations.
8623 (stmtMerge): Return value rather than printing, and include arguments
8624 in value.
8625
8626 2003-06-03 Paul Eggert <eggert@twinsun.com>
8627
8628 Avoid warnings generated by GCC 2.95.4 when Bison is
8629 configured with --enable-gcc-warnings.
8630 * data/lalr1.cc (yy::]b4_parser_class_name[::parse,
8631 yy::]b4_parser_class_name[::translate_,
8632 yy::Stack::operator[] (unsigned),
8633 yy::Stack::operator[] (unsigned) const,
8634 yy::Slice::operator[] (unsigned),
8635 yy::Slice::operator[] (unsigned) const):
8636 Rename local vars to avoid warnings.
8637 * tests/glr-regression.at (Improper handling of embedded actions
8638 and $-N in GLR parsers): Remove unused local variable from yylex.
8639 * tests/regression.at (_AT_DATA_DANCER_Y): Declare yylex to take
8640 (void) as arg when not pure, since we now assume C89 when building
8641 Bison. Pacify GCC by using parameter.
8642
8643 2003-06-02 Paul Eggert <eggert@twinsun.com>
8644
8645 * data/lalr1.cc (yy::Position::lines, yy::Position::columns,
8646 yy::Location::lines, yy::Location::columns): Rename arguments
8647 to avoid shadowing; this removes a warning generated by GCC 3.3.
8648
8649 2003-06-01 Paul Eggert <eggert@twinsun.com>
8650
8651 Don't pass C-only warning optins (e.g., -Wmissing-declarations)
8652 to g++, as GCC 3.3 complains if you do it.
8653 * configure.ac (WARNING_CXXFLAGS): New subst. Set it to
8654 everything that WARNING_CFLAGS has, except omit warnings
8655 not suitable for C++.
8656 (AC_PROG_CXX): Use this instead of AC_CHECK_PROGS([CXX], [g++]).
8657 * tests/atlocal.in (CXXFLAGS): New var.
8658 * tests/local.at (AT_COMPILE_CXX): Use it instead of CFLAGS.
8659
8660 Fix a GLR parser bug I reported in February; see
8661 <http://lists.gnu.org/archive/html/bison-patches/2003-02/msg00008.html>.
8662 The problem was that GLR parsers did not conform to the C standard,
8663 because actions like { $1 = $2 + $3; } expanded to expressions
8664 that invoked YYFILL in separate subexpressions, and YYFILL assigned
8665 to a local variable. The C standard says that expressions
8666 like (var = f ()) + (var = f ()) have undefined behavior.
8667 Another problem was that GCC sometimes issues warnings that
8668 yyfill and its parameters are unused.
8669
8670 * data/glr.c (yyfillin): Renamed from the old yyfill. Mark
8671 as possibly unused.
8672 (yyfill): New function.
8673 (YYFILL): Use it.
8674 (yyuserAction): Change type of yynormal to bool, so that it matches
8675 the new yyfill signature. Mark it as possibly unused.
8676
8677
8678 Follow up on a bug I reported in February, where a Bison-generated
8679 parser can loop. Provide a test case and a fix for yacc.c. I
8680 don't have a fix for lalr1.cc or for glr.c, unfortunately.
8681 The original bug report is in:
8682 <http://lists.gnu.org/archive/html/bison-patches/2003-02/msg00044.html>
8683
8684 * data/yacc.c (YYERROR): Now just 'goto yyerrorlab', since the
8685 macro's size was becoming unwieldy.
8686 (yyerrlab): Do not discard an empty lookahead symbol, as this
8687 might destroy garbage.
8688 (yyerrorlab): New label, with the old contents of YYERROR,
8689 plus the following change: pop the stack of rhs corresponding
8690 to the production that invoked YYERROR. That is how Yacc
8691 behaves, and POSIX requires this behavior.
8692 (yyerrlab1): Use YYPOPSTACK instead of its definiens.
8693 * tests/calc.at (_AT_DATA_CALC_Y): Include unistd.h if available.
8694 Define 'alarm' to do nothing if unistd.h is not available.
8695 Add a new rule "exp: '-' error;" to test the above change to
8696 data/yacc.c. Use 'alarm' to abort any test taking longer than
8697 10 seconds, as it's probably looping.
8698 (AT_CHECK_CALC): Test recovery from error in new grammar rule.
8699 Also, the new yacc.c generates two fewer diagnostics for an
8700 existing test.
8701
8702 2003-05-24 Paul Eggert <eggert@twinsun.com>
8703
8704 * data/glr.c (YYSTACKEXPANDABLE): Do not evaluate
8705 YYSTYPE_IS_TRIVIAL or YYSTYPE_IS_TRIVIAL unless they are defined.
8706 This fixes a problem reported by John Bowman when the Compaq/HP
8707 Alpha cxx compiler happy (e.g. using cxx -D__USE_STD_IOSTREAM
8708 -ansi -Wall -gall).
8709 * data/yacc.c (union yyalloc): Likewise.
8710 (YYCOPY): Do not evaluate __GNUC__ unless it is defined.
8711
8712 Switch from 'int' to 'bool' where that makes sense.
8713
8714 * lib/abitset.c (abitset_test, abitset_empty_p, abitset_equal_p,
8715 abitset_subset_p, abitset_disjoint_p, abitset_and_cmp,
8716 abitset_andn_cmp, abitset_or_cmp, abitset_xor_cmp, abitset_and_or,
8717 abitset_and_or_cmp, abitset_andn_or_cmp, abitset_or_and_cmp):
8718 Return or accept bool, not int. All callers changed.
8719 * lib/bbitset.h: (bitset_toggle_, bitset_copy_, bitset_and_or_cmp_,
8720 bitset_andn_or_cmp_, bitset_or_and_cmp_): Likewise.
8721 * lib/bitset.c (bitset_only_set_p, bitset_print, bitset_toggle_,
8722 bitset_copy_, bitset_op4_cmp, bitset_and_or_cmp_, bitset_andn_or_cmp_,
8723 bitset_or_and_cmp_): Likewise.
8724 * lib/bitset.h (bitset_test, bitset_only_set_p): Likewise.
8725 * lib/bitset_stats.c (bitset_stats_print, bitset_stats_toggle,
8726 bitset_stats_test, bitset_stats_empty_p, bitset_stats_disjoint_p,
8727 bitset_stats_equal_p, bitset_stats_subset_p, bitset_stats_and_cmp,
8728 bitset_stats_andn_cmp, bitset_stats_or_cmp, bitset_stats_xor_cmp,
8729 bitset_stats_and_or_cmp, bitset_stats_andn_or_cmp,
8730 bitset_stats_or_and_cmp): Likewise.
8731 * lib/ebitset.c (ebitset_elt_zero_p, ebitset_equal_p, ebitset_copy_cmp,
8732 ebitset_test, ebitset_empty_p, ebitset_subset_p, ebitset_disjoint_p,
8733 ebitset_op3_cmp, ebitset_and_cmp, ebitset_andn_cmp, ebitset_or_cmp,
8734 ebitset_xor_cmp): Likewise.
8735 * lib/lbitset.c (lbitset_elt_zero_p, lbitset_equal_p, lbitset_copy_cmp,
8736 lbitset_test, lbitset_empty_p, lbitset_subset_p, lbitset_disjoint_p,
8737 lbitset_op3_cmp, lbitset_and_cmp, lbitset_andn_cmp, lbitset_or_cmp,
8738 lbitset_xor_cmp): Likewise.
8739 * lib/bbitset.h: Include <stdbool.h>.
8740 (struct bitset_vtable): The following members now return bool, not
8741 int: toggle, test, empty_p, disjoint_p, equal_p, subset_p,
8742 and_cmp, andn_cmp, or_cmp, xor_cmp, and_or_cmp, andn_or_cmp,
8743 or_and_cmp).
8744 * src/conflicts.c (count_rr_conflicts): Likewise.
8745 * lib/bitset_stats.h (bitset_stats_enabled): Now bool, not int.
8746 All uses changed.
8747 * lib/ebitset.c (ebitset_obstack_init): Likewise.
8748 * lib/lbitset.c (lbitset_obstack_init): Likewise.
8749 * src/getargs.c (debug_flag, defines_flag, locations_flag,
8750 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
8751 graph_flag): Likewise.
8752 * src/getargs.h (debug_flag, defines_flag, locations_flag,
8753 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
8754 graph_flag): Likewise.
8755 * src/output.c (error_verbose): Likewise.
8756 * src/output.h (error_verbose): Likewise.
8757 * src/reader.c (start_flag, typed): Likewise.
8758 * src/reader.h (typed): Likewise.
8759 * src/getargs.c (LOCATIONS_OPTION): New constant.
8760 (long_options, getargs): Use it.
8761 * src/lalr.c (build_relations): Use bool, not int.
8762 * src/nullable.c (nullable_compute): Likewise.
8763 * src/print.c (print_reductions): Likewise.
8764 * src/tables.c (action_row, pack_vector): Likewise.
8765 * src/muscle_tab.h (MUSCLE_INSERT_BOOL): New macro.
8766 * src/output.c (prepare): Use it.
8767 * src/output.c (token_definitions_output,
8768 symbol_destructors_output, symbol_destructors_output): Use string,
8769 not boolean integer, to keep track of whether to output separator.
8770 * src/print_graph.c (print_core): Likewise.
8771 * src/state.c (state_rule_lookaheads_print): Likewise.
8772
8773 * config/install-sh: Sync from automake 1.7.5.
8774
8775 2003-05-14 Paul Eggert <eggert@twinsun.com>
8776
8777 * src/parse-gram.y (rules_or_grammar_declaration): Require a
8778 semicolon after a grammar declaration, in the interest of possible
8779 future changes to the Bison input language.
8780 Do not allow a stray semicolon at the start of the grammar.
8781 (rhses.1): Allow one or more semicolons after any rule, including
8782 just before "|" as required by POSIX.
8783 * tests/input.at (Torturing the Scanner): Add tests for ";|" in a
8784 grammar.
8785
8786 2003-05-14 Alexandre Duret-Lutz <adl@gnu.org>
8787
8788 %parse-param support for lalr1.cc.
8789
8790 * data/lalr1.cc (b4_parse_param_decl, b4_parse_param_cons,
8791 b4_cc_constructor_calls, b4_cc_constructor_call,
8792 b4_parse_param_vars, b4_cc_var_decls, b4_cc_var_decl): New m4
8793 definitions.
8794 (yy::b4_parser_class_name::b4_parser_class_name): Take extra
8795 parse-param arguments.
8796 (yy::b4_parser_class_name): Declare instance variables to
8797 hold parse-param arguments.
8798 * tests/calc.at: s/value/semantic_value/ because value clashes
8799 with a member of yy::b4_parser_class_name. Adjust C++ code
8800 to handle %parse-param. Enable %parse-param test in C++.
8801
8802 2003-05-12 Paul Eggert <eggert@twinsun.com>
8803
8804 * doc/bison.texinfo (How Can I Reset @code{yyparse}): Reword the
8805 English a bit. Fix fclose typo. Change "const char" to "char
8806 const", and use ANSI C rather than K&R for "main". Suggest
8807 YY_FLUSH_BUFFER over yyrestart (as that is what Flex recommends)
8808 and suggest yy_switch_to_buffer.
8809
8810 2003-05-05 Paul Eggert <eggert@twinsun.com>
8811
8812 * lib/bitset.h (__INT_TO_PTR): Define to a value that presumes
8813 C89. This avoids a diagnostic on compilers that define __STDC__
8814 to 0, fixing a problem with Tru64 cc reported by Martin Mokrejs in
8815 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
8816
8817 2003-05-03 Paul Eggert <eggert@twinsun.com>
8818
8819 * lib/bitset.h (BITSET_FOR_EACH, BITSET_FOR_EACH_REVERSE):
8820 Do not overrun array bounds.
8821 This should fix a bug reported today by Olatunji Oluwabukunmi in
8822 <http://lists.gnu.org/archive/html/bug-bison/2003-05/msg00004.html>.
8823
8824 2003-04-29 Akim Demaille <akim@epita.fr>
8825
8826 * src/gram.h, src/gram.c (pure_parser, glr_parser): Move to...
8827 * src/getargs.c, src/getargs.h: here, as bool, not int.
8828 (nondeterministic_parser): New.
8829 * src/parse-gram.y, src/scan-gram.l: Support
8830 %nondeterministic-parser.
8831 * src/output.c (prepare): Use nondeterministic_parser instead
8832 of glr_parser where appropriate.
8833 * src/tables.c (conflict_row, action_row, save_row)
8834 (token_actions, token_actions, pack_vector): Ditto.
8835
8836 2003-04-29 Akim Demaille <akim@epita.fr>
8837
8838 * doc/bison.texinfo (C++ Parsers, Implementing Loops): New.
8839
8840 2003-04-29 Akim Demaille <akim@epita.fr>
8841
8842 * tests/calc.at: Also test yacc.c and glr.c (but not lalr1.cc yet)
8843 with %pure-parser and %locations to exercise the patch from Yakov
8844 Markovitch below.
8845
8846 2003-04-28 Tim Van Holder <tim.van.holder@pandora.be>
8847
8848 * data/yacc.c: (b4_lex_param): Corrected for the case where
8849 %lex-param is provided and %pure-parser isn't.
8850
8851 2003-04-27 Paul Eggert <eggert@twinsun.com>
8852
8853 Avoid gcc -Wundef warnings reported by Gerald Pfeifer in
8854 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00044.html>.
8855 * data/yacc.c (YYSTACK_ALLOC): Don't evaluate YYSTACK_USE_ALLOCA
8856 if it is not defined.
8857 (YYMAXDEPTH): Don't evaluate YYMAXDEPTH if it is not defined.
8858
8859 2003-04-26 Paul Eggert <eggert@twinsun.com>
8860
8861 * data/lalr1.cc (yy::Parser::pact_ninf_, yy::Parser::table_ninf_):
8862 Declare to be of type suitable for the ninf value itself, not of
8863 type suitable for the corresponding table, since the latter might
8864 be unsigned but the ninf value might be negative. This fixes a
8865 bug reported by Alexandre Duret-Lutz in
8866 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00017.html>.
8867
8868 * configure.ac (AC_FUNC_ERROR_AT_LINE): Remove, since gl_ERROR
8869 invokes it. We shouldn't invoke it twice because it will attempt
8870 to put error.o in the archive twice. This fixes a glitch reported
8871 by Martin Mokrejs in
8872 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
8873
8874 2003-04-21 Paul Eggert <eggert@twinsun.com>
8875
8876 * m4/error.m4: Update from Bruno Haible's 2003-04-14 patch
8877 to gnulib.
8878
8879 2003-04-21 Yakov Markovitch <Markovitch@iso.ru>
8880
8881 * data/glr.c (yyexpandGLRStack) [!YYSTACKEXPANDABLE]:
8882 Fix obvious typo that results in uncompilable GLR parsers
8883 when both %pure-parser and %locations are used. (trivial change)
8884
8885 2003-04-17 Paul Eggert <eggert@twinsun.com>
8886
8887 * src/scan-gram.l: Add %option nounput, since we no longer use unput.
8888 (unexpected_eof): Renamed from unexpected_end_of_file, for brevity.
8889 Do not insert the expected token via unput, as this runs afoul
8890 of a POSIX-compatibility bug in flex 2.5.31.
8891 All uses changed to BEGIN the parent state,
8892 since we no longer insert the expected token via unput.
8893 * tests/regression.at (Invalid inputs): Remove cascaded diagnostic
8894 that is no longer emitted after the above change.
8895
8896 * src/conflicts.c (set_conflicts): Resolve all conflicts, not just
8897 the first one. This change is from Paul Hilfinger, and it fixes
8898 regression reported by Werner Lemberg in
8899 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00026.html>.
8900
8901 (resolve_sr_conflict): Don't invoke state_errs_set
8902 unless one or more tokens have been explicitly made errors.
8903 Otherwise, the above change causes Bison to abort.
8904
8905 * tests/existing.at (GNU pic Grammar): New test case, taken from
8906 Lemberg's email.
8907
8908 2003-03-31 Akim Demaille <akim@epita.fr>
8909
8910 * doc/Makefile.am (AM_MAKEINFOFLAGS): Don't split the info file.
8911
8912 2003-03-31 Akim Demaille <akim@epita.fr>
8913
8914 * src/output.c (prepare_symbols): Avoid trailing spaces in the
8915 output.
8916
8917 2003-03-31 Akim Demaille <akim@epita.fr>
8918
8919 * doc/bison.texinfo (Strings are Destroyed): s/losses/loses/.
8920 From Paul Hilfinger.
8921
8922 2003-03-29 Akim Demaille <akim@epita.fr>
8923
8924 * m4/error.m4: Do not put under dynamic conditions some code which
8925 expansion is under static control.
8926
8927 2003-03-29 Akim Demaille <akim@epita.fr>
8928
8929 * doc/bison.texinfo (How Can I Reset @code{yyparse}): New.
8930
8931 2003-03-29 Akim Demaille <akim@epita.fr>
8932
8933 * doc/bison.texinfo (Strings are Destroyed): New.
8934
8935 2003-03-13 Paul Eggert <eggert@twinsun.com>
8936
8937 * .cvsignore: Add configure.lineno.
8938 * src/.cvsignore: Add yacc.
8939 * tests/.cvsignore: Add testsuite.log.
8940 * doc/fdl.texi: Sync with latest FSF version.
8941
8942 2003-03-12 Paul Eggert <eggert@twinsun.com>
8943
8944 * scan-gram.l (YY_USER_INIT): Initialize code_start, too.
8945 (<INITIAL><<EOF>>, <SC_PRE_CODE><<EOF>>): Set *loc to the scanner
8946 cursor, instead of leaving it undefined. This fixes a bug
8947 reported by Tim Van Holder in
8948 <http://lists.gnu.org/archive/html/bug-bison/2003-03/msg00023.html>.
8949 * tests/input.at (Torturing the Scanner): Test the scanner on
8950 an empty input file, which was Tim Van Holder's test case.
8951
8952 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): When checking whether
8953 <sys/resource.h> can be included, include sys/time.h and
8954 sys/times.h first, if available. This works around the SunOS
8955 4.1.4 porting bug reported by Bruce Becker in
8956 <http://lists.gnu.org/archive/html/bug-bison/2003-03/msg00018.html>.
8957
8958 * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't
8959 AC_CHECK_HEADERS([sys/wait.h]), as this interferes with
8960 AC_HEADER_SYS_WAIT.
8961
8962 Merge changes from gnulib. This was prompted because the CVS
8963 snapshot didn't build on Solaris 7 due to strnlen problems.
8964
8965 These changes need to be merged back into gnulib:
8966 * lib/hash.c: Include <stdbool.h> unconditionally.
8967 * m4/onceonly.m4 (m4_quote): New macro.
8968 (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE, AC_CHECK_DECLS_ONCE):
8969 Quote AC_FOREACH variable-expansions properly.
8970 The 2003-01-03 obstack.h change also needs merging.
8971 {end of changes requiring merging}
8972
8973 * lib/stdbool.h.in, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
8974 m4/getopt.m4, m4/hash.m4, m4/malloc.m4, m4/memchr.m4,
8975 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/quote.m4,
8976 m4/quotearg.m4, m4/realloc.m4, m4/stpcpy.m4, m4/strnlen.m4,
8977 m4/strtol.m4, m4/strtoul.m4, m4/unlocked-io.m4, m4/xalloc.m4:
8978 New files, imported from gnulib.
8979 * m4/Makefile.am (EXTRA_DIST): Add the new m4/*.m4 files mentioned
8980 above.
8981
8982 * lib/mbswidth.c, m4/error.m4, m4/mbrtowc.m4, m4/mbswidth.m4,
8983 m4/memcmp.m4, m4/prereq.m4, m4/stdbool.m4: Update to current
8984 gnulib sources.
8985
8986 * configure.ac (gl_DIRNAME, gl_GETOPT, gl_HASH, gl_QUOTE, gl_XALLOC):
8987 Add.
8988 (gl_ERROR): New, replacing jm_PREREQ_ERROR.
8989 (gl_FUNC_ALLOCA): New, replacing AC_FUNC_ALLOCA.
8990 (gl_FUNC_STPCPY): New, replacing AC_REPLACE_FUNCS(stpcpy).
8991 (gl_FUNC_STRNLEN): New, replacing AC_FUNC_STRNLEN.
8992 (gl_MBSWIDTH): New, replacing jm_PREREQ_MBSWIDTH.
8993 (gl_OBSTACK): New, replacing AC_FUNC_OBSTACK.
8994 (gl_QUOTEARG): New, replacing jm_PREREQ_QUOTEARG.
8995 (jm_FUNC_GLIBC_UNLOCKED_IO, gl_FUNC_STPCPY, gl_FUNC_STRTOL): New.
8996 (jm_FUNC_MALLOC): New, replacing AC_FUNC_MALLOC.
8997 (jm_FUNC_REALLOC): New, replacing AC_FUNC_REALLOC.
8998 (jm_PREREQ_ARGMATCH): Remove.
8999 (AC_REPLACE_FUNCS): Remove memchr, memrchr, stpcpy, strtol, strtoul.
9000 * lib/Makefile.am (libbison_a_SOURCES): Add argmatch.c, argmatch.h.
9001
9002 * src/system.h: Include <stdbool.h> unconditionally.
9003
9004 * lib/bbitset.h: Include <limits.h> unconditionally. We have been
9005 assuming at least C89 in the bitset code for some time now.
9006
9007 2003-03-03 Akim Demaille <akim@epita.fr>
9008
9009 * ro.po: New.
9010
9011 2003-03-02 Akim Demaille <akim@epita.fr>
9012
9013 * doc/bison.texinfo (Table of Symbols): Reactivate the
9014 documentation for %lex-param, and %parse-param.
9015
9016 2003-03-02 Akim Demaille <akim@epita.fr>
9017
9018 * data/yacc.c, data/glr.c, data/lal1.cc: Use similar code to
9019 generate verbose error messages.
9020 Use the number of tokens as an upper bound in yytname, as it
9021 cannot be a non terminal.
9022
9023 2003-03-02 Akim Demaille <akim@epita.fr>
9024
9025 * tests/regression.at (_AT_DATA_DANCER_Y): Fix the expected error
9026 message.
9027
9028 2003-03-02 Akim Demaille <akim@epita.fr>
9029
9030 * tests/regression.at (_AT_DATA_DANCER_Y, AT_CHECK_DANCER): New.
9031 Use them to exercise yycheck overrun.
9032 Based on Andrew Suffield's grammar.
9033
9034 2003-03-02 Akim Demaille <akim@epita.fr>
9035
9036 Create tests/local.at for Bison generic testing macros.
9037
9038 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Move to...
9039 * tests/local.at (AT_BISON_OPTION_PUSHDEFS, AT_BISON_OPTION_POPDEFS):
9040 This new file.
9041 * tests/calc.at (AT_CHECK_CALC): Adjust.
9042 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR)
9043 (AT_COMPILE, AT_COMPILE_CXX, AT_PARSER_CHECK): Move to...
9044 * tests/local.at: here.
9045 (AT_COMPILE_CXX): Tags the tests using it as c++.
9046 Ignore the test if CXX is not functional.
9047
9048 2003-03-01 Paul Eggert <eggert@twinsun.com>
9049
9050 * src/scan-gram.l (code_start): Initialize it to scanner_cursor,
9051 not loc->end, since loc->end might contain garbage and this leads
9052 to undefined behavior on some platforms.
9053 (id_loc, token_start): Use (IF_LINTed) initial values that do not
9054 depend on *loc, so that the reader doesn't give the the false
9055 impression that *loc is initialized.
9056 (<INITIAL>"%%"): Do not bother setting code_start, since its value
9057 does not survive the return.
9058
9059 2003-03-01 Akim Demaille <akim@epita.fr>
9060
9061 * src/scan-gram.l (code_start): Always initialize it when entering
9062 into yylex, as SC_EPILOGUE is activated *before* the corresponding
9063 yylex invocation. An alternative would be making it static, but
9064 then it starts with the second %%'s beginning, instead of its end.
9065
9066 2003-02-28 Paul Eggert <eggert@twinsun.com>
9067
9068 * lib/mbswidth.c: Include <wchar.h> before "mbswidth.h", to work
9069 around a UnixWare 7.1.1 porting bug reported by John Hughes in
9070 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00030.html>.
9071
9072 2003-02-26 Paul Eggert <eggert@twinsun.com>
9073
9074 * README: Mention compiler bug in Sun Forte Developer 6 update 2.
9075 Remove Sequent/Pyramid discussion (nobody uses them any more).
9076 Merge VMS and MS-DOS discussion; these ports may well be dead
9077 but let's keep mentioning them for now. Put <> around email
9078 addresses. Add copyright notice.
9079
9080 2003-02-24 Paul Eggert <eggert@twinsun.com>
9081
9082 * data/glr.c (yy_reduce_print): yylineno -> yylno,
9083 to avoid collision with flex use of yylineno.
9084 Problem reported by Bruce Lilly in
9085 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00016.html>.
9086 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
9087 * data/yacc.c (yy_reduce_print): Likewise.
9088
9089 * config/depcomp: Sync with Automake 1.7.3.
9090
9091 2003-02-21 Akim Demaille <akim@epita.fr>
9092
9093 * data/lalr1.cc: Use temporary variables instead of casts to
9094 change integer types.
9095 Suggested by Paul Eggert.
9096
9097 2003-02-21 Akim Demaille <akim@epita.fr>
9098
9099 * doc/bison.texinfo: Use "location" consistently to refer to @n,
9100 to avoid confusions with lalr1.cc's notion of Position.
9101 Suggested by Paul Eggert.
9102
9103 2003-02-20 Akim Demaille <akim@epita.fr>
9104
9105 * data/lalr1.cc (position.hh): Make sure "columns" never pushes
9106 before initial_columns.
9107 (location.hh): Use consistent variable names when defining the
9108 operator<<.
9109 Use "last" so that we subtract from Positions, not from unsigned.
9110
9111 2003-02-20 Akim Demaille <akim@epita.fr>
9112
9113 * data/lalr1.cc (position.hh): New subfile, including the extended
9114 and Doxygen'ed documentation of class Position.
9115 (location.hh): Use it.
9116 Document a` la Doxygen.
9117 With the help of Benoit Perrot.
9118
9119 2003-02-20 Akim Demaille <akim@epita.fr>
9120
9121 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Define
9122 AT_YACC_IF.
9123 Redefine AT_YYERROR_SEES_LOC_IF using it.
9124 (_AT_DATA_CALC_Y): Don't declare yyerror when lalr1.cc, as it is
9125 not defined.
9126 Don't use the location in yy::Parser::error_ and
9127 yy::Parser::print_ when not %locations.
9128 Activate more lalr1.cc tests.
9129
9130 2003-02-19 Akim Demaille <akim@epita.fr>
9131
9132 * data/lalr1.cc: When displaying a line number, be sure to make it
9133 an int.
9134
9135 2003-02-19 Akim Demaille <akim@epita.fr>
9136
9137 * data/lalr1.cc (b4_stack_depth_init, yy::Parser::initdepth_):
9138 Remove, useless.
9139 (YYABORT, YYACCEPT, YYERROR): New.
9140 * tests/calc.at: Renable the lalr1.cc test.
9141
9142 2003-02-19 Akim Demaille <akim@epita.fr>
9143
9144 * tests/calc.at (AT_CHECK_CALC): Check different scenarios of
9145 error recovery, mixing with/without pops and discarding of the
9146 lookahead.
9147 Exercise YYERROR.
9148 Disable the lalr1.cc tests as currently it doesn't support YYERROR.
9149
9150 2003-02-17 Paul Eggert <eggert@twinsun.com>
9151
9152 * tests/atlocal.in (LDFLAGS, LIBS): New vars.
9153 * tests/testsuite.at (AT_COMPILE): Use them.
9154 This fixes the testsuite problem reported by Robert Lentz in
9155 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00011.html>.
9156
9157 2003-02-12 Paul Eggert <eggert@twinsun.com>
9158
9159 * data/yacc.c (yyerrlab) [YYERROR_VERBOSE]:
9160 Avoid subscript error in yycheck. Bug reported by Andrew Suffield in
9161 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00003.html>.
9162 * data/glr.c (yyreportSyntaxError) [YYERROR_VERBOSE]: Likewise.
9163 Check for malloc failure, for consistency with yacc.c.
9164 (yytname_size): Remove, for consistency with yacc.c.
9165
9166 The bug still remains in data/lalr1.cc, as I didn't have time
9167 to fix it there.
9168
9169 2003-02-06 Akim Demaille <akim@epita.fr>
9170
9171 * configure.ac (GXX): Rename as...
9172 (CXX): this, to keep the original Autoconf semantics.
9173 Require 2.57.
9174 * data/lalr1.cc: Fix b4_copyright invocations.
9175 If YYDEBUG is not defined, don't depend upon name_ being defined.
9176 (location.hh): Include string and iostream.
9177 (Position::filename): New member.
9178 (Position::Position ()): New.
9179 (operator<< (Position)): New.
9180 (operator- (Position, int)): New.
9181 (Location::first, Location::last): Rename as...
9182 (Location::begin, Location::end): these, to mock the conventional
9183 iterator names.
9184 (operator<< (Location)): New.
9185 * tests/atlocal.in (CXX): New.
9186 * tests/testsuite.at (AT_COMPILE_CXX): New.
9187 * tests/calc.at (_AT_DATA_CALC_Y): Adjust yyerror to report the
9188 locations in a more synthetic way.
9189 (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF is positive if
9190 lalr1.cc is used.
9191 Adjust the C locations to match those from Emacs: first column is
9192 column 0.
9193 Change all the expected results.
9194 Conform to the GCS: simplify the locations when applicable.
9195 (LOC, VAL, YYLLOC_FORMAL, YYLLOC_ARG, USE_YYLLOC, LEX_FORMALS)
9196 (LEX_ARGS, USE_LEX_ARGS, LEX_PRE_FORMALS, LEX_PRE_ARGS): Replace
9197 these CPP macros with the m4 macros new defined by...
9198 (AT_CHECK_PUSHDEFS): this, i.e.:
9199 (AT_LALR1_CC_IF, AT_PURE_LEX_IF, AT_LOC, AT_VAL, AT_LEX_FORMALS)
9200 (AT_LEX_ARGS, AT_USE_LEX_ARGS, AT_LEX_PRE_FORMALS, AT_LEX_PRE_ARGS)
9201 New macros.
9202 (AT_CHECK_POPDEFS): Undefine them.
9203 (AT_CHECK_CALC_LALR1_CC): New.
9204 Use it for the first lalr1.cc test.
9205
9206 2003-02-04 Akim Demaille <akim@epita.fr>
9207
9208 * data/lalr1.cc (YYLLOC_DEFAULT): Fix its definition: be based on
9209 Location as is defined.
9210
9211 2003-02-04 Akim Demaille <akim@epita.fr>
9212
9213 * data/lalr1.cc: If YYDEBUG is not defined, don't depend upon
9214 name_ being defined.
9215
9216 2003-02-03 Paul Eggert <eggert@twinsun.com>
9217
9218 * src/gram.h (start_symbol): Remove unused decl.
9219
9220 Use more-consistent naming conventions for local vars.
9221
9222 * src/derives.c (derives_compute): Change type of local var from
9223 int to rule_number.
9224 * src/gram.c (grammar_rules_partial_print): Likewise.
9225 * src/print.c (print_core): Likewise.
9226 * src/reduce.c (reduce_grammar_tables): Likewise.
9227
9228 * src/gram.c (grammar_dump): Change name of item_number *
9229 local var from r to rp.
9230 * src/nullable.c (nullable_compute): Likewise.
9231
9232 * src/gram.h (ISTOKEN, ISVAR): Use i, not s, for int var.
9233
9234 * src/gram.h (symbol_number_as_item_number): Use sym, not s,
9235 for symbol or symbol_number var.
9236 * src/reader.c (grammar_start_symbol_set): Likewise.
9237 * src/reader.h (grammar_start_symbol_set, grammar_symbol_append):
9238 Likewise.
9239 * src/state.c (transitions_to): Likewise.
9240 * src/state.h: Likewise.
9241 * src/tables.c (symbol_number_to_vector_number): Likewise.
9242
9243 * src/muscle_tab.h (MUSCLE_OBSTACK_SGROW): Use p, not s, for
9244 char * var.
9245
9246 * src/parse-gram.y (lloc_default): Use loc, not r, for YYLTYPE
9247 var.
9248
9249 * src/scan-gram.l (no_cr_read): Use bytes_read, not s, for size
9250 var.
9251
9252 * src/system.h (xstrndup, strchr, strspn, strnlen, memchr, memrchr):
9253 Use str, not s, for char * var. Use ch, not c, for character var.
9254 Use size for size var.
9255
9256 * src/uniqstr.c (uniqstr_new, uniqstr_assert): Use str, not s, for
9257 char * var.
9258 (uniqstr_print, uniqst_print_processor): Use ustr, not s, for
9259 uniqstr var.
9260 * src/uniqstr.h: Likewise.
9261
9262 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
9263 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
9264 get_node_alignment_str, get_arrow_mode_str, get_crossing_type_str,
9265 get_view_str, get_linestyle_str, get_arrowstyle_str): Rename
9266 param to have same name as that of enum, so that we don't use
9267 "s" to stand for a non-state.
9268
9269 2003-02-02 Akim Demaille <akim@epita.fr>
9270
9271 * src/scan-skel.l: Scan more than one inert character per yylex
9272 invocation.
9273
9274 2003-02-01 Paul Eggert <eggert@twinsun.com>
9275
9276 Version 1.875a.
9277
9278 * po/LINGUAS: Add ms.
9279
9280 2003-01-30 Akim Demaille <akim@epita.fr>
9281
9282 * doc/Makefile.am (CLEANFILES): Add bison.fns for distcheck.
9283
9284 2003-01-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
9285
9286 * tests/cxx-type.at: Correct apparent typo in Bison input: $$ instead
9287 of $1.
9288
9289 Changes in response to error report by S. Eken: GLR mode does not
9290 handle negative $ indices or $ indices in embedded rules correctly.
9291 See <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00076.html>.
9292
9293 * data/glr.c (b4_rhs_value): Change to use YYFILL macro.
9294 (b4_rhs_location): Ditto.
9295 (yyfill): New function to copy from stack tree into array
9296 incrementally.
9297 (yyuserAction): Modify to allow incremental move of semantic values
9298 to rhs array when in GLR mode.
9299 Define YYFILL to use in user-defined actions to fill semantic array
9300 as needed.
9301 Remove dummy use of yystack, as there is now a guaranteed use.
9302 (yydoAction): Modify to allow incremental move of semantic values
9303 to rhs array when in GLR mode.
9304 (yyresolveAction): Ditto.
9305 (yyglrShiftDefer): Update comment.
9306 (yyresolveStates): Use X == NULL for pointers, not !X.
9307 (yyglrReduce): Ditto.
9308 (yydoAction): Ditto
9309
9310 * tests/glr-regr1.at: Rename to ...
9311 * tests/glr-regression.at: Add new regression test for the problems
9312 described above (adapted from S. Eken).
9313 Update copyright notice.
9314 * tests/testsuite.at: Rename glr-regr1.at to glr-regression.at.
9315 * tests/Makefile.am: Ditto.
9316
9317 2003-01-28 Paul Eggert <eggert@twinsun.com>
9318
9319 * data/lalr1.cc: Do not use @output_header_name@ unless
9320 b4_defines_flag is set. This fixes two bugs reported by
9321 Tim Van Holder in
9322 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00071.html>
9323 and <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00073.html>.
9324
9325 2003-01-21 Paul Eggert <eggert@twinsun.com>
9326
9327 * data/yacc.c (YYERROR): Move code from yyerrlab1 to here, so that
9328 we don't need to worry about yyerrlab1 being reported as an
9329 "unused label" by non-GCC C compilers. The downside is that if
9330 locations are used then a couple of statements are duplicated each
9331 time YYERROR is invoked, but the upside is that the warnings
9332 should vanish.
9333 (yyerrlab1): Move code to YERROR.
9334 (yyerrlab2): Remove. Change uses back to yyerrlab1.
9335 This reverts some of the 2002-12-27 change.
9336
9337 2003-01-17 Paul Eggert <eggert@twinsun.com>
9338
9339 * src/output.c (symbol_printers_output): Fix typo that led
9340 to core dump. Problem reported by Antonio Rus in
9341 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00058.html>.
9342
9343 2003-01-13 Akim Demaille <akim@epita.fr>,
9344 Quoc Peyrot <chojin@lrde.epita.fr>,
9345 Robert Anisko <anisko_r@lrde.epita.fr>
9346
9347 * data/lalr1.cc (parse::yyerrlab1): When popping the stack, stop
9348 when the stacks contain one element, as the loop would otherwise
9349 free the last state, and then use the top state (the one we just
9350 popped). This means that the initial elements will not be freed
9351 explicitly, as is the case in yacc.c; it is not a problem, as
9352 these elements have fake values.
9353
9354 2003-01-11 Paul Eggert <eggert@twinsun.com>
9355
9356 * NEWS: %expect-violations are now just warnings, reverting
9357 to Bison 1.30 and 1.75 behavior. This fixes the GCC 3.2
9358 bootstrapping problem reported by Matthias Klose; see
9359 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00053.html>.
9360 * src/conflicts.c (conflicts_print): Likewise.
9361 * tests/conflicts.at (%expect not enough, %expect too much,
9362 %expect with reduce conflicts): Likewise.
9363 * doc/bison.texinfo (Expect Decl): Document this. Also mention
9364 that the warning is enabled if the number of conflicts changes
9365 (not necessarily increases).
9366
9367 * src/getargs.c (version): Update copyright year.
9368
9369 2003-01-09 Akim Demaille <akim@epita.fr>
9370
9371 * src/Makefile.am, lib/Makefile.am: Use $(VAR) instead of @VAR@.
9372
9373 2003-01-08 Paul Eggert <eggert@twinsun.com>
9374
9375 * Makefile.maint (WGETFLAGS):
9376 New macro, containing "-C off" to disable proxy caches.
9377 All uses of $(WGET) changed to $(WGET) $(WGETFLAGS).
9378 (rel-check): Use $(WGET) instead of wget.
9379
9380 2003-01-06 Paul Eggert <eggert@twinsun.com>
9381
9382 * doc/bison.texinfo (Generalized LR Parsing): Add a reference to
9383 the GLR paper of Scott, Johnstone and Hussain.
9384
9385 2003-01-04 Paul Eggert <eggert@twinsun.com>
9386
9387 * configure.ac (AC_ARG_ENABLE): Add --disable-yacc.
9388 (YACC_SCRIPT, YACC_LIBRARY): New vars to AC_SUBST.
9389 * lib/Makefile.am (lib_LIBRARIES): liby.a -> @YACC_LIBRARY@.
9390 (EXTRA_LIBRARIES): New var, for liby.a.
9391 * src/Makefile.am (bin_SCRIPTS): yacc -> @YACC_SCRIPT@.
9392 (EXTRA_SCRIPTS): New var, for yacc.
9393
9394 * data/yacc.c (yyerrlab1): Omit attribute if __cplusplus is defined,
9395 since GNU C++ (as of 3.2.1) does not allow attributes on labels.
9396 Problem reported by Nelson H. F. Beebe.
9397
9398 2003-01-03 Paul Eggert <eggert@twinsun.com>
9399
9400 * lib/obstack.h (__INT_TO_PTR) [__STDC__]: Cast result to
9401 (void *) to avoid diagnostic with native c89 on SGI IRIX 6.5
9402 when compiling Bison 1.875's `bitset bset = obstack_alloc
9403 (bobstack, bytes);'. Problem reported by Nelson H. F. Beebe.
9404
9405 * src/scan-skel.l (QPUTS): Omit redundant `;' from macro definition.
9406 ([^@\n]): Renamed from [^@\n]+ so that the token buffer does not
9407 grow to a huge size with typical invocation.
9408
9409 * lib/hash.c (_Bool, bool, false, true, __bool_true_false_are_defined):
9410 Use the pattern recommended by Autoconf 2.57, except also protect
9411 against double-definition.
9412 * src/system.h: Likewise.
9413 Portability issues reported by Nelson H. F. Beebe.
9414
9415 * data/glr.c (yybool): Renamed from bool, to avoid collisions in C.
9416 All uses changed. Provide a definition in both C and C++.
9417 (yytrue, yyfalse): Define even if defined (__cplusplus).
9418
9419 * lib/bitset_stats.c (bitset_stats_list): Remove unused var.
9420 Reported by Nelson H. F. Beebe.
9421
9422 * src/scan-skel.l ("@oline@"): Output lineno+1, not lineno.
9423
9424 2003-01-02 Paul Eggert <eggert@twinsun.com>
9425
9426 * data/yacc.c (yyerrlab1): Append `;' after attribute, to
9427 pacify the buggy "smart preprocessor" in MacOS 10.2.3.
9428 Bug reported by Nelson H. F. Beebe.
9429
9430 2003-01-01 Paul Eggert <eggert@twinsun.com>
9431
9432 * Version 1.875.
9433
9434 2002-12-30 Paul Eggert <eggert@twinsun.com>
9435
9436 * src/scan-gram.l (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>","):
9437 Moved here from...
9438 (<INITIAL>","): Here. This causes stray "," to be treated
9439 more uniformly.
9440
9441 * src/scan-gram.l (<SC_BRACED_CODE>"}"): Output ";" before the
9442 last brace in braced code when not in Yacc mode, for compatibility
9443 with Bison 1.35. This resurrects the 2001-12-15 patch to
9444 src/reader.c.
9445
9446 * src/reader.h (YYDECL): Use YYSTYPE, not its deprecated alias
9447 yystype. This follows up the 2002-12-24 YYSTYPE bug fix.
9448
9449 2002-12-28 Paul Eggert <eggert@twinsun.com>
9450
9451 * src/symtab.c (symbol_make_alias): Set type of SYMVAL to be
9452 that of SYM's type. This fixes Debian bug 168069, reported by
9453 Thomas Olsson.
9454
9455 2002-12-28 Paul Eggert <eggert@twinsun.com>
9456
9457 Version 1.75f.
9458
9459 Switch back to the Yacc style of conflict reports, undoing some
9460 of the 2002-07-30 change.
9461 * doc/bison.texinfo (Understanding): Use Yacc style for
9462 conflict reports. Also, use new way of locating rules.
9463 * src/conflicts.c (conflict_report):
9464 Renamed from conflict_report_yacc, removing the old
9465 'conflict_report'. Translate the entire conflict report at once,
9466 so that we don't assume that "," has the same interpretation in
9467 all languages.
9468 (conflicts_output): Use Yacc-style conflict report for each state,
9469 instead of our more-complicated style.
9470 (conflicts_print): Use Yacc-style conflict report, except print
9471 the input file name when not emulating Yacc.
9472 * tests/conflicts.at (Unresolved SR Conflicts, Defaulted
9473 Conflicted Reduction, %expect not enough, %expect too much,
9474 %expect with reduce conflicts): Switch to Yacc-style conflict reports.
9475 * tests/existing.at (GNU Cim Grammar): Likewise.
9476 * tests/glr-regr1.at (Badly Collapsed GLR States): Likewise.
9477
9478 * src/complain.c (warn_at, warn, complain_at, complain, fatal_at,
9479 fatal): Don't invoke fflush; it's not needed and it might even be
9480 harmful for stdout, as stdout might not be open.
9481 * src/reduce.c (reduce_print): Likewise.
9482
9483 2002-12-27 Paul Eggert <eggert@twinsun.com>
9484
9485 Fix a bug where error locations were not being recorded correctly.
9486 This problem was originally reported by Paul Hilfinger in
9487 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00086.html>.
9488
9489 * data/yacc.c (yyparse): New local var yylerrsp, to record the
9490 top of the location stack's error locations.
9491 (yyerrlab): Set it. When discarding a token, push its location
9492 onto yylerrsp so that we don't lose track of the error's end.
9493 (yyerrlab1): Now is only the target of YYERROR, so that we can
9494 properly record the location of the action that failed. For GCC
9495 2.93 and later, insert an __attribute__ ((__unused__)) to avoid
9496 GCC warning about yyerrlab1 being unused if YYERROR is unused.
9497 (yyerrlab2): New label, which yyerrlab now falls through to.
9498 Compute the error's location by applying YYLLOC_DEFAULT to
9499 the locations of all the symbols that went into the error.
9500 * doc/bison.texinfo (Location Default Action): Mention that
9501 YYLLOC_DEFAULT is also invoked for syntax errors.
9502 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
9503 Error locations include the locations of all the tokens that were
9504 discarded, not just the last token.
9505
9506 2002-12-26 Paul Eggert <eggert@twinsun.com>
9507
9508 * src/files.c: Include quote.h.
9509 (compute_output_file_names): Warn if we detect conflicting
9510 outputs to the same file. This should catch the misunderstanding
9511 exemplified by Debian Bug 165349, reported by Bruce Stephens..
9512
9513 * src/conflicts.c (conflicts_print): If the user specifies
9514 "%expect N", report an error if there are any reduce/reduce
9515 conflicts. This is what the manual says should happen.
9516 This fixes Debian bug 130890, reported by Anthony DeRobertis.
9517 * tests/conflicts.at (%expect with reduce conflicts): New test.
9518
9519 Don't use m4_include on relative file names, as it doesn't work as
9520 desired if there happens to be a file with that name under ".".
9521
9522 * m4sugar/version.m4: Remove; it was included but it wasn't used.
9523 * data/Makefile.am (dist_m4sugar_DATA): Remove m4sugar/version.m4.
9524 * data/m4sugar/m4sugar.m4: Don't include m4sugar/version.m4.
9525 * data/glr.c, data/lalr1.cc, data/yacc.c: Don't include c.m4.
9526 * src/output.c (output_skeleton): Use full path names when
9527 specifying a file to include; don't rely on include path, as
9528 it's unreliable when the working file contains a file with
9529 that name.
9530
9531 2002-12-25 Paul Eggert <eggert@twinsun.com>
9532
9533 Remove obsolete references to bison.simple and bison.hairy.
9534 Problem mentioned by Aubin Mahe in
9535 <http://lists.gnu.org/archive/html/help-bison/2002-12/msg00010.html>.
9536 * data/glr.c: Comment fix.
9537 * doc/bison.1: Remove references. Also, mention "yacc".
9538
9539 * src/getargs.c (getargs) [MSDOS]: Don't assume optarg != NULL
9540 with -g option.
9541
9542 * src/parse-gram.y (declaration): Use enum "report_states" rather
9543 than its numeric value 1.
9544
9545 * src/scan-skel.l ("@output ".*\n): Close any old yyout before
9546 opening a new one. This fixes Debian bug 165349, reported by
9547 Bruce Stephens.
9548
9549 2002-12-24 Paul Eggert <eggert@twinsun.com>
9550
9551 Version 1.75e.
9552
9553 * Makefile.maint (cvs-update): Don't assume that the shell
9554 supports $(...), as Solaris sh doesn't.
9555
9556 * src/parse-gram.y (lloc_default): Remove test for empty
9557 nonterminals at the end, since it didn't change the result.
9558
9559 2002-12-24 Paul Eggert <eggert@twinsun.com>
9560
9561 If the user does not define YYSTYPE as a macro, Bison now declares it
9562 using typedef instead of defining it as a macro. POSIX requires this.
9563 For consistency, YYLTYPE is also declared instead of defined.
9564
9565 %union directives can now have a tag before the `{', e.g., the
9566 directive `%union foo {...}' now generates the C code
9567 `typedef union foo { ... } YYSTYPE;'; this is for Yacc compatibility.
9568 The default union tag is `YYSTYPE', for compatibility with Solaris 9
9569 Yacc. For consistency, YYLTYPE's struct tag is now `YYLTYPE'
9570 instead of `yyltype'.
9571
9572 `yystype' and `yyltype' are now obsolescent macros instead of being
9573 typedefs or tags; they are no longer documented and will be
9574 withdrawn in a future release.
9575
9576 * data/glr.c (b4_location_type): Remove.
9577 (YYSTYPE): Renamed from yystype.
9578 (YYSTYPE_IS_DECLARED): New macro, used to prevent double-typedef.
9579 (struct YYLTYPE): Renamed from struct yyltype.
9580 (YYLTYPE): Renamed from yyltype.
9581 (yyltype, yystype): New (and obsolescent) macros,
9582 for backward compatibility.
9583 * data/yacc.c: Likewise.
9584
9585 * data/yacc.c (YYSTYPE): Declare as union YYSTYPE if the user
9586 does not specify a union tag. This is for compatibility with
9587 Solaris 9 yacc.
9588
9589 * src/parse-gram.y (add_param): 2nd arg is now char * not char
9590 const *, since it is now modified by stripping surrounding { }.
9591 (current_braced_code): Remove.
9592 (PERCENT_DESTRUCTOR, PERCENT_PRINTER, PERCENT_UNION,
9593 PERCENT_LEX_PARAM, PERCENT_PARSE_PARAM): Change names to include
9594 trailing " {...}". Now of type <chars>.
9595 (grammar_declaration): Adjust to bundled tokens.
9596 (code_content): Remove; stripping is now done by add_param.
9597 (print_token_value): Print contents of bundled tokens.
9598 (token_name): New function.
9599
9600 * src/reader.h (braced_code, current_braced_code): Remove.
9601 (token_name): New decl.
9602
9603 * src/scan-gram.l (handle_dollar, handle_at): Now takes int
9604 token_type, not braced_code code_kind. All uses changed.
9605 (SC_PRE_CODE): New state, for scanning after a keyword that
9606 has (or usually has) an immediately-following braced code.
9607 (token_type): New local var, to keep track of which token type
9608 to return when scanning braced code.
9609 (<INITIAL>"%destructor", <INITIAL>"%lex-param",
9610 <INITIAL>"%parse-param", <INITIAL>"%printer",
9611 <INITIAL>"%union"): Set token type and BEGIN SC_PRE_CODE
9612 instead of returning a token type immediately.
9613 (<INITIAL>"{"): Set token type.
9614 (<SC_BRACED_CODE>"}"): Use it.
9615 (handle_action_dollar, handle_action_at): Now returns bool
9616 indicating success. Fail if ! current_rule; this prevents a core dump.
9617 (handle_symbol_code_dollar, handle_symbol_code_at):
9618 Remove; merge body into caller.
9619 (handle_dollar, handle_at): Complain in invalid contexts.
9620
9621 * NEWS, doc/bison.texinfo: Document the above.
9622 * NEWS: Fix years and program names in copyright notice.
9623
9624 2002-12-17 Paul Eggert <eggert@twinsun.com>
9625
9626 * NEWS, doc/bison.texinfo (Parser Function, Pure Calling, Error
9627 Reporting, Table of Symbols): Omit mentions of %lex-param and
9628 %parse-param from the documentation for now.
9629
9630 2002-12-15 Paul Eggert <eggert@twinsun.com>
9631
9632 Undo most of the 2002-11-12 yychar -> yytoken patch, as it broke
9633 GCC 3.2.1 (which depends on yychar == YYEMPTY when there is no
9634 lookahead symbol, and which sets yychar in parser actions) and it
9635 disagreed with the Bison documentation. Bug
9636 reported by Andrew Walrond.
9637
9638 * data/yacc.c (YYTRANSLATE): Don't check for negative argument,
9639 as the caller now does that.
9640 (yyclearin, YYBACKUP, yyparse): Use yychar, not yytoken.
9641 (YYEMPTY): Parenthesize right hand side, since others use it.
9642 (yyparse): Don't assume that our generated code is the only code
9643 that sets yychar.
9644
9645 2002-12-13 Paul Eggert <eggert@twinsun.com>
9646
9647 Version 1.75d.
9648
9649 POSIX requires a "yacc" command.
9650 * src/Makefile.am (bin_SCRIPTS): New macro, for yacc.
9651 (MOSTLYCLEANFILES): Add yacc.
9652 (yacc): New rule.
9653 * doc/bison.texinfo (Invocation, Bison Options): Mention yacc
9654 as an alias for bison y.
9655
9656 * po/LINGUAS: Add da.
9657
9658 * src/getargs.c (__GNU_LIBRARY__) [lint]: Define to work around
9659 problem with latest <getopt.h>.
9660 (HACK_FOR___GNU_LIBRARY___PROTOTYPE): New macro.
9661
9662 * doc/fdl.texi: Upgrade to 1.2.
9663 * lib/alloca.c, lib/error.c, lib/getopt.c, lib/getopt.h
9664 lib/getopt1.c, lib/gettext.h, lib/memrchr.c, lib/obstack.c,
9665 lib/obstack.h, lib/strnlen.c, lib/unlocked-io.h: Sync with
9666 gnulib.
9667 * config/install-sh: Sync with autotools.
9668
9669 Fix a bad interaction with flex 2.5.23 reported by Bruce Lilly in
9670 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
9671 * data/yacc.c (YYLTYPE, struct yyltype): Do not define unless
9672 locations are requested.
9673 (union yyalloc): Do not depend on YYLTYPE_IS_TRIVIAL unless
9674 locations are requested.
9675
9676 2002-12-12 Paul Eggert <eggert@twinsun.com>
9677
9678 Remove unportable casts and storage allocation tricks.
9679 While we're at it, remove almost all casts, since they
9680 usually aren't needed and are a sign of trouble.
9681
9682 * configure.ac (AC_CHECK_TYPES): Check for uintptr_t.
9683
9684 * src/derives.c (derives_compute): Do not subtract NTOKENS from
9685 the pointer DSET returned by malloc; this isn't portable.
9686 Instead, always use DSET[i - NTOKENS] rather than DSET[i].
9687 Similarly for DERIVES.
9688 * src/lalr.c (set_goto_map): Likewise, for GOTO_MAP and TEMP_MAP.
9689 * src/nullable.c (nullable_compute): Likewise, for RSETS and NULLABLE.
9690 * src/reduce.c (reduce_grammar_tables): Likewise, for nontermmap
9691
9692 * src/derives.c (derives_compute): Do not bother invoking
9693 int_of_rule_number, since rule numbers are integers.
9694
9695 * src/files.c (concat2, tr, compute_base_name): Use xmalloc (N)
9696 rather than XMALLOC (char, N).
9697
9698 * src/files.c (filename_split): Rewrite to avoid cast.
9699
9700 * src/gram.h (symbol_number_as_item_number,
9701 item_number_as_symbol_number, rule_number_as_item_number,
9702 item_number_as_rule_number):
9703 Now inline functions rather than macros, to avoid casts.
9704 * src/state.h (state_number_as_int): Likewise.
9705 * src/tables.c (state_number_to_vector_number,
9706 symbol_number_to_vector_number): Likewise.
9707
9708 * src/gram.h (int_of_rule_number): Remove; no longer used.
9709
9710 * src/lalr.c (add_lookback_edge): Use malloc rather than calloc,
9711 since the resulting storage is always stored into.
9712
9713 * src/main.c (alloca) [C_ALLOCA]: Add decl here, the only place
9714 where it's needed.
9715
9716 * src/muscle_tab.c (muscle_m4_output):
9717 Now inline. Return bool, not int.
9718 * src/state.c (state_compare): Likewise.
9719 * src/symtab.c (symbol_check_defined,
9720 symbol_check_alias_consistency, symbol_pack, symbol_translation,
9721 hash_compare_symbol, hash_symbol):
9722 Likewise.
9723 * src/uniqstr.c (uniqstr_print): Likewise.
9724 * src/muscle_tab.c (muscle_m4_output_processor):
9725 New function, to avoid casts.
9726 * src/state.c (state_comparator, stage_hasher): Likewise.
9727 * src/symtab.c (symbol_check_defined_processor,
9728 symbol_check_alias_consistency_processor, symbol_pack_processor,
9729 symbol_translation_processor, hash_symbol_comparator,
9730 hash_symbol_hasher): Likewise.
9731 * src/uniqstr.c (uniqstr_print_processor): Likewise.
9732 * src/muscle_tab.c (muscles_m4_output):
9733 Use new functions instead of casting old functions unportably.
9734 * src/state.c (state_hash_new): Likewise.
9735 * src/symtab.c (symbols_new, symbols_do, symbols_check_defined,
9736 symbols_token_translations_init):
9737 Likewise.
9738 * src/uniqstr.c (uniqstrs_new, hash_initialize, uniqstrs_do): Likewise.
9739
9740 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): Use long local
9741 var instead of casting to long, to avoid casts.
9742 (prepare_states): Use MALLOC rather than alloca, so that we don't
9743 have to worry about alloca.
9744 * src/state.c (state_hash_lookup): Likewise.
9745
9746 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>"'"): Use unsigned char
9747 local var instead of casting to unsigned char, to avoid casts.
9748
9749 * src/state.c (TRANSITIONS_ALLOC, ERRS_ALLOC, REDUCTIONS_ALLOC,
9750 STATE_ALLOC): Remove.
9751 (transitions_new, errs_new, reductions_new, state_new): Use malloc
9752 rather than calloc, and use offsetof to avoid allocating slightly
9753 too much storage.
9754 (state_new): Initialize all members.
9755
9756 * src/state.c (state_hash): Use unsigned accumulator, not signed.
9757
9758 * src/symtab.c (symbol_free): Remove; unused.
9759 (symbol_get): Remove cast in lhs of assignment.
9760 (symbols_do): Now static. Accept generic arguments, not
9761 hashing-related ones.
9762
9763 * src/symtab.h: (NUMBER_UNDEFINED): Remove unnecessary cast.
9764 (symbol_processor): Remove.
9765 (symbols_do): Remove decl; now static.
9766
9767 * src/system.h (alloca): Remove; decl no longer needed.
9768 (<stddef.h>): Include, for offsetof.
9769 (<inttypes.>, <stdint.h>): Include if available.
9770 (uintptr_t): New type, if system lacks it.
9771 (CALLOC, MALLOC, REALLOC): New macros.
9772 All uses of XCALLOC, XMALLOC, and XREALLOC changed to use these
9773 new macros.
9774
9775 * src/tables.c (table_size): Now int, to pacify GCC.
9776 (table_grow, table_ninf_remap): Use signed table size.
9777 (save_row): Don't bother initializing locals when not needed.
9778 (default_goto, goto_actions, pack_vector): Remove unnecessary casts.
9779 * src/uniqstr.c (hash_compare_uniqstr): Likewise.
9780
9781 * src/vcg.h: Correct misspellings.
9782
9783 * src/vcg_defaults.h (G_CMAX): Now INT_MAX.
9784
9785
9786 * src/getargs.c (getargs): Don't assume EOF == -1.
9787
9788 2002-12-09 Paul Eggert <eggert@twinsun.com>
9789
9790 Change identifier spellings to avoid collisions with names
9791 that are reserved by POSIX.
9792
9793 Don't use names ending in _t, since POSIX reserves them.
9794 For consistency, remove _e and _s endings -- they're weren't
9795 needed to remove ambiguity. All uses changed.
9796 * src/uniqstr.h (uniqstr): Renamed from uniqstr_t, which in
9797 turn was just renamed from struniq_t.
9798 * src/uniqstr.c (uniqstr_processor): Renamed from struniq_processor,
9799 which in turn was just renamed from struniq_processor_t.
9800 (hash_compare_uniqstr): Renamed from hash_compare_struniq, which
9801 in turn was renamed from hash_compare_struniq_t.
9802 * src/LR0.c (struct state_list): Renamed from struct state_list_s.
9803 (state_list): Renamed from state_list_t.
9804 * src/assoc.h (assoc): Renamed from assoc_t.
9805 * src/conflicts.c (enum conflict_resolution): Renamed from
9806 enum conflict_resolution_e.
9807 * src/derives.c (struct rule_list): Renamed from struct rule_list_s.
9808 (rule_list): Renamed from rule_list_t.
9809 * src/getargs.h (enum trace): Renamed from enum trace_e.
9810 (enum report): Renamed from enum report_e.
9811 * src/gram.h (item_number): Renamed from item_number_t.
9812 (rule_number): Renamed from rule_number_t.
9813 (struct rule_s): Remove the "rule_s" part; not used.
9814 (rule): Renamed from rule_t.
9815 (rule_filter): Renamed from rule_filter_t.
9816 * src/lalr.c (struct goto_list): Renamed from struct goto_list_s.
9817 (goto_list): Renamed from goto_list_t.
9818 * src/lalr.h (goto_number): Renamed from goto_number_t.
9819 * src/location.h (location): Renamed from location_t.
9820 * src/muscle_tab.c (muscle_entry): Renamed from muscle_entry_t,
9821 and moved here from:
9822 * src/muscle_tab.h (muscle_entry_t): here.
9823 * src/nullable.c (struct rule_list): Renamed from struct rule_list_s.
9824 (rule_list): Renamed from rule_list_t.
9825 * src/print_graph.c (static_graph): Renamed from graph.
9826 * src/reader.h (braced_code): Renamed from braced_code_t.
9827 Remove brace_code_e tag.
9828 * src/relation.h (relation_node): Renamed from relation_node_t.
9829 (relation_nodes): Renamed from relation_nodes_t.
9830 (relation): Renamed from relation_t.
9831 * src/state.h (state_number): Renamed from state_number_t.
9832 (struct state): Renamed from struct state_s.
9833 (state): Renamed from state_t.
9834 (transitions): Renamed from transitions_t. Unused (and
9835 misspelled) transtion_s tag removed.
9836 (errs): Renamed from errs_t. Unused errs_s tag removed.
9837 (reductions): Renamed from reductions_t. Unused tag
9838 reductions_s removed.
9839 * src/symlist.h (symbol_list): Renamed from symbol_list_t.
9840 (struct symbol_list): Renamed from struct symbol_list_s.
9841 * src/symtab.h (symbol_number): Renamed from symbol_number_t.
9842 (struct symbol): Renamed from struct symbol_s.
9843 (symbol): Renamed from symbol_t.
9844 * src/tables.c (vector_number): Renamed from vector_number_t.
9845 (action_number): Renamed from action_t.
9846 * src/tables.h (base_number): Renamed from base_t.
9847 * src/vcg.h (enum color): Renamed from enum color_e.
9848 (enum textmode): Renamed from enum textmode_e.
9849 (enum shape): Renamed from enum shape_e.
9850 (struct colorentry): Renamed from struct colorentry_s.
9851 (struct classname): Renamed from struct classname_s.
9852 (struct infoname): Renamed from struct infoname_s.
9853 (enum layoutalgorithm): Renamed from enum layoutalgorithm_e.
9854 (enum decision): Renamed from enum decision_e.
9855 (enum orientation): Renamed from enum orientation_e.
9856 (enum alignment): Renamed from enum alignment_e.
9857 (enum arrow_mode): Renamed from enum arrow_mode_e.
9858 (enum crossing_type): Renamed from enum crossing_type_e.
9859 (enum view): Renamed from enum view_e.
9860 (struct node): Renamed from struct node_s.
9861 (node): Renamed from node_t.
9862 (enum linestyle): Renamed from enum linestyle_e.
9863 (enum arrowstyle): Renamed from enum arrowstyle_e.
9864 (struct edge): Renamed from struct edge.
9865 (edge): Renamed from edge_t.
9866 (struct graph): Renamed from struct graph_s.
9867 (graph): Renamed from graph_t.
9868 * tests/calc.at (_AT_DATA_CALC_Y, Simple LALR Calculator):
9869 Rename value_t -> value.
9870 * tests/input.at (Torturing the Scanner): Rename value_t -> value,
9871 value_t_as_yystype -> value_as_yystype.
9872
9873 Don't include <errno.h> in the mainstream code, since it
9874 reserves E[A-Z0-9]* and we want to use symbols like 'EQUALS'.
9875 * lib/get-errno.c, lib/get-errno.h: New files.
9876 * lib/Makefile.am (libbison_a_SOURCES): Add get-errno.h,
9877 get-errno.c.
9878 * src/files.c (xfopen, xfclose): Use get_errno instead of errno.
9879 * src/output.c (output_skeleton): Likewise.
9880 * src/scan-gram.l (<INITIAL>{int}): Use set_errno and get_errno
9881 instead of errno.
9882 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>\\x[0-9abcdefABCDEF]+):
9883 Likewise.
9884 (handle_action_dollar, handle_action_at): Likewise.
9885 * src/system.h: Do not include <errno.h>.
9886 (TAB_EXT): Renamed from EXT_TAB.
9887 (OUTPUT_EXT): Renamed from EXT_OUTPUT.
9888
9889 Avoid str[a-z]*, since <string.h> reserves that name space.
9890 Change all instances of "struniq" in names to "uniqstr", and
9891 likewise for "STRUNIQ" and "UNIQSTR".
9892 * src/uniqstr.c: Renamed from src/struniq.c.
9893 * src/uniqstr.h: Renamed from src/struniq.h.
9894 * src/Makefile.am (bison_SOURCES): Adjust to these renamings.
9895 * src/files.c (strsuffix): Remove; unused.
9896 (concat2): Renamed from stringappend. Now static.
9897 * src/files.h (strsuffix, stringappend): Remove; unused.
9898 * src/parse-gram.y (<chars>): Renamed from <string>.
9899 (<uniqstr>): Renamed from <struniq>.
9900 * src/scan-gram.l (obstack_for_string): Renamed from string_obstack.
9901 * src/vcg.h (struct node_s.expand): Renamed from struct node_s.stretch.
9902 (struct graph_s.expand): Renamed from struct graph_s.stretch.
9903 * src/vcg_defaults.h (G_EXPAND): Renamed from G_STRETCH.
9904 (G_LONG_STRAIGHT_PHASE): Renamed from G_STRAIGHT_PHASE.
9905 (N_EXPAND): Renamed from N_STRETCH.
9906
9907 Avoid *_MAX and *_MIN, since <limits.h> reserves that name space.
9908 * data/yacc.c (YYSTACK_GAP_MAXIMUM): Renamed from YYSTACK_GAP_MAX.
9909 * src/gram.h (ITEM_NUMBER_MAX, ITEM_NUMBER_MIN, RULE_NUMBER_MAX):
9910 Remove; unused.
9911 * src/lalr.h (GOTO_NUMBER_MAXIMUM): Renamed from GOTO_NUMBER_MAX.
9912 * src/state.h (STATE_NUMBER_MAXIMUM): Renamed from STATE_NUMBER_MAX.
9913 * src/symtab.h (SYMBOL_NUMBER_MAXIMUM): Renamed from SYMBOL_NUMBER_MAX.
9914 * src/tables.c (VECTOR_NUMBER_MAX, VECTOR_NUMBER_MIN): Remove; unused.
9915 (BASE_MAXIMUM): Renamed from BASE_MAX.
9916 (BASE_MINIMUM): Renamed from BASE_MIN.
9917 (ACTION_MAX): Remove; unused.
9918 (ACTION_NUMBER_MINIMUM): Renamed from ACTION_MIN.
9919 Unnecessary casts removed from above defines.
9920
9921
9922 Fix misspelling in names.
9923 * src/vcg.h (enum_alignment_e): Renamed from enum_alignement_e.
9924 * src/vcg_defaults.h (G_NODE_ALIGNMENT): Renamed from
9925 G_NODE_ALIGNEMENT.
9926
9927
9928 * lib/timevar.c (timevar_report): Renamed from time_report,
9929 for consistency with other names.
9930 * lib/timevar.h (timevar_report): New decl.
9931 * src/system.h (time_report): Remove; decl is now in lib/timevar.h.
9932
9933
9934 Sort include-file uses.
9935
9936 Reorder all include files under src to be in the order "system.h".
9937 then the ../lib include files in angle brackets (alphabetized),
9938 then the . include files in double-quotes (alphabetized). Fix
9939 dependency breakages encountered in this process, as follows:
9940 * src/closure.h, src/derives.h, src/state.h: Include "gram.h".
9941 * src/complain.c: Don't include stdlib.h, string.h _LIBC stuff.
9942 * src/state.h: Include "symtab.h".
9943
9944 2002-12-08 Paul Eggert <eggert@twinsun.com>
9945
9946 * data/glr.c, data/lalr1.cc, data/yacc.c: Do not use __file__,
9947 since this causes problems when __file__ contains character
9948 sequences like "@" that are treated specially by src/scan-skel.l.
9949 Instead, just use the file's basename. This fixes the bug
9950 reported by Martin Mokrejs in
9951 <http://lists.gnu.org/archive/html/bug-bison/2002-12/msg00007.html>.
9952
9953 2002-12-06 Paul Eggert <eggert@twinsun.com>
9954
9955 Add support for rules that do not have trailing semicolons, as
9956 POSIX requires. Improve the quality of locations in Bison
9957 diagnostics.
9958
9959 * src/location.c: Include <quotearg.h>.
9960 (empty_location): Now const.
9961 (location_print): New function. Follow the recommendation of the
9962 GNU Coding Standards for locations that span file boundaries.
9963 * src/location.h: Do not include <quotearg.h>; no longer needed.
9964 (boundary): New type.
9965 (location_t): Use it. This allows locations to span file boundaries.
9966 All member uses changed: file -> start.file or end.file (as needed),
9967 first_line -> start.line, first_column -> start.column,
9968 last_line -> end.line, last_column -> end.column.
9969 (equal_boundaries): New function.
9970 (LOCATION_RESET, LOCATION_STEP): Remove.
9971 (LOCATION_PRINT): Remove. All callers changed to use location_print.
9972 (empty_location): Now const.
9973 (location_print): New decl.
9974 * src/parse-gram.y (lloc_default): New function, which handles
9975 empty locations more accurately.
9976 (YYLLOC_DEFAULT): Use it.
9977 (%token COLON): Remove.
9978 (%token ID_COLON): New token.
9979 (rules): Use it.
9980 (declarations, rules): Remove trailing semicolon.
9981 (declaration, rules_or_grammar_declaration):
9982 Allow empty (";") declaration.
9983 (symbol_def): Remove empty actions; no longer needed.
9984 (rules_or_grammar_declaration): Remove trailing semicolon.
9985 (semi_colon.opt): Remove.
9986 * src/reader.h: Include location.h.
9987 (scanner_cursor): New decl.
9988 * src/reduce.c (nonterminals_reduce): Use warn_at rather than
9989 rolling our own.
9990 * src/scan-gram.l (YY_USER_INIT): Initialize scanner_cursor instead
9991 of *loc.
9992 (STEP): Remove. No longer needed, now that adjust_location does
9993 the work. All uses removed.
9994 (scanner_cursor): New var.
9995 (adjust_location): Renamed from extend_location. It now sets
9996 *loc and adjusts the scanner cursor. All uses changed.
9997 Don't bother testing for CR.
9998 (handle_syncline): Remove location arg; now updates scanner cursor.
9999 All callers changed.
10000 (unexpected_end_of_file): Now accepts start boundary of token or
10001 comment, not location. All callers changed. Update scanner cursor,
10002 not the location.
10003 (SC_AFTER_IDENTIFIER): New state.
10004 (context_state): Renamed from c_context. All uses changed.
10005 (id_loc, code_start, token_start): New local vars.
10006 (<INITIAL,SC_AFTER_IDENTIFIER>): New initial context. Move all
10007 processing of Yacc white space and equivalents here.
10008 (<INITIAL>{id}): Save id_loc. Begin state SC_AFTER_IDENTIFIER
10009 instead of returning ID immediately, since we need to search for
10010 a subsequent colon.
10011 (<INITIAL>"'", "\""): Save token_start.
10012 (<INITIAL>"%{", "{", "%%"): Save code_start.
10013 (<SC_AFTER_IDENTIFIER>): New state, looking for a colon.
10014 (<SC_YACC_COMMENT>, <SC_COMMENT>, <SC_LINE_COMMENT>):
10015 BEGIN context_state at end, not INITIAL.
10016 (<SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'",
10017 <SC_BRACED_CODE>"}", <SC_PROLOGUE>"%}", <SC_EPILOGUE><<EOF>>):
10018 Return correct token start.
10019 (<SC_BRACED_CODE,SC_PROLOGUE,SC_EPILOGUE>): Save start boundary when
10020 the start of a character, string or multiline comment is found.
10021 * tests/conflicts.at (S/R in initial, Defaulted Conflicted
10022 Reduction): Adjust reported locations to match the more-precise
10023 results now expected.
10024 * tests/input.at (Invalid $n, Invalid @n, Type Clashes): Likewise.
10025 * tests/reduce.at (Useless Rules, Reduced Automaton,
10026 Underivable Rules): Likewise.
10027 * tests/regression.at (Invalid inputs): No longer `expecting ";"
10028 or "|"' now that so many other tokens are allowed by the new grammar.
10029
10030 * src/complain.h (current_file): Remove duplicate decl;
10031 current_file is now owned by files.h.
10032 * src/complain.c, src/scan-gram.l: Include files.h.
10033
10034 2002-12-06 Paul Eggert <eggert@twinsun.com>
10035
10036 * data/glr.c (yy_reduce_print): Don't assume that yyrline[yyrule]
10037 promotes to int; it might be unsigned int.
10038 * data/yacc.c (yy_reduce_print): Likewise.
10039
10040 * doc/bison.texinfo (Table of Symbols): YYERROR_VERBOSE should
10041 be #defined in the prologue, not in the Bison declarations.
10042 This fixes Debian Bug 102878, reported by Shaul Karl.
10043
10044 2002-12-02 Paul Eggert <eggert@twinsun.com>
10045
10046 * configure.ac (AC_REPLACE_FUNCS): Add strtoul.
10047 * lib/strtoul.c: New file, from gnulib.
10048 This fixes a porting bug reported by Peter Klein in
10049 <http://lists.gnu.org/archive/html/bug-bison/2002-12/msg00000.html>.
10050
10051 2002-11-30 Paul Eggert <eggert@twinsun.com>
10052
10053 * src/scan-gram.l (no_cr_read, extend_location): Move to epilogue,
10054 and put only a forward declaration in the prologue. This is for
10055 consistency with the other scanner helper functions.
10056
10057 Type clashes now generate warnings, not errors, since it
10058 appears that POSIX may allow some grammars with type clashes.
10059 * src/reader.c (grammar_current_rule_check): Warn about
10060 type clashes instead of complaining.
10061 * tests/input.at (Type Clashes): Expect warnings, not complaints.
10062
10063 Add Yacc library, since POSIX requires it.
10064 * doc/bison.texinfo (Yacc Library): New node. Regenerate top menu.
10065 * lib/Makefile.am (lib_LIBRARIES, liby_a_SOURCES): New macros.
10066 * lib/main.c, lib/yyerror.c: New files.
10067
10068 gram_error can be static; it need not be extern.
10069 * src/reader.h (gram_error): Remove decl.
10070 * src/parse-gram.y (gram_error): Now static. Add static decl.
10071 (print_token_value): Omit parameter names from forward decl,
10072 for consistency.
10073
10074 2002-11-29 Paul Eggert <eggert@twinsun.com>
10075
10076 * doc/bison.texinfo: Emphasize that yylex and yyerror must
10077 be declared before being used. E.g., one should typically
10078 declare them in the prologue. Use GNU coding style in examples.
10079 Put "const" consistently after the type it modifies. Mention
10080 that C99 supports "inline". Mention that yyerror traditionally
10081 returns "int".
10082
10083 %parse-param and %lex-param now take just one argument, the
10084 declaration; the argument name is deduced from the declaration.
10085
10086 * doc/bison.texinfo (Parser Function, Pure Calling, Error
10087 Reporting, Table of Symbols): Document this.
10088 * src/parse-gram.y (add_param): New function.
10089 (COMMA): Remove.
10090 (declaration): Implement new rule for %parse-param and %lex-param.
10091 * src/scan-gram.l: "," now elicits a warning, rather than being
10092 a token; this is more compatible with byacc.
10093 * tests/calc.at (Simple LALR Calculator): Adopt new convention.
10094
10095 2002-11-27 Paul Eggert <eggert@twinsun.com>
10096
10097 Rename identifiers to avoid real and potential collisions.
10098
10099 * data/c.m4 (b4_yysymprint_generate): yyout -> yyoutput,
10100 to avoid collision with lex macro described by Bruce Lilly in
10101 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
10102 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
10103 * doc/bison.texinfo (Prologue, Tracing): yyprint -> print_token_value.
10104 * src/parse-gram.y (print_token_value): Renamed from yyprint.
10105 All uses changed.
10106 (YYPARSE_PARAM, YYLEX_PARAM, yycontrol): Remove. All uses changed.
10107 The name "yycontrol" violates the name space rules, and this stuff
10108 wasn't being used anyway.
10109 (input): Remove action; this stuff wasn't being used.
10110 (gram_error): Rename local variable yylloc -> loc.
10111 * src/reader.h (struct gram_control_s, gram_control_t): Remove.
10112 (YY_DECL): Don't use "yy" at start of local variables.
10113 All uses changed, e.g., yylloc -> loc.
10114 * src/scan-gram.l (STEP): Renamed from YY_STEP. All uses changed.
10115 (STRING_GROW): Renamed from YY_OBS_GROW. All uses changed.
10116 (STRING_FINISH): Renamed from YY_OBS_FINISH. All uses changed.
10117 (STRING_FREE): Renamed from YY_OBS_FREE. All uses changed.
10118
10119 * src/parse-gram.y (gram_error): loc is now const *.
10120 * src/reader.h (gram_error): Likewise.
10121
10122 2002-11-24 Paul Eggert <eggert@twinsun.com>
10123
10124 Version 1.75c.
10125
10126 * tests/actions.at (Actions after errors): Use an output format
10127 more similar to that of the Printers and Destructors test.
10128 Test the position of the ';' token too.
10129 (Printers and Destructors): Likewise.
10130 (Printers and Destructors: %glr-parser): Remove for now, to avoid
10131 unnecessarily alarming people when the test fails.
10132
10133 * data/yacc.c (yyerrlab1): Move this label down, so that the
10134 parser does not discard the lookahead token if the user code
10135 invokes YYERROR. This change is required for POSIX conformance.
10136
10137 * lib/error.c: Sync with gnulib.
10138
10139 2002-11-22 Paul Eggert <eggert@twinsun.com>
10140
10141 * lib/quotearg.c, lib/quotearg.h: Sync with gnulib.
10142 * lib/mbswidth.c, lib/mbswidth.h: Likewise.
10143 * lib/xmalloc.c: Likewise.
10144
10145 2002-11-20 Paul Eggert <eggert@twinsun.com>
10146
10147 * lib/argmatch.c, lib/argmatch.h: Sync with gnulib.
10148
10149 2002-11-20 Paul Eggert <eggert@twinsun.com>
10150
10151 Avoid use of <assert.h>, as the GNU Coding Standards hint that one
10152 should use `if (! x) abort ();' rather than `assert (x);', and
10153 anyway it's one less thing to worry about configuring.
10154
10155 * data/glr.c, lib/hash.c, src/system.h: Do not include <assert.h>.
10156 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise,
10157 and replace all instances of assert with abort.
10158 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
10159 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Likewise.
10160
10161 * data/glr.c (yydoAction, yyglrReduce, yysplitStack, yyresolveStates,
10162 yyresolveAction, yyprocessOneStack): Use abort rather than assert.
10163 * lib/hash.c (hash_lookup, hash_get_first, hash_get_next,
10164 hash_find_entry, hash_rehash, hash_insert): Likewise.
10165 * src/conflicts.c (resolve_sr_conflict): Likewise.
10166 * src/lalr.c (set_goto_map, map_goto): Likewise.
10167 * src/nullable.c (nullable_compute): Likewise.
10168 * src/output.c (prepare_rules, token_definitions_output): Likewise.
10169 * src/reader.c (packgram, reader): Likewise.
10170 * src/state.c (state_new, state_free, state_transitions_set,
10171 state_reduction_find): Likewise.
10172 * src/symtab.c (symbol_user_token_number_set, symbol_make_alias,
10173 symbol_pack): Likewise.
10174 * src/tables.c (conflict_row, pack_vector): Likewise.
10175 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
10176 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
10177 get_node_alignement_str, get_arrow_mode_str, get_crossing_type_str,
10178 get_view_str, get_linestyle_str, get_arrowstyle_str): Likewise.
10179
10180 * lib/argmatch.h (ARRAY_CARDINALITY): Do not bother to #undef.
10181 (ARGMATCH_CONSTRAINT): New macro.
10182 (ARGMATCH_ASSERT): Use it.
10183
10184 * src/system.h (verify): New macro.
10185 * src/getargs.c (trace_argmatch, report_argmatch): Use verify
10186 rather than assert.
10187 * src/tables.c (tables_generate): Likewise.
10188
10189 * src/struniq.c (struniq_assert): Now returns void, and aborts
10190 if the assertion is false.
10191 (struniq_assert_p): Remove.
10192 * src/struniq.h: Likewise.
10193
10194 2002-11-18 Paul Eggert <eggert@twinsun.com>
10195
10196 * data/glr.c (yygetLRActions): Replace `yyindex' with
10197 `yytable[yyindex]' to fix typo introduced in my 2002-11-09 patch.
10198 This fixes the regression with Sun ONE Studio 7 cc that I reported in
10199 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00077.html>.
10200
10201 2002-11-18 Akim Demaille <akim@epita.fr>
10202
10203 * doc/bison.texinfo (Tracing): `yyprint' shouldn't prepend a
10204 space.
10205 From Tim Van Holder.
10206
10207 2002-11-17 Paul Eggert <eggert@twinsun.com>
10208
10209 Pacify Sun ONE Studio 7 lint. Also, rename "ParseError"
10210 to "SyntaxError" for consistency with my 2002-11-15 change.
10211
10212 * data/glr.c (YYDPRINTF, YYDSYMPRINT, YYDSYMPRINTF) [!YYDEBUG]: Do
10213 not define to {}, since this breaks the common use of `YYDPRINTF
10214 ((...));' if a single statement is desired (e.g. before `else').
10215 Work around GCC warnings by surrounding corresponding calls with
10216 {} if needed.
10217 (yyhasResolvedValue): Remove unused function.
10218 (yymergeOptionSets, yyresolvStack): Use `continue;' for empty
10219 loop body.
10220 (yyreportSyntaxError): Renamed from yyreportParseError.
10221 (yyrecoverSyntaxError): Renamed from yyrecoverParseError.
10222 All uses changed.
10223 * tests/calc.at (_AT_DATA_CALC_Y): Make vars static instead of
10224 extern when possible. Remove unused initializations.
10225
10226 2002-11-16 Akim Demaille <akim@epita.fr>
10227
10228 Augment the similarity between GLR and LALR traces.
10229
10230 * data/yacc.c (yy_stack_print, YY_STACK_PRINT, yy_reduce_print)
10231 (YY_REDUCE_PRINT): New.
10232 (yyparse): Use them.
10233 * data/glr.c (yy_reduce_print): Use YYFPRINTF, no need for
10234 YYDPRINT here.
10235 (yyglrReduce, yyrecoverParseError, yyparse): Don't report the
10236 state reached after the reduction/recovery, since...
10237 (yyparse, yyprocessOneStack): Report the state we are entering in.
10238
10239 2002-11-16 Akim Demaille <akim@epita.fr>
10240
10241 * src/getargs.h, src/getargs.c (trace_e, trace_args, trace_types):
10242 Add support for --trace=skeleton.
10243 * src/scan-skel.l: %option debug.
10244 Scan strings of non-@ or \n instead of character by character.
10245 (scan_skel): Handle trace_skeleton.
10246 (QPUTS): New.
10247 (@output_parser_name@, @output_header_name@): ``Restore'' their
10248 support (used to be M4 macros).
10249 * data/yacc.c: Quote larger chunks, a la glr.c.
10250 * data/lalr1.cc: Likewise.
10251 The header guards are no longer available, so use some other
10252 string than `YYLSP_NEEDED'.
10253
10254 2002-11-16 Akim Demaille <akim@epita.fr>
10255
10256 Make the ``Printers and Destructors'' test more verbose, taking
10257 `yacc.c''s behavior as (possibly wrong) reference.
10258
10259 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use printf
10260 instead of fprint on stdout.
10261 Set and report the last_line of the symbols.
10262 Consistently display values and locations.
10263
10264 2002-11-16 Paul Eggert <eggert@twinsun.com>
10265
10266 * data/yacc.c: Avoid over-quoting of __line__ and __file__.
10267
10268 2002-11-15 Paul Eggert <eggert@twinsun.com>
10269
10270 * tests/actions.at (Actions after errors): New test case.
10271
10272 * data/glr.c, data/lalr1.cc, data/yacc.cc, doc/bison.texinfo,
10273 src/conflicts.c, src/parse-gram.y, src/tables.c, src/tables.h,
10274 tests/action.at, tests/calc.at, tests/conflicts.at,
10275 tests/cxx-type.at, tests/regression.at:
10276 "parse error" -> "syntax error" for POSIX compatibility.
10277 "parsing stack overflow..." -> "parser stack overflow" so
10278 that code matches Bison documentation.
10279
10280 2002-11-15 Akim Demaille <akim@epita.fr>
10281
10282 * src/parse-gram.y (declaration): Have %parse-param and %lex-param
10283 take two BRACED_CODE, not two string_content.
10284 Free the scanner's obstack when we are done.
10285 (code_content): New.
10286 * tests/calc.at: Adjust.
10287 * doc/bison.texinfo: Adjust.
10288 Also, make sure to include the `,' for these declarations.
10289
10290 2002-11-15 Tim Van Holder <tim.van.holder@pandora.be>
10291
10292 * m4/prereq.m4: Removed the commented jm_PREREQ_HASH
10293 definition; avoids potential autoreconf problems.
10294
10295 2002-11-15 Akim Demaille <akim@epita.fr>
10296
10297 Always check the value returned by yyparse.
10298
10299 * tests/calc.at (_AT_DATA_CALC_Y): Have `main' exit with the value
10300 returned by yyparse.
10301 (_AT_CHECK_CALC_ERROR): Take the expected exit value as argument.
10302 Adjust calls.
10303 * tests/glr-regr1.at (glr-regr1.y): Have `main' exit with the value
10304 returned by yyparse.
10305
10306 2002-11-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
10307
10308 * data/glr.c (yyFail): Always set yyerrflag. Corrects regression
10309 on input.at test.
10310
10311 2002-11-14 Paul Eggert <eggert@twinsun.com>
10312
10313 * src/output.c (output_skeleton): Call xfopen instead of
10314 duplicating xfopen's body.
10315
10316 Fix bugs reported by Nelson H. F. Beebe in
10317 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00078.html>.
10318
10319 * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that
10320 "$CC -E foo.h" is allowed, as this doesn't work with the Portland
10321 Group compiler. Instead, use "$CC -E bar.c". Include the .h
10322 file twice in the grammar, as an extra check.
10323
10324 * tests/input.at (Torturing the Scanner): Surround the
10325 backslash-newline tests with "#if 0", to make it less likely that
10326 we'll run into compiler bugs. Bring back solitary \ inside
10327 comment, but add a closing comment to work around HP C bug. Don't
10328 test backslash-newline in C character constant.
10329
10330 2002-11-14 Akim Demaille <akim@epita.fr>
10331
10332 * tests/synclines.at (AT_SYNCLINES_COMPILE): Ignore the exit
10333 status of the compiler.
10334 Calling `exit 1' is no longer needed.
10335 Reported by Nelson H. F. Beebe.
10336
10337 2002-11-14 Akim Demaille <akim@epita.fr>
10338
10339 * tests/atlocal.in (CPPFLAGS): We have config.h.
10340 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR):
10341 New.
10342 * tests/actions.at, tests/calc.at, tests/conflicts.at,
10343 * tests/cxx-type.at, tests/glr-regr1.at, tests/headers.at,
10344 * tests/regression.at, tests/torture.at: Use them for all the
10345 grammars that are to be compiled.
10346 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Rename as...
10347 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): this.
10348 * doc/bison.texinfo (GLR Parsers): Document `inline'.
10349
10350 2002-11-14 Akim Demaille <akim@epita.fr>
10351
10352 * doc/bison.texinfo: Various formatting changes (alignments in
10353 samples, additional @group/@end group, GCS in samples.
10354 Use @deffn instead of simple @table to define the directives,
10355 macros, variables etc.
10356
10357 2002-11-13 Paul Eggert <eggert@twinsun.com>
10358
10359 Fix some bugs reported by Albert Chin-A-Young in
10360 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00066.html>.
10361
10362 * tests/input.at (Torturing the Scanner): Don't invoke "cc a.c b.c
10363 -o c"; the HP C compiler chatters during compilation.
10364 Instead, invoke "cc -c a.c -o a.o; cc -c b.c -o b.o; cc a.o b.o -o c".
10365 * tests/headers.at (export YYLTYPE): Likewise.
10366
10367 * tests/input.at (Torturing the Scanner): Remove lines containing
10368 solitary backslashes, as they tickle a bug in the HP C compiler.
10369
10370 * tests/glr-regr1.at (Badly Collapsed GLR States): Avoid //
10371 comments, since they're not portable. Use GNU coding style.
10372
10373 2002-11-13 Akim Demaille <akim@epita.fr>
10374
10375 * data/yacc.c: Leave bigger chunks of quoted text.
10376 (YYDSYMPRINTF): New.
10377 Use it to report symbol activities.
10378 * data/glr.c (YYDSYMPRINTF): New.
10379 Use it.
10380
10381 2002-11-12 Paul Eggert <eggert@twinsun.com>
10382
10383 Version 1.75b.
10384
10385 * data/glr.c (yydoAction): Return YYRESULTTAG, not int.
10386 (yyglrReduce): Return yyok, not 0.
10387 This should avoid the enumerated-type warnings reported
10388 by Nelson H. F. Beebe in
10389 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00057.html>.
10390
10391 * lib/bbitset.h (BITSET_INLINE): Remove.
10392 * lib/bitset.h [! BITSET_INLINE]: Remove.
10393 (bitset_set, bitset_reset, bitset_test): Rename local vars
10394 to avoid shadowing warnings by GCC.
10395
10396 * data/glr.c (inline): Remove #define. It's the user's
10397 responsibility to #define it away, just like 'const'.
10398 This fixes one of the bugs reported by Nelson H. F. Beebe in
10399 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00058.html>.
10400
10401 * Makefile.maint (po-check): Scan .l and .y files instead of the
10402 .c and the .h files that they generate. This fixes the bug
10403 reported by Tim Van Holder in:
10404 <http://lists.gnu.org/archive/html/bison-patches/2002-11/msg00062.html>
10405 Look for N_ as well as for _. Try to avoid matching #define for
10406 N_ and _.
10407 * po/POTFILES.in: Remove src/parse-gram.c, src/scan-gram.c,
10408 src/system.h. Add src/parse-gram.y, src/scan-gram.l.
10409 * src/scan-gram.l: Revamp regular expressions so that " and '
10410 do not confuse xgettext.
10411
10412 * src/struniq.h (struniq_new): Do not declare the return type
10413 to be 'const'; this violates the C standard.
10414 * src/struniq.c (struniq_new): Likewise.
10415
10416 2002-11-12 Albert Chin-A-Young <china@thewrittenword.com>
10417
10418 * src/Makefile.am (LDADD): Link $(LIBINTL) last to avoid the
10419 duplicate definition of optind on Tru64 UNIX 4.0D with the Compaq
10420 linker.
10421
10422 2002-11-12 Akim Demaille <akim@epita.fr>
10423
10424 * Makefile.maint: Sync with Autoconf:
10425 (local_updates): New.
10426
10427 2002-11-12 Akim Demaille <akim@epita.fr>
10428
10429 * po/POTFILES.in (src/lalr.c, src/state.c): Remove
10430
10431 2002-11-12 Akim Demaille <akim@epita.fr>
10432
10433 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Display the
10434 locations.
10435
10436 2002-11-12 Akim Demaille <akim@epita.fr>
10437
10438 * data/c.m4 (b4_yysymprint_generate): Pass *yyvaluep to YYPRINT,
10439 not yyvalue.
10440
10441 2002-11-12 Akim Demaille <akim@epita.fr>
10442
10443 * tests/actions.at (AT_CHECK_PRINTER_AND_DESTRUCTOR): New.
10444 Use it to test the GLR parser.
10445
10446 2002-11-12 Akim Demaille <akim@epita.fr>
10447
10448 * tests/regression.at (input.y): s/YYEOF/MYEOF/, as the skeleton
10449 defines it.
10450 * data/glr.c (yystos): New.
10451 (b4_yysymprint_generate, b4_yydestruct_generate): Invoke.
10452 (YYDSYMPRINT): New.
10453 (yyval): Don't define it, it is handled via M4.
10454 (yyrecoverParseError): Free verbosely the discarded symbols.
10455 * data/yacc.c (yysymprint): Remove, rather...
10456 (b4_yysymprint_generate): invoke.
10457 * data/c.m4 (b4_yysymprint_generate): New.
10458 Accept pointers as arguments, as opposed to the version from
10459 yacc.c.
10460 (b4_yydestruct_generate): Likewise.
10461 * tests/cations.at (Printers and Destructors): Use Bison directives
10462 instead of CPP macros.
10463 Don't rely on internal details.
10464
10465 2002-11-12 Akim Demaille <akim@epita.fr>
10466
10467 * data/c.m4 (b4_yydestruct_generate, b4_symbol_actions): New.
10468 * data/yacc.c: Rename yychar1 as yytoken, as in glr.c.
10469 Don't work on yychar (i.e., do set it to YYEMPTY, don't match
10470 it against YYEMPTY and so forth), work on yytoken (i.e., set
10471 it to YYEMPTY etc.).
10472 (yydestruct): Replace with a b4_yydestruct_generate invocation.
10473 (b4_symbol_actions): Remove.
10474 * data/glr.c (YYTRANSLATE): As for yacc.c, if negative, it stands
10475 for 0, end-of-input.
10476
10477 2002-11-12 Akim Demaille <akim@epita.fr>
10478
10479 * doc/bison.texinfo (Destructor Decl): New.
10480
10481 2002-11-12 Akim Demaille <akim@epita.fr>
10482
10483 * src/tables.c (tables_generate): Use free for pointers that
10484 cannot be NULL, not XFREE.
10485 (pack_vector): Use assert, not fatal, for bound violations.
10486 * src/state.c (state_new): Likewise.
10487 * src/reader.c (reader): Likewise.
10488 * src/lalr.c (set_goto_map): Likewise.
10489 * src/location.h (LOCATION_PRINT): If first_line is 0, just issue
10490 the file name.
10491
10492 2002-11-12 Akim Demaille <akim@epita.fr>
10493
10494 * src/scan-gram.l, src/reader.h (scanner_last_string_free):
10495 Restore.
10496 * src/scan-gram.l (last_string): Is global to the file, not to
10497 yylex.
10498 * src/parse-gram.y (input): Don't append the epilogue here,
10499 (epilogue.opt): do it here, and free the scanner's obstack.
10500 * src/reader.c (epilogue_set): Rename as...
10501 (epilogue_augment): this.
10502 * data/c.m4 (b4_epilogue): Defaults to empty.
10503
10504 2002-11-12 Akim Demaille <akim@epita.fr>
10505
10506 * src/getargs.c (long_options): Remove duplicates.
10507 * src/vmsgetargs.c, src/build.com, src/bison.cld, src/vmshlp.mar:
10508 Remove.
10509 * doc/bison.rnh: Remove.
10510 * doc/bison.texinfo (VMS Invocation): Remove.
10511
10512 2002-11-12 Akim Demaille <akim@epita.fr>
10513
10514 * src/struniq.h, src/struniq.c (struniq_t): Is const.
10515 (STRUNIQ_EQ, struniq_assert, struniq_assert_p): New.
10516
10517 Use struniq for symbols.
10518
10519 * src/symtab.h (symbol_t): The tag member is a struniq.
10520 (symbol_type_set): Adjust.
10521 * src/symtab.c (symbol_new): Takes a struniq.
10522 (symbol_free): Don't free the tag member.
10523 (hash_compare_symbol_t, hash_symbol_t): Rename as...
10524 (hash_compare_symbol, hash_symbol): these.
10525 Use the fact that tags as struniqs.
10526 (symbol_get): Use struniq_new.
10527 * src/symlist.h, src/symlist.c (symbol_list_n_type_name_get):
10528 Returns a strniq.
10529 * src/reader.h (merger_list, grammar_currentmerge_set): The name
10530 and type members are struniqs.
10531 * src/reader.c (get_merge_function)
10532 (grammar_current_rule_merge_set): Adjust.
10533 (TYPE, current_type): Are struniq.
10534
10535 Use struniq for file names.
10536
10537 * src/files.h, src/files.c (infile): Split into...
10538 (grammar_file, current_file): these.
10539 * src/scan-gram.c (YY_USER_INIT, handle_syncline): Adjust.
10540 * src/reduce.c (reduce_print): Likewise.
10541 * src/getargs.c (getargs): Likewise.
10542 * src/complain.h, src/complain.c: Likewise.
10543 * src/main.c (main): Call struniqs_new early enough to use it for
10544 file names.
10545 Don't free the input file name.
10546
10547 2002-11-12 Akim Demaille <akim@epita.fr>
10548
10549 * src/symtab.c (symbol_free): Remove dead deactivated code:
10550 type_name are properly removed.
10551 Don't use XFREE to free items that cannot be NULL.
10552 * src/struniq.h, src/struniq.c: New.
10553 * src/main.c (main): Initialize/free struniqs.
10554 * src/parse-gram.y (%union): Add astruniq member.
10555 (yyprint): Adjust.
10556 * src/scan-gram.l (<{tag}>): Return a struniq.
10557 Free the obstack bit that used to store it.
10558 * src/symtab.h (symbol_t): The 'type_name' member is a struniq.
10559
10560 2002-11-11 Paul Eggert <eggert@twinsun.com>
10561
10562 Revamp to fix many (but not all) of the C- and M4-related quoting
10563 problems. Among other things, this fixes the Bison bug reported
10564 by Jan Hubicka when processing the Bash grammar; see:
10565 <http://lists.gnu.org/archive/html/bison-patches/2002-11/msg00039.html>
10566
10567 Use new @ escapes consistently. Represent brackets with @{ and @}
10568 rather than @<:@ and @:>@, since this works a bit better with dumb
10569 editors like vi. Represent @ with @@, since @ is now consistently
10570 an escape. Use @oline@ and @ofile@ rather than __oline__ and
10571 __ofile__, to avoid unexpected expansions. Similarly, use @output
10572 rather than #output.
10573
10574 * data/c.m4 (b4_copyright): Omit file name from comment, since
10575 the file name could contain "*/".
10576 (b4_synclines_flag): Don't quote the 2nd argument; it should already
10577 be quoted. All uses changed.
10578
10579 * data/glr.c: Use new @ escapes consistently.
10580 (b4_input_suffix, b4_output_parser_suffix, b4_output_parser_name,
10581 b4_output_header_suffix, b4_output_header_name, b4_header_guard):
10582 Remove, since they couldn't handle arbitrary characters in file
10583 names.
10584 * data/lalr1.cc: Likewise.
10585 * data/yacc.c: Likewise.
10586
10587 * src/files.c (output_infix): Remove; all uses removed.
10588 * src/files.h: Likewise.
10589
10590 * data/glr.c: Remove use of "#ifdef b4_header_guard", since it
10591 mishandled funny characters in file names, and anyway it isn't
10592 needed any more.
10593 * data/yacc.c: Likewise.
10594 * data/lalr1.cc: Use YYSLP_NEEDED instead of b4_header_guard.
10595
10596 * data/glr.c (YYSTYPE_IS_TRIVIAL): Define when the .h file would.
10597 * data/yacc.c: Likewise.
10598
10599 * src/muscle_tab.c: Include quotearg.h, since we need to quote C
10600 strings now.
10601 (muscle_init): Quote filename as a C string.
10602 * src/muscle_tab.h (MUSCLE_GROW_STRING_PAIR): Remove; unused.
10603 (MUSCLE_OBSTACK_SGROW, MUSCLE_INSERT_C_STRING): New macros.
10604 * src/output.c (escaped_file_name_output): New function.
10605 (prepare_symbols): Quote tokens for M4.
10606 (prepare): Don't insert output_infix, output_prefix,
10607 output_parser_name, output_header_name; this is now down by scan-skel.
10608 Insert skeleton as a C string.
10609
10610 * src/output.c (user_actions_output, symbol_destructors_output,
10611 symbol_printers_output): Quote filenames for C and M4.
10612 * src/reader.c (prologue_augment, epilogue_set): Likewise.
10613
10614 * src/scan-gram.l (<SC_CHARACTER>): Don't worry about any backslash
10615 escapes other than \\ and \'; this simplifies the code.
10616 (<SC_STRING>): Likewise, for \\ and \".
10617 (<SC_COMMENT,SC_LINE_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,
10618 SC_PROLOGUE,SC_EPILOGUE>): Escape $ and @, too.
10619 Use new escapes @{ and @} for [ and ].
10620
10621 * src/scan-skel.l (yylineno, yyoutname): Remove static vars, replacing
10622 them with auto vars.
10623 Switch to new escape scheme, where @ is the escape character uniformly.
10624 Abort if a stray escape character is found. Avoid unbounded input
10625 buffer when parsing non-escaped text.
10626
10627 * tests/input.at (Torturing the Scanner): Add tests that @oline@,
10628 __oline__, #output, $@, and @{ do not have unintended meanings.
10629
10630 2002-11-09 Paul Eggert <eggert@twinsun.com>
10631
10632 Fix the test failure due to GCC warnings described in
10633 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00000.html>.
10634 * data/glr.c (yyis_pact_ninf, yyis_table_ninf): New macros, which
10635 evaluate to 0 if it's impossible for NINF to be in the respective
10636 table.
10637 (yygetLRActions, yyrecoverParseError): Use them.
10638
10639 * src/scan-gram.l (unexpected_end_of_file): Fix bug: columns were
10640 counted in the token inserted at end of file. Now takes
10641 location_t *, not location_t, so that the location can be
10642 adjusted. All uses changed.
10643
10644 * tests/regression.at (Invalid inputs): Adjust wording in
10645 diagnostic to match the new behavior.
10646
10647 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR,
10648 AT_DATA_HORIZONTAL_GRAMMAR, AT_DATA_LOOKAHEADS_GRAMMAR,
10649 AT_DATA_STACK_TORTURE): Replace `assert (x);' with `if (! (x))
10650 abort ();'. This reduces the runtime of the "Many lookaheads"
10651 test from 27.6 to 2.7 minutes on a 440 MHz Ultrasparc III running
10652 GCC 3.2.
10653
10654 2002-11-07 Paul Eggert <eggert@twinsun.com>
10655
10656 * src/parse-gram.y (CHARACTER): Remove unused token.
10657 All uses removed.
10658
10659 * src/scan-gram.l: Remove stack option. We no longer use the
10660 stack, since the stack was never deeper than 1; instead, use the
10661 new auto var c_context to record the stacked value.
10662
10663 Remove nounput option. At an unexpected end of file, we now unput
10664 the minimal input necessary to end cleanly; this simplifies the
10665 code.
10666
10667 Avoid unbounded token sizes where this is easy.
10668
10669 (unexpected_end_of_file): New function.
10670 Use it to systematize the error message on unexpected EOF.
10671 (last-string): Now auto, not static.
10672 (YY_OBS_FREE): Remove unnecessary do while (0) wrapper.
10673 (scanner_last_string_free): Remove; not used.
10674 (percent_percent_count): Move decl to just before use.
10675 (SC_ESCAPED_CHARACTER): Return ID at unexpected end of file,
10676 not the (never otherwised-used) CHARACTER.
10677
10678 2002-11-07 Akim Demaille <akim@epita.fr>
10679
10680 Let yyerror always receive the msg as last argument, so that
10681 yyerror can be variadic.
10682
10683 * data/yacc.c (b4_yyerror_args): New.
10684 Use it when calling yyerror.
10685 * data/glr.c (b4_yyerror_args, b4_lyyerror_args): New.
10686 Use it when calling yyerror.
10687 * doc/bison.texinfo (Error Reporting): Adjust.
10688 * tests/calc.at (_AT_DATA_CALC_Y): Adjust.
10689 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Adjust.
10690
10691 2002-11-06 Akim Demaille <akim@epita.fr>
10692
10693 #line should have quoted strings.
10694 Ideally, this should be done by m4_quotearg.
10695
10696 * src/scan-skel.l: Include quotearg.h.
10697 Quote __ofile__.
10698 * src/output.c (symbol_printers_output)
10699 (symbol_destructors_output): Quote the file name.
10700
10701 2002-11-06 Akim Demaille <akim@epita.fr>
10702
10703 * tests/regression.at (Invalid inputs): Adjust to the recent
10704 messages.
10705
10706 2002-11-06 Akim Demaille <akim@epita.fr>
10707
10708 Restore --no-lines.
10709 Reported by Jim Kent.
10710
10711 * data/c.m4 (b4_syncline): New.
10712 * data/glr.c, data/yacc.c, data/lalr1.cc: Use it.
10713 * src/reader.c (prologue_augment, epilogue_set): Use b4_syncline.
10714 * src/output.c (user_actions_output): Likewise.
10715 (prepare): Define 'b4_synclines_flag'.
10716 * src/muscle_tab.c (muscle_init): Don't define b4_linef.
10717
10718 2002-11-06 Akim Demaille <akim@epita.fr>
10719
10720 * src/main.c (main): Free `infile'.
10721 * src/scan-gram.l (handle_syncline): New.
10722 Recognize `#line'.
10723 * src/output.c (user_actions_output, symbol_destructors_output)
10724 (symbol_printers_output): Use the location's file name, not
10725 infile.
10726 * src/reader.c (prologue_augment, epilogue_set): Likewise.
10727
10728 2002-11-05 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
10729
10730 * src/tables.c (matching_state): Don't allow states to match if
10731 either has GLR conflict entries.
10732
10733 2002-11-05 Paul Eggert <eggert@twinsun.com>
10734
10735 * src/scan-gram.l: Use more accurate diagnostics, e.g.
10736 "integer out of range" rather than "invalid value".
10737 * tests/input.at (Invalid $n, Invalid @n): Change expected wording
10738 accordingly.
10739
10740 Scan <% and %> digraphs in C code as POSIX 1003.1-2001 requires.
10741 Also, remove one static variable in the scanner.
10742
10743 * src/scan-gram.l (braces_level): Now auto, not static.
10744 Initialize to zero if the compiler is being picky.
10745 (INITIAL): Clear braces_level instead of incrementing it.
10746 (SC_BRACED_CODE): Treat <% and %> as { and } when inside C code,
10747 as POSIX 1003.1-2001 requires.
10748 * src/system.h (IF_LINT): New macro, taken from coreutils.
10749 * configure.ac: Define "lint" if --enable-gcc-warnings.
10750
10751 2002-11-05 Akim Demaille <akim@epita.fr>
10752
10753 * src/scan-gram.l: When it starts with `%', complain about the
10754 whole directive, not just that `invalid character: %'.
10755
10756 2002-11-04 Akim Demaille <akim@epita.fr>
10757
10758 * Makefile.maint: Update from Autoconf.
10759 (update, cvs-update, po-update, do-po-update): New.
10760
10761 2002-11-04 Akim Demaille <akim@epita.fr>
10762
10763 * tests/glr-regr1.at (Badly Collapsed GLR States): Prototype yylex
10764 and yyerror.
10765 Have yyerror `use' its arguments.
10766 * tests/calc.at (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF
10767 returns true when location & yacc & pure & parse-param.
10768 (_AT_DATA_CALC_Y): Let yyerror ``use'' its arguments.
10769
10770 2002-11-04 Akim Demaille <akim@epita.fr>
10771
10772 * src/location.h (LOCATION_PRINT): Use quotearg slot 3 to avoid
10773 clashes.
10774 * src/scan-gram.l: Use [\'] instead of ['] to pacify
10775 font-lock-mode.
10776 Use complain_at.
10777 Use quote, not quote_n since LOCATION_PRINT no longer uses the
10778 slot 0.
10779
10780 2002-11-03 Paul Eggert <eggert@twinsun.com>
10781
10782 * src/reader.c (get_merge_function, grammar_current_rule_check):
10783 Use consistent diagnostics for reporting type name clashes.
10784 Quote the types with <>, for consistency with Yacc.
10785 * tests/input.at (Type Clashes): Adjust to diagnostic changes.
10786
10787 2002-11-03 Akim Demaille <akim@epita.fr>
10788
10789 * data/c.m4 (b4_identification, b4_user_args, b4_parse_param):
10790 New.
10791 * data/yacc.m4 (b4_pure_args, b4_Pure_args): New.
10792 (b4_parse_param): Remove.
10793 Use b4_identification.
10794 Propagate b4_pure_args where needed to pass them to yyerror.
10795 * data/glr.m4 (b4_parse_param): Remove.
10796 (b4_user_formals, b4_pure_args, b4_pure_formals, b4_lpure_args)
10797 (b4_lpure_formals): New.
10798 Use b4_identification.
10799 (YY_USER_FORMALS, YY_USER_ARGS): Remove, replaced by
10800 b4_user_formals and b4_user_args.
10801 (yyexpandGLRStack, yyFail, yyaddDeferredAction, yyglrShiftDefer)
10802 (yyreportAmbiguity): When using a pure parser, also need
10803 the location, and the parse-params.
10804 Adjust callers.
10805 (yyuserAction, yyglrShift, yyreportParseError, yyrecoverParseError):
10806 When using a pure parser, also need the parse-params.
10807 Adjust callers.
10808 * tests/calc.at: Test pure (%pure-parser) and absolutely pure
10809 (%pure-parser + %parse-param) LALR and GLR parsers.
10810 (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): New, define AT_PARAM_IF,
10811 AT_LOCATION_IF, AT_PURE_IF, AT_GLR_IF, AAT_PURE_AND_LOC_IF,
10812 AT_GLR_OR_PARAM_IF, AT_YYERROR_ARG_LOC_IF, AT_YYERROR_SEES_LOC_IF.
10813 (_AT_DATA_CALC_Y): Equip for purity of yyerror.
10814 (_AT_CHECK_CALC_ERROR): Use AT_YYERROR_SEES_LOC_IF.
10815 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Equip for yyerror purity.
10816 * doc/bison.texinfo: Untabify the whole file.
10817 (Parser Function): Document %parse-param, deprecate YYPARSE_PARAM.
10818 (Pure Calling): Document %lex-param, deprecate YYLEX_PARAM.
10819 (Error Reporting): Adjust to these new directives.
10820 Document %error-verbose, deprecate YYERROR_VERBOSE.
10821
10822 2002-11-03 Akim Demaille <akim@epita.fr>
10823
10824 * tests/calc.at: Change all the AT_CHECK_CALC_LALR and
10825 AT_CHECK_CALC_GLR invocations to use % directives, instead of
10826 command line options.
10827 * tests/cxx-type.at: Formatting changes.
10828
10829 2002-11-03 Paul Eggert <eggert@twinsun.com>
10830
10831 * src/scan-gram.l: Revamp to fix POSIX incompatibilities,
10832 to count columns correctly, and to check for invalid inputs.
10833
10834 Use mbsnwidth to count columns correctly. Account for tabs, too.
10835 Include mbswidth.h.
10836 (YY_USER_ACTION): Invoke extend_location rather than LOCATION_COLUMNS.
10837 (extend_location): New function.
10838 (YY_LINES): Remove.
10839
10840 Handle CRLF in C code rather than in Lex code.
10841 (YY_INPUT): New macro.
10842 (no_cr_read): New function.
10843
10844 Scan UCNs, even though we don't fully handle them yet.
10845 (convert_ucn_to_byte): New function.
10846
10847 Handle backslash-newline correctly in C code.
10848 (SC_LINE_COMMENT, SC_YACC_COMMENT): New states.
10849 (eols, blanks): Remove. YY_USER_ACTION now counts newlines etc.;
10850 all uses changed.
10851 (tag, splice): New EREs. Do not allow NUL or newline in tags.
10852 Use {splice} wherever C allows backslash-newline.
10853 YY_STEP after space, newline, vertical-tab.
10854 ("/*"): BEGIN SC_YACC_COMMENT, not yy_push_state (SC_COMMENT).
10855
10856 (letter, id): Don't assume ASCII; e.g., spell out a-z.
10857
10858 ({int}, handle_action_dollar, handle_action_at): Check for integer
10859 overflow.
10860
10861 (YY_STEP): Omit trailing semicolon, so that it's more like C.
10862
10863 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>): Allow \0 and \00
10864 as well as \000. Check for UCHAR_MAX, not 255.
10865 Allow \x with an arbitrary positive number of digits, as in C.
10866 Check for overflow here.
10867 Allow \? and UCNs, for compatibility with C.
10868
10869 (handle_symbol_code_dollar): Use quote_n slot 1 to avoid collision
10870 with quote slot used by complain_at.
10871
10872 * tests/input.at: Add tests for backslash-newline, m4 quotes
10873 in symbols, long literals, and funny escapes in strings.
10874
10875 * configure.ac (jm_PREREQ_MBSWIDTH): Add.
10876 * lib/Makefile.am (libbison_a_SOURCES): Add mbswidth.h, mbswidth.c.
10877 * lib/mbswidth.h, lib/mbswidth.c: New files, from GNU gettext.
10878 * m4/Makefile.am (EXTRA_DIST): Add mbswidth.m4.
10879 * m4/mbswidth.m4: New file, from GNU coreutils.
10880
10881 * doc/bison.texinfo (Grammar Outline): Document // comments.
10882 (Symbols): Document that trigraphs have no special meaning in Bison,
10883 nor is backslash-newline allowed.
10884 (Actions): Document that trigraphs have no special meaning.
10885
10886 * src/location.h (LOCATION_COLUMNS, LOCATION_LINES): Remove;
10887 no longer used.
10888
10889 2002-11-02 Paul Eggert <eggert@twinsun.com>
10890
10891 * src/reader.c: Don't include quote.h; not needed.
10892 (get_merge_function): Reword warning to be consistent with
10893 type clash diagnostic in grammar_current_rule_check.
10894
10895 * lib/quotearg.c (quotearg_buffer_restyled): Fix off-by-two
10896 bug in trigraph handling.
10897
10898 * src/output.c (prepare_symbols): When printing token names,
10899 escape "[" as "@<:@" and likewise for "]".
10900
10901 * src/system.h (errno): Remove declaration, as we are now
10902 assuming C89 or better, and C89 guarantees errno.
10903
10904 2002-10-30 Paul Eggert <eggert@twinsun.com>
10905
10906 * lib/bitset_stats.c (bitset_stats_read, bitset_stats_write):
10907 Check for close failures.
10908 * src/files.h (xfclose): Return void, not int, since it always
10909 returned zero.
10910 * src/files.c (xfclose): Likewise. Report I/O error if ferror
10911 indicates one.
10912 * src/output.c (output_skeleton): Use xfclose rather than fclose
10913 and ferror. xfclose now checks ferror.
10914
10915 * data/glr.c (YYLEFTMOST_STATE): Remove.
10916 (yyreportTree): Use a stack-based leftmost state. This avoids
10917 our continuing battles with bogus warnings about initializers.
10918
10919 2002-10-30 Akim Demaille <akim@epita.fr>
10920
10921 * src/system.h: Don't use #ifdef/#ifndef on HAVE_ values, only
10922 #if.
10923
10924 2002-10-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
10925
10926 * tests/glr-regr1.at: New test for reported regressions.
10927 * tests/testsuite.at: Add glr-regr1.at test.
10928 * tests/Makefile.am: Add glr-regr1.at test.
10929
10930 2002-10-24 Paul Eggert <eggert@twinsun.com>
10931
10932 Version 1.75a.
10933
10934 * tests/calc.at (_AT_DATA_CALC_Y): Remove unused strcat declaration.
10935 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Include stdlib.h, since
10936 we use malloc. Don't assume 'A' through 'Z' are contiguous.
10937 Don't assume strdup exists; POSIX says its an XSI extension.
10938 Check for buffer overflow on input.
10939
10940 2002-10-24 Akim Demaille <akim@epita.fr>
10941
10942 * src/output.c (output_skeleton): Don't disable M4sugar comments
10943 too soon: it results in comments being expanded.
10944 * data/yacc.c, data/glr.c, data/lalr1.cc: Do it right before the
10945 first output.
10946
10947 2002-10-24 Akim Demaille <akim@epita.fr>
10948
10949 * data/yacc.c (m4_int_type): New.
10950 * data/c.m4 (m4_int_type): Don't use yysigned_char, but `signed
10951 char' as only yacc.c wants K&R portability.
10952 * data/glr.c (yysigned_char): Remove.
10953 * data/lalr1.cc: Rename the trailing b4_name as b4_parser_class_name.
10954 Reported by Quoc Peyrot.
10955
10956 2002-10-23 Paul Eggert <eggert@twinsun.com>
10957
10958 * src/main.c (main): With --trace=time, report times even if a
10959 non-fatal error occurs. Formerly, the times were reported in some
10960 such cases but not in others.
10961 * src/reader.c (reader): Just return if a complaint has been issued,
10962 instead of exiting, so that 'main' can report times.
10963
10964 2002-10-22 Akim Demaille <akim@epita.fr>
10965
10966 * src/system.h: Include sys/types.
10967 Reported by Bert Deknuydt.
10968
10969 2002-10-23 Paul Eggert <eggert@twinsun.com>
10970
10971 * configure.ac (AC_PROG_LEX): Use instead of AM_PROG_LEX.
10972 Suggested by Art Haas.
10973
10974 2002-10-22 Paul Eggert <eggert@twinsun.com>
10975
10976 * src/complain.c (exit) [! (STDC_HEADERS || _LIBC)]: Remove exit
10977 decl; not needed any more.
10978 * src/main.c (main): Use return to exit, undoing yesterday's change.
10979 The last OS that we could find where this wouldn't work is
10980 SunOS 3.5, and that's too old to worry about now.
10981
10982 * data/glr.c (struct yyltype): Define members even when not
10983 doing locations. This is more consistent with yacc.c, and it
10984 works around the following bug reports:
10985 http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00106.html
10986 http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00111.html
10987
10988 * doc/bison.texinfo: Minor spelling and typographical fixes. Use
10989 @acronym consistently. Standardize on "Yacc" instead of "YACC",
10990 "Algol" instead of "ALGOL". Give a bit more history about BNF.
10991
10992 2002-10-22 Akim Demaille <akim@epita.fr>
10993
10994 * data/README: New.
10995
10996 2002-10-21 Paul Eggert <eggert@twinsun.com>
10997
10998 Be consistent about 'bool'; the old code used an enum in one
10999 module and an int in another, and this violates the C standard.
11000 * m4/stdbool.m4: New file, from coreutils 4.5.3.
11001 * configure.ac (AC_HEADER_STDBOOL): Add.
11002 * m4/Makefile.am (EXTRA_DIST): Add stdbool.m4.
11003 * src/muscle_tab.c (hash_compare_muscles): (a ? FALSE : TRUE) -> (! a)
11004 * src/symtab.c (hash_compare_symbol_t): Likewise.
11005 * src/system.h (bool, false, true): Use a definition consistent
11006 with ../lib/hash.c. All uses changed.
11007
11008 * src/complain.c (warning_issued): Renamed from warn_message_count,
11009 so that we needn't worry about integer overflow (!).
11010 Now of type bool. All uses changed.
11011 (complaint_issued): Renamed from complain_message_count; likewise.
11012
11013 * src/main.c (main): Use exit to exit with failure.
11014
11015 * src/complain.c (fatal_at, fatal): Use EXIT_FAILURE and EXIT_SUCCESS
11016 rather than 1 and 0.
11017 * src/main.c (main): Likewise.
11018 * src/getargs.c (getargs): Likewise.
11019 * src/reader.c (reader): Likewise.
11020
11021 * src/getarg.c (getargs): Remove duplicate code for
11022 "Try `bison --help'".
11023
11024 * src/files.c (xfopen, xfclose): Use EXIT_FAILURE rather than 2.
11025 What was that "2" for?
11026
11027 * src/complain.h (fatal, fatal_at): Add __attribute__((__noreturn__)).
11028 * src/getargs.c (usage): Likewise.
11029
11030 * src/getargs.c (getargs): When there are too few operands, report
11031 the last one. When there are too many, report the first extra
11032 one. This is how diffutils does it.
11033
11034 2002-10-20 Paul Eggert <eggert@twinsun.com>
11035
11036 Remove K&R vestiges.
11037 * configure.ac (AC_C_CONST, AM_C_PROTOTYPES): Remove.
11038 * src/complain.c (VA_START): Remove. Assume prototypes.
11039 (vfprintf) [! (HAVE_VPRINTF || defined vfprintf)]: New macro.
11040 (private_strerror, warn_at, warn, complain_at, complain, fatal_at,
11041 fatal): Assume prototypes.
11042 * src/complain.h: Assume prototypes.
11043 * src/system.h (PARAMS): Remove.
11044 Include <limits.h> unconditionally, since it's guaranteeed even
11045 for a freestanding C89 compiler.
11046 (SHRT_MIN, SHRT_MAX): Remove, since C89 guarantees them.
11047 * src/vmsgetargs.c (getargs, cli_present, cli_get_value): Prototype.
11048
11049 2002-10-20 Akim Demaille <akim@epita.fr>
11050
11051 * src/muscle_tab.c (muscle_grow): Remove trailing debugging code.
11052 * data/glr.c (YY_USER_FORMALS, YY_USER_ARGS): New.
11053 (yyuserAction, yydoAction, yyglrReduce, yyresolveValue)
11054 (yyresolveStates, yyresolveAction, yyresolveStack)
11055 (yyprocessOneStack): Use them.
11056 (yy_reduce_print): New.
11057 * tests/calc.at (_AT_DATA_CALC_Y): Exercise %parse-param.
11058
11059 2002-10-20 Akim Demaille <akim@epita.fr>
11060
11061 * data/c.m4 (b4_c_ansi_args): Recognize functions with no
11062 arguments and output `void'.
11063 (b4_c_function): Rename as...
11064 (b4_c_function_def): this.
11065 (b4_c_function_decl, b4_c_ansi_function_def)
11066 (b4_c_ansi_function_decl): New.
11067 Change the interpretation of the arguments: before `int, foo', now
11068 `int foo, foo'.
11069 * data/yacc.c (yyparse): Prototype and define thanks to these.
11070 Adjust b4_c_function_def uses.
11071 * data/glr.c (yyparse): Likewise, but ANSI only.
11072
11073 2002-10-20 Akim Demaille <akim@epita.fr>
11074
11075 * src/output.c (prepare): Move the definition of `tokens_number',
11076 `nterms_number', `undef_token_number', `user_token_number_max'
11077 to...
11078 (prepare_tokens): Here.
11079 (prepare_tokens): Rename as...
11080 (prepare_symbols): this.
11081 (prepare): Move the definition of `rules_number' to...
11082 (prepare_rules): here.
11083 (prepare): Move the definition of `last', `final_state_number',
11084 `states_number' to...
11085 (prepare_states): here.
11086 * data/yacc.c, data/lalr1.cc, data/glr.c: Normalize `>' into `<'.
11087
11088 2002-10-20 Akim Demaille <akim@epita.fr>
11089
11090 * src/tables.h, src/tables.c, src/output.c: Comment changes.
11091
11092 2002-10-20 Akim Demaille <akim@epita.fr>
11093
11094 * data/yacc.c, data/yacc.c (b4_location_if, b4_pure_if): Move to...
11095 * data/c.m4: here.
11096
11097 2002-10-20 Akim Demaille <akim@epita.fr>
11098
11099 * src/output.c (prepare): Use MUSCLE_INSERT_STRING.
11100 * src/muscle_tab.c (muscle_pair_list_grow): Rename `val as
11101 `pair'.
11102 (muscle_init): Move the `b4_ltype', `b4_maxdepth', `b4_initdepth',
11103 `name' to...
11104 * data/glr.c, data/lalr1.cc, data/yacc.c (b4_location_type)
11105 (b4_stack_depth_init, b4_stack_depth_max, b4_parser_class_name):
11106 These.
11107
11108 2002-10-19 Paul Eggert <eggert@twinsun.com>
11109
11110 Do not create a temporary file, as that involves security and
11111 cleanup headaches. Instead, use a pair of pipes.
11112 Derived from a suggestion by Florian Krohm.
11113 * lib/subpipe.c, lib/subpipe.h, m4/subpipe.m4: New files.
11114 * lib/mkstemp.c, lib/readpipe.c, lib/tempname.c, m4/mkstemp.m4: Remove.
11115 * configure.ac (UTILS_FUNC_MKSTEMP, jm_PREREQ_TEMPNAME): Remove.
11116 (BISON_PREREQ_SUBPIPE): Add.
11117 * lib/Makefile.am (libbison_a_SOURCES): Remove readpipe.c.
11118 Add subpipe.h, subpipe.c.
11119 * m4/Makefile.am (EXTRA_DIST): Remove mkstemp.m4. Add subpipe.m4.
11120 * po/POTFILES.in: Add lib/subpipe.c.
11121 * src/output.c: Include "subpipe.h".
11122 (m4_invoke): Remove decl.
11123 (scan_skel): New decl.
11124 (output_skeleton): Use pipe rather than temporary file for m4 input.
11125 Check that m4sugar.m4 is readable, to avoid deadlock.
11126 Check for pipe I/O error.
11127 * src/scan-skel.l (readpipe): Remove decl.
11128 (scan_skel): New function, to be used in place of m4_invoke.
11129 Read from stream rather than file.
11130
11131 * lib/timevar.c (TICKS_TO_MSEC, CLOCKS_TO_MSEC): Do not cast to
11132 float, as this generates a warning on Solaris 8 + GCC 3.2 with
11133 --enable-gcc-warnings. Instead, divide into 1.0 rather than 1;
11134 this generates a more-accurate value anyway.
11135
11136 * lib/timevar.c (timervar_accumulate): Rename locals to
11137 avoid confusion with similarly-named more-global.
11138 * src/muscle_tab.c (muscle_pair_list_grow): Likewise.
11139
11140 * src/output.c (prepare): Use xstrdup to convert char const *
11141 to char *, to avoid GCC warning.
11142
11143 2002-10-19 Akim Demaille <akim@epita.fr>
11144
11145 * tests/calc.at (_AT_DATA_CALC_Y): Define VAL, LOC, LEX_FORMALS,
11146 LEX_PRE_FORMALS, LEX_ARGS, LEX_PRE_ARGS, USE_LEX_ARGS.
11147 Use them to have `calc.y' ready for %pure-parser.
11148 * data/yacc.c (YYLEX): Pass a yylex return type to
11149 b4_c_function_call.
11150
11151 2002-10-19 Akim Demaille <akim@epita.fr>
11152
11153 Prototype support of %lex-param and %parse-param.
11154
11155 * src/parse-gram.y: Add the definition of the %lex-param and
11156 %parse-param tokens, plus their rules.
11157 Drop the `_' version of %glr-parser.
11158 Add the "," token.
11159 * src/scan-gram.l (INITIAL): Scan them.
11160 * src/muscle_tab.c: Comment changes.
11161 (muscle_insert, muscle_find): Rename `pair' as `probe'.
11162 * src/muscle_tab.h (MUSCLE_INSERT_PREFIX): Remove unused.
11163 (muscle_entry_s): The `value' member is no longer const.
11164 Adjust all dependencies.
11165 * src/muscle_tab.c (muscle_init): Adjust: use
11166 MUSCLE_INSERT_STRING.
11167 Initialize the obstack earlier.
11168 * src/muscle_tab.h, src/muscle_tab.c (muscle_grow)
11169 (muscle_pair_list_grow): New.
11170 * data/c.m4 (b4_c_function_call, b4_c_args): New.
11171 * data/yacc.c (YYLEX): Use b4_c_function_call to honor %lex-param.
11172 * tests/calc.at: Use %locations, not --locations.
11173 (AT_CHECK_CALC_GLR): Use %glr-parser, not %glr_parser.
11174
11175 2002-10-19 Akim Demaille <akim@epita.fr>
11176
11177 * src/getargs.c (usage): Take status as argument and exit
11178 accordingly.
11179 Report the traditional `Try ... --help' message when status != 0.
11180 (usage, version): Don't take a FILE * as arg, it is pointless.
11181 (getargs): When there is an incorrect number of arguments, make it
11182 an error, and report it GNUlically thanks to `usage ()'.
11183
11184 2002-10-18 Paul Eggert <eggert@twinsun.com>
11185
11186 * data/glr.c (yyreportParseError): Don't assume that sprintf
11187 yields the length of the printed string, as this is not true
11188 on SunOS 4.1.4. Reported by Peter Klein.
11189
11190 * tests/calc.at (_AT_DATA_CALC_Y): #undef memcmp and realloc.
11191 * tests/conflicts.at (%nonassoc and eof): Likewise.
11192 Fixes SunOS 4.1.4 test failure reported by Peter Klein.
11193
11194 2002-10-17 Akim Demaille <akim@epita.fr>
11195
11196 * src/getargs.h (trace_e): Add trace_scan, and trace_parse.
11197 * src/getargs.c (trace_types, trace_args): Adjust.
11198 * src/reader.c (grammar_current_rule_prec_set)
11199 (grammar_current_rule_dprec_set, grammar_current_rule_merge_set):
11200 Standardize error messages.
11201 And s/@prec/%prec/!
11202 (reader): Use trace_flag to enable scanner/parser debugging,
11203 instead of an adhoc scheme.
11204 * src/scan-gram.l: Remove trailing debugging code.
11205
11206 2002-10-16 Paul Eggert <eggert@twinsun.com>
11207
11208 * src/muscle_tab.h (MUSCLE_TAB_H_): Was misspelled as
11209 MUSCLE_TAB_H.
11210
11211 * NEWS: Officially drop support for building Bison with K&R C,
11212 since it didn't work anyway and it's not worth worrying about.
11213 * Makefile.maint (wget_files): Remove ansi2knr.c.
11214 (ansi2knr.c-url_prefix): Remove.
11215 * lib/.cvsignore: Remove ansi2knr, ansi2knr.*.
11216 * lib/Makefile.am (AUTOMAKE_OPTIONS): Remove.
11217 * src/Makefile.am (AUTOMAKE_OPTIONS): Remove.
11218
11219 2002-10-15 Paul Eggert <eggert@twinsun.com>
11220
11221 Stop using the "enum_" trick for K&R-style function definitions;
11222 it confused me, and I was the author! Instead, assume that people
11223 who want to use K&R C compilers (when using these modules in GCC,
11224 perhaps?) will run ansi2knr.
11225
11226 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): Remove.
11227 All uses of "enum_" changed to "enum ".
11228 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
11229 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
11230
11231 * lib/abitset.c (abitset_and, abitset_and_cmp, abitset_and_or,
11232 abitset_and_or_cmp, abitset_andn, abitset_andn_cmp,
11233 abitset_andn_or, abitset_andn_or_cmp, abitset_bytes, abitset_copy,
11234 abitset_copy1, abitset_disjoint_p, abitset_empty_p,
11235 abitset_equal_p, abitset_init, abitset_list, abitset_list_reverse,
11236 abitset_not, abitset_ones, abitset_or, abitset_or_and,
11237 abitset_or_and_cmp, abitset_or_cmp, abitset_reset, abitset_set,
11238 abitset_size, abitset_small_list, abitset_subset_p, abitset_test,
11239 abitset_unused_clear, abitset_xor, abitset_xor_cmp, abitset_zero):
11240 Use function prototypes; this removes the need for declaring
11241 static functions simply to provide their prototypes.
11242 * lib/bitset.c (bitset_alloc, bitset_and_or_, bitset_and_or_cmp_,
11243 bitset_andn_or_, bitset_andn_or_cmp_, bitset_bytes, bitset_copy_,
11244 bitset_count_, bitset_create, bitset_dump, bitset_first,
11245 bitset_free, bitset_init, bitset_last, bitset_next,
11246 bitset_obstack_alloc, bitset_obstack_free, bitset_only_set_p,
11247 bitset_op4_cmp, bitset_or_and_, bitset_or_and_cmp_, bitset_prev,
11248 bitset_print, bitset_release_memory, bitset_toggle_,
11249 bitset_type_choose, bitset_type_get, bitset_type_name_get,
11250 debug_bitset): Likewise.
11251 * lib/bitset.h (bitset_set, bitset_reset, bitset_test): Likewise.
11252 * lib/bitset_stats.c (bitset_log_histogram_print,
11253 bitset_percent_histogram_print, bitset_stats_and,
11254 bitset_stats_and_cmp, bitset_stats_and_or,
11255 bitset_stats_and_or_cmp, bitset_stats_andn, bitset_stats_andn_cmp,
11256 bitset_stats_andn_or, bitset_stats_andn_or_cmp, bitset_stats_copy,
11257 bitset_stats_count, bitset_stats_disable, bitset_stats_disjoint_p,
11258 bitset_stats_dump, bitset_stats_empty_p, bitset_stats_enable,
11259 bitset_stats_equal_p, bitset_stats_free, bitset_stats_init,
11260 bitset_stats_list, bitset_stats_list_reverse, bitset_stats_not,
11261 bitset_stats_ones, bitset_stats_or, bitset_stats_or_and,
11262 bitset_stats_or_and_cmp, bitset_stats_or_cmp, bitset_stats_print,
11263 bitset_stats_print_1, bitset_stats_read, bitset_stats_reset,
11264 bitset_stats_set, bitset_stats_size, bitset_stats_subset_p,
11265 bitset_stats_test, bitset_stats_toggle, bitset_stats_type_get,
11266 bitset_stats_write, bitset_stats_xor, bitset_stats_xor_cmp,
11267 bitset_stats_zero): Likewise.
11268 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
11269 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
11270 bitsetv_dump, debug_bitsetv): Likewise.
11271 * lib/ebitset.c (ebitset_and, ebitset_and_cmp, ebitset_andn,
11272 ebitset_andn_cmp, ebitset_bytes, ebitset_copy, ebitset_copy_,
11273 ebitset_copy_cmp, ebitset_disjoint_p, ebitset_elt_add,
11274 ebitset_elt_alloc, ebitset_elt_calloc, ebitset_elt_find,
11275 ebitset_elt_free, ebitset_elt_last, ebitset_elt_remove,
11276 ebitset_elt_zero_p, ebitset_elts_grow, ebitset_empty_p,
11277 ebitset_equal_p, ebitset_free, ebitset_init, ebitset_list,
11278 ebitset_list_reverse, ebitset_not, ebitset_ones, ebitset_op3_cmp,
11279 ebitset_or, ebitset_or_cmp, ebitset_release_memory, ebitset_reset,
11280 ebitset_set, ebitset_size, ebitset_subset_p, ebitset_test,
11281 ebitset_weed, ebitset_xor, ebitset_xor_cmp, ebitset_zero):
11282 Likewise.
11283 * lib/lbitset.c (debug_lbitset, lbitset_and, lbitset_and_cmp,
11284 lbitset_andn, lbitset_andn_cmp, lbitset_bytes, lbitset_copy,
11285 lbitset_copy_cmp, lbitset_disjoint_p, lbitset_elt_alloc,
11286 lbitset_elt_calloc, lbitset_elt_find, lbitset_elt_free,
11287 lbitset_elt_link, lbitset_elt_unlink, lbitset_elt_zero_p,
11288 lbitset_empty_p, lbitset_equal_p, lbitset_free, lbitset_init,
11289 lbitset_list, lbitset_list_reverse, lbitset_not, lbitset_ones,
11290 lbitset_op3_cmp, lbitset_or, lbitset_or_cmp, lbitset_prune,
11291 lbitset_release_memory, lbitset_reset, lbitset_set, lbitset_size,
11292 lbitset_subset_p, lbitset_test, lbitset_weed, lbitset_xor,
11293 lbitset_xor_cmp, lbitset_zero): Likewise.
11294
11295 2002-10-14 Akim Demaille <akim@epita.fr>
11296
11297 Version 1.75.
11298
11299 2002-10-14 Akim Demaille <akim@epita.fr>
11300
11301 * tests/Makefile.am (maintainer-check-posix): New.
11302
11303 2002-10-14 Akim Demaille <akim@epita.fr>
11304
11305 * data/glr.c [YYDEBUG] (YYLEFTMOST_STATE): Initialize the yyloc
11306 member.
11307
11308 2002-10-14 Akim Demaille <akim@epita.fr>
11309
11310 * src/tables.c (table_ninf_remap): base -> tab.
11311 Reported by Matt Rosing.
11312
11313 2002-10-14 Paul Eggert <eggert@twinsun.com>
11314
11315 * tests/action.at, tests/calc.at, tests/conflicts.at,
11316 tests/cxx-type.at, tests/headers.at, tests/input.at,
11317 tests/regression.at, tests/synclines.at, tests/torture.at:
11318 Say "bison -o foo.c foo.y", not "bison foo.y -o foo.c",
11319 so that the tests still work even if POSIXLY_CORRECT is set.
11320 * doc/bison.texinfo (Rpcalc Compile, Invocation): Likewise.
11321
11322 * data/c.m4 (b4_int_type): Use yysigned_char instead of signed char,
11323 for portability to K&R hosts. Fix typo: signed char is guaranteed
11324 only to 127, not to 128.
11325 * data/glr.c (yysigned_char): New type.
11326 * data/yacc.c (yysigned_char): Likewise.
11327 * tests/regression.at (Web2c Actions): signed char -> yysigned_char.
11328
11329 2002-10-13 Paul Eggert <eggert@twinsun.com>
11330
11331 * data/yacc.c (yyparse): Rewrite to avoid "comparison is always
11332 true due to limited range of data type" warning from GCC.
11333
11334 * data/c.m4 (b4_token_defines): Protect against double-inclusion
11335 by wrapping enum yytokentype's definition inside #ifndef
11336 YYTOKENTYPE. This undoes a bug I introduced on 2002-10-12.
11337
11338 2002-10-13 Akim Demaille <akim@epita.fr>
11339
11340 * data/glr.c (yyglrShiftDefer, yyaddDeferredAction, yydoAction):
11341 Un yy- yyrhs to avoid the name clash with the global YYRHS.
11342
11343 2002-10-13 Akim Demaille <akim@epita.fr>
11344
11345 * Makefile.maint: Update from Autoconf 2.54.
11346 * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Remove, shipped with 2.54.
11347
11348 2002-10-13 Akim Demaille <akim@epita.fr>
11349
11350 * src/print.c (print_state): Separate the list of solved conflicts
11351 from the other items.
11352 * tests/conflicts.at (Resolved SR Conflicts): Adjust.
11353
11354 2002-10-13 Akim Demaille <akim@epita.fr>
11355
11356 Let nondeterministic skeletons be usable with deterministic
11357 tables.
11358
11359 With the patch, GAWK compiled by GCC without -O2 passes its test
11360 suite using a GLR parser driven by LALR tables. It fails with -O2
11361 because `struct stat' gives two different answers on my machine:
11362 88 (definition of an auto var) and later 96 (memset on this var).
11363 Hence the stack is badly corrumpted. The headers inclusion is to
11364 blame: if I move the awk.h inclusion before GLR's system header
11365 inclusion, the two struct stat have the same size.
11366
11367 * src/tables.c (pack_table): Always create conflict_table.
11368 (token_actions): Always create conflict_list.
11369 * data/glr.c (YYFLAG): Remove, unused.
11370
11371 2002-10-13 Akim Demaille <akim@epita.fr>
11372
11373 * configure.ac (AC_GNU_SOURCE): Use it instead of hand written code.
11374 (O0FLAGS): New.
11375 (VALGRIND, GXX): New.
11376 * tests/atlocal.in (CFLAGS): Use O0FLAGS.
11377 * tests/bison.in: Run $PREBISON a pre-command.
11378 * tests/Makefile.am (maintainer-check, maintainer-check-valgrind)
11379 (maintainer-check-g++): New.
11380 * Makefile.am (maintainer-check): New.
11381
11382 2002-10-13 Akim Demaille <akim@epita.fr>
11383
11384 * data/glr.c: Formatting changes.
11385 Tweak some trace messages to match yacc.c's.
11386
11387 2002-10-13 Akim Demaille <akim@epita.fr>
11388
11389 GLR parsers sometimes raise parse errors instead of performing the
11390 default reduction.
11391 Reported by Charles-Henry de Boysson.
11392
11393 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Don't
11394 check the length of the traces when %glr.
11395 (_AT_CHECK_CALC_ERROR): Also skip `^Stack' lines, coming from
11396 GLR's traces.
11397 (AT_CHECK_CALC_LALR, AT_CHECK_CALC_GLR): New.
11398 Test GLR parsers.
11399 * data/glr.c (YYLEFTMOST_STATE): Fix its value.
11400 (yyltype): Remove the yy prefix from the member names.
11401 (yytable): Complete its comment.
11402 (yygetLRActions): Map error action number from YYTABLE from
11403 YYTABLE_NINF to 0.
11404 (yyisErrorAction): No longer compare YYACTION to YYPACT_NINF
11405 (which was a bug: it should have been YYTABEL_NINF, and yet it was
11406 not satisfying as we could compare an YYACTION computed from
11407 YYDEFACT to YYTABLE_NINF although they are unrelated): 0 is the
11408 only value for error actions.
11409 (yyreportParseError): In verbose parse error messages, don't issue
11410 `error' in the list of expected tokens.
11411 * data/yacc.c (yyparse) <yybackup>: Rewrite the decoding of the
11412 next action to perform to match glr.c's decoding.
11413 (yytable): Complete its comment.
11414
11415 2002-10-13 Paul Eggert <eggert@twinsun.com>
11416
11417 Fix problem reported by Henrik Grubbstroem in
11418 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00098.html>:
11419 "nonterm: { $$ = 123; } { $$ = $1; };" was wrongly rejected,
11420 because the Bison parser reads the second action before reducing
11421 the first one.
11422 * src/scan-gram.l (rule_length): New static var.
11423 Use it to keep track of the rule length in the scanner, since
11424 we can't expect the parser to be in lock-step sync with the scanner.
11425 (handle_action_dollar, handle_action_at): Use this var.
11426 * tests/actions.at (Exotic Dollars): Test for the problem.
11427
11428 2002-10-12 Paul Eggert <eggert@twinsun.com>
11429
11430 * lib/timevar.c [! IN_GCC && HAVE_SYS_TIME_H]: Include <sys/time.h>.
11431 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): Check for <sys/time.h>.
11432 Include <sys/time.h> when checking for clock_t and struct tms.
11433 Use same include order as source.
11434 This is for the SunOS 4.1.4 porting bug reported by Peter Klein in
11435 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00016.html>.
11436
11437 * lib/timevar.c: Update copyright date and clarify comments.
11438 (get_time) [IN_GCC]: Keep the GCC version for reference.
11439
11440 * lib/timevar.c, lib/timevar.h, lib/timevar.def: Import
11441 GCC version as of today, then merge Bison's changes.
11442 Change "GCC" to "Bison" in copyright notice. timevar.def's
11443 author is Akim, so change that too.
11444
11445 * src/reader.c (grammar_current_rule_check):
11446 Don't worry about the default action if $$ is untyped.
11447 Prevents bogus warnings reported by Jim Gifford in
11448 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00015.html>.
11449
11450 * data/c.m4 (b4_token_enum): Do not define YYTOKENTYPE.
11451 * data/glr.c, data/lalr1.cc, data/yacc.c:
11452 Output token definitions before the first part of user declarations.
11453 Fixes compatibility problem reported by Jim Gifford for kbd in
11454 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00014.html>.
11455
11456 2002-10-11 Paul Eggert <eggert@twinsun.com>
11457
11458 * data/yacc.c (yyreport_parse_error): Remove, putting its body into...
11459 (yyparse): here. This undoes some of the 2002-07-25 change.
11460 Compatibility problem reported by Ralf S. Engelschall with
11461 OSSP cfg <http://www.ossp.org/pkg/lib/cfg/>.
11462
11463 2002-10-11 Akim Demaille <akim@epita.fr>
11464
11465 * tests/regression.at Characters Escapes): New.
11466 * src/scan-gram.l (SC_ESCAPED_CHARACTER): Accept \' in strings and
11467 characters.
11468 Reported by Jan Nieuwenhuizen.
11469
11470 2002-10-11 Akim Demaille <akim@epita.fr>
11471
11472 * po/id.po: New.
11473
11474 2002-10-10 Paul Eggert <eggert@twinsun.com>
11475
11476 Portability fixes for bitsets; this also avoids several GCC
11477 warnings.
11478
11479 * lib/abitset.c: Include <stddef.h>, for offsetof.
11480 * lib/lbitset.c: Likewise.
11481
11482 * lib/abitset.c (abitset_bytes): Return a size that is aligned
11483 properly for vectors of objects. Do not assume that adding a
11484 header size to a multiple of a word size yields a value that is
11485 properly aligned for the whole union.
11486 * lib/bitsetv.c (bitsetv_alloc): Likewise.
11487
11488 * lib/bitset_stats.c (bitset_stats_bytes): Adjust to new,
11489 unique names for structures.
11490 * lib/ebitset.c (ebitset_bytes): Likewise.
11491 * lib/lbitset.c (lbitset_bytes): Likewise.
11492
11493 * lib/abitset.c (abitset_ones, abitset_zero, abitset_empty_p,
11494 abitset_copy1, abitset_not, abitset_equal_p, abitset_subset_p,
11495 abitset_disjoint_p, abitset_and, abitset_and_cmp, abitset_andn,
11496 abitset_andn_cmp, abitset_or, abitset_or_cmp, abitset_xor,
11497 abitset_xor_cmp, abitset_and_or, abitset_and_or_cmp,
11498 abitset_andn_or, abitset_andn_or_cmp, abitset_or_and,
11499 abitset_or_and_cmp, abitset_copy): Supply prototype decls,
11500 to improve the type-checking that GCC can do.
11501 * lib/bitset.c (bitset_op4_cmp): Likewise.
11502 * lib/bitset_stats.c (bitset_stats_count,
11503 bitset_stats_empty_p, bitset_stats_ones, bitset_stats_zero,
11504 bitset_stats_copy, bitset_stats_disjoint_p,
11505 bitset_stats_equal_p, bitset_stats_not, bitset_stats_subset_p,
11506 bitset_stats_and, bitset_stats_and_cmp, bitset_stats_andn,
11507 bitset_stats_andn_cmp, bitset_stats_or, bitset_stats_or_cmp,
11508 bitset_stats_xor, bitset_stats_xor_cmp, bitset_stats_and_or,
11509 bitset_stats_and_or_cmp, bitset_stats_andn_or,
11510 bitset_stats_andn_or_cmp, bitset_stats_or_and,
11511 bitset_stats_or_and_cmp): Likewise.
11512 * lib/lbitset.c (lbitset_and, lbitset_and_cmp, lbitset_andn,
11513 lbitset_andn_cmp, lbitset_or, lbitset_or_cmp, lbitset_xor,
11514 lbitset_xor_cmp, lbitset_empty_p, lbitset_ones, lbitset_not,
11515 lbitset_subset_p, lbitset_disjoint_p, debug_lbitset): Likewise.
11516
11517 * lib/abitset.h: Include bitset.h, not bbitset.h.
11518 * lib/ebitset.h: Likewise.
11519 * lib/lbitset.h: Likewise.
11520
11521 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): New types.
11522 All instances of parameters of type enum bitset_opts are now of
11523 type enum_bitset_opts, to conform to the C Standard, and similarly
11524 for enum_bitset_type.
11525 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
11526 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
11527
11528 Do not use "struct bitset_struct" to mean different things in
11529 different modules. Not only is this confusing, it violates
11530 the C Standard, which requires that structure types in different
11531 modules must be compatible if one is to be passed to the other.
11532 * lib/bbitset.h (bitset): Now points to a union, not to a struct.
11533 All instances of "struct bitset_struct *" replaced with "bitset".
11534 * lib/bitset.h (struct bitset_struct): Remove, replacing with....
11535 (union bitset_union, struct abitset_struct, struct ebitset_struct,
11536 struct lbitset_struct, struct bitset_stats_struct): New types.
11537 All uses of struct bitset_struct changed to union bitset_union,
11538 etc.
11539 * lib/abitset.c (struct abitset_struct, abitset,
11540 struct bitset_struct): Remove.
11541 * lib/bitset_stats.c (struct bitset_stats_struct, bitset_stats,
11542 struct bitset_struct): Remove.
11543 * lib/ebitset.c (struct ebitset_struct, ebitset, struct
11544 bitset_struct): Remove.
11545 * lib/lbitset.c (struct lbitset_struct, lbitset, bitset_struct):
11546 Likewise.
11547
11548 Do not call a function of type T using a call that assumes the
11549 function is of a different type U. Standard C requires that a
11550 function must be called with a type that is compatible with its
11551 definition.
11552 * lib/bbitset.h (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
11553 New decls.
11554 * lib/bitset.c (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
11555 New functions.
11556 * lib/ebitset.c (PFV): Remove.
11557 * lib/lbitset.c (PFV): Likewise.
11558 * lib/ebitset.c (ebitset_and, ebitset_andn, ebitset_or,
11559 ebitset_xor, ebitset_copy, ebitset_ones, ebitset_empty_p): New
11560 decls.
11561 (ebitset_and, ebitset_andn, ebitset_or, ebitset_xor): New functions.
11562 (ebitset_vtable): Use them.
11563 * lib/lbitset.c (lbitset_and, lbitset_andn, lbitset_or,
11564 lbitset_xor): New functions.
11565 (lbitset_vtable): Use them.
11566
11567 * lib/bitset.h (bitset_next, bitset_prev, bitset_only_set_p):
11568 Declare.
11569
11570 * lib/bitsetv.c (bitsetv_alloc): Add a cast to (void *) to avoid a
11571 GCC warning.
11572 * lib/lbitset.c (LBITSET_CURRENT1): Likewise.
11573 Use offsetof, for simplicity.
11574
11575 2002-10-06 Paul Eggert <eggert@twinsun.com>
11576
11577 * lib/bitset.h (bitset_reset): Do not assume that bitset_word is
11578 the same width as int. This reapplies a hunk of the 2002-08-12 patch
11579 <http://lists.gnu.org/archive/html/bison-patches/2002-08/msg00007.html>,
11580 which was inadvertently undone by the 2002-09-30 patch.
11581 * lib/lbitset.c (debug_lbitset): Do not assume that bitset_word is
11582 the same width as int.
11583
11584 2002-10-04 Paul Eggert <eggert@twinsun.com>
11585
11586 Version 1.50.
11587
11588 * configure.ac (AC_INIT), NEWS: Increment version number.
11589
11590 * doc/bison.texinfo: Minor spelling, grammar, and white space
11591 fixes.
11592 (Symbols): Mention that any negative value returned from yylex
11593 signifies end-of-input. Warn about negative chars. Mention
11594 the portable Standard C character set.
11595
11596 The GNU coding standard says CFLAGS and YFLAGS are reserved
11597 for the installer to set.
11598 * lib/Makefile.am (AM_CFLAGS): Renamed from CFLAGS.
11599 * src/Makefile.am (AM_CFLAGS): Likewise.
11600 (AM_YFLAGS): Renamed from YFLAGS.
11601
11602 Fix some MAX and MIN problems.
11603 * src/gram.h (ITEM_NUMBER_MIN): MIN_MAX -> INT_MIN.
11604 * src/lalr.h (GOTO_NUMBER_MAX): INT_MAX -> SHRT_MAX.
11605 * src/symtab.h (SYMBOL_NUMBER_MAX): New macro.
11606 * src/reader.c (reader): Use it.
11607
11608 * tests/regression.at (Braces parsing): Use grep, not fgrep, as
11609 POSIX 1003.1-2001 has removed fgrep.
11610
11611 2002-10-04 Michael Hayes <m.hayes@elec.canterbury.ac.nz>
11612
11613 * lib/bbitset.h (BITSET_WINDEX_MAX): Redefine so that it cannot be
11614 interpreted as signed.
11615 * lib/ebitset.c (ebitset_list): Fix bug.
11616
11617 2002-10-01 Paul Eggert <eggert@twinsun.com>
11618
11619 More fixes for 64-bit hosts and large bitsets.
11620
11621 * lib/abitset.c (struct abitset_struct.n_bits, abitset_small_list,
11622 abitset_size, abitset_list, abitset_list_reverse, abitset_list):
11623 Use bitset_bindex, not int or unsigned int or size_t, to count bits.
11624 * lib/bbitset.h (struct bitset_vtable.size, struct bitset_vtable.count,
11625 struct bitset_vtable.list, struct bitset_vtable.list_reverse,
11626 bitset_count_, bitset_next, bitset_prev, bitset_first, bitset_last,
11627 bitset_count_): Likewise.
11628 * lib/bitset.h (bitset_iterator.num, bitset_iterator.i,
11629 bitset_first, bitset_last): Likewise.
11630 * lib/bitset_stats.c (bitset_stats_size, bitset_stats_list,
11631 bitset_stats_list_reverse, bitset_stats_size,
11632 bitset_stats_count, bitset_stats_list, bitset_stat_list_reverse):
11633 Likewise.
11634 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
11635 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
11636 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
11637 bitsetv_reflexive_transitive_closure): Likewise.
11638 * lib/bitsetv.h (bitsetv_alloc, bitsetv_create): Likewise.
11639 * lib/ebitset.c (ebitset_size, ebitset_list, ebitset_list_reverse):
11640 Likewise.
11641 * lib/lbitset.c (lbitset_size, lbitset_list, lbitset_list_merge):
11642 Likewise.
11643
11644 * lib/abitset.c (abitset_ones, abitset_zero, abitset_bytes):
11645 Use size_t, not unsigned int, to count bytes.
11646 * lib/abitset.h (abitset_bytes): Likewise.
11647 * lib/bitset.c (bitset_bytes, bitset_alloc, bitset_obstack_alloc):
11648 Likewise.
11649 * lib/bitset.h (bitset_bytes): Likewise.
11650 * lib/bitset_stats.c (bitset_stats_bytes, bitset_stats_init): Likewise.
11651 * lib/bitset_stats.h (bitset_stats_bytes): Likewise.
11652 * lib/bitsetv.c (bitsetv_alloc): Likewise.
11653 * lib/ebitset.c (ebitset_bytes): Likewise.
11654 * lib/ebitset.h (ebitset_bytes): Likewise.
11655 * lib/lbitset.c (lbitset_bytes): Likewise.
11656 * lib/lbitset.h (lbitset_bytes): Likewise.
11657
11658 * lib/abitset.c (abitset_empty_p, abitset_not, abitset_equal_p,
11659 abitset_subset_p, abitset_disjoint_p, abitset_and,
11660 abitset_and_cmp, abitset_andn, abitset_andn_cmp, abitset_or,
11661 abitset_or_cmp, abitset_xor, abitset_xor_cmp, abitset_and_or,
11662 abitset_and_or_cmp, abitset_andn_or, abitset_andn_or_cmp,
11663 abitset_or_and, abitset_or_and_cmp):
11664 Use bitset_windex instead of unsigned int.
11665 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
11666 * lib/ebitset.c (struct ebitset_struct.size, ebitset_elts_grow,
11667 ebitset_elt_add, ebitset_elt_remove, ebitset_weed,
11668 ebitset_elt_find, ebitset_list_reverse, ebitset_list, ebitset_init):
11669 Likewise.
11670 * lib/lbitset.c (lbitset_ones, lbitset_not): Likewise.
11671
11672 * lib/bitset.c (bitset_print):
11673 Use proper printf formats for widths of integer types.
11674 * lib/bitset_stats.c (bitset_percent_histogram_print,
11675 bitset_log_histogram_print, bitset_stats_print_1): Likewise.
11676 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
11677 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
11678 * lib/lbitset.c (lbitset_bytes): Likewise.
11679
11680 * lib/bbitset.h (BITSET_BINDEX_MAX, BITSET_WINDEX_MAX,
11681 BITSET_SIZE_MAX): New macros.
11682 (BITSET_INDEX_MAX): Remove. It wasn't right, since it assumed that
11683 sizeof (bitset_word) == sizeof (bitset_windex). All uses changed
11684 to BITSET_WINDEX_MAX.
11685
11686 * lib/bitset.c (bitset_next, bitset_prev, bitset_first,
11687 bitset_last): Return BITSET_BINDEX_MAX (not -1) for no value,
11688 since we now return the bitset_bindex type (not int).
11689
11690 * lib/bitsetv.c (bitsetv_alloc): Check for arithmetic overflow
11691 when computing sizes.
11692 * lib/ebitset.c (ebitset_elts_grow): Likewise.
11693
11694 * lib/lbitset.c (lbitset_elt_find): Simplify windex calculation
11695 and avoid cast to unsigned.
11696
11697 2002-09-30 Akim Demaille <akim@epita.fr>
11698
11699 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
11700 * lib/bitset_stats.c, lib/bitsetv.c, lib/ebitset.c, lib/lbitset.c:
11701 Updates from Michael Hayes.
11702
11703 2002-09-30 Art Haas <ahaas@neosoft.com>
11704
11705 * configure.ac: Update AC_OUTPUT and AM_CONFIG_HEADER
11706 invocations.
11707 * tests/cxx-type.at (declarator): Don't rely on NDEBUG being not
11708 defined.
11709
11710 2002-09-27 Akim Demaille <akim@epita.fr>
11711
11712 Version 1.49c.
11713
11714 2002-09-27 Akim Demaille <akim@epita.fr>
11715
11716 * configure.ac (AM_INIT_AUTOMAKE): We _need_ 1.7.
11717 (Because of AC_LIBSOURCE).
11718
11719 2002-09-27 Akim Demaille <akim@epita.fr>
11720
11721 Playing with Autoscan.
11722
11723 * configure.ac: Remove the old LIBOBJ tweaks.
11724 (AC_REPLACE_FUNCS): Add strrchr and strtol.
11725 * lib/strrchr.c: New.
11726 * lib/strtol.c: New, from the Coreutils 4.5.1.
11727
11728 2002-09-27 Akim Demaille <akim@epita.fr>
11729
11730 Playing with Autoscan.
11731
11732 * m4/prereq.m4 (jm_PREREQ_ARGMATCH, jm_FUNC_ARGMATCH): New.
11733 * lib/Makefile.am (libbison_a_SOURCES): No longer include
11734 argmatch.c and argmatch.h, since they are AC_LIBSOURCE'd.
11735 * lib/strcasecmp.c, lib/strncasecmp.c, lib/memcmp.c: New, from the
11736 Coreutils 4.5.1.
11737
11738 2002-09-24 Akim Demaille <akim@epita.fr>
11739
11740 * doc/bison.texinfo (Stack Overflow): xref to Recursion.
11741 (Frequently Asked Questions, Parser Stack Overflow): New.
11742
11743 2002-09-13 Akim Demaille <akim@epita.fr>
11744
11745 Playing with autoscan.
11746
11747 * src/reader.c (get_merge_function): Use xstrdup, not strdup.
11748 * src/files.c (skeleton_find): Remove, unused.
11749 * m4/memcmp.m4: New, from the Coreutils 4.5.1.
11750 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Run jm_FUNC_MEMCMP.
11751
11752 2002-09-13 Akim Demaille <akim@epita.fr>
11753
11754 * configure.ac (AM_INIT_AUTOMAKE): Require Automake 1.6.3.
11755 * Makefile.am (AUTOMAKE_OPTIONS): Don't.
11756
11757 2002-09-13 Akim Demaille <akim@epita.fr>
11758
11759 * configure.ac: Require 2.54.
11760 s/jm_FUNC_MALLOC/AC_FUNC_MALLOC/.
11761 s/jm_FUNC_REALLOC/AC_FUNC_REALLOC/.
11762 * m4/c-bs-a.m4, m4/malloc.m4, m4/mbstate_t.m4, m4/realloc.m4:
11763 Remove, provided by Autoconf macros.
11764
11765 2002-09-12 Akim Demaille <akim@epita.fr>
11766
11767 * m4/prereq.m4: Update, from Coreutils 4.5.1.
11768
11769 2002-09-12 Akim Demaille <akim@epita.fr>
11770
11771 * m4/prereq.m4: Update, from Fileutils 4.1.5.
11772 * configure.ac (jm_PREREQ_TEMPNAME): Invoke it.
11773 Reported by Martin Mokrejs.
11774
11775 2002-09-10 Akim Demaille <akim@epita.fr>
11776
11777 * src/parse-gram.y: Associate a human readable string to each
11778 token type.
11779 * tests/regression.at (Invalid inputs): Adjust.
11780
11781 2002-09-10 Gary V. Vaughan <gary@gnu.org>
11782
11783 * tests/Makefile.am ($(srcdir)/package.m4): Bison now ships
11784 with an Autoconf-2.5x style configure.ac.
11785
11786 2002-09-06 Paul Eggert <eggert@twinsun.com>
11787
11788 * doc/bison.texinfo (Conditions): Make explicit that the GPL
11789 exception applies only to yacc.c. This is a modification of a
11790 patch originally suggested by Akim Demaille.
11791
11792 2002-09-06 Akim Demaille <akim@epita.fr>
11793
11794 * data/c.m4 (b4_copyright): Move the GPL exception comment from
11795 here to...
11796 * data/yacc.c: here.
11797
11798 * data/lalr1.cc (struct yyltype): Don't define it, since we use
11799 LocationType.
11800 (b4_ltype): Default to yy::Location from location.hh.
11801
11802 2002-09-04 Jim Meyering <jim@meyering.net>
11803
11804 * data/yacc.c: Guard the declaration of yytoknum also with
11805 `#ifdef YYPRINT', so it is declared only when used.
11806
11807 2002-09-04 Akim Demaille <akim@epita.fr>
11808
11809 * configure.in: Rename as...
11810 * configure.ac: this.
11811 Bump to 1.49c.
11812
11813 2002-09-04 Akim Demaille <akim@epita.fr>
11814
11815 * src/assoc.c, src/closure.c, src/gram.c, src/injections.c,
11816 * src/lalr.c, src/LR0.c, src/relation.c, src/tables.c: Don't
11817 translate maintainer only messages.
11818
11819 2002-08-12 Paul Eggert <eggert@twinsun.com>
11820
11821 Version 1.49b.
11822
11823 * Makefile.am (SUBDIRS): Remove intl.
11824 (DISTCLEANFILES): Remove.
11825 * NEWS: Mention that GNU M4 is now required. Clarify what is
11826 meant by "larger grammars". Mention the pt_BR translation.
11827 * configure.in (AC_CHECK_DECLS): Add getenv, getopt.
11828 (AM_GNU_GETTEXT_VERSION): New macro, replacing GETTEXT_VERSION var.
11829 Bump version from 0.11.2 to 0.11.5.
11830 (BISON_PREREQ_STAGE): Remove.
11831 (AM_GNU_GETTEXT): Use external gettext.
11832 (AC_OUTPUT): Remove intl/Makefile.
11833
11834 * config/depcomp, config/install-sh: Sync with Automake 1.6.3.
11835
11836 * data/glr.c: Include string.h, for strlen.
11837 (yyreportParseError): Use size_t for yysize.
11838 (yy_yypstack): No longer nested inside yypstates, as nested
11839 functions are not portable. Do not assume size_t is the
11840 same width as int.
11841 (yypstates): Do not assume that ptrdiff_t is the same width
11842 as int, and similarly for yyposn and YYINDEX.
11843
11844 * data/yacc.c: Fix comment about `$$ = $1': it can copy garbage.
11845
11846 * lib/Makefile.am (INCLUDES): Do not include from the intl
11847 directory, which has been removed.
11848 * src/Makefile.am (INCLUDES): Likewise.
11849
11850 * lib/Makefile.am (libbison_a_SOURCES): Add unlocked-io.h.
11851 (bitsets_sources, additional_bitsets_sources, timevars_sources):
11852 New vars.
11853
11854 * lib/Makefile.am (libbison_a_SOURCES): Avoid +=, a GNU make extension.
11855 * tests/Makefile.am (EXTRA_DIST): Likewise.
11856
11857 * lib/abitset.c (abitset_reverse_list, ebitset_reverse_list):
11858 Do not assume that bitset_windex is the same width as unsigned.
11859
11860 * lib/abitset.c (abitset_unused_clear): Do not assume that
11861 bitset_word is the same width as int.
11862 * lib/bbitset.h (BITSET_INDEX_MAX, BITSET_MSB): Likewise.
11863 * lib/bitset.h (bitset_set, bitset_reset): Likewise.
11864 * lib/bitset_stats.c (bitset_stats_set, bitset_stats_reset): Likewise.
11865 * lib/ebitset.c (ebitset_set, ebitset_reset): Likewise.
11866 * lib/lbitset.c (lbitset_set, lbitset_reset): Likewise.
11867
11868 * lib/abitset.c (abitset_op1): Use -1, not ~0, as memset arg (for
11869 portability to one's complement hosts!).
11870 * lib/ebitset.c (ebitset_op1): Likewise.
11871 * lib/lbitset.c (lbitset_op1): Likewise.
11872
11873 * lib/argmatch.c, lib/quotearg.c, quotearg.h: Sync with GNU tar.
11874 * lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
11875 lib/hash.c, lib/hash.h, lib/strnlen.c, lib/xmalloc.c:
11876 Sync with fileutils.
11877 * lib/error.c, lib/getopt.c, lib/getopt.h, lib/getopt1.c,
11878 lib/gettext.h: Sync with diffutils.
11879
11880 * lib/memrchr.c, lib/mkstemp.c, lib/strchr.c, lib/strnlen.c,
11881 lib/strspn.c, lib/tempname.c: Use GPL, not LGPL.
11882
11883 * lib/obstack.c, lib/obstack.h: Sync with fileutils, except use
11884 PROTOTYPES to check for prototypes, and "defined __STDC__" to
11885 check for void *.
11886
11887 * lib/bbitset.h (BITSET_WORD_BITS): Now of type unsigned, not
11888 size_t; the old version tried to do this but casted improperly.
11889 (bitset_bindex, bitset_windex): Now size_t, not unsigned long.
11890 (bitset_test): Now returns int, not unsigned long.
11891
11892 * lib/bitset_stats.c: Include "gettext.h".
11893 (_): New macro.
11894 (bitset_stats_set, bitset_stats_reset, bitset_stats_test): Don't
11895 name locals "index", as it generates unnecessary warnings on some
11896 hosts that have an "index" function.
11897
11898 * lib/bitset_stats.c (bitset_stats_print_1, bitset_stats_print,
11899 bitset_stats_read, bitset_stats_write): Wrap strings in _() if
11900 they need translation.
11901 * src/LR0.c (state_list_append, new_itemsets, get_state,
11902 append_states, generate_states): Likewise.
11903 * src/assoc.c (assoc_to_string): Likewise.
11904 * src/closure.c (print_closure, set_firsts, closure): Likewise.
11905 * src/gram.c (grammar_dump): Likewise.
11906 * src/injections.c (injections_compute): Likewise.
11907 * src/lalr.c (lookaheads_print): Likewise.
11908 * src/relation.c (relation_transpose): Likewise.
11909 * src/scan-gram.l: Likewise.
11910 * src/tables.c (table_grow, pack_vector): Likewise.
11911
11912 * m4/Makefile.am (EXTRA_DIST): Remove codeset.m4,
11913 glibc21.m4, isc-posix.m4 lcmessage.m4, stage.m4.
11914 * m4/malloc.m4, m4/realloc.m4: Sync with diffutils.
11915 * m4/mbstate_t.m4: Sync with fileutils.
11916 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): AC_MBSTATE_T -> AC_TYPE_MBSTATE_T.
11917
11918 * po/LINGUAS: Add pt_BR.
11919 * po/POTFILES.in: Add src/assoc.c, src/closure.c, src/gram.c,
11920 src/main.c, src/relation.c, src/state.c, lib/bitset_stats.c,
11921 lib/timevar.c.
11922 Use src/parse-gram.y instead of src/parse-gram.c, as the gettext
11923 manual recommends.
11924 Similarly, use src/scan-gram.l instead of src/scan-gram.c.
11925
11926 * src/complain.c (strerror_r): Remove decl; not needed.
11927 (strerror): Use same pattern as ../lib/error.c.
11928
11929 * src/files.c, src/files.h (compute_header_macro): Remove; unused.
11930
11931 * src/gram.c (grammar_dump): Do not assume ptrdiff_t fits in int.
11932
11933 * src/main.c (main): Cast result of bindtextdomain and textdomain
11934 to void, to avoid a GCC warning when --disable-nls is in effect.
11935
11936 * src/scan-gram.l: Use strings rather than escapes when possible,
11937 to minimize the number of warnings from xgettext.
11938 (handle_action_dollar, handle_action_at): Don't use isdigit,
11939 as it mishandles negative chars and it may not work as expected
11940 outside the C locale.
11941
11942 * src/symtab.c (symbol_get): Don't cast LHS of an assignment;
11943 this is a GCC extension and is not portable to other compilers.
11944
11945 * src/system.h (alloca): Use same pattern as ../lib/error.c.
11946 Do not include <ctype.h>; no longer needed.
11947 Do not include <malloc.h>; no longer needed (and generates
11948 warnings on OpenBSD 3.0).
11949
11950 * tests/cxx-type.at (yylex): Do not pass signed char to isupper;
11951 it's not portable.
11952
11953 * tests/regression.at: Do not use 'cc -c input.c -o input';
11954 Sun C rejects this. Instead, use 'cc -c input.c -o input.o'.
11955
11956 * tests/synclines.at (AC_SYNCLINES_COMPILE): Accept any nonzero
11957 exit status as failure, not just exit status 1. Sun C exits
11958 with status 2 sometimes.
11959
11960 * tests/torture.at (AT_INCREASE_DATA_SIZE): New macro.
11961 Use it for the two large tests.
11962
11963 2002-08-02 Akim Demaille <akim@epita.fr>
11964
11965 * src/conflicts.c (conflicts_output): Don't output rules never
11966 reduced here, since anyway that computation doesn't work.
11967 * src/gram.h, src/gram.h (rule_filter_t, rule_useful_p)
11968 (rule_useless_p, rule_never_reduced_p): New.
11969 (grammar_rules_partial_print): Use a filter instead of a range.
11970 Display the title only if needed.
11971 (grammar_rules_print): Adjust.
11972 (grammar_rules_never_reduced_report): New.
11973 * src/tables.c (action_row): Move the computation of rules never
11974 reduced to...
11975 (token_actions): here.
11976 * src/main.c (main): Make the parser before making the report, so
11977 that rules never reduced are computed.
11978 Call grammar_rules_never_reduced_report.
11979 * src/print.c (print_results): Report rules never reduced.
11980 * tests/conflicts.at, tests/reduce.at: Adjust.
11981
11982 2002-08-01 Akim Demaille <akim@epita.fr>
11983
11984 Instead of attaching lookaheads and duplicating the rules being
11985 reduced by a state, attach the lookaheads to the reductions.
11986
11987 * src/state.h (state_t): Remove the `lookaheads',
11988 `lookaheads_rule' member.
11989 (reductions_t): Add a `lookaheads' member.
11990 Use a regular array for the `rules'.
11991 * src/state.c (reductions_new): Initialize the lookaheads member
11992 to 0.
11993 (state_rule_lookaheads_print): Adjust.
11994 * src/state.h, src/state.c (state_reductions_find): New.
11995 * src/conflicts.c (resolve_sr_conflict, set_conflicts)
11996 (count_rr_conflicts): Adjust.
11997 * src/lalr.c (LArule): Remove.
11998 (add_lookback_edge): Adjust.
11999 (state_lookaheads_count): New.
12000 (states_lookaheads_initialize): Merge into...
12001 (initialize_LA): this.
12002 (lalr_free): Adjust.
12003 * src/main.c (main): Don't free nullable and derives too early: it
12004 is used by --verbose.
12005 * src/print.c, src/print_graph.c, src/tables.c: Adjust.
12006
12007 2002-08-01 Akim Demaille <akim@epita.fr>
12008
12009 * src/derives.h, src/derives.c (derives): A `rule_t***' instead of
12010 `rule_number_t**'.
12011 (set_derives, free_derives): Rename as...
12012 (derives_compute, derives_free): this.
12013 Adjust all dependencies.
12014 * src/nullable.c (set_nullable, free_nullable): Rename as...
12015 (nullable_compute, nullable_free): these.
12016 (rule_list_t): Store rule_t *, not rule_number_t.
12017 * src/state.c (state_rule_lookaheads_print): Directly compare rule
12018 pointers, instead of their numbers.
12019 * src/main.c (main): Call nullable_free, and derives_free earlier,
12020 as they were lo longer used.
12021
12022 2002-08-01 Akim Demaille <akim@epita.fr>
12023
12024 * lib/timevar.c (get_time): Include children time.
12025 * src/lalr.h (LA, LArule): Don't export them: used with the
12026 state_t.
12027 * src/lalr.c (LA, LArule): Static.
12028 * src/lalr.h, src/lalr.c (lalr_free): New.
12029 * src/main.c (main): Call it.
12030 * src/tables.c (pack_vector): Check whether loc is >= to the
12031 table_size, not >.
12032 (pack_tables): Don't free froms, tos, conflict_tos, and pos...
12033 (tables_generate): do it, since that's also it which allocates
12034 them.
12035 Don't free LA and LArule, main does.
12036
12037 2002-07-31 Akim Demaille <akim@epita.fr>
12038
12039 Separate parser tables computation and output.
12040
12041 * src/output.c (nvectors, base_t, base, base_ninf, conflict_table)
12042 (conflict_list, conflict_list_cnt, table, check, table_ninf)
12043 (yydefgoto, yydefact, high): Move to...
12044 * src/tables.h, src/tables.c: here.
12045 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
12046 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
12047 (symbol_number_to_vector_number, nvectors, BASE_MAX, BASE_MIN)
12048 (froms, tos, conflict_tos, tally, width, action_t, ACTION_MAX)
12049 (ACTION_MIN, actrow, order, nentries, pos, conflrow)
12050 (conflict_list_free, table_size, lowzero, table_grow, conflict_row)
12051 (action_row, save_row, token_actions, save_column, default_goto)
12052 (goto_actions, sort_actions, matching_state, pack_vector)
12053 (table_ninf_remap, pack_table, prepare_actions): Move to...
12054 * src/tables.c: here.
12055 * src/tables.h, src/tables.c(tables_generate, tables_free): New.
12056 * src/output.c (token_actions, output_base, output_conflicts)
12057 (output_check): Merge into...
12058 (prepare_actions): this.
12059 (actions_output): Rename as...
12060 (user_actions_output): this.
12061 * src/main.c (main): Call tables_generate and tables_free.
12062
12063 2002-07-31 Akim Demaille <akim@epita.fr>
12064
12065 Steal GCC's --time-report support.
12066
12067 * lib/timevar.c, lib/timevar.h, lib/timevar.def: New,
12068 stolen/adjusted from GCC.
12069 * m4/stage.m4: Remove time related checks.
12070 * m4/timevar.m4: New.
12071 * configure.in: Adjust.
12072 * src/system.h: Adjust to using timevar.h.
12073 * src/getargs.h, src/getargs.c: Support trace_time for
12074 --trace=time.
12075 * src/main.c (stage): Remove.
12076 (main): Replace `stage' invocations with timevar calls.
12077 * src/output.c: Insert pertinent timevar calls.
12078
12079 2002-07-31 Akim Demaille <akim@epita.fr>
12080
12081 Let --trace have arguments.
12082
12083 * src/getargs.h (enum trace_e): New.
12084 * src/getargs.c (trace_args, trace_types, trace_argmatch): New.
12085 (long_options, short_options): --trace/-T takes an optional
12086 argument.
12087 Change all the uses of trace_flag to reflect the new flags.
12088 * tests/sets.at (Firsts, Nullable, Broken Closure): Use --trace=sets.
12089
12090 Strengthen `stage' portability.
12091
12092 * m4/stage.m4 (BISON_PREREQ_STAGE): New.
12093 * configure.in: Use it.
12094 Don't check for malloc.h and sys/times.h.
12095 * src/system.h: Include them when appropriate.
12096 * src/main.c (stage): Compile only when mallinfo, struct mallinfo,
12097 times and struct tms are available.
12098
12099 2002-07-30 Akim Demaille <akim@epita.fr>
12100
12101 In verbose parse error message, don't report `error' as an
12102 expected token.
12103 * tests/actions.at (Printers and Destructors): Adjust.
12104 * tests/calc.at (Calculator $1): Adjust.
12105 * data/yacc.c, data/glr.c, data/lalr1.c: When making the verbose
12106 error message, do not report the parser accepts the error token in
12107 that state.
12108
12109 2002-07-30 Akim Demaille <akim@epita.fr>
12110
12111 Normalize conflict related messages.
12112
12113 * src/complain.h, src/complain.c (warn, complain): New.
12114 * src/conflicts.c (conflicts_print): Use them.
12115 (conflict_report_yacc): New, extracted from...
12116 (conflicts_print): here.
12117 * tests/conflicts.at, tests/existing.at: Adjust.
12118
12119 2002-07-30 Akim Demaille <akim@epita.fr>
12120
12121 Report rules which are never reduced by the parser: those hidden
12122 by conflicts.
12123
12124 * src/LR0.c (save_reductions): Don't make the final state too
12125 different: save its reduction (accept) instead of having a state
12126 without any action (no shift or goto, no reduce).
12127 Note: the final state is now a ``regular'' state, i.e., the
12128 parsers now contain `reduce 0' as default reduction.
12129 Nevertheless, since they decide to `accept' when yystate =
12130 final_state, they still will not reduce rule 0.
12131 * src/print.c (print_actions, print_reduction): Adjust.
12132 * src/output.c (action_row): Track reduced rules.
12133 (token_actions): Report rules never reduced.
12134 * tests/conflicts.at, tests/regression.at: Adjust.
12135
12136 2002-07-30 Akim Demaille <akim@epita.fr>
12137
12138 `stage' was accidently included in a previous patch.
12139 Initiate its autoconfiscation.
12140
12141 * configure.in: Look for malloc.h and sys/times.h.
12142 * src/main.c (stage): Adjust.
12143 Report only when trace_flag.
12144
12145 2002-07-29 Akim Demaille <akim@epita.fr>
12146
12147 * src/state.h, src/state.c (transitions_t): Holds state_t*'s, not
12148 state_number_t.
12149 (errs_t): symbol_t*, not symbol_number_t.
12150 (reductions_t): rule_t*, not rule_number_t.
12151 (FOR_EACH_SHIFT): New.
12152 * src/LR0.c, src/conflicts.c, src/lalr.c, src/output.c
12153 * src/print.c, src/print_graph.c: Adjust.
12154
12155 2002-07-29 Akim Demaille <akim@epita.fr>
12156
12157 Use $accept and $end, as BYacc and BTYacc do, instead of $axiom and $.
12158
12159 * src/symtab.h, src/symtab.c (eoftoken, axiom): Rename as...
12160 (endtoken, accept): these.
12161 * src/reader.c (reader): Set endtoken's default tag to "$end".
12162 Set undeftoken's tag to "$undefined" instead of "$undefined.".
12163 * doc/bison.texinfo (Table of Symbols): Mention $accept and $end.
12164 Adjust.
12165
12166 2002-07-29 Akim Demaille <akim@epita.fr>
12167
12168 * src/reduce.c (reduce_grammar): When the language is empty,
12169 complain about the start symbol, not the axiom.
12170 Use its location.
12171 * tests/reduce.at (Empty Language): New.
12172
12173 2002-07-26 Akim Demaille <akim@epita.fr>
12174
12175 * src/reader.h, src/reader.c (gram_error): ... can't get
12176 yycontrol without making too strong assumptions on the parser
12177 itself.
12178 * src/output.c (prepare_tokens): Use the real 0th value of
12179 token_translations instead of `0'.
12180 * src/parse-gram.y (yyerror): Don't rely on yycontrol being
12181 visible here.
12182 * data/yacc.c (yyreport_parse_error): Rename yylocation as yylloc
12183 for the time being: %locations ought to provide it to yyerror.
12184
12185 2002-07-25 Akim Demaille <akim@epita.fr>
12186
12187 * src/output.c (prepare_tokens): Go up to ntokens, not ntokens + 1.
12188 * doc/bison.texinfo (Decl Summary): s/$illegal/$undefined./.
12189 * tests/regression.at (Web2c Actions): Adjust.
12190
12191 2002-07-25 Akim Demaille <akim@epita.fr>
12192
12193 Stop storing rules from 1 to nrules + 1.
12194
12195 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c, src/lalr.c
12196 * src/nullable.c, src/output.c, src/print.c, src/reader.c
12197 * src/reduce.c: Allocate and free from &rules[0], not &rules[1].
12198 Iterate from 0 to nrules.
12199 Use rule_number_as_item_number and item_number_as_rule_number.
12200 Adjust to `derive' now containing possibly 0.
12201 * src/gram.h (rule_number_as_item_number, item_number_as_rule_number):
12202 Handle the `- 1' part in rule numbers from/to item numbers.
12203 * src/conflicts.c (log_resolution): Fix the message which reversed
12204 shift and reduce.
12205 * src/output.c (action_row): Initialize default_rule to -1.
12206 (token_actions): Adjust.
12207 * tests/sets.at (Nullable, Firsts): Fix the previously bogus
12208 expected output.
12209 * tests/conflicts.at (Resolved SR Conflicts): Likewise.
12210
12211 2002-07-25 Akim Demaille <akim@epita.fr>
12212
12213 * data/c.m4 (b4_c_function, b4_c_ansi_args, b4_c_ansi_arg)
12214 (b4_c_knr_arg_names, b4_c_knr_arg_name, b4_c_knr_arg_decls)
12215 (b4_c_knr_arg_decl): New.
12216 * data/yacc.c: Use it to define yysymprint, yydestruct, and
12217 yyreport_parse_error.
12218
12219 2002-07-25 Akim Demaille <akim@epita.fr>
12220
12221 * data/yacc.c (yyreport_parse_error): New, extracted from...
12222 (yyparse): here.
12223 (yydestruct, yysymprint): Move above yyparse.
12224 Be K&R compliant.
12225
12226 2002-07-25 Akim Demaille <akim@epita.fr>
12227
12228 * data/c.m4 (b4_ints_in, b4_int_type, b4_int_type_for): New,
12229 replace...
12230 (b4_sint_type, b4_uint_type): these.
12231 * data/yacc.c, data/glr.c, data/lalr1.cc: Use b4_int_type_for.
12232 * tests/regression.at (Web2c Actions): Adjust.
12233
12234 2002-07-25 Akim Demaille <akim@epita.fr>
12235
12236 * src/gram.h (TIEM_NUMBER_MAX): New.
12237 (item_number_of_rule_number, rule_number_of_item_number): Rename
12238 as...
12239 (rule_number_as_item_number, item_number_as_rule_number): these.
12240 Adjust dependencies.
12241 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
12242 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
12243 (symbol_number_to_vector_number): New.
12244 (order): Of vector_number_t* type.
12245 (base_t, BASE_MAX, BASE_MIN): New.
12246 (froms, tos, width, pos, check): Of base_t type.
12247 (action_number_t, ACTION_MIN, ACTION_MAX): New.
12248 (actrow): Of action_number_t type.
12249 (conflrow): Of unsigned int type.
12250 (table_ninf, base_ninf): New.
12251 (GENERATE_MUSCLE_INSERT_TABLE): Also output the `*_min' value.
12252 (muscle_insert_int_table, muscle_insert_base_table)
12253 (muscle_insert_rule_number_table): New.
12254 (prepare_tokens): Output `toknum' as int_table.
12255 (action_row): Returns a rule_number_t.
12256 Use ACTION_MIN, not SHRT_MIN.
12257 (token_actions): yydefact is rule_number_t*.
12258 (table_ninf_remap): New.
12259 (pack_table): Use it for `base' and `table'.
12260 * data/yacc.c, data/glr.c, data/lalr1.cc (YYFLAG): Remove,
12261 replaced with...
12262 (YYPACT_NINF, YYTABLE_NINF): these.
12263 (yypact, yytable): Compute their types instead of hard-coded
12264 `short'.
12265 * tests/regression.at (Web2c Actions): Adjust.
12266
12267 2002-07-19 Akim Demaille <akim@epita.fr>
12268
12269 * src/scan-gram.l (id): Can start with an underscore.
12270
12271 2002-07-16 Akim Demaille <akim@epita.fr>
12272
12273 * src/assoc.c, src/asssoc.h (assoc_t, assoc_to_string): New.
12274 Adjust all former `associativity' dependencies.
12275 * src/symtab.c (symbol_new): Default associativity is `undef', not
12276 `right'.
12277 (symbol_check_alias_consistence): Adjust.
12278
12279 2002-07-09 Akim Demaille <akim@epita.fr>
12280
12281 * doc/bison.texinfo: Properly set the ``header'' part.
12282 Use @dircategory ``GNU programming tools'' as per Texinfo's
12283 documentation.
12284 Use @copying.
12285
12286 2002-07-09 Akim Demaille <akim@epita.fr>
12287
12288 * lib/quotearg.h: Protect against multiple inclusions.
12289 * src/location.h (location_t): Add a `file' member.
12290 (LOCATION_RESET, LOCATION_PRINT): Adjust.
12291 * src/complain.c (warn_at, complain_at, fatal_at): Drop
12292 `error_one_per_line' support.
12293
12294 2002-07-09 Akim Demaille <akim@epita.fr>
12295
12296 * src/complain.h, src/complain.c (warn, complain): Remove, unused.
12297 * src/reader.c (lineno): Remove.
12298 Adjust all dependencies.
12299 (get_merge_function): Take a location and use complain_at.
12300 * src/symtab.h, src/symtab.c (symbol_make_alias): Likewise.
12301 * tests/regression.at (Invalid inputs, Mixing %token styles):
12302 Adjust.
12303
12304 2002-07-09 Akim Demaille <akim@epita.fr>
12305
12306 * src/parse-gram.y (rules_or_grammar_declaration): Add an error
12307 recovery rule, and forbid extensions when --yacc.
12308 (gram_error): Use complain_at.
12309 * src/reader.c (reader): Exit if there were parse errors.
12310
12311 2002-07-09 Akim Demaille <akim@epita.fr>
12312
12313 * tests/synclines.at (AT_SYNCLINES_COMPILE): New.
12314 (AT_TEST_SYNCLINE): Adjust to unusual GCC outputs.
12315 Reported by R Blake <blakers@mac.com>.
12316
12317 2002-07-09 Akim Demaille <akim@epita.fr>
12318
12319 * data/yacc.c: Output the copyright notive in the header.
12320
12321 2002-07-03 Akim Demaille <akim@epita.fr>
12322
12323 * src/output.c (froms, tos): Are state_number_t.
12324 (save_column): sp, sp1, and sp2 are state_number_t.
12325 (prepare): Rename `final' as `final_state_number', `nnts' as
12326 `nterms_number', `nrules' as `rules_number', `nstates' as
12327 `states_number', and `ntokens' as `tokens_number'. Remove `nsym',
12328 unused.
12329 * data/yacc.c, data/glr.c, data/lalr1.cc: Adjust.
12330 * data/lalr1.cc (nsym_): Remove, unused.
12331
12332 2002-07-03 Akim Demaille <akim@epita.fr>
12333
12334 * src/lalr.h, src/lalr.c (goto_number_t): New.
12335 * src/lalr.c (goto_list_t): New.
12336 Propagate them.
12337 * src/nullable.c (rule_list_t): New.
12338 Propagate.
12339 * src/types.h: Remove.
12340
12341 2002-07-03 Akim Demaille <akim@epita.fr>
12342
12343 * src/closure.c (print_fderives): Use rule_rhs_print.
12344 * src/derives.c (print_derives): Use rule_rhs_print.
12345 (rule_list_t): New, replaces `shorts'.
12346 (set_derives): Add comments.
12347 * tests/sets.at (Nullable, Firsts): Adjust.
12348
12349 2002-07-03 Akim Demaille <akim@epita.fr>
12350
12351 * src/output.c (prepare_actions): Free `tally' and `width'.
12352 (prepare_actions): Allocate and free `order'.
12353 * src/symtab.c (symbols_free): Free `symbols'.
12354 * src/scan-gram.l (scanner_free): Clear Flex's scanners memory.
12355 * src/output.c (m4_invoke): Move to...
12356 * src/scan-skel.l: here.
12357 (<<EOF>>): Close yyout, and free its name.
12358
12359 2002-07-03 Akim Demaille <akim@epita.fr>
12360
12361 Fix some memory leaks, and fix a bug: state 0 was examined twice.
12362
12363 * src/LR0.c (new_state): Merge into...
12364 (state_list_append): this.
12365 (new_states): Merge into...
12366 (generate_states): here.
12367 (set_states): Don't ensure a proper `errs' state member here, do it...
12368 * src/conflicts.c (conflicts_solve): here.
12369 * src/state.h, src/state.c: Comment changes.
12370 (state_t): Rename member `shifts' as `transitions'.
12371 Adjust all dependencies.
12372 (errs_new): For consistency, also take the values as argument.
12373 (errs_dup): Remove.
12374 (state_errs_set): New.
12375 (state_reductions_set, state_transitions_set): Assert that no
12376 previous value was assigned.
12377 (state_free): New.
12378 (states_free): Use it.
12379 * src/conflicts.c (resolve_sr_conflict): Don't use an `errs_t' as
12380 temporary storage: use `errs' and `nerrs' as elsewhere.
12381 (set_conflicts): Allocate and free this `errs'.
12382
12383 2002-07-02 Akim Demaille <akim@epita.fr>
12384
12385 * lib/libiberty.h: New.
12386 * lib: Update the bitset implementation from upstream.
12387 * src/closure.c, src/lalr.c, src/output.c, src/print_graph.c,
12388 * src/state.c: Use BITSET_FOR_EACH, not BITSET_EXECUTE.
12389 * src/main.c: Adjust bitset stats calls.
12390
12391 2002-07-01 Paul Eggert <eggert@twinsun.com>
12392
12393 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>): Convert to unsigned
12394 char, so that negative chars don't collide with $.
12395
12396 2002-06-30 Akim Demaille <akim@epita.fr>
12397
12398 Have the GLR tests be `warning' checked, and fix the warnings.
12399
12400 * data/glr.c (YYFPRINTF): Always define it, not only when YYDEBUG
12401 (yyuserAction, yyreportAmbiguity): `Use' all the arguments.
12402 (yyremoveDeletes): `yyi' and `yyj' are size_t.
12403 Use YYFPRINTF when under if (YYDEBUG) to avoid empty `if' bodies.
12404 (yyaddDeferredAction): static.
12405 (yyglrReduce): yyi, yyk, amd yyposn are size_t.
12406 (yyreportParseError): yyprefix is const.
12407 yytokenp is used only when verbose.
12408 (yy__GNUC__): Replace with __GNUC__.
12409 (yypdumpstack): yyi is size_t.
12410 (yypreference): Un-yy local variables and arguments, to avoid
12411 clashes with `yyr1'. Anyway, we are not in the user name space.
12412 (yytname_size): be an int, as is compared with ints.
12413 * tests/testsuite.at (AT_COMPILE, AT_PARSER_CHECK): New.
12414 Use them.
12415 * tests/cxx-gram.at: Use quotation to protect $1.
12416 Use AT_COMPILE to enable warnings hunts.
12417 Prototype yylex and yyerror.
12418 `Use' argc.
12419 Include `string.h', not `strings.h'.
12420 Produce and prototype stmtMerge only when used.
12421 yylex takes a location.
12422
12423 2002-06-30 Akim Demaille <akim@epita.fr>
12424
12425 We spend a lot of time in quotearg, in particular when --verbose.
12426
12427 * src/symtab.c (symbol_get): Store a quoted version of the key.
12428 (symbol_tag_get, symbol_tag_get_n, symbol_tag_print): Remove.
12429 Adjust all callers.
12430
12431 2002-06-30 Akim Demaille <akim@epita.fr>
12432
12433 * src/state.h (reductions_t): Rename member `nreds' as num.
12434 (errs_t): Rename members `nerrs' and `errs' as `num' and `symbols'.
12435 * src/state.c (ERRS_ALLOC, REDUCTIONS_ALLOC): Use the correct types.
12436
12437 2002-06-30 Akim Demaille <akim@epita.fr>
12438
12439 * src/state.h, src/state.c (shift_t, SHIFT_SYMBOL, SHIFT_IS_SHIFT)
12440 (SHIFT_IS_GOTO, SHIFT_IS_ERROR, SHIFT_DISABLE, SHIFT_IS_DISABLED)
12441 (shifts_to): Rename as...
12442 (transition_t, TRANSITION_SYMBOL, TRANSITION_IS_TRANSITION)
12443 (TRANSITION_IS_GOTO, TRANSITION_IS_ERROR, TRANSITION_DISABLE)
12444 (TRANSITION_IS_DISABLED, transitions_to): these.
12445
12446 2002-06-30 Akim Demaille <akim@epita.fr>
12447
12448 * src/print.c (print_shifts, print_gotos): Merge into...
12449 (print_transitions): this.
12450 (print_transitions, print_errs, print_reductions): Align the
12451 lookaheads columns.
12452 (print_core, print_transitions, print_errs, print_state,
12453 print_grammar): Output empty lines separator before, not after.
12454 (state_default_rule_compute): Rename as...
12455 (state_default_rule): this.
12456 * tests/conflicts.at (Defaulted Conflicted Reduction),
12457 (Unresolved SR Conflicts, Resolved SR Conflicts): Adjust.
12458 * tests/regression.at (Rule Line Numbers, Web2c Report): Adjust.
12459
12460 2002-06-30 Akim Demaille <akim@epita.fr>
12461
12462 Display items as we display rules.
12463
12464 * src/gram.h, src/gram.c (rule_lhs_print): New.
12465 * src/gram.c (grammar_rules_partial_print): Use it.
12466 * src/print.c (print_core): Likewise.
12467 * tests/conflicts.at (Defaulted Conflicted Reduction),
12468 (Unresolved SR Conflicts): Adjust.
12469 (Unresolved SR Conflicts): Adjust and rename as...
12470 (Resolved SR Conflicts): this, as was meant.
12471 * tests/regression.at (Web2c Report): Adjust.
12472
12473 2002-06-30 Akim Demaille <akim@epita.fr>
12474
12475 * src/print.c (state_default_rule_compute): New, extracted from...
12476 (print_reductions): here.
12477 Pessimize, but clarify the code.
12478 * tests/conflicts.at (Defaulted Conflicted Reduction): New.
12479
12480 2002-06-30 Akim Demaille <akim@epita.fr>
12481
12482 * src/output.c (action_row): Let default_rule be always a rule
12483 number.
12484
12485 2002-06-30 Akim Demaille <akim@epita.fr>
12486
12487 * src/closure.c (print_firsts, print_fderives, closure):
12488 Use BITSET_EXECUTE.
12489 * src/lalr.c (lookaheads_print): Likewise.
12490 * src/state.c (state_rule_lookaheads_print): Likewise.
12491 * src/print_graph.c (print_core): Likewise.
12492 * src/print.c (print_reductions): Likewise.
12493 * src/output.c (action_row): Likewise.
12494 Use SHIFT_IS_DISABLED, SHIFT_IS_SHIFT and SHIFT_SYMBOL.
12495
12496 2002-06-30 Akim Demaille <akim@epita.fr>
12497
12498 * src/print_graph.c: Use report_flag.
12499
12500 2002-06-30 Akim Demaille <akim@epita.fr>
12501
12502 * src/lalr.c (traverse, digraph, matrix_print, transpose): Move
12503 to...
12504 * src/relation.h, src/relation.c (traverse, relation_digraph)
12505 (relation_print, relation_transpose): New.
12506
12507 2002-06-30 Akim Demaille <akim@epita.fr>
12508
12509 * src/state.h, src/state.c (shifts_to): New.
12510 * src/lalr.c (build_relations): Use it.
12511
12512 2002-06-30 Akim Demaille <akim@epita.fr>
12513
12514 * src/gram.h (rule_number_t, RULE_NUMBER_MAX, int_of_rule_number)
12515 (item_number_of_rule_number, rule_number_of_item_number): New.
12516 * src/LR0.c, src/closure.c, src/derives.c, src/derives.h,
12517 * src/gram.c, src/lalr.c, src/nullable.c, src/output.c, src/print.c,
12518 * src/print_graph.c, src/reader.c, src/reduce.c, src/reduce.h:
12519 Propagate their use.
12520 Much remains to be done, in particular wrt `shorts' from types.h.
12521
12522 2002-06-30 Akim Demaille <akim@epita.fr>
12523
12524 * src/symtab.c (symbol_new): Initialize the `printer' member.
12525
12526 2002-06-30 Akim Demaille <akim@epita.fr>
12527
12528 * src/LR0.c (save_reductions): Remove, replaced by...
12529 * src/state.h, src/state.c (state_reductions_set): New.
12530 (reductions, errs): Rename as...
12531 (reductions_t, errs_t): these.
12532 Adjust all dependencies.
12533
12534 2002-06-30 Akim Demaille <akim@epita.fr>
12535
12536 * src/LR0.c (state_list_t, state_list_append): New.
12537 (first_state, last_state): Now symbol_list_t.
12538 (this_state): Remove.
12539 (new_itemsets, append_states, save_reductions): Take a state_t as
12540 argument.
12541 (set_states, generate_states): Adjust.
12542 (save_shifts): Remove, replaced by...
12543 * src/state.h, src/state.c (state_shifts_set): New.
12544 (shifts): Rename as...
12545 (shifts_t): this.
12546 Adjust all dependencies.
12547 * src/state.h (state_t): Remove the `next' member.
12548
12549 2002-06-30 Akim Demaille <akim@epita.fr>
12550
12551 * src/vcg.c (quote): Use slot 2, since we often pass symbol tag
12552 escaped in slot 0.
12553
12554 2002-06-30 Akim Demaille <akim@epita.fr>
12555
12556 Use hash.h for the state hash table.
12557
12558 * src/LR0.c (STATE_HASH_SIZE, state_hash): Remove.
12559 (allocate_storage): Use state_hash_new.
12560 (free_storage): Use state_hash_free.
12561 (new_state, get_state): Adjust.
12562 * src/lalr.h, src/lalr.c (states): Move to...
12563 * src/states.h (state_t): Remove the `link' member, no longer
12564 used.
12565 * src/states.h, src/states.c: here.
12566 (state_hash_new, state_hash_free, state_hash_lookup)
12567 (state_hash_insert, states_free): New.
12568 * src/states.c (state_table, state_compare, state_hash): New.
12569 * src/output.c (output_actions): Do not free states now, since we
12570 still need to know the final_state number in `prepare', called
12571 afterwards. Do it...
12572 * src/main.c (main): here: call states_free after `output'.
12573
12574 2002-06-30 Akim Demaille <akim@epita.fr>
12575
12576 * src/state.h, src/state.c (state_new): New, extracted from...
12577 * src/LR0.c (new_state): here.
12578 * src/state.h (STATE_ALLOC): Move to...
12579 * src/state.c: here.
12580 * src/LR0.h, src/LR0.c (nstates, final_state): Move to...
12581 * src/state.h, src/state.c: here.
12582
12583 2002-06-30 Akim Demaille <akim@epita.fr>
12584
12585 * src/reader.c (gensym): Rename as...
12586 * src/symtab.h, src/symtab.c (dummy_symbol_get): this.
12587 (getsym): Rename as...
12588 (symbol_get): this.
12589
12590 2002-06-30 Akim Demaille <akim@epita.fr>
12591
12592 * src/state.h (state_number_t, STATE_NUMBER_MAX): New.
12593 * src/LR0.c, src/LR0.h, src/conflicts.c, src/lalr.c, src/lalr.h,
12594 * src/output.c, src/print.c, src/print_graph.c: Propagate.
12595 * src/LR0.h, src/LR0.h (final_state): Is a state_t*.
12596
12597 2002-06-30 Akim Demaille <akim@epita.fr>
12598
12599 Make the test suite pass with warnings checked.
12600
12601 * tests/actions.at (Printers and Destructors): Improve.
12602 Avoid unsigned vs. signed issues.
12603 * tests/calc.at: Don't exercise the scanner here, do it...
12604 * tests/input.at (Torturing the Scanner): here.
12605
12606 2002-06-28 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
12607
12608 * data/glr.c: Correct typo in Emacs-mode directive. Slightly
12609 reorganize first lines parallel to yacc.c.
12610
12611 2002-06-28 Akim Demaille <akim@epita.fr>
12612
12613 * data/c.m4 (b4_copyright, b4_sint_type, b4_uint_type, b4_token_define)
12614 (b4_token_enum, b4_token_defines): New, factored from...
12615 * data/lalr1.cc, data/yacc.c, glr.c: here.
12616
12617 2002-06-28 Akim Demaille <akim@epita.fr>
12618
12619 * data/yacc.c (yydestruct, yysymprint): Pacify GCC warnings for
12620 unused variables.
12621 * src/output.c (merger_output): static.
12622
12623 2002-06-28 Akim Demaille <akim@epita.fr>
12624
12625 * src/reader.h: s/grammer_current_rule_merge_set/grammar_.../.
12626 * src/conflicts.c (conflicts_total_count): `i' is unsigned, to
12627 pacify GCC.
12628 * src/output.c (save_row): Initialize all the variables to pacify GCC.
12629
12630 2002-06-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
12631
12632 Accumulated changelog for new GLR parsing features.
12633
12634 * src/conflicts.c (count_total_conflicts): Change name to
12635 conflicts_total_count.
12636 * src/conflicts.h: Ditto.
12637 * src/output.c (token_actions): Use the new name.
12638 (output_conflicts): Change conflp => conflict_list_heads, and
12639 confl => conflict_list for better readability.
12640 * data/glr.c: Use the new names.
12641 * NEWS: Add self to GLR announcement.
12642
12643 * src/reader.c (free_merger_functions): Cleanup: XFREE->free.
12644
12645 * doc/bison.texinfo (GLR Parsers): Make corrections suggested by
12646 Akim Demaille.
12647
12648 * data/bison.glr: Change name to glr.c
12649 * data/glr.c: Renamed from bison.glr.
12650 * data/Makefile.am: Add glr.c
12651
12652 * src/getargs.c:
12653
12654 * src/symlist.h: Add dprec and merger fields to symbol_list_s.
12655 * src/symlist.c (symbol_list_new): Initialize dprec and merger fields.
12656
12657 Originally 2002-06-16 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
12658
12659 * data/bison.glr: Be sure to restore the
12660 current #line when returning to the skeleton contents after having
12661 exposed the input file's #line.
12662
12663 Originally 2002-06-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
12664
12665 * data/bison.glr: Bring up to date with changes to bison.simple.
12666
12667 Originally 2002-06-03 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
12668
12669 * data/bison.glr: Correct definitions that use b4_prefix.
12670 Various reformatting.
12671 (GLRStack): Make yychar (in YYPURE case) and yytokenp as part of stack.
12672 (yyreportParseError, yyrecoverParseError, yyprocessOneStack): remove
12673 yytokenp argument; now part of stack.
12674 (yychar): Define to behave as documented.
12675 (yyclearin): Ditto.
12676
12677 Originally 2002-05-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
12678
12679 * src/reader.h: Add declaration for free_merger_functions.
12680
12681 * src/reader.c (merge_functions): New variable.
12682 (get_merge_function): New function.
12683 (free_merger_functions): New function.
12684 (readgram): Check for %prec that is not followed by a symbol.
12685 Handle %dprec and %merge declarations.
12686 (packgram): Initialize dprec and merger fields in rules array.
12687
12688 * src/output.c (conflict_tos, conflrow, conflict_table, conflict_list,
12689 conflict_list_cnt, conflict_list_free): New variables.
12690 (table_grow): Also grow conflict_table.
12691 (prepare_rules): Output dprec and merger tables.
12692 (conflict_row): New function.
12693 (action_row): Output conflict lists for GLR parser. Don't use
12694 default reduction in conflicted states for GLR parser so that there
12695 are spaces for the conflict lists.
12696 (save_row): Also save conflict information.
12697 (token_actions): Allocate conflict list.
12698 (merger_output): New function.
12699 (pack_vector): Pack conflict table, too.
12700 (output_conflicts): New function to output yyconflp and yyconfl.
12701 (output_check): Allocate conflict_tos.
12702 (output_actions): Output conflict tables, also.
12703 (output_skeleton): Output b4_mergers definition.
12704 (prepare): Output b4_max_rhs_length definition.
12705 Use 'bison.glr' as default skeleton for GLR parsers.
12706
12707 * src/gram.c (glr_parser): New flag.
12708 (grammar_free): Call free_merger_functions.
12709
12710 * src/conflicts.c (count_rr_conflicts): Augment to optionally count
12711 all pairs of conflicting reductions, rather than just all tokens
12712 causing conflicts. Needed to size conflict tables.
12713 (conflicts_output): Modify call to count_rr_conflicts for new
12714 interface.
12715 (conflicts_print): Ditto.
12716 (count_total_conflicts): New function.
12717
12718 * src/reader.h (merger_list): New type.
12719 (merge_functions): New variable.
12720
12721 * src/lex.h (tok_dprec, tok_merge): New token types.
12722
12723 * src/gram.h (rule_s): Add dprec and merger fields.
12724 (glr_parser): New flag.
12725
12726 * src/conflicts.h (count_total_conflicts): New function.
12727
12728 * src/options.c (option_table): Add %dprec, %merge, and %glr-parser.
12729
12730 * doc/bison.texinfo (Generalized LR Parsing): New section.
12731 (GLR Parsers): New section.
12732 (Language and Grammar): Mention GLR parsing.
12733 (Table of Symbols): Add %dprec, %glr-parser, %merge, GLR
12734 Correct typo ("tge" -> "the").
12735
12736 * data/bison.glr: New skeleton for GLR parsing.
12737
12738 * tests/cxx-gram.at: New tests for GLR parsing.
12739
12740 * tests/testsuite.at: Include cxx-gram.at.
12741
12742 * tests/Makefile.am: Add cxx-gram.at.
12743
12744 * src/parse-gram.y:
12745
12746 * src/scan-gram.l: Add %dprec, %glr-parser, %merge.
12747
12748 * src/parse-gram.y: Grammar for %dprec, %merge, %glr-parser.
12749
12750 2002-06-27 Akim Demaille <akim@epita.fr>
12751
12752 * src/options.h, src/options.c: Remove.
12753 * src/getargs.c (short_options, long_options): New.
12754
12755 2002-06-27 Akim Demaille <akim@epita.fr>
12756
12757 * data/bison.simple, data/bison.c++: Rename as...
12758 * data/yacc.c, data/lalr1.cc: these.
12759 * doc/bison.texinfo (Environment Variables): Remove.
12760
12761 2002-06-25 Raja R Harinath <harinath@cs.umn.edu>
12762
12763 * src/getargs.c (report_argmatch): Initialize strtok().
12764
12765 2002-06-20 Akim Demaille <akim@epita.fr>
12766
12767 * data/bison.simple (b4_symbol_actions): New, replaces...
12768 (b4_symbol_destructor, b4_symbol_printer): these.
12769 (yysymprint): Be sure to call YYPRINT only for tokens, and using
12770 user token numbers.
12771
12772 2002-06-20 Akim Demaille <akim@epita.fr>
12773
12774 * data/bison.simple (yydestructor): Rename as...
12775 (yydestruct): this.
12776
12777 2002-06-20 Akim Demaille <akim@epita.fr>
12778
12779 * src/symtab.h, src/symtab.c (symbol_type_set)
12780 (symbol_destructor_set, symbol_precedence_set): The location is
12781 the last argument.
12782 Adjust all callers.
12783
12784 2002-06-20 Akim Demaille <akim@epita.fr>
12785
12786 * src/parse-gram.y (YYPRINT, yyprint): Don't mess with the parser
12787 internals.
12788 * src/reader.h, src/reader.c (grammar_current_rule_prec_set):
12789 Takes a location.
12790 * src/symtab.h, src/symtab.c (symbol_class_set)
12791 (symbol_user_token_number_set): Likewise.
12792 Adjust all callers.
12793 Promote complain_at.
12794 * tests/input.at (Type Clashes): Adjust.
12795
12796 2002-06-20 Akim Demaille <akim@epita.fr>
12797
12798 * data/bison.simple (YYLEX): Fix the declaration when
12799 %pure-parser.
12800
12801 2002-06-20 Akim Demaille <akim@epita.fr>
12802
12803 * data/bison.simple (yysymprint): Don't print the token number,
12804 just its name.
12805 * tests/actions.at (Destructors): Rename as...
12806 (Printers and Destructors): this.
12807 Also exercise %printer.
12808
12809 2002-06-20 Akim Demaille <akim@epita.fr>
12810
12811 * data/bison.simple (YYDSYMPRINT): New.
12812 Use it to remove many of the #if YYDEBUG/if (yydebug).
12813
12814 2002-06-20 Akim Demaille <akim@epita.fr>
12815
12816 * src/symtab.h, src/symtab.c (symbol_t): printer and
12817 printer_location are new members.
12818 (symbol_printer_set): New.
12819 * src/parse-gram.y (PERCENT_PRINTER): New token.
12820 Handle its associated rule.
12821 * src/scan-gram.l: Adjust.
12822 (handle_destructor_at, handle_destructor_dollar): Rename as...
12823 (handle_symbol_code_at, handle_symbol_code_dollar): these.
12824 * src/output.c (symbol_printers_output): New.
12825 (output_skeleton): Call it.
12826 * data/bison.simple (yysymprint): New. Cannot be named yyprint
12827 since there are already many grammar files with a user `yyprint'.
12828 Replace the calls to YYPRINT to calls to yysymprint.
12829 * tests/calc.at: Adjust.
12830 * tests/torture.at (AT_DATA_STACK_TORTURE): Remove YYPRINT: it was
12831 taking advantage of parser very internal details (stack size!).
12832
12833 2002-06-20 Akim Demaille <akim@epita.fr>
12834
12835 * src/scan-gram.l: Complete the scanner with the missing patterns
12836 to pacify Flex.
12837 Use `quote' and `symbol_tag_get' where appropriate.
12838
12839 2002-06-19 Akim Demaille <akim@epita.fr>
12840
12841 * tests/actions.at (Destructors): Augment to test locations.
12842 * data/bison.simple (yydestructor): Pass it the current location
12843 if locations are enabled.
12844 Prototype only when __STDC__ or C++.
12845 Change the argument names to move into the yy name space: there is
12846 user code here.
12847
12848 2002-06-19 Akim Demaille <akim@epita.fr>
12849
12850 * data/bison.simple (b4_pure_if): New.
12851 Use it instead of #ifdef YYPURE.
12852
12853 2002-06-19 Akim Demaille <akim@epita.fr>
12854
12855 * data/bison.simple (b4_location_if): New.
12856 Use it instead of #ifdef YYLSP_NEEDED.
12857
12858 2002-06-19 Akim Demaille <akim@epita.fr>
12859
12860 Prepare @$ in %destructor, but currently don't bind it in the
12861 skeleton, as %location use is not cleaned up yet.
12862
12863 * src/scan-gram.l (handle_dollar, handle_destructor_at)
12864 (handle_action_at): New.
12865 (handle_at, handle_action_dollar, handle_destructor_dollar): Take
12866 a braced_code_t and a location as additional arguments.
12867 (handle_destructor_dollar): Instead of requiring `b4_eval', just
12868 unquote one when outputting `b4_dollar_dollar'.
12869 Adjust callers.
12870 * data/bison.simple (b4_eval): Remove.
12871 (b4_symbol_destructor): Adjust.
12872 * tests/input.at (Invalid @n): Adjust.
12873
12874 2002-06-19 Zack Weinberg <zack@codesourcery.com>
12875
12876 * doc/bison.texinfo: Document ability to have multiple
12877 prologue sections.
12878
12879 2002-06-18 Akim Demaille <akim@epita.fr>
12880
12881 * src/files.c (compute_base_names): When computing the output file
12882 names from the input file name, strip the directory part.
12883
12884 2002-06-18 Akim Demaille <akim@epita.fr>
12885
12886 * data/bison.simple.new: Comment changes.
12887 Reported by Andreas Schwab.
12888
12889 2002-06-18 Matt Kraai <kraai@alumni.cmu.edu>
12890
12891 * data/bison.simple (yyoverflowlab): #ifndef yyoverflow, so that
12892 there are no `label `yyoverflowlab' defined but not used' warnings
12893 when yyoverflow is defined.
12894
12895 2002-06-18 Akim Demaille <akim@epita.fr>
12896
12897 * src/symtab.h, src/symtab.c (symbol_t): destructor_location is a
12898 new member.
12899 (symbol_destructor_set): Adjust.
12900 * src/output.c (symbol_destructors_output): Output the destructor
12901 locations.
12902 Output the symbol name.
12903 * data/bison.simple (b4_symbol_destructor): Adjust.
12904
12905 2002-06-18 Cris Bailiff <c.bailiff@awayweb.com>
12906 and Akim Demaille <akim@epita.fr>
12907
12908 * data/bison.simple.new (yyerrlab1): Be sure to pop and destroy
12909 what's left on the stack when the error recovery hits EOF.
12910 * tests/actions.at (Destructors): Complete to exercise this case.
12911
12912 2002-06-17 Akim Demaille <akim@epita.fr>
12913
12914 * data/m4sugar/m4sugar.m4 (m4_map): Recognize when the list of
12915 arguments is really empty, not only equal to `[]'.
12916 * src/symtab.h, src/symtab.c (symbol_t): `destructor' is a new
12917 member.
12918 (symbol_destructor_set): New.
12919 * src/output.c (symbol_destructors_output): New.
12920 * src/reader.h (brace_code_t, current_braced_code): New.
12921 * src/scan-gram.l (BRACED_CODE): Use it to branch on...
12922 (handle_dollar): Rename as...
12923 (handle_action_dollar): this.
12924 (handle_destructor_dollar): New.
12925 * src/parse-gram.y (PERCENT_DESTRUCTOR): New.
12926 (grammar_declaration): Use it.
12927 * data/bison.simple (yystos): Is always defined.
12928 (yydestructor): New.
12929 * tests/actions.at (Destructors): New.
12930 * tests/calc.at (_AT_CHECK_CALC_ERROR): Don't rely on egrep.
12931
12932 2002-06-17 Akim Demaille <akim@epita.fr>
12933
12934 * src/symlist.h, src/symlist.c (symbol_list_length): New.
12935 * src/scan-gram.l (handle_dollar, handle_at): Compute the
12936 rule_length only when needed.
12937 * src/output.c (actions_output, token_definitions_output): Output
12938 the full M4 block.
12939 * src/symtab.c: Don't access directly to the symbol tag, use
12940 symbol_tag_get.
12941 * src/parse-gram.y: Use symbol_list_free.
12942
12943 2002-06-17 Akim Demaille <akim@epita.fr>
12944
12945 * src/reader.h, src/reader.c (symbol_list, symbol_list_new)
12946 (symbol_list_prepend, get_type_name): Move to...
12947 * src/symlist.h, src/symlist.c (symbol_list_t, symbol_list_new)
12948 (symbol_list_prepend, symbol_list_n_type_name_get): here.
12949 Adjust all callers.
12950 (symbol_list_free): New.
12951 * src/scan-gram.l (handle_dollar): Takes a location.
12952 * tests/input.at (Invalid $n): Adjust.
12953
12954 2002-06-17 Akim Demaille <akim@epita.fr>
12955
12956 * src/reader.h, src/reader.c (symbol_list_new): Export it.
12957 (symbol_list_prepend): New.
12958 * src/parse-gram.y (%union): `list' is a new member.
12959 (symbols.1): New, replaces...
12960 (terms_to_prec.1, nterms_to_type.1): these.
12961 * src/symtab.h, src/symtab.c (symbol_type_set, symbol_precedence_set)
12962 Take a location as additional argument.
12963 Adjust all callers.
12964
12965 2002-06-15 Akim Demaille <akim@epita.fr>
12966
12967 * src/parse-gram.y: Move %token in the declaration section so that
12968 we don't depend upon CVS Bison.
12969
12970 2002-06-15 Akim Demaille <akim@epita.fr>
12971
12972 * src/state.h, src/state.c (state_rule_lookaheads_print): New.
12973 * src/print.c (print_core): Use it.
12974
12975 2002-06-15 Akim Demaille <akim@epita.fr>
12976
12977 * src/conflicts.c (log_resolution): Accept the rule involved in
12978 the sr conflicts instead of the lookahead number that points to
12979 that rule.
12980 (flush_reduce): Accept the current lookahead vector as argument,
12981 instead of the index in LA.
12982 (resolve_sr_conflict): Accept the current number of lookahead
12983 bitset to consider for the STATE, instead of the index in LA.
12984 (set_conflicts): Adjust.
12985 * src/lalr.c, src/lalr.h, src/state.h: Comment changes.
12986
12987 2002-06-15 Akim Demaille <akim@epita.fr>
12988
12989 * src/state.h (state_t): Replace the `lookaheadsp' member, a
12990 short, with `lookaheads' (bitsetv), `lookaheads_rule' (rule_t**).
12991 Adjust all dependencies.
12992 * src/lalr.c (initialize_lookaheads): Split into...
12993 (states_lookaheads_count, states_lookaheads_initialize): these.
12994 (lalr): Adjust.
12995
12996 2002-06-15 Akim Demaille <akim@epita.fr>
12997
12998 * src/gram.h, src/gram.c (grammar_rules_partial_print): New, eved
12999 out of...
13000 (grammar_rules_print): here.
13001 * src/reduce.c (reduce_output): Use it.
13002 * tests/reduce.at (Useless Rules, Reduced Automaton)
13003 (Underivable Rules): Adjust.
13004
13005 2002-06-15 Akim Demaille <akim@epita.fr>
13006
13007 Copy BYacc's nice way to report the grammar.
13008
13009 * src/gram.h, src/gram.c (grammar_rhs_print, grammar_rules_print):
13010 New.
13011 Don't print the rules' location, it is confusing and useless.
13012 (rule_print): Use grammar_rhs_print.
13013 * src/print.c (print_grammar): Use grammar_rules_print.
13014
13015 2002-06-15 Akim Demaille <akim@epita.fr>
13016
13017 Complete and rationalize `useless thing' warnings.
13018
13019 * src/symtab.h, src/symtab.c (symbol_tag_get, symbol_tag_get_n)
13020 (symbol_tag_print): New.
13021 Use them everywhere in place of accessing directly the tag member.
13022 * src/gram.h, src/gram.c (rule_print): New.
13023 Use it where a rule used to be printed `by hand'.
13024 * src/reduce.c (nonterminals_reduce): Report the use nonterminals.
13025 (reduce_grammar_tables): Report the useless rules.
13026 (reduce_print): Useless things are a warning, not an error.
13027 Report it as such.
13028 * tests/reduce.at (Useless Nonterminals, Useless Rules):
13029 (Reduced Automaton, Underivable Rules): Adjust.
13030 * tests/regression.at (Web2c Report, Web2c Report): Adjust.
13031 * tests/conflicts.at (Unresolved SR Conflicts)
13032 (Solved SR Conflicts): Adjust.
13033
13034 2002-06-15 Akim Demaille <akim@epita.fr>
13035
13036 Let symbols have a location.
13037
13038 * src/symtab.h, src/symtab.c (symbol_t): Location is a new member.
13039 (getsym): Adjust.
13040 Adjust all callers.
13041 * src/complain.h, src/complain.c (complain_at, fatal_at, warn_at):
13042 Use location_t, not int.
13043 * src/symtab.c (symbol_check_defined): Take advantage of the
13044 location.
13045 * tests/regression.at (Invalid inputs): Adjust.
13046
13047 2002-06-15 Akim Demaille <akim@epita.fr>
13048
13049 * src/parse-gram.y (YYLLOC_DEFAULT, current_lhs_location): New.
13050 (input): Don't try to initialize yylloc here, do it in the
13051 scanner.
13052 * src/scan-gram.l (YY_USER_INIT): Initialize yylloc.
13053 * src/gram.h (rule_t): Change line and action_line into location
13054 and action_location, of location_t type.
13055 Adjust all dependencies.
13056 * src/location.h, src/location.c (empty_location): New.
13057 * src/reader.h, src/reader.c (grammar_start_symbol_set)
13058 (grammar_symbol_append, grammar_rule_begin, grammar_rule_end)
13059 (grammar_current_rule_symbol_append)
13060 (grammar_current_rule_action_append): Expect a location as argument.
13061 * src/reader.c (grammar_midrule_action): Adjust to attach an
13062 action's location as dummy symbol location.
13063 * src/symtab.h, src/symtab.c (startsymbol_location): New.
13064 * tests/regression.at (Web2c Report, Rule Line Numbers): Adjust
13065 the line numbers.
13066
13067 2002-06-14 Akim Demaille <akim@epita.fr>
13068
13069 Grammar declarations may be found in the grammar section.
13070
13071 * src/parse-gram.y (rules_or_grammar_declaration): New.
13072 (declarations): Each declaration may end with a semicolon, not
13073 just...
13074 (grammar_declaration): `"%union"'.
13075 (grammar): Branch to rules_or_grammar_declaration.
13076
13077 2002-06-14 Akim Demaille <akim@epita.fr>
13078
13079 * src/main.c (main): Invoke scanner_free.
13080
13081 2002-06-14 Akim Demaille <akim@epita.fr>
13082
13083 * src/output.c (m4_invoke): Extracted from...
13084 (output_skeleton): here.
13085 Free tempfile.
13086
13087 2002-06-14 Akim Demaille <akim@epita.fr>
13088
13089 * src/parse-gram.y (directives, directive, gram)
13090 (grammar_directives, precedence_directives, precedence_directive):
13091 Rename as...
13092 (declarations, declaration, grammar, grammar_declaration)
13093 (precedence_declaration, precedence_declarator): these.
13094 (symbol_declaration): New.
13095
13096 2002-06-14 Akim Demaille <akim@epita.fr>
13097
13098 * src/files.c (action_obstack): Remove, unused.
13099 (output_obstack): Remove it, and all its dependencies, as it is no
13100 longer needed.
13101 * src/reader.c (epilogue_set): Build the epilogue in the
13102 muscle_obstack.
13103 * src/output.h, src/output.c (muscle_obstack): Move to...
13104 * src/muscle_tab.h, src/muscle_tab.h: here.
13105 (muscle_init): Initialize muscle_obstack.
13106 (muscle_free): New.
13107 * src/main.c (main): Call it.
13108
13109 2002-06-14 Akim Demaille <akim@epita.fr>
13110
13111 * src/location.h: New, extracted from...
13112 * src/reader.h: here.
13113 * src/Makefile.am (noinst_HEADERS): Merge into
13114 (bison_SOURCES): this.
13115 Add location.h.
13116 * src/parse-gram.y: Use location_t instead of Bison's.
13117 * src/reader.h, src/reader.c (prologue_augment, epilogue_set):
13118 Use location_t instead of ints.
13119
13120 2002-06-14 Akim Demaille <akim@epita.fr>
13121
13122 * data/bison.simple, data/bison.c++: Be sure to restore the
13123 current #line when returning to the skeleton contents after having
13124 exposed the input file's #line.
13125
13126 2002-06-12 Akim Demaille <akim@epita.fr>
13127
13128 * src/scan-gram.l (SC_BRACED_CODE): Don't use `<.*>', it is too
13129 eager.
13130 * tests/actions.at (Exotic Dollars): New.
13131
13132 2002-06-12 Akim Demaille <akim@epita.fr>
13133
13134 * src/scan-gram.l (SC_PROLOGUE): Don't eat characters amongst
13135 ['"/] too eagerly.
13136 * tests/input.at (Torturing the Scanner): New.
13137
13138 2002-06-11 Akim Demaille <akim@epita.fr>
13139
13140 * src/scan-gram.l (YY_OBS_INIT): Remove, replace with...
13141 [SC_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,SC_PROLOGUE]
13142 [SC_EPILOGUE]: Output the quadrigraphs only when not in a comment.
13143 * src/reader.h, src/scan-gram.l (scanner_initialize): this.
13144 * src/reader.c (reader): Use it.
13145
13146 2002-06-11 Akim Demaille <akim@epita.fr>
13147
13148 * src/scan-gram.l (YY_OBS_FINISH): Don't set yylval.
13149 Adjust all callers.
13150 (scanner_last_string_free): New.
13151
13152 2002-06-11 Akim Demaille <akim@epita.fr>
13153
13154 * src/scan-gram.l (YY_INIT, YY_GROW, YY_FINISH): Rename as...
13155 (YY_OBS_INIT, YY_OBS_GROW, YY_OBS_FINISH): these.
13156 (last_string, YY_OBS_FREE): New.
13157 Use them when returning an ID.
13158
13159 2002-06-11 Akim Demaille <akim@epita.fr>
13160
13161 Have Bison grammars parsed by a Bison grammar.
13162
13163 * src/reader.c, src/reader.h (prologue_augment): New.
13164 * src/reader.c (copy_definition): Remove.
13165
13166 * src/reader.h, src/reader.c (gram_start_symbol_set, prologue_augment)
13167 (grammar_symbol_append, grammar_rule_begin, grammar_midrule_action)
13168 (grammar_current_rule_prec_set, grammar_current_rule_check)
13169 (grammar_current_rule_symbol_append)
13170 (grammar_current_rule_action_append): Export.
13171 * src/parse-gram.y (symbol_list_new, symbol_list_symbol_append_
13172 (symbol_list_action_append): Remove.
13173 Hook the routines from reader.
13174 * src/scan-gram.l: In INITIAL, characters and strings are tokens.
13175 * src/system.h (ATTRIBUTE_NORETURN, ATTRIBUTE_UNUSED): Now.
13176
13177 * src/reader.c (read_declarations): Remove, unused.
13178
13179 * src/parse-gram.y: Handle the epilogue.
13180 * src/reader.h, src/reader.c (gram_start_symbol_set): Rename as...
13181 (grammar_start_symbol_set): this.
13182 * src/scan-gram.l: Be sure to ``use'' yycontrol to keep GCC quiet.
13183 * src/reader.c (readgram): Remove, unused.
13184 (reader): Adjust to insert eoftoken and axiom where appropriate.
13185
13186 * src/reader.c (copy_dollar): Replace with...
13187 * src/scan-gram.h (handle_dollar): this.
13188 * src/parse-gram.y: Remove `%thong'.
13189
13190 * src/reader.c (copy_at): Replace with...
13191 * src/scan-gram.h (handle_at): this.
13192
13193 * src/complain.h, src/complain.c (warn_at, complain_at, fatal_at):
13194 New.
13195
13196 * src/scan-gram.l (YY_LINES): Keep lineno synchronized for the
13197 time being.
13198
13199 * src/reader.h, src/reader.c (grammar_rule_end): New.
13200
13201 * src/parse.y (current_type, current_class): New.
13202 Implement `%nterm', `%token' support.
13203 Merge `%term' into `%token'.
13204 (string_as_id): New.
13205 * src/symtab.h, src/symtab.c (symbol_make_alias): Don't pass the
13206 type name.
13207
13208 * src/parse-gram.y: Be sure to handle properly the beginning of
13209 rules.
13210
13211 * src/parse-gram.y: Handle %type.
13212 * src/reader.c (grammar_rule_end): Call grammar_current_rule_check.
13213
13214 * src/parse-gram.y: More directives support.
13215 * src/options.c: No longer handle source directives.
13216
13217 * src/parse-gram.y: Fix %output.
13218
13219 * src/parse-gram.y: Handle %union.
13220 Use the prologue locations.
13221 * src/reader.c (parse_union_decl): Remove.
13222
13223 * src/reader.h, src/reader.c (epilogue_set): New.
13224 * src/parse-gram.y: Use it.
13225
13226 * data/bison.simple, data/bison.c++: b4_stype is now either not
13227 defined, then default to int, or to the contents of %union,
13228 without `union' itself.
13229 Adjust.
13230 * src/muscle_tab.c (muscle_init): Don't predefine `stype'.
13231
13232 * src/output.c (actions_output): Don't output braces, as they are
13233 already handled by the scanner.
13234
13235 * src/scan-gram.l (SC_CHARACTER): Set the user_token_number of
13236 characters to themselves.
13237
13238 * tests/reduce.at (Reduced Automaton): End the grammars with %% so
13239 that the epilogue has a proper #line.
13240
13241 * src/parse-gram.y: Handle precedence/associativity.
13242
13243 * src/symtab.c (symbol_precedence_set): Requires the symbol to be
13244 a terminal.
13245 * src/scan-gram.l (SC_BRACED_CODE): Catch strings and characters.
13246 * tests/calc.at: Do not use `%token "foo"' as it makes not sense
13247 at all to define terminals that cannot be emitted.
13248
13249 * src/scan-gram.l: Escape M4 characters.
13250
13251 * src/scan-gram.l: Working properly with escapes in user
13252 strings/characters.
13253
13254 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR)
13255 (AT_DATA_HORIZONTAL_GRAMMAR): Respect the `%token ID NUM STRING'
13256 grammar.
13257 Use more modest sizes, as for the time being the parser does not
13258 release memory, and therefore the process swallows a huge amount
13259 of memory.
13260
13261 * tests/torture.at (AT_DATA_LOOKAHEADS_GRAMMAR): Adjust to the
13262 stricter %token grammar.
13263
13264 * src/symtab.h (associativity): Add `undef_assoc'.
13265 (symbol_precedence_set): Do nothing when passed an undef_assoc.
13266 * src/symtab.c (symbol_check_alias_consistence): Adjust.
13267
13268 * tests/regression.at (Invalid %directive): Remove, as it is now
13269 meaningless.
13270 (Invalid inputs): Adjust to the new error messages.
13271 (Token definitions): The new grammar doesn't allow too many
13272 eccentricities.
13273
13274 * src/lex.h, src/lex.c: Remove.
13275 * src/reader.c (lastprec, skip_to_char, read_signed_integer)
13276 (copy_character, copy_string2, copy_string, copy_identifier)
13277 (copy_comment, parse_token_decl, parse_type_decl, parse_assoc_decl)
13278 (parse_muscle_decl, parse_dquoted_param, parse_skel_decl)
13279 (parse_action): Remove.
13280 * po/POTFILES.in: Adjust.
13281
13282 2002-06-11 Akim Demaille <akim@epita.fr>
13283
13284 * src/reader.c (parse_action): Don't store directly into the
13285 rule's action member: return the action as a string.
13286 Don't require `rule_length' as an argument: compute it.
13287 (grammar_current_rule_symbol_append)
13288 (grammar_current_rule_action_append): New, eved out from
13289 (readgram): here.
13290 Remove `action_flag', `rulelength', unused now.
13291
13292 2002-06-11 Akim Demaille <akim@epita.fr>
13293
13294 * src/reader.c (grammar_current_rule_prec_set).
13295 (grammar_current_rule_check): New, eved out from...
13296 (readgram): here.
13297 Remove `xaction', `first_rhs': useless.
13298 * tests/input.at (Type clashes): New.
13299 * tests/existing.at (GNU Cim Grammar): Adjust.
13300
13301 2002-06-11 Akim Demaille <akim@epita.fr>
13302
13303 * src/reader.c (grammar_midrule_action): New, Eved out from
13304 (readgram): here.
13305
13306 2002-06-11 Akim Demaille <akim@epita.fr>
13307
13308 * src/reader.c (grammar_rule_begin, previous_rule, current_rule):
13309 New.
13310 (readgram): Use them as replacement of inlined code, crule and
13311 crule1.
13312
13313 2002-06-11 Akim Demaille <akim@epita.fr>
13314
13315 * src/reader.c (grammar_end, grammar_symbol_append): New.
13316 (readgram): Use them.
13317 Make the use of `p' as local as possible.
13318
13319 2002-06-10 Akim Demaille <akim@epita.fr>
13320
13321 GCJ's parser requires the tokens to be defined before the prologue.
13322
13323 * data/bison.simple: Output the token definition before the user's
13324 prologue.
13325 * tests/regression.at (Braces parsing, Duplicate string)
13326 (Mixing %token styles): Check the output from bison.
13327 (Early token definitions): New.
13328
13329 2002-06-10 Akim Demaille <akim@epita.fr>
13330
13331 * src/symtab.c (symbol_user_token_number_set): Don't complain when
13332 assigning twice the same user number to a token, so that we can
13333 use it in...
13334 * src/lex.c (lex): here.
13335 Also use `symbol_class_set' instead of hand written code.
13336 * src/reader.c (parse_assoc_decl): Likewise.
13337
13338 2002-06-10 Akim Demaille <akim@epita.fr>
13339
13340 * src/symtab.c, src/symtab.c (symbol_class_set)
13341 (symbol_user_token_number_set): New.
13342 * src/reader.c (parse_token_decl): Use them.
13343 Use a switch instead of ifs.
13344 Use a single argument.
13345
13346 2002-06-10 Akim Demaille <akim@epita.fr>
13347
13348 Remove `%thong' support as it is undocumented, unused, duplicates
13349 `%token's job, and creates useless e-mail traffic with people who
13350 want to know what it is, why it is undocumented, unused, and
13351 duplicates `%token's job.
13352
13353 * src/reader.c (parse_thong_decl): Remove.
13354 * src/options.c (option_table): Remove "thong".
13355 * src/lex.h (tok_thong): Remove.
13356
13357 2002-06-10 Akim Demaille <akim@epita.fr>
13358
13359 * src/symtab.c, src/symtab.c (symbol_type_set)
13360 (symbol_precedence_set): New.
13361 * src/reader.c (parse_type_decl, parse_assoc_decl): Use them.
13362 (value_components_used): Remove, unused.
13363
13364 2002-06-09 Akim Demaille <akim@epita.fr>
13365
13366 Move symbols handling code out of the reader.
13367
13368 * src/reader.h, src/reader.c (errtoken, undeftoken, eoftoken)
13369 (axiom): Move to...
13370 * src/symtab.h, src/symtab.c: here.
13371
13372 * src/gram.c (start_symbol): Remove: use startsymbol->number.
13373 * src/reader.c (startval): Rename as...
13374 * src/symtab.h, src/symtab.c (startsymbol): this.
13375 * src/reader.c: Adjust.
13376
13377 * src/reader.c (symbol_check_defined, symbol_make_alias)
13378 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
13379 (token_translations_init)
13380 Move to...
13381 * src/symtab.c: here.
13382 * src/reader.c (packsymbols): Move to...
13383 * src/symtab.h, src/symtab.c (symbols_pack): here.
13384 * src/symtab.h, src/symtab.c (symbol_make_alias): Takes SYMVAL as
13385 argument.
13386
13387 2002-06-03 Akim Demaille <akim@epita.fr>
13388
13389 * src/muscle_tab.c (muscle_insert, muscle_find): Declarations,
13390 then statements.
13391
13392 2002-06-03 Akim Demaille <akim@epita.fr>
13393
13394 * src/muscle_tab.c (muscle_find, muscle_insert): Don't initialize
13395 structs with non literals.
13396 * src/scan-skel.l: never-interactive.
13397 * src/conflicts.c (enum conflict_resolution_e): No trailing
13398 comma.
13399 * src/getargs.c (usage): Split long literal strings.
13400 Reported by Hans Aberg.
13401
13402 2002-05-28 Akim Demaille <akim@epita.fr>
13403
13404 * data/bison.c++: Use C++ ostreams.
13405 (cdebug_): New member.
13406
13407 2002-05-28 Akim Demaille <akim@epita.fr>
13408
13409 * src/output.c (output_skeleton): Be sure to allocate enough room
13410 for `/' _and_ for `\0' in full_skeleton.
13411
13412 2002-05-28 Akim Demaille <akim@epita.fr>
13413
13414 * data/bison.c++: Catch up with bison.simple:
13415 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
13416 and Paul Eggert <eggert@twinsun.com>: `error' handing.
13417 2002-05-26 Akim Demaille <akim@epita.fr>: stos_, token_number_,
13418 and popping traces.
13419
13420 2002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
13421
13422 * src/output.c (output_skeleton): Put an explicit path in front of
13423 the skeleton file name, rather than relying on the -I directory,
13424 to partially alleviate effects of having a skeleton file lying around
13425 in the current directory.
13426
13427 2002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
13428
13429 * src/conflicts.c (log_resolution): Correct typo:
13430 obstack_printf should be obstack_fgrow1.
13431
13432 2002-05-26 Akim Demaille <akim@epita.fr>
13433
13434 * src/state.h (state_t): `solved_conflicts' is a new member.
13435 * src/LR0.c (new_state): Set it to 0.
13436 * src/conflicts.h, src/conflicts.c (print_conflicts)
13437 (free_conflicts, solve_conflicts): Rename as...
13438 (conflicts_print, conflicts_free, conflicts_solve): these.
13439 Adjust callers.
13440 * src/conflicts.c (enum conflict_resolution_e)
13441 (solved_conflicts_obstack): New, used by...
13442 (log_resolution): this.
13443 Adjust to attach the conflict resolution to each state.
13444 Complete the description with the precedence/associativity
13445 information.
13446 (resolve_sr_conflict): Adjust.
13447 * src/print.c (print_state): Output its solved_conflicts.
13448 * tests/conflicts.at (Unresolved SR Conflicts)
13449 (Solved SR Conflicts): Exercise --report=all.
13450
13451 2002-05-26 Akim Demaille <akim@epita.fr>
13452
13453 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
13454 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
13455 * src/reader.c, src/reduce.c, src/state.h, src/symtab.h
13456 (token_number_t, item_number_as_token_number)
13457 (token_number_as_item_number, muscle_insert_token_number_table):
13458 Rename as...
13459 (symbol_number_t, item_number_as_symbol_number)
13460 (symbol_number_as_item_number, muscle_insert_symbol_number_table):
13461 these, since it is more appropriate.
13462
13463 2002-05-26 Akim Demaille <akim@epita.fr>
13464
13465 * tests/calc.at (AT_CHECK_CALC): Adjust: there are now additional
13466 `Error:' lines.
13467 * data/bison.simple (yystos) [YYDEBUG]: New.
13468 (yyparse) [YYDEBUG]: Display the symbols which are popped during
13469 error recovery.
13470 * tests/regression.at (Web2c Actions): Adjust: yystos is output now.
13471
13472 2002-05-25 Akim Demaille <akim@epita.fr>
13473
13474 * doc/bison.texinfo (Debugging): Split into...
13475 (Tracing): this new section, its former contents, and...
13476 (Understanding): this new section.
13477 * src/getargs.h, src/getargs.c (verbose_flag): Remove, replaced
13478 by...
13479 (report_flag): this.
13480 Adjust all dependencies.
13481 (report_args, report_types, report_argmatch): New.
13482 (usage, getargs): Report/support -r, --report.
13483 * src/options.h
13484 (struct option_table_struct): Rename as..,
13485 (struct option_table_s): this.
13486 Rename the `set_flag' member to `flag' to match with getopt_long's
13487 struct.
13488 * src/options.c (option_table): Split verbose into an entry for
13489 %verbose, and another for --verbose.
13490 Support --report/-r, so remove -r from the obsolete --raw.
13491 * src/print.c: Attach full item sets and lookaheads reports to
13492 report_flag instead of trace_flag.
13493 * lib/argmatch.h, lib/argmatch.c: New, from Fileutils 4.1.
13494
13495 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
13496 and Paul Eggert <eggert@twinsun.com>
13497
13498 * data/bison.simple (yyparse): Correct error handling to conform to
13499 POSIX and yacc. Specifically, after syntax error is discovered,
13500 do not reduce further before shifting the error token.
13501 Clean up the code a bit by removing the labels yyerrdefault,
13502 yyerrhandle, yyerrpop.
13503 * NEWS: Document the above.
13504
13505 2002-05-20 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
13506
13507 * data/bison.simple (yyr1): Don't use yy_token_number_type as element
13508 type; it isn't always big enough, since it doesn't necessarily
13509 include non-terminals.
13510 (yytranslate): Expand definition of yy_token_number_type, so that
13511 the latter can be removed.
13512 (yy_token_number_type): Remove, only one use.
13513 * data/bison.c++ (r1_): Parallel change to yyr1 in bison.simple---
13514 don't use TokenNumberType as element type.
13515
13516 * tests/regression.at: Modify expected output to agree with change
13517 to yyr1 and yytranslate.
13518
13519 2002-05-13 Florian Krohm <florian@edamail.fishkill.ibm.com>
13520
13521 * src/reader.c (parse_action): Use copy_character instead of
13522 obstack_1grow.
13523
13524 2002-05-13 Akim Demaille <akim@epita.fr>
13525
13526 * tests/regression.at (Token definitions): Prototype yylex and
13527 yyerror.
13528
13529 2002-05-12 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
13530
13531 * src/scan-skel.l: Correct off-by-one error in handling of __oline__.
13532 * data/bison.simple (b4_sint_type, b4_uint_type): Correct to reflect
13533 32-bit arithmetic.
13534 * data/bison.c++ (b4_sint_type, b4_uint_type): Ditto.
13535
13536 2002-05-07 Akim Demaille <akim@epita.fr>
13537
13538 * tests/synclines.at: Be sure to prototype yylex and yyerror to
13539 avoid GCC warnings.
13540
13541 2002-05-07 Akim Demaille <akim@epita.fr>
13542
13543 Kill GCC warnings.
13544
13545 * src/reduce.c (nonterminals_reduce): Don't loop over RITEM: loop
13546 over the RHS of each rule.
13547 * src/gram.h, src/gram.c (nritems): Is `unsigned int', not int.
13548 * src/state.h (state_t): Member `nitems' is unsigned short.
13549 * src/LR0.c (get_state): Adjust.
13550 * src/reader.c (packgram): Likewise.
13551 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): `max' is of type
13552 `Type'.
13553 (muscle_insert_int_table): Remove, unused.
13554 (prepare_rules): Remove `max'.
13555
13556 2002-05-06 Akim Demaille <akim@epita.fr>
13557
13558 * src/closure.c (print_firsts): Display of the symbol tags.
13559 (bitmatrix_print): Move to...
13560 * lib/bitsetv-print.h, lib/bitsetv-print.c (bitsetv_matrix_dump):
13561 here.
13562 * tests/sets.at (Nullable, Broken Closure, Firsts): Adjust.
13563
13564 2002-05-06 Akim Demaille <akim@epita.fr>
13565
13566 * src/muscle_tab.c (muscle_m4_output): Must return TRUE for
13567 hash_do_for_each.
13568
13569 2002-05-06 Akim Demaille <akim@epita.fr>
13570
13571 * src/LR0.c (new_state, get_state): Instead of using the global
13572 `kernel_size' and `kernel_base', have two new arguments:
13573 `core_size' and `core'.
13574 Adjust callers.
13575
13576 2002-05-06 Akim Demaille <akim@epita.fr>
13577
13578 * src/reader.c (packgram): No longer end `ritem' with a 0
13579 sentinel: it is not used.
13580
13581 2002-05-05 Akim Demaille <akim@epita.fr>
13582
13583 New experimental feature: display the lookaheads in the report and
13584 graph.
13585
13586 * src/print (print_core): When --trace-flag, display the rules
13587 lookaheads.
13588 * src/print_graph.c (print_core): Likewise.
13589 Swap the arguments.
13590 Adjust caller.
13591
13592 2002-05-05 Akim Demaille <akim@epita.fr>
13593
13594 * tests/torture.at (Many lookaheads): New test.
13595
13596 2002-05-05 Akim Demaille <akim@epita.fr>
13597
13598 * src/output.c (GENERATE_OUTPUT_TABLE): Replace with...
13599 (GENERATE_MUSCLE_INSERT_TABLE): this.
13600 (output_int_table, output_unsigned_int_table, output_short_table)
13601 (output_token_number_table, output_item_number_table): Replace with...
13602 (muscle_insert_int_table, muscle_insert_unsigned_int_table)
13603 (muscle_insert_short_table, muscle_insert_token_number_table)
13604 (muscle_insert_item_number_table): these.
13605 Adjust all callers.
13606 (prepare_tokens): Don't free `translations', since...
13607 * src/reader.h, src/reader.c (grammar_free): do it.
13608 Move to...
13609 * src/gram.h, src/gram.c (grammar_free): here.
13610 * data/bison.simple, data/bison.c++: b4_token_number_max is now
13611 b4_translate_max.
13612
13613 2002-05-05 Akim Demaille <akim@epita.fr>
13614
13615 * src/output.c (output_unsigned_int_table): New.
13616 (prepare_rules): `i' is unsigned.
13617 `prhs', `rline', `r2' are unsigned int.
13618 Rename muscle `rhs_number_max' as `rhs_max'.
13619 Output muscles `prhs_max', `rline_max', and `r2_max'.
13620 Free rline and r1.
13621 * data/bison.simple, data/bison.c++: Adjust to use these muscles
13622 to compute types instead of constant types.
13623 * tests/regression.at (Web2c Actions): Adjust.
13624
13625 2002-05-04 Akim Demaille <akim@epita.fr>
13626
13627 * src/symtab.h (SALIAS, SUNDEF): Rename as...
13628 (USER_NUMBER_ALIAS, USER_NUMBER_UNDEFINED): these.
13629 Adjust dependencies.
13630 * src/output.c (token_definitions_output): Be sure not to output a
13631 `#define 'a'' when fed with `%token 'a' "a"'.
13632 * tests/regression.at (Token definitions): New.
13633
13634 2002-05-03 Paul Eggert <eggert@twinsun.com>
13635
13636 * data/bison.simple (b4_token_defines): Also define YYTOKENTYPE
13637 for K&R C.
13638
13639 2002-05-03 gettextize <bug-gnu-gettext@gnu.org>
13640
13641 * Makefile.am (SUBDIRS): Remove intl.
13642 (EXTRA_DIST): Add config/config.rpath.
13643
13644 2002-05-03 Akim Demaille <akim@epita.fr>
13645
13646 * data/bison.simple (m4_if): Don't output empty enums.
13647 And actually, output valid enum definitions :(.
13648
13649 2002-05-03 Akim Demaille <akim@epita.fr>
13650
13651 * configure.bat: Remove, completely obsolete.
13652 * Makefile.am (EXTRA_DIST): Adjust.
13653 Don't distribute config.rpath...
13654 * config/Makefile.am (EXTRA_DIST): Do it.
13655
13656 2002-05-03 Akim Demaille <akim@epita.fr>
13657
13658 * configure.in (GETTEXT_VERSION): New.
13659 Suggested by Bruno Haible for the forthcoming Gettext 0.10.3.
13660
13661 2002-05-03 Akim Demaille <akim@epita.fr>
13662
13663 * data/bison.simple (b4_token_enum): New.
13664 (b4_token_defines): Use it to output tokens both as #define and
13665 enums.
13666 Suggested by Paul Eggert.
13667 * src/output.c (token_definitions_output): Don't output spurious
13668 white spaces.
13669
13670 2002-05-03 Akim Demaille <akim@epita.fr>
13671
13672 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
13673
13674 2002-05-02 Robert Anisko <robert@lrde.epita.fr>
13675
13676 * data/bison.c++: Adapt expansion of $s and @s to the C++ parser.
13677 Update the stack class, give a try to deque as the default container.
13678
13679 2002-05-02 Akim Demaille <akim@epita.fr>
13680
13681 * data/bison.simple (yyparse): Do not implement @$ = @1.
13682 (YYLLOC_DEFAULT): Adjust to do it.
13683 * doc/bison.texinfo (Location Default Action): Fix.
13684
13685 2002-05-02 Akim Demaille <akim@epita.fr>
13686
13687 * src/reader.c (parse_braces): Merge into...
13688 (parse_action): this.
13689
13690 2002-05-02 Akim Demaille <akim@epita.fr>
13691
13692 * configure.in (ALL_LINGUAS): Remove.
13693 * po/LINGUAS, hr.po: New.
13694
13695 2002-05-02 Akim Demaille <akim@epita.fr>
13696
13697 Remove the so called hairy (semantic) parsers.
13698
13699 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove.
13700 * src/gram.h, src/gram.c (semantic_parser): Remove.
13701 (rule_t): Remove the guard and guard_line members.
13702 * src/lex.h (token_t): remove tok_guard.
13703 * src/options.c (option_table): Remove %guard and %semantic_parser
13704 support.
13705 * src/output.c, src/output.h (guards_output): Remove.
13706 (prepare): Adjust.
13707 (token_definitions_output): Don't output the `T'
13708 tokens (???).
13709 (output_skeleton): Don't output the guards.
13710 * src/files.c, src/files.c (attrsfile): Remove.
13711 * src/reader.c (symbol_list): Remove the guard and guard_line
13712 members.
13713 Adjust dependencies.
13714 (parse_guard): Remove.
13715 * data/bison.hairy: Remove.
13716 * doc/bison.texinfo (Environment Variables): Remove occurrences of
13717 BISON_HAIRY.
13718
13719 2002-05-02 Akim Demaille <akim@epita.fr>
13720
13721 * src/reader.c (copy_at, copy_dollarm parse_braces, parse_action)
13722 (parse_guard): Rename the formal argument `stack_offset' as
13723 `rule_length', which is more readable.
13724 Adjust callers.
13725 (copy_at, copy_dollar): Instead of outputting the hard coded
13726 values of $$, $n and so forth, output invocation to b4_lhs_value,
13727 b4_lhs_location, b4_rhs_value, and b4_rhs_location.
13728 Note: this patch partially drops `semantic-parser' support: it
13729 always does `rule_length - n', where semantic parsers ought to
13730 always use `-n'.
13731 * data/bison.simple, data/bison.c++ (b4_lhs_value)
13732 (b4_lhs_location, b4_rhs_value, and b4_rhs_location: New.
13733
13734 2002-05-02 Akim Demaille <akim@epita.fr>
13735
13736 * configure.in (AC_INIT): Bump to 1.49b.
13737 (AM_INIT_AUTOMAKE): Short invocation.
13738
13739 2002-05-02 Akim Demaille <akim@epita.fr>
13740
13741 Version 1.49a.
13742
13743 2002-05-01 Akim Demaille <akim@epita.fr>
13744
13745 * src/skeleton.h: Remove.
13746
13747 2002-05-01 Akim Demaille <akim@epita.fr>
13748
13749 * src/skeleton.h: Fix the #endif.
13750 Reported by Magnus Fromreide.
13751
13752 2002-04-26 Paul Eggert <eggert@twinsun.com>
13753
13754 * data/bison.simple (YYSTYPE_IS_TRIVIAL, YYLTYPE_IS_TRIVIAL):
13755 Define if we define YYSTYPE and YYLTYPE, respectively.
13756 (YYCOPY): Fix [] quoting problem in the non-GCC case.
13757
13758 2002-04-25 Robert Anisko <robert@lrde.epita.fr>
13759
13760 * src/scan-skel.l: Postprocess quadrigraphs.
13761
13762 * src/reader.c (copy_character): New function, used to output
13763 single characters while replacing `[' and `]' with quadrigraphs, to
13764 avoid troubles with M4 quotes.
13765 (copy_comment): Output characters with copy_character.
13766 (read_additionnal_code): Likewise.
13767 (copy_string2): Likewise.
13768 (copy_definition): Likewise.
13769
13770 * tests/calc.at: Exercise M4 quoting.
13771
13772 2002-04-25 Akim Demaille <akim@epita.fr>
13773
13774 * tests/sets.at (AT_EXTRACT_SETS): Sed portability issue: no space
13775 between `!' and the command.
13776 Reported by Paul Eggert.
13777
13778 2002-04-24 Robert Anisko <robert@lrde.epita.fr>
13779
13780 * tests/calc.at: Exercise prologue splitting.
13781
13782 * data/bison.simple, data/bison.c++: Use `b4_pre_prologue' and
13783 `b4_post_prologue' instead of `b4_prologue'.
13784
13785 * src/output.c (prepare): Add the `pre_prologue' and `post_prologue'
13786 muscles.
13787 (output): Free pre_prologue_obstack and post_prologue_obstack.
13788 * src/files.h, src/files.c (attrs_obstack): Remove.
13789 (pre_prologue_obstack, post_prologue_obstack): New.
13790 * src/reader.c (copy_definition): Add a parameter to specify the
13791 obstack to fill, instead of using attrs_obstack unconditionally.
13792 (read_declarations): Pass pre_prologue_obstack to copy_definition if
13793 `%union' has not yet been seen, pass post_prologue_obstack otherwise.
13794
13795 2002-04-23 Paul Eggert <eggert@twinsun.com>
13796
13797 * data/bison.simple: Remove unnecessary commentary and white
13798 space differences from 1_29-branch.
13799 Depend on YYERROR_VERBOSE, not defined (YYERROR_VERBOSE).
13800
13801 (union yyalloc, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYCOPY,
13802 YYSTACK_RELOCATE): Do not define if yyoverflow is defined, or
13803 if this is a C++ parser and YYSTYPE or YYLTYPE has nontrivial
13804 constructors or destructors.
13805
13806 (yyparse) [! defined YYSTACK_RELOCATE]: Do not relocate the stack.
13807
13808 2002-04-23 Akim Demaille <akim@epita.fr>
13809
13810 * tests/sets.at (AT_EXTRACT_SETS): Don't use 8 char long sed labels.
13811 * tests/synclines.at (AT_TEST_SYNCLINE): Be robust to GCC's
13812 location with columns.
13813 * tests/conflicts.at (%nonassoc and eof): Don't use `error.h'.
13814 All reported by Paul Eggert.
13815
13816 2002-04-22 Akim Demaille <akim@epita.fr>
13817
13818 * src/reduce.c (dump_grammar): Move to...
13819 * src/gram.h, src/gram.c (grammar_dump): here.
13820 Be sure to separate long item numbers.
13821 Don't read the members of a rule's prec if its nil.
13822
13823 2002-04-22 Akim Demaille <akim@epita.fr>
13824
13825 * src/output.c (table_size, table_grow): New.
13826 (MAXTABLE): Remove, replace uses with table_size.
13827 (pack_vector): Instead of dying when the table is too big, grow it.
13828
13829 2002-04-22 Akim Demaille <akim@epita.fr>
13830
13831 * data/bison.simple (yyr1): Its type is that of a token number.
13832 * data/bison.c++ (r1_): Likewise.
13833 * tests/regression.at (Web2c Actions): Adjust.
13834
13835 2002-04-22 Akim Demaille <akim@epita.fr>
13836
13837 * src/reader.c (token_translations_init): 256 is now the default
13838 value for the error token, i.e., it will be assigned another
13839 number if the user assigned 256 to one of her tokens.
13840 (reader): Don't force 256 to error.
13841 * doc/bison.texinfo (Symbols): Adjust.
13842 * tests/torture.at (AT_DATA_HORIZONTAL_GRAMMAR)
13843 (AT_DATA_TRIANGULAR_GRAMMAR): Number the tokens as 1, 2, 3
13844 etc. instead of 10, 20, 30 (which was used to `jump' over error
13845 (256) and undefined (2)).
13846
13847 2002-04-22 Akim Demaille <akim@epita.fr>
13848
13849 Propagate more token_number_t.
13850
13851 * src/gram.h (token_number_as_item_number)
13852 (item_number_as_token_number): New.
13853 * src/output.c (GENERATE_OUTPUT_TABLE): New.
13854 Use it to create output_item_number_table and
13855 output_token_number_table.
13856 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
13857 * src/lex.c, src/nullable.c, src/output.c, src/print.c,
13858 * src/print_graph.c, src/reader.c, src/reduce.c, src/state.h,
13859 * src/symtab.c, src/symtab.h: Use token_number_t instead of shorts.
13860
13861 2002-04-22 Akim Demaille <akim@epita.fr>
13862
13863 * src/output.h, src/output.c (get_lines_number): Remove.
13864
13865 2002-04-19 Akim Demaille <akim@epita.fr>
13866
13867 * doc/bison.texinfo (Actions): Make clear that `|' is not the same
13868 as Lex/Flex'.
13869 (Debugging): More details about enabling the debugging features.
13870 (Table of Symbols): Describe $$, $n, @$, and @n.
13871 Suggested by Tim Josling.
13872
13873 2002-04-19 Akim Demaille <akim@epita.fr>
13874
13875 * doc/bison.texinfo: Remove the uses of the obsolete @refill.
13876
13877 2002-04-10 Akim Demaille <akim@epita.fr>
13878
13879 * src/system.h: Rely on HAVE_LIMITS_H.
13880 Suggested by Paul Eggert.
13881
13882 2002-04-09 Akim Demaille <akim@epita.fr>
13883
13884 * tests/calc.at (_AT_CHECK_CALC_ERROR): Receive as argument the
13885 full stderr, and strip it according to the bison options, instead
13886 of composing the error message from different bits.
13887 This makes it easier to check for several error messages.
13888 Adjust all the invocations.
13889 Add an invocation exercising the error token.
13890 Add an invocation demonstrating a stupid error message.
13891 (_AT_DATA_CALC_Y): Follow the GCS: initial column is 1, not 0.
13892 Adjust the tests.
13893 Error message are for stderr, not stdout.
13894
13895 2002-04-09 Akim Demaille <akim@epita.fr>
13896
13897 * src/gram.h, src/gram.c (error_token_number): Remove, use
13898 errtoken->number.
13899 * src/reader.c (reader): Don't specify the user token number (2)
13900 for $undefined, as it uselessly prevents using it.
13901 * src/gram.h (token_number_t): Move to...
13902 * src/symtab.h: here.
13903 (state_t.number): Is a token_number_t.
13904 * src/print.c, src/reader.c: Use undeftoken->number instead of
13905 hard coded 2.
13906 (Even though this 2 is not the same as above: the number of the
13907 undeftoken remains being 2, it is its user token number which
13908 might not be 2).
13909 * src/output.c (prepare_tokens): Rename the `maxtok' muscle with
13910 `user_token_number_max'.
13911 Output `undef_token_number'.
13912 * data/bison.simple, data/bison.c++: Use them.
13913 Be sure to map invalid yylex return values to
13914 `undef_token_number'. This saves us from gratuitous SEGV.
13915
13916 * tests/conflicts.at (Solved SR Conflicts)
13917 (Unresolved SR Conflicts): Adjust.
13918 * tests/regression.at (Web2c Actions): Adjust.
13919
13920 2002-04-08 Akim Demaille <akim@epita.fr>
13921
13922 * data/bison.c++: s/b4_item_number_max/b4_rhs_number_max/.
13923 Adding #line.
13924 Remove the duplicate `typedefs'.
13925 (RhsNumberType): Fix the declaration and various other typos.
13926 Use __ofile__.
13927 * data/bison.simple: Use __ofile__.
13928 * src/scan-skel.l: Handle __ofile__.
13929
13930 2002-04-08 Akim Demaille <akim@epita.fr>
13931
13932 * src/gram.h (item_number_t): New, the type of item numbers in
13933 RITEM. Note that it must be able to code symbol numbers as
13934 positive number, and the negation of rule numbers as negative
13935 numbers.
13936 Adjust all dependencies (pretty many).
13937 * src/reduce.c (rule): Remove this `short *' pointer: use
13938 item_number_t.
13939 * src/system.h (MINSHORT, MAXSHORT): Remove.
13940 Include `limits.h'.
13941 Adjust dependencies to using SHRT_MAX and SHRT_MIN.
13942 (shortcpy): Remove.
13943 (MAXTABLE): Move to...
13944 * src/output.c (MAXTABLE): here.
13945 (prepare_rules): Use output_int_table to output rhs.
13946 * data/bison.simple, data/bison.c++: Adjust.
13947 * tests/torture.at (Big triangle): Move the limit from 254 to
13948 500.
13949 * tests/regression.at (Web2c Actions): Ajust.
13950
13951 Trying with bigger grammars shows various phenomena: at 3000 (28Mb
13952 of grammar file) bison is killed by my system, at 2000 (12Mb) bison
13953 passes, but produces negative #line number, once fixed, GCC is
13954 killed while compiling 14Mb, at 1500 (6.7 Mb of grammar, 8.2Mb of
13955 C), it passes.
13956 * src/state.h (state_h): Code input lines on ints, not shorts.
13957
13958 2002-04-08 Akim Demaille <akim@epita.fr>
13959
13960 * src/reduce.c (reduce_grammar): First reduce the nonterminals,
13961 and then the grammar.
13962
13963 2002-04-08 Akim Demaille <akim@epita.fr>
13964
13965 * src/system.h: No longer using strndup.
13966
13967 2002-04-07 Akim Demaille <akim@epita.fr>
13968
13969 * src/muscle_tab.h (MUSCLE_INSERT_LONG_INT): New.
13970 * src/output.c (output_table_data): Return the longest number.
13971 (prepare_tokens): Output `token_number_max').
13972 * data/bison.simple, data/bison.c++ (b4_sint_type, b4_uint_type):
13973 New.
13974 Use them to define yy_token_number_type/TokenNumberType.
13975 Use this type for yytranslate.
13976 * tests/torture.at (Big triangle): Push the limit from 124 to
13977 253.
13978 * tests/regression.at (Web2c Actions): Adjust.
13979
13980 2002-04-07 Akim Demaille <akim@epita.fr>
13981
13982 * tests/torture.at (Big triangle): New.
13983 (GNU AWK Grammar, GNU Cim Grammar): Move to...
13984 * tests/existing.at: here.
13985
13986 2002-04-07 Akim Demaille <akim@epita.fr>
13987
13988 * src/gram.h, src/gram.c (nitems): Remove, it is an alias of
13989 nritems.
13990 Adjust dependencies.
13991
13992 2002-04-07 Akim Demaille <akim@epita.fr>
13993
13994 * src/reader.c: Normalize increments to prefix form.
13995
13996 2002-04-07 Akim Demaille <akim@epita.fr>
13997
13998 * src/reader.c, symtab.c: Remove debugging code.
13999
14000 2002-04-07 Akim Demaille <akim@epita.fr>
14001
14002 Rename all the `bucket's as `symbol_t'.
14003
14004 * src/gram.c, src/gram.h, src/lex.c, src/lex.h, src/output.c,
14005 * src/reader.c, src/reader.h, src/reduce.c, src/state.h,
14006 * src/symtab.c, src/symtab.h (bucket): Rename as...
14007 (symbol_t): this.
14008 (symbol_list_new, bucket_check_defined, bucket_make_alias)
14009 (bucket_check_alias_consistence, bucket_pack, bucket_translation)
14010 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
14011 (buckets_new, buckets_free, buckets_do): Rename as...
14012 (symbol_list_new, symbol_check_defined, symbol_make_alias)
14013 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
14014 (symbol_new, symbol_free, hash_compare_symbol_t, hash_symbol_t)
14015 (symbols_new, symbols_free, symbols_do): these.
14016
14017 2002-04-07 Akim Demaille <akim@epita.fr>
14018
14019 Use lib/hash for the symbol table.
14020
14021 * src/gram.c (ntokens): Initialize to 1, to reserve a slot for
14022 EOF.
14023 * src/lex.c (lex): Set the `number' member of new terminals.
14024 * src/reader.c (bucket_check_defined, bucket_make_alias)
14025 (bucket_check_alias_consistence, bucket_translation): New.
14026 (reader, grammar_free, readgram, token_translations_init)
14027 (packsymbols): Adjust.
14028 (reader): Number the predefined tokens.
14029 * src/reduce.c (inaccessable_symbols): Just use hard coded numbers
14030 for predefined tokens.
14031 * src/symtab.h (bucket): Remove all the hash table related
14032 members.
14033 * src/symtab.c (symtab): Replace by...
14034 (bucket_table): this.
14035 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
14036 (buckets_new, buckets_do): New.
14037
14038 2002-04-07 Akim Demaille <akim@epita.fr>
14039
14040 * src/gram.c (nitems, nrules, nsyms, ntokens, nvars, nritems)
14041 (start_symbol, max_user_token_number, semantic_parser)
14042 (error_token_number): Initialize.
14043 * src/reader.c (grammar, start_flag, startval, typed, lastprec):
14044 Initialize.
14045 (reader): Don't.
14046 (errtoken, eoftoken, undeftoken, axiom): Extern.
14047
14048 2002-04-07 Akim Demaille <akim@epita.fr>
14049
14050 * src/gram.h (rule_s): prec and precsym are now pointers
14051 to the bucket giving the priority/associativity.
14052 Member `associativity' removed: useless.
14053 * src/reduce.c, src/conflicts.c: Adjust.
14054
14055 2002-04-07 Akim Demaille <akim@epita.fr>
14056
14057 * src/lalr.c, src/LR0.c, src/closure.c, src/gram.c, src/reduce.c:
14058 Properly escape the symbols' TAG when outputting them.
14059
14060 2002-04-07 Akim Demaille <akim@epita.fr>
14061
14062 * src/lalr.h (LA): Is a bitsetv, not bitset*.
14063
14064 2002-04-07 Akim Demaille <akim@epita.fr>
14065
14066 * src/lalr.h, src/lalr.c (LAruleno): Replace with...
14067 (LArule): this, which is an array to rule_t*.
14068 * src/print.c, src/conflicts.c: Adjust.
14069
14070 2002-04-07 Akim Demaille <akim@epita.fr>
14071
14072 * src/gram.h (rule_t): Rename `number' as `user_number'.
14073 `number' is a new member.
14074 Adjust dependencies.
14075 * src/reduce.c (reduce_grammar_tables): Renumber rule_t.number.
14076
14077 2002-04-07 Akim Demaille <akim@epita.fr>
14078
14079 As a result of the previous patch, it is no longer needed
14080 to reorder ritem itself.
14081
14082 * src/reduce.c (reduce_grammar_tables): Don't sort RITEM.
14083
14084 2002-04-07 Akim Demaille <akim@epita.fr>
14085
14086 Be sure never to walk through RITEMS, but use only data related to
14087 the rules themselves. RITEMS should be banished.
14088
14089 * src/output.c (output_token_translations): Rename as...
14090 (prepare_tokens): this.
14091 In addition to `translate', prepare the muscles `tname' and
14092 `toknum', which were handled by...
14093 (output_rule_data): this.
14094 Remove, and move the remainder of its outputs into...
14095 (prepare_rules): this new routines, which also merges content from
14096 (output_gram): this.
14097 (prepare_rules): Be sure never to walk through RITEMS.
14098 (output_stos): Rename as...
14099 (prepare_stos): this.
14100 (output): Always invoke prepare_states, after all, just don't use it
14101 in the output if you don't need it.
14102
14103 2002-04-07 Akim Demaille <akim@epita.fr>
14104
14105 * src/LR0.c (new_state): Display `nstates' as the name of the
14106 newly created state.
14107 Adjust to initialize first_state and last_state if needed.
14108 Be sure to distinguish the initial from the final state.
14109 (new_states): Create the itemset of the initial state, and use
14110 new_state.
14111 * src/closure.c (closure): Now that the initial state has its
14112 items properly set, there is no need for a special case when
14113 creating `ruleset'.
14114
14115 As a result, now the rule 0, reducing to $axiom, is visible in the
14116 outputs. Adjust the test suite.
14117
14118 * tests/conflicts.at (Solved SR Conflicts)
14119 (Unresolved SR Conflicts): Adjust.
14120 * tests/regression.at (Web2c Report, Rule Line Numbers): Idem.
14121 * tests/conflicts.at (S/R in initial): New.
14122
14123 2002-04-07 Akim Demaille <akim@epita.fr>
14124
14125 * src/LR0.c (allocate_itemsets): Don't loop over ritem: loop over
14126 the RHS of the rules.
14127 * src/output.c (output_gram): Likewise.
14128
14129 2002-04-07 Akim Demaille <akim@epita.fr>
14130
14131 * src/gram.h (rule_t): `lhs' is now a pointer to the symbol's
14132 bucket.
14133 Adjust all dependencies.
14134 * src/reduce.c (nonterminals_reduce): Don't forget to renumber the
14135 `number' of the buckets too.
14136 * src/gram.h: Include `symtab.h'.
14137 (associativity): Move to...
14138 * src/symtab.h: here.
14139 No longer include `gram.h'.
14140
14141 2002-04-07 Akim Demaille <akim@epita.fr>
14142
14143 * src/gram.h, src/gram.c (rules_rhs_length): New.
14144 (ritem_longest_rhs): Use it.
14145 * src/gram.h (rule_t): `number' is a new member.
14146 * src/reader.c (packgram): Set it.
14147 * src/reduce.c (reduce_grammar_tables): Move the useless rules at
14148 the end of `rules', and count them out of `nrules'.
14149 (reduce_output, dump_grammar): Adjust.
14150 * src/print.c (print_grammar): It is no longer needed to check for
14151 the usefulness of a rule, as useless rules are beyond `nrules + 1'.
14152 * tests/reduce.at (Reduced Automaton): New test.
14153
14154 2002-04-07 Akim Demaille <akim@epita.fr>
14155
14156 * src/reduce.c (inaccessable_symbols): Fix a buglet: because of a
14157 lacking `+ 1' to nrules, Bison reported as useless a token if it
14158 was used solely to set the precedence of the last rule...
14159
14160 2002-04-07 Akim Demaille <akim@epita.fr>
14161
14162 * data/bison.c++, data/bison.simple: Don't output the current file
14163 name in #line, to avoid useless diffs between two identical
14164 outputs under different names.
14165
14166 2002-04-07 Akim Demaille <akim@epita.fr>
14167
14168 * src/closure.c, src/print.c, src/reader.c, src/reduce.c:
14169 Normalize loops to using `< nrules + 1', not `<= nrules'.
14170
14171 2002-04-07 Akim Demaille <akim@epita.fr>
14172
14173 * TODO: Update.
14174
14175 2002-04-07 Akim Demaille <akim@epita.fr>
14176
14177 * src/output.c, src/reader.c, src/symtab.c, src/symtab.h: Rename
14178 bucket.value as bucket.number.
14179
14180 2002-04-07 Akim Demaille <akim@epita.fr>
14181
14182 * src/closure.c, src/derives.c, src/gram.h, src/lalr.c,
14183 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
14184 * src/reader.c, src/reduce.c: Let rule_t.rhs point directly to the
14185 RHS, instead of being an index in RITEMS.
14186
14187 2002-04-04 Paul Eggert <eggert@twinsun.com>
14188
14189 * doc/bison.texinfo: Update copyright date.
14190 (Rpcalc Lexer, Symbols, Token Decl): Don't assume ASCII.
14191 (Symbols): Warn about running Bison in one character set,
14192 but compiling and/or running in an incompatible one.
14193 Warn about character code 256, too.
14194
14195 2002-04-03 Paul Eggert <eggert@twinsun.com>
14196
14197 * src/bison.data (YYSTACK_ALLOC): Depend on whether
14198 YYERROR_VERBOSE is nonzero, not whether it is defined.
14199
14200 Merge changes from bison-1_29-branch.
14201
14202 2002-03-20 Paul Eggert <eggert@twinsun.com>
14203
14204 Merge fixes from Debian bison_1.34-1.diff.
14205
14206 * configure.in (AC_PREREQ): 2.53.
14207
14208 2002-03-20 Akim Demaille <akim@epita.fr>
14209
14210 * src/conflicts.c (log_resolution): Argument `resolution' is const.
14211
14212 2002-03-19 Paul Eggert <eggert@twinsun.com>
14213
14214 * src/bison.simple (YYCOPY): New macro.
14215 (YYSTACK_RELOCATE): Use it.
14216 Remove Type arg; no longer needed. All callers changed.
14217 (yymemcpy): Remove; no longer needed.
14218
14219 * Makefile.am (AUTOMAKE_OPTIONS): 1.6.
14220 * doc/Makefile.am (AUTOMAKE_OPTIONS): Remove.
14221
14222 2002-03-19 Akim Demaille <akim@epita.fr>
14223
14224 Test and fix the #line outputs.
14225
14226 * tests/atlocal.at (GCC): New.
14227 * tests/synclines.at (AT_TEST_SYNCLINE): New macro.
14228 (Prologue synch line, %union synch line, Postprologue synch line)
14229 (Action synch line, Epilogue synch line): New tests.
14230 * src/reader.c (parse_union_decl): Define the muscle stype_line.
14231 * data/bison.simple, data/bison.c++: Use it.
14232
14233 2002-03-19 Akim Demaille <akim@epita.fr>
14234
14235 * tests/regression.at (%nonassoc and eof, Unresolved SR Conflicts)
14236 (Solved SR Conflicts, %expect not enough, %expect right)
14237 (%expect too much): Move to...
14238 * tests/conflicts.at: this new file.
14239
14240 2002-03-19 Akim Demaille <akim@epita.fr>
14241
14242 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
14243 * data/bison.simple, data/bison.c++: Handle the `#define' part, so
14244 that we can move to enums for instance.
14245 * src/output.c (token_definitions_output): Output a list of
14246 `token-name, token-number' instead of the #define.
14247 (output_skeleton): Name this list `b4_tokens', not `b4_tokendefs'.
14248
14249 2002-03-14 Akim Demaille <akim@epita.fr>
14250
14251 Use Gettext 0.11.1.
14252
14253 2002-03-09 Robert Anisko <robert@lrde.epita.fr>
14254
14255 * data/bison.c++: Make the user able to add members to the generated
14256 parser by subclassing.
14257
14258 2002-03-05 Robert Anisko <robert@lrde.epita.fr>
14259
14260 * src/reader.c (read_additionnal_code): `c' should be an integer, not
14261 a character.
14262 Reported by Nicolas Tisserand and Nicolas Burrus.
14263
14264 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
14265
14266 * src/reader.c: Warn about lacking semi-colons, do not complain.
14267
14268 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
14269
14270 * data/bison.c++: Remove a debug line.
14271
14272 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
14273
14274 * data/bison.c++: Unmerge value as yylval and value as yyval. Unmerge
14275 location as yylloc and location as yyloc. Use YYLLOC_DEFAULT, and
14276 provide a default implementation.
14277
14278 2002-03-04 Akim Demaille <akim@epita.fr>
14279
14280 * tests/input.at (Invalid $n, Invalid @n): Add the ending `;'.
14281 * tests/output.at (AT_CHECK_OUTPUT): Likewise.
14282 * tests/headers.at (AT_TEST_CPP_GUARD_H): Ditto.
14283 * tests/semantic.at (Parsing Guards): Similarly.
14284 * src/reader.at (readgram): Complain if the last rule is not ended
14285 with a semi-colon.
14286
14287 2002-03-04 Akim Demaille <akim@epita.fr>
14288
14289 * src/warshall.h, src/warshall.c (bitmatrix_print): Move to...
14290 * src/closure.c: here.
14291 (set_firsts): Use bitsetv_reflexive_transitive_closure instead of
14292 RTC.
14293 * src/warshall.h, src/warshall.c: Remove.
14294 * tests/sets.at (Broken Closure): Adjust.
14295
14296 2002-03-04 Akim Demaille <akim@epita.fr>
14297
14298 * src/output.c (output_skeleton): tempdir is const.
14299 bytes_read is unused.
14300
14301 2002-03-04 Akim Demaille <akim@epita.fr>
14302
14303 * lib/bbitset.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
14304 * lib/bitsetv.h, lib/ebitset.c, lib/lbitset.c, lib/sbitset.c:
14305 Update.
14306 From Michael Hayes.
14307
14308 2002-03-04 Akim Demaille <akim@epita.fr>
14309
14310 * src/closure.c (closure): `r' is unused.
14311
14312 2002-03-04 Akim Demaille <akim@epita.fr>
14313
14314 * tests/sets.at (Broken Closure): Add the ending `;'.
14315 * src/reader.at (readgram): Complain if a rule is not ended with a
14316 semi-colon.
14317
14318 2002-03-04 Akim Demaille <akim@epita.fr>
14319
14320 * src/conflicts.c (set_conflicts): Use bitset_disjoint_p.
14321 (count_sr_conflicts): Use bitset_count.
14322 * src/reduce.c (inaccessable_symbols): Ditto.
14323 (bits_size): Remove.
14324 * src/warshall.h, src/warshall.c: Convert to bitsetv.
14325
14326 2002-03-04 Akim Demaille <akim@epita.fr>
14327
14328 * src/closure.c, src/conflicts.c, src/lalr.c, src/print.c,
14329 * src/reduce.c: Remove the `bitset_zero's following the
14330 `bitset_create's, as now it is performed by the latter.
14331
14332 2002-03-04 Akim Demaille <akim@epita.fr>
14333
14334 * lib/bitset.c, lib/bitset.h, lib/bitsetv.c, lib/bitsetv.h,
14335 * lib/ebitset.c, lib/ebitset.h, lib/lbitset.c, lib/lbitset.h,
14336 * lib/sbitset.c, lib/sbitset.h, lib/bbitset.h: Update from the
14337 latest sources from Michael.
14338
14339 2002-03-04 Akim Demaille <akim@epita.fr>
14340
14341 * src/output.c (output): Don't free the grammar.
14342 * src/reader.c (grammar_free): New.
14343 * src/main.c (main): Call it and don't free symtab here.
14344
14345 2002-03-04 Akim Demaille <akim@epita.fr>
14346
14347 * src/lex.c (parse_percent_token): Be sure to 0-end token_buffer
14348 before returning.
14349 Reported by Benoit Perrot.
14350
14351 2002-03-04 Akim Demaille <akim@epita.fr>
14352
14353 Use bitset operations when possible, not loops over bits.
14354
14355 * src/conflicts.c (set_conflicts, count_sr_conflicts): Use
14356 bitset_or.
14357 * src/print.c (print_reductions): Use bitset_and, bitset_andn.
14358 * src/reduce.c (useless_nonterminals): Formatting changes.
14359 * src/warshall.c (TC): Use bitset_or.
14360
14361 2002-03-04 Akim Demaille <akim@epita.fr>
14362
14363 * src/lalr.h, src/lalr.c (tokensetsize): Remove, unused.
14364 * src/system.h (BITS_PER_WORD, WORDSIZE, SETBIT, RESETBIT, BITISSET):
14365 Ditto.
14366
14367 2002-03-04 Akim Demaille <akim@epita.fr>
14368
14369 * src/lalr.c (F): Now a bitset*.
14370 Adjust all dependencies.
14371
14372 2002-03-04 Akim Demaille <akim@epita.fr>
14373
14374 * src/conflicts.c (shiftset, lookaheadset): Now bitset.
14375 Adjust all dependencies.
14376
14377 2002-03-04 Akim Demaille <akim@epita.fr>
14378
14379 * src/L0.c, src/LR0.h (nstates): Be size_t.
14380 Adjust comparisons (signed vs unsigned).
14381 * src/conflics.c, src/lalr.c, src/lalr.h, src/output.c (LA): Now a
14382 bitset*.
14383 Adjust all dependencies.
14384
14385 2002-03-04 Akim Demaille <akim@epita.fr>
14386
14387 * src/closure.c (firsts): Now, also a bitset.
14388 Adjust all dependencies.
14389 (varsetsize): Remove, now unused.
14390 * src/warshall.h, src/warshall.c: Now work on arrays of bitsets.
14391
14392 2002-03-04 Akim Demaille <akim@epita.fr>
14393
14394 * src/print.c: Convert to use bitset.h, not hand coded iterations
14395 over ints.
14396
14397 2002-03-04 Akim Demaille <akim@epita.fr>
14398
14399 * src/reduce.c: Convert to use bitset.h, not hand coded BSet.
14400
14401 2002-03-04 Akim Demaille <akim@epita.fr>
14402
14403 * src/closure.c (ruleset): Be a bitset.
14404 (rulesetsize): Remove.
14405
14406 2002-03-04 Akim Demaille <akim@epita.fr>
14407
14408 * lib/bitset-int.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
14409 * lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/lbitset.c,
14410 * lib/lbitset.h, lib/sbitset.c, lib/sbitset.h: New.
14411 * src/closure.c (fderives): Be an array of bitsets.
14412
14413 2002-02-28 Robert Anisko <robert@lrde.epita.fr>
14414
14415 * data/bison.c++: Merge the two generated headers. Insert a copyright
14416 notice in each output file.
14417
14418 2002-02-28 Akim Demaille <akim@epita.fr>
14419
14420 * data/bison.c++: Copy the prologue of bison.simple to fetch
14421 useful M4 definitions, such as b4_header_guard.
14422
14423 2002-02-25 Akim Demaille <akim@epita.fr>
14424
14425 * src/getargs.c (version): Give the name of the authors, and use a
14426 translator friendly scheme for the bgr
14427 copyright notice.
14428
14429 2002-02-25 Akim Demaille <akim@epita.fr>
14430
14431 * src/output.c (header_output): Remove, now handled completely via
14432 M4.
14433
14434 2002-02-25 Akim Demaille <akim@epita.fr>
14435
14436 * m4/m4.m4: New, from CVS Autoconf.
14437 * configure.in: Invoke it.
14438 * src/output.c (output_skeleton): Use its result instead of the
14439 hard coded name.
14440
14441 2002-02-25 Akim Demaille <akim@epita.fr>
14442
14443 * lib/tempname.c, lib/mkstemp.c, m4/mkstemp.m4: New, stolen from
14444 Fileutils 4.1.5.
14445 * configure.in: Invoke UTILS_FUNC_MKSTEMP.
14446 * src/output.c (output_skeleton): Use mkstemp to create a real
14447 temporary file.
14448 Move the filling of `skeleton' and its muscle to...
14449 (prepare): here.
14450 (output): Move the definition of the prologue muscle to...
14451 (prepare): here.
14452 * src/system.h (DEFAULT_TMPDIR): New.
14453
14454 2002-02-14 Paul Eggert <eggert@twinsun.com>
14455
14456 Remove the support for C++ namespace cleanliness; it was
14457 causing more problems than it was curing, since it didn't work
14458 properly on some nonstandard C++ compilers. This can wait
14459 for a proper C++ parser.
14460
14461 * NEWS: Document this.
14462 * doc/bison.texinfo (Bison Parser, Debugging): Remove special mention
14463 of C++, as it's treated like C now.
14464 * src/bison.simple (YYSTD): Remove.
14465 (YYSIZE_T, YYFPRINTF, YYPARSE_PARAM_ARG, YYPARSE_PARAM_DECL):
14466 Treat C++ just like Standard C instead of trying to support
14467 namespace cleanliness.
14468
14469 2002-02-14 Akim Demaille <akim@epita.fr>
14470
14471 * tests/regression.at (else): Adjust to Andreas' change.
14472
14473 2002-02-14 Akim Demaille <akim@epita.fr>
14474
14475 * lib/Makefile.am (EXTRA_DIST): Ship strnlen.c.
14476
14477 2002-02-13 Andreas Schwab <schwab@suse.de>
14478
14479 * src/output.c (output_rule_data): Don't output NULL, it might
14480 not be defined yet.
14481
14482 2002-02-11 Robert Anisko <robert@lrde.epita.fr>
14483
14484 * data/bison.c++ (YYDEBUG, YYERROR_VERBOSE): After the prologue.
14485 (Copyright notice): Update.
14486
14487 2002-02-11 Akim Demaille <akim@epita.fr>
14488
14489 * tests/regression.at (%nonassoc and eof): Don't include
14490 nonportable headers.
14491
14492 2002-02-08 Robert Anisko <robert@lrde.epita.fr>
14493
14494 * data/bison.c++: Correct error recovery. Make the user able to
14495 initialize the starting location.
14496
14497 2002-02-07 Akim Demaille <akim@epita.fr>
14498
14499 * tests/input.at: New.
14500
14501 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
14502
14503 * data/bison.c++: Replace some direct m4 expansions by constants. Be
14504 more consistent when naming methods and variables. Put preprocessor
14505 directives around tables only needed for debugging.
14506
14507 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
14508
14509 * data/bison.c++ (yy::b4_name::print_): New method, replaces yyprint in
14510 C++ parsers.
14511 (yy::b4_name::parse): Use print_.
14512
14513 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
14514
14515 * data/bison.c++ (yy::b4_name::parse): Error recovery is back.
14516
14517 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
14518
14519 * data/bison.c++ (yy::b4_name::error_): New method, replaces yyerror in
14520 C++ parsers.
14521 (yy::b4_name::parse): Build verbose error messages, and use error_.
14522
14523 2002-02-06 Robert Anisko <robert@lrde.epita.fr>
14524
14525 * data/bison.c++: Fix m4 quoting in comments.
14526
14527 2002-02-06 Robert Anisko <robert@lrde.epita.fr>
14528
14529 * data/bison.c++: Adjust the parser code. Fix some muscles that were
14530 not expanded by m4.
14531
14532 2002-02-05 Akim Demaille <akim@epita.fr>
14533
14534 * data/bison.c++: Adjust to the M4 back end.
14535 More is certainly needed.
14536
14537 2002-02-05 Akim Demaille <akim@epita.fr>
14538
14539 Give a try to M4 as a back end.
14540
14541 * lib/readpipe.c: New, from wdiff.
14542 * src/Makefile.am (DEFS): Define PKGDATADIR, not BISON_SIMPLE and
14543 BISON_HAIRY.
14544 * src/system.h (BISON_HAIRY, BISON_SIMPLE): Remove the DOS and VMS
14545 specific values. Now it is m4 that performs the lookup.
14546 * src/parse-skel.y: Remove.
14547 * src/muscle_tab.c, src/muscle_tab.h (muscles_m4_output): New.
14548 * src/output.c (actions_output, guards_output)
14549 (token_definitions_output): No longer keeps track of the output
14550 line number, hence remove the second argument.
14551 (guards_output): Check against the guard member of a rule, not the
14552 action member.
14553 Adjust callers.
14554 (output_skeleton): Don't look for the skeleton location, let m4 do
14555 that.
14556 Create `/tmp/muscles.m4'. This is temporary, a proper temporary
14557 file will be used.
14558 Invoke `m4' on m4sugar.m4, muscles.m4, and the skeleton.
14559 (prepare): Given that for the time being changesyntax is not
14560 usable in M4, rename the muscles using `-' to `_'.
14561 Define `defines_flag', `output_parser_name' and `output_header_name'.
14562 * src/output.h (actions_output, guards_output)
14563 (token_definitions_output): Adjust prototypes.
14564 * src/scan-skel.l: Instead of scanning the skeletons, it now
14565 processes the output of m4: `__oline__' and `#output'.
14566 * data/bison.simple: Adjust to be used by M4(sugar).
14567 * tests/Makefile.am: Use check_SCRIPTS to make sure `bison' is up
14568 to date.
14569 * tests/bison.in: Use the secrete envvar `BISON_PKGDATADIR'
14570 instead of the dead `BISON_SIMPLE' and `BISON_HAIRY'.
14571 * data/m4sugar/m4sugar.m4, data/m4sugar/version.m4: New,
14572 shamelessly stolen from CVS Autoconf.
14573
14574 2002-02-05 Akim Demaille <akim@epita.fr>
14575
14576 * lib/hash.c, lib/hash.h: Replace with Fileutils 4.1's version.
14577 * configure.in: Check for the declarations of free and malloc.
14578 * src/muscle_tab.c: Adjust.
14579
14580 2002-02-05 Akim Demaille <akim@epita.fr>
14581
14582 * src/muscle_tab.c (muscle_init): Don't default to NULL muscle
14583 which have no values.
14584
14585 2002-02-05 Akim Demaille <akim@epita.fr>
14586
14587 * src/bison.simple, src/bison.hairy, src/bison.c++: Move to...
14588 * data/: here.
14589
14590 2002-01-29 Paul Eggert <eggert@twinsun.com>
14591
14592 * src/bison.simple (YYSIZE_T): Do not define merely because
14593 YYSTACK_USE_ALLOCA is nonzero or alloca or _ALLOCA_H are defined.
14594 On some platforms, <alloca.h> does not declare YYSTD (size_t).
14595
14596 2002-01-27 Akim Demaille <akim@epita.fr>
14597
14598 Fix `%nonassoc and eof'.
14599
14600 * src/state.c (errs_dup): Aaaah! The failure was due to bytes
14601 which were not properly copied! Replace
14602 memcpy (res->errs, src->errs, src->nerrs);
14603 with
14604 memcpy (res->errs, src->errs, src->nerrs * sizeof (src->errs[0]));
14605 !!!
14606 * tests/regression.at (%nonassoc and eof): Adjust to newest
14607 Autotest: `.' is not in the PATH.
14608
14609 2002-01-27 Akim Demaille <akim@epita.fr>
14610
14611 * tests/sets.at (AT_EXTRACT_SETS): New.
14612 (Nullable): Use it.
14613 (Firsts): New.
14614
14615 2002-01-26 Akim Demaille <akim@epita.fr>
14616
14617 * tests/actions.at, tests/calc.at, tests/headers.at,
14618 * tests/torture.at: Adjust to the newest Autotest which no longer
14619 forces `.' in the PATH.
14620
14621 2002-01-25 Akim Demaille <akim@epita.fr>
14622
14623 * tests/regression.at (%nonassoc and eof): New.
14624 Suggested by Robert Anisko.
14625
14626 2002-01-24 Akim Demaille <akim@epita.fr>
14627
14628 Bison dumps core when trying to complain about broken input files.
14629 Reported by Cris van Pelt.
14630
14631 * src/lex.c (parse_percent_token): Be sure to set token_buffer.
14632 * tests/regression.at (Invalid input: 1, Invalid input: 2): Merge
14633 into...
14634 (Invalid inputs): Strengthen: exercise parse_percent_token.
14635
14636 2002-01-24 Robert Anisko <robert.anisko@epita.fr>
14637
14638 * src/Makefile.am: Add bison.c++.
14639 * src/bison.c++: New skeleton.
14640
14641 2002-01-21 Paolo Bonzini <bonzini@gnu.org>
14642
14643 * po/it.po: New.
14644
14645 2002-01-21 Kees Zeelenberg <kzlg@users.sourceforge.net>
14646
14647 * src/files.c (skeleton_find) [MSDOS]: Fix cp definition.
14648
14649 2002-01-20 Marc Autret <marc@gnu.org>
14650
14651 * src/files.c (compute_output_file_names): Fix
14652
14653 2002-01-20 Marc Autret <marc@gnu.org>
14654
14655 * tests/output.at: New test.
14656 * src/files.c (compute_base_names): Don't map extensions when
14657 the YACC flag is set, use defaults.
14658 Reported by Evgeny Stambulchik.
14659
14660 2002-01-20 Marc Autret <marc@gnu.org>
14661
14662 * src/system.h: Need to define __attribute__ away for non-GCC
14663 compilers as well (i.e., the vendor C compiler).
14664 Suggested by Albert Chin-A-Young.
14665
14666 2002-01-11 Tim Van Holder <tim.van.holder@pandora.be>
14667
14668 * lib/hash.h, lib/hash.c: Renamed __P to PARAMS and used the
14669 canonical definition.
14670 * src/system.h: Use the canonical definition for PARAMS (avoids
14671 a conflict with the macro from lib/hash.h).
14672
14673 2002-01-11 Akim Demaille <akim@epita.fr>
14674
14675 * configure.in: Use AC_FUNC_STRNLEN.
14676 Fixes the failures observed on AIX 4.3 by H.Merijn Brand.
14677
14678 2002-01-09 Akim Demaille <akim@epita.fr>
14679
14680 * src/files.c, src/files.h (output_infix): New.
14681 (tab_extension): Remove.
14682 (compute_base_names): Compute the former, drop the latter.
14683 * src/output.c (prepare): Insert the muscles `output-infix', and
14684 `output-suffix'.
14685 * src/parse-skel.y (string, string.1): New.
14686 (section.header): Use it.
14687 (section.yacc): Remove.
14688 (prefix): Remove too.
14689 * src/scan-skel.l: Adjust.
14690 * src/bison.simple, src/bison.hairy: Adjust.
14691
14692 2002-01-09 Akim Demaille <akim@epita.fr>
14693
14694 * configure.in (WERROR_CFLAGS): Compute it.
14695 * src/Makefile.am (CFLAGS): Pass it.
14696 * tests/atlocal.in (CFLAGS): Idem.
14697 * src/files.c: Fix a few warnings.
14698 (get_extension_index): Remove, unused.
14699
14700 2002-01-08 Akim Demaille <akim@epita.fr>
14701
14702 * src/getargs.c (AS_FILE_NAME): New.
14703 (getargs): Use it to convert DOSish file names.
14704 * src/files.c (base_name): Rename as full_base_name to avoid
14705 clashes with `base_name ()'.
14706 (filename_split): New.
14707 (compute_base_names): N-th rewrite, using filename_split.
14708
14709 2002-01-08 Akim Demaille <akim@epita.fr>
14710
14711 * lib/basename.c, lib/dirname.h, lib/dirname.c, lib/memrchr.c:
14712 New, stolen from the Fileutils 4.1.
14713 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
14714 * configure.in: Check for the presence of memrchr, and of its
14715 prototype.
14716
14717 2002-01-07 Tim Van Holder <tim.van.holder@pandora.be>
14718
14719 * lib/hash.h (__P): Added definition for this macro.
14720 * src/Makefile.am: Add parse-skel.c and scan-skel.c to
14721 BUILT_SOURCES, to ensure they are generated first.
14722 * src/parse-skel.y: Use YYERROR_VERBOSE instead of
14723 %error-verbose to allow bootstrapping with bison 1.30x.
14724
14725 2002-01-06 Akim Demaille <akim@epita.fr>
14726
14727 * src/reader.c (parse_braces): Don't fetch the next char, the
14728 convention is to fetch on entry.
14729 * tests/torture.at (GNU Cim Grammar): Reintroduce their weird
14730 'switch' without a following semicolon.
14731 * tests/regression.at (braces parsing): New.
14732
14733 2002-01-06 Akim Demaille <akim@epita.fr>
14734
14735 Bison is dead wrong in its RR conflict reports.
14736
14737 * tests/torture.at (GNU Cim Grammar): New.
14738 * src/conflicts.c (count_rr_conflicts): Fix.
14739
14740 2002-01-06 Akim Demaille <akim@epita.fr>
14741
14742 Creating package.m4 from configure.ac causes too many problems.
14743
14744 * tests/Makefile.am (package.m4): Create it by hand,
14745 AC_CONFIG_TESTDIR no longer does in the most recent CVS Autoconf.
14746
14747 2002-01-06 Akim Demaille <akim@epita.fr>
14748
14749 * src/Makefile.am (bison_SOURCES): Add parse-skel.h and
14750 skeleton.h.
14751
14752 2002-01-04 Paul Eggert <eggert@twinsun.com>
14753
14754 * doc/bison.texinfo (Debugging):
14755 Remove YYSTDERR; it's no longer defined or used.
14756 Also, s/cstdio.h/cstdio/.
14757
14758 2002-01-03 Akim Demaille <akim@epita.fr>
14759
14760 * tests/bison.in, tests/atlocal.in: Adjust to CVS Autoconf.
14761
14762 2002-01-03 Akim Demaille <akim@epita.fr>
14763
14764 * src/parse-skel.y (process_skeleton): Don't bind the parser's
14765 tracing code to --trace, wait for a better --trace option, with
14766 args.
14767
14768 2002-01-03 Akim Demaille <akim@epita.fr>
14769
14770 * src/bison.simple (YYSTDERR): Remove, replace `stderr'.
14771 The ISO C++ standard is extremely clear about it: stderr is
14772 considered a macro, not a regular symbol (see table 94 `Header
14773 <cstdio> synopsis', [lib.c.files] 27.8.2 C Library files).
14774 Therefore std:: does not apply to it. It still does with fprintf.
14775 Also, s/cstdio.h/cstdio/.
14776
14777 2002-01-03 Akim Demaille <akim@epita.fr>
14778
14779 * lib/quotearg.c: Use `#include "..."' instead of `#include <...>'
14780 for non system headers.
14781
14782 2002-01-02 Akim Demaille <akim@epita.fr>
14783
14784 Equip the skeleton chain with location tracking, runtime trace,
14785 pure parser and scanner.
14786
14787 * src/parse-skel.y: Request a pure parser, locations, and prefix
14788 renaming.
14789 (%union): Having several members with the same type does not help
14790 type mismatches, simplify.
14791 (YYPRINT, yyprint): New.
14792 (yyerror): ``Rename'' (there is a #define yyerror skel_error) as...
14793 (skel_error): this.
14794 Handle locations.
14795 * src/scan-skel.l: Adjust to these changes.
14796 * src/skeleton.h (LOCATION_RESET, LOCATION_LINES, LOCATION_STEP)
14797 (LOCATION_PRINT, skel_control_t): New.
14798
14799 2001-12-30 Akim Demaille <akim@epita.fr>
14800
14801 * src/parse-skel.y: Get rid of the shift/reduce conflict:
14802 replace `gb' with BLANKS.
14803 * src/scan-skel.l: Adjust.
14804
14805 2001-12-30 Akim Demaille <akim@epita.fr>
14806
14807 * src/system.h: We don't need nor want bcopy.
14808 Throw away MS-DOS crap: we don't need getpid.
14809 * configure.in: We don't need strndup. It was even causing
14810 problems: because Flex includes the headers *before* us,
14811 _GNU_SOURCE is not defined by config.h, and therefore strndup was
14812 not visible.
14813 * lib/xstrndup.c: New.
14814 * src/scan-skel.l: Use it.
14815 Be sure to initialize yylval.muscle member when scanning a MUSCLE.
14816 * src/parse-skel.y: Use %directives instead of #defines.
14817
14818 2001-12-30 Akim Demaille <akim@epita.fr>
14819
14820 * src/skeleton.h: New.
14821 * src/output.c (output_parser, output_master_parser): Remove, dead
14822 code.
14823 * src/output.h (get_lines_number, actions_output, guards_output)
14824 (token_definitions_output): Prototype them.
14825 * src/parse-skel.y: Add the license notice.
14826 Include output.h and skeleton.h.
14827 (process_skeleton): Returns void, and takes a single parameter.
14828 * src/scan-skel.l: Add the license notice.
14829 Include skeleton.h.
14830 Don't use %option yylineno: it seems that then Flex imagines
14831 REJECT has been used, and therefore it won't reallocate its
14832 buffers (which makes no other sense to me than a bug). It results
14833 in warnings for `unused: yy_flex_realloc'.
14834
14835 2001-12-30 Robert Anisko <robert.anisko@epita.fr>
14836
14837 * src/muscle_tab.h (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
14838 (MUSCLE_INSERT_PREFIX): ...to there.
14839 * src/output.c (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
14840 (MUSCLE_INSERT_PREFIX): Move from here...
14841
14842 * src/bison.hairy: Add a section directive. Put braces around muscle
14843 names. This parser skeleton is still broken, but Bison should not
14844 choke on a bad muscle 'syntax'.
14845 * src/bison.simple: Add a section directive. Put braces around muscle
14846 names.
14847
14848 * src/files.h (strsuffix, stringappend): Add declarations.
14849 (tab_extension): Add declaration.
14850 (short_base_name): Add declaration.
14851
14852 * src/files.c (strsuffix, stringappend): No longer static. These
14853 functions are used in the skeleton parser.
14854 (tab_extension): New.
14855 (compute_base_names): Use the computations done in this function
14856 to guess if the generated parsers should have '.tab' in their
14857 names.
14858 (short_base_name): No longer static.
14859
14860 * src/output.c (output_skeleton): New.
14861 (output): Disable call to output_master_parser, and give a try to
14862 a new skeleton handling system.
14863 (guards_output, actions_output): No longer static.
14864 (token_definitions_output, get_lines_number): No longer static.
14865
14866 * configure.in: Use AM_PROG_LEX and AC_PROG_YACC.
14867
14868 * src/Makefile.am (bison_SOURCES): Add scan-skel.l and
14869 parse-skel.y.
14870
14871 * src/parse-skel.y: New file.
14872 * src/scan-skel.l: New file.
14873
14874 2001-12-29 Akim Demaille <akim@epita.fr>
14875
14876 %name-prefix is broken.
14877
14878 * src/files.c (spec_name_prefix): Initialize to NULL, not to "yy".
14879 Adjust all dependencies.
14880 * tests/headers.at (export YYLTYPE): Strengthen this test: use
14881 %name-prefix.
14882
14883 Renaming yylval but not yylloc is not consistent. Now we do.
14884
14885 * src/bison.simple: Prefix yylloc if used.
14886 * doc/bison.texinfo (Decl Summary): Document that.
14887
14888 2001-12-29 Akim Demaille <akim@epita.fr>
14889
14890 * doc/bison.texinfo: Promote `%long-directive' over
14891 `%long_directive'.
14892 Remove all references to fixed-output-files, yacc is enough.
14893
14894 2001-12-29 Akim Demaille <akim@epita.fr>
14895
14896 * src/bison.simple: Define YYDEBUG and YYERROR_VERBOSE *after* the
14897 user prologue. These are defaults.
14898 * tests/actions.at (Mid-rule actions): Make sure the user can
14899 define YYDEBUG and YYERROR_VERBOSE.
14900
14901 2001-12-29 Akim Demaille <akim@epita.fr>
14902
14903 * src/output.c (header_output): Don't forget to export YYLTYPE and
14904 yylloc.
14905 * tests/headers.at (export YYLTYPE): New, make sure it does.
14906 * tests/regression.at (%union and --defines, Invalid CPP headers):
14907 Move to...
14908 * tests/headers.at: here.
14909
14910 2001-12-29 Akim Demaille <akim@epita.fr>
14911
14912 * src/gram.h (rule_s): Member `assoc' is of type `associativity'.
14913
14914 2001-12-29 Akim Demaille <akim@epita.fr>
14915
14916 * tests/actions.at (Mid-rule actions): Output on a single line
14917 instead of several.
14918
14919 2001-12-29 Akim Demaille <akim@epita.fr>
14920
14921 * doc/bison.texinfo: Formatting changes.
14922
14923 2001-12-29 Akim Demaille <akim@epita.fr>
14924
14925 Don't store the token defs in a muscle, just be ready to output it
14926 on command. Now possible via `symbols'. Fixes a memory leak.
14927
14928 * src/output.c (token_definitions_output): New.
14929 (output_parser, header_output): Use it.
14930 * src/reader.c (symbols_save): Remove.
14931
14932 2001-12-29 Akim Demaille <akim@epita.fr>
14933
14934 * src/bison.simple: Do not provide a default for YYSTYPE and
14935 YYLTYPE before the user's prologue. Otherwise it's hardly... a
14936 default.
14937
14938 2001-12-29 Akim Demaille <akim@epita.fr>
14939
14940 Mid-rule actions are simply... ignored!
14941
14942 * src/reader.c (readgram): Be sure to attach mid-rule actions to
14943 the empty-rule associated to the dummy symbol, not to the host
14944 rule.
14945 * tests/actions.at (Mid-rule actions): New.
14946
14947 2001-12-29 Akim Demaille <akim@epita.fr>
14948
14949 Memory leak.
14950
14951 * src/reader.c (reader): Free grammar.
14952
14953 2001-12-29 Akim Demaille <akim@epita.fr>
14954
14955 Memory leak.
14956
14957 * src/LR0.c (new_itemsets): Don't allocate `shift_symbol' here,
14958 since it allocates it for each state, although only one is needed.
14959 (allocate_storage): Do it here.
14960
14961 2001-12-29 Akim Demaille <akim@epita.fr>
14962
14963 * src/options.h, src/options.c (create_long_option_table): Rename
14964 as...
14965 (long_option_table_new): this, with a clearer prototype.
14966 (percent_table): Remove, unused,
14967 * src/getargs.c (getargs): Adjust.
14968
14969 2001-12-29 Akim Demaille <akim@epita.fr>
14970
14971 * src/LR0.c, src/conflicts.c, src/lalr.c, src/lalr.h, src/output.c
14972 * src/print.c, src/print_graph.c, src/state.h: Rename state_table
14973 as states.
14974
14975 2001-12-29 Akim Demaille <akim@epita.fr>
14976
14977 * src/lalr.c (build_relations): Rename `states' as `states1'.
14978 Sorry, I don't understand exactly what it is, no better name...
14979
14980 2001-12-29 Akim Demaille <akim@epita.fr>
14981
14982 * src/closure.c, src/conflicts.c, src/derives.c, src/gram.c
14983 * src/gram.h, src/lalr.c, src/nullable.c, src/output.c, src/print.c
14984 * src/print_graph.c, src/reader.c, src/reduce.c: Rename rule_table
14985 as rules.
14986
14987 2001-12-29 Akim Demaille <akim@epita.fr>
14988
14989 * src/gram.c (rprec, rprecsym, rassoc): Remove, unused since long
14990 ago.
14991
14992 2001-12-29 Akim Demaille <akim@epita.fr>
14993
14994 * src/reader.c, src/reader.h (user_toknums): Remove.
14995 Adjust all users to use symbols[i]->user_token_number.
14996
14997 2001-12-29 Akim Demaille <akim@epita.fr>
14998
14999 * src/gram.c, src/gram.h (sprec, sassoc): Remove.
15000 Adjust all users to use symbols[i]->prec or ->assoc.
15001
15002 2001-12-29 Akim Demaille <akim@epita.fr>
15003
15004 * src/reader.c, src/reader.h (tags): Remove.
15005 Adjust all users to use symbols[i]->tag.
15006
15007 2001-12-29 Akim Demaille <akim@epita.fr>
15008
15009 * src/gram.h, src/gram.c (symbols): New, similar to state_table
15010 and rule_table.
15011 * src/reader.c (packsymbols): Fill this table.
15012 Drop sprec.
15013 * src/conflicts.c (resolve_sr_conflict): Adjust.
15014 * src/reduce.c (reduce_grammar): Adjust: just sort symbols, a
15015 single table.
15016 Use symbols[i]->tag instead of tags[i].
15017
15018 2001-12-29 Akim Demaille <akim@epita.fr>
15019
15020 * tests/calc.at (_AT_DATA_CALC_Y): Also use %union.
15021 In addition, put a comment in there, to replace...
15022 * tests/regression.at (%union and C comments): Remove.
15023
15024 2001-12-29 Akim Demaille <akim@epita.fr>
15025
15026 * tests/regression.at (Web2c Actions): Blindly move the actual
15027 output as expected output. The contents *seem* right to me, but I
15028 can't pretend reading perfectly parser tables... Nonetheless, all
15029 the other tests pass correctly, the table look OK, even though the
15030 presence of `$axiom' is to be noted: AFAICS it is useless (but
15031 harmless).
15032
15033 2001-12-29 Akim Demaille <akim@epita.fr>
15034
15035 * src/reader.c (readgram): Don't add the rule 0 if there were no
15036 rules read. In other words, add it _after_ having performed
15037 grammar sanity checks.
15038 Fixes the `tests/regression.at (Invalid input: 1)' Failure.
15039
15040 2001-12-29 Akim Demaille <akim@epita.fr>
15041
15042 * tests/regression.at (Web2c Report): Catch up: the rule 0 is now
15043 visible, and some states have now a different number.
15044
15045 2001-12-29 Akim Demaille <akim@epita.fr>
15046
15047 * src/reader.c (readgram): Bind the initial rule's lineno to that
15048 of the first rule.
15049 * tests/regression.at (Rule Line Numbers, Unresolved SR Conflicts):
15050 (Solved SR Conflicts): Adjust rule 0's line number.
15051
15052 2001-12-29 Akim Demaille <akim@epita.fr>
15053
15054 Fix the `GAWK Grammar' failure.
15055
15056 * src/LR0.c (final_state): Initialize to -1 so that we do compute
15057 the reductions of the first state which was mistakenly confused
15058 with the final state because precisely final_state was initialized
15059 to 0.
15060 * tests/sets.at (Nullable): Adjust: state 0 does have lookaheads,
15061 now noticed by Bison.
15062 * tests/regression.at (Rule Line Numbers): Adjust: state 0 does
15063 have a reduction on $default.
15064
15065 2001-12-29 Akim Demaille <akim@epita.fr>
15066
15067 * src/gram.c (ritem_print): Be sure to subtract 1 when displaying
15068 rule line numbers.
15069 * src/closure.c (print_closure): Likewise.
15070 * src/derives.c (print_derives): Likewise.
15071 * tests/sets.at (Nullable): Adjust: the rule numbers are correct
15072 now.
15073
15074 2001-12-29 Akim Demaille <akim@epita.fr>
15075
15076 * src/lalr.c (lookaheads_print): New.
15077 (lalr): Call it when --trace-flag.
15078 * tests/sets.at (Nullable): Adjust: when tracing, the lookaheads
15079 are dumped.
15080
15081 2001-12-29 Akim Demaille <akim@epita.fr>
15082
15083 * src/derives.c (print_derives): Be sure to use `>= 0', not `> 0',
15084 when walking through ritem, even via rule->rhs.
15085 * src/reduce.c (dump_grammar, useful_production, reduce_output)
15086 (useful_production, useless_nonterminals): Likewise.
15087 (reduce_grammar_tables): Likewise, plus update nritems.
15088 * src/nullable.c (set_nullable): Likewise.
15089 * src/lalr.c (build_relations): Likewise.
15090 * tests/sets.at (Nullable): Adjust.
15091 Fortunately, now, the $axiom is no longer nullable.
15092
15093 2001-12-29 Akim Demaille <akim@epita.fr>
15094
15095 * src/LR0.c (generate_states): Use nritems, not nitems, nor using
15096 the 0-sentinel.
15097 * src/gram.c (ritem_longest_rhs): Likewise.
15098 * src/reduce.c (nonterminals_reduce): Likewise.
15099 * src/print_graph.c (print_graph): Likewise.
15100 * src/output.c (output_rule_data): Likewise.
15101 * src/nullable.c (set_nullable): Likewise.
15102
15103 2001-12-29 Akim Demaille <akim@epita.fr>
15104
15105 * src/output.c: Comment changes.
15106
15107 2001-12-27 Paul Eggert <eggert@twinsun.com>
15108
15109 * src/bison.simple (YYSTACK_ALLOC, YYSIZE_T): Remove special
15110 cases for non-GNU systems like AIX, HP-UX, SGI, Sun, and
15111 Sparc, as they were causing more porting problems than the
15112 (minor) performance improvement was worth.
15113
15114 Also, catch up with 1.31's YYSTD.
15115
15116 2001-12-27 Akim Demaille <akim@epita.fr>
15117
15118 * src/output.c (output_gram): Rely on nritems, not the
15119 0-sentinel. See below.
15120 Use -1 as separator, not 0.
15121 * src/bison.simple (yyparse): Subtract 1 to the rule numbers.
15122 Rely on -1 as separator in yyrhs, instead of 0.
15123 * tests/calc.at (AT_CHECK_CALC): Now, the parsers no longer issue
15124 twice `Now at end of input', therefore there are two lines less to
15125 expect.
15126
15127 2001-12-27 Akim Demaille <akim@epita.fr>
15128
15129 * tests/regression.at (Unresolved SR Conflicts):
15130 (Solved SR Conflicts, Rule Line Numbers): Adjust to the changes
15131 below.
15132
15133 2001-12-27 Akim Demaille <akim@epita.fr>
15134
15135 * src/LR0.c (new_state): Recognize the final state by the fact it
15136 is reached by eoftoken.
15137 (insert_start_shifting_state, insert_eof_shifting_state)
15138 (insert_accepting_state, augment_automaton): Remove, since now
15139 these states are automatically computed from the initial state.
15140 (generate_states): Adjust.
15141 * src/print.c: When reporting a rule number to the user, substract
15142 1, so that the axiom rule is rule 0, and the first user rule is 1.
15143 * src/reduce.c: Likewise.
15144 * src/print_graph.c (print_core): For the time being, just as for
15145 the report, depend upon --trace-flags to dump the full set of
15146 items.
15147 * src/reader.c (readgram): Once the grammar read, insert the rule
15148 0: `$axiom: START-SYMBOL $'.
15149 * tests/set.at: Adjust: rule 0 is now displayed, and since the
15150 number of the states has changed (the final state is no longer
15151 necessarily the last), catch up.
15152
15153 2001-12-27 Akim Demaille <akim@epita.fr>
15154
15155 Try to make the use of the eoftoken valid. Given that its value
15156 is 0 which was also used as a sentinel in ritem, (i) make sure >= 0
15157 is used instead of > 0 where appropriate, (ii), depend upon nritems
15158 instead of the 0-sentinel.
15159
15160 * src/gram.h, src/gram.c (nritems): New.
15161 Expected to be duplication of nitems, but for the time being...
15162 * src/reader.c (packgram): Assert nritems and nitems are equal.
15163 * src/LR0.c (allocate_itemsets, new_itemsets): Adjust.
15164 * src/closure.c (print_closure, print_fderives): Likewise.
15165 * src/gram.c (ritem_print): Likewise.
15166 * src/print.c (print_core, print_grammar): Likewise.
15167 * src/print_graph.c: Likewise.
15168
15169 2001-12-27 Akim Demaille <akim@epita.fr>
15170
15171 * src/main.c (main): If there are complains after grammar
15172 reductions, then output the report anyway if requested, then die.
15173 * src/symtab.c (bucket_new): Initialize `value' to -1, not 0.
15174 * src/reader.c (eoftoken): New.
15175 (parse_token_decl): If the token being defined has value `0', it
15176 is the eoftoken.
15177 (packsymbols): No longer hack `tags' to insert `$' by hand.
15178 Be sure to preserve the value of the eoftoken.
15179 (reader): Make sure eoftoken is defined.
15180 Initialize nsyms to 0: now eoftoken is created just like the others.
15181 * src/print.c (print_grammar): Don't special case the eof token.
15182 * src/regression.at: Adjust: `$' has value 0, not -1, which was a
15183 lie anyway, albeit pleasant.
15184 * tests/calc.at: Exercise error messages with eoftoken.
15185 Change the grammar so that empty input is invalid.
15186 Adjust expectations.
15187 When yyungeting, be sure to use a valid yylloc: use last_yylloc.
15188
15189 2001-12-27 Akim Demaille <akim@epita.fr>
15190
15191 * configure.in: Check the protos of strchr ans strspn.
15192 Replace strchr if needed.
15193 * src/system.h: Provide the protos of strchr, strspn and memchr if
15194 missing.
15195 * lib/strchr.c: New.
15196 * src/reader.c (symbols_save): Use strchr.
15197
15198 2001-12-27 Akim Demaille <akim@epita.fr>
15199
15200 * src/print.c, src/print_graph.c (escape): New.
15201 Use it to quote the TAGS outputs.
15202 * src/print_graph.c (print_state): Now errors are in red, and
15203 reductions in green.
15204 Prefer high to wide: output the state number on a line of its own.
15205
15206 2001-12-27 Akim Demaille <akim@epita.fr>
15207
15208 * src/state.h, src/state.c (reductions_new): New.
15209 * src/LR0.c (set_state_table): Let all the states have a
15210 `reductions', even if reduced to 0.
15211 (save_reductions): Adjust.
15212 * src/lalr.c (initialize_LA, initialize_lookaheads): Adjust.
15213 * src/print.c (print_reductions, print_actions): Adjust.
15214 * src/output.c (action_row): Adjust.
15215
15216 2001-12-27 Akim Demaille <akim@epita.fr>
15217
15218 * src/state.h, src/state.c (errs_new, errs_dup): New.
15219 * src/LR0.c (set_state_table): Let all the states have an errs,
15220 even if reduced to 0.
15221 * src/print.c (print_errs, print_reductions): Adjust.
15222 * src/output.c (output_actions, action_row): Adjust.
15223 * src/conflicts.c (resolve_sr_conflict): Adjust.
15224
15225 2001-12-27 Akim Demaille <akim@epita.fr>
15226
15227 * src/lalr.c (set_goto_map, initialize_F): Use SHIFT_SYMBOL.
15228
15229 2001-12-27 Akim Demaille <akim@epita.fr>
15230
15231 * src/conflicts.c, src/conflicts.h (print_reductions): Move to...
15232 * src/print.c: here.
15233 (lookaheadset, shiftset): New, used as additional storage by
15234 print_reductions.
15235 (print_results): Adjust.
15236 (print_shifts, print_gotos, print_errs): New, extracted from...
15237 (print_actions): here.
15238 * src/print_graph.c (print_actions): Remove dead code.
15239
15240 2001-12-27 Akim Demaille <akim@epita.fr>
15241
15242 * src/reader.c (copy_dollar, copy_at): Better checking of `n' in
15243 `$n' and `@n'.
15244
15245 2001-12-27 Akim Demaille <akim@epita.fr>
15246
15247 * src/lalr.c (add_lookback_edge): Use state_t instead of ints.
15248 (build_relations): Adjust.
15249
15250 2001-12-27 Akim Demaille <akim@epita.fr>
15251
15252 * src/lalr.c (set_goto_map): Remove a wrong but benign loop
15253 duplication.
15254
15255 2001-12-27 Akim Demaille <akim@epita.fr>
15256
15257 * src/reader.c (packgram): Catch nitems overflows.
15258
15259 2001-12-27 Akim Demaille <akim@epita.fr>
15260
15261 * src/files.c, src/files.h (guard_obstack): Remove.
15262 * src/output.c (output): Adjust.
15263 * src/reader.c (parse_braces): New, factoring...
15264 (copy_action, copy_guard): these two which are renamed as...
15265 (parse_action, parse_guard): these.
15266 As a voluntary consequence, using braces around guards is now
15267 mandatory.
15268
15269 2001-12-27 Akim Demaille <akim@epita.fr>
15270
15271 * src/gram.h (rule_t): `guard' and `guard_line' are new members.
15272 * src/reader.c (symbol_list): `guard' and `guard_line' are new
15273 members.
15274 (symbol_list_new): Adjust.
15275 (copy_action): action_line is the first line, not the last.
15276 (copy_guard): Just as for actions, store the `action' only, not
15277 the switch/case/break flesh.
15278 Don't parse the user action that might follow the guard, let...
15279 (readgram): do it, i.e., now, there can be an action after a
15280 guard.
15281 In other words the guard is just explicitly optional.
15282 (packgram): Adjust.
15283 * src/output.c (guards_output): New.
15284 (output_parser): Call it when needed.
15285 (output): Also free the guard and attrs obstacks.
15286 * src/files.c, src/files.h (obstack_save): Remove.
15287 (output_files): Remove.
15288 As a result, if one needs the former `.act' file, using an
15289 appropriate skeleton which requires actions and guards is now
15290 required.
15291 * src/main.c (main): Adjust.
15292 * tests/semantic.at: New.
15293 * tests/regression.at: Use `input.y' as input file name.
15294 Avoid 8+3 problems by requiring input.c when the test needs the
15295 parser.
15296
15297 2001-12-27 Akim Demaille <akim@epita.fr>
15298
15299 * src/reader.c (symbol_list_new): Be sure to initialize all the
15300 fields.
15301
15302 2001-12-27 Akim Demaille <akim@epita.fr>
15303
15304 All the hacks using a final pseudo state are now useless.
15305
15306 * src/LR0.c (set_state_table): state_table holds exactly nstates.
15307 * src/lalr.c (nLA): New.
15308 (initialize_LA, compute_lookaheads, initialize_lookaheads): Use it
15309 instead of lookaheadsp from the pseudo state (nstate + 1).
15310
15311 2001-12-27 Akim Demaille <akim@epita.fr>
15312
15313 * src/output.c (action_row, token_actions): Use a state_t instead
15314 of a integer, and nlookaheads instead of the following state's
15315 lookaheadsp.
15316
15317 2001-12-27 Akim Demaille <akim@epita.fr>
15318
15319 * src/conflicts.c (log_resolution, flush_shift)
15320 (resolve_sr_conflict, set_conflicts, solve_conflicts)
15321 (count_sr_conflicts, count_rr_conflicts, conflicts_output)
15322 (conflicts_print, print_reductions): Use a state_t instead of an
15323 integer when referring to a state.
15324 As much as possible, depend upon nlookaheads, instead of the
15325 `lookaheadsp' member of the following state (since lookaheads of
15326 successive states are successive, the difference between state n + 1
15327 and n served as the number of lookaheads for state n).
15328 * src/lalr.c (add_lookback_edge): Likewise.
15329 * src/print.c (print_core, print_actions, print_state)
15330 (print_results): Likewise.
15331 * src/print_graph.c (print_core, print_actions, print_state)
15332 (print_graph): Likewise.
15333 * src/conflicts.h: Adjust.
15334
15335 2001-12-27 Akim Demaille <akim@epita.fr>
15336
15337 * src/bison.hairy: Formatting/comment changes.
15338 ANSIfy.
15339 Remove `register' indications.
15340 Add plenty of `static'.
15341
15342 2001-12-27 Akim Demaille <akim@epita.fr>
15343
15344 * src/output.c (prepare): Drop the muscle `ntbase' which
15345 duplicates ntokens.
15346 * src/bison.simple: Formatting/comment changes.
15347 Use YYNTOKENS only, which is documented, but not YYNTBASE, which
15348 is an undocumented synonym.
15349
15350 2001-12-22 Akim Demaille <akim@epita.fr>
15351
15352 * src/output.c (output_table_data): Change the prototype to use
15353 `int' for array ranges: some invocations do pass an int, not a
15354 short.
15355 Reported by Wayne Green.
15356
15357 2001-12-22 Akim Demaille <akim@epita.fr>
15358
15359 Some actions of web2c.y are improperly triggered.
15360 Reported by Mike Castle.
15361
15362 * src/lalr.c (traverse): s/F (i)[k] = F (j)[k]/F (j)[k] = F (i)[k]/.
15363 * tests/regression.at (Web2c): Rename as...
15364 (Web2c Report): this.
15365 (Web2c Actions): New.
15366
15367 2001-12-22 Akim Demaille <akim@epita.fr>
15368
15369 Reductions in web2c.y are improperly reported.
15370 Reported by Mike Castle.
15371
15372 * src/conflicts.c (print_reductions): Fix.
15373 * tests/regression.at (Web2c): New.
15374
15375 2001-12-18 Akim Demaille <akim@epita.fr>
15376
15377 Some host fail on `assert (!"foo")', which expands to
15378 ((!"foo") ? (void)0 : __assert("!"foo."", __FILE__, __LINE__))
15379 Reported by Nelson Beebee.
15380
15381 * src/output.c, src/vcg.c: Replace `assert (!"it succeeded")' with
15382 `#define it_succeeded 0' and `assert (it_succeeded)'.
15383
15384 2001-12-17 Marc Autret <autret_m@epita.fr>
15385
15386 * src/bison.simple: Don't hard code the skeleton line and filename.
15387 * src/output.c (output_parser): Rename 'line' as 'output_line'.
15388 New line counter 'skeleton_line' (skeleton-line muscle).
15389
15390 2001-12-17 Paul Eggert <eggert@twinsun.com>
15391
15392 * NEWS, doc/bison.texinfo, doc/bison.1, doc/bison.rnh: Document that
15393 YYDEBUG must be defined to a nonzero value.
15394
15395 * src/bison.simple (yytname): Do not assume that the user defines
15396 YYDEBUG to a properly parenthesized expression.
15397
15398 2001-12-17 Akim Demaille <akim@epita.fr>
15399
15400 * src/state.h (state_t): Rename lookaheads as lookaheadsp.
15401 nlookaheads is a new member.
15402 Adjust all users.
15403 * src/lalr.h (nlookaheads): Remove this orphan declaration.
15404 * src/lalr.c (initialize_lookaheads): Set nlookaheads for each
15405 state.
15406
15407 2001-12-17 Akim Demaille <akim@epita.fr>
15408
15409 * src/files.h, src/files.c (open_files, close_files): Remove.
15410 * src/main.c (main): Don't open/close files, nor invoke lex_free,
15411 let...
15412 * src/reader.c (reader): Do it.
15413
15414 2001-12-17 Akim Demaille <akim@epita.fr>
15415
15416 * src/conflicts.c (print_reductions): Formatting changes.
15417
15418 2001-12-17 Akim Demaille <akim@epita.fr>
15419
15420 * src/conflicts.c (flush_shift): Also adjust lookaheadset.
15421 (flush_reduce): New.
15422 (resolve_sr_conflict): Adjust.
15423
15424 2001-12-17 Akim Demaille <akim@epita.fr>
15425
15426 * src/output.c (output_obstack): Be static and rename as...
15427 (format_obstack): this, to avoid any confusion with files.c's
15428 output_obstack.
15429 * src/reader.h (muscle_obstack): Move to...
15430 * src/output.h: here, since it's defined in output.c.
15431
15432 2001-12-17 Akim Demaille <akim@epita.fr>
15433
15434 * src/output.c (action_row, save_column, default_goto)
15435 (sort_actions, matching_state, pack_vector): Better variable
15436 locality.
15437
15438 2001-12-17 Akim Demaille <akim@epita.fr>
15439
15440 * src/output.c: Various formatting changes.
15441
15442 2001-12-17 Akim Demaille <akim@epita.fr>
15443
15444 * src/files.c (output_files): Free the output_obstack.
15445 * src/main.c (main): Call print and print_graph conditionally.
15446 * src/print.c (print): Work unconditionally.
15447 * src/print_graph.c (print_graph): Work unconditionally.
15448 * src/conflicts.c (log_resolution): Output only if verbose_flag.
15449
15450 2001-12-16 Marc Autret <autret_m@epita.fr>
15451
15452 * src/output.c (actions_output): Fix. When we use %no-lines,
15453 there is one less line per action.
15454
15455 2001-12-16 Marc Autret <autret_m@epita.fr>
15456
15457 * src/bison.simple: Remove a useless #line directive.
15458 s/#line %%line %%skeleton/#line %%line "%%parser-file-name"/'.
15459 * src/output.c (get_lines_number): New.
15460 (output_parser): Adjust, now takes care about the lines of a
15461 output muscles.
15462 Fix line numbering.
15463 (actions_output): Computes the number of lines taken by actions.
15464 (output_master_parser): Insert new skeleton which is the name of
15465 the output parser file name.
15466
15467 2001-12-15 Marc Autret <autret_m@epita.fr>
15468
15469 * src/bison.simple [YYERROR_VERBOSE]: Restore backward compatibility.
15470
15471 2001-12-15 Marc Autret <autret_m@epita.fr>
15472
15473 * src/output.c (output_gram): Keep track of the hairy one.
15474
15475 2001-12-15 Akim Demaille <akim@epita.fr>
15476
15477 Make `make distcheck' work.
15478
15479 * lib/Makefile.am (INCLUDES): Add top_srcdir/intl, since hash uses
15480 system.h which uses libgettext.h.
15481
15482 2001-12-15 Akim Demaille <akim@epita.fr>
15483
15484 * src/nullable.c (set_nullable): Useless rules must be skipped,
15485 otherwise, since we range over their symbols, we might look at a
15486 nonterminal which no longer ``exists'', i.e., it is not counted in
15487 `nvars', hence we overflow our arrays.
15488
15489 2001-12-15 Akim Demaille <akim@epita.fr>
15490
15491 The header can also be produced directly, without any obstack!
15492 Yahoo!
15493
15494 * src/files.c, src/files.h (defines_obstack): Remove.
15495 (compute_header_macro): Global.
15496 (defines_obstack_save): Remove.
15497 * src/reader.c (parse_union_decl): No longer output to
15498 defines_obstack: its content can be found in the `stype' muscle
15499 anyway.
15500 (output_token_translations): Merge into...
15501 (symbols_output): this.
15502 Rename as...
15503 (symbols_save): this.
15504 (reader): Adjust.
15505 * src/output.c (header_output): New.
15506 (output): Call it.
15507
15508 2001-12-15 Akim Demaille <akim@epita.fr>
15509
15510 * src/reader.c (parse_union_decl): Instead of handling two obstack
15511 simultaneously, use one to define the `stype' muscle, and use the
15512 value of the latter to fill defines_obstack.
15513 (copy_comment): Remove.
15514 (copy_comment2): Work for a single obstack.
15515 Rename as...
15516 (copy_comment): this.
15517
15518 2001-12-15 Akim Demaille <akim@epita.fr>
15519
15520 * src/lex.c, src/lex.h (xgetc): No longer static.
15521 * src/reader.c (parse_union_decl): Revamp.
15522
15523 2001-12-15 Akim Demaille <akim@epita.fr>
15524
15525 Still making progress in separating Bison into (i) input, (ii)
15526 process, (iii) output: now we can directly output the parser file
15527 without using table_obstack at all.
15528
15529 * src/files.c, src/files.h (table_obstack): Bye bye.
15530 (parser_file_name): New.
15531 * src/files.c (compute_output_file_names): Compute it.
15532 * src/output.c (actions_output, output_parser)
15533 (output_master_parser): To a file instead of an obstack.
15534
15535 2001-12-15 Akim Demaille <akim@epita.fr>
15536
15537 Attach actions to rules, instead of pre-outputting them to
15538 actions_obstack.
15539
15540 * src/gram.h (rule_t): action and action_line are new members.
15541 * src/reader.c (symbol_list): Likewise.
15542 (copy_action): Save the actions within the rule.
15543 (packgram): Save them in rule_table.
15544 * src/output.c (actions_output): New.
15545 (output_parser): Use it on `%%actions'.
15546 (output_rule_data): Don't free rule_table.
15547 (output): Do it.
15548 (prepare): Don't save the `action' muscle.
15549 * src/bison.simple: s/%%action/%%actions/.
15550
15551 2001-12-15 Akim Demaille <akim@epita.fr>
15552
15553 * src/reader.c (copy_action): When --yacc, don't append a `;'
15554 to the user action: let it fail if lacking.
15555 Suggested by Arnold Robbins and Tom Tromey.
15556
15557 2001-12-14 Akim Demaille <akim@epita.fr>
15558
15559 * src/lex.c (literalchar): Simply return the char you decoded, non
15560 longer mess around with obstacks and int pointers.
15561 Adjust all callers.
15562
15563 2001-12-14 Akim Demaille <akim@epita.fr>
15564
15565 * src/lex.c (literalchar): Don't escape the special characters,
15566 just decode them, and keep them as char (before, eol was output as
15567 the 2 char string `\n' etc.).
15568 * src/output.c (output_rule_data): Use quotearg to output the
15569 token strings.
15570
15571 2001-12-13 Paul Eggert <eggert@twinsun.com>
15572
15573 * src/bison.simple (YYSIZE_T, YYSTACK_ALLOC, YYSTACK_FREE):
15574 Do not infringe on the global user namespace when using C++.
15575 (YYFPRINTF, YYSTDERR): New macros, needed for the above.
15576 All uses of `fprintf' and `stderr' changed.
15577
15578 * doc/bison.texinfo: Document YYFPRINTF, YYSTDERR.
15579
15580 2001-12-13 Akim Demaille <akim@epita.fr>
15581
15582 The computation of nullable is broken: it doesn't handle empty
15583 RHS's properly.
15584
15585 * tests/torture.at (GNU AWK Grammar): New.
15586 * tests/sets.at (Nullable): New.
15587 * src/nullable.c (set_nullable): Instead of blindly looping over
15588 `ritems', loop over the rules, and then over their rhs's.
15589
15590 Work around Autotest bugs.
15591
15592 * src/warshall.c (bitmatrix_print): Don't use `+--+' as table
15593 frame, because Autotest understand lines starting with a `+' as
15594 traces from the shell. Then, they are not processed properly.
15595 Admittedly an Autotest bug, but we don't have time to wait for
15596 Autotest to catch up.
15597 * tests/regression.at (Broken Closure): Adjust to the new table
15598 frames.
15599 Move to...
15600 * tests/sets.at: here.
15601
15602 2001-12-13 Akim Demaille <akim@epita.fr>
15603
15604 * src/closure.c (closure): Use nrules instead of playing tricks
15605 with BITS_PER_WORD.
15606
15607 2001-12-13 Akim Demaille <akim@epita.fr>
15608
15609 * src/print.c (print_actions): Output the handling of `$' as the
15610 traces do: shifting the token EOF. Before EOF was treated as a
15611 nonterminal.
15612 * tests/regression.at: Adjust some tests.
15613 * src/print_graph.c (print_core): Complete the set of items via
15614 closure. The next-to-final and final states are still unsatisfying,
15615 but that's to be addressed elsewhere.
15616 No longer output the rule numbers, but do output the state number.
15617 A single loop for the shifts + gotos is enough, but picked a
15618 distinct color for each.
15619 (print_graph): Initialize and finalize closure.
15620
15621 2001-12-13 Akim Demaille <akim@epita.fr>
15622
15623 * src/reader.c (readgram): Remove dead code, an strip useless
15624 braces.
15625 (get_type): Remove, unused.
15626
15627 2001-12-12 Akim Demaille <akim@epita.fr>
15628
15629 * src/complain.h, src/complain.c: Remove error_one_per_line, rely
15630 on that of lib/error.c.
15631
15632 2001-12-12 Akim Demaille <akim@epita.fr>
15633
15634 Some hosts don't like `/' in includes.
15635
15636 * src/system.h: Include libgettext.h without qualifying the path.
15637 * src/Makefile.am (INCLUDES): Add $(top_srcdir)/intl, remove
15638 $(top_srcdir).
15639
15640 2001-12-11 Marc Autret <autret_m@epita.fr>
15641
15642 * src/output.c (output_parser): Remove useless muscle.
15643
15644 2001-12-11 Marc Autret <autret_m@epita.fr>
15645
15646 * src/bison.simple: Remove #line just before %%epilogue. It
15647 is now handled in ...
15648 * src/reader.c (read_additionnal_code): Add the output of a
15649 #line for the epilogue.
15650
15651 2001-12-10 Marc Autret <autret_m@epita.fr>
15652
15653 * src/reader.c (copy_definition): Re-use CPP-outed code which
15654 replace precedent remove.
15655 * src/bison.simple: Remove #line before %%prologue because
15656 %%input-line is wrong at this time.
15657
15658 2001-12-10 Marc Autret <autret_m@epita.fr>
15659
15660 * src/reader.c (symbols_output): Clean up.
15661 * src/output.c (output_gram, output): Clean up.
15662
15663 2001-12-10 Akim Demaille <akim@epita.fr>
15664
15665 * src/lalr.c (initialize_lookaheads): New. Extracted from...
15666 * src/LR0.c (set_state_table): here.
15667 * src/lalr.c (lalr): Call it.
15668
15669 2001-12-10 Akim Demaille <akim@epita.fr>
15670
15671 * src/state.h (shifts): Remove the `number' member: shifts are
15672 attached to state, hence no longer need to be labelled with a
15673 state number.
15674
15675 2001-12-10 Akim Demaille <akim@epita.fr>
15676
15677 Now that states have a complete set of members, the linked list of
15678 shifts is useless: just fill directly the state's shifts member.
15679
15680 * src/state.h (shifts): Remove the `next' member.
15681 * src/LR0.c (first_state, last_state): Remove.
15682 Adjust the callers.
15683 (augment_automaton): Don't look for the shifts that must be added
15684 a shift on EOF: it is those of the state we looked for! But now,
15685 since shifts are attached, it is no longer needed to looking
15686 merely by its id: its number.
15687
15688 2001-12-10 Akim Demaille <akim@epita.fr>
15689
15690 * src/LR0.c (augment_automaton): Better variable locality.
15691 Remove an impossible branch: if there is a state corresponding to
15692 the start symbol being shifted, then there is shift for the start
15693 symbol from the initial state.
15694
15695 2001-12-10 Akim Demaille <akim@epita.fr>
15696
15697 * src/LR0.c (augment_automaton): Call `insert_eof_shifting_state'
15698 only when appropriate: when insert_start_shifting_state' is not
15699 invoked.
15700 * tests/regression.at (Rule Line Numbers): Adjust.
15701
15702 2001-12-10 Akim Demaille <akim@epita.fr>
15703
15704 * src/LR0.c (augment_automaton): Now that all states have shifts,
15705 merge the two cases addition shifts to the initial state.
15706
15707 2001-12-10 Akim Demaille <akim@epita.fr>
15708
15709 * src/lalr.c (set_state_table): Move to...
15710 * src/LR0.c: here.
15711 * src/lalr.c (lalr): Don't call it...
15712 * src/LR0.c (generate_states): do it.
15713 * src/LR0.h (first_state): Remove, only the table is used.
15714
15715 2001-12-10 Akim Demaille <akim@epita.fr>
15716
15717 * src/LR0.h (first_shift, first_reduction): Remove.
15718 * src/lalr.c: Don't use first_shift: find shifts through the
15719 states.
15720
15721 2001-12-10 Akim Demaille <akim@epita.fr>
15722
15723 * src/LR0.c: Attach shifts to states as soon as they are
15724 computed.
15725 * src/lalr.c (set_state_table): Instead of assigning shifts to
15726 state, just assert that the mapping was properly done.
15727
15728 2001-12-10 Akim Demaille <akim@epita.fr>
15729
15730 * src/LR0.c (insert_start_shift): Rename as...
15731 (insert_start_shifting_state): this.
15732 (insert_eof_shifting_state, insert_accepting_state): New.
15733 (augment_automaton): Adjust.
15734 Better locality of the variables.
15735 When looking if the start_symbol is shifted from the initial
15736 state, using `while (... symbol != start_symbol ...)' sounds
15737 better than `while (... symbol < start_symbol ...)': If fail
15738 to see how the order between symbols could be relevant!
15739
15740 2001-12-10 Akim Demaille <akim@epita.fr>
15741
15742 * src/getargs.h: Don't declare `spec_name_prefix' and
15743 `spec_file_prefix', declared by src/files.h.
15744 * src/files.c, src/files.h: Default for spec_name_prefix is "yy".
15745 * src/muscle_tab.c (muscle_init): Default prefix to NULL.
15746 * src/output.c (prepare): Adjust.
15747 * src/reader.c (symbols_output): Likewise.
15748 * src/vmsgetargs.c: Vaguely adjust, but who cares?
15749
15750 2001-12-10 Akim Demaille <akim@epita.fr>
15751
15752 * src/muscle_tab.c (muscle_init): NULL is a better default than
15753 `"0"'.
15754
15755 2001-12-10 Akim Demaille <akim@epita.fr>
15756
15757 * src/reader.c (reader): Calling symbols_output once is enough.
15758
15759 2001-12-10 Akim Demaille <akim@epita.fr>
15760
15761 Now that states have a complete set of members, the linked list of
15762 reductions is useless: just fill directly the state's reductions
15763 member.
15764
15765 * src/state.h (struct reductions): Remove member `number' and
15766 `next'.
15767 * src/LR0.c (first_reduction, last_reduction): Remove.
15768 (save_reductions): Don't link the new reductions, store them in
15769 this_state.
15770 * src/lalr.c (set_state_table): No need to attach reductions to
15771 states, it's already done.
15772 * src/output.c (output_actions): No longer free the shifts, then
15773 the reductions, then the states: free all the states and their
15774 members.
15775
15776 2001-12-10 Akim Demaille <akim@epita.fr>
15777
15778 * src/options.c (OPTN, DRTV, BOTH): New.
15779 (option_table): Use them.
15780
15781 * src/muscle_tab.c: Don't include xalloc.h and string.h: that's
15782 the job of system.h.
15783 * src/options.c: Don't include stdio.h and xalloc.h for the same
15784 reasons.
15785
15786 2001-12-10 Akim Demaille <akim@epita.fr>
15787
15788 * src/output.c (output, prepare): Make sure the values of the
15789 muscles `action' and `prologue' are 0-terminated.
15790
15791 2001-12-10 Akim Demaille <akim@epita.fr>
15792
15793 Clean up GCC warnings.
15794
15795 * src/reader.c (copy_action): `buf' is not used.
15796 (parse_skel_decl): Be static.
15797 * src/muscle_tab.c (mhash1, mhash2, muscle_insert): Preserve `const'.
15798 * src/options.h (create_long_option_table): Have a real prototype.
15799 * lib/hash.c, lib/hash.h (hash_insert, hash_insert_at, hash_delete)
15800 (hash_delete_at): Return const void *.
15801 Adjust casts to preserve the const.
15802
15803 2001-12-10 Akim Demaille <akim@epita.fr>
15804
15805 * configure.in: Require 2.52g.
15806 M4 is not needed, but AUTOM4TE is.
15807 * m4/m4.m4: Remove.
15808 * tests/Makefile.am: Adjust.
15809
15810 2001-12-10 Akim Demaille <akim@epita.fr>
15811
15812 One structure for states is enough, even though theoretically
15813 there are LR(0) states and LALR(1) states.
15814
15815 * src/lalr.h (state_t): Remove.
15816 (state_table): Be state_t **, not state_t *.
15817 * src/state.h (core, CORE_ALLOC): Rename as...
15818 (state_t, STATE_ALLOC): this.
15819 Add the LALR(1) members: shifts, reductions, errs.
15820 * src/LR0.c (state_table): Rename as...
15821 (state_hash): this, to avoid name clashes with the global
15822 `state_table'.
15823 * src/print_graph.c, src/LR0.c, src/LR0.h, src/conflicts.c
15824 * src/lalr.c, src/lalr.h, src/output.c, src/print.c: Adjust.
15825
15826 2001-12-10 Akim Demaille <akim@epita.fr>
15827
15828 Bison dumps core on bash.y.
15829 Reported by Pascal Bart.
15830
15831 * src/warshall.c (bitmatrix_print): New.
15832 (TC): Use it.
15833 When performing a transitive closure R(i, j) && R(j, k) => R(i, k),
15834 j must be the outer loop.
15835 * tests/regression.at (Broken Closure): New.
15836
15837 2001-12-05 Akim Demaille <akim@epita.fr>
15838
15839 * tests/atlocal.in (CPPFLAGS): Do not leave a space between -I and
15840 its argument.
15841 Reported by Peter Hamorsky.
15842
15843 2001-12-05 Akim Demaille <akim@epita.fr>
15844
15845 * src/conflicts.c (err_table): Remove.
15846 (resolve_sr_conflict): Adjust.
15847 * src/lalr.h (state_t.reduction_table, state_t.shift_table):
15848 Rename as...
15849 (state_t.reductions, state_t.shifts): this.
15850
15851 2001-12-05 Akim Demaille <akim@epita.fr>
15852
15853 * src/reduce.c (reduce_grammar_tables): No longer disable the
15854 removal of useless rules via CPP but via `if (0)', so that the
15855 compiler still check the code is valid.
15856 For instance, it should have noticed `rline' no longer exists: use
15857 the `line' member of rule_t.
15858 * src/gram.c (dummy, rline): Remove, unused.
15859
15860 2001-12-05 Akim Demaille <akim@epita.fr>
15861
15862 * src/output.c (pack_vector): Use assert, not berror.
15863 * src/main.c (berror): Remove, unused.
15864
15865 2001-12-05 Akim Demaille <akim@epita.fr>
15866
15867 New experimental feature: if --verbose --trace output all the
15868 items of a state, not only its kernel.
15869
15870 * src/print.c (print_core): If `trace_flag', then invoke closure
15871 before outputting the items of the state (print_core is no longer
15872 a correct name them).
15873 (print_results): Invoke new_closure/free_closure if needed.
15874
15875 2001-12-05 Akim Demaille <akim@epita.fr>
15876
15877 * src/LR0.c (new_itemsets): Use nshifts only, not shiftcount.
15878 * src/closure.c, src/closure.h (itemsetsize): Rename as...
15879 (nitemset): for consistency with the rest of the project.
15880
15881 2001-12-05 Akim Demaille <akim@epita.fr>
15882
15883 * src/closure.c (print_closure): Improve.
15884 (closure): Use it for printing input and output.
15885
15886 2001-12-05 Akim Demaille <akim@epita.fr>
15887
15888 * src/closure.c (FIRSTS, FDERIVES): Adjust to reality: they are
15889 indexed by nonterminals.
15890
15891 2001-12-05 Akim Demaille <akim@epita.fr>
15892
15893 * src/warshall.c (TC, RTC): De-obsfucate (source reduced to 22% of
15894 what it was!).
15895 * src/warshall.h: Remove accidental duplication of the content.
15896
15897 2001-12-05 Akim Demaille <akim@epita.fr>
15898
15899 * src/closure.c (set_fderives): De-obfuscate.
15900
15901 2001-12-05 Akim Demaille <akim@epita.fr>
15902
15903 * src/closure.c (print_firsts, print_fderives): De-obfuscate.
15904
15905 2001-12-05 Akim Demaille <akim@epita.fr>
15906
15907 * src/closure.c (set_firsts): De-obfuscate.
15908
15909 2001-12-05 Akim Demaille <akim@epita.fr>
15910
15911 * src/output.c (action_row): De-obfuscate
15912 using the good o' techniques: arrays not pointers, variable
15913 locality, BITISSET, RESETBIT etc.
15914
15915 2001-12-05 Akim Demaille <akim@epita.fr>
15916
15917 Pessimize the code to simplify it: from now on, all the states
15918 have a valid SHIFTS, which NSHIFTS is possibly 0.
15919
15920 * src/LR0.c (shifts_new): Be global and move to..
15921 * src/state.c, src/state.h: here.
15922 * src/conflicts, src/lalr.c, src/output.c, src/print.c,
15923 * src/print_graph: Adjust.
15924
15925 2001-12-05 Akim Demaille <akim@epita.fr>
15926
15927 * src/state.h (SHIFT_DISABLE, SHIFT_IS_DISABLED): New.
15928 * src/conflicts.c: Use it.
15929 Restore a few missing `if (!SHIFT_IS_DISABLED)' which were
15930 incorrectly ``simplified''.
15931
15932 2001-12-05 Akim Demaille <akim@epita.fr>
15933
15934 * src/conflicts.c (flush_shift, resolve_sr_conflict): De-obfuscate
15935 using the good o' techniques: arrays not pointers, variable
15936 locality, BITISSET, RESETBIT etc.
15937
15938 2001-12-05 Akim Demaille <akim@epita.fr>
15939
15940 * src/state.h (SHIFT_SYMBOL): New.
15941 * src/conflicts.c: Use it to deobfuscate.
15942
15943 2001-12-05 Akim Demaille <akim@epita.fr>
15944
15945 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts)
15946 (print_reductions): De-obfuscate using the good o' techniques:
15947 arrays not pointers, variable locality, BITISSET.
15948
15949 2001-12-05 Akim Demaille <akim@epita.fr>
15950
15951 * src/conflicts.c (print_reductions): Arrays, not pointers.
15952 Use BITISSET.
15953
15954 2001-12-05 Akim Demaille <akim@epita.fr>
15955
15956 * src/conflicts.c (print_reductions): Pessimize, but clarify.
15957
15958 2001-12-05 Akim Demaille <akim@epita.fr>
15959
15960 * src/conflicts.c (print_reductions): Improve variable locality.
15961
15962 2001-12-05 Akim Demaille <akim@epita.fr>
15963
15964 * src/conflicts.c (print_reductions): Pessimize, but clarify.
15965
15966 2001-12-05 Akim Demaille <akim@epita.fr>
15967
15968 * src/conflicts.c (print_reductions): Improve variable locality.
15969
15970 2001-12-05 Akim Demaille <akim@epita.fr>
15971
15972 * src/state.h (SHIFT_IS_ERROR, SHIFT_IS_GOTO, SHIFT_IS_SHIFT): New.
15973 * src/lalr.c: Use them.
15974
15975 2001-12-05 Akim Demaille <akim@epita.fr>
15976
15977 * src/LR0.c (augment_automaton): Formatting changes.
15978 Better variable locality.
15979
15980 2001-12-05 Akim Demaille <akim@epita.fr>
15981
15982 * src/lalr.c (matrix_print): New.
15983 (transpose): Use it.
15984 Use arrays instead of pointers.
15985
15986 2001-12-05 Akim Demaille <akim@epita.fr>
15987
15988 * src/lalr.c (maxrhs): Move to...
15989 * src/gram.c, src/gram.h (ritem_longest_rhs): here.
15990 * src/lalr.c (build_relations): Adjust.
15991
15992 2001-12-05 Akim Demaille <akim@epita.fr>
15993
15994 * src/lalr.c (transpose): Free the memory allocated to the
15995 argument, as it is replaced by the results by the unique caller.
15996 (build_relations): Merely invoke transpose: it handles the memory
15997 deallocation.
15998 Improve variable locality.
15999 Avoid variables used as mere abbreviations.
16000 (compute_lookaheads): Use arrays instead of pointers.
16001
16002 2001-12-05 Akim Demaille <akim@epita.fr>
16003
16004 * src/lalr.c (initialize_F): Improve variable locality.
16005 Avoid variables used as mere abbreviations.
16006
16007 2001-12-05 Akim Demaille <akim@epita.fr>
16008
16009 * src/derives.c (print_derives): Display the ruleno.
16010 * src/lalr.c (initialize_F, transpose): Better variable locality
16011 to improve readability.
16012 Avoid variables used as mere abbreviations.
16013
16014 2001-12-05 Akim Demaille <akim@epita.fr>
16015
16016 * src/lalr.c (traverse): Use arrays instead of pointers.
16017
16018 2001-12-05 Akim Demaille <akim@epita.fr>
16019
16020 * src/nullable.c (set_nullable): Use a for loop to de-obfuscate
16021 the handling of squeue.
16022 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
16023
16024 2001-12-05 Akim Demaille <akim@epita.fr>
16025
16026 Because useless nonterminals are now kept alive (instead of being
16027 `destroyed'), we now sometimes examine them, and store information
16028 related to them. Hence we need to know their number, and adjust
16029 memory allocations.
16030
16031 * src/reduce.c, src/reduce.h (nuseless_nonterminals): No longer
16032 static.
16033 * src/LR0.c (allocate_itemsets): The memory allocated to
16034 `symbol_count' was used for two different purpose: once to count
16035 the number of occurrences of each symbol, and later reassigned to
16036 `shift_symbol', containing the symbol that can be shifted from a
16037 given state.
16038 Deobfuscate, i.e., allocate, use and free `symbol_count' here
16039 only, and...
16040 (new_itemsets): Allocate `shift_symbol' here.
16041 (allocate_itemsets): symbol_count includes useless nonterminals.
16042 Make room for them.
16043 (free_storage): Use `free', not `XFREE', for pointers that cannot
16044 be null.
16045
16046 2001-12-05 Akim Demaille <akim@epita.fr>
16047
16048 * src/nullable.c (set_nullable): Deobfuscate the handling of
16049 ritem.
16050 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
16051
16052 2001-12-05 Akim Demaille <akim@epita.fr>
16053
16054 * src/gram.c, src/gram.h (ritem_print): New.
16055 * src/gram.c (dummy): Remove, now there is actual code in gram.c.
16056 (This useless function was defined only to work around VMS linkers
16057 that can't handle compilation units with variables only).
16058 * src/reduce.c (dump_grammar): Use it to trace the construction of
16059 ritem.
16060
16061 2001-12-04 Paul Eggert <eggert@twinsun.com>
16062
16063 * src/bison.simple (union yyalloc): Change member names
16064 to be the same as the stack names.
16065 (yyparse): yyptr is now union yyalloc *, not char *.
16066 (YYSTACK_RELOCATE): Likewise. This avoids a GCC warning,
16067 and may generate better code on some machines.
16068 (yystpcpy): Use prototype if __STDC__ is defined, not just
16069 if __cplusplus is defined.
16070
16071 2001-11-30 Akim Demaille <akim@epita.fr>
16072
16073 * configure.in (WARNING_CFLAGS): Add -Werror when possible.
16074 (CFLAGS): Do not include the WARNING_CFLAGS here, since GNU
16075 Gettext doesn't compile cleanly, and dies with -Werror.
16076 * src/Makefile.am, lib/Makefile.am, tests/atlocal.in (CFLAGS):
16077 Include WARNING_CFLAGS here.
16078 * lib/xstrdup.c: Include xalloc.h, so that xstrdup be declared
16079 before being defined.
16080
16081 2001-11-27 Paul Eggert <eggert@twinsun.com>
16082
16083 * lib/quotearg.h (quotearg_n, quotearg_n_style):
16084 First arg is int, not unsigned.
16085 * lib/quotearg.c (quotearg_n, quotearg_n_style): Likewise.
16086 (SIZE_MAX, UINT_MAX): New macros.
16087 (quotearg_n_options): Abort if N is negative.
16088 Avoid overflow check on hosts where size_t is 64 bits and int
16089 is 32 bits, as overflow is impossible there.
16090 Fix off-by-one typo that caused unnecessary reallocation.
16091
16092 2001-11-29 Paul Eggert <eggert@twinsun.com>
16093
16094 Name space cleanup in generated parser.
16095
16096 * doc/bison.texinfo (Bison Parser): Discuss system headers
16097 and their effect on the user name space.
16098
16099 * src/bison.simple:
16100 (YYSTACK_ALLOC, YYSTACK_FREE, union yyalloc, YYSTACK_GAP_MAX,
16101 YYSTACK_BYTES, YYSTACK_RELOCATE): Do not define unless necessary,
16102 i.e. unless ! defined (yyoverflow) || defined (YYERROR_VERBOSE).
16103
16104 (YYSIZE_T): New macro. Use it instead of size_t, to avoid infringing
16105 on user names when possible.
16106
16107 (YYSTACK_USE_ALLOCA): Do not define; just use any existing defn.
16108 Simplify test for whather <alloca.h> exists.
16109
16110 (<stdlib.h>): Include if we will use malloc, and if standard C or C++.
16111
16112 (<stdio.h>): Include if YYDEBUG.
16113
16114 (yymemcpy): Renamed from __yy_memcpy. Do not define unless
16115 ! defined (yyoverflow) && ! defined (yymemcpy).
16116
16117 (yymemcpy, yyparse): Rename local variables as needed so that
16118 they all begin with 'yy'.
16119
16120 (yystrlen, yystpcpy): New functions.
16121
16122 (YY_DECL_NON_LSP_VARIABLES): Renamed from _YY_DECL_VARIABLES.
16123 All uses changed.
16124
16125 (yyparse): size_t -> YYSIZE_T. Use yystrlen and yystpcpy
16126 instead of relying on string.h functions. Use YYSTACK_ALLOC
16127 and YYSTACK_FREE instead of malloc and free.
16128
16129 2001-11-30 Akim Demaille <akim@epita.fr>
16130
16131 * src/bison.simple (YYSTYPE, YYLTYPE): Move their definitions
16132 before their first uses.
16133 (YYBISON, YYPURE): Move to the top of the output.
16134
16135 2001-11-30 Akim Demaille <akim@epita.fr>
16136
16137 * tests/reduce.at (Useless Nonterminals): Fix.
16138
16139 2001-11-30 Akim Demaille <akim@epita.fr>
16140
16141 * src/bison.simple (YYSTACK_FREE): Use `do {;} while (0)' as empty
16142 if body instead of `;' to pacify GCC's warnings.
16143
16144 2001-11-30 Akim Demaille <akim@epita.fr>
16145
16146 Instead of mapping the LHS of unused rules to -1, keep the LHS
16147 valid, but flag the rules as invalid.
16148
16149 * src/gram.h (rule_t): `useful' is a new member.
16150 * src/print.c (print_grammar): Adjust.
16151 * src/derives.c (set_derives): Likewise.
16152 * src/reader.c (packgram, reduce_output): Likewise.
16153 * src/reduce.c (reduce_grammar_tables): Likewise.
16154 * tests/reduce.at (Underivable Rules, Useless Rules): New.
16155
16156 2001-11-30 Akim Demaille <akim@epita.fr>
16157
16158 * src/reduce.c (reduce_output): Formatting changes.
16159 * src/print.c (print_results, print_grammar): Likewise.
16160 * tests/regression.at (Rule Line Numbers)
16161 (Solved SR Conflicts, Unresolved SR Conflicts): Adjust.
16162
16163 2001-11-30 Akim Demaille <akim@epita.fr>
16164
16165 * src/reduce.c (nonterminals_reduce): Instead of throwing away
16166 useless nonterminals, move them at the end of the symbol arrays.
16167 (reduce_output): Adjust.
16168 * tests/reduce.at (Useless Nonterminals): Adjust.
16169
16170 2001-11-30 Akim Demaille <akim@epita.fr>
16171
16172 * src/reduce.c: Various comment/formatting changes.
16173 (nonterminals_reduce): New, extracted from...
16174 (reduce_grammar_tables): here.
16175 (reduce_grammar): Call nonterminals_reduce.
16176
16177 2001-11-29 Paul Eggert <eggert@twinsun.com>
16178
16179 * src/bison.simple (YYSTACK_REALLOC): Remove.
16180 (YYSTACK_ALLOC): Resurrect this macro, with its old meaning.
16181 (YYSTACK_FREE, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYSTACK_RELOCATE):
16182 New macros.
16183 (union yyalloc): New type.
16184 (__yy_memcpy): Last arg is size_t, not unsigned int, to remove
16185 an arbitrary restriction on hosts where size_t is wider than int.
16186
16187 (yyparse): Don't dump core if alloca or malloc fails; instead, report
16188 a parser stack overflow. Allocate just one block of memory for all
16189 three stacks, instead of allocating three blocks; this typically is
16190 faster and reduces fragmentation.
16191
16192 Do not limit the number of items in the stack to a value that fits
16193 in 'int', as this is an arbitrary limit on hosts with 64-bit
16194 size_t and 32-bit int.
16195
16196 2001-11-29 Marc Autret <autret_m@epita.fr>
16197
16198 * tests/calc.at [AT_DATA_CALC_Y]: Use %error-verbose instead
16199 of defining YYERROR_VERBOSE.
16200 [AT_DATA]: $4 is now out of C declarations in the prologue.
16201
16202 2001-11-28 Marc Autret <autret_m@epita.fr>
16203
16204 * src/reader.c (parse_dquoted_param): New.
16205 (parse_skel_decl): Use it.
16206 * src/lex.h: Add its prototype.
16207 * src/lex.c (literalchar): Become not static.
16208
16209 2001-11-28 Marc Autret <autret_m@epita.fr>
16210
16211 * src/output.h: And put its extern declaration here.
16212 * src/output.c (error_verbose): Define here.
16213 (prepare): Echo name modification.
16214 * src/getargs.h: Clean its extern declaration.
16215 * src/getargs.c (error_verbose_flag): Remove.
16216 (getargs): Remove case 'e'.
16217 * src/options.c (option_table): 'error-verbose' is now seen as simple
16218 percent option.
16219 Include output.h.
16220
16221 * src/reader.c (read_declarations): Remove case tok_include.
16222 (parse_include_decl): Remove.
16223 * src/lex.h (token_t): Remove tok_include.
16224 * src/options.c (option_table): 'include' is now a simple command line
16225 option.
16226
16227 2001-11-28 Marc Autret <autret_m@epita.fr>
16228
16229 * src/bison.simple: Adjust muscle names.
16230 * src/muscle_tab.c (muscle_init): Also rename the muscles.
16231 * src/output.c (prepare): s/_/-/ for the muscles names.
16232 (output_parser): When scanning for a muscle, allow '-' instead of '_'.
16233
16234 2001-11-28 Marc Autret <autret_m@epita.fr>
16235
16236 * src/bison.simple: Fix debug.
16237 [YYERROR_VERBOSE]: Re-integrate as an internal macro.
16238
16239 2001-11-28 Akim Demaille <akim@epita.fr>
16240
16241 * src/LR0.c (shifts_new): New.
16242 (save_shifts, insert_start_shift, augment_automaton): Use it.
16243
16244 2001-11-28 Akim Demaille <akim@epita.fr>
16245
16246 * src/closure.c (closure): `b' and `ruleno' denote the same value:
16247 keep ruleno only.
16248
16249 2001-11-28 Akim Demaille <akim@epita.fr>
16250
16251 * src/closure.c (closure): Instead of looping over word in array
16252 then bits in words, loop over bits in array.
16253
16254 2001-11-28 Akim Demaille <akim@epita.fr>
16255
16256 * src/closure.c (closure): No longer optimize the special case
16257 where all the bits of `ruleset[r]' are set to 0, to make the code
16258 clearer.
16259
16260 2001-11-28 Akim Demaille <akim@epita.fr>
16261
16262 * src/closure.c (closure): `r' and `c' are new variables, used to
16263 de-obfuscate accesses to RULESET and CORE.
16264
16265 2001-11-28 Akim Demaille <akim@epita.fr>
16266
16267 * src/reduce.c (reduce_print): Use ngettext.
16268 (dump_grammar): Improve the trace accuracy.
16269
16270 2001-11-28 Akim Demaille <akim@epita.fr>
16271
16272 * src/reduce.c (dump_grammar): Don't translate trace messages.
16273
16274 2001-11-28 Akim Demaille <akim@epita.fr>
16275
16276 * tests/reduce.at (Useless Terminals, Useless Nonterminals): New.
16277 * src/reduce.c (reduce_grammar_tables): Do not free useless tags,
16278 as all tags are free'ed afterwards.
16279 From Enrico Scholz.
16280
16281 2001-11-27 Paul Eggert <eggert@twinsun.com>
16282
16283 * src/bison.simple (YYSTACK_REALLOC): Fix typo that caused us to
16284 use alloca when we didn't want to, and vice versa.
16285
16286 2001-11-27 Marc Autret <autret_m@epita.fr>
16287
16288 * src/muscle_tab.c (muscle_init): Remove 'verbose' muscle
16289 initialization.
16290 * src/output.c (prepare): Remove its update.
16291
16292 2001-11-27 Marc Autret <autret_m@epita.fr>
16293
16294 * tests/torture.at [AT_DATA]: Remove YYERROR_VERBOSE definition.
16295 Use %error-verbose.
16296
16297 2001-11-27 Marc Autret <autret_m@epita.fr>
16298
16299 * src/bison.simple: Remove YYERROR_VERBOSE using.
16300 Use %%error_verbose.
16301 (yyparse): Likewise.
16302 * src/output.c (prepare): Give its final value.
16303 * src/muscle_tab.c (muscle_init): Init new muscle 'error_verbose'.
16304 * src/getargs.h: Add its extern declaration.
16305 * src/getargs.c (error_verbose_flag): New int.
16306 (getargs): Update to catch new case.
16307 * src/options.c (option_table): 'error-verbose' is a new option.
16308 (shortopts): Update.
16309
16310 2001-11-27 Akim Demaille <akim@epita.fr>
16311
16312 * src/system.h: Use intl/libgettext.h.
16313 * src/Makefile.am (INCLUDES): Add -I $(top_srcdir).
16314
16315 2001-11-27 Akim Demaille <akim@epita.fr>
16316
16317 * tests/torture.at (Exploding the Stack Size with Malloc):
16318 s/YYSTACK_USE_ALLOCA_ALLOCA/YYSTACK_USE_ALLOCA/.
16319
16320 2001-11-27 Akim Demaille <akim@epita.fr>
16321
16322 * src/files.c: Include error.h.
16323 Reported by Hans Aberg.
16324
16325 2001-11-26 Marc Autret <autret_m@epita.fr>
16326
16327 * src/reader.c (parse_include_decl): New, not yet implemented.
16328 (read_declarations): Add case tok_include.
16329 * src/getargs.h (include): Add its extern definition.
16330 * src/getargs.c (include): New const char *.
16331 (getargs): Add case '-I'.
16332 * src/options.c (option_table): Add include as command line and
16333 percent option.
16334 * src/lex.h (token_t): Add tok_include.
16335
16336 2001-11-26 Akim Demaille <akim@epita.fr>
16337
16338 * src/reader.c (readgram): Make sure rules for mid-rule actions
16339 have a lineno equal to that of their host rule.
16340 Reported by Hans Aberg.
16341 * tests/regression.at (Rule Line Numbers): New.
16342
16343 2001-11-26 Akim Demaille <akim@epita.fr>
16344
16345 * src/LR0.c (allocate_itemsets): kernel_size contains ints, not
16346 size_ts.
16347
16348 2001-11-26 Akim Demaille <akim@epita.fr>
16349
16350 * src/complain.c, src/complain.h (error): Remove, provided by
16351 lib/error.[ch].
16352
16353 2001-11-26 Akim Demaille <akim@epita.fr>
16354
16355 * src/reader.c (read_declarations): Don't abort on tok_illegal,
16356 issue an error message.
16357 * tests/regression.at (Invalid %directive): New.
16358 Reported by Hans Aberg.
16359
16360 2001-11-26 Akim Demaille <akim@epita.fr>
16361
16362 * configure.in: Invoke AC_FUNC_OBSTACK and AC_FUNC_ERROR_AT_LINE.
16363 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
16364
16365 2001-11-26 Akim Demaille <akim@epita.fr>
16366
16367 * src/conflicts.c (conflicts_print): Don't complain at all when
16368 there are no reduce/reduce conflicts, and as many shift/reduce
16369 conflicts as expected.
16370 * tests/regression.at (%expect right): Adjust.
16371
16372 2001-11-23 Akim Demaille <akim@epita.fr>
16373
16374 * lib/alloca.c: Update, from fileutils.
16375
16376 2001-11-23 Akim Demaille <akim@epita.fr>
16377
16378 * lib/Makefile.am (libbison_a_LIBADD): Add @ALLOCA@.
16379
16380 2001-11-23 Akim Demaille <akim@epita.fr>
16381
16382 * src/system.h: Include alloca.h.
16383 * src/main.c (main) [C_ALLOCA]: Call alloca (0).
16384
16385 2001-11-23 Akim Demaille <akim@epita.fr>
16386
16387 * src/print_graph.c (print_actions): Remove `rule', unused.
16388 * src/LR0.c (kernel_size): Contain `int' instead of `size_t' to
16389 pacify GCC's signed < unsigned warnings.
16390 * src/closure.c (itemsetsize): Likewise.
16391 * src/reader.c (symbol_list_new): Static.
16392
16393 2001-11-23 Akim Demaille <akim@epita.fr>
16394
16395 Attaching lineno to buckets is stupid, since only one copy of each
16396 symbol is kept, only the line of the first occurrence is kept too.
16397
16398 * src/symtab.h, src/symtab.c (bucket): Remove the line member.
16399 * src/reader.c (rline_allocated): Remove, unused.
16400 (symbol_list): Have a `line' member.
16401 (symbol_list_new): New.
16402 (readgram): Use it.
16403 * src/print.c (print_grammar): Output the rule line numbers.
16404 * tests/regression.at (Solved SR Conflicts)
16405 (Unresolved SR Conflicts): Adjust.
16406 Reported by Hans Aberg.
16407
16408 2001-11-22 Marc Autret <autret_m@epita.fr>
16409
16410 * src/bison.simple [YYERROR_VERBOSE]: Force its value to be 1 or 0.
16411
16412 2001-11-22 Marc Autret <autret_m@epita.fr>
16413
16414 * src/muscle_tab.c (muscle_init): Remove initialization of
16415 skeleton muscle.
16416 * src/output.c (output_master_parser): Do it here.
16417
16418 2001-11-20 Akim Demaille <akim@epita.fr>
16419
16420 * po/sv.po: New.
16421 * configure.in (ALL_LINGUAS): Adjust.
16422 * po/POTFILE.in: Remove `nullable.c' and `derives.c' which no
16423 longer contains strings to translate.
16424
16425 2001-11-19 Akim Demaille <akim@epita.fr>
16426
16427 * src/conflicts.c (conflicts_print): Add a missing \n.
16428
16429 2001-11-19 Akim Demaille <akim@epita.fr>
16430
16431 * src/nullable.c (nullable_print): New.
16432 (set_nullable): Call it when tracing.
16433 Better locality of variables.
16434
16435 2001-11-19 Akim Demaille <akim@epita.fr>
16436
16437 * src/print.c (print_actions): Better locality of variables.
16438
16439 2001-11-19 Akim Demaille <akim@epita.fr>
16440
16441 * src/derives.c (print_derives): Fix and enrich.
16442 * src/closure.c (print_fderives): Likewise.
16443
16444 2001-11-19 Akim Demaille <akim@epita.fr>
16445
16446 * src/closure.c (itemsetend): Remove, replaced with...
16447 (itemsetsize): new.
16448
16449 2001-11-19 Akim Demaille <akim@epita.fr>
16450
16451 * src/LR0.c (kernel_end): Remove, replaced with...
16452 (kernel_size): new.
16453
16454 2001-11-19 Akim Demaille <akim@epita.fr>
16455
16456 * src/conflicts.c (set_conflicts): Use arrays instead of pointers
16457 to clarify.
16458
16459 2001-11-19 Akim Demaille <akim@epita.fr>
16460
16461 * src/closure.c (closure): Use arrays instead of pointers to clarify.
16462
16463 2001-11-19 Akim Demaille <akim@epita.fr>
16464
16465 * src/closure.c, src/derives.c, src/nullable.c: Adjust various
16466 trace messages.
16467 * src/LR0.c: Likewise.
16468 (allocate_itemsets): Use arrays instead of pointers to clarify.
16469
16470 2001-11-19 Akim Demaille <akim@epita.fr>
16471
16472 * src/getargs.c (statistics_flag): Replace with...
16473 (trace_flag): New.
16474 (longopts): Accept --trace instead of --statistics.
16475 * src/getargs.h, src/options.c: Adjust.
16476 * src/LR0.c, src/closure.c, src/derives.c, src/nullable.c,
16477 * src/reduce.c: Use trace_flags instead of the CPP conditional TRACE.
16478
16479 2001-11-19 Akim Demaille <akim@epita.fr>
16480
16481 * src/LR0.c (new_itemsets, get_state): Use more arrays and fewer
16482 pointers to clarify the code.
16483 (save_reductions, save_shifts): Factor common parts of alternatives.
16484
16485 2001-11-19 Akim Demaille <akim@epita.fr>
16486
16487 * src/LR0.c (new_state, get_state): Complete TRACE code.
16488 * src/closure.c: Include `reader.h' to get `tags', needed by the
16489 trace code.
16490 Rename the conditional DEBUG as TRACE.
16491 Output consistently TRACEs to stderr, not stdout.
16492 * src/derives.c: Likewise.
16493 * src/reduce.c: (inaccessable_symbols): Using if is better style
16494 than goto.
16495 Use `#if TRACE' instead of `#if 0' for tracing code.
16496
16497 2001-11-19 Akim Demaille <akim@epita.fr>
16498
16499 * src/system.h (LIST_FREE, shortcpy): New.
16500 * src/LR0.c: Use them.
16501 * src/output.c (free_itemsets, free_reductions, free_shifts):
16502 Remove, replaced by LIST_FREE.
16503
16504 2001-11-19 Akim Demaille <akim@epita.fr>
16505
16506 * src/state.h (CORE_ALLOC, SHIFTS_ALLOC, ERRS_ALLOC)
16507 (REDUCTIONS_ALLOC): New.
16508 * src/LR0.c, src/conflicts.c: Use them to de-obfuscate memory
16509 allocation.
16510
16511 2001-11-19 Akim Demaille <akim@epita.fr>
16512
16513 * src/LR0.c (new_state): Complete trace code.
16514 * src/nullable.c (set_nullable): Don't translate traces.
16515
16516 2001-11-19 Akim Demaille <akim@epita.fr>
16517
16518 * src/print_graph.c (print_core): Better locality of variables.
16519 * src/print.c (print_core): Likewise.
16520
16521 2001-11-19 Akim Demaille <akim@epita.fr>
16522
16523 * src/vcg.c: You do the output, so you are responsible of the
16524 handling of VCG syntax, in particular: use quotearg.
16525 * src/print_graph.c: Don't.
16526 (print_actions): Don't output the actions as part of the nodes,
16527 since that's the job of the edges.
16528 (print_state): Don't output by hand: fill the node description,
16529 and ask for its output.
16530
16531 2001-11-19 Akim Demaille <akim@epita.fr>
16532
16533 * src/bison.simple (yyparse): When verbosely reporting an error,
16534 no longer put additional quotes around token names.
16535 * tests/calc.at: Adjust.
16536
16537 2001-11-19 Akim Demaille <akim@epita.fr>
16538
16539 * src/symtab.h, src/symtab.c: `line' is a new member of `bucket'.
16540 * src/reader.c (record_rule_lines, rline, rline_allocated): Remove.
16541 * src/output.c: Adjust.
16542
16543 2001-11-19 Akim Demaille <akim@epita.fr>
16544
16545 * src/gram.h (rprec, rprecsym, rassoc): Remove, now part of...
16546 (rule_t): this.
16547 * src/conflicts.c, src/reader.c, src/reduce.c: Adjust.
16548
16549 2001-11-19 Akim Demaille <akim@epita.fr>
16550
16551 * src/gram.h (rule_t): New.
16552 (rule_table): New.
16553 (rrhs, rlhs): Remove, part of state_t.
16554 * src/print_graph.c, src/closure.c, src/conflicts.c, src/derives.c,
16555 * src/lalr.c, src/nullable.c, src/output.c, src/print.c,
16556 * src/reader.c, src/reduce.c: Adjust.
16557
16558 2001-11-19 Akim Demaille <akim@epita.fr>
16559
16560 * src/reader.c (symbols_output): New, extracted from...
16561 (packsymbols): Here.
16562 (reader): Call it.
16563
16564 2001-11-19 Akim Demaille <akim@epita.fr>
16565
16566 * src/lalr.c (set_maxrhs, maxrhs): Remove, replaced with...
16567 (maxrhs): this new function.
16568
16569 2001-11-19 Akim Demaille <akim@epita.fr>
16570
16571 * src/lalr.c (F): New macro to access the variable F.
16572 Adjust.
16573
16574 2001-11-19 Akim Demaille <akim@epita.fr>
16575
16576 * src/lalr.h (LA): New macro to access the variable LA.
16577 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
16578 * src/lalr.c: Adjust.
16579
16580 2001-11-19 Akim Demaille <akim@epita.fr>
16581
16582 * src/lalr.c (initialize_LA): Only initialize LA. Let...
16583 (set_state_table): handle the `lookaheads' members.
16584
16585 2001-11-19 Akim Demaille <akim@epita.fr>
16586
16587 * src/lalr.h (lookaheads): Removed array, whose contents is now
16588 a member of...
16589 (state_t): this structure.
16590 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
16591 Adjust.
16592
16593 2001-11-19 Akim Demaille <akim@epita.fr>
16594
16595 * src/lalr.h (consistent): Removed array, whose contents is now
16596 a member of...
16597 (state_t): this structure.
16598 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
16599 Adjust.
16600
16601 2001-11-19 Akim Demaille <akim@epita.fr>
16602
16603 * src/lalr.h (reduction_table, shift_table): Removed arrays, whose
16604 contents are now members of...
16605 (state_t): this structure.
16606 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
16607 Adjust.
16608
16609 2001-11-19 Akim Demaille <akim@epita.fr>
16610
16611 * src/lalr.h (state_t): New.
16612 (state_table): Be a state_t * instead of a core **.
16613 (accessing_symbol): Remove, part of state_t.
16614 * src/lalr.c: Adjust.
16615 (set_accessing_symbol): Merge into...
16616 (set_state_table): this.
16617 * src/print_graph.c, src/conflicts.c: Adjust.
16618
16619 2001-11-14 Akim Demaille <akim@epita.fr>
16620
16621 * tests/calc.at, tests/output.at, tests/regression.at,
16622 * tests/testsuite.at, tests/torture.at: Rely on Autotest 2.52g:
16623 now the tests are run in private dirs, therefore AC_CLEANUP and
16624 family can be simplified to 0-ary.
16625 * tests/atlocal.in: Now that we run `elsewhere' than in tests/,
16626 use abs. path to find config.h.
16627 * tests/calc.at (AT_CHECK_CALC): Don't try to check the compiler's
16628 stderr, there can be way too much random noise.
16629 Instead pass -Werror to GCC and rely on the exit status.
16630 Reported by Wolfram Wagner.
16631
16632 2001-11-14 Akim Demaille <akim@epita.fr>
16633
16634 * src/bison.simple (yyparse): Let yyls1, yyss1 and yyvs1 be
16635 defined only if yyoverflow is defined, to avoid `warning: unused
16636 variable `yyvs1''.
16637 Reported by The Test Suite.
16638
16639 2001-11-14 Akim Demaille <akim@epita.fr>
16640
16641 * src/print.c: Include reduce.h.
16642 Reported by Hans Aberg.
16643
16644 2001-11-14 Akim Demaille <akim@epita.fr>
16645
16646 * src/lex.c, src/lex.h (token_buffer, unlexed_token_buffer):
16647 Revert a previous patch: these are really const.
16648 * src/conflicts.c (conflict_report): Additional useless pair of
16649 braces to pacify GCC's warnings for `if () if () {} else {}'.
16650 * src/lex.c (parse_percent_token): Replace equal_offset with
16651 arg_offset.
16652 arg is const.
16653 Be sure to strdup `arg' when used, since there is no reason for
16654 token_buffer not to change.
16655
16656 2001-11-14 Akim Demaille <akim@epita.fr>
16657
16658 * src/system.h (EXIT_SUCCESS, EXIT_FAILURE): Ensure a proper
16659 definition.
16660 * src/main.c (main): Use them.
16661 Suggested by Hans Aberg.
16662
16663 2001-11-12 Akim Demaille <akim@epita.fr>
16664
16665 * src/system.h (ngettext): Now that we use ngettext, be sure to
16666 provide a default definition when NLS are not used.
16667
16668 2001-11-12 Akim Demaille <akim@epita.fr>
16669
16670 * doc/bison.texinfo: Use `$' as shell prompt, not `%'.
16671 Use @kbd to denote user input.
16672 (Language and Grammar): ANSIfy the example.
16673 Adjust its layout for info/notinfo.
16674 (Location Tracking Calc): Output error messages to stderr.
16675 Output locations in a more GNUtically correct way.
16676 Fix a couple of Englishos.
16677 Adjust @group/@end group pairs.
16678
16679 2001-11-12 Akim Demaille <akim@epita.fr>
16680
16681 %expect was not functioning at all.
16682
16683 * src/conflicts.c (expected_conflicts): Set to -1.
16684 (conflict_report): Use ngettext.
16685 (conflicts_print): Check %expect and make its violation an error.
16686 * doc/bison.texinfo (Expect Decl): Adjust.
16687 * configure.in (AM_GNU_GETTEXT): Ask for ngettext.
16688 * tests/regression.at (%expect not enough, %expect right)
16689 (%expect too much): New.
16690
16691 2001-11-12 Akim Demaille <akim@epita.fr>
16692
16693 * tests/regression.at (Conflicts): Rename as...
16694 (Unresolved SR Conflicts): this.
16695 (Solved SR Conflicts): New.
16696
16697 2001-11-12 Akim Demaille <akim@epita.fr>
16698
16699 * src/reduce.c (print_results): Rename as...
16700 (reduce_output): This.
16701 Output to OUT, passed as argument, instead of output_obstack.
16702 (dump_grammar): Likewise.
16703 (reduce_free): New.
16704 Also free V1.
16705 (reduce_grammar): No longer call reduce_output, since...
16706 * src/print.c (print_results): do it.
16707 * src/main.c (main): Call reduce_free;
16708
16709 2001-11-12 Akim Demaille <akim@epita.fr>
16710
16711 * src/conflicts.c (print_reductions): Accept OUT as argument.
16712 Output to it, not to output_obstack.
16713 * src/print.c (print_actions): Adjust.
16714
16715 2001-11-12 Akim Demaille <akim@epita.fr>
16716
16717 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts): Return
16718 the result instead of using...
16719 (src_total, rrc_total, src_count, rrc_count): Remove.
16720 (any_conflicts): Remove.
16721 (print_conflicts): Split into...
16722 (conflicts_print, conflicts_output): New.
16723 * src/conflicts.h: Adjust.
16724 * src/main.c (main): Invoke both conflicts_output and conflicts_print.
16725 * src/print.c (print_grammar): Issue `\n' between two rules.
16726 * tests/regression.at (Conflicts): New.
16727 Reported by Tom Lane.
16728
16729 2001-11-12 Akim Demaille <akim@epita.fr>
16730
16731 * tests/regression.at (Invalid input): Remove, duplicate with
16732 ``Invalid input: 1''.
16733
16734 2001-11-12 Akim Demaille <akim@epita.fr>
16735
16736 * tests/torture.at (AT_DATA_STACK_TORTURE)
16737 (Exploding the Stack Size with Alloca)
16738 (Exploding the Stack Size with Malloc): New.
16739
16740 2001-11-12 Akim Demaille <akim@epita.fr>
16741
16742 * src/bison.simple (YYSTACK_REALLOC): New.
16743 (yyparse) [!yyoverflow]: Use it and free the old stack.
16744 Reported by Per Allansson.
16745
16746 2001-11-12 Pascal Bart <pascal.bart@epita.fr>
16747
16748 * src/bison.simple: Define type yystype instead of YYSTYPE, and
16749 define CPP macro, which substitute YYSTYPE by yystype.
16750 * src/reader.c (parse_union_decl): Output yystype/YYSTYPE as we do
16751 with yyltype/YYLTYPE. This allows inclusion of the generated
16752 header within the parser if the compiler, such as GGC, accepts
16753 multiple equivalent #defines.
16754 From Akim.
16755
16756 2001-11-05 Akim Demaille <akim@epita.fr>
16757
16758 * src/reader.c (symbols_output): New, extracted from...
16759 (packsymbols): here.
16760 (reader): Adjust.
16761
16762 2001-11-05 Akim Demaille <akim@epita.fr>
16763
16764 * src/lex.c (parse_percent_token): s/quotearg/quote/.
16765
16766 2001-11-05 Akim Demaille <akim@epita.fr>
16767
16768 * tests/regression.at (AT_TEST_CPP_GUARD_H): Adjust the clean up
16769 pattern.
16770
16771 2001-11-05 Akim Demaille <akim@epita.fr>
16772
16773 * src/options.h (struct option_table_struct): set_flags is void*.
16774 * src/options.c (longopts): Support `--output' and `%output'.
16775 (usage): Adjust.
16776 * src/lex.h (tok_setopt): Remove, replaced with...
16777 (tok_intopt, tok_stropt): these new guys.
16778 * src/lex.c (getopt.h): Not needed.
16779 (token_buffer, unlexed_token_buffer): Not const.
16780 (percent_table): Promote `-' over `_' in directive names.
16781 Active `%name-prefix', `file-prefix', and `output'.
16782 (parse_percent_token): Accept possible arguments to directives.
16783 Promote `-' over `_' in directive names.
16784
16785 2001-11-04 Akim Demaille <akim@epita.fr>
16786
16787 * doc/bison.texinfo (Decl Summary): Split the list into
16788 `directives for grammars' and `directives for bison'.
16789 Sort'em.
16790 Add description of `%name-prefix', `file-prefix', and `output'.
16791 Promote `-' over `_' in directive names.
16792 (Bison Options): s/%locactions/%locations/. Nice Freudian slip.
16793 Simplify the description of `--name-prefix'.
16794 Promote `-' over `_' in directive names.
16795 Promote `--output' over `--output-file'.
16796 Fix the description of `--defines'.
16797 * tests/output.at: Exercise %file-prefix and %output.
16798
16799 2001-11-02 Akim Demaille <akim@epita.fr>
16800
16801 * doc/refcard.tex: Update.
16802
16803 2001-11-02 Akim Demaille <akim@epita.fr>
16804
16805 * src/symtab.h (SUNDEF): New.
16806 * src/symtab.c (bucket_new): Init user_token_number to SUNDEF to
16807 stand for `uninitialized', instead of 0.
16808 * src/reader.c (packsymbols, parse_thong_decl): Adjust.
16809 * src/lex.c (lex): Adjust.
16810
16811 * tests/calc.at (_AT_DATA_CALC_Y): Declare a token for EOF.
16812 Number it 0.
16813 Let yylex return it instead of a plain 0.
16814 Reported by Dick Streefland.
16815
16816 2001-11-02 Akim Demaille <akim@epita.fr>
16817
16818 * tests/regression.at (Mixing %token styles): New test.
16819
16820 2001-11-02 Akim Demaille <akim@epita.fr>
16821
16822 * src/reader.c (parse_thong_decl): Formatting changes.
16823 (token_translations_init): New, extracted from...
16824 (packsymbols): Here.
16825 Adjust.
16826
16827 2001-11-01 Akim Demaille <akim@epita.fr>
16828
16829 * tests/regression.at (AT_TEST_CPP_GUARD_H): New.
16830 Check that `9foo.y' produces correct cpp guards.
16831 * src/files.c (compute_header_macro): Prepend `BISON_' to CPP
16832 guards.
16833 Reported by Wwp.
16834
16835 2001-11-01 Akim Demaille <akim@epita.fr>
16836
16837 * tests/regression.at (Invalid input: 2): New.
16838 * src/lex.c (unlexed_token_buffer): New.
16839 (lex, unlex): Adjust: when unlexing, be sure to save token_buffer
16840 too.
16841 Reported by Wwp.
16842
16843 2001-11-01 Akim Demaille <akim@epita.fr>
16844
16845 * tests/calc.at: Catch up with 1.30.
16846 * configure.in: Bump to 1.49a.
16847 Adjust to newer Autotest.
16848
16849 2001-10-19 Pascal Bart <pascal.bart@epita.fr>
16850
16851 * src/conflicts.c: Move global variables rrc_total and src_total ...
16852 (print_conflicts): here.
16853 * src/output.c (output): Free global variable user_toknums.
16854 * src/lex.c (token_obstack): Become static.
16855
16856 2001-10-18 Akim Demaille <akim@epita.fr>
16857
16858 * tests/atlocal.in (GCC): Add.
16859 * tests/calc.at: s/m4_match/m4_bmatch/.
16860 s/m4_patsubst/m4_bpatsubst/.
16861 (AT_CHECK_CALC): Check the compiler's stderr only if it's GCC.
16862 * configure.in: AC_SUBST(GCC).
16863
16864 2001-10-14 Marc Autret <autret_m@epita.fr>
16865
16866 * src/options.c (create_long_option_table): Fix.
16867
16868 2001-10-10 Akim Demaille <akim@epita.fr>
16869
16870 * src/bison.simple: Be sure to set YYSTACK_USE_ALLOCA.
16871
16872 2001-10-04 Akim Demaille <akim@epita.fr>
16873
16874 * src/reader.c (parse_union_decl): Push the caracters in
16875 union_obstack, not attrs_obstack.
16876
16877 2001-10-04 Akim Demaille <akim@epita.fr>
16878
16879 Merge in the branch 1.29.
16880
16881 * src/reader.c (packsymbols): Use a temporary obstack for
16882 `%%tokendef', since output_stack is already used elsewhere.
16883
16884 2001-10-02 Akim Demaille <akim@epita.fr>
16885
16886 Bump 1.29d.
16887
16888 2001-10-02 Akim Demaille <akim@epita.fr>
16889
16890 Version 1.29c.
16891
16892 2001-10-02 Akim Demaille <akim@epita.fr>
16893
16894 * tests/regression.at (Invalid CPP headers): New.
16895 From Alexander Belopolsky.
16896 * src/files.c (compute_header_macro): Map non alnum chars to `_'.
16897
16898 2001-10-02 Akim Demaille <akim@epita.fr>
16899
16900 * tests/regression.at (Invalid input): New.
16901 * src/lex.c (lex): Be sure to set `token_buffer' in any case.
16902 Reported by Shura.
16903
16904 2001-10-02 Akim Demaille <akim@epita.fr>
16905
16906 * tests/calc.at: Now that --debug works, the tests must be adjusted.
16907
16908 2001-10-02 Akim Demaille <akim@epita.fr>
16909
16910 * src/output.c (output_parser): Assert `skeleton'.
16911 * src/files.c (skeleton_find): Look harder for skeletons on DOSish
16912 systems.
16913 From Shura.
16914
16915 2001-10-01 Marc Autret <autret_m@epita.fr>
16916
16917 * src/lex.h: Echo modifications.
16918 * src/lex.c (unlex): Parameter is now token_t.
16919 From Hans Aberg.
16920
16921 2001-10-01 Marc Autret <autret_m@epita.fr>
16922
16923 * src/main.c: Include lex.h.
16924 From Hans Aberg.
16925
16926 2001-09-29 Akim Demaille <akim@epita.fr>
16927
16928 * src/getargs.c (longopts): `--debug' is `-t', not `-d'.
16929
16930 2001-09-28 Akim Demaille <akim@epita.fr>
16931
16932 * tests/testsuite.at: Update to newer Autotest.
16933 * tests/Makefile.am (EXTRA_DIST): bison is not to be shipped.
16934
16935 2001-09-27 Akim Demaille <akim@epita.fr>
16936
16937 Position independent wrapper.
16938
16939 * tests/bison: Remove.
16940 * tests/bison.in: New.
16941 * configure.in: Adjust.
16942
16943 2001-09-27 Paul Eggert <eggert@twinsun.com>
16944
16945 Port quotearg fixes from tar 1.13.24.
16946
16947 * lib/quotearg.c: BSD/OS 4.1 wchar.h requires FILE and struct
16948 tm to be declared.
16949 (HAVE_MBSINIT): Undef if !HAVE_MBRTOWC.
16950 (mbsinit): Define to 1 if !defined mbsinit && !HAVE_MBSINIT.
16951
16952 * m4/Makefile.am (EXTRA_DIST): Add mbrtowc.m4.
16953 * m4/mbrtowc.m4: New file.
16954 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Check for mbsinit and stddef.h.
16955 Use jm_FUNC_MBRTOWC instead of AC_CHECK_FUNCS(mbrtowc).
16956
16957 2001-09-27 Akim Demaille <akim@epita.fr>
16958
16959 Bump to 1.29c.
16960
16961 2001-09-27 Akim Demaille <akim@epita.fr>
16962
16963 Version 1.29b.
16964
16965 2001-09-25 Akim Demaille <akim@epita.fr>
16966
16967 * src/system.h: Include `xalloc.h'.
16968 Remove it from the C files.
16969 * src/files.c (output_files): Free the obstacks.
16970 * src/lex.c (init_lex): Rename as...
16971 (lex_init): this.
16972 (lex_free): New.
16973 * src/main.c (main): Use it.
16974
16975 2001-09-24 Marc Autret <autret_m@epita.fr>
16976
16977 * src/vcg.c (open_edge, close_edge, open_node, close_node): Change
16978 to output informations in fout (FILE*).
16979 (open_graph, close_graph): Likewise.
16980 (output_graph, output_edge, output_node): Likewise.
16981 * src/vcg.h: Update function prototypes.
16982 * src/print_graph.c (print_graph): Open output graph file.
16983 (print_actions): Adjust.
16984 * src/files.h: Remove extern declaration.
16985 * src/files.c: Remove graph_obstack declaration.
16986 (open_files): Remove graph_obstack initialization.
16987 (output_files): Remove graph_obstack saving.
16988
16989 2001-09-24 Marc Autret <autret_m@epita.fr>
16990
16991 * src/files.c (compute_output_file_names): Fix.
16992
16993 2001-09-24 Marc Autret <autret_m@epita.fr>,
16994 Akim Demaille <akim@epita.fr>
16995
16996 * src/reader.c (reader): Remove call to free_symtab ().
16997 * src/main.c (main): Call it here.
16998 Include symtab.h.
16999 * src/conflicts.c (initialize_conflicts): Rename as...
17000 (solve_conflicts): this.
17001 * src/print.c (print_core, print_actions, print_state)
17002 (print_grammar): Dump to a file instead a `output_obstack'.
17003 (print_results): Dump `output_obstack', and then proceed with the
17004 FILE *.
17005 * src/files.c (compute_output_file_names, close_files): New.
17006 (output_files): Adjust.
17007 * src/main.c (main): Adjust.
17008
17009 2001-09-23 Marc Autret <autret_m@epita.fr>
17010
17011 * src/files.c (compute_header_macro): Computes header macro name
17012 from spec_defines_file when given.
17013
17014 2001-09-23 Marc Autret <autret_m@epita.fr>
17015
17016 * src/files.c (output_files): Add default extensions.
17017
17018 2001-09-22 Akim Demaille <akim@epita.fr>
17019
17020 * src/conflicts.c (finalize_conflicts): Rename as...
17021 (free_conflicts): this.
17022
17023 2001-09-22 Akim Demaille <akim@epita.fr>
17024
17025 * src/gram.c (gram_free): Rename back as...
17026 (dummy): this.
17027 (output_token_translations): Free `token_translations'.
17028 * src/symtab.c (free_symtab): Free the tag field.
17029
17030 2001-09-22 Akim Demaille <akim@epita.fr>
17031
17032 Remove `translations' as it is always set to true.
17033
17034 * src/gram.h: Adjust.
17035 * src/reader.c (packsymbols, parse_token_decl): Adjust
17036 * src/print.c (print_grammar): Adjust.
17037 * src/output.c (output_token_translations): Adjust.
17038 * src/lex.c (lex): Adjust.
17039 * src/gram.c: Be sure the set pointers to NULL.
17040 (dummy): Rename as...
17041 (gram_free): this.
17042
17043 2001-09-22 Akim Demaille <akim@epita.fr>
17044
17045 * configure.in: Invoke AM_LIB_DMALLOC.
17046 * src/system.h: Use dmalloc.
17047 * src/LR0.c: Be sure to have pointers initialized to NULL.
17048 (allocate_itemsets): Allocate kernel_items only if needed.
17049
17050 2001-09-22 Akim Demaille <akim@epita.fr>
17051
17052 * configure.in: Bump to 1.29b.
17053 * tests/Makefile.am (DISTCLEANFILES): Add package.m4.
17054 * tests/calc.at (_AT_DATA_CALC_Y): #undef malloc so that we don't
17055 need xmalloc.c in calc.y.
17056 From Pascal Bart.
17057
17058 2001-09-21 Akim Demaille <akim@epita.fr>
17059
17060 Version 1.29a.
17061 * Makefile.maint, config/config.guess, config/config.sub,
17062 * config/missing: Update from masters.
17063 * tests/Makefile.am ($(srcdir)/$(TESTSUITE)): No longer depend
17064 upon package.m4.
17065 * configure.in (ALL_LINGUAS): Add `tr'.
17066
17067 2001-09-21 Akim Demaille <akim@epita.fr>
17068
17069 * tests/Makefile.am (package.m4): Move to...
17070 ($(srcdir)/$(TESTSUITE)): here.
17071
17072 2001-09-20 Akim Demaille <akim@epita.fr>
17073
17074 * src/complain.c: No longer try to be standalone: use system.h.
17075 Don't assume __STDC__ is defined to 1. Just test if it is defined.
17076 * src/complain.h: Likewise.
17077 * src/reduce.c (useless_nonterminals, inaccessable_symbols):
17078 Remove the unused variable `n'.
17079 From Albert Chin-A-Young.
17080
17081 2001-09-18 Marc Autret <autret_m@epita.fr>
17082
17083 * doc/bison.1: Update.
17084 * doc/bison.texinfo (Bison Options): Update --defines and --graph
17085 descriptions.
17086 (Option Cross Key): Update.
17087 Add --graph.
17088
17089 2001-09-18 Marc Autret <autret_m@epita.fr>
17090
17091 * tests/regression.at: New test (comment in %union).
17092
17093 2001-09-18 Marc Autret <autret_m@epita.fr>
17094
17095 * src/reader.c (parse_union_decl): Do not output '/'. Let copy_comment
17096 do that.
17097 Reported by Keith Browne.
17098
17099 2001-09-18 Marc Autret <autret_m@epita.fr>
17100
17101 * tests/output.at: Add tests for --defines and --graph.
17102
17103 2001-09-18 Marc Autret <autret_m@epita.fr>
17104
17105 * tests/output.at: Removes tests of %{header,src}_extension features.
17106
17107 2001-09-18 Akim Demaille <akim@epita.fr>
17108
17109 * tests/Makefile.am (package.m4): New.
17110 * tests/calc.at (_AT_CHECK_CALC): Just run `calc input'.
17111 (_AT_CHECK_CALC_ERROR): Likewise.
17112 Factor the `, ' part of verbose error messages.
17113
17114 2001-09-18 Marc Autret <autret_m@epita.fr>
17115
17116 * src/getargs.c (longopts): Declare --defines and --graph as options
17117 with optional arguments.
17118 * src/files.h: Add extern declarations.
17119 * src/files.c (spec_graph_file, spec_defines_file): New.
17120 (output_files): Update.
17121 Remove CPP-outed code.
17122
17123 2001-09-18 Marc Autret <autret_m@epita.fr>
17124
17125 Turn off %{source,header}_extension feature.
17126
17127 * src/files.c (compute_exts_from_gf): Update.
17128 (compute_exts_from_src): Update.
17129 (output_files): CPP-out useless code.
17130 * src/files.h: Remove {header,source}_extension extern declarations.
17131 * src/reader.c (parse_dquoted_param): CPP-out.
17132 (parse_header_extension_decl): Remove.
17133 (parse_source_extension_decl): Remove.
17134 (read_declarations): Remove cases tok_{hdrext,srcext}.
17135 * src/lex.c (percent_table): Remove {header,source}_extension entries.
17136 * src/lex.h (token_t): Remove tok_hdrext and tok_srcext.
17137
17138 2001-09-10 Akim Demaille <akim@epita.fr>
17139
17140 * tests/output.at (AT_CHECK_BISON_FLAGS, AT_CHECK_BISON_PERCENT):
17141 (AT_CHECK_BISON_PERCENT_FLAGS): Merge into...
17142 (AT_CHECK_OUTPUT): this.
17143 Merely check ls' exit status, its output is useless.
17144
17145 2001-09-10 Akim Demaille <akim@epita.fr>
17146
17147 * tests/calc.at: Use m4_match.
17148 (_AT_DATA_CALC_Y): Check `yyin != NULL', not `stdin != NULL'.
17149
17150 2001-09-10 Marc Autret <autret_m@epita.fr>,
17151 Akim Demaille <akim@epita.fr>
17152
17153 * src/vcg.h (graph_s): color, textcolor, bordercolor are now
17154 enum color_e.
17155 * src/print_graph.c (print_graph): Initalize graph.layoutalgorithm
17156 to `normal'.
17157 * src/reader.c (parse_token_decl): Initialize token with tok_eof.
17158 * src/lex.h: Adjust prototype.
17159 (token_t): Add `tok_undef'.
17160 * src/lex.c (struct percent_table_struct): Retval is now a token_t.
17161 (parse_percent_token): Now returns token_t.
17162 Add default statement in switch.
17163 (lex): Separate `c' as an input variable, from the token_t result
17164 part.
17165 (unlexed): Is a token_t.
17166
17167 2001-09-10 Akim Demaille <akim@epita.fr>
17168
17169 * configure.in: Bump to 1.29a.
17170
17171 2001-09-07 Akim Demaille <akim@epita.fr>
17172
17173 Version 1.29.
17174
17175 2001-08-30 Akim Demaille <akim@epita.fr>
17176
17177 * tests/atgeneral.m4, tests/atconfig.in, tests/suite.at: Remove.
17178 * m4/atconfig.m4: Remove.
17179 * tests/testsuite.at, tests/atlocal.in, tests/output.at,
17180 * tests/bison: New.
17181 * tests/regression.at, tests/calc.at: Use m4_define, AT_BANNER,
17182 m4_if, m4_patsubst, and m4_regexp.
17183 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Use an
17184 `input' file instead of echo.
17185
17186 2001-08-29 Akim Demaille <akim@epita.fr>
17187
17188 Bump to 1.28e.
17189
17190 2001-08-29 Akim Demaille <akim@epita.fr>
17191
17192 Version 1.28d.
17193
17194 2001-08-29 Paul Eggert <eggert@twinsun.com>
17195
17196 * src/bison.simple (yyparse): Don't take the address of an
17197 item before the start of an array, as that doesn't conform to
17198 the C Standard.
17199
17200 2001-08-29 Robert Anisko <anisko_r@epita.fr>
17201
17202 * doc/bison.texinfo (Location Tracking Calc): New node.
17203
17204 2001-08-29 Paul Eggert <eggert@twinsun.com>
17205
17206 * src/output.c (output): Do not define const, as this now
17207 causes more problems than it cures.
17208
17209 2001-08-29 Akim Demaille <akim@epita.fr>
17210
17211 * doc/bison.texinfo: Modernize `@node' and `@top' use: just name
17212 the nodes.
17213 Be sure to tag the `detailmenu'.
17214
17215 2001-08-29 Akim Demaille <akim@epita.fr>
17216
17217 * Makefile.maint (do-po-update): Wget refuses to overwrite files:
17218 download in a tmp dir.
17219
17220 2001-08-28 Marc Autret <autret_m@epita.fr>
17221
17222 * config/depcomp: New file.
17223
17224 2001-08-28 Marc Autret <autret_m@epita.fr>
17225
17226 * doc/bison.1 (mandoc): Adjust.
17227 From Juan Manuel Guerrero.
17228
17229 2001-08-28 Marc Autret <autret_m@epita.fr>
17230
17231 * src/print_graph.c (print_state): Fix.
17232
17233 2001-08-27 Marc Autret <autret_m@epita.fr>
17234
17235 * src/vcg.h (classname_s, infoname_s, node_s): Constify the
17236 char * members.
17237 Echo modifications to the functions prototypes.
17238 * src/vcg.c (add_classname, add_infoname): Adjust arguments.
17239
17240 2001-08-27 Marc Autret <autret_m@epita.fr>
17241
17242 * src/vcg.c: Include `xalloc.h'.
17243 (add_colorentry): New.
17244 (add_classname): New.
17245 (add_infoname): New.
17246 * src/vcg.h: Add new prototypes.
17247
17248 2001-08-27 Akim Demaille <akim@epita.fr>
17249
17250 * Makefile.maint: Sync. again with CVS Autoconf.
17251
17252 2001-08-27 Akim Demaille <akim@epita.fr>
17253
17254 * Makefile.maint: Formatting changes.
17255 (po-update, cvs-update, update): New targets.
17256 (AMTAR): Remove.
17257
17258 2001-08-27 Akim Demaille <akim@epita.fr>
17259
17260 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
17261 * Makefile.maint: Sync. with CVS Autoconf.
17262
17263 2001-08-27 Marc Autret <autret_m@epita.fr>
17264
17265 * src/vcg.h (struct infoname_s): New.
17266 (struct colorentry_s): New.
17267 (graph_s): New fields {vertical,horizontal}_order in structure.
17268 Add `infoname' field.
17269 Add `colorentry' field;
17270 * src/vcg_defaults.h (G_VERTICAL_ORDER): New.
17271 (G_HORIZONTAL_ORDER): New.
17272 (G_INFONAME): New.
17273 (G_COLORENTRY): New.
17274 * src/vcg.c (output_graph): Add output of {vertical,horizontal}_order.
17275 Add output of `infoname'.
17276 Add output of `colorentry'.
17277
17278 2001-08-27 Marc Autret <autret_m@epita.fr>
17279
17280 * src/reader.c (parse_dquoted_param): Rename variable `index' to `i'.
17281 This one shadowed a global parameter.
17282
17283 2001-08-24 Marc Autret <autret_m@epita.fr>
17284
17285 * src/print_graph.c (node_output_size): Declared POSIX `size_t' type,
17286 instead of `unsigned'.
17287 (print_state): Do not call obstack_object_size () in obstack_grow ()
17288 to avoid macro variables shadowing.
17289
17290 2001-08-23 Marc Autret <autret_m@epita.fr>
17291
17292 * src/lex.c (percent_table): Typo: s/naem/name/.
17293 Add graph option.
17294 Normalize new options declarations.
17295
17296 2001-08-20 Pascal Bart <pascal.bart@epita.fr>
17297
17298 * tests/suite.at: Exercise %header_extension and %source_extension.
17299
17300 2001-08-16 Marc Autret <autret_m@epita.fr>
17301
17302 * src/reader.c (parse_dquoted_param): New.
17303 (parse_header_extension_decl): Use it.
17304 (parse_source_extension_decl): Likewise.
17305
17306 2001-08-16 Marc Autret <autret_m@epita.fr>
17307
17308 * src/vcg.c: Remove includes of `complain.h' and `xalloc.h'.
17309 (get_xxxx_str): Use assert () instead of complain ().
17310 Remove return invokations in default cases.
17311 (get_decision_str): Modify default behaviour. Remove second argument.
17312 Echo modifications on calls.
17313 (output_graph): Fix.
17314
17315 2001-08-16 Marc Autret <autret_m@epita.fr>
17316
17317 * src/getargs.c (usage): Update with ``-g, --graph''.
17318
17319 2001-08-16 Marc Autret <autret_m@epita.fr>
17320
17321 * doc/bison.texinfo (Bison Options): Add items `-g', `--graph'.
17322 (Option Cross Key): Likewise.
17323 * doc/bison.1: Update.
17324
17325 2001-09-25 Pascal Bart <pascal.bart@epita.fr>
17326
17327 * src/output.c (output_master_parser): Don't finish action_obstack.
17328 (output_parser): Don't care about the muscle action, here.
17329 (prepare): Copy the action_obstack in the action muscle.
17330 (output): Free action_obstack.
17331
17332 2001-09-23 Pascal Bart <pascal.bart@epita.fr>
17333
17334 * src/reader.c (parse_union_decl): Add new obstack union_obstack. Which
17335 will contain `%union' declaration.
17336 (parse_union_decl): Delete #line directive output.
17337 (parse_union_decl): Substitute /attrs_obstack/union_obstack for all
17338 informations about %union.
17339 (parse_union_decl): Copy the union_obstack in the muscle stype.
17340 * src/bison.simple: Add new #line directive.
17341 Add typdef %%stype YYSTYPE.
17342
17343 2001-09-23 Pascal Bart <pascal.bart@epita.fr>
17344
17345 * src/bison.simple: Add new `#line' directive.
17346
17347 2001-09-22 Pascal Bart <pascal.bart@epita.fr>
17348
17349 * src/bison.simple: New `#line' directive.
17350 * src/output.c (output_parser): Support new dynamic muscle input_line.
17351
17352 2001-09-22 Marc Autret <autret_m@epita.fr>
17353
17354 * src/output.c (output_master_parser): New.
17355 (output_parser): Be more re-entrant.
17356
17357 2001-09-21 Marc Autret <autret_m@epita.fr>
17358
17359 * src/reader.c (copy_definition, parse_union_decl): Update and use
17360 `linef' muscle.
17361 (copy_action): Likewise.
17362 Use obstack_1grow ().
17363 * src/muscle_tab.c (muscle_init): Add muscle `linef'.
17364
17365 2001-09-21 Marc Autret <autret_m@epita.fr>
17366
17367 * src/options.c (option_table): Adjust.
17368 * src/lex.c (parse_percent_token): Fix.
17369
17370 2001-09-20 Pascal Bart <pascal.bart@epita.fr>
17371
17372 * src/options.c (symtab.h): Include it, need by lex.h.
17373
17374 2001-09-20 Pascal Bart <pascal.bart@epita.fr>
17375
17376 * src/lex.c (parse_percent_token): Change type of variable `tx', which
17377 is now an option_table_struct*.
17378 (option_strcmp): New function option_strcmp.
17379 (parse_percent_token): Call option_strcmp.
17380 * src/getargs.c (xalloc.h, options.h): Include it.
17381 (getargs): Call create_long_option_table.
17382 (getargs): Free longopts at the end of the function.
17383 (shortopts): Move in options.c.
17384 * src/options.c (create_long_option_table): New function. Convert
17385 information from option_table to option structure.
17386 * src/reader.c (options.h): Include it.
17387
17388 * src/Makefile.am: Adjust.
17389 * src/options.c (option_table): Create from longopts and percent_table.
17390 * src/getargs.c (longopts): Delete.
17391 * src/lex.c (struct percent_table_struct): Delete.
17392 (percent_table): Delete.
17393 (options.h): Include it.
17394 * src/options.c: Create.
17395 * src/options.h: Create.
17396 Declare enum opt_access_e.
17397 Define struct option_table_struct.
17398
17399 2001-09-20 Marc Autret <autret_m@epita.fr>
17400
17401 * doc/bison.texinfo: Adjust terminologies about prologue and epilogue
17402 sections of Bison.
17403
17404 2001-09-19 Pascal Bart <pascal.bart@epita.fr>
17405
17406 * src/bison.simple: s/%%filename/%%skeleton.
17407 * src/muscle_tab.c (getargs.h): Include it.
17408 (muscle_init): Insert new muscle skeleton.
17409
17410 2001-09-18 Pascal Bart <pascal.bart@epita.fr>
17411
17412 * src/output.c (output_parser): Delete unused variable actions_dumped.
17413
17414 2001-09-07 Pascal Bart <pascal.bart@epita.fr>
17415
17416 * src/output.c (output): Delete call to reader_output_yylsp.
17417 * src/reader.c (reader): Likewise.
17418 * src/reader.h: Delete declaration of reader_output_yylsp.
17419
17420 2001-09-02 Marc Autret <autret_m@epita.fr>
17421
17422 * src/reader.c: Include muscle_tab.h.
17423 (parse_union_decl): Update.
17424 (parse_macro_decl): Rename parse_muscle_decl.
17425 Update to use renamed functions and variable.
17426 (read_declarations, copy_action, read_additionnal_code, : Updated
17427 with correct variables and functions names.
17428 (packsymbols, reader): Likewise.
17429
17430 * src/reader.h (muscle_obstack): Extern declaration update.
17431
17432 * src/output.c: Include muscle_tab.h
17433 In all functions using macro_insert, change by using muscle_insert ().
17434 (macro_obstack): Rename muscle_obstack.
17435 Echo modifications in the whole file.
17436 (MACRO_INSERT_INT): Rename MUSCLE_INSERT_INT.
17437 (MACRO_INSERT_STRING): Rename MUSCLE_INSERT_STRING.
17438 (MACRO_INSERT_PREFIX): Rename MUSCLE_INSERT_PREFIX.
17439
17440 * src/muscle_tab.h: Update double inclusion macros.
17441 (macro_entry_s): Rename muscle_entry_s.
17442 Update prototypes.
17443
17444 * src/muscle_tab.c: Include muscle_tab.h.
17445 Rename macro_tabble to muscle_table.
17446 (mhash1, mhash2, mcmp): Use muscle_entry.
17447 (macro_init): Rename muscle_init. Update.
17448 (macro_insert): Rename muscle_insert. Update.
17449 (macro_find): Rename muscle_find. Update.
17450
17451 * src/main.c: Include muscle_tab.h.
17452 (main): Call muscle_init ().
17453 * src/Makefile.am (bison_SOURCES): Echo modifications.
17454
17455 2001-09-02 Marc Autret <autret_m@epita.fr>
17456
17457 Now the files macro_tab.[ch] are named muscle_tab.[ch].
17458
17459 * src/muscle_tab.c, src/muscle_tab.h: Add files.
17460
17461 2001-09-02 Marc Autret <autret_m@epita.fr>
17462
17463 * src/macrotab.c, src/macrotab.h: Remove.
17464
17465 2001-09-01 Pascal Bart <pascal.bart@epita.fr>
17466
17467 * src/reader.c (copy_guard): Use muscle to specify the `#line'
17468 filename.
17469
17470 2001-09-01 Marc Autret <autret_m@epita.fr>
17471
17472 * tests/calc.at (exp): Now, YYERROR_VERBOSE need to be set
17473 to an explicit value to activate the feature. We do it here.
17474
17475 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
17476
17477 * src/output.c (prepare): Delete the `filename' muscule insertion.
17478 * src/reader.c (copy_action): Use `filename' muscule with `#line'.
17479 (parse_union_decl): Likewise.
17480 * src/macrotab.c (macro_init): Initialize filename by infile.
17481
17482 2001-08-31 Marc Autret <autret_m@epita.fr>
17483
17484 * src/bison.simple (YYLSP_NEEDED): New definition.
17485 * src/output.c (prepare): Add macro insertion of `locations_flag'
17486
17487 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
17488
17489 * src/output.c (prepare): Delete insertion of previous muscles,
17490 and insert the `prefix' muscles.
17491 * src/macrotab.c (macro_init): Likewise.
17492 (macro_init): Initialization prefix directive by `yy'.
17493 * src/bison.simple: Substitute all %%yylex, %%yychar, %%yylval,
17494 %%yydebug, %%yyerror, %%yynerrs and %%yyparse by yylex, yychar,
17495 yylval, yydebug, yyerror, yynerrs and yyparse.
17496 New directive `#define' to substitute yydebug, ... with option
17497 name_prefix.
17498
17499 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
17500
17501 * src/main.c (main): Standardize.
17502 * src/output.c (output_table_data, output_parser): Likewise.
17503 * src/macrotab.h, src/macrotab.c, src/bison.simple: Likewise.
17504
17505 2001-08-31 Pascal Bart <pascal.bart@epita.fr>, Marc Autret <autret_m@epita.fr>
17506
17507 * src/reader.c (read_additionnal_code): Rename %%user_code to
17508 %%epilogue.
17509 * src/output.c (output): Rename %%declarations to %%prologue.
17510 * src/bison.simple: Echo modifications.
17511
17512 2001-08-31 Marc Autret <autret_m@epita.fr>
17513
17514 * src/reader.c (readgram): CleanUp.
17515 (output_token_defines): Likewise.
17516 (packsymbols): Likewise.
17517 (reader): Likewise.
17518 * src/output.c (output): CPP-out useless code.
17519
17520 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
17521
17522 * src/reader.c (reader): Delete obsolete call to function
17523 output_trailers and output_headers.
17524 * src/output.h: Remove obsolete functions prototypes of output_headers
17525 and output_trailers.
17526
17527 2001-08-30 Pascal Bart <pascal.bart@epita.fr>
17528
17529 * src/main.c: Include macrotab.h.
17530 * src/macrotab.h (macro_entry_s): Constify fields.
17531 Adjust functions prototypes.
17532 * src/macrotab.c (macro_insert): Constify key and value.
17533 (macro_find): Constify key.
17534 (macro_insert): Include 'xalloc.h'
17535 (macro_insert): Use XMALLOC.
17536 (macro_find): Constify return value.
17537 * src/output.c (output_table_data): Rename table to table_data.
17538 (output_parser): Constify macro_key, macro_value.
17539
17540 2001-08-30 Marc Autret <autret_m@epita.fr>
17541
17542 * src/reader.c (parse_skel_decl): New.
17543 (read_declarations): Add case `tok_skel', call parse_skel_decl ().
17544 * src/lex.h (token_t): New token `tok_skel'.
17545 * src/lex.c (percent_table): Add skeleton option entry.
17546 Standardize.
17547
17548 2001-08-29 Marc Autret <autret_m@epita.fr>
17549
17550 * src/bison.simple: Add %%user_code directive at the end.
17551 * src/reader.c (read_additionnal_code): New.
17552 (reader): Use it.
17553 * src/output.c (output_program): Remove.
17554 (output): Update.
17555
17556 2001-08-28 Marc Autret <autret_m@epita.fr>
17557
17558 * src/output.c (output_actions): Clean up.
17559 (output_gram): CPP-out useless code.
17560 * src/reader.c (reader): Clean up, CPP-out useless code.
17561
17562 2001-08-28 Pascal Bart <pascal.bart@epita.fr>
17563
17564 * src/output.c (output): Copy attrs_obstack in the '%%definitions'
17565 directive.
17566 * src/bison.simple: Add `%%definitions'.
17567
17568 2001-08-28 Marc Autret <autret_m@epita.fr>
17569
17570 * config/depcomp: New file.
17571
17572 2001-08-27 Paul Eggert <eggert@twinsun.com>
17573
17574 * src/bison.simple (yyparse): Don't take the address of an
17575 item before the start of an array, as that doesn't conform to
17576 the C Standard.
17577
17578 2001-08-27 Robert Anisko <robert.anisko@epita.fr>
17579
17580 * src/output.c (output): Remove the initialization of the macro
17581 obstack. It was done too late here.
17582
17583 * src/reader.c (parse_macro_decl): Fix. Use of the macro obstack was
17584 completely wrong.
17585 (reader): Initialize the macro obstack here, since we need it to grow
17586 '%define' directives.
17587
17588 * src/reader.h: Declare the macro obstack as extern.
17589
17590 2001-08-27 Robert Anisko <robert.anisko@epita.fr>
17591
17592 * src/output.c (output_parser): Fix. Store single '%' characters in
17593 the output obstack instead of throwing them away.
17594
17595 2001-08-27 Akim Demaille <akim@epita.fr>
17596
17597 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
17598
17599 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
17600
17601 * lib/Makefile.am: Adjust.
17602
17603 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
17604
17605 * src/bison.simple: Update and add '%%' directives.
17606
17607 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
17608
17609 * src/reader.c (reader): Remove calls to 'output_headers' and
17610 'output_trailers'. Remove some C output.
17611 (readgram): Disable a piece of code that was writing a default
17612 definition for 'YYSTYPE'.
17613 (reader_output_yylsp): Remove.
17614 (packsymbols): Output token defintions to a macro.
17615 (copy_definition): Disable C output.
17616
17617 * src/reader.c (parse_macro_decl): New function used to parse macro
17618 declarations.
17619 (copy_string2): Put the body of copy_string into this new function.
17620 Add a parameter to let the caller choose whether he wants to copy the
17621 string delimiters or not.
17622 (copy_string): Be a simple call to copy_string2 with the last argument
17623 bound to true.
17624 (read_declarations): Add case for macro definition.
17625 (copy_identifier): New.
17626 (parse_macro_decl): Read macro identifiers using copy_identifier
17627 rather than lex.
17628
17629 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
17630
17631 * src/output.c (prepare): Add prefixed names.
17632 (output_parser): Output semantic actions.
17633 (output_parser): Fix bug on '%%line' directives.
17634
17635 * src/output.c (output_headers): Remove. The C code printed by this
17636 function should now be in the skeletons.
17637 (output_trailers): Remove.
17638 (output): Disable call to 'reader_output_yylsp'.
17639 (output_rule_data): Do not output tables to the table obstack.
17640
17641 * src/output.c: Remove some C dedicated output.
17642 Improve the use of macro and output obstacks.
17643 (output_defines): Remove.
17644
17645 * src/output.c (output_token_translations): Associate 'translate'
17646 table with a macro. No output to the table obstack.
17647 (output_gram): Same for 'rhs' and 'prhs'.
17648 (output_stos): Same for 'stos'.
17649 (output_rule_data): Same for 'r1' and 'r2'.
17650 (token_actions): Same for 'defact'.
17651 (goto_actions): Same for 'defgoto'.
17652 (output_base): Same for 'pact' and 'pgoto'.
17653 (output_table): Same for 'table'.
17654 (output_check): Same for 'check'.
17655
17656 * src/output.c (output_table_data): New function.
17657 (output_short_table): Remove.
17658 (output_short_or_char_table): Remove.
17659
17660 * src/output.c (output_parser): Replace most of the skeleton copy code
17661 with something new. Skeletons are now processed character by character
17662 rather than line by line, and Bison looks for '%%' macros. This is the
17663 first step in making Bison's output process (a lot) more flexible.
17664 (output_parser): Use the macro table.
17665
17666 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
17667
17668 * src/main.c (main): Initialize the macro table.
17669
17670 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
17671
17672 * src/lex.c (percent_table): Add tok_define.
17673 * src/lex.h: Add tok_define.
17674
17675 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
17676
17677 * src/macrotab.c: New file.
17678 * src/macrotab.h: New file.
17679 * src/Makefile.am: Update.
17680
17681 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
17682
17683 * lib/hash.c: New file.
17684 * lib/hash.h: New file.
17685 * lib/Makefile.am: Update.
17686
17687 2001-08-15 Akim Demaille <akim@epita.fr>
17688
17689 Version 1.28c.
17690
17691 2001-08-15 Marc Autret <autret_m@epita.fr>
17692
17693 * src/reader.c (readgram): Indent output macro YYSTYPE.
17694 (packsymbols): Likewise.
17695 (output_token_defines): Likewise.
17696 * src/files.c: Standardize.
17697 (compute_header_macro): New.
17698 (defines_obstack_save): New. Use compute_header_macro.
17699 (output_files): Update. Use defines_obstack_save.
17700
17701 2001-08-15 Akim Demaille <akim@epita.fr>
17702
17703 * doc/bison.texinfo (Table of Symbols): Document
17704 YYSTACK_USE_ALLOCA.
17705
17706 2001-08-15 Akim Demaille <akim@epita.fr>
17707
17708 * missing: Update from CVS Automake.
17709 * config/config.guess, config/config.sub, config/texinfo.tex:
17710 Update from gnu.org.
17711
17712 2001-08-15 Akim Demaille <akim@epita.fr>
17713
17714 * Makefile.maint: Sync with CVS Autoconf.
17715
17716 2001-08-14 Pascal Bart <pascal.bart@epita.fr>
17717
17718 * doc/bison.texinfo: Include GNU Free Documentation License from
17719 `fdl.texi'.
17720 * doc/fdl.texi: Add to package.
17721
17722 2001-08-14 Marc Autret <autret_m@epita.fr>
17723
17724 Turn on %{source,header}_extension features.
17725
17726 * src/lex.c (percent_table): Un-CPP out header_extension and
17727 source_extension.
17728 * src/files.c (compute_exts_from_gf): Compare pointers with NULL.
17729 (compute_exts_from_src): Remove conditions. It restores priorities
17730 between options.
17731
17732 2001-08-14 Marc Autret <autret_m@epita.fr>
17733
17734 * src/files.c (compute_base_names): Add extensions computing when
17735 `--file-prefix' used.
17736 Standardize function calls.
17737
17738 2001-08-13 Marc Autret <autret_m@epita.fr>
17739
17740 * src/bison.simple (YYSTACK_USE_ALLOCA): Changed to allow users
17741 defining it (defined but null disables alloca).
17742
17743 2001-08-13 Marc Autret <autret_m@epita.fr>
17744
17745 * src/bison.simple (_yy_memcpy): CPP reformat.
17746
17747 2001-08-13 Pascal Bart <pascal.bart@epita.fr>
17748
17749 * tests/atconfig.in (CPPFLAGS): Fix.
17750
17751 2001-08-10 Pascal Bart <pascal.bart@epita.fr>
17752
17753 * doc/bison.texinfo: Include GNU General Public License from
17754 `gpl.texi'.
17755 * doc/gpl.texi: Add to package.
17756
17757 2001-08-10 Marc Autret <autret_m@epita.fr>
17758
17759 * src/print_graph.h: Fix.
17760 * src/reader.c (read_declarations): Use parse_header_extension_decl ().
17761
17762 2001-08-10 Akim Demaille <akim@epita.fr>
17763
17764 * src/system.h: Provide default declarations for stpcpy, strndup,
17765 and strnlen.
17766
17767 2001-08-10 Robert Anisko <anisko_r@epita.fr>
17768
17769 * doc/bison.texinfo (Locations): Update @$ stuff.
17770
17771 2001-08-09 Robert Anisko <anisko_r@epita.fr>
17772
17773 * src/bison.simple (YYLLOC_DEFAULT): Update.
17774 (yyparse): Adjust.
17775
17776 2001-08-08 Marc Autret <autret_m@epita.fr>
17777
17778 * doc/bison.texinfo: Change @samp{$<@dots{}>} to
17779 @samp{$<@dots{}>@var{n}} in Section Actions in Mid-Rule.
17780 Reported by Fabrice Bauzac.
17781
17782 2001-08-08 Marc Autret <autret_m@epita.fr>
17783
17784 * src/vcg_default.h: Use NULL instead of 0 to initialize pointers.
17785 * src/vcg.c (output_node): Fix.
17786 * src/vcg.h: Cleanup.
17787 * src/print_graph.c: Add comments.
17788 (node_output_size): New global variable. Simplify the formatting of
17789 the VCG graph output.
17790 (print_actions): Unused code is now used. It notifies the final state
17791 and no action states in the VCG graph. It also give the reduce actions.
17792 The `shift and goto' edges are red and the `go to state' edges are
17793 blue.
17794 Get the current node name and node_obstack by argument.
17795 (node_obstack): New variable.
17796 (print_state): Manage node_obstack.
17797 (print_core): Use node_obstack given by argument.
17798 A node is not only computed here but in print_actions also.
17799 (print_graph): CPP out useless code instead of commenting it.
17800
17801 2001-08-07 Pascal Bart <pascal.bart@epita.fr>
17802
17803 * tests/atconfig.in (CPPFLAGS): Fix.
17804
17805 2001-08-07 Akim Demaille <akim@epita.fr>
17806
17807 * src/print_graph.c (quote): New.
17808 (print_core): Use it.
17809
17810 2001-08-06 Akim Demaille <akim@epita.fr>, Marc Autret <autret_m@epita.fr>
17811
17812 * src/vcg.c (complain.h): Include it.
17813 Unepitaize `return' invocations.
17814 [NDEBUG] (main): Remove.
17815 * src/vcg.h (node_t, edge_t, graph_t): Constify the char * members.
17816 * src/files.c (open_files): Initialize graph_obstack.
17817 * src/print_graph.c (print_actions): CPP out useless code.
17818 (print_core): Don't output the last `\n' in labels.
17819 Use `quote'.
17820 * src/files.c (output_files): Output the VCG file.
17821 * src/main.c (main): Invoke print_graph ();
17822
17823 2001-08-06 Marc Autret <autret_m@epita.fr>
17824
17825 Automaton VCG graph output.
17826 Using option ``-g'' or long option ``--graph'', you can generate
17827 a gram_filename.vcg file containing a VCG description of the LALR (1)
17828 automaton of your grammar.
17829
17830 * src/main.c: Call to print_graph() function.
17831 * src/getargs.h: Update.
17832 * src/getargs.c (options): Update to catch `-g' and `--graph' options.
17833 (graph_flag): New flag.
17834 (longopts): Update.
17835 (getargs): Add case `g'.
17836 * src/files.c (graph_obstack): New obstack struct.
17837 (open_files): Initialize new obstack.
17838 (output_files): Saves graph_obstack if required.
17839 * src/files.h (graph_obstack): New extern declaration.
17840 * src/Makefile.am: Add new source files.
17841
17842 2001-08-06 Marc Autret <autret_m@epita.fr>
17843
17844 * src/print_graph.c, src/print_graph.h (graph): New.
17845 * src/vcg.h: New file.
17846 * src/vcg.c: New file, VCG graph handling.
17847
17848 2001-08-06 Marc Autret <autret_m@epita.fr>
17849
17850 Add of %source_extension and %header_extension which specify
17851 the source or/and the header output file extension.
17852
17853 * src/files.c (compute_base_names): Remove initialisation of
17854 src_extension and header_extension.
17855 (compute_exts_from_gf): Update.
17856 (compute_exts_from_src): Update.
17857 (output_files): Update.
17858 * src/reader.c (parse_header_extension_decl): New.
17859 (parse_source_extension_decl): New.
17860 (read_declarations): New case statements for the new tokens.
17861 * src/lex.c (percent_table): Add entries for %source_extension
17862 and %header_extension.
17863 * src/lex.h (token_e): New tokens tok_hdrext and tok_srcext.
17864
17865 2001-08-06 Marc Autret <autret_m@epita.fr>
17866
17867 * configure.in: Bump to 1.28c.
17868 * doc/bison.texinfo: Texinfo thingies.
17869
17870 2001-08-04 Pascal Bart <pascal.bart@epita.fr>
17871
17872 * tests/atconfig.in (CPPFLAGS): Add.
17873 * tests/calc.at (AT_CHECK): Use CPPFLAGS.
17874
17875 2001-08-03 Akim Demaille <akim@epita.fr>
17876
17877 Version 1.28b.
17878
17879 2001-08-03 Akim Demaille <akim@epita.fr>
17880
17881 * tests/Makefile.am (check-local): Ship testsuite.
17882 * tests/calc.at (_AT_DATA_CALC_Y): Prototype all the functions.
17883 Include `string.h'.
17884
17885 2001-08-03 Akim Demaille <akim@epita.fr>
17886
17887 * configure.in: Try using -Wformat when compiling.
17888
17889 2001-08-03 Akim Demaille <akim@epita.fr>
17890
17891 * configure.in: Bump to 1.28b.
17892
17893 2001-08-03 Akim Demaille <akim@epita.fr>
17894
17895 * src/complain.c: Adjust strerror_r portability issues.
17896
17897 2001-08-03 Akim Demaille <akim@epita.fr>
17898
17899 Version 1.28a.
17900
17901 2001-08-03 Akim Demaille <akim@epita.fr>
17902
17903 * src/getargs.c, src/getarg.h (skeleton)): Constify.
17904 * src/lex.c (literalchar): Avoid name clashes on `buf'.
17905 * src/getargs.c: Include complain.h.
17906 * src/files.c, src/files.h (skeleton_find): Avoid name clashes.
17907 * lib/quotearg.c, lib/quotearg.h: Update from fileutils 4.1.
17908
17909 2001-08-03 Akim Demaille <akim@epita.fr>
17910
17911 * src/reader.c (readgram): Display hidden chars in error messages.
17912
17913 2001-08-03 Akim Demaille <akim@epita.fr>
17914
17915 Update to gettext 0.10.39.
17916
17917 2001-08-03 Akim Demaille <akim@epita.fr>
17918
17919 * lib/strspn.c: New.
17920
17921 2001-08-01 Marc Autret <autret_m@epita.fr>
17922
17923 * doc/bison.texinfo: Update.
17924 * doc/bison.1 (mandoc): Update.
17925 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove .c and .h.
17926 * src/files.c: Support output files extensions computing.
17927 (src_extension): New static variable.
17928 (header_extension): New static variable.
17929 (tr): New function.
17930 (get_extension_index): New function, gets the index of an extension
17931 filename in a string.
17932 (compute_exts_from_gf): New function, computes extensions from the
17933 grammar file extension.
17934 (compute_exts_from_src): New functions, computes extensions from the
17935 C source file extension, file given by ``-o'' option.
17936 (compute_base_names): Update.
17937 (output_files): Update.
17938
17939 2001-08-01 Robert Anisko <anisko_r@epita.fr>
17940
17941 * doc/bison.texi: Document @$.
17942 (Locations): New section.
17943
17944 2001-07-18 Akim Demaille <akim@epita.fr>
17945
17946 * Makefile.maint, GNUmakefile: New, from Autoconf 2.52.
17947 * config/prev-version.txt, config/move-if-change: New.
17948 * Makefile.am: Adjust.
17949
17950 2001-07-08 Pascal Bart <pascal.bart@epita.fr>
17951
17952 * src/bison.simple (yyparse): Suppress warning `comparaison
17953 between signed and unsigned'.
17954
17955 2001-07-05 Pascal Bart <pascal.bart@epita.fr>
17956
17957 * src/getargs.h (raw_flag): Remove.
17958 * src/getargs.c: Die on `-r'/`--raw'.
17959 * src/lex.c (parse_percent_token): Die on `%raw'.
17960 * src/reader.c (output_token_defines): Suppress call to `raw_flag'.
17961 * tests/calc.at: Suppress test with option `--raw'.
17962
17963 2001-07-14 Akim Demaille <akim@epita.fr>
17964
17965 * config/: New.
17966 * configure.in: Require Autoconf 2.50.
17967 Update to gettext 0.10.38.
17968
17969 2001-03-16 Akim Demaille <akim@epita.fr>
17970
17971 * doc/bison.texinfo: ANSIfy the examples.
17972
17973 2001-03-16 Akim Demaille <akim@epita.fr>
17974
17975 * getargs.c (skeleton): New variable.
17976 (longopts): --skeleton is a new option.
17977 (shortopts, getargs): -S is a new option.
17978 * getargs.h: Declare skeleton.
17979 * output.c (output_parser): Use it.
17980
17981 2001-03-16 Akim Demaille <akim@epita.fr>
17982
17983 * m4/strerror_r.m4: New.
17984 * m4/error.m4: Run AC_FUNC_STRERROR_R.
17985 * lib/error.h, lib/error.c: Update.
17986
17987 2001-03-16 Akim Demaille <akim@epita.fr>
17988
17989 * src/getargs.c (longopts): Clean up.
17990
17991 2001-02-21 Akim Demaille <akim@epita.fr>
17992
17993 * src/reader.c (gensym): `gensym_count' is your own.
17994 Use a static buf to create the symbol name, as token_buffer is no
17995 longer a buffer.
17996
17997 2001-02-08 Akim Demaille <akim@epita.fr>
17998
17999 * src/conflicts.c (conflict_report): Be sure not to append to res
18000 between two calls, which could happen if both first sprintf were
18001 skipped, but not the first cp += strlen.
18002
18003 2001-02-08 Akim Demaille <akim@epita.fr>
18004
18005 * lib/memchr.c, lib/stpcpy.c, lib/strndup.c, lib/strnlen.c:
18006 New, from fileutils 4.0.37.
18007 * configure.in: Require Autoconf 2.49c. I took some time before
18008 making this decision. This is the only way out for portability
18009 issues in Bison, it would mean way too much duplicate effort to
18010 import in Bison features implemented in 2.49c since 2.13.
18011 AC_REPLACE_FUNCS and AC_CHECK_DECLS the functions above.
18012
18013 2001-02-02 Akim Demaille <akim@epita.fr>
18014
18015 * lib/malloc.c, lib/realloc.c: New, from the fileutils 4.0.37.
18016 * lib/xalloc.h, lib/xmalloc.c: Update.
18017
18018 2001-01-19 Akim Demaille <akim@epita.fr>
18019
18020 Get rid of the ad hoc handling of token_buffer in the scanner: use
18021 the obstacks.
18022
18023 * src/lex.c (token_obstack): New.
18024 (init_lex): Initialize it. No longer call...
18025 (grow_token_buffer): this. Remove it.
18026 Adjust all the places which used it to use the obstack.
18027
18028 2001-01-19 Akim Demaille <akim@epita.fr>
18029
18030 * src/lex.h: Rename all the tokens:
18031 s/\bENDFILE\b/tok_eof/g;
18032 s/\bIDENTIFIER\b/tok_identifier/g;
18033 etc.
18034 Let them be enums, not #define, to ease debugging.
18035 Adjust all the code.
18036
18037 2001-01-18 Akim Demaille <akim@epita.fr>
18038
18039 * src/lex.h (MAXTOKEN, maxtoken, grow_token_buffer): Remove, private.
18040 * src/lex.c (maxtoken, grow_token_buffer): Static.
18041
18042 2001-01-18 Akim Demaille <akim@epita.fr>
18043
18044 Since we now use obstacks, more % directives can be enabled.
18045
18046 * src/lex.c (percent_table): Also accept `%yacc',
18047 `%fixed_output_files', `%defines', `%no_parser', `%verbose', and
18048 `%debug'.
18049 Handle the actions for `%semantic_parser' and `%pure_parser' here,
18050 instead of returning a token.
18051 * src/lex.h (SEMANTIC_PARSER, PURE_PARSER): Remove, unused.
18052 * src/reader.c (read_declarations): Adjust.
18053 * src/files.c (open_files): Don't call `compute_base_names', don't
18054 compute `attrsfile' since they depend upon data which might be
18055 *in* the input file now.
18056 (output_files): Do it here.
18057 * src/output.c (output_headers): Document the fact that this patch
18058 introduces a guaranteed SEGV for semantic parsers.
18059 * doc/bison.texinfo: Document them.
18060 * tests/suite.at: Exercise these %options.
18061
18062 2000-12-20 Akim Demaille <akim@epita.fr>
18063
18064 Also handle the output file (--verbose) with obstacks.
18065
18066 * files.c (foutput): Remove.
18067 (output_obstack): New.
18068 Adjust all dependencies.
18069 * src/conflicts.c: Return a string.
18070 * src/system.h (obstack_grow_string): Rename as...
18071 (obstack_sgrow): this. Be ready to work with non literals.
18072 (obstack_fgrow4): New.
18073
18074 2000-12-20 Akim Demaille <akim@epita.fr>
18075
18076 * src/files.c (open_files): Fix the computation of short_base_name
18077 in the case of `-o foo.tab.c'.
18078
18079 2000-12-20 Akim Demaille <akim@epita.fr>
18080
18081 * src/reader.c (copy_string, copy_comment, copy_comment2, copy_at)
18082 (copy_dollar): Now that everything uses obstacks, get rid of the
18083 FILE * parameters.
18084
18085 2000-12-20 Akim Demaille <akim@epita.fr>
18086
18087 * src/files.c (open_files): Actually the `.output' file is based
18088 on the short_base_name, not base_name.
18089 * tests/suite.at (Checking output file names): Adjust.
18090
18091 2000-12-20 Akim Demaille <akim@epita.fr>
18092
18093 * src/bison.s1: Remove, we now use directly...
18094 * src/bison.simple: this.
18095 * src/Makefile.am: Use pkgdata instead of data.
18096
18097 2000-12-20 Akim Demaille <akim@epita.fr>
18098
18099 * src/files.c (guard_obstack): New.
18100 (open_files): Initialize it.
18101 (output_files): Dump it...
18102 * src/files.h: Export it.
18103 * src/reader.c (copy_guard): Use it.
18104
18105 2000-12-19 Akim Demaille <akim@epita.fr>
18106
18107 * src/files.c (outfile, defsfile, actfile): Removed as global
18108 vars.
18109 (open_files): Don't compute them.
18110 (output_files): Adjust.
18111 (base_name, short_base_name): Be global.
18112 Adjust dependencies.
18113
18114 2000-12-19 Akim Demaille <akim@epita.fr>
18115
18116 * src/files.c (strsuffix): New.
18117 (stringappend): Be just like strcat but allocate.
18118 (base_names): Eve out from open_files.
18119 Try to simplify the rather hairy computation of base_name and
18120 short_base_name.
18121 (open_files): Use it.
18122 * tests/suite.at (Checking output file names): New test.
18123
18124 2000-12-19 Akim Demaille <akim@epita.fr>
18125
18126 * src/system.h (obstack_grow_literal_string): Rename as...
18127 (obstack_grow_string): this.
18128 * src/output.c (output_parser): Recognize `%% actions' instead of
18129 `$'.
18130 * src/bison.s1: s/$/%% actions/.
18131 * src/bison.hairy: Likewise.
18132
18133 2000-12-19 Akim Demaille <akim@epita.fr>
18134
18135 * src/output.c (output_parser): Compute the `#line' lines when
18136 there are.
18137 * src/Makefile.am (bison.simple): Be a simple copy of bison.s1.
18138 Suggested by Hans Aberg.
18139
18140 2000-12-19 Akim Demaille <akim@epita.fr>
18141
18142 Let the handling of the skeleton files be local to the procedures
18143 that use it.
18144
18145 * src/files.c (xfopen, xfclose, skeleton_find, guardfile): No
18146 longer static.
18147 (fparser, open_extra_files): Remove.
18148 (open_files, output_files): Don't take care of fparser.
18149 * src/files.h: Adjust.
18150 * src/output.c (output_parser): Open and close the file to the
18151 skeleton.
18152 * src/reader.c (read_declarations): When %semantic_parser, open
18153 fguard.
18154
18155 2000-12-19 Akim Demaille <akim@epita.fr>
18156
18157 * src/file.h (BISON_SIMPLE, BISON_HAIRY): Move from here...
18158 * src/system.h (BISON_SIMPLE, BISON_HAIRY): ... to here.
18159
18160 2000-12-19 Akim Demaille <akim@epita.fr>
18161
18162 * src/files.c (open_files): Yipee! We no longer need all the code
18163 looking for `/tmp' since we have no tmp file.
18164
18165 2000-12-19 Akim Demaille <akim@epita.fr>
18166
18167 * src/system.h (EXT_TAB, EXT_OUTPUT, EXT_STYPE_H, EXT_GUARD_C):
18168 New macros.
18169 * src/files.c (open_files): Less dependency on MSDOS etc.
18170
18171 2000-12-14 Akim Demaille <akim@epita.fr>
18172
18173 * src/bison.s1 (YYLLOC_DEFAULT): New macro.
18174 Provide a default definition.
18175 Use it when executing the default @ action.
18176 * src/reader.c (reader_output_yylsp): No longer include
18177 `timestamp' and `text' in the default YYLTYPE.
18178
18179 2000-12-12 Akim Demaille <akim@epita.fr>
18180
18181 * src/reader.c (copy_definition, parse_union_decl, copy_action)
18182 (copy_guard): Quote the file names.
18183 Reported by Laurent Mascherpa.
18184
18185 2000-12-12 Akim Demaille <akim@epita.fr>
18186
18187 * src/output.c (output_headers, output_program, output): Be sure
18188 to escape special characters when outputting filenames.
18189 (ACTSTR_PROLOGUE, ACTSTR_EPILOGUE): Remove.
18190 (output_headers): Don't depend on them, Use ACTSTR.
18191
18192 2000-11-17 Akim Demaille <akim@epita.fr>
18193
18194 * lib/obstack.h: Formatting changes.
18195 (obstack_grow, obstack_grow0): Don't cast WHERE at all: it
18196 prevents type checking.
18197 (obstack_ptr_grow, obstack_ptr_grow_fast): When assigning, don't
18198 cast the value to (void *): assigning a `foo *' to a `void *'
18199 variable is valid.
18200 (obstack_int_grow, obstack_int_grow_fast): Don't cast AINT to int.
18201 * src/reader.c (parse_union_decl): Typo: use obstack_1grow to
18202 append characters.
18203
18204 2000-11-17 Akim Demaille <akim@epita.fr>
18205
18206 * tests/Makefile.am (suite.m4, regression.m4, calc.m4): Rename
18207 as...
18208 (suite.m4, regression.m4, calc.m4): these.
18209 * tests/atgeneral.m4: Update from CVS Autoconf.
18210
18211 2000-11-17 Akim Demaille <akim@epita.fr>
18212
18213 * tests/regression.m4 (%union and --defines): New test,
18214 demonstrating a current bug in the obstack implementation.
18215
18216 2000-11-17 Akim Demaille <akim@epita.fr>
18217
18218 * src/bison.s1 (_YY_DECL_VARIABLES, YY_DECL_VARIABLES): New
18219 macros.
18220 Use them to declare the variables which are global or local to
18221 `yyparse'.
18222
18223 2000-11-17 Akim Demaille <akim@epita.fr>
18224
18225 * acconfig.h: Remove, no longer used.
18226
18227 2000-11-07 Akim Demaille <akim@epita.fr>
18228
18229 * src: s/Copyright (C)/Copyright/g.
18230
18231 2000-11-07 Akim Demaille <akim@epita.fr>
18232
18233 * src/reader.c (reader): #define YYLSP_NEEDED to 1 instead of just
18234 defining.
18235 * src/bison.s1: s/#ifdef YYLSP_NEEDED/#if YYLSP_NEEDED/.
18236
18237 2000-11-07 Akim Demaille <akim@epita.fr>
18238
18239 * src/bison.s1 (YYLEX): Use #if instead of #ifdef.
18240 Merge in a single CPP if/else.
18241
18242 2000-11-07 Akim Demaille <akim@epita.fr>
18243
18244 * src/output.c (output): Remove useless variables.
18245 * lib/obstack.c (obstack_grow, obstack_grow0): Rename the second
18246 argument `data' for consistency with the prototypes.
18247 Qualify it `const'.
18248 (obstack_copy, obstack_copy0): Rename the second argument as
18249 `address' for consistency. Qualify it `const'.
18250 * lib/obstack.h (obstack_copy, obstack_copy0, obstack_grow)
18251 (obstack_grow0, obstack_ptr_grow, obstack_ptr_grow_fast): Qualify
18252 `const' their input argument (`data' or `address').
18253 Adjust the corresponding macros to include `const' in casts.
18254
18255 2000-11-03 Akim Demaille <akim@epita.fr>
18256
18257 * src/Makefile.am (INCLUDES): s/PFILE/BISON_SIMPLE/.
18258 s/PFILE1/BISON_HAIRY/.
18259 Adjust dependencies.
18260
18261 2000-11-03 Akim Demaille <akim@epita.fr>
18262
18263 For some reason, this was not applied.
18264
18265 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
18266 `unlink': it's no longer used.
18267
18268 2000-11-03 Akim Demaille <akim@epita.fr>
18269
18270 * src/files.c (skeleton_find): New function, eved out of...
18271 (open_files, open_extra_files): here.
18272
18273 2000-11-03 Akim Demaille <akim@epita.fr>
18274
18275 Don't use `atexit'.
18276
18277 * src/files.c (obstack_save): New function.
18278 (done): Rename as...
18279 (output_files): this.
18280 Use `obstack_save'.
18281 * src/main.c (main): Don't use `atexit' to register `done', since
18282 it no longer has to remove tmp files, just call `output_files'
18283 when there are no errors.
18284
18285 2000-11-02 Akim Demaille <akim@epita.fr>
18286
18287 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
18288 `unlink': it's no longer used.
18289 * src/files.h: Formatting changes.
18290
18291 2000-11-02 Akim Demaille <akim@epita.fr>
18292
18293 Remove the last uses of mktemp and unlink/delete.
18294
18295 * src/files.c (fdefines, ftable): Removed.
18296 (defines_ostack, table_obstack): New.
18297 Adjust dependencies of the former into uses of the latter.
18298 * src/output.c (output_short_or_char_table, output_short_table):
18299 Convert to using obstacks.
18300 * src/reader.c (copy_comment2): Accept one FILE * and two
18301 obstacks.
18302 (output_token_defines, reader_output_yylsp): Use obstacks.
18303 * src/system.h (obstack_fgrow3): New.
18304 * po/POTFILES.in: Adjust.
18305
18306 2000-11-01 Akim Demaille <akim@epita.fr>
18307
18308 Change each use of `fattrs' into a use of `attrs_obstack'.
18309
18310 * src/reader.c (copy_at): Typo: s/yylloc/yyloc/.
18311 * src/files.c (fattrs): Remove.
18312 (attrs_obstack): New.
18313 Adjust all dependencies.
18314 (done): If SEMANTIC_PARSER, dump attrs_obstack into attrsfile.
18315
18316 2000-11-01 Akim Demaille <akim@epita.fr>
18317
18318 Introduce obstacks.
18319 Change each use of `faction' into a use of `action_obstack'.
18320
18321 * lib/obstack.h, lib/obstack.c: New files.
18322 * src/files.c (faction): Remove.
18323 (action_obstack): New.
18324 Adjust all dependencies.
18325
18326 2000-10-20 Akim Demaille <akim@epita.fr>
18327
18328 * lib/quote.h (PARAMS): New macro. Use it.
18329
18330 2000-10-16 Akim Demaille <akim@epita.fr>
18331
18332 * src/output.c (output_short_or_char_table): New function.
18333 (output_short_table, output_token_translations): Use it.
18334 (goto_actions): Use output_short_table.
18335
18336 2000-10-16 Akim Demaille <akim@epita.fr>
18337
18338 * src/symtab.c (bucket_new): New function.
18339 (getsym): Use it.
18340
18341 * src/output.c (output_short_table): New argument to display the
18342 comment associated with the table.
18343 Adjust dependencies.
18344 (output_gram): Use it.
18345 (output_rule_data): Nicer output layout for YYTNAME.
18346
18347 2000-10-16 Akim Demaille <akim@epita.fr>
18348
18349 * src/lex.c (read_typename): New function.
18350 (lex): Use it.
18351 * src/reader.c (copy_dollar): Likewise.
18352
18353 2000-10-16 Akim Demaille <akim@epita.fr>
18354
18355 * src/reader.c (copy_comment2): Expect the input stream to be on
18356 the `/' which is suspected to open a comment, instead of being
18357 called after `//' or `/*' was read.
18358 (copy_comment, copy_definition, parse_union_decl, copy_action)
18359 (copy_guard): Adjust.
18360
18361 2000-10-16 Akim Demaille <akim@epita.fr>
18362
18363 * src/reader.c (parse_expect_decl): Use `skip_white_space' and
18364 `read_signed_integer'.
18365
18366 2000-10-16 Akim Demaille <akim@epita.fr>
18367
18368 * src/reader.c (copy_dollar): New function.
18369 (copy_guard, copy_action): Use it.
18370
18371 2000-10-16 Akim Demaille <akim@epita.fr>
18372
18373 * lib/quote.h, lib/quote.c, lib/quotearg.h, lib/quotearg.c:
18374 * m4/prereq.m4, m4/c-bs-a.m4, m4/mbstate.m4:
18375 New files, from Fileutils 4.0.27.
18376 * src/main.c (printable_version): Remove.
18377 * src/lex.c, src/reader.c: Use `quote'.
18378
18379 2000-10-04 Akim Demaille <akim@epita.fr>
18380
18381 * lib/error.c, lib/error.h: New files, needed by xmalloc.c.
18382
18383 2000-10-04 Akim Demaille <akim@epita.fr>
18384
18385 * doc/bison.texinfo: Various typos spotted by Neil Booth.
18386
18387 2000-10-04 Akim Demaille <akim@epita.fr>
18388
18389 When a literal string is used to define two different tokens,
18390 `bison -v' segfaults.
18391 Reported by Piotr Gackiewicz, and fixed by Neil Booth.
18392
18393 * tests/regression.m4: New file.
18394 Include the core of the sample provided by Piotr Gackiewicz.
18395 * src/reader.c (parse_token_decl): Diagnose bad cases, and proceed
18396 properly.
18397
18398 2000-10-04 Akim Demaille <akim@epita.fr>
18399
18400 * src/reader.c (parse_expect_decl): Keep `count' within the size
18401 of `buffer'.
18402 From Neil Booth.
18403
18404 2000-10-02 Paul Eggert <eggert@twinsun.com>
18405
18406 * bison.s1 (yyparse): Assign the default value
18407 unconditionally, to avoid a GCC warning and make the parser a
18408 tad smaller.
18409
18410 2000-10-02 Akim Demaille <akim@epita.fr>
18411
18412 * src/getargs.c (getargs): Don't dump `--help' on unrecognized
18413 options.
18414
18415 2000-10-02 Akim Demaille <akim@epita.fr>
18416
18417 * src/derives.c, src/print.c, src/reduce.c: To ease the
18418 translation, move some `\n' out of the translated strings.
18419
18420 2000-10-02 Akim Demaille <akim@epita.fr>
18421
18422 The location tracking mechanism is precious for parse error
18423 messages. Nevertheless, it is enabled only when `@n' is used in
18424 the grammar, which is a different issue (you can use it in error
18425 message, but not in the grammar per se). Therefore, there should
18426 be another means to enable it.
18427
18428 * src/getargs.c (getargs): Support `--locations'.
18429 (usage): Report it.
18430 * src/getargs.h (locationsflag): Export it.
18431 * src/lex.c (percent_table): Support `%locations'.
18432 * src/reader.c (yylsp_needed): Remove this variable, now replaced
18433 with `locationsflag'.
18434 * doc/bison.texinfo: Document `--locations' and `%locations'.
18435 Sort the options.
18436 * tests/calc.m4: Test it.
18437
18438 For regularity of the names, replace each
18439 (nolineflag, toknumflag, rawtokenumflag, noparserflag): with...
18440 (no_lineflag, token_tableflag, rawflag, no_parserflag): this.
18441 In addition replace each `flag' with `_flag'.
18442
18443 2000-10-02 Akim Demaille <akim@epita.fr>
18444
18445 Also test parse error messages, including with YYERROR_VERBOSE.
18446
18447 * tests/calc.m4 (calc.y): Add support for `exp = exp' (non
18448 associative).
18449 Use it to check the computations.
18450 Use it to check `nonassoc' is honored.
18451 (AT_DATA_CALC_Y): Equip `calc.y' with YYERROR_VERBOSE when passed
18452 `--yyerror-verbose'.
18453 (_AT_CHECK_CALC): Adjust to this option.
18454 (_AT_CHECK_CALC_ERROR): New macro to check parse error messages.
18455
18456 2000-10-02 Akim Demaille <akim@epita.fr>
18457
18458 Test also `--verbose', `--defines' and `--name-prefix'. Testing
18459 the latter demonstrates a flaw in the handling of non debugging
18460 parsers introduced by myself on 2000-03-16: `#define yydebug 0'
18461 was used in order to simplify:
18462
18463 #if YYDEBUG
18464 if (yydebug)
18465 {
18466 ...
18467 }
18468 #endif
18469
18470 into
18471
18472 if (yydebug)
18473 {
18474 ...
18475 }
18476
18477 unfortunately this leads to a CPP conflict when
18478 `--name-prefix=foo' is used since it produces `#define yydebug
18479 foodebug'.
18480
18481 * src/bison.s1 [!YYDEBUG]: Do not define yydebug.
18482 (YYDPRINTF): New macro.
18483 Spread its use.
18484 * tests/calc.m4 (AT_CHECK_CALC): Do require a title, build it from
18485 the bison options.
18486 Also test `--verbose', `--defines' and `--name-prefix'.
18487
18488 2000-10-02 Akim Demaille <akim@epita.fr>
18489
18490 Improve the readability of the produced parsers.
18491
18492 * src/bison.s1: Formatting changes.
18493 Improve the comment related to the `$' mark.
18494 (yydefault): Don't fall through to `yyresume': `goto' there.
18495 * src/output.c (output_parser): When the `$' is met, skip the end
18496 of its line.
18497 New variable, `number_of_dollar_signs', to check there's exactly
18498 one `$' in the parser skeleton.
18499
18500 2000-10-02 Akim Demaille <akim@epita.fr>
18501
18502 * lib/xstrdup.c: New file, from the fileutils.
18503 * src/reader.c (parse_token_decl, get_type_name, parse_type_decl)
18504 (parse_assoc_decl, parse_thong_decl, get_type): Use `xstrdup'
18505 instead of strlen + xmalloc + strcpy.
18506 * src/symtab.c (copys): Remove, use xstrdup instead.
18507
18508 2000-10-02 Akim Demaille <akim@epita.fr>
18509
18510 * src/gram.h (associativity): New enum type which replaces the
18511 former CPP macros `RIGHT_ASSOC', `LEFT_ASSOC' and `NON_ASSOC' with
18512 `right_assoc', `left_assoc' and `non_assoc'.
18513 Adjust all dependencies.
18514 * src/reader.c: Formatting changes.
18515 (LTYPESTR): Don't define it, use it as a literal in
18516 `reader_output_yylsp'.
18517 * src/symtab.h (symbol_class): New enum type which replaces the
18518 former CPP macros `SUNKNOWN', `STOKEN and `SNTERM' with
18519 `sunknown', `stoken and `snterm'.
18520
18521 2000-10-02 Akim Demaille <akim@epita.fr>
18522
18523 * src/getargs.c (fixed_outfiles): Rename as...
18524 (yaccflag): for consistency and accuracy.
18525 Adjust dependencies.
18526
18527 2000-10-02 Akim Demaille <akim@epita.fr>
18528
18529 Use the more standard files `xalloc.h' and `xmalloc.c' instead of
18530 Bison's `allocate.c' and `alloc.h'. This patch was surprisingly
18531 difficult and introduced a lot of core dump. It turns out that
18532 Bison used an implementation of `xmalloc' based on `calloc', and
18533 at various places it does depend upon the initialization to 0. I
18534 have not tried to isolate the pertinent places, and all the former
18535 calls to Bison's `xmalloc' are now using `XCALLOC'. Someday,
18536 someone should address this issue.
18537
18538 * src/allocate.c, src/alloc.h, m4/bison-decl.m4: Remove.
18539 * lib/xmalloc.c, lib/xalloc.h, m4/malloc.m4, m4/realloc.m4: New
18540 files.
18541 Adjust dependencies.
18542 * src/warshall.h: New file.
18543 Propagate.
18544
18545 2000-10-02 Akim Demaille <akim@epita.fr>
18546
18547 Various anti-`extern in *.c' changes.
18548
18549 * src/system.h: Include `assert.h'.
18550
18551 2000-10-02 Akim Demaille <akim@epita.fr>
18552
18553 * src/state.h (nstates, final_state, first_state, first_shift)
18554 (first_reduction): Move their exportation from here...
18555 * src/LR0.h: to here.
18556 Adjust dependencies.
18557 * src/getargs.c (statisticsflag): New variable.
18558 Add support for `--statistics'.
18559 Adjust dependencies.
18560
18561 Remove a lot of now useless `extern' statements in most files.
18562
18563 2000-10-02 Akim Demaille <akim@epita.fr>
18564
18565 * src/LR0.h: New file.
18566 Propagate its use.
18567
18568 2000-10-02 Akim Demaille <akim@epita.fr>
18569
18570 * src/print.h: New file.
18571 Propagate its use.
18572 * src/print.c: Formatting and ordering changes.
18573 (verbose, terse): Replace with...
18574 (print_results): this new function.
18575 Adjust dependencies.
18576
18577 2000-10-02 Akim Demaille <akim@epita.fr>
18578
18579 * src/conflicts.c (conflict_report): New function.
18580 (conflict_log, verbose_conflict_log): Replace with...
18581 (print_conflicts): this function.
18582 Adjust dependencies.
18583 * src/conflicts.h: New file.
18584 Propagate its inclusion.
18585
18586 2000-10-02 Akim Demaille <akim@epita.fr>
18587
18588 * src/nullable.h: New file.
18589 Propagate its inclusion.
18590 * src/nullable.c: Formatting changes.
18591
18592 2000-10-02 Akim Demaille <akim@epita.fr>
18593
18594 * src/reduce.h: New file.
18595 Propagate its inclusion.
18596 * src/reduce.c: Topological sort and other formatting changes.
18597 (bool, TRUE, FALSE): Move their definition to...
18598 * src/system.h: here.
18599
18600 2000-10-02 Akim Demaille <akim@epita.fr>
18601
18602 * src/files.c: Formatting changes.
18603 (tryopen, tryclose, openfiles): Rename as...
18604 (xfopen, xfclose, open_files): this.
18605 (stringappend): static.
18606 * src/files.h: Complete the list of exported symbols.
18607 Propagate its use.
18608
18609 2000-10-02 Akim Demaille <akim@epita.fr>
18610
18611 * src/reader.h: New file.
18612 Propagate its use instead of tedious list of `extern' and
18613 prototypes.
18614 * src/reader.c: Formatting changes, topological sort,
18615 s/register//.
18616
18617 2000-10-02 Akim Demaille <akim@epita.fr>
18618
18619 * src/lex.h: Prototype `lex.c' exported functions.
18620 * src/reader.c: Adjust.
18621 * src/lex.c: Formatting changes.
18622 (safegetc): Rename as...
18623 (xgetc): this.
18624
18625 2000-10-02 Akim Demaille <akim@epita.fr>
18626
18627 * src/lalr.h: New file.
18628 Propagate its inclusion instead of prototypes and `extern'.
18629 * src/lalr.c: Formatting changes, topological sorting etc.
18630
18631 2000-10-02 Akim Demaille <akim@epita.fr>
18632
18633 * src/output.c (token_actions): Introduce a temporary array,
18634 YYDEFACT, that makes it possible for this function to use
18635 output_short_table.
18636
18637 2000-10-02 Akim Demaille <akim@epita.fr>
18638
18639 `user_toknums' is output as a `short[]' in `output.c', while it is
18640 defined as a `int[]' in `reader.c'. For consistency with the
18641 other output tables, `user_toknums' is now defined as a table of
18642 shorts.
18643
18644 * src/reader.c (user_toknums): Be a short table instead of an int
18645 table.
18646 Adjust dependencies.
18647
18648 Factor the short table outputs.
18649
18650 * src/output.c (output_short_table): New function.
18651 * src/output.c (output_gram, output_stos, output_rule_data)
18652 (output_base, output_table, output_check): Use it.
18653
18654 2000-10-02 Akim Demaille <akim@epita.fr>
18655
18656 * src/output.c (output): Topological sort of the functions, in
18657 order to get rid of the `static' prototypes.
18658 No longer use `register'.
18659 * src/output.h: New file.
18660 Propagate its inclusion in files explicitly prototyping functions
18661 from output.c.
18662
18663 2000-09-21 Akim Demaille <akim@epita.fr>
18664
18665 * src/atgeneral.m4: Update from Autoconf.
18666
18667 2000-09-21 Akim Demaille <akim@epita.fr>
18668
18669 * src/closure.h: New file.
18670 * src/closure.c: Formatting changes, topological sort over the
18671 functions, use of closure.h.
18672 (initialize_closure, finalize_closure): Rename as...
18673 (new_closure, free_closure): these. Adjust dependencies.
18674 * src/LR0.c: Formatting changes, topological sort, use of
18675 cloture.h.
18676 (initialize_states): Rename as...
18677 (new_states): this.
18678 * src/Makefile.am (noinst_HEADERS): Adjust.
18679
18680 2000-09-20 Akim Demaille <akim@epita.fr>
18681
18682 * src/acconfig.h: Don't protect config.h against multiple
18683 inclusion.
18684 Don't define PARAMS.
18685 * src/system.h: Define PARAMS.
18686 Remove some of the ad-hoc CPP magic for DOS, VMS etc.: this is the
18687 purpose of config.h. system.h must not try to fix wrong
18688 definitions in config.h.
18689
18690 2000-09-20 Akim Demaille <akim@epita.fr>
18691
18692 * src/derives.h: New file.
18693 * src/main.c, src/derives.h: Use it.
18694 Formatting changes.
18695 * src/Makefile.am (noinst_HEADERS): Adjust.
18696
18697 2000-09-20 Akim Demaille <akim@epita.fr>
18698
18699 * tests/atgeneral.m4: Update from Autoconf.
18700 * tests/calc.m4 (_AT_DATA_CALC_Y, AT_DATA_CALC_Y, _AT_CHECK_CALC)
18701 (AT_CHECK_CALC): New macros.
18702 Use these macros to test bison with options `', `--raw',
18703 `--debug', `--yacc', `--yacc --debug'.
18704
18705 2000-09-19 Akim Demaille <akim@epita.fr>
18706
18707 * src/output.c: Formatting changes.
18708 * src/machine.h: Remove, leaving its contents in...
18709 * src/system.h: here.
18710 Include stdio.h.
18711 Adjust all dependencies on stdio.h and machine.h.
18712 * src/getargs.h: New file.
18713 Let all `extern' declarations about getargs.c be replaced with
18714 inclusion of `getargs.h'.
18715 * src/Makefile.am (noinst_HEADERS): Adjust.
18716
18717 * tests/calc.m4 (yyin): Be initialized in main, not on the global
18718 scope.
18719 (yyerror): Returns void, not int.
18720 * doc/bison.texinfo: Formatting changes.
18721
18722 2000-09-19 Akim Demaille <akim@epita.fr>
18723
18724 * tests/calc.m4 (calc.y): Do not assign to stdin, as it's not
18725 portable.
18726
18727 2000-09-18 Akim Demaille <akim@epita.fr>
18728
18729 * configure.in: Append WARNING_CFLAGS to CFLAGS.
18730 * src/Makefile.am (INCLUDES): Don't.
18731 Be ready to fetch headers in lib/.
18732
18733 2000-09-18 Akim Demaille <akim@epita.fr>
18734
18735 * doc/bison.texinfo: Update the copyright.
18736 ANSIfy and GNUify the examples.
18737 Remove the old menu.
18738
18739 2000-09-18 Akim Demaille <akim@epita.fr>
18740
18741 First set of tests: use the `calc' example from the documentation.
18742
18743 * src/bison.s1 (yyparse): Condition the code using `yytname' which
18744 is defined only when YYDEBUG is.
18745 * m4/atconfig.m4 (AT_CONFIG): Adjust to Autoconf 2.13.
18746 * src/files.c (tryopen, tryclose): Formatting changes.
18747 Move to the top and be static.
18748 * src/reader.c (read_signed_integer): Likewise.
18749 * tests/calc.m4: New file.
18750 * Makefile.am, suite.m4: Adjust.
18751 * m4/atconfig.m4: Set BISON_SIMPLE and BISON_HAIRY.
18752
18753 2000-09-18 Akim Demaille <akim@epita.fr>
18754
18755 Add support for an Autotest test suite for Bison.
18756
18757 * m4/m4.m4, m4/atconfig.m4: New files.
18758 * m4/Makefile.am (EXTRA_DIST): Adjust.
18759 * tests/suite.m4, tests/Makefile.am, tests/atgeneral.m4: New
18760 files.
18761 * src/getargs.c: Display a more standard --version message.
18762 * src/reader.c (reader): Formatting changes.
18763 No longer depend upon VERSION_STRING.
18764 * configure.in: No longer use `dnl'.
18765 Set up the test suite and the new directory `tests/.
18766 (VERSION_STRING): Remove.
18767
18768 2000-04-14 Akim Demaille <akim@epita.fr>
18769
18770 * src/reader.c (copy_comment2): New function, same as former
18771 `copy_comment', but outputs into two FILE *.
18772 (copy_comment): Use it.
18773 (parse_union_decl): Use it.
18774 (get_type, parse_start_decl): Use the same `invalid' message.
18775 (parse_start_decl, parse_union_decl): Use the same `multiple'
18776 message.
18777 (parse_union_decl, copy_guard, copy_action): Use the same
18778 `unmatched' message.
18779 * m4/Makefile.am (EXTRA_DIST): Add `warning.m4'.
18780
18781 2000-03-31 Akim Demaille <akim@epita.fr>
18782
18783 * src/files.c (tryopen, tryclose): Move to the top.
18784 Be static.
18785
18786 2000-03-31 Akim Demaille <akim@epita.fr>
18787
18788 * src/main.c (main): Don't call `done', exit does it.
18789
18790 2000-03-31 Akim Demaille <akim@epita.fr>
18791
18792 * allocate.c: s/return (foo)/return foo/.
18793 * lalr.c: Likewise.
18794 * LR0.c: Likewise.
18795 * output.c: Likewise.
18796 * reader.c: Likewise.
18797 * symtab.c: Likewise.
18798 * vmsgetargs.c: Likewise.
18799
18800 2000-03-31 Akim Demaille <akim@epita.fr>
18801
18802 Clean up the error reporting functions.
18803
18804 * src/report.c: New file.
18805 * src/report.h: Likewise.
18806 * src/Makefile.am: Adjust.
18807 * m4/error.m4: New file.
18808 * m4/Makefile.am: Adjust.
18809 * configure.in (jm_PREREQ_ERROR): Call it.
18810 * src/main.c (int_to_string, banner, fatal_banner, warn_banner):
18811 Remove.
18812 (fatal, fatals): Remove. All callers use complain.c::fatal.
18813 (warn, warni, warns, warnss, warnss): Remove. All callers use
18814 complain.c::complain.
18815 (toomany): Remove, use fatal instead.
18816 * src/files.c (done): No argument, use complain_message_count.
18817 * src/main.c (main): Register `done' to `atexit'.
18818
18819 * src/getargs.c (usage): More `fputs', less `fprintf'.
18820
18821 2000-03-28 Akim Demaille <akim@epita.fr>
18822
18823 * lib/: New directory.
18824 * Makefile.am (SUBDIRS): Adjust.
18825 * configure.in: Adjust.
18826 (LIBOBJS): Although not used yet, AC_SUBST it, otherwise it's
18827 useless.
18828 * src/alloca.c: Moved to lib/.
18829 * src/getopt.c: Likewise.
18830 * src/getopt1.c: Likewise.
18831 * src/getopt.h: Likewise.
18832 * src/ansi2knr.c: Likewise.
18833 * src/ansi2knr.1: Likewise.
18834 * src/Makefile.am: Adjust.
18835 * lib/Makefile.am: New file.
18836
18837 2000-03-28 Akim Demaille <akim@epita.fr>
18838
18839 * src/getargs.c (usage): Refresh the help message.
18840
18841 2000-03-17 Akim Demaille <akim@epita.fr>
18842
18843 * src/getopt1.c: Updated from textutils 2.0e
18844 * src/getopt.c: Likewise.
18845 * src/getopt.h: Likewise.
18846
18847 2000-03-17 Akim Demaille <akim@epita.fr>
18848
18849 * src/Makefile.am (bison.simple): Fix the awk program: quote only
18850 the file name, not the whole `#line LINE FILE'.
18851
18852 2000-03-17 Akim Demaille <akim@epita.fr>
18853
18854 On syntax errors, report the token on which we choked.
18855
18856 * src/bison.s1 (yyparse): In the label yyerrlab, when
18857 YYERROR_VERBOSE, add yychar in msg.
18858
18859 2000-03-17 Akim Demaille <akim@epita.fr>
18860
18861 * src/reader.c (copy_at): New function.
18862 (copy_guard): Use it.
18863 (copy_action): Use it.
18864
18865 2000-03-17 Akim Demaille <akim@epita.fr>
18866
18867 Be kind to translators, save some useless translations.
18868
18869 * src/main.c (banner): New function.
18870 (fatal_banner): Use it.
18871 (warn_banner): Use it.
18872
18873 2000-03-17 Akim Demaille <akim@epita.fr>
18874
18875 * src/reader.c (copy_definition): Use copy_string and
18876 copy_comment. Removed now unused `match', `ended',
18877 `cplus_comment'.
18878 (copy_comment, copy_string): Moved, to be visible from
18879 copy_definition.
18880
18881 2000-03-17 Akim Demaille <akim@epita.fr>
18882
18883 * src/reader.c (copy_string): Declare `static inline'. No
18884 problems with inline, since it is checked by configure.
18885 (copy_comment): Likewise.
18886
18887 2000-03-17 Akim Demaille <akim@epita.fr>
18888
18889 * src/reader.c (packsymbols): Formatting changes.
18890
18891 2000-03-17 Akim Demaille <akim@epita.fr>
18892
18893 * src/reader.c (copy_comment): New function, factored out from:
18894 (copy_action): Use it. Removed now unused `match', `ended',
18895 `cplus_comment'.
18896 (copy_guard): Likewise.
18897
18898 2000-03-17 Akim Demaille <akim@epita.fr>
18899
18900 * src/reader.c (copy_string): New function, factored out from:
18901 (copy_action): Use it.
18902 (copy_guard): Likewise.
18903
18904 2000-03-17 Akim Demaille <akim@epita.fr>
18905
18906 Change the handling of @s so that they behave exactly like $s.
18907 There is now a pseudo variable @$ (readble and writable), location
18908 of the lhs of the rule (by default ranging from the location of
18909 the first symbol of the rhs, to the location of the last symbol,
18910 or, if the rhs is empty, YYLLOC).
18911
18912 * src/bison.s1 [YYLSP_NEEDED] (yyloc): New variable, twin of
18913 yyval.
18914 (yyparse): When providing a default semantic action, provide a
18915 default location action.
18916 (after the $): No longer change `*YYLSP', just stack YYLOC the
18917 same way you stack YYVAL.
18918 * src/reader.c (read_declarations): Use warns.
18919 (copy_guard, case '@'): Also recognize `@$', expanded as `YYLOC'.
18920 (copy_action, case '@'): Likewise.
18921 Use a standard error message, to save useless work from
18922 translators.
18923
18924 2000-03-17 Akim Demaille <akim@epita.fr>
18925
18926 * src/bison.s1: Formatting and cosmetics changes.
18927 * src/reader.c: Likewise.
18928 Update the Copyright notice.
18929
18930 2000-03-17 Akim Demaille <akim@epita.fr>
18931
18932 * src/bison.s1 (#line): All set to `#line' only, since the
18933 Makefile now handles them.
18934
18935 2000-03-16 Akim Demaille <akim@epita.fr>
18936
18937 * src/output.c (output_rule_data): Output the documentation of
18938 some of the tables.
18939 (Copyright notice): Update.
18940 Formatting changes.
18941
18942 2000-03-16 Akim Demaille <akim@epita.fr>
18943
18944 * src/bison.s1 [!YYDEBUG]: Define yydebug to 0. This allows to
18945 remove most `#if YYDEBUG != 0', since `if (yydebug)' is enough.
18946 One `#if YYDEBUG' remains, since it uses variables which are
18947 defined only if `YYDEBUG != 0'.
18948
18949 2000-03-16 Akim Demaille <akim@epita.fr>
18950
18951 * src/bison.s1 (yyparse): Reorganize the definitions of the stacks
18952 and related variables so that the similarities are highlighted.
18953
18954 2000-03-16 Akim Demaille <akim@epita.fr>
18955
18956 * src/bison.s1: Properly indent CPP directives.
18957
18958 2000-03-16 Akim Demaille <akim@epita.fr>
18959
18960 * src/bison.s1: Properly indent the `alloca' CPP section.
18961
18962 2000-03-16 Akim Demaille <akim@epita.fr>
18963
18964 Do not hard code values of directories in `configure.in'.
18965 Update the `configure' tool chain.
18966
18967 * configure.in (XPFILE, XPFILE1, LOCALEDIR): Remove, handled by
18968 src/makefile.am.
18969 (VERSION_STRING): Use the third arg of AC_DEFINE_UNQUOTED.
18970 (AC_OUTPUT): Add m4/Makefile.
18971 Bump to bison 1.28a, 1.29 has never been released.
18972 * acconfig.h (XPFILE, XPFILE1, LOCALEDIR): Remove, since they are
18973 handled via src/Makefile.am.
18974 (VERSION_STRING, PROTOTYPES, ENABLE_NLS, HAVE_CATGETS,
18975 HAVE_GETTEXT, HAVE_LC_MESSAGES, HAVE_STPCPY): Remove, handled by
18976 autoheader.
18977 * Makefile.am (SUBDIRS): Add m4.
18978 (ACLOCAL_AM_FLAGS): New variable.
18979 (AUTOMAKE_OPTIONS): Add check-news.
18980 * src/Makefile.am (bison.simple): Use awk to replace #line lines with
18981 the proper line number and file name.
18982 (DEFS): Propagate the location of bison library files and of the
18983 locale files.
18984 (INCLUDES): Added `-I ..' so that one can compile with srcdir !=
18985 builddir.
18986 * acinclude.m4: Remove, replaced by the directory m4.
18987 * m4/Makefile.am (EXTRA_DIST): New variable.
18988 * m4/gettext.m4: New file, from the fileutils.
18989 * m4/lcmessage.m4: Likewise
18990 * m4/progtest.m4: Likewise.
18991 * m4/bison-decl.m4: New file, extracted from former acinclude.m4.
18992
18993 2000-03-10 Akim Demaille <akim@epita.fr>
18994
18995 * src/closure.c:
18996 Formatting changes of various comments.
18997 Respect the GNU coding standards at various places.
18998 Don't use `_()' when no translation is needed.
18999
19000 1999-12-13 Jesse Thilo <jthilo@gnu.org>
19001
19002 * src/files.c:
19003 OS/2 honors TMPDIR environment variable.
19004
19005 1999-12-13 Jesse Thilo <jthilo@gnu.org>
19006
19007 * doc/bison.texinfo: Tweaked spelling and grammar.
19008 Updated ISBN.
19009 Removed reference to price of printed copy.
19010 Mention BISON_SIMPLE and BISON_HAIRY.
19011
19012 1999-12-13 Jesse Thilo <jthilo@gnu.org>
19013
19014 * configure.in, NEWS:
19015 Bison 1.29 released.
19016
19017 1999-10-27 Jesse Thilo <jthilo@gnu.org>
19018
19019 * doc/.cvsignore, doc/Makefile.am, doc/refcard.tex:
19020 Added reference card.
19021
19022 1999-07-26 Jesse Thilo <jthilo@gnu.org>
19023
19024 * po/ru.po: Added Russian translation.
19025
19026 1999-07-26 Jesse Thilo <jthilo@gnu.org>
19027
19028 * configure.in: Added Russian translation.
19029
19030 1999-07-06 Jesse Thilo <jthilo@gnu.org>
19031
19032 * configure.in, NEWS, README:
19033 Released version 1.28.
19034
19035 1999-06-14 Jesse Thilo <jthilo@gnu.org>
19036
19037 * src/system.h:
19038 Squashed redefinition warning on some systems.
19039
19040 * src/getargs.c, src/Makefile.am, src/reader.c, src/version.c:
19041 Have configure build version string instead of relying on ANSI string
19042 concatentation.
19043
19044 1999-06-14 Jesse Thilo <jthilo@gnu.org>
19045
19046 * po/POTFILES.in: Got rid of version.c.
19047
19048 1999-06-14 Jesse Thilo <jthilo@gnu.org>
19049
19050 * acconfig.h, configure.in:
19051 Have configure build version string instead of relying on ANSI string
19052 concatentation.
19053
19054 1999-06-08 Jesse Thilo <jthilo@gnu.org>
19055
19056 * doc/bison.1:
19057 Dropped mention of `+' for long-named options.
19058
19059 1999-05-30 Jesse Thilo <jthilo@gnu.org>
19060
19061 * src/files.c: Added <unistd.h> for unlink().
19062
19063 * src/Makefile.am, src/system.h:
19064 I18n fixes.
19065
19066 1999-05-30 Jesse Thilo <jthilo@gnu.org>
19067
19068 * README: Added a FAQ list.
19069
19070 * configure.in, acconfig.h:
19071 I18n fixes.
19072
19073 1999-05-30 Jesse Thilo <jthilo@gnu.org>
19074
19075 * doc/FAQ, doc/Makefile.am:
19076 Added a FAQ list.
19077
19078 1999-05-19 Jesse Thilo <jthilo@gnu.org>
19079
19080 * src/alloc.h, src/symtab.h, src/version.c:
19081 Protected inclusion of "config.h" with HAVE_CONFIG_H.
19082
19083 1999-04-18 Jesse Thilo <jthilo@gnu.org>
19084
19085 * src/.cvsignore, src/Makefile.am:
19086 Reorganized: sources in `src', documentation in `doc'.
19087
19088 * src/lex.c (literalchar):
19089 fixed the code for escaping double quotes (thanks
19090 Jonathan Czisny.)
19091
19092 1999-04-18 Jesse Thilo <jthilo@gnu.org>
19093
19094 * po/de.po, po/es.po, po/fr.po, po/nl.po, po/POTFILES.in:
19095 Adjusted paths to reflect directory reorganization.
19096
19097 1999-04-18 Jesse Thilo <jthilo@gnu.org>
19098
19099 * doc/.cvsignore, doc/Makefile.am:
19100 Reorganized: sources in `src', documentation in `doc'.
19101
19102 1999-04-18 Jesse Thilo <jthilo@gnu.org>
19103
19104 * configure.in:
19105 Updated AC_INIT file to reflect directory reorganization.
19106
19107 * configure.in, .cvsignore, Makefile.am, POTFILES.in:
19108 Reorganized: sources in `src', documentation in `doc'.
19109
19110 1999-04-13 Jesse Thilo <jthilo@gnu.org>
19111
19112 * src/allocate.c:
19113 Don't declare calloc() and realloc() if not necessary.
19114
19115 1999-04-13 Jesse Thilo <jthilo@gnu.org>
19116
19117 * configure.in, acconfig.h, acinclude.m4:
19118 Don't declare calloc() and realloc() if not necessary.
19119
19120 1999-03-23 Jesse Thilo <jthilo@gnu.org>
19121
19122 * po/.cvsignore: Added i18n support.
19123
19124 1999-03-23 Jesse Thilo <jthilo@gnu.org>
19125
19126 * acconfig.h, configure.in, Makefile.am:
19127 Added i18n support.
19128
19129 1999-03-22 Jesse Thilo <jthilo@gnu.org>
19130
19131 * src/bison.s1: Fixed #line numbers.
19132
19133 1999-03-15 Jesse Thilo <jthilo@gnu.org>
19134
19135 * po/es.po, po/fr.po, po/nl.po, po/de.po:
19136 Added PO files from Translation Project.
19137
19138 1999-03-03 Jesse Thilo <jthilo@gnu.org>
19139
19140 * Makefile.am:
19141 Added support for non-ANSI compilers (ansi2knr).
19142
19143 1999-02-16 Jesse Thilo <jthilo@gnu.org>
19144
19145 * configure.in: Bumped version number to 1.27.
19146
19147 * Makefile.am:
19148 Added `bison.simple' to list of files removed by `make distclean'.
19149
19150 1999-02-12 Jesse Thilo <jthilo@gnu.org>
19151
19152 * src/files.c, src/files.h:
19153 Defined locations of parser files in config.h instead of Makefile.
19154
19155 1999-02-12 Jesse Thilo <jthilo@gnu.org>
19156
19157 * acconfig.h, acinclude.m4, configure.in, Makefile.am:
19158 Defined locations of parser files in config.h instead of Makefile.
19159
19160 1999-02-09 Jesse Thilo <jthilo@gnu.org>
19161
19162 * Makefile.am:
19163 Removed inappropriate use of $< macro.
19164
19165 1999-02-05 Jesse Thilo <jthilo@gnu.org>
19166
19167 * po/Makefile.in.in, po/POTFILES.in:
19168 Add `po' directory skeleton.
19169
19170 1999-01-27 Jesse Thilo <jthilo@gnu.org>
19171
19172 * README: Document help-bison list.
19173
19174 * configure.in: Add check for mkstemp().
19175
19176 1999-01-20 Jesse Thilo <jthilo@gnu.org>
19177
19178 * src/conflicts.c, src/LR0.c, src/output.c, src/reader.c:
19179 Hush a few compiler warnings.
19180
19181 * src/files.c:
19182 Add tryclose(), which verifies that fclose was successful.
19183 Hush a couple of compiler warnings.
19184
19185 1999-01-20 Jesse Thilo <jthilo@gnu.org>
19186
19187 * Makefile.am, OChangeLog:
19188 ChangeLog is now automatically generated. Include the old version as
19189 OChangeLog.
19190
19191 1999-01-14 Jesse Thilo <jthilo@gnu.org>
19192
19193 * 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:
19194 Update FSF address.
19195
19196 1999-01-14 Jesse Thilo <jthilo@gnu.org>
19197
19198 * doc/bison.texinfo: Fix formatting glitch.
19199
19200 * doc/bison.texinfo: Update FSF address.
19201
19202 1999-01-14 Jesse Thilo <jthilo@gnu.org>
19203
19204 * acconfig.h: Update FSF address.
19205
19206 1999-01-08 Jesse Thilo <jthilo@gnu.org>
19207
19208 * src/system.h:
19209 Don't define PACKAGE here, since config.h defines it.
19210
19211 1998-12-30 Jesse Thilo <jthilo@gnu.org>
19212
19213 * src/reader.c: Update copyright date.
19214
19215 * src/main.c:
19216 Ditch sprintf to statically-sized buffers in fatal/warn functions in
19217 favor of output directly to stderr (avoids buffer overruns).
19218
19219 * src/reader.c: Some checks for premature EOF.
19220
19221 * 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:
19222 Use prototypes if the compiler understands them.
19223
19224 * src/files.c: Honor TMPDIR on Unix hosts.
19225 Use prototypes if the compiler understands them.
19226
19227 * src/reader.c:
19228 Fix a couple of buffer overrun bugs.
19229 Use prototypes if the compiler understands them.
19230
19231 * src/system.h: Include unistd.h and ctype.h.
19232 Use #ifdef instead of #if for NLS symbols.
19233
19234 1998-12-30 Jesse Thilo <jthilo@gnu.org>
19235
19236 * doc/bison.texinfo:
19237 Delete comment "consider using @set for edition number, etc..." since
19238 we now are doing so.
19239
19240 1998-12-30 Jesse Thilo <jthilo@gnu.org>
19241
19242 * configure.in:
19243 Use prototypes if the compiler understands them.
19244
19245 * NEWS: Document 1.26 highlights.
19246
19247 * Makefile.am: Require Automake 1.3 or later.
19248
19249 * acconfig.h:
19250 Use prototypes if the compiler understands them.
19251
19252 1998-12-29 Jesse Thilo <jthilo@gnu.org>
19253
19254 * src/version.c:
19255 Use VERSION symbol from automake for version number.
19256
19257 1998-12-29 Jesse Thilo <jthilo@gnu.org>
19258
19259 * acconfig.h, configure.in, version.cin:
19260 Use VERSION symbol from automake for version number.
19261
19262 1998-11-28 Jesse Thilo <jthilo@gnu.org>
19263
19264 * Makefile.am:
19265 Distribute original version of simple parser (bison.s1), not built
19266 version (bison.simple).
19267
19268 1998-11-28 Jesse Thilo <jthilo@gnu.org>
19269
19270 * doc/bison.texinfo: Add info dir entry.
19271
19272 * doc/bison.texinfo:
19273 Let automake put version number into documentation.
19274
19275 1998-11-26 Jesse Thilo <jthilo@gnu.org>
19276
19277 * src/bison.cld, src/build.com, src/vmshlp.mar:
19278 Add non-RCS files from /gd/gnu/bison.
19279
19280 1998-11-26 Jesse Thilo <jthilo@gnu.org>
19281
19282 * doc/bison.1:
19283 Document the BISON_HAIRY and BISON_SIMPLE variables.
19284
19285 1998-11-25 Jesse Thilo <jthilo@gnu.org>
19286
19287 * src/version.c: Build version.c automatically.
19288
19289 * src/reader.c:
19290 Fix token numbering (used to start at 258, not 257).
19291
19292 * src/system.h: Include config.h.
19293
19294 * src/getargs.c: Update bug report address.
19295
19296 * src/alloca.c, src/getopt1.c, src/getopt.c, src/getopt.h:
19297 Get latest copies of alloca.c, getopt.c, getopt.h, getopt1.c from gnu.org.
19298
19299 1998-11-25 Jesse Thilo <jthilo@gnu.org>
19300
19301 * Makefile.am:
19302 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
19303
19304 * configure.in, version.cin:
19305 Build version.c automatically.
19306
19307 * AUTHORS: Add AUTHORS file.
19308
19309 * README: Update bug report address.
19310
19311 * bison.simple:
19312 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
19313
19314 * configure.in, Makefile.am, Makefile.in, stamp-h.in:
19315 Add automake stuff.
19316
19317 1998-11-25 Jesse Thilo <jthilo@gnu.org>
19318
19319 * doc/bison.texinfo: Clean up some formatting.
19320
19321 1998-05-05 Richard Stallman <rms@gnu.org>
19322
19323 * doc/bison.texinfo:
19324 Explain better why to make a pure parser.
19325
19326 1998-01-05 Richard Stallman <rms@gnu.org>
19327
19328 * src/files.c (openfiles):
19329 [_WIN32 && !__CYGWIN32__] Use TEMP or Temp to
19330 find a temporary directory, if possible. Do not unlink files while
19331 they are open.
19332
19333 1997-08-25 Richard Stallman <rms@gnu.org>
19334
19335 * src/reader.c (stack_offset;):
19336 Change some warni to warns.
19337
19338 * src/lex.c (literalchar): Use warns, not warni.
19339
19340 1997-06-28 Richard Stallman <rms@gnu.org>
19341
19342 * src/bison.s1: Add a Bison version comment.
19343
19344 * src/main.c (fatal, warn, berror):
19345 Use program_name.
19346
19347 1997-06-28 Richard Stallman <rms@gnu.org>
19348
19349 * Makefile.in (bison_version): New variable.
19350 (dist): Use that variable.
19351 (bison.s1): Substitute the Bison version into bison.simple.
19352
19353 * bison.simple: Add a Bison version comment.
19354
19355 1997-06-18 Richard Stallman <rms@gnu.org>
19356
19357 * src/main.c (fatal, warn, berror):
19358 Make error messages standard.
19359 (toomany): Improve error message text.
19360
19361 * 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:
19362 new.h renamed to alloc.h.
19363
19364 1997-06-18 Richard Stallman <rms@gnu.org>
19365
19366 * Makefile.in: new.h renamed to alloc.h.
19367
19368 1997-05-24 Richard Stallman <rms@gnu.org>
19369
19370 * src/lex.c (literalchar):
19371 Fix the code for escaping \, " and '.
19372
19373 (lex): Avoid trouble when there are many chars
19374 to discard in a char literal with just several chars in it.
19375
19376 1997-05-17 Richard Stallman <rms@gnu.org>
19377
19378 * src/bison.s1:
19379 Use malloc, if using alloca is troublesome.
19380 (YYSTACK_USE_ALLOCA): New flag macro.
19381 Define it for some systems and compilers.
19382 (YYSTACK_ALLOC): New macro.
19383 (yyparse): Use YYSTACK_ALLOC to allocate stack.
19384 If it was malloc'd, free it.
19385
19386 1997-05-17 Richard Stallman <rms@gnu.org>
19387
19388 * bison.simple:
19389 Use malloc, if using alloca is troublesome.
19390 (YYSTACK_USE_ALLOCA): New flag macro.
19391 Define it for some systems and compilers.
19392 (YYSTACK_ALLOC): New macro.
19393 (yyparse): Use YYSTACK_ALLOC to allocate stack.
19394 If it was malloc'd, free it.
19395
19396 1997-04-23 Richard Stallman <rms@gnu.org>
19397
19398 * src/bison.s1:
19399 (alloca) [__hpux]: Always define as __builtin_alloca.
19400
19401 1997-04-23 Richard Stallman <rms@gnu.org>
19402
19403 * bison.simple:
19404 (alloca) [__hpux]: Always define as __builtin_alloca.
19405
19406 1997-04-22 Richard Stallman <rms@gnu.org>
19407
19408 * src/bison.s1:
19409 [__hpux]: Include alloca.h (right for HPUX 10)
19410 instead of declaring alloca (right for HPUX 9).
19411
19412 * src/bison.s1 (__yy_memcpy):
19413 Declare arg `count' as unsigned int.
19414 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
19415
19416 1997-04-22 Richard Stallman <rms@gnu.org>
19417
19418 * bison.simple:
19419 [__hpux]: Include alloca.h (right for HPUX 10)
19420 instead of declaring alloca (right for HPUX 9).
19421
19422 * bison.simple (__yy_memcpy):
19423 Declare arg `count' as unsigned int.
19424 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
19425
19426 1997-01-03 Richard Stallman <rms@gnu.org>
19427
19428 * src/allocate.c: [__STDC__ or _MSC_VER]:
19429 Declare calloc and realloc to return void *.
19430
19431 1997-01-02 Richard Stallman <rms@gnu.org>
19432
19433 * src/system.h:
19434 [_MSC_VER]: Include stdlib.h and process.h.
19435 [_MSC_VER] (getpid): Define as macro--translate it to _getpid.
19436
19437 * src/main.c (main): Return FAILURE as a value.
19438 (printable_version): Declare arg as int, not char.
19439
19440 1997-01-02 Richard Stallman <rms@gnu.org>
19441
19442 * Makefile.in (dist):
19443 Explicitly check for symlinks, and copy them.
19444
19445 1996-12-19 Richard Stallman <rms@gnu.org>
19446
19447 * src/files.c:
19448 [_MSC_VER] (XPFILE, XPFILE1): Define, if not already defined.
19449
19450 1996-12-18 Paul Eggert <eggert@gnu.org>
19451
19452 * src/bison.s1 (yyparse):
19453 If __GNUC__ and YYPARSE_PARAM are both defined,
19454 declare yyparse to have a void * argument.
19455
19456 1996-12-18 Paul Eggert <eggert@gnu.org>
19457
19458 * bison.simple (yyparse):
19459 If __GNUC__ and YYPARSE_PARAM are both defined,
19460 declare yyparse to have a void * argument.
19461
19462 1996-12-17 Richard Stallman <rms@gnu.org>
19463
19464 * src/reduce.c (nbits): Add some casts.
19465
19466 1996-08-12 Richard Stallman <rms@gnu.org>
19467
19468 * src/bison.s1: Test _MSDOS as well as _MSDOS_.
19469
19470 1996-08-12 Richard Stallman <rms@gnu.org>
19471
19472 * bison.simple: Test _MSDOS as well as _MSDOS_.
19473
19474 1996-07-31 Richard Stallman <rms@gnu.org>
19475
19476 * src/bison.s1:
19477 [__sun && __i386]: Include alloca.h.
19478
19479 1996-07-31 Richard Stallman <rms@gnu.org>
19480
19481 * bison.simple:
19482 [__sun && __i386]: Include alloca.h.
19483
19484 1996-07-30 Richard Stallman <rms@gnu.org>
19485
19486 * src/bison.s1: Comment change.
19487
19488 * src/bison.s1: Test _MSDOS_, not MSDOS.
19489
19490 1996-07-30 Richard Stallman <rms@gnu.org>
19491
19492 * bison.simple: Comment change.
19493
19494 * bison.simple: Test _MSDOS_, not MSDOS.
19495
19496 1996-06-01 Richard Stallman <rms@gnu.org>
19497
19498 * 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:
19499 Insert `_' macro around many string constants.
19500
19501 * src/main.c:
19502 Insert `_' macro around many string constants.
19503
19504 (main): Call setlocale, bindtextdomain and textdomain.
19505
19506 * src/system.h: [HAVE_LOCALE_H]: Include locale.h.
19507 [! HAVE_LOCALE_H] (setlocale): Define as no-op.
19508 [ENABLE_NLS]: Include libintl.h.
19509 [ENABLE_NLS] (gettext): Define.
19510 [! ENABLE_NLS] (bintextdomain, textdomain, _): Consolation definitions.
19511 (N_, PACKAGE, LOCALEDIR): New macros.
19512
19513 1996-06-01 Richard Stallman <rms@gnu.org>
19514
19515 * POTFILES.in: New file.
19516
19517 * Makefile.in (allocate.o):
19518 Define target explicitly.
19519
19520 * Makefile.in (CFLAGS): Set to @CFLAGS@.
19521 (LDFLAGS): Set to @LDFLAGS@.
19522 (configure): Run autoconf only if preceding `cd' succeeds.
19523 (bison.s1): Redirect output to temporary file then move the
19524 temporary to the target, rather than redirecting directly to bison.s1.
19525 (clean): Remove config.status and config.log.
19526 (distclean): Don't remove config.status here.
19527
19528 1996-05-12 Richard Stallman <rms@gnu.org>
19529
19530 * src/bison.s1:
19531 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
19532
19533 1996-05-12 Richard Stallman <rms@gnu.org>
19534
19535 * bison.simple:
19536 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
19537
19538 1996-05-11 Richard Stallman <rms@gnu.org>
19539
19540 * src/bison.s1 (__yy_memcpy):
19541 Really reorder the args, as was supposedly done on Feb 14 1995.
19542 (yyparse): Calls changed accordingly.
19543
19544 1996-05-11 Richard Stallman <rms@gnu.org>
19545
19546 * Makefile.in (dist): Don't use $(srcdir).
19547
19548 * bison.simple (__yy_memcpy):
19549 Really reorder the args, as was supposedly done on Feb 14 1995.
19550 (yyparse): Calls changed accordingly.
19551
19552 1996-01-27 Richard Stallman <rms@gnu.org>
19553
19554 * src/output.c (output_rule_data):
19555 Test YYERROR_VERBOSE in the conditional
19556 around the definition of ttyname.
19557
19558 1995-12-29 Richard Stallman <rms@gnu.org>
19559
19560 * src/bison.s1:
19561 Fix line numbers in #line commands.
19562
19563 1995-12-29 Richard Stallman <rms@gnu.org>
19564
19565 * bison.simple:
19566 Fix line numbers in #line commands.
19567
19568 1995-12-27 Richard Stallman <rms@gnu.org>
19569
19570 * src/bison.s1 (YYPARSE_PARAM_DECL):
19571 In C++, make it always null.
19572 (YYPARSE_PARAM_ARG): New macro.
19573 (yyparse): Use YYPARSE_PARAM_ARG.
19574
19575 1995-12-27 Richard Stallman <rms@gnu.org>
19576
19577 * bison.simple (YYPARSE_PARAM_DECL):
19578 In C++, make it always null.
19579 (YYPARSE_PARAM_ARG): New macro.
19580 (yyparse): Use YYPARSE_PARAM_ARG.
19581
19582 1995-11-29 Richard Stallman <rms@gnu.org>
19583
19584 * doc/bison.texinfo:
19585 Describe literal string tokens, %raw, %no_lines, %token_table.
19586
19587 1995-11-29 Daniel Hagerty <hag@gnu.org>
19588
19589 * doc/bison.texinfo: Fixed update date
19590
19591 1995-10-16 Richard Stallman <rms@gnu.org>
19592
19593 * src/version.c: Version 1.25.
19594
19595 1995-10-16 Richard Stallman <rms@gnu.org>
19596
19597 * NEWS: *** empty log message ***
19598
19599 1995-10-16 Richard Stallman <rms@gnu.org>
19600
19601 * doc/bison.1, doc/bison.rnh:
19602 Add new options.
19603
19604 1995-10-15 Richard Stallman <rms@gnu.org>
19605
19606 * src/vmsgetargs.c, src/getargs.c:
19607 Added -n, -k, and -raw switches.
19608 (noparserflag, toknumflag, rawtoknumflag): New variables.
19609
19610 * src/symtab.h (SALIAS):
19611 New #define for adding aliases to %token.
19612 (struct bucket): Added `alias' field.
19613
19614 * src/reduce.c (reduce_grammar):
19615 Revise error message.
19616 (print_notices): Remove final `.' from error message.
19617
19618 * src/reader.c (reader_output_yylsp):
19619 New function.
19620 (readgram): Use `#if 0' around code that accepted %command
19621 inside grammar rules: The documentation doesn't allow it,
19622 and it will fail since the %command processors scan for the next %.
19623 (parse_token_decl): Extended the %token
19624 declaration to allow a multi-character symbol as an alias.
19625 (parse_thong_decl): New function.
19626 (read_declarations): Added %thong declarations.
19627 (read_declarations): Handle NOOP to deal with allowing
19628 % declarations as another means to specify the flags.
19629 (readgram): Allow %prec prior to semantics embedded in a rule.
19630 (skip_to_char, read_declarations, copy_definition)
19631 (parse_token_decl, parse_start_decl, parse_type_decl)
19632 (parse_assoc_decl, parse_union_decl, parse_expect_decl)
19633 (get_type_name, copy_guard, copy_action, readgram)
19634 (get_type, packsymbols): Revised most error messages.
19635 Changed `fatal' to `warnxxx' to avoid aborting for error.
19636 Revised and use multiple warnxxx functions to avoid using VARARGS1.
19637 (read_declarations): Improve the error message for
19638 an invalid character. Do not abort.
19639 (read_declarations, copy_guard, copy_action): Use
19640 printable_version to avoid unprintable characters in printed output.
19641 (parse_expect_decl): Error if argument to %expect exceeds 10 digits.
19642 (parse_token_decl, parse_assoc_decl, parse_type_decl, get_type):
19643 Allow the type of a non-terminal can be given
19644 more than once, as long as all specifications give the same type.
19645
19646 * src/output.c:
19647 (output_headers, output_trailers, output, output_gram)
19648 (output_rule_data): Implement noparserflag variable.
19649 Implement toknumflag variable.
19650 (output): Call reader_output_yylsp to output LTYPESTR.
19651
19652 * src/main.c (main):
19653 If reader sees an error, don't process the grammar.
19654 (fatals): Updated to not use VARARGS1.
19655 (printable_version, int_to_string, warn, warni, warns, warnss)
19656 (warnsss): New error reporting functions. Avoid abort for error.
19657
19658 * src/lex.h:
19659 Added THONG and NOOP for alias processing.
19660 Added SETOPT for the new code that allows setting options with %flags.
19661
19662 * src/lex.c:
19663 Include getopt.h. Add some extern decls.
19664 (safegetc): New function to deal with EOF gracefully.
19665 (literalchar); new function to deal with reading \ escapes.
19666 (lex): Use literalchar.
19667 (lex): Implemented "..." tokens.
19668 (literalchar, lex, parse_percent_token): Made tokenbuffer
19669 always contain the token. This includes growing the token
19670 buffer while reading an integer.
19671 (parse_percent_token): Replaced if-else statement with percent_table.
19672 (parse_percent_token): Added % declarations as another
19673 way to specify the flags -n, -l, and -r. Also added hooks for
19674 -d, -k, -y, -v, -t, -p, -b, -o, but implementation requires
19675 major changes to files.c.
19676 (lex) Retain in the incoming stream a character following
19677 an incorrect '/'.
19678 (skip_white_space, lex): Revised most error messages
19679 and changed fatal to warn to avoid aborting.
19680 (percent_table): Added %thong declarations.
19681
19682 * src/gram.h: Comment changes.
19683
19684 * src/files.c (openfiles, open_extra_files, done):
19685 Add faction flag
19686 and actfile file. Handle noparserflag. Both for -n switch.
19687
19688 * src/conflicts.c (resolve_sr_conflict):
19689 Remove use of alloca.
19690
19691 1995-06-01 Jim Meyering <meyering@gnu.org>
19692
19693 * doc/bison.texinfo: *** empty log message ***
19694
19695 1995-05-06 Richard Stallman <rms@gnu.org>
19696
19697 * src/bison.s1: Comment change.
19698
19699 1995-05-06 Richard Stallman <rms@gnu.org>
19700
19701 * bison.simple: Comment change.
19702
19703 1995-05-03 Richard Stallman <rms@gnu.org>
19704
19705 * src/version.c: Version now 1.24.
19706
19707 * src/bison.s1: Change distribution terms.
19708
19709 * src/version.c: Version now 1.23.
19710
19711 1995-05-03 Richard Stallman <rms@gnu.org>
19712
19713 * doc/bison.texinfo:
19714 Rewrite "Conditions for Using Bison".
19715 Update version to 1.24.
19716
19717 1995-05-03 Richard Stallman <rms@gnu.org>
19718
19719 * bison.simple: Change distribution terms.
19720
19721 1995-02-23 Richard Stallman <rms@gnu.org>
19722
19723 * src/files.c: Test __VMS_POSIX as well as VMS.
19724
19725 1995-02-14 Jim Meyering <meyering@gnu.org>
19726
19727 * src/bison.s1 (__yy_memcpy):
19728 Renamed from __yy_bcopy to avoid
19729 confusion. Reverse FROM and TO arguments to be consistent with
19730 those of memcpy.
19731
19732 1995-02-14 Jim Meyering <meyering@gnu.org>
19733
19734 * bison.simple (__yy_memcpy):
19735 Renamed from __yy_bcopy to avoid
19736 confusion. Reverse FROM and TO arguments to be consistent with
19737 those of memcpy.
19738
19739 1994-11-10 David J. MacKenzie <djm@gnu.org>
19740
19741 * NEWS: reformat
19742
19743 * NEWS: New file.
19744
19745 * Makefile.in (DISTFILES): Include NEWS.
19746
19747 * Makefile.in (DISTFILES):
19748 Include install-sh, not install.sh.
19749
19750 * configure.in: Update to Autoconf v2 macro names.
19751
19752 1994-10-05 David J. MacKenzie <djm@gnu.org>
19753
19754 * Makefile.in: fix typo
19755
19756 * Makefile.in (prefix, exec_prefix):
19757 Let configure set them.
19758
19759 1994-09-28 David J. MacKenzie <djm@gnu.org>
19760
19761 * Makefile.in: Set datadir to $(prefix)/share.
19762
19763 1994-09-15 Richard Stallman <rms@gnu.org>
19764
19765 * src/bison.s1:
19766 Update copyright notice and GPL version.
19767
19768 1994-09-15 Richard Stallman <rms@gnu.org>
19769
19770 * bison.simple:
19771 Update copyright notice and GPL version.
19772
19773 1994-07-12 Richard Stallman <rms@gnu.org>
19774
19775 * src/reduce.c, src/reader.c:
19776 entered into RCS
19777
19778 1994-05-05 David J. MacKenzie <djm@gnu.org>
19779
19780 * Makefile.in: entered into RCS
19781
19782 1994-03-26 Richard Stallman <rms@gnu.org>
19783
19784 * src/bison.s1: entered into RCS
19785
19786 1994-03-26 Richard Stallman <rms@gnu.org>
19787
19788 * bison.simple: entered into RCS
19789
19790 1994-03-25 Richard Stallman <rms@gnu.org>
19791
19792 * src/main.c: entered into RCS
19793
19794 1994-03-24 Richard Stallman <rms@gnu.org>
19795
19796 * src/conflicts.c: entered into RCS
19797
19798 1994-01-02 Richard Stallman <rms@gnu.org>
19799
19800 * Makefile.in: *** empty log message ***
19801
19802 1993-11-21 Richard Stallman <rms@gnu.org>
19803
19804 * src/bison.s1: *** empty log message ***
19805
19806 1993-11-21 Richard Stallman <rms@gnu.org>
19807
19808 * doc/bison.texinfo: entered into RCS
19809
19810 * doc/bison.texinfo: *** empty log message ***
19811
19812 1993-11-21 Richard Stallman <rms@gnu.org>
19813
19814 * bison.simple: *** empty log message ***
19815
19816 1993-10-25 David J. MacKenzie <djm@gnu.org>
19817
19818 * doc/bison.texinfo: *** empty log message ***
19819
19820 1993-10-19 Richard Stallman <rms@gnu.org>
19821
19822 * src/bison.s1: *** empty log message ***
19823
19824 1993-10-19 Richard Stallman <rms@gnu.org>
19825
19826 * bison.simple: *** empty log message ***
19827
19828 1993-10-14 Richard Stallman <rms@gnu.org>
19829
19830 * src/bison.s1: *** empty log message ***
19831
19832 1993-10-14 Richard Stallman <rms@gnu.org>
19833
19834 * bison.simple: *** empty log message ***
19835
19836 1993-09-14 David J. MacKenzie <djm@gnu.org>
19837
19838 * doc/bison.texinfo: *** empty log message ***
19839
19840 1993-09-13 Noah Friedman <friedman@gnu.org>
19841
19842 * Makefile.in: *** empty log message ***
19843
19844 1993-09-10 Richard Stallman <rms@gnu.org>
19845
19846 * src/conflicts.c: *** empty log message ***
19847
19848 * src/system.h: entered into RCS
19849
19850 1993-09-10 Richard Stallman <rms@gnu.org>
19851
19852 * doc/bison.1: entered into RCS
19853
19854 1993-09-06 Noah Friedman <friedman@gnu.org>
19855
19856 * src/version.c: entered into RCS
19857
19858 1993-09-06 Noah Friedman <friedman@gnu.org>
19859
19860 * Makefile.in: *** empty log message ***
19861
19862 1993-07-30 David J. MacKenzie <djm@gnu.org>
19863
19864 * Makefile.in: *** empty log message ***
19865
19866 1993-07-24 Richard Stallman <rms@gnu.org>
19867
19868 * src/bison.s1: *** empty log message ***
19869
19870 1993-07-24 Richard Stallman <rms@gnu.org>
19871
19872 * bison.simple: *** empty log message ***
19873
19874 1993-07-08 David J. MacKenzie <djm@gnu.org>
19875
19876 * Makefile.in: *** empty log message ***
19877
19878 1993-07-04 Richard Stallman <rms@gnu.org>
19879
19880 * src/bison.s1: *** empty log message ***
19881
19882 1993-07-04 Richard Stallman <rms@gnu.org>
19883
19884 * bison.simple: *** empty log message ***
19885
19886 1993-06-26 David J. MacKenzie <djm@gnu.org>
19887
19888 * src/getargs.c: entered into RCS
19889
19890 1993-06-26 David J. MacKenzie <djm@gnu.org>
19891
19892 * doc/bison.texinfo: *** empty log message ***
19893
19894 * doc/bison.1: New file.
19895
19896 1993-06-25 Richard Stallman <rms@gnu.org>
19897
19898 * src/getargs.c: New file.
19899
19900 1993-06-16 Richard Stallman <rms@gnu.org>
19901
19902 * src/bison.s1: *** empty log message ***
19903
19904 1993-06-16 Richard Stallman <rms@gnu.org>
19905
19906 * bison.simple: *** empty log message ***
19907
19908 1993-06-03 Richard Stallman <rms@gnu.org>
19909
19910 * src/bison.s1: New file.
19911
19912 1993-06-03 Richard Stallman <rms@gnu.org>
19913
19914 * doc/bison.texinfo: *** empty log message ***
19915
19916 1993-06-03 Richard Stallman <rms@gnu.org>
19917
19918 * bison.simple: New file.
19919
19920 1993-05-19 Richard Stallman <rms@gnu.org>
19921
19922 * doc/bison.texinfo: New file.
19923
19924 1993-05-07 Noah Friedman <friedman@gnu.org>
19925
19926 * Makefile.in: *** empty log message ***
19927
19928 1993-04-28 Noah Friedman <friedman@gnu.org>
19929
19930 * src/reader.c: *** empty log message ***
19931
19932 1993-04-23 Noah Friedman <friedman@gnu.org>
19933
19934 * src/alloc.h: entered into RCS
19935
19936 1993-04-20 David J. MacKenzie <djm@gnu.org>
19937
19938 * src/version.c: *** empty log message ***
19939
19940 * src/files.c, src/allocate.c:
19941 entered into RCS
19942
19943 * src/reader.c: *** empty log message ***
19944
19945 * src/lex.c: entered into RCS
19946
19947 * src/conflicts.c: New file.
19948
19949 * src/symtab.c: entered into RCS
19950
19951 * src/alloc.h: New file.
19952
19953 * src/LR0.c: entered into RCS
19954
19955 1993-04-18 Noah Friedman <friedman@gnu.org>
19956
19957 * src/reader.c: New file.
19958
19959 * src/version.c: *** empty log message ***
19960
19961 1993-04-18 Noah Friedman <friedman@gnu.org>
19962
19963 * Makefile.in: *** empty log message ***
19964
19965 1993-04-17 Noah Friedman <friedman@gnu.org>
19966
19967 * Makefile.in: *** empty log message ***
19968
19969 1993-04-15 Richard Stallman <rms@gnu.org>
19970
19971 * src/main.c, src/files.c:
19972 New file.
19973
19974 1993-04-15 Noah Friedman <friedman@gnu.org>
19975
19976 * configure.in: entered into RCS
19977
19978 * configure.in: *** empty log message ***
19979
19980 * configure.in: New file.
19981
19982 1993-04-14 Richard Stallman <rms@gnu.org>
19983
19984 * Makefile.in: New file.
19985
19986 1993-04-13 Richard Stallman <rms@gnu.org>
19987
19988 * src/version.c: New file.
19989
19990 1993-03-25 Richard Stallman <rms@gnu.org>
19991
19992 * src/output.c: entered into RCS
19993
19994 1992-09-25 Richard Stallman <rms@gnu.org>
19995
19996 * configure.bat: entered into RCS
19997
19998 1992-06-22 Richard Stallman <rms@gnu.org>
19999
20000 * src/vmsgetargs.c: entered into RCS
20001
20002 1992-06-22 Richard Stallman <rms@gnu.org>
20003
20004 * doc/bison.rnh: entered into RCS
20005
20006 1992-04-20 David J. MacKenzie <djm@gnu.org>
20007
20008 * README: entered into RCS
20009
20010 1992-01-22 Richard Stallman <rms@gnu.org>
20011
20012 * src/machine.h: entered into RCS
20013
20014 1991-12-21 Richard Stallman <rms@gnu.org>
20015
20016 * src/lalr.c, src/closure.c:
20017 entered into RCS
20018
20019 1991-12-20 Richard Stallman <rms@gnu.org>
20020
20021 * src/state.h: entered into RCS
20022
20023 1991-12-18 Richard Stallman <rms@gnu.org>
20024
20025 * src/print.c, src/nullable.c, src/derives.c:
20026 entered into RCS
20027
20028 1991-11-03 David J. MacKenzie <djm@gnu.org>
20029
20030 * src/warshall.c, src/types.h, src/symtab.h, src/lex.h, src/gram.c, src/gram.h, src/files.h:
20031 entered into RCS
20032
20033 1988-09-09 Richard Stallman <rms@gnu.org>
20034
20035 * src/bison.hairy: entered into RCS
20036
20037 1987-12-16 Richard Stallman <rms@gnu.org>
20038
20039 * REFERENCES: entered into RCS
20040
20041
20042 -----
20043
20044 Copyright (C) 1987, 1988, 1991, 1992, 1993, 1994, 1995, 1996,
20045 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007
20046 Free Software Foundation, Inc.
20047
20048 Copying and distribution of this file, with or without
20049 modification, are permitted provided the copyright notice and this
20050 notice are preserved.
20051
20052 $Id$