1 2007-12-08 Joel E. Denny <jdenny@ces.clemson.edu>
3 * data/xslt/bison.xsl (bison:ruleNumber): Rename to...
4 (bison:ruleByNumber): ... this for clarity.
5 * data/xslt/xml2dot.xsl (xsl:template match="item"): Update.
6 * data/xslt/xml2text.xsl (xsl:template match="item"): Update.
7 (xsl:template match="reduction"): Update.
8 (xsl:template match="item"): Update.
9 (xsl:template match="reduction"): Update.
11 In the XML output, don't print the list of rules where symbols appear.
12 Compute it in XSLT instead. Discussed at
13 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00024.html>.
14 * data/xslt/bison.xsl (bison:ruleByLhs): New.
15 (bison:ruleByRhs): New.
16 * data/xslt/xml2text.xsl (xsl:template match="terminal"): Use
18 (xsl:template match="terminal/rule"): Remove.
19 (xsl:template match="nonterminal"): Use bison:ruleByLhs and
21 (xsl:template match="nonterminal/left/rule|nonterminal/right/rule"):
23 * data/xslt/xml2xhtml.xsl (xsl:template match="terminal"): Use
24 bison:ruleByRhs and mode="number-link" for rule template.
25 (xsl:template match="terminal/rule"): Remove.
26 (xsl:template match="nonterminal"): Use bison:ruleByLhs and
27 bison:ruleByRhs and mode="number-link" for rule template.
28 (xsl:template match="nonterminal/left/rule|nonterminal/right/rule"):
30 (xsl:template match="rule" mode="number-link"): ... this.
31 * src/print-xml.c (print_grammar): Don't print the list of rules.
33 2007-12-01 Joel E. Denny <jdenny@ces.clemson.edu>
35 Don't let --report affect XML output; always print all information.
37 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00020.html>.
38 * src/conflicts.c (log_resolution): Implement.
39 * src/print-xml.c (print_core): Implement.
40 (print_state): Implement.
41 (print_xml): Implement.
43 * NEWS (2.3a+): Fix quotes.
44 * src/parse-gram.y (prologue_declaration): For consistency with -v,
45 don't let %verbose clear the list specified by --report.
47 2007-11-26 Akim Demaille <akim@epita.fr>
49 * data/Makefile.am (dist_pkgdata_DATA): Ship and install bison.xsl.
51 2007-11-24 Joel E. Denny <jdenny@ces.clemson.edu>
53 In the XML output, list useless and unused symbols and rules with the
54 useful ones and add a "usefulness" attribute. Discussed starting at
55 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00017.html>.
56 * src/gram.c (grammar_rules_partial_print_xml): Remove.
57 (grammar_rules_print_xml): Print all rules instead of just those
58 useful in the grammar, and add a "usefulness" attribute.
59 * src/gram.h (grammar_rules_partial_print_xml): Remove prototype.
60 * src/print-xml.c (print_rules_useless_in_parser): Remove.
61 (print_grammar): Print all nonterminals instead of just useful ones,
62 and add a "usefulness" attribute to nonterminals and terminals.
63 (print_xml): Don't print a separate "reductions" or
64 "rules-useless-in-parser" element.
65 * src/reduce.c (reduce_output): Use reduce_token_unused_in_grammar.
67 (reduce_token_unused_in_grammar): New.
68 (reduce_nonterminal_useless_in_grammar): New.
69 * src/reduce.h (reduce_xml): Remove prototype.
70 (reduce_token_unused_in_grammar): Add prototype.
71 (reduce_nonterminal_useless_in_grammar): Add prototype.
72 * data/xslt/xml2text.xsl: Update for XML changes.
73 * data/xslt/xml2xhtml.xsl: Update for XML changes.
74 * tests/reduce.at (Useless Terminals): Update output.
75 (Useless Rules): Update output.
76 (Reduced Automaton): Update output.
78 Say "Terminals unused in grammar" instead of "Unused terminals".
79 * NEWS (2.3a+): Update.
80 * doc/bison.texinfo (Understanding): Update example output.
81 * src/reduce.c (reduce_output): Implement.
82 * data/xslt/xml2text.xsl: Implement.
83 * data/xslt/xml2xhtml.xsl: Implement.
85 2007-11-18 Joel E. Denny <jdenny@ces.clemson.edu>
87 Accept --report-file=FILE to override the default `.output' filename.
88 * NEWS (2.3a+): Mention.
89 * doc/bison.texinfo (Bison Options): Add an entry.
90 * src/files.c (compute_output_file_names): Don't override
91 spec_verbose_file if already set.
92 * src/getargs.c (usage): Document --report-file.
93 (REPORT_FILE_OPTION): New anonymous enum member.
94 (long_options): Add entry for it.
95 (getargs): Add case for it setting spec_verbose_file.
97 * build-aux/cross-options.pl: Don't record a short option just because
99 * doc/.cvsignore: Add yacc.1.
101 2007-11-14 Akim Demaille <akim@epita.fr>
103 * doc/yacc.1.in: New.
104 * configure.ac, doc/Makefile.am: Adjust.
105 * configure.ac (PACKAGE_COPYRIGHT_YEAR): New substitution, and new
107 Use AC_SUBST for assignments too.
108 * src/getargs.c (version): Use PACKAGE_COPYRIGHT_YEAR.
110 2007-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
112 * src/gram.c: Remove comments that duplicate comments in gram.h.
114 When reporting useless rules and nonterminals, say "useless in grammar"
115 instead of "useless", and say "useless in parser" instead of "never
116 reduced". Discussed starting at
117 <http://lists.gnu.org/archive/html/bison-patches/2007-10/msg00033.html>.
118 * NEWS (2.3a+): Mention this change.
119 * data/xslt/xml2text.xsl: Update output text and expected input XML
120 element names to match changes below.
121 * data/xslt/xml2xhtml.xsl: Likewise.
122 (xsl:template match="bison-xml-report"): Add missing entry in Table of
123 Contents: "Rules useless in parser due to conflicts".
124 * doc/bison.texinfo (Decl Summary): Reword a little.
125 (Understanding): Update example output for changes below.
126 * src/gram.c: (rule_useful_p): Rename to...
127 (rule_useful_in_grammar_p): ... this.
128 (rule_useless_p): Rename to...
129 (rule_useless_in_grammar_p): ... this.
130 (rule_never_reduced_p): Rename to...
131 (rule_useless_in_parser_p): ... this.
132 (grammar_rules_print): Update for renames.
133 (grammar_rules_print_xml): Update for renames.
134 (grammar_rules_never_reduced_report): Rename to...
135 (grammar_rules_useless_report): ... this since it is used for either
136 kind of useless rule.
137 * src/gram.h: Reword comments and update function names in prototypes.
138 * src/main.c (main): Say "rule useless in parser due to conflicts".
139 * src/print-xml.c (print_rules_never_reduced): Rename to...
140 (print_rules_useless_in_parser): ... this, and rename output XML
141 element "rules-never-reduced" to "rules-useless-in-parser".
142 (print_xml): Update for rename.
143 * src/print.c (print_results): Say "Rules useless in parser due to
145 * src/reduce.c (reduce_grammar_tables): Say "rule useless in grammar".
146 (nonterminals_reduce): Say "nonterminal useless in grammar".
147 (reduce_output): Say "Nonterminals useless in grammar".
148 Say "Rules useless in grammar".
149 (reduce_xml): Rename output XML element "useless" to
150 "useless-in-grammar".
151 (reduce_print): Don't report the count of grammatically useless rules
152 as "rules never reduced" just because %yacc is specified.
153 In the correct report of this count, say nonterminal(s) and rule(s)
154 "useless in grammar".
155 * tests/conflicts.at (S/R in initial): Update expected output.
156 (Defaulted Conflicted Reduction): Likewise.
157 (Unreachable States After Conflict Resolution): Likewise.
158 * tests/existing.at (GNU pic Grammar): Likewise.
159 * tests/reduce.at (Useless Nonterminals): Likewise.
160 (Useless Rules): Likewise.
161 (Reduced Automaton): Likewise.
162 (Underivable Rules): Likewise.
163 (Empty Language): Likewise.
165 2007-11-09 Joel E. Denny <jdenny@ces.clemson.edu>
167 * data/bison.m4 (b4_cat): Put a newline after the end delimiter of the
168 here document and before the EOF so that BSD's implementation of Bourne
169 shell doesn't parse the delimiter as part of the here document.
170 * doc/.cvsignore: Add cross-options.texi.
171 * src/getargs.c (usage): Add a blank line after the warning categories.
173 2007-11-08 Paolo Bonzini <bonzini@gnu.org>
175 * data/lalr1.java (Lexer): Remove usage of b4_pure_if.
177 2007-11-05 Akim Demaille <akim@epita.fr>
179 Remove Id: from bison.1.
180 * doc/Makefile.am (remove_time_stamp): Include the sed invocation.
181 (perl -0777 -pi -e 's/\.PP\nId): New.
182 (.x.1): Use it to ignore the version control revision.
184 2007-11-05 Akim Demaille <demaille@gostai.com>
186 * build-aux/Makefile.am: Ship cross-options.pl.
187 * doc/Makefile.am: Always refer to cross-options.texi with
189 (MAINTAINERCLEANFILES): Add it.
191 2007-11-04 Akim Demaille <demaille@gostai.com>
193 Generate the long/short option cross-table.
194 * build-aux/cross-options.pl: New.
195 * doc/Makefile.am (cross-options.texi): New.
196 * doc/bison.texinfo: Use it.
198 2007-11-04 Akim Demaille <demaille@gostai.com>
200 Generate bison.1 using help2man.
201 * doc/common.x, doc/bison.x: New.
202 * doc/Makefile.am (bison.1, .x.1): New.
203 The code is taken from autoconf-2.61/man/Makefile.am.
204 * configure.ac: Look for help2man.
206 2007-11-04 Akim Demaille <demaille@gostai.com>
209 * src/getargs.c (usage): Document -W, make it clear that -d,
210 -g and -x have optional arguments.
212 2007-11-04 Akim Demaille <demaille@gostai.com>
214 Find sha1sum when named gsha1sum.
215 * bootstrap (find_tool): New.
218 2007-10-28 Joel E. Denny <jdenny@ces.clemson.edu>
220 Deprecate %pure-parser and add `%define api.pure'. Discussed starting
222 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00006.html>.
223 * NEWS (2.3a+): Mention.
224 * data/bison.m4 (b4_pure_if): Don't define it here.
225 * data/c.m4 (b4_identification): Depend on individual skeletons to
226 define b4_pure_flag, b4_push_flag, or b4_pull_flag if they use the
227 values of the %define variables api.pure or api.push_pull. Define
228 YYPURE, YYPUSH, and YYPULL accordingly.
229 * data/glr.c: Define b4_pure_if based on `%define api.pure' unless
230 glr.cc has already defined b4_pure_flag.
231 * data/push.c: Define b4_pure_if based on `%define api.pure'.
232 Remove YYPUSH and YYPULL since they're back in b4_identification again.
233 * data/yacc.c Define b4_pure_if based on `%define api.pure'.
234 * doc/bison.texinfo (Pure Decl): Update.
236 (Decl Summary): Add api.pure to %define entry.
237 In %pure-parser entry, say it's deprecated and reference %define.
238 (Pure Calling): Update.
239 (Error Reporting): Update.
240 (C++ Scanner Interface): Update.
241 (How Can I Reset the Parser): Update.
242 (Table of Symbols): In %pure-parser entry, say it's deprecated and
244 * src/getargs.c (pure_parser): Remove global variable.
245 * src/getargs.h (pure_parser): Remove extern.
246 * src/output.c (prepare): Don't define pure_flag muscle.
247 * src/parse-gram.y (prologue_declaration): Implement %pure-parser as a
248 wrapper around `%define api.pure'.
249 * tests/calc.at (Simple LALR Calculator): Update.
250 (Simple GLR Calculator): Update.
251 * tests/cxx-type.at (GLR: Resolve ambiguity, pure, no locations):
253 (GLR: Resolve ambiguity, pure, locations): Update.
254 (GLR: Merge conflicting parses, pure, no locations): Update.
255 (GLR: Merge conflicting parses, pure, locations): Update.
256 * tests/glr-regression.at (Uninitialized location when reporting
258 * tests/input.at (Unused %define api.pure): New test case.
259 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Update definition for
260 AT_PURE_IF and AT_PURE_AND_LOC_IF.
261 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Update.
263 2007-10-28 Joel E. Denny <jdenny@ces.clemson.edu>
265 %define push_pull -> %define api.push_pull. Discussed starting at
266 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00005.html>.
267 * data/push.c: Expect the new name.
268 * data/yacc.c: Likewise.
269 * doc/bison.texinfo (Push Decl): Update.
270 (Decl Summary): Update %define entry.
271 (Push Parser Function): Update.
272 (Pull Parser Function): Update.
273 (Parser Create Function): Update.
274 (Parser Delete Function): Update.
275 * tests/calc.at (Simple LALR Calculator): Update.
276 * tests/input.at (%define enum variables): Update.
277 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Update.
278 (Push Parsing: Multiple impure instances): Update.
279 (Push Parsing: Unsupported Skeletons): Update.
280 * tests/torture.at (Exploding the Stack Size with Alloca): Update.
281 (Exploding the Stack Size with Malloc): Update.
283 * NEWS (2.3a+): Add an entry for the push parser, and clean up the
286 2007-10-27 Joel E. Denny <jdenny@ces.clemson.edu>
288 For the XML output's terminal element, rename @number to @token-number,
289 and add @symbol-number. In the nonterminal element, rename @number to
290 @symbol-number. Discussed starting at
291 <http://lists.gnu.org/archive/html/bison-patches/2007-10/msg00040.html>.
292 * data/xslt/xml2text.xsl (xsl:template match="terminal"): Update for
294 (xsl:template match="nonterminal"): Likewise.
295 * data/xslt/xml2xhtml.xsl (xsl:template match="terminal"): Likewise.
296 (xsl:template match="nonterminal"): Likewise.
297 * src/print-xml.c (print_grammar): Implement.
299 2007-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
301 * data/xslt/xml2dot.xsl (xsl:template match="automaton/state"): After
302 2007-10-11 change, the child elements here are items not rules.
303 (<xsl:template match="item"): New.
304 (xsl:template match="rule"): Update for new reduced itemset.
305 (xsl:template match="point"): Remove.
306 (xsl:template match="empty"): For consistency with --graph, don't
307 output "/* empty */".
308 * data/xslt/xml2text.xsl (xsl:template match="terminal"): When invoking
309 line-wrap, don't pass a negative value as first-line-length since this
310 won't work with the following changes.
311 (xsl:template name="line-wrap"): Simplify slightly.
312 (xsl:template name="ws-search"): Eliminate recursion.
313 * src/print_graph.c (print_core): Don't print a reduction's lookahead
314 set next to an item whose dot is not at the end of the RHS even if it
315 happens to be associated with the same rule.
317 2007-10-19 Joel E. Denny <jdenny@ces.clemson.edu>
319 Add %define lr.keep_unreachable_states.
320 * NEWS (2.3a+): Mention it in the entry for unreachable state removal.
321 * doc/bison.texinfo (Decl Summary): Mention it in the %define entry.
322 * src/main.c (main): Implement it.
323 * tests/conflicts.at (Unreachable States After Conflict Resolution):
324 Extend to test it, and fix a typo.
326 2007-10-19 Joel E. Denny <jdenny@ces.clemson.edu>
328 * NEWS (2.3a+): Add entry for recent .output file lookahead set fix.
329 * doc/bison.texinfo (Understanding): Remove a bogus lookahead set in
330 the example .output text.
331 * tests/regression.at (Extra lookahead sets in report): Improve wording
334 2007-10-17 Wojciech Polak <polak@gnu.org>
336 * src/print-xml.c (print_grammar): Renamed
337 <terminal> and <nonterminal> attributes:
338 "type" to "number" and "symbol" to "name".
339 * data/xslt/xml2text.xsl (xsl:template match="terminal"):
340 Use new attribute names.
341 (xsl:template match="nonterminal"): Likewise.
342 * data/xslt/xml2xhtml.xsl: Likewise.
344 2007-10-17 Joel E. Denny <jdenny@ces.clemson.edu>
346 * doc/bison.texinfo (Bison Options): Add entry for --print-datadir.
347 (Option Cross Key): Likewise.
349 * src/print-xml.c (print_core): Don't print a reduction's lookahead set
350 next to an item whose dot is not at the end of the RHS even if it
351 happens to be associated with the same rule.
352 * src/print.c (print_core): Likewise.
353 * tests/conflicts.at (Unresolved SR Conflicts): Update output.
354 (Resolved SR Conflicts): Update output.
355 * tests/regression.at (Extra lookahead sets in report): New test case.
357 2007-10-11 Wojciech Polak <polak@gnu.org>
359 * src/print-xml.c (print_core): Remove item set
361 * data/xslt/bison.xsl (bison:ruleNumber): New key.
362 Improve processing time. Suggested by Joel E. Denny.
363 * data/xslt/xml2dot.xsl (xsl:template name="escape"):
364 Write xsl:param "required" attribute as comment.
365 * data/xslt/xml2text.xsl (xsl:template match="item"): New.
366 (xsl:template match="rule"): Support new reduced itemset.
367 (xsl:template match="point"): Remove.
368 * data/xslt/xml2xhtml.xsl: Likewise.
370 2007-10-09 Joel E. Denny <jdenny@ces.clemson.edu>
372 * src/getargs.c (version): Update copyright year.
374 2007-10-09 Joel E. Denny <jdenny@ces.clemson.edu>
376 Make xml2dot.xsl and --graph produce the same output.
377 * data/xslt/xml2dot.xsl (xsl:template match="rule"): Use a ` '
378 instead of a `\n'. That is, don't add escapes yet or they'll be doubly
380 (xsl:template name="output-node"): Use the new escape template instead
381 of the string-replace template directly.
382 (xsl:template name="output-edge"): Likewise.
383 (xsl:template name="escape"): New, escapes backslashes and newlines in
384 addition to quotation marks.
385 * src/graphviz.c (start_graph, output_node, output_edge): Add
386 whitespace to output for legibility.
388 Make xml2text.xsl and --report produce the same output, and remove the
389 XML "conflicts" element since a conflict summary is easily extracted
391 * data/xslt/bison.xsl: New.
392 (xsl:template match="state" mode="bison:count-conflicts): New.
393 * data/xslt/xml2text.xsl: Import bison.xsl.
394 (xsl:template match="bison-xml-report"): Instead of styling the
395 "conflicts" element, style the "automaton" element with mode
396 "conflicts". Unlike the former, the latter lists S/R and R/R
397 conflicts for a state on the same line.
398 (xsl:template match="conflicts"): Remove.
399 (xsl:template match="conflict"): Remove.
400 (xsl:template match="terminal"): Line-wrap the list of rules in which
401 the terminal is used.
402 (xsl:template match="nonterminal"): Likewise for nonterminals.
403 (xsl:template match="automaton" mode="conflicts"): New.
404 (xsl:template match="state" mode="conflicts"): New.
405 (xsl:template name="line-wrap"): New.
406 (xsl:template name="ws-search"): New.
407 * data/xslt/xml2xhtml.xsl: Import bison.xsl.
408 (xsl:template match="bison-xml-report"): Instead of styling the
409 "conflicts" element, style the "automaton" element with mode
411 (xsl:template match="conflicts"): Remove.
412 (xsl:template match="conflict"): Remove.
413 (xsl:template match="automaton" mode="conflicts"): New.
414 (xsl:template match="state" mode="conflicts): New.
415 * src/conflicts.c (conflicts_output_xml): Remove.
416 * src/conflicts.h (conflicts_output_xml): Remove prototype.
417 * src/print-xml.c (print_xml): Don't invoke conflicts_output_xml.
418 * src/print.c (print_grammar): Consistently wrap at the 66th column so
419 the corresponding XSLT is easier. Also, never wrap between a word and
420 the comma that follows it.
422 2007-10-08 Joel E. Denny <jdenny@ces.clemson.edu>
424 Improve C++ namespace support. Discussed starting at
425 <http://lists.gnu.org/archive/html/help-bison/2007-09/msg00016.html>.
426 * data/c++.m4: (b4_namespace_ref, b4_namespace_open,
427 b4_namespace_close): New macros that interpret the %define variable
428 "namespace" so its value can contain "::" to indicate nested
430 * data/glr.cc (b4_namespace): Don't define, and replace all uses with
432 * data/lalr1.cc (b4_namespace): Likewise.
433 * data/location.cc (b4_namespace): Likewise.
434 * doc/bison.texinfo (Decl Summary): Move `%define push_pull' entry
435 inside a new table in the general %define entry. Document `%define
436 namespace' there as well. Point the %name-prefix entry to it since it
437 explains it more completely in the case of C++.
438 (C++ Bison Interface): Mention `%define namespace' instead of
440 (Table of Symbols): Remove the `%define push_pull' entry. The %define
442 * tests/c++.at (Relative namespace references): New test case.
443 (Absolute namespace references): New test case.
444 (Syntactically invalid namespace references): New test case.
445 * tests/input.at (C++ namespace reference errors): New test case.
447 2007-10-08 Joel E. Denny <jdenny@ces.clemson.edu>
449 Add syncline support and location accessor to internal %define
451 * data/bison.m4 (b4_percent_define_get_loc): New.
452 (b4_percent_define_get_syncline): New.
453 (b4_percent_define_flag_if): Use b4_percent_define_get_loc.
454 (b4_percent_define_default): Record defining location as line 1 rather
455 than 0 for the sake of synchronizing #line's, and define
456 b4_percent_define_syncline(VARIABLE).
457 (b4_percent_define_check_values): Use b4_percent_define_get_loc.
458 * src/muscle_tab.c (muscle_syncline_grow): New.
459 (muscle_code_grow): Use muscle_syncline_grow.
460 (muscle_percent_define_insert): Use muscle_percent_define_get_loc, and
461 define b4_percent_define_syncline(VARIABLE).
462 (muscle_percent_define_get_loc): New.
463 (muscle_percent_define_get_syncline): New.
464 (muscle_percent_define_flag_if): Use muscle_percent_define_get_loc, and
465 remove some unused variables.
466 (muscle_percent_define_default): Record defining location as line 1
467 rather than 0 for the sake of synchronizing #line's, and define
468 b4_percent_define_syncline(VARIABLE).
469 (muscle_percent_define_check_values): Use
470 muscle_percent_define_get_loc.
471 * src/muscle_tab.h (muscle_percent_define_get_loc): Prototype.
472 (muscle_percent_define_get_syncline): Prototype.
473 * tests/skeletons.at (%define Boolean variables: invalid skeleton
474 defaults): Update output for location change.
475 (Complaining during macro argument expansion): Extend to test
476 b4_percent_define_get_loc and b4_percent_define_get_syncline errors.
478 2007-10-07 Joel E. Denny <jdenny@ces.clemson.edu>
480 Fix some error-reporting macro bugs.
481 * data/bison.m4 (b4_cat): New.
482 (b4_error, b4_error_at): Use b4_cat to send error directives directly
483 to stdout so they don't become arguments to other macros. Update
484 comments and add examples.
485 (b4_warn, b4_warn_at, b4_complain, b4_complain_at): Update comments and
487 (b4_fatal, b4_fatal_at): Likewise, and invoke m4_exit(1) immediately
488 after printing the error directive so that M4 doesn't report subsequent
489 problems that are induced by this problem.
490 * src/scan-skel.l: Recognize @` digraph outside of directive arguments
491 instead of just in them. Recognize @\n in both places. Both expand to
492 the empty string. Needed by b4_cat.
493 * tests/skeletons.at (Complaining during macro argument expansion):
495 (Fatal errors make M4 exit immediately): New test case.
497 2007-10-04 Joel E. Denny <jdenny@ces.clemson.edu>
499 Implement --print-datadir.
500 * src/getargs.c (usage): Mention.
501 (PRINT_DATADIR_OPTION): New anonymous enum member.
502 (long_options): Add entry for it.
503 (getargs): Add case for it calling compute_pkgdatadir.
504 * src/output.c (output_skeleton): Encapsulate data directory
505 computation from here...
506 (prepare): ... and from here...
507 (compute_pkgdatadir): ... into this new function.
508 * src/output.h (compute_pkgdatadir): Prototype.
510 2007-09-29 Joel E. Denny <jdenny@ces.clemson.edu>
512 * src/print-xml.c (escape_bufs): New static global variable
514 (xml_escape_n): ... the static local variable buf here.
515 (print_xml): Free memory for escape_bufs.
516 * src/reduce.c (reduce_xml): XML-escape terminal symbol tags.
518 2007-09-25 Joel E. Denny <jdenny@ces.clemson.edu>
520 Replace `%push-parser' and `%push-pull-parser' with
521 `%define push_pull "push"' and `%define push_pull "both"'.
522 `%define push_pull "pull"' is the default.
523 * doc/bison.texinfo (Push Decl, Push Parser Function,
524 Pull Parser Function, Parser Create Function, Parser Delete Function):
526 (Decl Summary, Table of Symbols): Replace %push-parser and
527 %push-pull-parser entries with a %define push_pull entry.
528 * data/bison.m4 (b4_percent_define_check_values): New macro.
529 (b4_pull_if, b4_push_if, b4_use_push_for_pull_if): Move these
531 * data/c.m4 (b4_identification): ... and the YYPUSH and YYPULL cpp
533 * data/push.c: ... to here and compute them from the value of the
534 %define variable push_pull.
535 * data/c-skel.m4: Instead of choosing the push.c skeleton for push
536 parsing requests here...
537 * data/yacc.c: ... hack this to switch to push.c any time
538 b4_use_push_pull_flag or the %define variable push_pull is set. This
539 will go away when we mv push.c yacc.c.
540 * data/c++-skel.m4, data/glr.c, data/java-skel.m4: Don't report that
541 push parsing is not supported since unused %define variables are
543 * src/getargs.c, src/getargs.h (pull_parser, push_parser): Remove.
544 * src/muscle_tab.h (muscle_percent_define_check_values): Update
545 comments for consistency with b4_percent_define_check_values.
546 * src/output.c (prepare): Don't insert b4_pull_flag and b4_push_flag
548 * src/parse-gram.y (PERCENT_PUSH_PARSER, PERCENT_PUSH_PULL_PARSER):
550 (prologue_declaration): Remove %push-parser and %push-pull-parser
552 * src/scan-gram.l (%push-parser, %push-pull-parser): Remove rules.
553 * tests/calc.at: Update declarations.
554 * tests/input.at (%define enum variables): New test case.
555 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Update
557 (Push Parsing: Multiple impure instances): Update declaration.
558 (Push Parsing: Unsupported Skeletons): New test case.
559 * tests/torture.at (Exploding the Stack Size with Alloca): Update
561 (Exploding the Stack Size with Malloc): Update declaration.
563 2007-09-24 Wojciech Polak <polak@gnu.org>
565 Add XSLT transformations.
567 * data/xslt/xml2dot.xsl: Transform XML into DOT.
568 * data/xslt/xml2text.xsl: Transform XML into plain text.
569 * data/xslt/xml2xhtml.xsl: Transform XML into XHTML.
570 * data/Makefile.am (xsltdir): New variable.
571 (dist_xslt_DATA): Add xslt/*.xsl files.
573 2007-09-23 Paul Eggert <eggert@cs.ucla.edu>
575 * src/conflicts.c (log_resolution): Fix indenting bugs I introduced.
576 Problem reported by Wojciech Polak.
577 * src/print-xml.c (xml_puts): Work even if LEVEL exceeds INT_MAX/2.
578 (xml_printf): Undo change I made on 21 September; that is,
579 indent 2 spaces, not 1.
581 2007-09-23 Joel E. Denny <jdenny@ces.clemson.edu>
583 Pacify ./configure --enable-gcc-warnings.
584 * src/print-xml.c, src/print-xml.h (xml_puts): Make third argument
585 `char const *' instead of `char *'.
586 * src/state.c (state_rule_lookahead_tokens_print_xml): Remove unused
587 local variable `sep'.
589 2007-09-21 Paul Eggert <eggert@cs.ucla.edu>
591 * src/gram.c (rule_rhs_print_xml): Now static, since it isn't used
593 * src/print-xml.c: Prefer "const" after types; that's more consistent.
594 (xml_printf): Indent just 1 space for level.
595 (e_char, xlate_char): Remove.
596 (xml_escape_string): Rewrite to avoid undefined behavior (used
597 storage that was freed from the stack).
598 (xml_escape_n): Don't bother checking for subscript error.
600 2007-09-21 Wojciech Polak <polak@gnu.org>
602 Add Bison XML Automaton Report.
604 Add support for an -x option to generate an XML report.
605 It is not documented yet.
606 * src/print-xml.c: New file.
607 * src/print-xml.h: Likewise.
608 * lib/timevar.def (TV_XML): New var.
609 * src/Makefile.am (bison_SOURCES): Add print-xml.c, print-xml.h.
610 * src/conflicts.c: Include print-xml.h.
611 (solved_conflicts_xml_obstack): New var.
612 (log_resolution, conflicts_solve, conflicts_free):
613 Add support for XML report.
614 (conflicts_output_val): New function.
615 * src/conflicts.h (conflicts_output_val): New decl.
616 * src/files.c (spec_xml_file): New var.
617 (compute_output_file_names, output_file_names_free): Add XML support.
618 * src/files.h (spec_xml_file): New decl.
619 * src/getargs.c (xml_flag): New var.
620 (usage, short_options, long_options, getargs): Add XML support.
621 * src/getargs.h (xml_flag): New decl.
622 * src/gram.c: Include print-xml.h.
623 (rule_lhs_print_xml, rule_rhs_print_xml):
624 (grammar_rules_partial_print_xml, grammar_rules_print_xml):
626 * src/gram.h: Declare external ones.
627 * src/main.c: Include print-xml.h.
628 (main): Add XML support.
629 * src/reduce.c: Include print-xml.h.
630 (reduce_xml): New function.
631 * src/reduce.h: Declare it.
632 * src/state.c: Include print-xml.h.
633 (state_new): Add XML support.
634 (state_rule_lookahead_tokens_print_xml): New function.
635 * src/state.h: Declare it.
636 (struct state): New member solved_conflicts_xml.
637 * src/symtab.c (symbol_class_get_string): New function.
638 * src/symtab.h: Declare it.
640 2007-09-21 Paul Eggert <eggert@cs.ucla.edu>
642 * GNUmakefile: Switch to coreutils's version.
643 * bootstrap: Likewise.
644 * Makefile.cfg: Adjust to new GNUmakefile.
645 * README-hacking: Likewise.
649 2006-08-18 Paul Eggert <eggert@cs.ucla.edu>
650 Bruno Haible <bruno@clisp.org>
652 * m4/bison-i18n.m4 (BISON_I18N): Also handle the case where yacc exists
653 and is a script that invokes bison. Tighten the code. Add comments.
655 2007-08-28 Joel E. Denny <jdenny@ces.clemson.edu>
657 Spell "boolean" as "Boolean". Reported by Akim Demaille.
658 * data/bison.m4 (b4_percent_define_flag_if): Fix complaint.
659 * doc/bison.texinfo (Decl Summary): Fix.
660 * src/muscle_tab.c (muscle_percent_define_flag_if): Fix complaint.
661 * tests/input.at (Boolean %define variables): Update output.
662 * tests/skeletons.at (%define boolean variables: invalid skeleton
663 defaults): Rename to...
664 (%define Boolean variables: invalid skeleton defaults): ... this and
667 2007-08-17 Joel E. Denny <jdenny@ces.clemson.edu>
669 In impure push mode, don't allow more than one yypstate to be allocated
670 since multiple impure parsers would corrupt yynerrs.
671 * data/push.c (yypstate_allocated): New static global variable
673 (yypull_parse): If yypstate_new returns 0, don't report it as memory
674 exhaustion if yypstate_allocated is 1, but still return 2.
675 (yypstate_new): Invoke yyerror and return 0 if yypstate_allocated is
676 already 1. Otherwise, set it to 1.
677 (yypstate_delete): Set it to 0.
678 * tests/push.at (Push Parsing: Multiple impure instances): New test
681 2007-08-17 Bob Rossi <bob@brasko.net>
683 * doc/bison.texinfo (Push Decl): Document the push parser.
684 (Table of Symbols): Ditto.
686 (Decl Summary): Ditto.
687 (Multiple Parsers, Push Parser Function, Pull Parser Function,
688 Parser Create Function, Parser Delete Function):
689 Add new push parser symbols.
690 (Table of Symbols): Document push-parser, push-pull-parser,
691 yypush_parse, yypull_parse, yypstate_new and yypstate_delete.
693 2007-08-15 Paul Eggert <eggert@cs.ucla.edu>
696 * doc/gpl-3.0.texi: New file.
697 * doc/gpl.texi: Remove.
698 * COPYING, GNUmakefile, HACKING, Makefile.am, Makefile.cfg:
699 * Makefile.maint, NEWS, PACKAGING, README, README-alpha:
700 * README-hacking, TODO, bootstrap, bootstrap.conf:
701 * configure.ac, data/Makefile.am, data/README, data/bison.m4:
702 * data/c++-skel.m4, data/c++.m4, data/c-skel.m4, data/c.m4:
703 * data/glr.c, data/glr.cc, data/java-skel.m4, data/java.m4:
704 * data/lalr1.cc, data/lalr1.java, data/location.cc:
705 * data/push.c, data/yacc.c, data/m4sugar/m4sugar.m4:
706 * djgpp/Makefile.maint, djgpp/README.in, djgpp/config.bat:
707 * djgpp/config.sed, djgpp/config.site, djgpp/config_h.sed:
708 * djgpp/djunpack.bat, djgpp/subpipe.c, djgpp/subpipe.h:
709 * djgpp/testsuite.sed, doc/Makefile.am, doc/bison.texinfo:
710 * doc/fdl.texi, doc/refcard.tex, etc/Makefile.am, etc/README:
711 * etc/bench.pl.in, examples/Makefile.am, examples/extexi:
712 * examples/calc++/Makefile.am, lib/Makefile.am, lib/abitset.c:
713 * lib/abitset.h, lib/bbitset.h, lib/bitset.c, lib/bitset.h:
714 * lib/bitset_stats.c, lib/bitset_stats.h, lib/bitsetv-print.c:
715 * lib/bitsetv-print.h, lib/bitsetv.c, lib/bitsetv.h:
716 * lib/ebitset.c, lib/ebitset.h, lib/get-errno.c:
717 * lib/get-errno.h, lib/lbitset.c, lib/lbitset.h:
718 * lib/libiberty.h, lib/main.c, lib/subpipe.c, lib/subpipe.h:
719 * lib/timevar.c, lib/timevar.def, lib/timevar.h:
720 * lib/vbitset.c, lib/vbitset.h, lib/yyerror.c:
721 * m4/c-working.m4, m4/cxx.m4, m4/m4.m4, m4/subpipe.m4:
722 * m4/timevar.m4, src/LR0.c, src/LR0.h, src/Makefile.am:
723 * src/assoc.c, src/assoc.h, src/closure.c, src/closure.h:
724 * src/complain.c, src/complain.h, src/conflicts.c:
725 * src/conflicts.h, src/derives.c, src/derives.h, src/files.c:
726 * src/files.h, src/flex-scanner.h, src/getargs.c:
727 * src/getargs.h, src/gram.c, src/gram.h, src/graphviz.c:
728 * src/lalr.c, src/lalr.h, src/location.c, src/location.h:
729 * src/main.c, src/muscle_tab.c, src/muscle_tab.h:
730 * src/nullable.c, src/nullable.h, src/output.c, src/output.h:
731 * src/parse-gram.c, src/parse-gram.h, src/parse-gram.y:
732 * src/print.c, src/print.h, src/print_graph.c:
733 * src/print_graph.h, src/reader.c, src/reader.h, src/reduce.c:
734 * src/reduce.h, src/relation.c, src/relation.h:
735 * src/revision.h, src/scan-code.h, src/scan-code.l:
736 * src/scan-gram.h, src/scan-gram.l, src/scan-skel.h:
737 * src/scan-skel.l, src/state.c, src/state.h, src/symlist.c:
738 * src/symlist.h, src/symtab.c, src/symtab.h, src/system.h:
739 * src/tables.c, src/tables.h, src/uniqstr.c, src/uniqstr.h:
740 * tests/Makefile.am, tests/actions.at, tests/c++.at:
741 * tests/calc.at, tests/conflicts.at, tests/cxx-type.at:
742 * tests/existing.at, tests/glr-regression.at:
743 * tests/headers.at, tests/input.at, tests/java.at:
744 * tests/local.at, tests/output.at, tests/push.at:
745 * tests/reduce.at, tests/regression.at, tests/sets.at:
746 * tests/skeletons.at, tests/synclines.at, tests/testsuite.at:
750 2007-08-11 Joel E. Denny <jdenny@ces.clemson.edu>
752 Get rid of broken %no-parser, -n, and --no-parser implementation and
754 * TODO: Don't mention them.
755 * doc/bison.1: Likewise.
756 * doc/bison.texinfo (Decl Summary): Likewise.
757 (Bison Options): Likewise.
758 (Option Cross Key): Likewise.
759 * src/getargs.c (no_parser_flag): Remove global variable.
760 (usage): Don't print description of -n and --no-parser.
761 (long_options): Remove --no-parser entry here.
762 (getargs): Remove -n case in the switch here.
763 * src/getargs.h (no_parser_flag): Remove extern.
764 * tests/regression.at (Web2c Actions): Remove comment that mentions
767 2007-08-11 Joel E. Denny <jdenny@ces.clemson.edu>
769 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Do not
770 name user variables starting with `yy'. Just pass NULL instead of a
771 dummy local &yylval to yypush_parse.
772 * tests/torture.at (AT_DATA_STACK_TORTURE): Do not name user variables
775 2007-08-03 Joel E. Denny <jdenny@ces.clemson.edu>
777 * data/yacc.c (yyexhaustedlab): Define it when YYERROR_VERBOSE is
778 true since it's then always used regardless of whether yyoverflow is
779 defined. Reported by Christian Burger at
780 <http://lists.gnu.org/archive/html/bug-bison/2007-07/msg00031.html>.
781 * THANKS: Add Christian Burger.
783 * ChangeLog: For changes in doc/bison.texinfo, consistently reference
784 node names: say "Decl Summary" not "Bison Declaration Summary".
786 2007-07-28 Joel E. Denny <jdenny@ces.clemson.edu>
788 * src/muscle_tab.c (muscle_percent_define_flag_if): In order to
789 determine whether this function has already complained about an invalid
790 value for a %define boolean variable, don't check whether Bison has
791 ever examined the value. As written, the check was a tautology.
792 Instead, record and check for this complaint using a separate muscle.
794 2007-07-27 Joel E. Denny <jdenny@ces.clemson.edu>
796 Fix push parsing memory leak reported by Brandon Lucia at
797 <http://lists.gnu.org/archive/html/bug-bison/2007-07/msg00032.html>.
798 * THANKS: Add Brandon Lucia.
799 * data/push.c (yypstate_delete): Free the stack if it was reallocated
800 but the parse never completed and thus freed it.
801 * tests/Makefile.am (TESTSUITE_AT): Add push.at.
802 * tests/testsuite.at: Include push.at.
804 (Push Parsing: Memory Leak for Early Deletion): New test case.
806 2007-07-17 Joel E. Denny <jdenny@ces.clemson.edu>
808 Improve handling of multiple S/R conflicts in the same state and of S/R
809 conflicts involving multiple reductions.
810 * src/conflicts.c (resolve_sr_conflict): Don't assign the error action
811 set for a state here or Bison will abort if it is reassigned on a
812 later conflicted reduction in the same state.
813 Similarly, don't finalize and assign the solved conflicts report here
814 or it will be lost if it is reassigned on a later conflicted reduction
816 (set_conflicts): Instead, assign them both here after all S/R conflicts
817 in the state have been fully examined.
818 * src/print.c (shift_set): Rename to...
819 (no_reduce_set): ... this.
820 (print_reductions): Update for rename, and add %nonassoc error action
821 tokens to no_reduce_set so that, when printing the first remaining
822 reduction on an error action token, the reduction is enclosed in
824 (print_results): Update for rename.
825 * tests/conflicts.at (Solved conflicts report for multiple reductions
826 in a state): New test case.
827 (%nonassoc error actions for multiple reductions in a state): New test
830 * src/main.c (main): Don't depend on C99 features.
832 2007-07-16 Joel E. Denny <jdenny@ces.clemson.edu>
834 * build-aux/.cvsignore: Add compile.
835 * lib/.cvsignore: Add charset.alias, ref-add.sed, ref-del.sed, and
838 2007-07-10 Joel E. Denny <jdenny@ces.clemson.edu>
840 * bootstrap (slurp): Create target directories that don't exist.
841 Specifically, we need lib/uniwidth/ because of recent Gnulib changes.
843 2007-07-09 Joel E. Denny <jdenny@ces.clemson.edu>
845 * LR0.c (new_itemsets): Fix wording in comments: say item index rather
847 * closure.c (closure): Likewise.
848 * state.h (reductions): Comment sorting of rules.
849 (state): Comment sorting of items.
851 2007-07-02 Joel E. Denny <jdenny@ces.clemson.edu>
853 Fix C++ test cases after recent Gnulib changes. Discussed starting at
854 <http://lists.gnu.org/archive/html/bug-bison/2007-07/msg00000.html>.
855 * examples/calc++/Makefile.am (DEFAULT_INCLUDES): Override Automake's
856 definition in order to avoid Gnulib headers since we don't use config.h
858 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): Use AT_DATA_GRAMMAR
859 rather than AT_DATA so that config.h is included.
861 2007-07-01 Joel E. Denny <jdenny@ces.clemson.edu>
863 * data/glr.c (yy_yypstack, yypstates, yypdumpstack): Use YYFPRINTF
864 instead of fprintf. Guard these functions with #if YYDEBUG instead of
865 #ifdef YYDEBUG for consistency with all other uses of YYDEBUG in Bison
866 and so that YYFPRINTF is guaranteed to be defined here.
868 2007-05-29 Joel E. Denny <jdenny@ces.clemson.edu>
870 * src/muscle_tab.c (muscle_percent_define_invalid_value): Replace
872 (muscle_percent_define_check_values): ... this more helpful function.
873 Again, it's not used yet, but it will be.
874 * src/muscle_tab.h: Likewise.
876 Improve some comments in parser table construction.
877 * src/LR0.c (new_itemsets): Explain sorting of itemset and kernel_base.
878 (generate_states): Don't mention ruleset, which is internal to closure.
879 * src/closure.c (closure): Explain sorting of core and itemset, which
880 is required for this function to behave correctly.
881 * src/closure.h (closure): Mention sorting.
883 2007-05-28 Joel E. Denny <jdenny@ces.clemson.edu>
885 * src/lalr.c (state_lookahead_tokens_count): For code readability,
886 move the check for disabled transitions to an aver since conflict
887 resolution hasn't happened yet.
889 * src/lalr.c (state_lookahead_tokens_count): Remove the check that
890 labels a state as inconsistent just because it has error transitions.
891 The original form of this check appeared in revision 1.1 of lalr.c,
892 which was committed on 1991-12-21. Now (at least), changing the
893 consistency label on such a state appears to have no useful effect in
894 any of the places it is examined, which I enumerate below. The key
895 point to understanding each item in this enumeration is that a state
896 with an error transition is labelled consistent in the first place only
897 if it has no rules, so the check cannot matter for states that have
898 rules. (1) Labelling a state as inconsistent will cause set_conflicts
899 to try to identify its conflicts, and a state must have *rules* to have
900 conflicts. (2) Labelling a state as inconsistent will affect how
901 action_row sets the default *rule* for the state. (3) Labelling a
902 state as inconsistent will cause build_relations to add lookback edges
903 to *rules* in that state.
904 * src/state.h (struct state): Word the comment for member consistent
907 2007-05-27 Joel E. Denny <jdenny@ces.clemson.edu>
909 Don't depend on C99 features.
910 * src/conflicts.c (conflicts_update_state_numbers): Fix for-loop.
911 * src/lalr.c (lalr_update_state_numbers): Fix for-loop.
912 * src/reader.c (check_and_convert_grammar): Fix for-loop.
913 * src/state.c (state_mark_reachable_states): Fix for-loop.
914 (state_remove_unreachable_states): Fix for-loop.
916 Don't widen struct state with member reachable just to temporarily
917 record reachability. Instead, use a local bitset.
918 * src/state.h (struct state): Remove member.
919 * src/state.c (state_new): Don't initialize it.
920 (state_mark_reachable_states): Rename to...
921 (state_record_reachable_states): ... this, and use bitset.
922 (state_remove_unreachable_states): Use bitset.
924 2007-05-26 Joel E. Denny <jdenny@ces.clemson.edu>
926 * src/Makefile.am (yacc): Quote target action commands properly so
927 that the yacc script isn't corrupt. Reported by Hans Aberg at
928 <http://lists.gnu.org/archive/html/bug-bison/2007-05/msg00003.html>.
930 * data/glr.c (yylval): As in yacc.c, don't extern in the header for
931 the case of pure parsers. Reported by Frans Englich at
932 <http://lists.gnu.org/archive/html/help-bison/2007-05/msg00018.html>.
933 * THANKS: Add Frans Englich.
935 * NEWS (2.3a+): In the %code entry, reference section `Bison
936 Declaration Summary' from the manual now since the %code summary has
938 * doc/bison.texinfo (Prologue Alternatives): Mention that directives
939 in the rules section must be terminated by semicolons.
941 2007-05-20 Joel E. Denny <jdenny@ces.clemson.edu>
943 Extend the front-end API for %define variables to more completely
944 mirror the back-end. This will be useful in the future.
945 * data/bison.m4 (b4_percent_define_get, b4_percent_define_ifdef):
946 Update comments to mention the new front-end counterparts of these
948 * src/muscle_tab.c (MUSCLE_COMMON_DECODE): New macro with common code
949 for muscle_string_decode and muscle_location_decode.
950 (muscle_string_decode): New static function.
951 (muscle_location_decode): Use MUSCLE_COMMON_DECODE.
952 (muscle_percent_define_get, muscle_percent_define_ifdef): New
954 (muscle_percent_define_flag_if): Use muscle_percent_define_ifdef and
955 muscle_percent_define_get to mimic the b4_percent_define_flag_if
956 implementation more closely.
957 (muscle_percent_define_invalid_value): New function.
958 * src/muscle_tab.h (muscle_percent_define_get,
959 muscle_percent_define_ifdef, muscle_percent_define_invalid_value):
962 2007-05-07 Joel E. Denny <jdenny@ces.clemson.edu>
964 * NEWS (2.3a+): Mention yesterday's state-removal change.
965 (2.3a): Remove the %language entry, which was added after 2.3a.
966 * src/LR0.c, src/closure.c, src/closure.h, src/conflicts.c,
967 src/conflicts.h, src/lalr.c, src/lalr.h, src/print.c,
968 src/print_graph.c, src/state.c, src/state.h, tests/conflicts.at,
969 tests/existing.at: Update copyright date.
971 2007-05-06 Joel E. Denny <jdenny@ces.clemson.edu>
973 If conflict resolution makes states unreachable, remove those states,
974 report rules that are then unused, and don't report conflicts in those
976 * src/conflicts.c, src/conflicts.h (conflicts_update_state_numbers):
978 * src/lalr.c, src/lalr.h (lalr_update_state_numbers): New global
980 * src/main.c (main): After conflict resolution, remove the unreachable
981 states and update all data structures that reference states by number.
982 * src/state.c (state_new): Initialize each state's reachable member to
984 (state_mark_reachable_states): New static function.
985 (state_remove_unreachable_states): New global function.
986 * src/state.h (struct state): Add member bool reachable.
987 (state_remove_unreachable_states): Prototype.
988 * tests/conflicts.at (Unreachable States After Conflict Resolution):
990 * tests/existing.at (GNU pic Grammar): Update test case output now that
991 an unused rule is discovered.
993 2007-05-06 Joel E. Denny <jdenny@ces.clemson.edu>
995 Minor code cleanup in parser table construction.
996 * src/LR0.c (new_itemsets): Use item_number_is_symbol_number.
997 (new_itemsets, save_reductions): Update for rename to nitemset.
998 * src/closure.c (nritemset): Rename to...
999 (nitemset): ... this since the "r" appears to meaningless and isn't
1000 used in the comments.
1001 (closure): Update for rename.
1002 * src/closure.h (nritemset): Update extern to...
1003 (nitemset): ... this.
1004 * src/lalr.c (LA): Fix a typo in comments.
1005 * src/print.c (print_core): Update for rename to nitemset.
1006 * src/print_graph.c (print_graph): Likewise.
1007 * src/state.h: Fix some typos in header comments.
1009 2007-04-04 Paul Eggert <eggert@cs.ucla.edu>
1011 * THANKS: Use ASCII for Sebastien Fricker's name. Bison source
1012 still sticks to ASCII. Sorry!
1014 * README-hacking: New file, taken mostly from coreutils, with changes
1015 for Bison. Contains much of the contents of:
1016 * README-cvs: Remove.
1017 * bootstrap: Sync from gnulib.
1018 * build-aux/.cvsignore: Remove *.t, mkinstalldirs.
1019 * lib/.cvsignore: Add wchar.h, wctype.h. Remove exit.h.
1021 2007-03-10 Joel E. Denny <jdenny@ces.clemson.edu>
1023 * doc/bison.texinfo (Destructor Decl): Fix typo reported by Sebastian
1025 (Java Differences): Fix some typos.
1026 * THANKS: Add Sebastian Setzer.
1028 2007-03-07 Paolo Bonzini <bonzini@gnu.org>
1030 * data/java.m4 (b4_single_class_if): Remove.
1031 (b4_abstract_if): Look at "%define abstract".
1033 (b4_union_name): Rename...
1034 (b4_yystype): ... to this. Map to "%define stype".
1035 (b4_rhs_value, b4_parse_param_decl, b4_lex_param_decl,
1036 b4_maybe_throws): Fix quoting.
1037 (b4_lex_param_call): Move below to keep b4_*_param_decl close.
1038 * data/lalr1.java (Lexer interface): Always define.
1039 (Lexer interface within parser class): Remove.
1040 (YYLexer class): New, used when "%code lexer" is present.
1041 (constructor): When "%code lexer" is used, pass %lex-param
1042 to the lexer constructor.
1043 (yylex, yyparse): Remove %lex-param from method invocations
1044 (YYStack, yyaction, yyparse): Rename b4_union_name to b4_yystype.
1046 * doc/bison.texinfo (Java Bison Interface): Mention "%define
1047 abstract". Rename "%define union_name" to "%define stype".
1048 Rename method names according to previous patch.
1049 (Java Scanner Interface): Describe "%code lexer" instead of
1050 "%pure-parser" and "%define single_class".
1051 (Java Differences): Mention "%code lexer".
1053 * tests/java.at (_AT_DATA_JAVA_CALC_Y): Remove final argument.
1054 Include scanner here, using macros from tests/local.at.
1055 (AT_DATA_CALC_Y): Remove final argument.
1056 (_AT_CHECK_JAVA_CALC): Likewise.
1057 (AT_CHECK_JAVA_CALC): Likewise. Test all four combinations
1058 of %locations and %error-verbose.
1059 (main): Test with and without %lex-param.
1060 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Push AT_LEXPARAM_IF.
1061 (AT_BISON_OPTION_POPDEFS): Pop it.
1063 2007-03-07 Juan Manuel Guerrero <juan.guerrero@gmx.de>
1065 DJGPP spefic issue. Inhibit the use of disallowed characters for
1066 file name genertion on Win98, WinXP, etc. These are |<>":?*\
1067 and concern testsuite case 46.
1068 * Makefile.am: djgpp/testsuite.sed added to EXTRA_DIST
1069 * djgpp/testsuite.sed: Inhibit the use of disallowed characters.
1070 * djgpp/config.bat: Inhibit the use of disallowed characters.
1072 2007-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
1074 Miscellaneous %define and %code cleanup.
1075 * data/bison.m4 (b4_percent_define_flag_if): Correct comments on how
1076 values are interpreted.
1077 * doc/bison.texinfo (Decl Summary): Clean up and extend %define
1078 documentation a little more.
1079 * src/muscle_tab.c (MUSCLE_USER_NAME_CONVERT,
1080 muscle_percent_define_insert, muscle_percent_code_grow): New
1082 * src/muscle_tab.h (muscle_percent_define_insert,
1083 muscle_percent_code_grow): Prototype.
1084 * src/parse-gram.y (prologue_declaration): Use
1085 muscle_percent_define_insert and muscle_percent_code_grow when parsing
1086 %define and %code directives.
1088 Make it easy to share %define boolean variables between the front-end
1089 and back-end. Though not used yet, this will be useful in the future.
1090 * data/bison.m4 (b4_check_user_names): Rewrite comments to talk about
1091 Bison uses of names rather than just skeleton uses of names.
1092 (b4_percent_define_get, b4_percent_define_ifdef): Rename
1093 b4_percent_define_skeleton_variables(VARIABLE) to
1094 b4_percent_define_bison_variables(VARIABLE).
1095 (b4_percent_code_get, b4_percent_code_ifdef): Rename
1096 b4_percent_code_skeleton_qualifiers(QUALIFIER) to
1097 b4_percent_code_bison_qualifiers(QUALIFIER).
1098 (b4_check_user_names_wrap): Update for renames.
1099 * src/muscle_tab.c, src/muscle_tab.h (muscle_percent_define_flag_if,
1100 muscle_percent_define_default): New functions mimicking
1101 b4_percent_define_flag_if and b4_percent_define_default.
1103 For %define variables, report locations for invalid values and
1105 * data/bison.m4 (b4_percent_define_flag_if): Read
1106 b4_percent_define_loc(VARIABLE) to report the location of an invalid
1108 (b4_percent_define_default): Save a special location in
1109 b4_percent_define_loc(VARIABLE) in case the default value for VARIABLE
1110 must later be reported as invalid.
1111 * src/muscle_tab.c (muscle_location_grow, muscle_location_decode): New
1113 (muscle_percent_define_insert): Record the location of VARIABLE in
1114 muscle percent_define_loc(VARIABLE), and use it to report the previous
1115 location for a redefinition.
1116 (muscle_percent_define_flag_if): Update like b4_percent_define_flag_if.
1117 (muscle_percent_define_default): Update like b4_percent_define_default.
1118 (muscle_grow_user_name_list): Rename to...
1119 (muscle_user_name_list_grow): ... this for consistency and use
1120 muscle_location_grow.
1121 * src/muscle_tab.h (muscle_location_grow): Prototype.
1122 * tests/input.at (%define errors): Update expected output.
1123 * tests/skeletons.at (%define boolean variables: invalid skeleton
1124 defaults): New test case.
1126 2007-02-28 Joel E. Denny <jdenny@ces.clemson.edu>
1128 * src/print.c (lookahead_set, state_default_rule): Remove.
1129 (print_reductions): Replace state_default_rule invocation with
1130 equivalent use of yydefact, which was computed in token_actions in
1132 (print_results): Don't allocate lookahead_set.
1134 2007-02-27 Paolo Bonzini <bonzini@gnu.org>
1136 * data/lalr1.java: Prefix all private members with yy.
1138 2007-02-24 Joel E. Denny <jdenny@ces.clemson.edu>
1140 Use YYFPRINTF instead of fprintf where appropriate. Reported by
1141 Sebastien Fricker at
1142 <http://lists.gnu.org/archive/html/bug-bison/2007-02/msg00035.html>.
1143 * THANKS: Add Sebastien Fricker.
1144 * data/glr.c, data/push.c, data/yacc.c (yy_reduce_print): Implement.
1145 * doc/bison.texinfo (Tracing): Make it clearer that YYFPRINTF must
1146 accept a variable number of arguments.
1148 2007-02-19 Joel E. Denny <jdenny@ces.clemson.edu>
1150 * bootstrap: Remove occurrences of .#bootmp from lib/Makefile.
1152 2007-02-13 Juan Manuel Guerrero <juan.guerrero@gmx.de>
1154 * djgpp/config.bat: Adjustments concerning the use of autoconf 2.61.
1155 * djgpp/config.sed: Adjustments concerning the use of autoconf 2.61.
1156 * djgpp/config.site: Adjustments concerning the use of autoconf 2.61.
1158 2007-02-11 Paul Eggert <eggert@cs.ucla.edu>
1160 Undo my 2007-02-07 change, switching back to the c-strcase module
1161 introduced in the 2007-02-03 change. Bruno Haible reported that
1162 the 2007-02-07 change would be dangerous in Turkish if we add a
1163 language whose name contains "i", since "i" is not lowercase "I"
1165 * bootstrap.conf (gnulib_modules): Add c-strcase. Remove strcase.
1166 * lib/.cvsignore: Add c-ctype.c, c-ctype.h, c-strcase.h,
1167 c-strcasecomp.c, c-strncasecmp.c. Remove strcasecmp.c, strncasecmp.c.
1168 * m4/.cvsignore: Remove strcase.m4.
1169 * src/getargs.c: Revert 2007-02-07 change, as follows.
1170 Include c-strcase.h.
1171 (language_argmatch): Use c_strcasecmp rather than strcasecmp.
1173 2007-02-11 Bruno Haible <bruno@clisp.org>
1175 Enable the Java related testsuite tests when the only Java compiler
1176 found is a gcj < 4.3. Discussed at
1177 <http://lists.gnu.org/archive/html/bug-bison/2007-02/msg00016.html>.
1178 * configure.ac (gt_JAVACOMP): Don't specify a target_version.
1180 2007-02-11 Joel E. Denny <jdenny@ces.clemson.edu>
1182 * data/Makefile.am: Update copyright date.
1183 * data/push.c (yypull_parse): Report memory exhaustion and return 2 if
1184 yypstate_new returns NULL.
1185 (yypstate_new): Return NULL if malloc does.
1186 * src/reader.c (packgram): Move translation of rule actions from the
1187 beginning of packgram to...
1188 (check_and_convert_grammar): ... here right before packgram is invoked
1189 so it's easier to write more complete comments, and remove redundant
1192 2007-02-10 Joel E. Denny <jdenny@ces.clemson.edu>
1194 As in semantic actions, make @$ in %initial-action, %destructor, and
1195 %printer imply %locations.
1196 * src/scan-code.l (SC_SYMBOL_ACTION): Set locations_flag = true when
1198 * tests/actions.at (AT_CHECK_ACTION_LOCATIONS): New macro supporting...
1199 (@$ in %initial-action implies %locations,
1200 @$ in %destructor implies %locations,
1201 @$ in %printer implies %locations): ... these new test cases.
1203 2007-02-07 Paul Eggert <eggert@cs.ucla.edu>
1205 Undo most of the 2007-02-03 change, switching to the strcase module
1206 now that gnulib strcase has been fixed.
1207 * bootstrap.conf (gnulib_modules): Remove c-strcase. Add strcase.
1208 * lib/.cvsignore: Remove c-ctype.c, c-ctype.h, c-strcase.h,
1209 c-strcasecomp.c, c-strncasecmp.c. Add strcasecmp.c, strncasecmp.c
1210 * m4/.cvsignore: Add strcase.m4.
1211 * src/getargs.c: Revert 2007-02-03 change, as follows.
1212 Don't include c-strcase.h.
1213 (language_argmatch): Use strcasecmp rather than c_strcasecmp.
1214 strcasecmp has "unspecified behavior" outside the POSIX locale,
1215 but it works fine in practice if at least one argument is ASCII,
1216 as is the case in Bison.
1218 2007-02-07 Paolo Bonzini <bonzini@gnu.org>
1220 * tests/java.at: Skip tests if only one of javac/java is present.
1221 Reported by Joel E. Denny.
1222 * tests/atlocal.in: Adjust copyright years.
1224 2007-02-05 Paolo Bonzini <bonzini@gnu.org>
1226 * data/lalr1.java (Stack): Work around old verifiers that disallow
1227 access to the private fields of an inner class, from the outer class.
1228 We can make Stack's fields public because user code doesn't have access
1229 to the instance of Stack used by parse(). Reported by Paul Eggert.
1231 2007-02-03 Paul Eggert <eggert@cs.ucla.edu>
1233 * .cvsignore: Add javacomp.sh, javaexec.sh. Is this really
1234 the right spot for these files?
1235 * bootstrap.conf (gnulib_modules): Add c-strcase.
1236 * lib/.cvsignore: Add c-ctype.c c-ctype.h, c-strcasecomp.c,
1238 * src/getargs.c: Include c-strcase.h.
1239 (language_argmatch): Use c_strcasecmp rather than strcasecmp,
1240 to avoid unspecified behavior.
1242 2007-02-01 Joel E. Denny <jdenny@ces.clemson.edu>
1244 * doc/bison.texinfo (Decl Summary): Correct typo.
1246 2007-01-30 Paolo Bonzini <bonzini@gnu.org>
1248 * data/bison.m4 (b4_percent_define_flag_if): Don't treat 0 as false.
1249 Complain if the value does not match empty, "true" or "false".
1250 * data/c++.m4: Adjust default definitions of %define variables.
1251 * data/java.m4: Adjust default definitions of %define variables.
1252 * doc/bison.texinfo (Decl Summary): Adjust the %define entry according
1254 * tests/input.at (Boolean %define variables): Test new behavior.
1256 2007-01-29 Paolo Bonzini <bonzini@gnu.org>
1258 * NEWS: Mention java.
1259 * TODO: Remove things that are done.
1260 * bootstrap.conf: Add javacomp-script and javaexec-script.
1261 * configure.ac: Invoke gt_JAVACOMP and gt_JAVAEXEC.
1263 * data/Makefile.am: Add new files.
1264 * data/java-skel.m4: New.
1265 * data/java.m4: New.
1266 * data/lalr1.java: New.
1268 * doc/bison.texinfo: Put "A Complete C++ Example" under
1269 C++ Parsers. Add Java Parsers. Put C++ Parsers and Java Parsers
1270 under Other Languages.
1272 * src/getargs.c (valid_languages): Add Java.
1273 * src/getargs.h (struct bison_language): Update size of string fields.
1275 * tests/Makefile.am: Add java.at.
1276 * tests/atlocal.in: Add CONF_JAVA and CONF_JAVAC.
1277 * tests/java.at: New.
1278 * tests/testsuite.at: Include it.
1280 2007-01-28 Joel E. Denny <jdenny@ces.clemson.edu>
1283 * src/scan-skel.l (at_directive_perform): Add at_directive_argc and
1284 at_directive_argv arguments so these no longer have to be global
1285 variables. Also, update the implementation for the following changes.
1286 (fail_for_at_directive_too_many_args,
1287 fail_for_at_directive_too_few_args): Add at_directive_name argument.
1288 (at_directive_name): Remove as at_directive_argv[0] will be used for
1290 (AT_DIRECTIVE_ARGC_MAX): Increment to make space in at_directive_argv
1291 for the directive name.
1292 (at_directive_argc, at_directive_argv): Make these local within
1293 skel_lex instead of global.
1294 (INITIAL): Update directive start action for above changes.
1295 (SC_AT_DIRECTIVE_ARG): Rename to...
1296 (SC_AT_DIRECTIVE_ARGS): ... this, and update for above changes.
1297 (SC_AT_DIRECTIVE_SKIP_WS): Update.
1298 (scan_skel): Move yylex_destroy to...
1299 (skel_scanner_free): ... here.
1300 * tests/skeletons.at (installed skeleton file name): Rename to...
1301 (installed skeleton file names): ... this.
1303 2007-01-27 Joel E. Denny <jdenny@ces.clemson.edu>
1305 * ChangeLog: For changes in doc/bison.texinfo, consistently reference
1306 node names: say "Table of Symbols" not "Bison Symbols", and say "Decl
1307 Summary" not "Directives".
1308 * doc/bison.texinfo (Decl Summary, Calc++ Parser): Cross-reference the
1309 %code entry in "Decl Summary" rather than the one in "Table of Symbols"
1310 since the former is now the more complete one.
1311 (Prologue Alternatives): Likewise and do the same for %defines.
1312 (Table of Symbols): Add summary of %code, add summary of %define, and
1313 move full %code documentation to...
1314 (Decl Summary): ... here for consistency with other entries in these
1316 Move %define entry in order to keep this list alphabetized.
1317 Reword %define entry a little to put less emphasis on the skeleton
1318 concept, which most users shouldn't have to think about.
1320 2007-01-26 Paul Eggert <eggert@cs.ucla.edu>
1322 Adjust to recent gnulib changes.
1323 * lib/.cvsignore: Remove stpcpy.h, strndup.h, strnlen.h.
1324 Add string.h, string_.h, unistd_.h, wchar_.h.
1325 * m4/.cvsignore: Add gnulib-common.m4, string_h.m4, wchar.m4.
1326 * src/system.h: Don't include <stpcpy.h>; this is now done by
1329 2007-01-23 Paolo Bonzini <bonzini@gnu.org>
1331 Simplify implementation of unqualified %code, implement macros for
1332 uniform treatment of boolean %define flags. Document %define.
1333 * data/bison.m4 (b4_percent_define_ifdef, b4_percent_define_flag_if,
1334 b4_percent_code_ifdef): New.
1335 (b4_percent_code_get): Map unqualified %code to b4_percent_code().
1336 * data/c++.m4: Define default value for global_tokens_and_yystype.
1337 * data/glr.cc: Likewise.
1338 * data/location.cc: Use b4_percent_define_flag_if.
1340 * doc/bison.texinfo (Decl Summary): Document %define.
1342 * src/parse-gram.y (Unqualified %code): Change muscle name to
1344 (content.opt): Default to empty.
1346 2007-01-17 Joel E. Denny <jdenny@ces.clemson.edu>
1348 Implement support for relative and absolute skeleton file names.
1349 Discussed starting at
1350 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00071.html>.
1351 * doc/bison.texinfo (Decl Summary): Document in %skeleton entry.
1352 (Bison Options): Document in --skeleton entry.
1353 * src/output.c (output_skeleton): Use strncpy rather than strcpy since
1354 full_skeleton can't necessarily hold all of pkgdatadir.
1355 If the specified skeleton file name contains a `/', don't prepend
1357 * src/parse-gram.y (prologue_declaration): If the specified skeleton
1358 file name contains a `/', prepend the grammar file directory.
1359 * tests/Makefile.am (TESTSUITE_AT): Add skeletons.at.
1360 * skeletons.at: New file.
1361 (relative skeleton file names): New test case.
1362 (installed skeleton file names): New test case.
1363 * tests/testsuite.at: Include skeletons.at.
1365 * bootstrap: Update copyright to 2007.
1367 2007-01-17 Paolo Bonzini <bonzini@gnu.org>
1369 * bootstrap: Remove occurrences of .#bootmp from the files.
1371 2007-01-17 Akim Demaille <akim@epita.fr>
1373 * doc/bison.texinfo (Calc++ Parser): Don't try to alias
1375 Use per-type %printer.
1377 2007-01-17 Joel E. Denny <jdenny@ces.clemson.edu>
1379 * NEWS, data/c++-skel.m4, data/c++.m4, data/c-skel.m4, data/c.m4,
1380 data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
1381 djgpp/config.site, src/files.c, src/files.h, src/main.c,
1382 src/muscle_tab.c, src/muscle_tab.h, src/parse-gram.y, src/reader.h,
1383 src/scan-skel.h, src/scan-skel.l, tests/actions.at, tests/calc.at,
1384 tests/glr-regression.at, tests/input.at, tests/local.at,
1385 tests/output.at, tests/torture.at: Update copyright to 2007.
1387 2007-01-16 Akim Demaille <akim@epita.fr>
1389 * doc/bison.texinfo (Calc++ Parsing Driver): Let "parse" return an
1391 (Calc++ Scanner): Exit with failure if we can't open the input
1393 Accept "-" standing for stdin.
1394 (Calc++ Top Level): Print the result only if the parsing was
1397 2007-01-16 Akim Demaille <akim@epita.fr>
1399 * data/lalr1.cc (yy_reduce_print_): Add a missing end-of-line.
1401 2007-01-15 Paolo Bonzini <bonzini@gnu.org>
1402 and Joel E. Denny <jdenny@ces.clemson.edu>
1404 Clean up %define and %code implementation in M4 some. Most
1405 importantly, rename all related macros to be in the b4_percent_define
1406 and b4_percent_code namespaces. Also, complete support for `.' in
1407 %define variable names and %code qualifiers.
1408 * data/bison.m4 (b4_check_user_names): Check for special
1409 "SKELETON-NAMESPACE(name)" macros instead of using two nested
1411 (b4_get_percent_define, b4_get_percent_code): Rename to...
1412 (b4_percent_define_get, b4_percent_code_get): ... these.
1413 Extend documentation with examples.
1414 For SKELETON-NAMESPACE (as documented for b4_check_user_names), use
1415 b4_percent_define_skeleton_variables and
1416 b4_percent_code_skeleton_qualifiers.
1417 Expect any value for the %define variable `foo' to be stored in the
1418 macro named `b4_percent_define(foo)'; expect any %code blocks for the
1419 qualifier `foo' to be stored in a macro named `b4_percent_code(foo)';
1420 expect any unqualified %code blocks to be stored in a macro named
1421 `b4_percent_code_unqualified'.
1422 Use m4_indir so that %define variable names and %code qualifiers can
1423 contain `.', which is allowed by the grammar parser.
1424 (b4_percent_define_default): New macro to set a default value for a
1426 (m4_wrap): Update wrapped code, and fix some underquoting.
1427 (b4_check_user_names_wrap): Update and define outside the m4_wrap.
1428 Expect grammar uses of %define variables and %code qualifiers to be
1429 defined in b4_percent_define_user_variables and
1430 b4_percent_code_user_qualifiers.
1431 * data/c++.m4: Use b4_percent_define_default rather than
1432 m4_define_default. Fix some underquoting. Skeleton usage of %define
1433 variable define_location_comparison now implies skeleton usage of
1434 %define variable filename_type.
1435 * data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
1436 data/push.c, data/yacc.c: Update macro names.
1437 * src/parse-gram.y (prologue_declaration, grammar_declaration): Update
1440 2007-01-14 Juan Manuel Guerrero <juan.guerrero@gmx.de>
1442 DJGPP specific issues.
1444 * djgpp/config.site: Set ac_cv_path_mkdir to a sane DJGPP specific
1445 default. Set gl_cv_absolute_wctype_h to a sane DJGPP specific default.
1447 2007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
1449 * tests/glr-regression.at: Use AT_PARSER_CHECK rather than AT_CHECK to
1450 run parsers in all tests so that Valgrind is invoked during
1451 maintainer-check-valgrind.
1452 (Duplicate representation of merged trees): Free all semantic values.
1453 (Duplicated user destructor for lookahead): Likewise.
1455 2007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
1457 * tests/local.at (AT_PARSER_CHECK): Add a PRE argument to specify a
1458 command-line prefix.
1459 * tests/torture.at (Exploding the Stack Size with Alloca): Stderr is
1460 ignored, so use that PRE to set --log-fd=1 in VALGRIND_OPTS so we don't
1461 miss Valgrind messages.
1462 (Exploding the Stack Size with Malloc): Likewise.
1464 2007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
1466 Ignore YYSTACK_USE_ALLOCA for push parsers since the stacks can't be
1467 locals. Reported by Juan Manuel Guerrero at
1468 <http://lists.gnu.org/archive/html/bug-bison/2007-01/msg00000.html>.
1469 * data/push.c: Enclose the #ifdef YYSTACK_USE_ALLOCA in b4_push_if.
1470 Fix some indentation also.
1471 * tests/torture.at (Exploding the Stack Size with Alloca): Add comment
1472 explaining this issue.
1474 2007-01-09 Paolo Bonzini <bonzini@gnu.org>
1475 and Joel E. Denny <jdenny@ces.clemson.edu>
1477 Simplify union and prologue handling, and escape union and lex/parse
1478 params with digraphs.
1479 * data/bison.m4 (b4_pre_prologue, b4_post_prologue): Set their default
1480 values to the empty string since these are no longer guaranteed
1481 initialized by the front-end.
1482 * data/glr.c, data/glr.cc, data/lalr1.cc, data/push.c, data/yacc.c: Add
1483 braces around b4_user_stype since this is no longer done by the
1485 * src/files.c, src/files.h (pre_prologue_obstack,
1486 post_prologue_obstack): Remove.
1487 * src/muscle_tab.c (muscle_pair_list_grow): Don't duplicate header
1488 comments here. Use MUSCLE_OBSTACK_SGROW so that values are escaped
1489 with digraphs. This fixes lex params and parse params.
1490 * src/muscle_tab.h (muscle_pair_list_grow): Update comments.
1491 * src/output.c (prepare): Remove muscle insertion of the prologues.
1492 (output): Remove freeing of pre_prologue_obstack and
1493 post_prologue_obstack.
1494 * src/parse-gram.y (prologue_declaration): Use muscle_code_grow rather
1495 than prologue_augment for prologue parsing so you don't need prologue
1497 (grammar_declaration): For %union RHS, use `braceless' instead of
1498 "{...}" so that braces are already stripped and code is escaped with
1500 * src/reader.c (prologue_augment): Remove.
1501 (reader): Remove initialization of pre_prologue_obstack and
1502 post_prologue_obstack.
1503 * src/reader.h (prologue_augment): Remove.
1505 * data/c.m4: Remove stray parenthesis.
1507 2007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
1509 Remove quotes from variables names in %define directives and from
1510 qualifiers in %code directives, and restrict the characters that are
1511 allowed in them to M4-friendly ones. For %define, continue to support
1512 the quoted form as a deprecated feature. Discussed starting at
1513 <http://lists.gnu.org/archive/html/bison-patches/2007-01/msg00023.html>.
1514 * NEWS (2.3a+): Add entry for the change to %define. Update entry for
1516 * doc/bison.texinfo (Prologue Alternatives): Update.
1517 (Decl Summary): In %defines entry, update mention of `%code requires'
1518 and `%code provides'.
1519 (C++ Location Values): Update %define uses.
1520 (Calc++ Parser Interface): Likewise.
1521 (Calc++ Parser): Likewise, and update `%code requires' uses.
1522 (Table of Symbols): Update %code documentation.
1523 * src/parse-gram.y (prologue_declaration): For %define variables, use
1524 `variable' instead of `STRING'.
1525 (grammar_declaration): For %code qualifiers, use `ID' instead of
1527 (variable): New nonterminal that takes an `ID' or a `STRING'.
1528 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Update %code
1530 * tests/calc.at (_AT_DATA_CALC_Y): Update %define use.
1531 * tests/input.at (Reject unused %code qualifiers): Update %code uses.
1532 (%define errors): Update %define uses.
1534 2007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
1536 * src/parse-gram.y (prologue_declaration): Use MUSCLE_INSERT_STRING
1537 instead of muscle_insert for %define values so that M4-special
1538 characters are replaced with digraphs.
1539 * tests/input.at (%define errors): Extend to check weird values.
1541 2007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
1543 Instead of having skeletons declare all valid %define variables and
1544 %code qualifiers, provide macros that retrieve the associated values
1545 and build these lists automatically. Thus Bison will now warn when a
1546 variable or qualifier is not used by the skeleton in the current
1547 invocation regardless of whether it might sometimes be used by that
1548 skeleton in other invocations. Also, move all %define value macros to
1549 the b4_percent_define_ namespace, and remove the %define "NAME" {CODE}
1550 form, which is replaced by %code.
1551 * data/bison.m4 (b4_check_for_unrecognized_names): Rename to...
1552 (b4_check_user_names): ... this, and change the series of valid name
1553 arguments to a single list argument for names used in the skeleton
1554 similar to the existing list argument for names used in the grammar.
1555 Warn instead of complaining.
1556 (b4_get_percent_define, b4_get_percent_code): New to retrieve %define
1557 values and %code code, to format %code code properly, and to build
1558 lists of all %define variables and %code qualifiers used in the
1559 skeleton: b4_skeleton_percent_define_variables and
1560 b4_skeleton_percent_code_qualifiers.
1561 (b4_check_percent_define_variables, b4_check_percent_code_qualifiers):
1563 (m4_wrap): ... m4_wrap b4_check_user_names invocations instead so that
1564 the skeleton names lists can finish building first. In place of
1565 b4_used_percent_define_variables and b4_used_percent_code_qualifiers,
1566 expect the lists b4_user_percent_define_variables and
1567 b4_user_percent_code_qualifiers.
1568 * data/c++.m4: Where setting default values for b4_parser_class_name,
1569 b4_location_type, b4_filename_type, b4_namespace, and
1570 b4_define_location_comparison, update their names to the
1571 b4_percent_define_ namespace.
1572 * data/glr.c: Don't use b4_check_percent_define_variables and
1573 b4_check_percent_code_qualifiers. Use b4_get_percent_code.
1574 * data/glr.cc, data/lalr1.cc: Likewise, and use b4_get_percent_define.
1575 (b4_parser_class_name, b4_namespace): Define these using
1576 b4_get_percent_define for parser_class_name and namespace.
1577 * data/location.cc: Use b4_get_percent_define.
1578 * data/push.c: Don't use b4_check_percent_define_variables and
1579 b4_check_percent_code_qualifiers. Use b4_get_percent_code.
1580 * data/yacc.c: Likewise, and don't call m4_exit in
1581 b4_use_push_for_pull_if or m4_wrap code will never execute.
1582 * src/muscle_tab.c, src/muscle_tab.h (muscle_grow_used_name_list):
1584 (muscle_grow_user_name_list): ... this for consistency with the
1585 terminology used in bison.m4.
1586 * src/parse-gram.y (prologue_declaration): Prepend "percent_define_" to
1587 %define variable names, and rename muscle used_percent_define_variables
1588 to user_percent_define_variables.
1589 (grammar_declaration): Rename muscle used_percent_code_qualifiers to
1590 user_percent_code_qualifiers.
1592 (content.opt): Replace content RHS with STRING RHS so %define "NAME"
1593 {CODE} form is no longer accepted.
1594 * tests/input.at (Reject bad %code qualifiers): Rename to...
1595 (Reject unused %code qualifiers): ... this, and update test output.
1596 (%define error): Update test output.
1598 2007-01-07 Joel E. Denny <jdenny@ces.clemson.edu>
1600 Check for unrecognized %define variables similar to checking for
1601 unrecognized %code qualifiers. Check for redefined %define variables.
1602 * data/bison.m4 (b4_check_for_unrecognized_names): New macro that
1604 (b4_check_percent_code_qualifiers): ... this, which now wraps it.
1605 (b4_check_percent_define_variables): New, also wraps it.
1606 * data/glr.c: Unless glr.cc is wrapping glr.c, declare no valid %define
1607 variables using b4_check_percent_define_variables.
1608 * data/glr.cc, data/lalr1.cc: Declare the valid %define variables as
1609 all those exercised in the test suite and all those listed in the
1610 `Default values' section of c++.m4. Are there others?
1611 * data/push.c, data/yacc.c: Declare no valid %define variables.
1612 * src/muscle_tab.c, src/muscle_tab.h (muscle_find_const): New function,
1613 similar to muscle_find, but it works even when the muscle stores a
1615 (muscle_grow_used_name_list): New function for constructing the used
1616 name list muscles that b4_check_for_unrecognized_names requires.
1617 * src/parse-gram.y (prologue_declaration): Warn if a variable is
1618 %define'd more than once. Define the b4_used_percent_define_variables
1619 muscle with muscle_grow_used_name_list.
1620 (grammar_declaration): Abbreviate %code code with
1621 muscle_grow_used_name_list.
1622 * tests/input.at (%define errors): New.
1624 2007-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
1626 Provide warn_at, complain_at, and fatal_at function callbacks to the
1627 skeletons, and use this for %code qualifier complaints.
1628 * data/bison.m4 (b4_error_at): New, invoked by...
1629 (b4_warn_at, b4_complain_at, b4_fatal_at): ... these new macros to wrap
1630 the skeleton scanner's new @warn_at(...@), @complain_at(...@), and
1631 @fatal_at(...@) directives.
1632 (b4_check_percent_code_qualifiers): Rewrite to expect locations for
1633 qualifiers in b4_used_percent_code_qualifiers and to use
1635 * src/location.c, src/location.h (boundary_set_from_string): New global
1637 * src/muscle_tab.c, src/muscle_tab.h (muscle_boundary_grow): New global
1639 * src/parse-gram.y (grammar_declaration): Add locations for qualifiers
1640 to b4_used_percent_code_qualifiers.
1641 * src/scan-skel.l (fail_for_at_directive_too_few_args): New static
1643 (AT_DIRECTIVE_ARGC_MAX): Increase for boundary arguments.
1644 (lineno): Rename to...
1645 (out_lineno): ... this so I don't misunderstand it again.
1646 (SC_AT_DIRECTIVE_SKIP_WS): Don't increment out_lineno for newlines
1647 here; these newlines are in the input but not the output file.
1648 (SC_AT_DIRECTIVE_ARG): Likewise. Extract directive execution to...
1649 (at_directive_perform): ... this new static function, and add handling
1650 of new @warn_at(...@), @complain_at(...@), and @fatal_at(...@)
1652 * tests/input.at (Reject bad %code qualifiers): Update test output with
1653 locations and extend.
1655 * tests/output.at (Output file name: [, Output file name: ]): Remove
1656 bogus comment about these tests failing.
1658 2007-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
1660 Clean up b4_check_percent_code_qualifiers a little.
1661 * data/bison.m4 (b4_check_percent_code_qualifiers): Expect qualifiers
1662 in b4_used_percent_code_qualifiers to be double-M4-quoted. Rewrite
1663 documentation and add examples.
1664 * src/parse-gram.y (grammar_declaration): Double-M4-quote those
1667 2007-01-05 Joel E. Denny <jdenny@ces.clemson.edu>
1669 Don't use m4_divert since it makes m4_divert_push and m4_divert_pop
1670 unreliable -- especially when they're hidden inside another macro.
1671 * data/bison.m4, data/c++-skel.m4, data/c++.m4, data/c-skel.m4,
1672 data/c.m4: Remove m4_divert(-1).
1673 * data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
1674 data/push.c, data/yacc.c: Likewise, and replace m4_divert(0) with
1675 m4_divert_push(0) and m4_divert_pop(0).
1676 * src/output.c (output_skeleton): Don't add an m4_divert_push(0) and
1677 an m4_wrap([m4_divert_pop(0)]) to the M4. Diversion -1, which is
1678 pushed and popped by m4sugar, should be first on the stack.
1680 Provide warn, complain, and fatal function callbacks to the skeletons.
1681 This provides more flexibility than m4_fatal, improves the error
1682 message format, and captures messages for translation. Discussed
1684 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00063.html>.
1685 * data/bison.m4 (b4_error): New, invoked by...
1686 (b4_warn, b4_complain, b4_fatal): ... these new macros to wrap the
1687 skeleton scanner's new @warn(...@), @complain(...@), and @fatal(...@)
1688 directives. Because these M4 macros might be called when the current
1689 diversion is -1 or 0, m4_divert_push and m4_divert_pop is used; thus
1690 the previous removal of uses of m4_divert, which caused trouble.
1691 (b4_check_percent_code_qualifiers): Use b4_complain instead of
1692 m4_fatal to report unrecognized %code qualifiers.
1693 * data/c++-skel.m4: Use b4_complain instead of m4_fatal to report C++
1694 push parser requests.
1695 * data/glr.c: Use b4_complain instead of m4_fatal to report
1696 non-deterministic push parser requests.
1697 Update @output usage to @output(...@) form.
1698 * data/glr.cc, data/lalr1.cc: Use b4_fatal instead of m4_fatal to
1699 report missing %defines. Update @output usage to @output(...@) form.
1700 * data/location.cc, data/push.c, data/yacc.c: Update @output usage to
1702 * src/main.c (main): Invoke skel_scanner_free.
1703 * src/scan-skel.h (skel_scanner_free): Prototype new function.
1704 * src/scan-skel.l (FLEX_NO_OBSTACK): Don't define; we now need the
1705 obstack_for_string from flex-scanner.h.
1706 (YY_DECL): Use to declare skel_lex static.
1707 (decode_at_digraphs): Remove; now handled in the new
1708 SC_AT_DIRECTIVE_ARG start condition.
1709 (fail_for_at_directive_too_many_args, fail_for_invalid_at): New static
1711 (at_directive_name, AT_DIRECTIVE_ARGC_MAX, at_directive_argc,
1712 at_directive_argv): New static globals.
1713 (INITIAL): Use fail_for_invalid_at.
1714 Don't parse `@output file_name\n' or `@basename(...@)'. Instead,
1715 recognize the start of a generalized `@directive(...@)' form and
1717 (SC_AT_DIRECTIVE_ARG): ... this new start condition to parse the
1718 directive args (using the new obstack_for_string), to decode the
1719 contained @ diagraphs, and to perform the directive. It recognizes
1720 @basename(...@), @warn(...@), @complain(...@), @fatal(...@), and
1722 (SC_AT_DIRECTIVE_SKIP_WS): New start condition started by
1723 SC_AT_DIRECTIVE_ARG to skip whitespace after the argument delimiter,
1725 (scan_skel): Initialize obstack_for_string on the first call.
1726 (skel_scanner_free): New function to free obstack_for_string.
1727 * tests/input.at (Reject bad %code qualifiers): Update test output.
1729 2007-01-04 Joel E. Denny <jdenny@ces.clemson.edu>
1731 Consolidate the 4 prologue alternative directives (%code, %requires,
1732 %provides, and %code-top) into a single %code directive with an
1733 optional qualifier field. Discussed at
1734 <http://lists.gnu.org/archive/html/bison-patches/2007-01/msg00012.html>.
1735 * NEWS (2.3a+): Rewrite the existing entry for the prologue
1737 * doc/bison.texinfo (Prologue Alternatives): Update.
1738 (Decl Summary): Update to %code "requires" and %code "provides".
1739 (Calc++ Parser): Update to %code "requires".
1740 (Table of Symbols): Remove entries for %requires, %provides, and
1741 %code-top. Rewrite %code entry, and add a %code "QUALIFIER" entry.
1742 * data/bison.m4 (b4_user_provides, b4_user_requires): Remove as these
1743 are replaced by b4_percent_code_provides and b4_percent_code_requires,
1744 which are skeleton-specific.
1745 (b4_check_percent_code_qualifiers): New. A skeleton can use this to
1746 declare what %code qualifiers it supports and to complain if any other
1747 qualifiers were used in the grammar.
1748 * data/glr.cc: Update to use b4_user_code([b4_percent_code_requires])
1749 and b4_user_code([b4_percent_code_provides]) in place of
1750 b4_user_requires and b4_user_provides.
1751 * data/glr.c, data/lalr1.cc, data/push.c, data/yacc.c: Likewise.
1752 Add b4_user_code([b4_percent_code_top]) and
1753 b4_user_code([b4_percent_code]).
1754 Invoke b4_check_percent_code_qualifiers.
1755 * src/parse-gram.y (PERCENT_CODE_TOP, PERCENT_PROVIDES,
1756 PERCENT_REQUIRES): Remove.
1757 (grammar_declaration): Remove RHS's for %code-top, %provides, and
1758 %requires. Rewrite the %code RHS as the unqualified form defining the
1759 muscle b4_percent_code. Add another RHS for the qualified %code form,
1760 which defines muscles of the form b4_percent_code_QUALIFIER and the
1761 b4_used_percent_code_qualifiers muscle.
1762 * src/scan-gram.l (PERCENT_CODE_TOP, PERCENT_PROVIDES,
1763 PERCENT_REQUIRES): Remove.
1764 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Update to use
1765 %code "requires" and %code "provides".
1766 * tests/input.at (Reject bad %code qualifiers): New.
1768 2007-01-03 Joel E. Denny <jdenny@ces.clemson.edu>
1770 Use the new code_props interface for destructors and printers.
1771 * src/symtab.h (symbol, semantic_type): Remove destructor_location and
1772 printer_location members, and change the type of the destructor and
1773 printer members to code_props.
1774 (symbol_destructor_set, symbol_destructor_get, symbol_printer_set,
1775 symbol_printer_get, semantic_type_destructor_set,
1776 semantic_type_printer_set, default_tagged_destructor_set,
1777 default_tagless_destructor_set, default_tagged_printer_set,
1778 default_tagless_printer_set): Use code_props in arguments and return
1779 types in place of char const * and location.
1780 (symbol_destructor_location_get, symbol_printer_location_get): Remove
1781 since the locations are now contained in the return of
1782 symbol_destructor_get and symbol_printer_get.
1783 * src/output.c (symbol_destructors_output, symbol_printers_output):
1785 (symbol_code_props_output): ... this to eliminate duplicate code.
1786 (output_skeleton): Update to use symbol_code_props_output.
1787 * src/reader.c (symbol_should_be_used): Update use of
1788 symbol_destructor_get.
1789 * src/symlist.c (symbol_list_destructor_set, symbol_list_printer_set):
1790 Update uses of the various _destructor_set and _printer_set functions.
1791 * src/symtab.c: (default_tagged_destructor_location,
1792 default_tagless_destructor_location, default_tagged_printer_location,
1793 default_tagless_printer_location): Remove since we...
1794 (default_tagged_destructor, default_tagless_destructor,
1795 default_tagged_printer, default_tagless_printer): ... change the type
1796 of these to code_props.
1797 (symbol_new, semantic_type_new, symbol_destructor_set,
1798 semantic_type_destructor_set, symbol_destructor_get,
1799 symbol_printer_set, semantic_type_printer_set, symbol_printer_get,
1800 symbol_check_alias_consistency, default_tagged_destructor_set,
1801 default_tagless_destructor_set, default_tagged_printer_set,
1802 default_tagless_printer_set): Update.
1803 (symbol_destructor_location_get, symbol_printer_location_get): Remove.
1804 (SYMBOL_CODE_PRINT): New similar to SYMBOL_ATTR_PRINT but for
1806 (symbol_print): Use SYMBOL_CODE_PRINT.
1808 2007-01-03 Joel E. Denny <jdenny@ces.clemson.edu>
1810 Use the new code_props interface for rule actions.
1811 * src/symlist.h (symbol_list): Replace action, action_location, and
1812 used members with a code_props action_props member.
1813 * src/reader.c (symbol_should_be_used, grammar_rule_check,
1814 grammar_midrule_action, grammar_current_rule_merge_set,
1815 grammar_current_rule_symbol_append, packgram): Update.
1816 * src/scan-code.h (translate_rule_action): Remove, no longer used.
1817 * src/scan-code.l (handle_action_dollar): Update.
1818 (translate_rule_action): Remove, no longer used.
1819 * src/symlist.c (symbol_list_sym_new, symbol_list_syms_print): Update.
1821 2007-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
1823 Use the new code_props interface in parse-gram.y.
1824 * src/parse-gram.y (prologue_declaration, braceless, epilogue.opt):
1825 Update all uses of translate_* functions to use the new code_props
1826 interface and to use gram_scanner_last_string_free and
1827 code_scanner_last_string_free where possible.
1828 (grammar_declaration): symbol_list_destructor_set and
1829 symbol_list_printer_set now perform the translation, so don't do it
1830 here. Use gram_scanner_last_string_free where possible.
1831 * src/scan-code.h, src/scan-code.l (translate_symbol_action,
1832 translate_code): Remove, no longer used.
1833 * src/symlist.h, src/symlist.c (symbol_list_destructor_set,
1834 symbol_list_printer_set): Perform code translation here rather than
1835 depending on the caller to do so.
1837 * src/symlist.h (struct symbol_list): Correct some documentation typos.
1838 * src/scan-gram.h (gram_last_string): Remove declaration.
1839 * src/scan-gram.l (last_string): Declare it static.
1841 2007-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
1843 Encapsulate code properties and related functionality for the various
1844 destructors, printers, and actions into a code_props structure and
1845 interface. This patch merely implements code_props in scan-code.h and
1846 scan-code.l. Future patches will rewrite other modules to use it.
1847 Discussed starting at
1848 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00020.html>.
1849 * src/location.h (EMPTY_LOCATION_INIT): Define so that it's easier to
1850 consistently initialize const structs that have an empty location
1852 * src/location.c (empty_location): Initialize with EMPTY_LOCATION_INIT
1853 to ensure consistency.
1854 * src/scan-code.h (code_props): New structure.
1855 (code_props_none_init, CODE_PROPS_NONE_INIT, code_props_none): New
1856 function, macro, and const global variable for initializing a
1857 code_props with no code.
1858 (code_props_plain_init, code_props_symbol_action_init,
1859 code_props_rule_action_init, code_props_translate_code): The rest of
1860 the new code_props functional interface. Among other things, the init
1861 functions set the code_props kind field so that
1862 code_props_translate_code will know whether to behave like
1863 translate_symbol_action, translate_rule_action, or translate_code.
1864 These old translate functions must remain until all other modules are
1865 updated to use the new code_props interface.
1866 (code_scanner_last_string_free): New function similar to
1867 gram_scanner_last_string_free.
1868 (code_scanner_free): Add documentation.
1869 * src/scan-code.l: Implement the new interface.
1870 (code_lex): Make it static, add a code_props* argument, and remove the
1872 (last_string): New static global similar to the one in scan-gram.l.
1873 (SC_RULE_ACTION): Update to use the code_props* argument to code_lex
1875 (SC_SYMBOL_ACTION): For $$, set the is_value_used member of the
1876 code_props since Bison may one day use this information for destructors
1878 (<*><<EOF>>): Use STRING_FINISH so that last_string is set.
1879 (handle_action_dollar): Use symbol_list_n_get and set used flag
1880 directly since symbol_list_n_used_set is removed.
1881 (translate_action): Add a code_props* argument and remove the rule,
1882 action, and location arguments. Pass the code_props* on to code_lex.
1883 (translate_rule_action, translate_symbol_action, translate_code):
1884 Rewrite as wrappers around the new code_props interface.
1885 * src/symlist.h, src/symlist.c (symbol_list_n_used_set): Remove since
1886 it would eventually need to break the encapsulation of code_props.
1888 2007-01-01 Joel E. Denny <jdenny@ces.clemson.edu>
1890 * etc/.cvsignore: New.
1892 2007-01-01 Joel E. Denny <jdenny@ces.clemson.edu>
1894 Add maintainer-push-check to run maintainer-check using push parsing in
1895 place of pull parsing where available.
1896 * Makefile.am (maintainer-push-check): New.
1897 * data/bison.m4 (b4_use_push_for_pull_if): New.
1898 * data/push.c: Redefine b4_push_if and b4_use_push_for_pull_if
1899 appropriately based on their existing values.
1900 (yypush_parse): Don't print push-parser-specific diagnostics if push
1901 parsing is being used in place of pull parsing.
1902 * data/yacc.c: If push parsing should replace pull parsing, redirect to
1904 * src/output.c (prepare): Check BISON_USE_PUSH_FOR_PULL environment
1905 variable, and insert b4_use_push_for_pull_flag into muscles.
1906 * tests/Makefile.am (maintainer-push-check): New.
1908 2006-12-31 Joel E. Denny <jdenny@ces.clemson.edu>
1910 * data/push.c (yypush_parse): Set yynew = 1 at the end of a parse
1911 (whether successful or failed) so that yypush_parse can be invoked
1912 again to start a new parse using the same yypstate.
1913 * tests/torture.at (AT_DATA_STACK_TORTURE): For push mode, extend to
1914 check multiple yypull_parse invocations on the same yypstate. For pull
1915 mode, extend to check multiple yyparse invocations.
1916 (Exploding the Stack Size with Alloca): Extend to try with
1918 (Exploding the Stack Size with Malloc): Likewise.
1920 * tests/calc.at (Simple LALR Calculator): Don't specify
1921 %skeleton "push.c" since %push-pull-parser implies that now.
1922 * tests/headers.at (export YYLTYPE): Don't check for the push
1923 declarations. Otherwise, this test case can't be used to see if push
1924 mode can truly emulate pull mode.
1925 * tests/input.at (Torturing the Scanner): Likewise.
1926 * tests/local.at (AT_YACC_OR_PUSH_IF, AT_PUSH_IF): Remove.
1927 (AT_YYERROR_SEES_LOC_IF): Rather than AT_YACC_OR_PUSH_IF, use
1928 AT_YACC_IF, which now includes the case of push mode since %skeleton
1929 need not be used for push mode. This will be more intuitive once
1930 push.c is renamed to yacc.c.
1932 2006-12-31 Joel E. Denny <jdenny@ces.clemson.edu>
1934 For push mode, convert yyparse from a macro to a function, invoke yylex
1935 instead of passing a yylexp argument to yypull_parse, and don't
1936 generate yypull_parse or yyparse unless %push-pull-parser is declared.
1937 Discussed starting at
1938 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00163.html>.
1939 * data/bison.m4 (b4_pull_if): New.
1940 * data/c.m4 (b4_identification): Define YYPULL similar to YYPUSH.
1941 * data/push.c: Improve M4 quoting a little.
1942 (b4_generate_macro_args, b4_parenthesize): Remove.
1943 (yyparse): If there's a b4_prefix, #define this to b4_prefix[parse]
1944 any time a pull parser is requested.
1945 Don't #define this as a wrapper around yypull_parse. Instead, when
1946 both push and pull are requested, make it a function that does that
1948 (yypull_parse): If there's a b4_prefix, #define this to
1949 b4_prefix[pull_parse] when both push and pull are requested.
1950 Don't define this as a function unless both push and pull are
1952 Remove the yylexp argument and hard-code yylex invocation instead.
1953 * etc/bench.pl.in (bench_grammar): Use %push-pull-parser instead of
1955 * src/getargs.c (pull_parser): New global initialized to true.
1956 * getargs.h (pull_parser): extern it.
1957 * src/output.c (prepare): Insert pull_flag muscle.
1958 * src/parse-gram.y (PERCENT_PUSH_PULL_PARSER): New token.
1959 (prologue_declaration): Set both push_parser and pull_parser = true for
1960 %push-pull-parser. Set push_parser = true and pull_parser = false for
1962 * src/scan-gram.l: Don't accept %push_parser as an alternative to
1963 %push-parser since there's no backward-compatibility concern here.
1964 Scan %push-pull-parser.
1965 * tests/calc.at (Simple LALR(1) Calculator): Use %push-pull-parser
1966 instead of %push-parser.
1967 * tests/headers.at (export YYLTYPE): Make yylex static, and don't
1968 prototype it in the module that calls yyparse.
1969 * tests/input.at (Torturing the Scanner): Likewise.
1970 * tests/local.at (AT_PUSH_IF): Check for %push-pull-parser as well.
1972 2006-12-26 Joel E. Denny <jdenny@ces.clemson.edu>
1974 Update etc/bench.pl. Optimize push mode a little (the yyn change
1975 deserves most of the credit).
1976 * Makefile.am (SUBDIRS): Add etc subdirectory.
1977 * configure.ac (AC_CONFIG_FILES): Add etc/bench.pl and etc/Makefile.
1978 * data/push.c (b4_declare_parser_state_variables): Move yyn, yyresult,
1979 yytoken, yyval, and yyloc declarations to...
1980 (yyparse or yypush_parse): ... here to improve performance. For
1981 yypush_parse invocations after the first, be sure to assign yyn its old
1983 (yypstate_new): Don't bother initializing the yyresult field since the
1984 initial value isn't used.
1985 (yyn, yyresult, yytoken, yyval, yyloc): For each NAME in this list,
1986 remove the #define that, in push mode, set it to yyps->NAME.
1987 * etc/Makefile.am: New.
1988 * etc/bench.pl: Remove and build it instead from...
1989 * etc/bench.pl.in: ... this new file. Use @abs_top_builddir@ to invoke
1990 "tests/bison" from the build directory by default rather than just
1991 invoking "bison" from $PATH.
1992 (calc_grammar): Update push parser code: don't declare yylval globally,
1993 don't define yyparse_wrapper, and don't #define yyparse.
1994 (bench_grammar): Update to check all working combinations of yacc.c,
1995 push.c, impure, pure, pull, and push.
1997 2006-12-25 Joel E. Denny <jdenny@ces.clemson.edu>
1999 For push mode, add pull wrappers around yypush_parse.
2000 * data/push.c: (b4_generate_macro_args, b4_parenthesize): New macros.
2001 (yypull_parse): New function wrapping yypush_parse.
2002 (yyparse): New #define wrapping yypull_parse.
2003 * tests/calc.at (_AT_DATA_CALC_Y): Call yyparse even when %push-parser
2005 * tests/headers.at (export YYLTYPE): Make yylex global. For push mode,
2006 prototype yylex in the module that calls yyparse, and don't prototype
2007 yyparse there. Otherwise, the yyparse expansion won't compile.
2008 * tests/input.at (Torturing the Scanner): Likewise.
2010 2006-12-25 Joel E. Denny <jdenny@ces.clemson.edu>
2012 Enable push parsers to operate in impure mode. Thus, %push-parser no
2013 longer implies %pure-parser. The point of this change is to move
2014 towards being able to test the push parser code by running the entire
2015 test suite as if %push-parser had been declared.
2016 * data/push.c (yypush_parse): For impure mode, remove the
2017 yypushed_char, yypushed_val, and yypushed_loc arguments.
2018 Instead, declare these as local variables initialized to the global
2019 yychar, yylval, and yylloc.
2020 For the first yypush_parse invocation only, restore the initial values
2021 of these global variables when it's time to read a token since they
2022 have been overwritten.
2023 * src/parse-gram.y (prologue_declaration): Don't set pure_parser for
2025 * tests/calc.at (Simple LALR(1) Calculator): Always declare
2026 %pure-parser along with %push-parser since this test case was designed
2027 for pure push parsers.
2028 * tests/local.at (AT_PURE_OR_PUSH_IF): Remove unused.
2029 (AT_YACC_OR_PUSH_IF): New.
2030 (AT_YYERROR_SEES_LOC_IF): Fix enough that the test suite passes, but
2031 add a note that it's still wrong for some cases (as it has been for a
2033 (AT_PURE_LEX_IF): Use AT_PURE_IF instead of AT_PURE_OR_PUSH_IF since
2034 %push-parser no longer implies %pure-parser.
2036 2006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
2038 Remove some unnecessary differences between the pull parser code and
2039 the push parser code. This patch enables yynerrs in push mode.
2040 * data/push.c: Reformat M4 a little.
2041 (b4_yyerror_range): Remove and convert all uses to just yyerror_range.
2042 (b4_declare_scanner_communication_variables): Don't omit yynerrs just
2043 because push mode is on. Instead, if pure mode is on, move yynerrs
2045 (b4_declare_parser_state_variables): ... here.
2046 (yynerrs, yyerror_range): For push mode, #define each NAME in this list
2047 to yyps->NAME so it can be used in yypush_parse.
2048 (yypush_parse): Don't omit uses of yynerrs in push mode.
2050 2006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
2052 Fix bug such that the first pushed token's value and location are
2053 sometimes overwritten (sometimes by %initial-action) before being used.
2054 * data/push.c (yypush_parse): Rename arguments yynchar, yynlval, and
2055 yynlloc to yypushed_char, yypushed_val, and yypushed_loc for clarity.
2056 For the first yypush_parse invocation, initialize yychar to YYEMPTY to
2057 more closely mimic the pull parser logic.
2058 Don't copy the pushed token to yychar, yylval, and yylloc until it's
2059 time to read a token, which is after any initialization of yylval and
2061 (gottoken): Rename label to...
2062 (yyread_pushed_token): ... for clarity and to avoid infringing on the
2065 2006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
2067 Rearrange initialization of the parser state variables so that the
2068 skeleton doesn't have to have a copy for pull mode and another for push
2069 mode. This patch also fixes at least a bug such that yylloc was not
2070 initialized (with b4_location_initial_line and
2071 b4_location_initial_column) upon calling yypush_parse. However, that
2072 initialization now overwrites the first token's location;
2073 %initial-action assigning @$ already did the same thing, and both bugs
2074 will be fixed in a later patch.
2075 * data/push.c (b4_yyssa): Remove and convert all uses to just yyssa.
2076 (b4_declare_parser_state_variables): Remove initialization of yytoken,
2077 yyss, yyvs, yyls, and yystacksize.
2078 (yypstate_new): Remove initialization of some yypstate fields: yystate,
2079 yyerrstatus, yytoken, yyss, yyvs, yyls, yystacksize, yyssp, yyvsp, and
2081 (yyssa, yyvsa, yylsa): For push mode, #define each NAME in this list to
2082 yyps->NAME so it can be used in yypush_parse.
2083 (yyparse or yypush_parse): For yypush_parse, don't print the
2084 "Starting parse" diagnostic for invocations after the first.
2085 Add initialization of yytoken, yyss, yyvs, yyls, and yystacksize; for
2086 yypush_parse, only do it for the first invocation.
2087 Allow yystate, yyerrstatus, yyssp, yyvsp, yylsp, and yylloc
2088 initialization to occur in yypush_parse but only on the first
2091 2006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
2093 * data/push.c: Add CPP guards around push parser declarations in both
2094 the header and the code file.
2095 In the code file, move the push parser declarations to the same place
2096 they appear in the header file.
2097 Clean up the M4 some, especially the inconsistent underquoting in
2098 some b4_c_function_def and b4_c_function_decl uses.
2100 2006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
2102 Encapsulate the push parser state variables into an M4 macro so the
2103 push skeleton doesn't have to list them again for pull mode's yyparse.
2104 For push mode, remove yypush_parse's local equivalents of these
2105 variables to eliminate unnecessary copying between the two sets at
2106 run-time. This patch also fixes at least a bug related to multiple
2107 %initial-action invocations in push mode.
2108 * data/push.c (b4_declare_parser_variables): Rename to...
2109 (b4_declare_scanner_communication_variables): ... this for clarity and
2111 (b4_declare_yyparse_variables): Remove and move its contents to the one
2112 spot where it was invoked.
2113 (b4_declare_parser_state_variables): New macro containing the parser
2114 state variables required by push mode.
2115 (struct yypstate): Replace all fields but yynew with
2116 b4_declare_parser_state_variables.
2117 (yystate, yyn, yyresult, yyerrstatus, yytoken, yyss, yyssp, yyvs,
2118 yyvsp, yyls, yylsp, yystacksize, yyval, yyloc): For push mode, #define
2119 each NAME in this list to yyps->NAME so it can be used in yypush_parse.
2120 (yyparse or yypush_parse): For yyparse in pull mode, replace local
2121 parser state variable declarations with
2122 b4_declare_parser_state_variables.
2123 Don't initialize parser state variables when calling yypush_parse since
2124 yypstate_new already does that.
2125 Invoke the user's initial action only upon the first yypush_parse
2127 Remove all code that copies between the local parser state variables
2130 2006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
2132 * data/push.c (union yyalloc): Rename yyss, yyvs, and yyls fields to
2133 prevent a name collision in a future patch where these names will
2134 sometimes be #define'd.
2135 (YYSTACK_RELOCATE): Add an argument to select a union yyalloc field
2136 since it no longer has the same name as the existing argument.
2137 (yyparse or yypush_parse): Update all uses of YYSTACK_RELOCATE.
2139 2006-12-19 Paolo Bonzini <bonzini@gnu.org>
2140 and Joel E. Denny <jdenny@ces.clemson.edu>
2142 * doc/bison.texinfo (Decl Summary): In the %language entry, mention
2143 that the argument is case-insensitive, and there's no `=' here.
2144 For the %skeleton entry, mention that %language is better.
2145 (Bison Options): Likewise for --language and --skeleton. Move the
2146 --skeleton entry so that the `Tuning the parser' section is sorted
2147 alphabetically on long options.
2148 (C++ Bison Interface): Don't use the word skeleton. Don't explain the
2149 %language directive in detail here; cross-reference the %language
2150 documentation instead.
2151 (Calc++ Parser): Use `%require "@value{VERSION}"' rather than
2152 `%require "2.3b"' so that the example is always up-to-date.
2153 (Table of Symbols): Add entries for %language and %skeleton.
2154 * examples/extexi (normalize): Instead of replacing every %require
2155 argument with the current Bison version, just substitute for
2156 `@value{VERSION}'. This guarantees that we're testing what actually
2157 appears in the documentation.
2158 * examples/calc++/Makefile.am ($(calc_extracted)): Use `$(VERSION)'
2159 rather than `@VERSION@'.
2161 2006-12-18 Paul Eggert <eggert@cs.ucla.edu>
2163 * NEWS: Reword the %language news a bit, and put it earlier.
2165 * src/getargs.c (skeleton_arg): Last arg is now location const *.
2166 Rewrite to simplify the logic.
2167 (language_argmatch): Likewise.
2168 (program_name): We now own this var.
2169 * src/getargs.h (struct bison_language): Use char[] rather than
2172 * doc/bison.texinfo (Decl Summary, Bison Options): Don't claim
2174 * src/complain.c (program_name): Remove decl; no longer needed.
2175 * src/main.c (program_name): Remove; now belongs to getargs.
2177 2006-12-18 Paolo Bonzini <bonzini@gnu.org>
2179 * NEWS: Document %language.
2181 * data/Makefile.am (dist_pkgdata_DATA): Add c-skel.m4, c++-skel.m4.
2183 * data/c-skel.m4, data/c++-skel.m4: New files.
2184 * data/glr.c: Complain on push parsers.
2186 * doc/bison.texinfo (C++ Parser Interface): Prefer %language
2188 (Decl Summary): Document %language and %skeleton.
2189 (Command line): Document -L.
2191 * examples/extexi: Rewrite %require directive.
2192 * examples/calc++/Makefile.am: Pass VERSION to extexi.
2194 * src/files.c (compute_exts_from_gc): Look in language structure
2196 (compute_file_name_parts): Check whether .tab should be added.
2197 * src/getargs.c (valid_languages, skeleton_prio, language_prio):
2198 (language, skeleton_arg, language_argmatch): New.
2199 (long_options): Add --language.
2200 (getargs): Use skeleton_arg, add -L/--language.
2201 * src/getargs.h: Include location.h.
2202 (struct bison_language, language, skeleton_arg, language_argmatch): New.
2203 * src/output.c (prepare): Pick default skeleton from struct language.
2204 Don't dispatch C skeletons here.
2205 * src/parse-gram.y (PERCENT_LANGUAGE): New.
2206 (prologue_declaration): Add "%language" rule, use skeleton_arg.
2207 * src/scan-gram.l ("%language"): New rule.
2209 * tests/calc.at: Test %skeleton and %language.
2210 * tests/local.at (AT_SKEL_CC_IF): Look for %language.
2211 (AT_GLR_IF): Look for %skeleton "glr.cc".
2212 (AT_LALR1_CC_IF, AT_GLR_CC_IF): Rewrite.
2213 (AT_YACC_IF): Reject %language.
2215 2006-12-18 Paul Eggert <eggert@cs.ucla.edu>
2217 * src/symtab.h (struct semantic_type): Remove the tag 'semantic_type',
2218 since it wasn't used; only the typedef name 'semantic_type' is needed.
2219 Also, omit trailing white space.
2221 * bootstrap: Sync from coreutils.
2222 (gnulib_extra_files): Add build-aux/announce.gen.
2223 (slurp): Adjust .gitignore files like .cvsignore files.
2224 * build-aux/announce-gen: Remove from CVS, since bootstrap
2227 2006-12-16 Joel E. Denny <jdenny@ces.clemson.edu>
2229 Make %push-parser imply %pure-parser. This fixes several bugs; see
2230 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00148.html>.
2231 * src/parse-gram.y (prologue_declaration): For %push-parser, also set
2233 * data/push.c: Don't bother testing b4_push_if when deciding whether
2234 to expand b4_declare_parser_variables globally.
2235 (yypush_parse): Likewise in here.
2237 * data/push.c (yypush_parse): Add b4_parse_param to arguments.
2238 (yy_reduce_print): Reformat M4 for readability.
2240 2006-12-15 Bob Rossi <bob@brasko.net>
2241 and Joel Denny <jdenny@ces.clemson.edu>
2243 * data/push.c (yypstate): Add typedef, and update all uses of
2244 struct yypstate to just yypstate.
2245 * tests/calc.at (_AT_DATA_CALC_Y): Update here as well.
2247 2006-12-14 Bob Rossi <bob@brasko.net>
2249 * data/push.c (yypush_parse): Declare prototype regardless of
2252 2006-12-14 Bob Rossi <bob@brasko.net>
2254 * data/push.c (yyparse): Remove the prototype and the #define when in
2257 2006-12-13 Bob Rossi <bob@brasko.net>
2259 * data/push.c (yypstate_init): Rename to...
2260 (yypstate_new): ... this and use b4_c_function_def.
2261 (yypstate_delete): New.
2262 (yypush_parse): Change parameters yynval and yynlloc to be const.
2263 * tests/calc.at (_AT_DATA_CALC_Y): Use new yypstate_new and
2264 yypstate_delete functions.
2266 2006-12-13 Joel E. Denny <jdenny@ces.clemson.edu>
2268 * configure.ac (AC_PREREQ): Require Autoconf 2.61 because of our
2269 strange test case titles. Reported by Bob Rossi.
2271 2006-12-13 Paul Eggert <eggert@cs.ucla.edu>
2273 * TODO: Add pointer to Sylvain Schmitz's work on static detection
2274 of potential ambiguities in GLR grammers.
2276 2006-12-12 Joel E. Denny <jdenny@ces.clemson.edu>
2278 * tests/testsuite.at (AT_CHECK): When checking if $1 starts with
2279 `bison ', use m4_index instead of m4_substr since chopping up a string
2280 containing M4-special characters causes problems here.
2282 Fix a couple of bugs related to special characters in user-specified
2283 file names, and make it easier for skeletons to compute output file
2284 names with the same file name prefix as Bison-computed output file
2286 * data/glr.cc, data/push.c, data/yacc.c: In @output, use
2287 b4_parser_file_name and b4_spec_defines_file instead of
2288 @output_parser_name@ and @output_header_name@, which are now redundant.
2289 * data/glr.c, data/lalr1.cc: Likewise. Also, in header #include's, use
2290 b4_parser_file_name, b4_spec_defines_file, and the new
2291 @basename(FILENAME@) instead of @output_parser_name@ and
2292 @output_header_name@, which inappropriately escaped the file names as
2294 * src/files.c (all_but_ext): Remove static qualifier.
2295 (compute_output_file_names): Move `free (all_but_ext)' to...
2296 (output_file_names_free): ... here since all_but_ext is needed later.
2297 * src/files.h (all_but_ext): Extern.
2298 * src/muscle_tab.h (MUSCLE_INSERT_STRING_RAW): New macro that does
2299 exactly what MUSCLE_INSERT_STRING used to do.
2300 (MUSCLE_INSERT_STRING): Use MUSCLE_OBSTACK_SGROW so that M4-special
2301 characters are escaped properly.
2302 * src/output.c (prepare): Define muscle file_name_all_but_ext as
2304 For pkgdatadir muscle, maintain previous functionality by using
2305 MUSCLE_INSERT_STRING_RAW instead of MUSCLE_INSERT_STRING. The problem
2306 is that b4_pkgdatadir is used inside m4_include in the skeletons, so
2307 digraphs would never be expanded. Hopefully no one has M4-special
2308 characters in his Bison installation path.
2309 * src/scan-skel.l: Don't parse @output_header_name@ and
2310 @output_parser_name@ anymore since they're now redundant.
2311 In @output, use decode_at_digraphs.
2312 Parse a new @basename command that invokes last_component.
2313 (decode_at_digraphs): New.
2314 (BASE_QPUTS): Remove unused.
2315 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): New macro.
2316 (Output file name): New tests.
2318 2006-12-09 Joel E. Denny <jdenny@ces.clemson.edu>
2320 Warn about output files that are generated by the skeletons and that
2321 conflict with other output files.
2322 * data/glr.c: Don't generate the header file here when glr.cc does.
2323 * src/files.c (file_names, file_names_count): New static globals.
2324 (compute_output_file_names): Invoke output_file_name_check for files
2325 not generated by the skeletons and remove existing checks.
2326 (output_file_name_check): New function that warns about conflicting
2328 (output_file_names_free): Free file_names.
2329 * src/files.h (output_file_name_check): Declare.
2330 * src/scan-skel.l: Invoke output_file_name_check for files generated by
2332 * tests/output.at (AT_CHECK_CONFLICTING_OUTPUT): New.
2333 (Conflicting output files): New tests.
2335 2006-12-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2337 * doc/bison.texinfo: Fix a couple of typos.
2339 2006-12-08 Bob Rossi <bob@brasko.net>
2341 * data/push.c: (yypvarsinit, yypvars, struct yypvars, yypushparse):
2343 (yypstate_init, yypstate, struct yypstate, yypush_parse): ... these and
2345 (b4_yyssa, b4_yyerror_range, yypstate_init): Rename pv to yyps.
2346 (yypush_parse): Rename yypvars argument to yyps and remove redundant
2348 (yypstate_init, yypush_parse): Declare in Bison-generated header file.
2349 * tests/calc.at (_AT_DATA_CALC_Y): Use newly named functions.
2351 2006-12-07 Bob Rossi <bob@brasko.net>
2352 and Joel Denny <jdenny@ces.clemson.edu>
2354 * data/push.c (yypvarsinit): Change return type from void* to struct
2355 yypvars*. No longer cast to void* on return.
2356 (struct yypvars): Remove yylen since it need not be remembered between
2357 yypushparse invocations.
2358 (yypushparse): Don't copy between yylen and pv->yylen.
2360 2006-12-05 Bob Rossi <bob@brasko.net>
2362 * data/push.c (yychar_set, yylval_set, yylloc_set): Delete.
2363 (yypushparse): Add yynchar, yynlval, yynlloc parameters.
2364 (b4_declare_parser_variables): Do not declare yynerrs for push mode.
2365 (struct yypvars): Remove b4_declare_parser_variables.
2366 (yypvarsinit): Remove init code for removed variables.
2367 (global scope): Do not declare b4_declare_parser_variables if
2369 (yypushparse): Add b4_declare_parser_variables.
2370 Init new local variables, and remove init code for removed
2373 * tests/calc.at (_AT_DATA_CALC_Y): Call yypushparse for push mode
2374 and yyparse for other modes.
2375 (AT_CHECK_CALC_LALR): Added '%skeleton "push.c"' for push tests.
2376 * tests/local.at (AT_PUSH_IF, AT_PURE_OR_PUSH_IF): Added.
2377 (AT_YYERROR_SEES_LOC_IF): push-parser makes this false.
2378 (AT_PURE_LEX_IF): True if pure or push parser.
2380 2006-12-05 Joel E. Denny <jdenny@ces.clemson.edu>
2382 Document Yacc prologue alternatives and default %destructor's and
2383 %printer's as experimental. Don't mention Java yet. Discussed at
2384 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00002.html>.
2385 * NEWS (2.3a+): Say they're experimental. Remove any mention of Java.
2386 (2.3a): Annotate this entry to say the old forms of these features were
2388 * doc/bison.texinfo (Prologue Alternatives, Freeing Discarded Symbols,
2389 Table of Symbols): Say they're experimental. Comment out any mention
2390 of Java (we'll want this back eventually).
2392 2006-12-01 Joel E. Denny <jdenny@ces.clemson.edu>
2394 Support a file name argument to %defines. Deprecate `=' in
2395 %file-prefix, %name-prefix, and %output. Discussed at
2396 <http://lists.gnu.org/archive/html/help-bison/2006-09/msg00001.html>.
2397 * NEWS (2.3a+): Mention.
2398 * doc/bison.texinfo (Decl Summary, Table of Symbols): Add entry for new
2399 form of %defines, and remove `=' from entries for %file-prefix,
2400 %name-prefix, and %output.
2401 * src/parse-gram.y (prologue_declaration): Implement.
2402 * tests/calc.at (Simple LALR Calculator, Simple GLR Calculator, Simple
2403 LALR1 C++ Calculator, Simple GLR C++ Calculator): Remove the `=' from
2404 all but one occurrence of %name-prefix.
2405 * tests/headers.at (export YYLTYPE): Remove the `=' from %name-prefix.
2406 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Likewise.
2407 * tests/output.at (AT_CHECK_OUTPUT): Remove the `=' from all but one
2408 occurrence of each of %file-prefix and %output. Add check for %defines
2410 * tests/reduce.at (Useless Terminals, Useless Nonterminals,
2411 Useless Rules, Reduced Automaton, Underivable Rules, Empty Language):
2412 Remove the `=' from %output.
2414 2006-11-21 Joel E. Denny <jdenny@ces.clemson.edu>
2416 Don't escape $ in test case titles since Autoconf 2.61 now does that
2418 * tests/actions.at (Default %printer and %destructor are not for error
2419 or $undefined): Here.
2420 (Default %printer and %destructor are not for $accept): Here.
2421 * tests/input.at (Invalid $n and @n): Here.
2423 2006-11-20 Joel E. Denny <jdenny@ces.clemson.edu>
2425 Rename <!> to <>. Discussed starting at
2426 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00039.html>.
2427 * NEWS (2.3a+): Update.
2428 * doc/bison.texinfo (Freeing Discarded Symbols, Table of Symbols):
2430 * src/parse-gram.y (TYPE_TAG_NONE, generic_symlist_item): Implement.
2431 * src/scan-gram.l (INITIAL): Implement.
2432 * src/symlist.c (symbol_list_default_tagless_new): Update comment.
2433 * src/symlist.h (symbol_list, symbol_list_default_tagless_new): Update
2435 * tests/actions.at (Default tagless %printer and %destructor,
2436 Default tagged and per-type %printer and %destructor,
2437 Default %printer and %destructor are not for error or $undefined,
2438 Default %printer and %destructor are not for $accept,
2439 Default %printer and %destructor for mid-rule values): Update.
2440 * tests/input.at (Default %printer and %destructor redeclared,
2441 Unused values with default %destructor): Update.
2443 2006-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
2445 Don't let %prec take a nonterminal.
2446 * src/reader.c (grammar_current_rule_prec_set): Make the %prec symbol a
2448 * tests/input.at (%prec takes a token): New test checking that %prec
2449 won't take a nonterminal.
2451 2006-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
2453 * tests/testsuite.at (AT_CHECK): Don't miss an exit value of 0 because
2454 it was double-quoted.
2455 * src/Makefile.am (YACC): Use --warnings=all,error so that Bison's own
2456 grammar is maintained with Bison's highest standards.
2457 * src/getargs.c: Fix some typos in Doxygen comments.
2459 2006-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
2461 Fix memory leaks in scanners generated by at least Flex 2.5.9 and
2462 later. Reported by Paul Eggert in
2463 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00014.html>.
2464 * src/flex-scanner.h (yylex_destroy): Define for Flex before 2.5.9.
2465 * src/scan-code.l (translate_action): Don't bother invoking
2466 yy_delete_buffer (YY_CURRENT_BUFFER) before creating the first buffer.
2467 (code_scanner_free): Instead of invoking
2468 yy_delete_buffer (YY_CURRENT_BUFFER) directly, invoke yylex_destroy,
2470 * src/scan-gram.l (gram_scanner_free): Likewise.
2471 * src/scan-skel.l (scan_skel): Likewise.
2473 2006-11-09 Joel E. Denny <jdenny@ces.clemson.edu>
2475 * src/files.c (tr): Change return type to void.
2476 * src/muscle_tab.c (muscle_insert): Free storage in case muscle_grow
2477 has been called previously for the same key.
2478 (muscle_find): Return storage instead of value so that
2479 --enable-gcc-warnings doesn't produce warnings that the return discards
2480 const. aver that the value and storage are the same since storage
2481 could potentially be NULL when value is not.
2482 * tests/testsuite.at (AT_CHECK): Treat an unspecified exit value the
2485 2006-11-08 Paul Eggert <eggert@cs.ucla.edu>
2487 * bootstrap.conf (excluded_files): Exclude m4/codeset.m4 (undoing
2488 the earlier change today), m4/intl.m4, m4/intldir.m4. This gives
2489 us a slightly cleaner distribution, and also works.
2490 * m4/.cvsignore: Add inline.m4, wint_t.m4 to accommodate recent
2493 2006-11-08 Joel E. Denny <jdenny@ces.clemson.edu>
2494 and Paul Eggert <eggert@cs.ucla.edu>
2496 Don't let Bison leak memory except when it complains.
2497 * src/files.h (parser_file_name, spec_verbose_file, spec_graph_file):
2498 (spec_defines_file, dir_prefix): Now char *, not const char *,
2499 since they are freed.
2500 * src/files.c: Likewise.
2501 (all_but_ext, all_but_tab_ext, src_extension, header_extension):
2503 (tr): Now operates in-place. All uses changed.
2504 (compute_exts_from_gf, compute_exts_from_src): Don't leak temporary
2506 (compute_file_name_parts, compute_output_file_names): Don't store
2507 read-only data in variables that will be freed.
2508 (compute_output_file_names): Free all_but_ext, all_but_tab_ext,
2509 src_extension, and header_extension.
2510 (output_file_names_free): New public function to free
2511 spec_verbose_file, spec_graph_file, spec_defines_file,
2512 parser_file_name, and dir_prefix.
2513 * src/getargs.c (getargs): Don't store read-only data in variables that
2515 * src/main.c (main): Invoke output_file_names_free, code_scanner_free
2516 (which previously existed but was unused), and quotearg_free.
2517 * src/muscle_tab.h (muscle_insert): value arg is now a `char const *'.
2518 * src/muscle_tab.c: Likewise.
2519 (muscle_entry): Make the value char const *,
2520 and add a new storage member that is char * and can be freed.
2521 (muscle_entry_free): New private function.
2522 (muscle_init): Use it instead of free.
2523 (muscle_insert, muscle_grow): Update and use new storage member.
2524 (muscle_code_grow): Free the string passed to muscle_grow
2525 since it's not needed anymore.
2526 * src/parse-gram.y (%union): Make `chars' member a `char const *', and
2527 add a new `char *code' member.
2528 ("{...}"): Declare semantic type as code.
2529 * src/scan-code.h (translate_rule_action):
2530 (translate_symbol_action, translate_code, translate_action): Return
2531 `char const *' rather than `char *' since external code should not free
2533 * src/scan-code.l: Likewise.
2534 * src/scan-gram.l (<SC_BRACED_CODE>): Use val->code for BRACED_CODE,
2535 which is "{...}" in the parser.
2536 * tests/Makefile.am (maintainer-check-valgrind): Set
2537 VALGRIND_OPTS='--leak-check=full --show-reacheable=yes' before invoking
2539 * tests/calc.at (_AT_DATA_CALC_Y): fclose the FILE* so Valgrind doesn't
2541 * tests/testsuite.at (AT_CHECK): Redefine so that running Bison and
2542 expecting a non-zero exit status sets --leak-check=summary and
2543 --show-reachable=no for Valgrind. Bison unabashedly leaks memory in
2544 this case, and we don't want to hear about it.
2546 2006-11-08 Paul Eggert <eggert@cs.ucla.edu>
2548 * bootstrap (runtime-po/Makevars): Derive from po/Makevars
2549 instead of from the template, to simplify configuration a bit.
2550 * bootstrap.conf (excluded_files): Don't exclude m4/codeset.m4
2551 and m4/wint_t.m4, as they are needed with the latest gnulib.
2553 2006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
2555 Disable unset/unused mid-rule value warnings by default, and recognize
2556 --warnings=midrule-values to enable them. Discussed starting at
2557 <http://lists.gnu.org/archive/html/help-bison/2006-10/msg00030.html>.
2558 * NEWS (2.3a+): Mention.
2559 * src/getargs.c, src/getargs.h (warnings_args, warnings_types, enum
2560 warnings): Add entry for midrule-values subargument.
2561 * src/reader.c (symbol_should_be_used): Don't return true just because
2562 the value is a set/used mid-rule value unless
2563 --warnings=midrule-values was specified.
2564 * tests/input.at (Unused values, Unused values before symbol
2565 declarations): Run tests with and without --warnings=midrule-values.
2567 * src/reader.c (check_and_convert_grammar): Use symbol_list_free rather
2568 than LIST_FREE directly.
2570 2006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
2572 Finish implementing --warnings=error, which should not be implied by
2573 --warnings=all (or by its synonyms -W and --warnings without
2575 * src/complain.c (set_warning_issued): New function to report that
2576 warnings are being treated as errors and to record an error if so.
2578 (warn_at, warn): ... here.
2579 * src/getargs.c (warnings_args, warnings_types): Reorder so that
2580 "error - warnings are errors" does not appear above "all - all of the
2582 (getargs): For -W and --warnings without subarguments, don't let
2583 FLAGS_ARGMATCH set warnings_error in warnings_flag.
2584 * src/getargs.h (enum warnings): Unset warnings_error in warnings_all.
2586 2006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
2588 * src/getargs.c (flags_argmatch): Don't cause segmentation fault for
2589 empty subargument list. For example: `bison --warnings= parser.y'.
2591 2006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
2593 * data/push.c, data/yacc.c: Make sure there's a newline at the end of
2594 the parser header file so that gcc doesn't warn.
2596 2006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
2598 Split the default %destructor/%printer into two kinds: <*> and <!>.
2599 Discussed starting at
2600 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00060.html>.
2601 * NEWS (2.3a+): Mention.
2602 * doc/bison.texinfo (Freeing Discarded Symbols): Document this and the
2603 previous change today related to mid-rules.
2604 (Table of Symbols): Remove %symbol-default and add <*> and <!>.
2605 * src/parse-gram.y (PERCENT_SYMBOL_DEFAULT): Remove.
2606 (TYPE_TAG_ANY): Add as <*>.
2607 (TYPE_TAG_NONE): Add as <!>.
2608 (generic_symlist_item): Remove RHS for %symbol-default and add RHS's
2610 * src/scan-gram.l (PERCENT_SYMBOL_DEFAULT): Remove.
2611 (TYPE_TAG_ANY, TYPE_TAG_NONE): Add.
2612 * src/symlist.c (symbol_list_default_new): Split into tagged and
2614 (symbol_list_destructor_set, symbol_list_printer_set): Split
2615 SYMLIST_DEFAULT case into SYMLIST_DEFAULT_TAGGED and
2616 SYMLIST_DEFAULT_TAGLESS.
2617 * src/symlist.h: Update symbol_list_default*_new prototypes.
2618 (symbol_list.content_type): Split enum value SYMLIST_DEFAULT into
2619 SYMLIST_DEFAULT_TAGGED and SYMLIST_DEFAULT_TAGLESS.
2620 * src/symtab.c (default_destructor, default_destructor_location,
2621 default_printer, default_printer_location): Split each into tagged and
2623 (symbol_destructor_get, symbol_destructor_location_get,
2624 symbol_printer_get, symbol_printer_location_get): Implement tagged
2625 default and tagless default cases.
2626 (default_destructor_set, default_printer_set): Split each into tagged
2627 and tagless versions.
2628 * src/symtab.h: Update prototypes.
2629 * tests/actions.at (Default %printer and %destructor): Rename to...
2630 (Default tagless %printer and %destructor): ... this, and extend.
2631 (Per-type %printer and %destructor): Rename to...
2632 (Default tagged and per-type %printer and %destructor): ... this, and
2634 (Default %printer and %destructor for user-defined end token): Extend.
2635 (Default %printer and %destructor are not for error or $undefined):
2637 (Default %printer and %destructor are not for $accept): Update.
2638 (Default %printer and %destructor for mid-rule values): Extend.
2639 * tests/input.at (Default %printer and %destructor redeclared): Extend.
2640 (Unused values with default %destructor): Extend.
2642 2006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
2644 Don't apply the default %destructor/%printer to an unreferenced midrule
2646 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00104.html>.
2647 * src/symtab.c (dummy_symbol_get): Name all dummy symbols initially
2648 like $@n instead of just @n so that the default %destructor/%printer
2649 logic doesn't see them as user-defined symbols.
2650 (symbol_is_dummy): Check for both forms of the name.
2651 * src/reader.c (packgram): Remove the `$' from each midrule symbol
2652 name for which the midrule value is referenced in any action.
2653 * tests/actions.at (Default %printer and %destructor for mid-rule
2655 * tests/regression.at (Rule Line Numbers, Web2c Report): Update output
2656 for change to dummy symbol names.
2658 2006-10-20 Joel E. Denny <jdenny@ces.clemson.edu>
2660 Warn about unset midrule $$ if the corresponding $n is used.
2661 * src/reader.c (symbol_should_be_used): Check midrule parent rule for
2663 (packgram): Before invoking grammar_rule_check on any rule, make sure
2664 all actions have already been scanned in order to set `used' flags.
2665 Otherwise, checking that a midrule's $$ is set will not always work
2666 properly because the midrule check must forward-reference the midrule's
2668 * tests/input.at (AT_CHECK_UNUSED_VALUES): Extend to check the new
2671 2006-10-20 Joel E. Denny <jdenny@ces.clemson.edu>
2673 More improvements to the documentation of the prologue alternatives:
2674 * NEWS (2.3a+): Mention the new `Prologue Alternatives' section in the
2676 * doc/bison.texinfo (Prologue Alternatives): Correct some errors. Add
2677 some text to clarify the relative importance of the new directives and
2678 to show how these directives may be viewed as code labels.
2680 2006-10-16 Joel E. Denny <jdenny@ces.clemson.edu>
2682 Similar to the recently removed %before-header, add %code-top as the
2683 alternative to the pre-prologue. Mentioned at
2684 <http://lists.gnu.org/archive/html/bison-patches/2006-10/msg00063.html>.
2685 Also, let the prologue alternatives appear in the grammar section.
2686 * src/parse-gram.y (PERCENT_CODE_TOP): New token.
2687 (prologue_declaration): Move the existing prologue alternatives to...
2688 (grammar_declaration): ... here and add %code-top.
2689 * src/scan-gram.l (PERCENT_CODE_TOP): New token.
2691 Clean up and extend documentation for the prologue alternatives.
2692 * NEWS (2.3a+): Describe prologue alternatives.
2693 * doc/bison.texinfo (Prologue): Move discussion of prologue
2695 (Prologue Alternatives): ... this new section, and extend it to discuss
2696 all 4 directives in detail.
2697 (Table of Symbols): Clean up discussion of prologue alternatives and
2700 2006-10-16 Juan Manuel Guerrero <juan.guerrero@gmx.de>
2702 DJGPP specific issues.
2704 * djgpp/config.bat: config.hin has been moved to lib. Adjust
2705 config.bat accordingly.
2706 * djgpp/config.sed: Adjust config.sed for the use of autoconf 2.60.
2707 * djgpp/config.site: Likewise.
2709 2006-10-16 Paolo Bonzini <bonzini@gnu.org>
2711 Replace %*-header with %provides, %requires, %code. See discussion at
2712 http://lists.gnu.org/archive/html/bison-patches/2006-10/msg00002.html
2714 * data/bison.m4 (b4_user_requires, b4_user_provides): New.
2715 (b4_user_start_header): Remove.
2716 * data/glr.c: Use new macros instead of b4_*start_header
2718 * data/glr.cc: Likewise.
2719 * data/lalr1.cc: Likewise.
2720 * data/push.c: Likewise.
2721 * data/yacc.c: Likewise.
2723 * doc/bison.texinfo: Remove %before-header, rename
2724 %{start,end,after}-header to %requires, %provides, %code.
2726 * src/parse-gram.y: Likewise (also rename token names accordingly).
2727 * src/scan-gram.l: Likewise.
2728 * tests/actions.at: Likewise.
2730 2006-10-14 Paul Eggert <eggert@cs.ucla.edu>
2732 * lib/Makefile.am (AM_CFLAGS): Remove $(WERROR_CFLAGS).
2733 Problem reported by Joel E. Denny.
2735 2006-10-14 Jim Meyering <jim@meyering.net>
2737 (Sync from coreutils.)
2738 Work also when the working directory (with e.g. coreutils sources)
2739 is version controlled with git, rather than CVS.
2740 * bootstrap (CVS_only_file): Test for the existence of README-cvs,
2742 In messages and comments, say e.g., "checked-out sources",
2743 rather than "CVS sources".
2744 (version_controlled_file): New function. Work for git as well as
2745 for CVS. Don't use grep's -q option.
2746 (slurp): Call it here, in place of CVS-specific code.
2748 2006-10-14 Joel E. Denny <jdenny@ces.clemson.edu>
2750 Fix testsuite for ./configure --enable-gcc-warnings:
2751 * configure.ac (gcc-warnings): Move -Wall before -Wno-sign-compare.
2752 Otherwise, gcc 4.1.0 (at least) warns about sign comparisons in
2753 __AT_CHECK_PRINTER_AND_DESTRUCTOR in tests/actions.at.
2754 * test/input.at (Torturing the Scanner): #include <stdlib.h> for abort.
2755 * test/regression.at (Diagnostic that expects two alternatives):
2758 2006-10-12 Paul Eggert <eggert@cs.ucla.edu>
2760 * bootstrap.conf (gnulib_modules): Add config-h.
2761 * djgpp/subpipe.c: Include <config.h> unconditionally; don't
2762 worry about HAVE_CONFIG_H.
2763 * lib/abitset.c: Likewise.
2764 * lib/bitset.c: Likewise.
2765 * lib/bitset_stats.c: Likewise.
2766 * lib/bitsetv-print.c: Likewise.
2767 * lib/bitsetv.c: Likewise.
2768 * lib/ebitset.c: Likewise.
2769 * lib/get-errno.c: Likewise.
2770 * lib/lbitset.c: Likewise.
2771 * lib/subpipe.c: Likewise.
2772 * lib/timevar.c: Likewise.
2773 * lib/vbitset.c: Likewise.
2774 * lib/bitset.c: Include "bitset.h" first, to test interface.
2775 * lib/bitset_stats.c: Include "bitset_stats.h" first.
2776 * lib/bitsetv-print.c: Include "bitsetv-print.h" first.
2777 * lib/bitsetv.c: Include "bitsetv.h" first.
2778 * lib/get-errno.c: Include "get-errno.h" first.
2779 * m4/.cvsignore: Add config-h.m4.
2780 * tests/actions.at (Default %printer and %destructor for ...):
2781 Adjust expected line numbers in output to reflect removal of #if
2782 HAVE_CONFIG_H lines.
2783 * tests/glr-regression.at (Missed %merge type warnings when ...):
2785 * tests/regression.at (Braced code in declaration in rules section):
2787 * tests/atlocal.in (CPPFLAGS): Don't define HAVE_CONFIG_H.
2788 * tests/local.at (AT_DATA_GRAMMAR_PROLOGUE):
2789 Include <config.h> unconditionally.
2791 * bootstrap: Sync from coreutils, as follows:
2793 2006-10-11 Paul Eggert <eggert@cs.ucla.edu>
2795 * bootstrap (symlink_to_gnulib): Fix bug: the dot_dots shell
2796 variable was sometimes used without being initialized. This
2797 messed up the installation of the INSTALL file in some cases.
2799 2006-10-09 Paul Eggert <eggert@cs.ucla.edu>
2801 * bootstrap (usage, main program, symlink_to_gnulib): Add option
2802 --copy. Inspired by a suggestion from Bruno Haible.
2804 2006-10-03 Jim Meyering <jim@meyering.net>
2806 * bootstrap: Undo last change to this file, since now gnulib-tool
2807 sticks with the automake default in generating dependencies.
2809 2006-10-12 Paul Eggert <eggert@cs.ucla.edu>
2811 * configure.ac: Use AC_PROG_CC_STDC; this is more modern than
2812 the old AC_PROG_CC / AM_PROG_CC_STDC combination.
2814 * doc/bison.1: Add copyright notice.
2816 * data/glr.c: Don't include <stdarg.h>; not used.
2818 * NEWS: The -g and --graph options now output graphs in Graphviz
2819 DOT format, not VCG format.
2820 * doc/bison.1: Likewise.
2821 * doc/bison.texinfo (Understanding, Bison Options): Likewise.
2822 * THANKS: Add Satya Kiran Popuri, who proposed the initial version
2824 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00158.html>.
2825 * TODO: Remove Graphviz entry.
2826 * src/Makefile.am (bison_SOURCES): Add graphviz.c and graphviz.h;
2827 remove vcg.c, vcg.h, vcg_defaults.h.
2828 * src/vcg.c, src/vcg.h, src/vcg_defaults.h: Remove.
2829 * src/graphviz.c, src/graphviz.h: New files.
2830 * src/files.c (compute_output_file_names): Output .dot, not .vcg.
2831 * src/files.h: Make comment more generic.
2832 * src/main.c (main): Likewise.
2833 * src/print_graph.h: Likewise.
2834 * src/getargs.c (usage): Make usage description more generic.
2835 * src/print_graph.c: Include graphviz.h rather than vcg.h.
2836 (static_graph, fgraph): Remove. All uses changed to pass
2837 arguments instead of sharing a static var.
2838 (print_core, print_actions, print_state, print_graph):
2839 Output graphviz format rather than VCG format.
2840 * tests/.cvsignore: Remove *.vcg; add *.dot.
2841 * tests/output.at: Expect *.dot files, not *.vcg files.
2843 * data/Makefile.am (dist_pkgdata_DATA): Add bison.m4; this
2844 accommodates the 2006-10-08 change.
2846 2006-10-11 Bob Rossi <bob@brasko.net>
2848 * data/push.c (yypushparse, yypvarsinit, yypvars): Wrap in b4_push_if.
2849 (b4_yyssa, b4_yyerror_range): New macros.
2850 (struct yypvars): Remove yyssa_ptr and yyerror_range_ptr fields.
2851 (yypvarsinit): Remove init of removed fields.
2852 (yypushparse): Remove use of removed fields; use new macros instead.
2854 2006-10-11 Paul Eggert <eggert@cs.ucla.edu>
2856 * data/push.c (yypushparse): Fix memory leak if yymsg is malloced
2857 in a push parser. Reindent slightly to match yacc.c better.
2859 2006-10-11 Bob Rossi <bob@brasko.net>
2861 * data/push.c (struct yypvars): Remove yymsgbuf, yymsgbuf_ptr, yymsg,
2863 (yypvarsinit, yypushparse): Remove init of removed fields.
2864 (yypushparse): Use yymsgbuf instead of yymsgbuf_ptr.
2866 2006-10-09 Paul Eggert <eggert@cs.ucla.edu>
2868 * THANKS: Add Paolo Bonzini and Bob Rossi.
2870 2006-10-08 Paolo Bonzini <bonzini@gnu.org>
2872 * data/c.m4 (b4_copyright, b4_epilogue, b4_location_initial_column,
2873 b4_location_initial_line, p4_parse_param, b4_ints_in, b4_flag_if,
2874 b4_define_flag_if and uses, b4_basename, b4_syncline, b4_user_code,
2875 b4_define_user_cde and uses): Remove.
2876 (b4_comment, b4_prefix, b4_sync_start): New.
2877 * data/bison.m4: New file, with most of the content removed from c.m4.
2878 * src/muscle_tab.h: Use "do {...} while(0)" throughout.
2879 * src/output.c (output_skeleton): Pass bison.m4.
2880 (prepare): Pass glr_flag and nondeterministic_flag. Pass prefix
2883 2006-10-05 Paul Eggert <eggert@cs.ucla.edu>
2885 Fix test failure reported by Tom Lane in
2886 <http://lists.gnu.org/archive/html/bug-bison/2006-10/msg00000.html>
2887 and try to make such failures easier to catch in the future.
2888 * data/glr.c (YYTRANSLATE): Don't check for nonpositive arg;
2889 that's now the caller's responsibility.
2890 (yyprocessOneStack, yyrecoverSyntaxError, yyparse):
2891 Set yychar = YYEOF if it's negative.
2892 * tests/actions.at (yylex): Abort if asked to read past EOF.
2893 * tests/conflicts.at (yylex): Likewise.
2894 * tests/cxx-type.at (yylex): Likewise.
2895 * tests/glr-regression.at (yylex): Likewise.
2896 * tests/input.at (yylex): Likewise.
2897 * tests/regression.at (yylex): Likewise.
2898 * tests/torture.at (yylex): Likewise.
2900 2006-10-01 Paul Eggert <eggert@cs.ucla.edu>
2902 Fix problems with translating English-language diagnostics.
2903 * bootstrap: Fix bug introduced in recent bootstrap changes, with
2904 respect to bison-runtime pot generation. The YY_ stuff
2905 wasn't being captured.
2906 * bootstrap.conf (XGETTEXT_OPTIONS_RUNTIME): New var.
2907 * po/POTFILES.in: Add src/location.c, src/scan-code.l.
2908 * runtime-po/POTFILES.in: Add data/push.c.
2910 2006-09-29 Paul Eggert <eggert@cs.ucla.edu>
2912 Merge bootstrap changes from coreutils.
2914 2006-09-28 Jim Meyering <jim@meyering.net>
2916 Automatically generated dependencies are important even
2917 when all of the sources in a directory come from gnulib.
2918 * bootstrap (gnulib_tool): Remove the "no-dependencies" automake
2919 option that gnulib-tool adds to what becomes our lib/gnulib.mk.
2921 2006-09-23 Jim Meyering <jim@meyering.net>
2923 * bootstrap (gnulib_tool_options): Add "--local-dir gl".
2925 2006-09-20 Paul Eggert <eggert@cs.ucla.edu>
2927 * bootstrap: Add support for --force.
2928 (usage): New function. Describe usage less tersely.
2929 (CVS_only_file): New var.
2931 2006-09-21 Paul Eggert <eggert@cs.ucla.edu>
2933 * data/push.c (YYPUSH_MORE): Make it an enum instead.
2934 (yypushparse): Use YYPUSH_MORE instead of the mystery constant.
2935 Adjust white space and comments to match GNU style better.
2937 2006-09-20 Bob Rossi <bob@brasko.net>
2939 * data/push.c (yyresult_get): Remove function.
2940 (YYPUSH_MORE): Add #define.
2941 (yypushparse): Modify return value.
2943 2006-09-20 Paul Eggert <eggert@cs.ucla.edu>
2945 * stamp-h.in: Remove; no longer needed.
2946 * .cvsignore: Replace autom4te.cache and config.cache with *.cache.
2947 Remove config.h, config.hin, intl (no longer created).
2948 * lib/.cvsignore: Add config.h, config.hin, configmake.h, inttypes.h,
2951 Sync bootstrap from coreutils, as follows:
2953 2006-09-18 Paul Eggert <eggert@cs.ucla.edu>
2955 * bootstrap (symlink_to_gnulib): New function.
2956 (cp_mark_as_generated): Use it, to prefer symlinks-to-gnulib
2957 to copies-of-gnulib.
2958 (cp_mark_as_generated, slurp, gnulib_files):
2959 Avoid making a copy if it's the same as the old version.
2960 (gnulib_files): Add support for this variable (used by Bison).
2962 2006-09-20 Paul Eggert <eggert@cs.ucla.edu>
2964 * src/getargs.c (usage): Rework to use conventions similar to
2965 coreutils, to make translation a bit easier and the code a bit
2966 smaller. Problem reported by Tim Van Holder.
2968 2006-09-15 Paul Eggert <eggert@cs.ucla.edu>
2970 Use some of gnulib's new modules, taken from coreutils.
2972 * bootstrap: Sync from coreutils, except add support for gnulib_files.
2973 * bootstrap.conf: New file.
2974 (gnulib_modules): Add configmake, inttypes, unistd.
2975 (XGETTEXT_OPTIONS): Add complain, complain_at,
2976 fatal, fatal_at, warn, warn_at, unexpected_end.
2977 * configure.ac (AC_CONFIG_HEADERS): config.h is now in lib, not here.
2978 (gl_USE_SYSTEM_EXTENSIONS): Remove; gl_EARLY now does this.
2980 (AM_STDBOOL_H): Remove; gl_INIT now dows this.
2982 (GNULIB_AUTOCONF_SNIPPET): Remove.
2983 (AM_GNU_GETTEXT): Add; require formatstring macros since that's
2985 * lib/.cvsignore: Add inttypes_.h.
2986 * lib/Makefile.am: Include gnulib.mk first so we can append to it.
2987 (AM_CFLAGS): Add WERROR_CFLAGS, to be more like coreutils.
2988 (BUILT_SOURCES, EXTRA_DIST, MOSTLYCLEANFILES): Remove
2989 no-longer-necessary initializations.
2990 (lib_SOURCES): Remove, replacing by libbison_a_SOURCES.
2991 * lib/subpipe.c: Include <unistd.h> unconditionally, now that we
2992 use the unistd module.
2993 * src/system.h: Likewise.
2994 * m4/.cvsignore: Remove *_gl.m4, gnulib.m4, inttypes_h.m4, uintmax_t.m4,
2995 ulonglong.m4. Add gettext.m4, gnulib-cache.m4, gnulib-comp.m4,
2996 gnulib-tool.m4, inttypes-h.m4, inttypes-pri.m4, inttypes.m4.
2997 * src/Makefile.am (DEFS): Remove, since configmake does this for us.
2998 (AM_CPPFLAGS): Remove -I../lib, since Automake does that for us.
2999 * src/system.h: Include inttypes.h unconditionally, now that we
3000 use the inttypes module. Don't bother to include stdint.h, since
3001 inttypes.h now does that for us.
3002 (LOCALEDIR): Remove, now that we use the configmake module.
3003 * src/getargs.c: Include configmake.h.
3004 * src/main.c: Likewise.
3005 * src/output.c: Likewise.
3006 * tests/atlocal.in (CPPFLAGS): Include from $abs_top_builddir/lib,
3007 not from $abs_top_builddir, since config.h moved.
3010 Port to GCC 2.95. First two problems reported by Michael Deutschmann in
3011 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00018.html>.
3013 * src/parse-gram.y (symbol_declaration): Don't put statements
3014 before declarations; it's not portable to C89.
3015 * src/scan-code.l (handle_action_at): Likewise.
3017 * src/scan-code.l: Always initialize braces_level; the old code
3018 left it uninitialized and therefore had undefined behavior.
3020 Don't attempt to redefine 'assert', since it runs afoul of
3021 systems where standard headers (mistakenly) include <assert.h>.
3022 Instead, define and use our own alternative, called 'aver'.
3023 * src/reader.c: Don't include assert.h, since we no longer
3025 * src/scan-code.l: Likewise.
3026 * src/system.h (assert): Remove, replacing with....
3027 (aver): New function, taking a bool arg. All uses changed.
3028 * src/tables.c (pack_vector): Ensure that aver arg is bool,
3029 not merely an integer.
3031 2006-09-15 Bob Rossi <bob@brasko.net>
3033 * data/Makefile.am (dist_pkgdata_DATA): Add push.c.
3034 * data/c.m4 (YYPUSH): New.
3035 (b4_push_if): New macro. Use it instead of #ifdef YYPUSH.
3036 * src/getargs.c (push_parser): New var.
3037 * src/getargs.h (push_parser): New declaration.
3038 * src/output.c (prepare): Add macro insertion of `push_flag'.
3039 * src/parse-gram.y (PERCENT_PUSH_PARSER): New token.
3040 (prologue_declaration): Parse %push-parser.
3041 * src/scan-gram.l: Scan new PERCENT_PUSH_PARSER token.
3042 * tests/calc.at (_AT_CHECK_CALC_ERROR): Add "Return" and "Now" to
3043 list of removed lines from the traces observed.
3044 (AT_CHECK_CALC_LALR): Added push parser tests.
3046 2006-09-13 Paul Eggert <eggert@cs.ucla.edu>
3048 * NEWS: Version 2.3a.
3049 * configure.ac (AC_INIT): Likewise.
3051 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Remove
3052 "#define YYSTYPE int" that caused "make maintainer-check" to fail
3053 due to header ordering dependencies. I don't know why the #define
3056 Fix glr.cc and lalr1.cc's use of YYDEBUG so that there's zero
3057 runtime cost when YYDEBUG is not defined, and so that some tests
3058 that used to fail now work. Problem and initial suggestion by
3060 * data/c++.m4 (b4_parse_param_cons): Omit leading ','.
3061 * data/glr.cc (b4_parser_class_name):
3062 Initialize yycdebug_ only if YYDEBUG. Also, initialize yydebug_.
3063 (debug_level, set_debug_level): Affect yydebug_, not ::yydebug.
3064 (yydebug_) [YYDEBUG]: New member.
3065 (yycdebug_): Now defined only if YYDEBUG.
3066 * data/lalr1.cc (yydebug_, yycdebug_): Now defined only if YYDEBUG.
3067 (YYCDEBUG) [!YYDEBUG]: Don't use yydebug_ and yycdebug_.
3068 (b4_parser_class_name): Initialize yydebug_ and yycdebug_ only
3070 (debug_stream, set_debug_stream, debug_level, set_debug_level):
3071 Define only if YYDEBUG.
3072 * tests/calc.at (_AT_DATA_CALC_Y) [!YYDEBUG]: Omit call to
3074 * tests/regression.at (_AT_DATA_DANCER_Y) [!YYDEBUG]: Likewise.
3075 * tests/calc.at (AT_CHECK_CALC_GLR_CC): Uncomment calls to
3076 AT_CHECK_CALC_GLR_CC that are working now.
3078 2006-09-12 Paul Eggert <eggert@cs.ucla.edu>
3080 * data/glr.cc (YYERROR_VERBOSE, YYTOKEN_TABLE): Remove.
3081 We don't need them in glr.cc, and glr.c defines them.
3082 Defining YYERROR_VERBOSE to 0 here breaks glr.c, since glr.c
3083 assumes that defining it to anything is the same as defining
3084 it to 1. Problem reported by Paolo Bonzini.
3086 2006-09-12 Paolo Bonzini <bonzini@gnu.org> (tiny change)
3088 * data/c.m4 (b4_null, b4_case): Define.
3089 * src/output.c (prepare_symbols): Use b4_null.
3090 (user_actions_output): Use b4_case.
3092 2006-09-11 Paul Eggert <eggert@cs.ucla.edu>
3094 * data/glr.c (b4_shared_declarations): Put start-header first,
3095 before any #includes that we generate, so that feature-test
3096 macros work. Problem reported by Michael Deutschmann in
3097 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00004.html>.
3098 * data/lalr1.cc: Likewise.
3099 * doc/bison.texinfo (Prologue): Document that feature-test macros
3100 should be defined before any Bison declarations.
3101 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Put defns
3102 that depend on location.hh after, not before, Bison decls, since
3103 we now include location.hh after the first user prologue.
3105 * doc/bison.texinfo (Calc++ Parser): Fix memory leak reported by
3106 Sander Brandenburg in
3107 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00002.html>.
3108 Also, fix minor white space and comment issues.
3109 (Prologue): Mention that it's better to define feature-test macros
3110 before Bison declarations. Problem reported by Michael Deutschmann.
3112 * README-cvs: Fix typo: "&" should be "&&". Problem reported
3114 * m4/.cvsignore: Add argmatch.m4. Remove obstack.m4, strerror_r.m4.
3115 This adjusts to recent gnulib changes.
3117 2006-09-04 Joel E. Denny <jdenny@ces.clemson.edu>
3119 Finish implementation of per-type %destructor/%printer. Discussed
3121 <http://lists.gnu.org/archive/html/bison-patches/2006-02/msg00064.html>
3123 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00091.html>.
3124 * NEWS (2.3+): Add a description of this feature to the default
3125 %destructor/%printer description.
3126 * doc/bison.texinfo (Freeing Discarded Symbols): Likewise.
3127 * src/symlist.c (symbol_list_destructor_set, symbol_list_printer_set):
3128 Invoke semantic_type_destructor_set or semantic_type_printer_set when a
3129 list node contains a semantic type.
3130 * src/symtab.c, src/symtab.h: Extend with a table that associates
3131 semantic types with their %destructor's and %printer's.
3132 (semantic_type_from_uniqstr, semantic_type_get,
3133 semantic_type_destructor_set, semantic_type_printer_set): New functions
3134 composing the public interface of that table.
3135 (symbol_destructor_get, symbol_destructor_location_get,
3136 symbol_printer_get, symbol_printer_location_get): If there's no
3137 per-symbol %destructor/%printer, look up the per-type before trying
3139 * tests/actions.at (Per-type %printer and %destructor): New test case.
3140 * tests/input.at (Default %printer and %destructor redeclared):
3141 Extend to check that multiple occurrences of %symbol-default in a
3142 single %destructor/%printer declaration is an error.
3143 (Per-type %printer and %destructor redeclared, Unused values with
3144 per-type %destructor): New test cases.
3146 2006-09-04 Joel E. Denny <jdenny@ces.clemson.edu>
3148 Require default %destructor/%printer to be declared using
3149 %symbol-default instead of an empty symbol list, and start working on
3150 new per-type %destructor/%printer. Discussed at
3151 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00007.html>.
3152 * NEWS (2.3+): Add %symbol-default to example.
3153 * bison.texinfo (Freeing Discarded Symbols): Likewise.
3154 (Table of Symbols): Add entry for %symbol-default.
3155 * src/parse-gram.y (PERCENT_SYMBOL_DEFAULT): New token.
3156 (generic_symlist, generic_symlist_item): New nonterminals for creating
3157 a list in which each item is a symbol, semantic type, or
3159 (grammar_declaration): Use generic_symlist in %destructor and %printer
3160 declarations instead of symbols.1 or an empty list.
3161 (symbol_declaration, precedence_declaration, symbols.1): Update actions
3162 for changes to symbol_list.
3163 * src/reader.c: Update for changes to symbol_list.
3164 * src/scan-code.l: Likewise.
3165 * src/scan-gram.l: Scan new PERCENT_SYMBOL_DEFAULT token.
3166 * src/symlist.c, src/symlist.h: Extend such that a list node may
3167 represent a semantic type or a %symbol-default in addition to just an
3168 ordinary symbol. Add switched functions for setting %destructor's and
3170 * tests/actions.at, tests/input.at: Add %symbol-default to all default
3171 %destructor/%printer declarations.
3173 2006-08-23 Joel E. Denny <jdenny@ces.clemson.edu>
3175 Whether the default %destructor/%printer applies to a particular symbol
3176 isn't a question of whether the user *declares* that symbol (in %token,
3177 for example). It's a question of whether the user by any means
3178 *defines* the symbol at all (by simply using a char token, for
3179 example). $end is defined by Bison whereas any other token with token
3180 number 0 is defined by the user. The error token is always defined by
3181 Bison regardless of whether the user declares it with %token, but we
3182 may one day let the user define error as a nonterminal instead.
3183 * NEWS (2.3+): Say "user-defined" instead of "user-declared".
3184 * doc/bison.texinfo (Freeing Discarded Symbols): Likewise, and document
3185 the meaning of "user-defined".
3186 * tests/actions.at (Default %printer and %destructor for user-declared
3187 end token): Rename to...
3188 (Default %printer and %destructor for user-defined end token): ...
3191 * src/symtab.c (symbol_destructor_get, symbol_printer_get): In the
3192 computation of whether to apply the default, don't maintain a list of
3193 every Bison-defined symbol. Instead, just check for a first character
3194 of '$', which a user symbol cannot have, and check for the error token.
3196 2006-08-21 Joel E. Denny <jdenny@ces.clemson.edu>
3198 Don't apply the default %destructor or %printer to the error token,
3199 $undefined, or $accept. This change fits the general rule that the
3200 default %destructor and %printer are only for user-declared symbols,
3201 and it solves several difficulties that are described in the new test
3203 * src/symtab.c (symbol_destructor_get, symbol_printer_get): Implement.
3204 * tests/actions.at (Default %printer and %destructor are not for error
3205 or $undefined, Default %printer and %destructor are not for $accept):
3208 2006-08-19 Joel E. Denny <jdenny@ces.clemson.edu>
3210 Allow %start after the first rule.
3211 * src/reader.c (grammar_current_rule_begin): Don't set the start symbol
3212 when parsing the first rule.
3213 (check_and_convert_grammar): Search for it here after all grammar
3214 declarations have been parsed. Skip midrules, which have dummy LHS
3216 * src/symtab.c (symbol_is_dummy): New function.
3217 * src/symtab.h (symbol_is_dummy): Declare it.
3218 * tests/input.at (%start after first rule): New test.
3220 2006-08-18 Joel E. Denny <jdenny@ces.clemson.edu>
3222 Redo some of the previous commit: add back the ability to use
3223 non-aliased/undeclared string literals since it might be useful to
3224 those declaring %token-table.
3225 * src/reader.c (check_and_convert_grammar): Undo changes in previous
3226 commit: don't worry about complaints from symbols_pack.
3227 * src/symtab.c (symbol_new, symbol_class_set,
3228 symbol_check_alias_consistency): Undo changes in previous commit: count
3229 each string literal as a new symbol and token, assign it a symbol
3230 number, and don't complain about non-aliased string literals.
3231 (symbols_pack): Since symbol_make_alias still does not decrement symbol
3232 and token counts but does still set aliased tokens to the same number,
3233 symbol_pack_processor now leaves empty slots in the symbols array.
3235 * tests/regression.at (Undeclared string literal): Remove test case
3236 added in previous commit since non-aliased string literals are allowed
3238 (Characters Escapes, Web2c Actions): Undo changes in previous commit:
3239 remove unnecessary string literal declarations.
3240 * tests/sets.at (Firsts): Likewise.
3242 2006-08-18 Joel E. Denny <jdenny@ces.clemson.edu>
3244 Don't allow an undeclared string literal, but allow a string literal to
3245 be used before its declaration.
3246 * src/reader.c (check_and_convert_grammar): Don't invoke packgram if
3247 symbols_pack complained.
3248 * src/symtab.c (symbol_new): Don't count a string literal as a new
3250 (symbol_class_set): Don't count a string literal as a new token, and
3251 don't assign it a symbol number since symbol_make_alias does that.
3252 (symbol_make_alias): It's not necessary to decrement the symbol and
3253 token counts anymore. Don't assume that an alias declaration occurs
3254 before any uses of the identifier or string, and thus don't assert that
3255 one of them has the highest symbol number so far.
3256 (symbol_check_alias_consistency): Complain if there's a string literal
3257 that wasn't declared as an alias.
3258 (symbols_pack): Bail if symbol_check_alias_consistency failed since
3259 symbol_pack asserts that every token has been assigned a symbol number
3260 although undeclared string literals have not.
3261 * tests/regression.at (String alias declared after use, Undeclared
3262 string literal): New test cases.
3263 (Characters Escapes, Web2c Actions): Declare string literals as
3265 * tests/sets.at (Firsts): Likewise.
3267 2006-08-14 Joel E. Denny <jdenny@ces.clemson.edu>
3269 In the grammar scanner, STRING_FINISH unclosed constructs and return
3270 them to the parser in order to improve error messages.
3271 * src/scan-gram.l (SC_ESCAPED_STRING, SC_ESCAPED_CHARACTER,
3272 SC_BRACED_CODE, SC_PROLOGUE): Implement.
3273 * tests/input.at (Unclosed constructs): New test case.
3274 * tests/regression.at (Invalid inputs): Update now that unclosed %{ is
3277 * src/scan-gram.h, src/scan-gram.l (gram_last_braced_code_loc): Remove
3280 2006-08-13 Joel E. Denny <jdenny@ces.clemson.edu>
3282 Handle string aliases for character tokens correctly.
3283 * src/symtab.c (symbol_user_token_number_set): If the token has an
3284 alias, check and set its alias's user token number instead of its own,
3285 which is set to indicate the alias. Previously, every occurrence of
3286 the character token in the grammar overwrote that alias indicator with
3288 * tests/input.at (String aliases for character tokens): New test.
3290 2006-08-12 Joel E. Denny <jdenny@ces.clemson.edu>
3292 * src/parse-gram.y: Add `%expect 0' so we don't overlook conflicts.
3294 2006-08-11 Paul Eggert <eggert@cs.ucla.edu>
3296 * bootstrap: Put in need-ngettext argument to AM_GNU_GETTEXT,
3297 to prevent failures when building on older platforms.
3298 Check for autopoint failure.
3299 Set XGETTEXT_OPTIONS to values that check for C format strings,
3300 so that translators are warned about them (this also helps
3301 prevent core dumps).
3303 * lib/subpipe.c (create_subpipe): Use new gnulib pipe_safer
3304 function, since it simplifies our code a bit.
3306 * configure.ac (AC_ARG_ENABLE): Use -Wextra -Wno-sign-compare
3307 rather than -W, so we don't get bogus warnings about sign comparisons.
3308 Add -Wpointer-arith, since that warning is useful (it reports code
3309 that does not conform to C89 and that some compilers reject).
3310 * data/c.m4, data/glr.c, data/lalr1.cc, data/yacc.c: Undo latest change,
3311 since it's no longer needed.
3313 2006-08-10 Joel E. Denny <jdenny@ces.clemson.edu>
3315 Clean up scanners a bit.
3316 * src/flex-scanner.h (FLEX_NO_OBSTACK): New macro that blocks obstack
3317 definitions so gcc won't warn when obstack_for_string is unused.
3318 * src/scan-code.l: config.h and system.h are already #include'd by
3319 scan-code-c.c, so get rid of them here.
3320 * src/scan-gram.l: Likewise.
3321 * src/scan-skel.l: Likewise, and use flex-scanner.h without obstack
3322 definitions rather than duplicating the rest of it.
3323 * src/scan-gram-c.c, scan-skel-c.c: #include "system.h".
3325 2006-08-09 Joel E. Denny <jdenny@ces.clemson.edu>
3327 Suppress signed/unsigned comparison warnings for yycheck.
3328 * data/c.m4 (b4_safest_int_type): New macro.
3329 * data/glr.c, data/lalr1.cc: Wherever you compare yycheck[i] against
3330 a signed int type, cast it to b4_safest_int_type first.
3331 * data/yacc.c: Likewise.
3332 (b4_safest_int_type): Overwrite the one from c.m4 since b4_int_type is
3335 2006-08-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de> (tiny change)
3337 * doc/bison.texinfo: Fix some typos.
3339 2006-08-02 Paul Eggert <eggert@cs.ucla.edu>
3341 * m4/.cvsignore: Add inttypes_h.m4,lib-ld.m4, lib-prefix.m4,
3342 po.m4, stdint_h.m4, uintmax_t.m4, ulonglong.m4, warning.m4.
3344 * bootstrap (gnulib_tool): Stop using --assume-autoconf;
3345 the latest gnulib does this a different way.
3346 (get_translations): Sharuzzaman Ahmat Raslan reported that the ms
3347 translation was patched, so stop omitting it.
3349 2006-07-29 Joel E. Denny <jdenny@ces.clemson.edu>
3351 Enable declaration of default %printer/%destructor. Make the parser
3352 use these for all user-declared grammar symbols for which the user does
3353 not declare a specific %printer/%destructor. Thus, the parser uses it
3354 for token 0 if the user declares it but not if Bison generates it as
3355 $end. Discussed starting at
3356 <http://lists.gnu.org/archive/html/bison-patches/2006-02/msg00064.html>,
3357 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00091.html>,
3359 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00019.html>.
3360 * NEWS (2.3+): Mention.
3361 * doc/bison.texinfo (Actions in Mid-Rule): It's no longer impossible to
3362 declare a %destructor for a mid-rule's semantic value. It's just
3363 impossible to declare one specific to it.
3364 (Freeing Discarded Symbols): Mention that @$ can be used in %destructor
3365 code. Describe default %destructor form.
3366 * src/parse-gram.y (grammar_declaration): Parse default
3367 %printer/%destructor declarations.
3368 * src/output.c (symbol_destructors_output): Use symbol_destructor_get
3369 and symbol_destructor_location_get rather than accessing the destructor
3370 and destructor_location members of struct symbol.
3371 (symbol_printers_output): Likewise but for %printer's.
3372 * src/reader.c (symbol_should_be_used): Likewise but for %destructor's
3374 * src/symtab.c (default_destructor, default_destructor_location,
3375 default_printer, default_printer_location): New static global
3376 variables to record the default %destructor and %printer.
3377 (symbol_destructor_get, symbol_destructor_location_get,
3378 symbol_printer_get, symbol_printer_location_get): New functions to
3379 compute the appropriate %destructor and %printer for a symbol.
3380 (default_destructor_set, default_printer_set): New functions to set the
3381 default %destructor and %printer.
3382 * src/symtab.h: Prototype all those new functions.
3383 * tests/actions.at (Default %printer and %destructor): New test to
3384 check that the right %printer and %destructor are called, that they're
3385 not called for $end, and that $$ and @$ work correctly.
3386 (Default %printer and %destructor for user-declared end token): New
3387 test to check that the default %printer and %destructor are called for
3388 a user-declared end token.
3389 * tests/input.at (Default %printer and %destructor redeclared, Unused
3390 values with default %destructor): New tests to check related grammar
3391 warnings and errors.
3393 2006-07-29 Joel E. Denny <jdenny@ces.clemson.edu>
3395 Clean up handling of %destructor for the end token (token 0).
3396 Discussed starting at
3397 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00019.html>
3399 <http://lists.gnu.org/archive/html/help-bison/2006-07/msg00013.html>.
3401 Make the skeletons consistent in how they pop the end token and invoke
3403 * data/glr.c (yyrecoverSyntaxError, yyparse): Don't pop the start
3404 state, which has token number 0, since this would invoke the
3405 %destructor for the end token.
3406 * data/lalr1.cc (yy::parser::parse): Don't check for the final state
3407 until after shifting the end token, or else it won't be popped.
3408 * data/yacc.c (yyparse): Likewise.
3410 * data/glr.c (yyparse): Clear the lookahead after shifting it even when
3411 it's the end token. Upon termination, destroy an unshifted lookahead
3412 even when it's the end token.
3413 * data/lalr1.cc (yy::parser::parse): Likewise.
3414 * data/yacc.c (yyparse): Likewise.
3416 * src/reader.c (packgram): Don't check rule 0. This suppresses unused
3417 value warnings for the end token when the user gives the end token a
3420 * tests/actions.at (Printers and Destructors): Test all the above.
3422 2006-07-24 Paul Eggert <eggert@cs.ucla.edu>
3424 Update to latest gnulib and gettext versions.
3425 * bootstrap (gnulib-modules): Remove hard-locale, stdio-safer.
3427 (gnulib_files): Add m4/warning.m4. Don't worry about files
3428 overwritten by autopoint.
3429 Replace gt_INTL_SUBDIR_CORE with an empty body in m4/gettext_gl.m4.
3430 Suppress "id", "ms", "tr" translations for now, since gettext 0.15
3432 Don't use autoreconf; instead, invoke autopoint etc. by hand,
3433 so that we can remove the intl files at a better time.
3434 (intl_files_to_remove): Remove aclocal.m4, since it gets
3435 rebuilt anyway. Remove m4/inttypes_h.m4, m4/inttypes.m4,
3436 m4/isc-posix.m4, m4/lib-ld.m4, m4/lib-prefix.m4, m4/po.m4,
3437 m4/stdint_h.m4, m4/uintmax_t.m4, m4/ulonglong.m4.
3438 Add m4/inttypes-h.m4, m4/lock.m4, m4/visibility.m4.
3439 Remove datarootdir hack; no longer needed.
3440 * configure.ac: Use gl_WARNING_CFLAGS rather than BISON_WARNING.
3441 (AM_GNU_GETTEXT_VERSION): Bump from 0.12 to 0.15.
3442 * lib/.cvsignore: Remove hard-locale.c, hard-locale.h, strdup.c,
3444 * m4/.cvsignore: Remove hard-locale.m4, strdup.m4.
3445 * m4/warning.m4: Remove from CVS, since we now use gnulib's version.
3447 2006-07-20 Paul Eggert <eggert@cs.ucla.edu>
3449 * bootstrap: Adjust to today's change to gnulib-tool by invoking
3450 it with --assume-autoconf='latest-stable'.
3452 2006-07-13 Joel E. Denny <jdenny@ces.clemson.edu>
3454 * src/parse-gram.y (grammar_declaration): Don't confuse Doxygen (at
3455 least 1.4.7 and 1.4.4) by putting a #line between `typedef union
3457 * src/muscle_tab.h (muscle_grow): Replace the header comments with
3458 those from muscle_tab.c since the old ones are misleading.
3460 2006-07-13 Akim Demaille <akim@epita.fr>
3462 Support %define "KEY" {VALUE}.
3463 * src/scan-code.h, src/scan-code.l (translate_action)
3464 (translate_rule_action, translate_symbol_action, translate_code):
3465 Return char *, not const char *.
3466 * src/parse-gram.y (declaration): Rename as...
3467 (prologue_declaration): this.
3468 (string_content): Remove this nonterminal, use STRING.
3469 (braceless, content, content.opt): New nonterminal.
3471 (%define): Now accept content.opt, i.e., accept also BRACED_CODE
3473 * src/scan-gram.l (getargs.h): Don't include it.
3475 2006-07-12 Paul Eggert <eggert@cs.ucla.edu>
3477 * data/lalr1.cc (YYCDEBUG): Use 'if (yydebug_) (*yycdebug_)'
3478 rather than a for-loop that declares a local bool variable. This
3479 should work around a compatibility problem with a Cray x1e C++
3480 compiler reported by Hung Nguyen in
3481 <http://lists.gnu.org/archive/html/help-bison/2006-07/msg00022.html>.
3482 The for-loop was introduced in the 2004-11-17 change but I don't
3483 know why it was needed.
3485 2006-07-12 Akim Demaille <akim@epita.fr>
3487 * data/c.m4: Comment changes.
3489 2006-07-10 Akim Demaille <akim@lrde.epita.fr>
3491 * src/complain.c (error_message, ERROR_MESSAGE): New.
3493 (fatal_at, fatal, warn_at, warn, complain_at, complain): these.
3494 * src/complain.h, src/complain.c (warning_issued): Remove, unused.
3496 2006-07-09 Paul Eggert <eggert@cs.ucla.edu>
3498 * NEWS: Instead of %union, you can define and use your own union type
3499 YYSTYPE if your grammar contains at least one <type> tag.
3500 Your YYSTYPE need not be a macro; it can be a typedef.
3501 * doc/bison.texinfo (Value Type, Multiple Types, Location Type):
3502 (Union Decl, Decl Summary): Document this.
3503 * data/glr.c (YYSTYPE): Implement this.
3504 * data/glr.cc (YYSTYPE): Likewise.
3505 * data/lalr1.cc (YYSTYPE): Likewise.
3506 * data/yacc.c (YYSTYPE): Likewise.
3507 * src/output.c (prepare): Output tag_seen_flag.
3508 * src/parse-gram.y (declaration, grammar_declaration):
3509 Use 'union_seen' rather than 'typed' to determine whether
3510 %union has been seen, since grammars can now be typed without
3512 (symbol_declaration, type.opt, symbol_def):
3513 Keep track of whether a tag has been seen.
3514 * src/reader.c (union_seen, tag_seen): New vars.
3516 * src/reader.h (union_seen, tag_seen, typed): Likewise.
3517 * src/scan-code.l (untyped_var_seen): New variable.
3518 (handle_action_dollar): Adjust to above changes.
3519 (handle_action_dollar, handle_action_at):
3520 Improve overflow checking for outlandish numbers.
3521 * tests/input.at (AT_CHECK_UNUSED_VALUES): Redo test to
3522 avoid new diagnostics generated by above changes.
3523 * tests/regression.at (YYSTYPE typedef): Add test to check
3524 for type tags without %union.
3526 * src/symlist.c (symbol_list_length): Return int, not unsigned
3527 int, since callers expect int. This may need to get revisited
3528 once we have proper integer overflow checking.
3530 * src/scan-gram.h (gram_scanner_cursor): Remove decl, since this
3531 object is now static.
3533 * src/getargs.c (flags_argmatch): Return void, not int,
3534 to pacify ./configure --enable-gcc-warnings.
3536 * src/flex-scanner.h (STRING_FREE): Don't use FLEX_PREFIX (last_string)
3537 since last_string is already defined to FLEX_PREFIX (last_string).
3539 2006-07-09 Akim Demaille <akim@lrde.epita.fr>
3541 Implement --warnings/-W.
3542 * src/getargs.c (report_argmatch, trace_argmatch): Remove,
3544 (flags_argmatch, FLAGS_ARGMATCH): this new function and macro.
3546 * src/getargs.h, src/getargs.c (warnings, warnings_flags)
3547 (warnings_args, warnings_types): New.
3548 (getargs, short_options, long_options): Accept -W/--warnings.
3549 Sort the options by alphabetical order, upper case letter right
3550 before its lower case.
3552 2006-07-09 Joel E. Denny <jdenny@ces.clemson.edu>
3554 Change %merge result type clash warnings to errors. Discussed at
3555 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00026.html>.
3556 * src/reader.c (record_merge_function_type): Use complain_at.
3557 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
3558 declared later): Update test case results.
3560 2006-07-09 Akim Demaille <akim@lrde.epita.fr>
3562 * src/getargs.h, src/getargs.c: Swap --report and --trace handling
3563 to be in alphabetical order.
3564 (trace_args): Spelling fixes.
3566 2006-07-09 Paul Eggert <eggert@cs.ucla.edu>
3568 * data/yacc.c (YYID, yy_stack_print): Prefix local vars with "yy"
3569 so they don't collide with user-defined macros.
3570 (yy_stack_print): Don't assume that yytype_int16 promotes to int;
3571 this was never guaranteed, and now that we're using gnulib stdint,
3572 which defines int_fast16_t to long int, the problem is exposed.
3574 2006-07-08 Paul Eggert <eggert@cs.ucla.edu>
3576 * data/c.m4 (b4_basename): Simplify a bit, since we don't
3577 need the full POSIX semantics (and weren't implementing them
3580 Adjust to Autoconf 2.60 and today's gnulib.
3581 * bootstrap (gnulib_modules): Add stdint.
3582 Remove special case for m4/onceonly_2_57.m4, since gnulib-tool
3583 no longer copies it.
3584 (intl_files_to_remove): Remove m4/longlong.m4 and m4/wchar_t.m4,
3585 since stdint needs the former and wcwidth (which is now required
3586 by mbswidth) needs the latter.
3587 Append 'datarootdir = @datarootdir@' to po/Makefile.in.in, to
3588 work around a compatibility glitch between gettext 0.14.6 and
3590 * configure.ac (AC_PREREQ): Require Autoconf 2.60.
3591 Do not check for uintptr_t, since new stdint module does the right
3593 * lib/.cvsignore: Remove alloca.c, alloca.h, alloca_.h.
3594 Add stdint.h, stdint_.h, wcwidth.h.
3595 * m4/.cvsignore: Remove alloca.m4, onceonly.m4.
3596 Add absolute-header.m4, double-slash-root.m4, longlong.m4,
3597 stdint.m4, wchar_t.m4, wcwidth.m4.
3598 * src/files.c: Include <dirname.h> and <stdio-safer.h> in the
3599 usual order for ../lib/*.h files.
3600 (file_name_split): Use last_component, not base_name, to adjust
3602 * src/parse-gram.h: Include <strverscmp.h> in the usual order
3603 for ../lib/*.h files.
3604 (YYTYPE_INT16, YYTYPE_INT8, YYTYPE_UINT16, YYTYPE_UINT8):
3605 Define unconditionally, since we now assume the stdint module.
3606 * src/scan-skel.l: Include <dirname.h>.
3607 (BASE_QPUTS): Use last_component, not base_name.
3608 * src/system.h: Include <unlocked-io.h> in the usual order
3609 for ../lib/*.h files. Include <stdint.h> unconditionally,
3610 since we now use the stdint module.
3611 (uintptr_t): Declare if UINTPTR_MAX is not defined, not
3612 HAVE_UINTPTR_T, since we now use the stdint module.
3613 (base_name): Remove decl, since files now include <dirname.h>
3616 2006-07-08 Akim Demaille <akim@lrde.epita.fr>
3618 * data/c.m4 (b4_location_initial_column, b4_location_initial_line):
3620 * data/yacc.c, data/glr.c, data/location.cc: Use them.
3621 * NEWS, doc/bison.texinfo: The initial column and line are 1 by
3623 * tests/calc.at: Adjust.
3625 2006-07-08 Akim Demaille <akim@lrde.epita.fr>
3627 * data/c.m4 (b4_basename): New.
3628 (b4_syncline): Also output the location of its invocation (from
3630 (b4_user_action, b4_define_user_action, b4_user_actions)
3631 (b4_user_initial_action, b4_user_post_prologue, b4_user_start_header)
3632 (b4_user_stype): New.
3633 * data/yacc.c, data/glr.c, data/lalr1.cc, data/glr.cc: Use them.
3635 2006-07-07 Joel E. Denny <jdenny@ces.clemson.edu>
3637 In the grammar file, the first column is 1 not 0 on the first line as
3638 on every other line.
3639 * src/parse-gram.y (%initial-action): Initialize @$ correctly.
3640 * tests/input.at (Torturing the Scanner): Update output.
3642 * src/scan-gram.l (scanner_cursor): Declare it static.
3644 2006-07-07 Joel E. Denny <jdenny@ces.clemson.edu>
3646 In warnings, say "previous declaration" rather than "first
3648 * src/symtab.c (redeclaration): Do that here.
3649 * src/reader.c (record_merge_function_type): In the case of a result
3650 type clash, report the previous declaration rather than the very first
3651 one in the grammar file.
3652 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
3653 declared later): Add a third declaration to check this behavior.
3654 * tests/input.at (Incompatible Aliases): Update output.
3656 2006-06-27 Akim Demaille <akim@epita.fr>
3658 * doc/Doxyfile.in: New.
3659 * doc/Makefile.am: Use it.
3660 * src/lalr.h, src/symtab.h: Initial doxygenation.
3662 2006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
3664 Don't miss %merge result type warnings just because the LHS types are
3665 declared after the %merge. This continues the effort of the previous
3667 * src/reader.c (get_merge_function): Don't set the merger type yet.
3668 (record_merge_function_type): New function for setting the merger type
3669 and checking for clashes.
3670 (grammar_current_rule_merge_set): Set the location of the %merge for
3672 (packgram): Invoke record_merge_function_type for each rule now that
3673 all symbol type declarations have been parsed.
3674 * src/reader.h (merger_list.type_declaration_location): New member
3675 storing the location of the first %merge from which the type for this
3676 merging function was derived.
3677 * src/symlist.h (symbol_list.merger_declaration_location): New member
3678 storing the location of a rule's %merge, if any.
3679 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
3680 declared later): New test to catch the error fixed by the above patch.
3682 2006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
3684 Get action warnings (grammar_rule_check) right even when symbol
3685 declarations appear after the rules. Discussed at
3686 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00108.html>
3688 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00151.html>.
3689 Don't mistake the type of $$ in a midrule to be that of its parent
3691 * src/reader.c (grammar_current_rule_end): Don't invoke
3692 grammar_rule_check yet since not all symbol declarations may have been
3694 (grammar_midrule_action): Likewise.
3695 Don't record whether the midrule's $$ has been used yet since actions
3696 haven't been translated yet.
3697 Record the midrule's parent rule and its RHS index within the parent
3699 (grammar_current_rule_action_append): Don't translate the action yet
3700 since not all symbol declarations may have been parsed yet and, thus,
3701 warnings about types for $$, $n, @$, and @n can't be reported yet.
3702 (packgram): Translate the action and invoke grammar_rule_check now that
3703 all symbol declarations have been parsed.
3704 * src/scan-code.l (handle_action_dollar): Now that this is invoked
3705 after parsing the entire grammar file, the symbol list here in the case
3706 of a midrule is actually the midrule's empty RHS, so reference its
3707 parent rule's RHS where necessary.
3708 On the other hand, now that you can already know it's a midrule, you
3709 aren't forced to think $$ has the same type as its parent rule's $$.
3710 (handle_action_at): In the case of a midrule, reference the parent rule
3712 * src/symlist.c (symbol_list_new): Initialize new midrule-related
3714 (symbol_list_length): Now that this is invoked after all rules have
3715 been parsed, a NULL symbol (rather than a NULL symbol list node)
3716 terminates a rule. symbol_list_print already does this correctly.
3717 * src/symlist.h (symbol_list.midrule_parent_rule,
3718 symbol_list.midrule_parent_rhs_index): New members so that midrules can
3719 remember their relationships with their parents.
3720 * tests/input.at (Type Clashes): Extend to catch the midrule $$ error
3721 fixed by the above patch.
3722 (_AT_UNUSED_VALUES_DECLARATIONS, AT_CHECK_UNUSED_VALUES): New m4 macros
3724 (Unused values): ... this old test case and...
3725 (Unused values before symbol declarations): ... this new test case.
3726 This one is the same as `Unused values' except that all symbol
3727 declarations appear after the rules in order to catch the rest of the
3728 errors fixed by the above patch.
3730 2006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
3733 * src/reader.c (current_rule): Declare it static since it's no longer
3734 used outside this file.
3735 (grammar_current_rule_action_append): Remove redundant arguments from
3736 translate_rule_action invocation.
3737 * src/reader.h (current_rule): Remove this unused extern.
3738 * src/scan-code.h (translate_rule_action): Remove redundant arguments.
3739 * src/scan-code.l (translate_rule_action): Likewise.
3741 2006-06-25 Joel E. Denny <jdenny@ces.clemson.edu>
3743 Clean up yesterday's patch.
3744 * parse-gram.y (rhs): Move grammar_midrule_action invocation from here
3746 * src/reader.c (grammar_current_rule_action_append): ... here for
3747 consistency with grammar_current_rule_symbol_append.
3748 * tests/regression.at (Braced code in declaration in rules section):
3749 Make yyerror and yylex static as usual.
3751 2006-06-24 Joel E. Denny <jdenny@ces.clemson.edu>
3753 Fix bug that mistakes braced code in a declaration in the rules section
3754 to be a rule action. Mentioned at
3755 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00105.html>.
3756 * src/scan-gram.l: Move midrule action detection from the start of the
3757 scanning of any braced code to...
3758 * src/parse-gram.y (rhs): ... the parsing of braced code as a rule
3759 action. For readability, use $2 and @2 rather than the equivalent
3761 * tests/regression.at (Braced code in declaration in rules section):
3762 New test to catch the error fixed by the above patch.
3764 Work on code readability some.
3765 * src/scan-code.l (current_rule): Get rid of this misleading and
3766 redundant declaration: it's actually extern'ed in reader.h.
3767 (YY_DECL, code_lex, handle_action_dollar, handle_action_at,
3768 translate_action): Add a rule argument and use it instead of the global
3770 (translate_rule_action): This already receives current_rule through an
3771 argument, so pass it on to translate_action instead of assigning
3772 current_rule to current_rule.
3773 (translate_symbol_action, translate_code): Pass rule = NULL to
3776 2006-06-23 Joel E. Denny <jdenny@ces.clemson.edu>
3778 Rename %before-definitions to %start-header and %after-definitions to
3779 %end-header. Don't use these declarations to separate pre-prologue
3780 blocks from post-prologue blocks. Add new order-independent
3781 declarations %before-header and %after-header as alternatives to the
3782 traditional Yacc pre-prologue and post-prologue blocks. Discussed at
3783 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00110.html>.
3784 * NEWS (2.3+): Update for these changes.
3785 * data/glr.c (b4_before_definitions): Update to...
3786 (b4_start_header): ... this.
3787 (b4_after_definitions): Update to...
3788 (b4_end_header): ... this.
3789 * data/glr.cc: Likewise.
3790 * data/lalr1.cc: Likewise.
3791 * data/yacc.c: Likewise.
3792 * doc/bison.texinfo (The prologue): Update names, and replace remaining
3793 prologue blocks with %*-header declarations.
3794 (Calc++ Parser): Likewise.
3795 (Decl Summary): Update names.
3796 (Table of Symbols): Update description.
3797 * src/parse-gram.y (PERCENT_AFTER_DEFINITIONS): Update to...
3798 (PERCENT_END_HEADER): ... this.
3799 (PERCENT_BEFORE_DEFINITIONS): Update to...
3800 (PERCENT_START_HEADER): ... this.
3801 (PERCENT_AFTER_HEADER, PERCENT_BEFORE_HEADER): New tokens.
3802 (declaration): Update token names and m4 macro names.
3803 When parsing %end-header and %start-header, invoke translate_code
3804 before muscle_code_grow, and no longer set global booleans to remember
3805 whether these declarations have been seen.
3806 Parse new %after-header and %before-header.
3807 * src/reader.c (before_definitions, after_definitions): Remove.
3808 (prologue_augment): Accept a new bool argument to specify whether to
3809 augment the pre-prologue or post-prologue.
3810 * src/reader.h (before_definitions, after_definitions): Remove these
3812 (prologue_augment): Add new bool argument.
3813 * src/scan-gram.l (PERCENT_AFTER_DEFINITIONS): Update to...
3814 (PERCENT_END_HEADER): ... this.
3815 (PERCENT_BEFORE_DEFINITIONS): Update to...
3816 (PERCENT_START_HEADER): ... this.
3817 (PERCENT_AFTER_HEADER, PERCENT_BEFORE_HEADER): New tokens.
3818 * tests/actions.at (Printers and Destructors): Update names.
3820 2006-06-22 Joel E. Denny <jdenny@ces.clemson.edu>
3822 Add comparison operators for C++ location classes. Discussed at
3823 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00092.html>.
3824 * data/c++.m4 (b4_define_location_comparison): New boolean %define
3825 declaration indicating whether filename_type has an operator==. If
3826 filename_type is `std::string', it defaults to `1', `0' otherwise.
3827 * data/location.cc: Iff b4_define_location_comparison is `1', add
3828 operator== and operator!= for class position and for class location.
3831 * src/scan-action.l: Remove unused file.
3832 * src/symtab.c (symbol_printer_set): Use printer_location not
3833 destructor_location.
3834 * src/symtab.h (struct symbol): Replace incorrect source comment for
3836 * tests/input.at (Incompatible Aliases): Update output with correct
3839 2006-06-20 Joel E. Denny <jdenny@ces.clemson.edu>
3841 Don't put the pre-prologue in the header file. For the yacc.c code
3842 file and the glr.c header and code files, move the pre-prologue before
3843 the token definitions. Add new %before-definitions and
3844 %after-definitions to declare code that will go in both the header file
3845 and code file. Discussed at
3846 <http://lists.gnu.org/archive/html/bison-patches/2005-12/msg00000.html>,
3847 <http://lists.gnu.org/archive/html/bison-patches/2006-01/msg00016.html>,
3849 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00055.html>.
3850 * NEWS (2.3+): Describe these changes.
3851 * data/glr.c (b4_pre_prologue): Move from within to before...
3852 (b4_shared_declarations): ... this.
3853 Add new b4_before_definitions before b4_token_enums.
3854 Add new b4_after_definitions at the end.
3855 * data/glr.cc (b4_pre_prologue): Replace with...
3856 (b4_before_definitions): ... this in the header file.
3857 (b4_after_definitions): New near the end of the header file.
3858 * data/lalr1.cc (b4_pre_prologue): Move from the header file to the
3859 code file right before including the header file.
3860 (b4_before_definitions): New in the previous position of
3861 b4_pre_prologue in the header file.
3862 (b4_after_definitions): New near the end of the header file.
3863 * data/yacc.c: Clean up some m4 quoting especially in the header file.
3864 (b4_token_enums_defines): In the code file, move to right before
3865 YYSTYPE for consistency with the header file.
3866 (b4_before_definitions): New right before b4_token_enums_defines in
3867 both the header and code file.
3868 (b4_after_definitions): New right after YYLTYPE and yylloc in both the
3869 header and code file.
3870 * doc/bison.texinfo (Prologue): Show use of %before-definitions instead
3871 of prologues for %union dependencies.
3872 (Decl Summary): In %defines description, mention the effect of
3873 %before-definitions and %after-definitions on the header file.
3874 (Calc++ Parser): Forward declare driver in a %before-definitions rather
3875 than in the pre-prologue so that make check succeeds.
3876 (Table of Symbols): Add entries for %before-definitions and
3878 * src/parse-gram.y (PERCENT_BEFORE_DEFINITIONS): New token for
3879 %before-definitions.
3880 (PERCENT_AFTER_DEFINITIONS): New token for %after-definitions.
3881 (declaration): Parse those declarations and append to
3882 b4_before_definitions and b4_after_definitions, respectively.
3883 * src/reader.c (before_definitions, after_definitions): New bools to
3884 track whether those declarations have been seen.
3885 (prologue_augment): Add to the post-prologue if %union,
3886 %before-definitions, or %after-definitions has been seen.
3887 * src/reader.h (before_definitions, after_definitions): New extern's.
3888 * src/scan-gram.l: Scan the new declarations.
3889 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Place the second
3890 prologue block in a %before-definitions or a %after-definitions based
3891 on whether the %union is declared.
3892 * tests/regression.at (Early token definitions with --yacc, Early token
3893 definitions without --yacc): Move tests for token definitions into the
3894 post-prologue since token names are no longer defined in the
3897 2006-06-20 Akim Demaille <akim@epita.fr>
3899 * src/symtab.h, src/symtab.c (symbol_from_uniqstr): New.
3900 (symbol_get): Use it.
3901 * src/parse-gram.y: Use it.
3903 2006-06-19 Joel E. Denny <jdenny@ces.clemson.edu>
3905 * src/scan-gram.l: Remove unused declaration of last_string_1 so the
3906 build succeeds when configured with --enable-gcc-warnings.
3908 2006-06-19 Paul Eggert <eggert@cs.ucla.edu>
3910 * src/parse-gram.y (char_name): New function.
3911 (CHAR, STRING, string_content): For %printer, properly escape.
3912 (ID): Prefer fputs to fprintf.
3913 (id): Reindent to be consistent with other rules.
3914 Properly quote char.
3916 The Translation Project changed its way of publishing translations
3917 to maintainers. I haven't received any responses to my request
3918 for supporting the old way, or for documenting the new way. I
3919 have modified 'bootstrap' to use screen scraping
3920 (in this case, HTML scraping). This is unreliable and inelegant,
3921 but I don't see any better way. Yuck.
3922 * bootstrap (TP_URL, WGET_COMMAND): New vars.
3923 (get_translations): New function, which uses HTML scraping to
3924 deduce locations of latest translations.
3925 Use this function to grab both bison and bison-runtime .po files.
3926 Don't bother priming the pump for the runtime-po domain any more,
3927 as it's now translated better than bison is.
3929 2006-06-19 Akim Demaille <akim@epita.fr>
3931 * src/scan-gram.l: No longer "parse" things after `%union' until
3932 `{'. Rather, return a single "%union" token.
3933 No longer make symbols: return strings, and leave the conversion
3934 to symbols to the parser.
3935 (SC_PRE_CODE, token_type): Remove.
3936 * src/parse-gram.y (%union): New field `character'.
3939 (ID, ID_COLON): Now that the scanner no longer makes them
3940 identifiers, adjust all uses to invoke symbol_get.
3941 (id_colon): New, wraps the conversion from string to symbol.
3942 (%union): Accept a possible union_name.
3943 (symbol): Now can be a char.
3944 * data/c.m4 (b4_union_name): Leave a default value.
3945 * data/glr.c, data/yacc.c: Use it.
3947 2006-06-11 Joel E. Denny <jdenny@ces.clemson.edu>
3949 For associating token numbers with token names for "yacc.c", don't use
3950 #define statements unless `--yacc' is specified; always use enum
3951 yytokentype. Most important discussions start at:
3952 <http://lists.gnu.org/archive/html/bison-patches/2005-09/msg00053.html>,
3953 <http://lists.gnu.org/archive/html/bison-patches/2005-12/msg00052.html>,
3955 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00043.html>.
3956 * NEWS (2.3+): Mention.
3957 * data/c.m4 (b4_yacc_if): New.
3958 (b4_token_enums_defines): Use b4_yacc_if to decide whether to add the
3960 * doc/bison.texinfo (Bison Options): Describe the effect of `--yacc'
3961 on token name definitions.
3962 * src/getargs.c (usage): Capitalize `Yacc' in English.
3963 * src/output.c (prepare): Define b4_yacc_flag.
3964 * tests/regression.at (Early token definitions): Test that tokens names
3965 are defined before the pre-prologue not just before the post-prologue.
3966 Remove this test case and copy to...
3967 (Early token definitions with --yacc): ... this to test #define's.
3968 (Early token definitions without --yacc): ... and this to test enums.
3970 2006-06-11 Paul Eggert <eggert@cs.ucla.edu>
3972 * NEWS: Reword the post-2.3 change to not be so optimistic about
3973 removing the old "look-ahead" spelling.
3974 Update previous look-ahead/lookahead change reports.
3975 * REFERENCES: look-ahead -> lookahead (since that's
3976 what he actually wrote).
3977 * doc/refcard.tex: look ahead -> lookahead,
3978 look-ahead -> lookahead
3980 2006-06-09 Joel E. Denny <jdenny@ces.clemson.edu>
3982 For consistency, use `lookahead' instead of `look-ahead' or
3983 `look_ahead'. Discussed starting at
3984 <http://lists.gnu.org/archive/html/bison-patches/2006-01/msg00049.html>
3986 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00017.html>.
3987 * NEWS: For the next release, note the change to `--report'.
3988 * TODO, doc/bison.1: Update English.
3989 * doc/bison.texinfo: Update English.
3990 (Understanding Your Parser, Bison Options): Document as
3991 `--report=lookahead' rather than `--report=look-ahead'.
3992 * src/conflicts.c: Update English in comments.
3993 (lookahead_set): Rename from look_ahead_set.
3994 (flush_reduce): Rename argument look_ahead_tokens to lookahead_tokens.
3995 (resolve_sr_conflict): Rename local look_ahead_tokens to
3996 lookahead_tokens, and update other uses.
3997 (flush_shift, set_conflicts, conflicts_solve, count_sr_conflicts,
3998 count_rr_conflicts, conflicts_free): Update uses.
3999 * src/getargs.c (report_args): Move "lookahead" before alternate
4001 (report_types): Update uses.
4002 (usage): For `--report' usage description, state `lookahead' spelling
4003 rather than `look-ahead'.
4004 * src/getargs.h (report.report_lookahead_tokens): Rename from
4005 report_look_ahead_tokens.
4006 * src/lalr.c: Update English in comments.
4007 (compute_lookahead_tokens): Rename from compute_look_ahead_tokens.
4008 (state_lookahead_tokens_count): Rename from
4009 state_look_ahead_tokens_count.
4010 Rename local n_look_ahead_tokens to n_lookahead_tokens.
4011 (lookahead_tokens_print): Rename from look_ahead_tokens_print.
4012 Rename local n_look_ahead_tokens to n_lookahead_tokens.
4014 Update English in output.
4015 (add_lookback_edge, initialize_LA, lalr, lalr_free): Update uses.
4016 * src/print.c: Update English in comments.
4017 (lookahead_set): Rename from look_ahead_set.
4018 (print_reduction): Rename argument lookahead_token from
4020 (print_core, state_default_rule, print_reductions, print_results):
4022 * src/print_graph.c: Update English in comments.
4023 (print_core): Update uses.
4024 * src/state.c: Update English in comments.
4025 (reductions_new): Update uses.
4026 (state_rule_lookahead_tokens_print): Rename from
4027 state_rule_look_ahead_tokens_print, and update other uses.
4028 * src/state.h: Update English in comments.
4029 (reductions.lookahead_tokens): Rename from look_ahead_tokens.
4030 (state_rule_lookahead_tokens_print): Rename from
4031 state_rule_look_ahead_tokens_print.
4032 * src/tables.c: Update English in comments.
4033 (conflict_row, action_row): Update uses.
4034 * tests/glr-regression.at
4035 (Incorrect lookahead during deterministic GLR,
4036 Incorrect lookahead during nondeterministic GLR): Rename
4037 print_look_ahead to print_lookahead.
4038 * tests/torture.at: Update English in comments.
4039 (AT_DATA_LOOKAHEAD_TOKENS_GRAMMAR): Rename from
4040 AT_DATA_LOOK_AHEAD_TOKENS_GRAMMAR.
4041 (Many lookahead tokens): Update uses.
4042 * data/glr.c: Update English in comments.
4043 * lalr1.cc: Likewise.
4045 * src/conflicts.h: Likewise.
4046 * src/lalr.h: Likewise.
4047 * src/main.c: Likewise.
4048 * src/output.c: Likewise.
4049 * src/parse-gram.c: Likewise.
4050 * src/tables.h: Likewise.
4051 * tests/calc.at: Likewise.
4053 2006-06-08 Joel E. Denny <jdenny@ces.clemson.edu>
4055 * src/flex-scanner.h (yytext): Remove stray `*/' in #define.
4057 2006-06-07 Paul Eggert <eggert@cs.ucla.edu>
4059 * TODO: Add request from Nelson H. F. Beebe to be able to install
4060 Bison without installing the yacc script.
4062 2006-06-07 Joel E. Denny <jdenny@ces.clemson.edu>
4064 * src/flex-scanner.h: For the sake of Flex 2.5.4, don't #define yyleng
4065 and yytext if they're already #define'd.
4066 * src/flex-scanner.h, src/location.h: Move #include "system.h" to...
4067 * src/scan-code-c.c: ... here.
4068 * src/scan-code.l, src/scan-gram.l: ... and here. Also #include
4071 2006-06-07 Joel E. Denny <jdenny@ces.clemson.edu>
4073 Get Bison to build again when configured with --enable-gcc-warnings.
4074 * src/location.c, src/location.h, src/main.c, src/scan-code.l: Add some
4076 * src/scan-code.l (handle_action_dollar, handle_action_at): Rename
4077 loc argument as it shadows a global.
4078 * src/scan-gram.l: Remove stray comma that prevents boundary_set
4081 * src/.cvsignore: Add scan-code.c.
4083 2006-06-07 Akim Demaille <akim@epita.fr>
4085 * src/scan-gram.l: Move the "add a trailing ; to actions" code
4087 * src/scan-code.l: here.
4088 * tests/input.at (Torturing the Scanner): Fix another location
4091 2006-06-07 Akim Demaille <akim@epita.fr>
4093 * src/Makefile.am (BUILT_SOURCES): Fix the trailing backslash.
4095 2006-06-06 Akim Demaille <akim@epita.fr>
4097 Extract the parsing of user actions from the grammar scanner.
4098 As a consequence, the relation between the grammar scanner and
4099 parser is much simpler. We can also split "composite tokens" back
4101 * src/gram.h (ITEM_NUMBER_MAX, RULE_NUMBER_MAX): New.
4102 * src/scan-gram.l (add_column_width, adjust_location): Move to and
4104 * src/location.h, src/location.c (add_column_width)
4105 (location_compute): these.
4106 Fix the column count: the initial column is 0.
4107 (location_print): Be robust to ending column being 0.
4108 * src/location.h (boundary_set): New.
4109 * src/main.c: Adjust to scanner_free being renamed as
4111 * src/output.c: Include scan-code.h.
4112 * src/parse-gram.y: Include scan-gram.h and scan-code.h.
4114 (PERCENT_DESTRUCTOR, PERCENT_PRINTER, PERCENT_INITIAL_ACTION)
4115 (PERCENT_LEX_PARAM, PERCENT_PARSE_PARAM): Remove the {...} part,
4116 which is now, again, a separate token.
4117 Adjust all dependencies.
4118 Whereever actions with $ and @ are used, use translate_code.
4119 (action): Remove this nonterminal which is now useless.
4120 * src/reader.c: Include assert.h, scan-gram.h and scan-code.h.
4121 (grammar_current_rule_action_append): Use translate_code.
4122 (packgram): Bound check ruleno, itemno, and rule_length.
4123 * src/reader.h (gram_in, gram__flex_debug, scanner_cursor)
4124 (last_string, last_braced_code_loc, max_left_semantic_context)
4125 (scanner_initialize, scanner_free, scanner_last_string_free)
4126 (gram_out, gram_lineno, YY_DECL_): Move to...
4127 * src/scan-gram.h: this new file.
4128 (YY_DECL): Rename as...
4130 * src/scan-code.h, src/scan-code.l, src/scan-code-c.c: New.
4131 * src/scan-gram.l (gram_get_lineno, gram_get_in, gram_get_out):
4132 (gram_get_leng, gram_get_text, gram_set_lineno, gram_set_in):
4133 (gram_set_out, gram_get_debug, gram_set_debug, gram_lex_destroy):
4134 Move these declarations, and...
4135 (obstack_for_string, STRING_GROW, STRING_FINISH, STRING_FREE):
4137 * src/flex-scanner.h: this new file.
4138 * src/scan-gram.l (rule_length, rule_length_overflow)
4139 (increment_rule_length): Remove.
4140 (last_braced_code_loc): Rename as...
4141 (gram_last_braced_code_loc): this.
4142 Adjust to the changes of the parser.
4143 Move all the handling of $ and @ into...
4144 * src/scan-code.l: here.
4145 * src/scan-gram.l (handle_dollar, handle_at): Remove.
4146 (handle_action_dollar, handle_action_at): Move to...
4147 * src/scan-code.l: here.
4148 * src/Makefile.am (bison_SOURCES): Add flex-scanner.h,
4149 scan-code.h, scan-code-c.c, scan-gram.h.
4150 (EXTRA_bison_SOURCES): Add scan-code.l.
4151 (BUILT_SOURCES): Add scan-code.c.
4152 (yacc): Be robust to white spaces.
4154 * tests/conflicts.at, tests/input.at, tests/reduce.at,
4155 * tests/regression.at: Adjust the column numbers.
4156 * tests/regression.at: Adjust the error message.
4158 2006-06-06 Joel E. Denny <jdenny@ces.clemson.edu>
4160 * src/getargs.c (usage): Mention GLR not just LALR(1) in --help output.
4161 Use Akim's wording from
4162 <http://lists.gnu.org/archive/html/bison-patches/2006-05/msg00056.html>.
4164 2006-06-06 Joel E. Denny <jdenny@ces.clemson.edu>
4166 Between Bison releases, manually append `+' to the previous Bison
4167 release number, and use that as a signal to automatically print the
4168 ChangeLog's CVS Id keyword from --version. Discussed starting at
4169 <http://lists.gnu.org/archive/html/bison-patches/2006-05/msg00028.html>.
4170 * ChangeLog: Add Id header.
4171 * configure.ac (AC_INIT): Append `+' to `2.3'.
4172 * src/.cvsignore: Add revision.c.
4173 * src/Makefile.am (bison_SOURCES): Add revision.c and revision.h.
4174 (BUILT_SOURCES): Add revision.c.
4175 (revision.c): New target rule. This file defines a new global variable
4176 named revision. It initializes it with either the Id from ChangeLog
4177 or, if VERSION doesn't contain `+', with the empty string.
4178 * src/getargs.c (version): Print the value of revision.
4179 * src/revision.h: Extern revision.
4181 2006-06-05 Paul Eggert <eggert@cs.ucla.edu>
4183 * NEWS: Version 2.3.
4184 * configure.ac (AC_INIT): Likewise.
4186 2006-05-30 Paul Eggert <eggert@cs.ucla.edu>
4188 * data/glr.c (YYRECOVERING): Define to be a function-like macro
4189 with no arguments, not as an object-like macro. This is for
4190 compatibility with data/yacc.c. Problem reported by John P. Hartmann in
4191 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00059.html>.
4192 * doc/bison.texinfo (Action Features, Error Recovery, Table of Symbols):
4195 2006-05-30 Joel E. Denny <jdenny@ces.clemson.edu>
4197 * src/getargs.c (usage): Back out yesterday's modification of the
4198 --help output so that we don't have to wait for translation before
4201 2006-05-29 Paul Eggert <eggert@cs.ucla.edu>
4203 * doc/bison.texinfo (Introduction): Don't say "GLR grammar".
4204 Problem reported by Akim Demaille.
4206 2006-05-29 Joel E. Denny <jdenny@ces.clemson.edu>
4208 * src/getargs.c (usage): Mention GLR not just LALR(1) in --help output.
4210 2006-05-26 Paul Eggert <eggert@cs.ucla.edu>
4212 * data/yacc.c (yy_reduce_print): Omit trailing white space in
4213 generated source code. Problem reported by Frans Englich in
4214 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00049.html>.
4216 2006-05-22 Paul Eggert <eggert@cs.ucla.edu>
4218 * Makefile.maint (gzip_rsyncable, GZIP_ENV): Compute within the
4219 shell, not within 'make', so that 'make' by an ordinary builder
4220 (using GNU make) does not worry about configuring gzip. This also
4221 works around a bug reported independently by Keith Thompson and by
4222 Georg Schwarz, whereby gzip 1.2.4 --help would output usage on
4223 stderr rather than stdout, messing up the build logs.
4225 2006-05-21 Joel E. Denny <jdenny@ces.clemson.edu>
4227 * data/yacc.c (yyparse): Wrap the final return from yyparse inside YYID
4228 to make sure that YYID will never be unused. This fixes a 'make
4229 maintainer-check' failure caused by the recent changes to the 'Trivial
4230 grammars' test case, which caused g++ 4.1.0 to complain that YYID was
4232 * data/glr.c (yyparse): Wrap yyparse's return inside YYID just in case.
4234 2006-05-21 Joel E. Denny <jdenny@ces.clemson.edu>
4236 * data/glr.c (yyresolveLocations): Remove bogus YYASSERT that the
4237 state before an empty RHS is always resolved here. Only the location
4238 of that state is guaranteed to be resolved, and that's enough. This
4239 fixes the remaining bug reported by Derek M. Jones in
4240 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00027.html>.
4241 * tests/glr-regression.at (Uninitialized location when reporting
4242 ambiguity): Test the above case.
4243 Also, the embedded comments in this test case claim it checks the case
4244 of an empty RHS that has inherited the initial location. However, the
4245 corresponding LHS was already resolved, so yyresolveLocations didn't
4246 actually have reason to modify it. Fix this by forcing
4247 nondeterministic operation at the beginning of the parse.
4249 2006-05-20 Paul Eggert <eggert@cs.ucla.edu>
4251 * data/c.m4 (b4_yy_symbol_print_generate):
4252 (b4_yy_symbol_print_generate): Use 'YYSTYPE const' rather than
4253 'const YYSTYPE', and similarly for YYLTYPE. This fixes one
4254 of the bugs reported today by Derek M Jones in
4255 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00027.html>.
4256 * doc/bison.texinfo (Value Type): Document that YYSTYPE must be
4257 defined to be a type name without parens or brackets.
4258 (Location Type): Similarly for YYLTYPE.
4259 * tests/regression.at (Trivial grammars): Put in a test for this
4260 bug that will be caught by 'make maintainer-check' (though not,
4261 alas, by 'make check' unless your compiler is picky).
4263 2006-05-19 Paul Eggert <eggert@cs.ucla.edu>
4265 * NEWS: Version 2.2.
4266 * configure.ac (AC_INIT): Likewise.
4268 2006-05-17 Joel E. Denny <jdenny@ces.clemson.edu>
4270 * data/glr.c (yyreportTree): Make room in yystates for the state
4271 preceding the RHS. This fixes the segmentation fault reported by Derek
4273 <http://lists.gnu.org/archive/html/help-bison/2006-05/msg00035.html>.
4274 (yyreportTree, yypdumpstack): Subtract 1 from yyrule before printing
4275 to the user. Reported for yyreportTree by Derek M. Jones later in the
4277 * THANKS: Add Derek M. Jones.
4278 Update my email address.
4279 Fix typo in Steve Murphy's name.
4281 2006-05-14 Paul Eggert <eggert@cs.ucla.edu>
4283 * data/glr.c (yyreportSyntaxError): Fix off-by-one error in
4284 checking against YYLAST that caused the parser to miss a potential
4285 alternative in its diagnostic.
4286 Problem reported by Maria Jose Moron Fernandez in
4287 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00024.html>.
4288 * data/lalr1.cc (yysyntax_error_): Likewise.
4289 * data/yacc.c (yysyntax_error): Likewise.
4290 * tests/regression.at (_AT_DATA_DANCER_Y): Use static array for
4291 tokens, in case we run into an older C compiler.
4292 (_AT_DATA_EXPECT2_Y, AT_CHECK_EXPECT2): New macros.
4293 Use them to check for the off-by-one error fixed above.
4295 * data/yacc.c (yytnamerr): Fix typo: local var should be of type
4296 YYSIZE_T, not size_t.
4297 * tests/regression.at (Trivial grammars): New test, to catch
4298 the error fixed by the above patch.
4300 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
4302 * doc/bison.texinfo (C++ Bison Interface): Clarify the naming
4304 Reported by Steve Murphy.
4306 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
4308 * data/glr.cc, data/lalr1.cc: Using %defines is mandatory.
4309 * data/glr.cc: b4_location_flag is now b4_locations_flag.
4311 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
4313 Implement --trace=m4.
4314 * src/getargs.c (trace_types, trace_args): Accept trace_m4.
4315 * src/output.c (output_skeleton): When set, pass -dV to m4.
4317 Factor the handling of flags in m4.
4318 * src/output.c (prepare): Rename the muscle names debug, defines,
4319 error_verbose to debug_flag, defines_flag, error_verbose_flag.
4320 * data/c.m4: Adjust.
4321 (_b4_define_flag_if, b4_define_flag_if, b4_defines_if): New.
4322 Use b4_define_flag_if to define other b4_FLAG_if macros.
4323 (b4_location_if): As a consequence, rename as...
4324 (b4_locations_if): this, for consistency.
4325 Adjust all the skeletons.
4327 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
4329 * etc/bench.pm: Shorten bench names.
4331 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
4333 * src/output.h, src/output.c (error_verbose): Move to...
4334 * src/getargs.h, src/getargs.c: here.
4336 Adjust dependencies.
4338 2006-05-13 Paul Eggert <eggert@cs.ucla.edu>
4340 * data/c.m4 (b4_copyright): Put the special exception for Bison
4341 skeletons here, so we don't have to put it in each skeleton. All
4342 uses changed. Suggested by Akim Demaille. Also, wrap the
4343 copyright notice, in case it is longer than 80 columns. Replace
4344 comma by newline after title.
4346 2006-05-11 Paul Eggert <eggert@cs.ucla.edu>
4348 * doc/bison.texinfo (Calc++ Scanner): The flex behavior is an
4349 incompatibility, not a bug. Mention that it wasn't fixed as of
4352 2006-05-11 Akim Demaille <akim@lrde.epita.fr>
4354 * examples/extexi: Enforce the precedence of concatenation over
4356 Reported by Tommy Nordgren.
4358 2006-05-11 Akim Demaille <akim@lrde.epita.fr>
4360 * data/lalr1.cc (yytranslate_): Rename token as t to avoid clashes
4361 with the member "token".
4362 Reported by Martin Nylin.
4364 2006-05-08 Paul Eggert <eggert@cs.ucla.edu>
4366 * data/glr.c: Switch to Bison 2.2 special-exception language in
4367 the copyright notice. Use more-regular format for titles and
4369 * data/glr.cc: Likewise.
4370 * data/location.cc: Likewise.
4371 * data/yacc.cc: Likewise.
4372 * doc/bison.texinfo (Conditions): Document this.
4373 * NEWS: likewise. Upgrade version to 2.2.
4375 2006-04-27 Akim Demaille <akim@lrde.epita.fr>
4377 * data/glr.cc: Remove dead code.
4379 2006-04-25 Paul Eggert <eggert@cs.ucla.edu>
4381 * bootstrap: Comment out the AM_CPPFLAGS line, since we don't use
4382 that variable and the line breaks the bootstrap. Problem reported
4383 by Juan M. Guerrero.
4385 2006-04-24 Akim Demaille <akim@lrde.epita.fr>
4387 * doc/bison.texinfo (Multiple start-symbols): New.
4389 2006-04-24 Akim Demaille <akim@lrde.epita.fr>
4391 * etc/README, etc/bench.pl: New.
4393 2006-04-03 Akim Demaille <akim@lrde.epita.fr>
4395 * src/scan-gram.l: Be robust to BRACED_CODE appearing before any
4397 Reported by Mickael Labau.
4398 * tests/input.at (Torturing the Scanner): Test it.
4400 2006-03-16 Paul Eggert <eggert@cs.ucla.edu>
4402 * doc/bison.texinfo (Decl Summary): Don't mention yylloc twice.
4403 Problem reported by Bob Rossi.
4405 2006-03-13 Paul Eggert <eggert@cs.ucla.edu>
4407 * doc/bison.texinfo: Remove @shorttitlepage stuff; it wasn't used
4408 and didn't really work.
4409 For the index, use @ifnotinfo, not @iftex.
4410 Minor cleanups of spacing and terminology.
4412 2006-03-12 Akim Demaille <akim@lrde.epita.fr>
4414 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Fix the definition
4415 of AT_NAME_PREFIX when %name-prefix is not used.
4417 2006-03-12 Akim Demaille <akim@lrde.epita.fr>
4419 Apply --prefix to C++ skeletons too: they change the namespace.
4420 The test suite already exercize these cases.
4421 * data/c++.m4 (b4_namespace): New.
4422 * data/lalr1.cc, data/glr.cc, data/location.cc: Use it instead of `yy'.
4423 * data/lalr1.cc (yytnameerr_): Move its definition into the namespace.
4424 * data/yacc.c, data/glr.c: Remove a useless `[]'.
4425 * doc/bison.texinfo: Document it.
4426 (Option Cross Key): Use @multitable in all formats. It looks
4427 nicer, even in TeX outputs.
4428 (Rules): Use the same code whatever the output type is.
4429 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS)
4430 (_AT_BISON_OPTION_POPDEFS): Support AT_NAME_PREFIX.
4431 * tests/calc.at: Use it, instead of hard coding `yy'.
4433 2006-03-10 Akim Demaille <akim@lrde.epita.fr>
4435 * TODO: Remove dead items.
4437 2006-03-10 Akim Demaille <akim@lrde.epita.fr>
4439 * doc/FAQ: Remove, merged into...
4440 * doc/bison.texinfo (FAQ): this.
4441 * doc/Makefile.am (EXTRA_DIST): Adjust.
4443 2006-03-10 Akim Demaille <akim@lrde.epita.fr>
4445 * data/c.m4 (b4_token_enum): Always define the enum of tokens,
4447 * data/lalrl1.cc, data/glr.cc (parser::token_type): New.
4448 * doc/bison.texinfo (Calc++ Scanner): Use it.
4450 2006-03-09 Paul Eggert <eggert@cs.ucla.edu>
4452 Fix two nits reported by twlevo, plus one more that I discovered.
4454 * src/assoc.h (assoc_to_string): Give a name to the arg, as
4455 this is the usual Bison style.
4456 * src/location.h (location_print): Likewise.
4458 * src/reader.h (token_name): Likewise.
4460 2006-03-08 Paul Eggert <eggert@cs.ucla.edu>
4462 Fix some nits reported by twlevo.
4463 * doc/FAQ: Remove ancient Y2K FAQ, replacing it with "secure"
4464 and "POSIX". Use more-modern syntax for URLs. Mention C++
4465 and ask for Java. Don't hardwire OS version numbers. Add
4467 * m4/.cvsignore: Add unistd_h.m4, for latest gnulib.
4468 * src/conflicts.c (solved_conflicts_obstack): Now static.
4470 2006-03-08 Joel E. Denny <jdenny@ces.clemson.edu>
4472 * doc/bison.texinfo (Introduction): Mention GLR and C++ as on the web
4473 page. Say "you can use it" not "you may use it" as on the web page;
4474 we're describing capabilities not granting permission.
4476 2006-03-06 Paul Eggert <eggert@cs.ucla.edu>
4478 * data/glr.c (yyresolveLocations): Rename local variables to avoid
4479 shadowing warnings. Use usual patter for iterating through RHS.
4480 * tests/glr-regression.at
4481 (Uninitialized location when reporting ambiguity):
4482 Modify yylex so that it uses its argument, rather than trying
4483 to rely on ARGSUSED (which doesn't work for gcc with warnings).
4484 const char -> char const.
4486 * tests/Makefile.am ($(srcdir)/package.m4, maintainer-check-valgrind):
4487 Don't use tabs inside commands; it messes up 'ps'.
4488 Problem reported by twlevo.
4490 2006-03-06 Joel E. Denny <jdenny@ces.clemson.edu>
4492 * tests/glr-regression.at (Uninitialized location when reporting
4493 ambiguity): New test case.
4494 * data/glr.c (yyresolveLocations): New function, which uses
4496 (yyresolveValue): Invoke yyresolveLocations before reporting an
4498 * doc/bison.texinfo (Default Action for Locations): Note
4499 YYLLOC_DEFAULT's usage for ambiguity locations.
4500 (GLR Semantic Actions): Cross-reference those notes.
4502 2006-03-04 Joel E. Denny <jdenny@ces.clemson.edu>
4504 * tests/glr-regression.at (Leaked semantic values when reporting
4505 ambiguity): Remove unnecessary union and type declarations.
4506 (Leaked lookahead after nondeterministic parse syntax error): New test
4508 * data/glr.c (yyparse): Check for zero stacks remaining before
4509 attempting to shift the lookahead so that you don't lose it.
4511 2006-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
4513 Avoid memory leaks by not invoking longjmp in yyreportAmbiguity.
4514 * tests/glr-regression.at (Leaked semantic values when reporting
4515 ambiguity): New test case.
4516 * data/glr.c (yyreportAmbiguity): Invoke yyyerror directly and return
4517 yyabort rather than invoking yyFail, which invokes longjmp. Remove the
4518 now unnecessary yystackp parameter.
4519 (yyresolveValue): Return yyreportAmbiguity's result. Now the necessary
4520 destructors can be called.
4522 * tests/glr-regression.at: Don't invoke bison with `-t' unnecessarily
4523 in existing testcases.
4525 2006-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
4527 Don't leak semantic values for parent RHS when a user action cuts the
4528 parser, and clean up related code a bit.
4529 * tests/glr-regression.at (Leaked merged semantic value if user action
4530 cuts parse): Rename to...
4531 (Leaked semantic values if user action cuts parse): ... this. Add check
4532 for leaked parent RHS values.
4533 * data/glr.c (yydestroyGLRState): In debugging output, distinguish
4534 between an unresolved state (non-empty chain of semantic options) and
4535 an incomplete one (signaled by an empty chain).
4536 (yyresolveStates): Document the interface. Move all manipulation of a
4537 successfully or unsuccessfully resolved yyGLRState to...
4538 (yyresolveValue): ... here so that yyresolveValue always leaves a
4539 yyGLRState with consistent data and thus is easier to understand.
4540 Remove the yyvalp and yylocp parameters since they are always just
4541 taken from the yys parameter. When reporting a discarded merged value
4542 in debugging output, note that it is incompletely merged. Document the
4544 (yyresolveAction): If resolving any of the RHS states fails, destroy
4545 them all rather than leaking them. Thus, as long as user actions are
4546 written to clean up the RHS correctly, yyresolveAction always cleans up
4547 the RHS of a semantic option. Document the interface.
4549 2006-02-27 Paul Eggert <eggert@cs.ucla.edu>
4551 * data/glr.c (yyexpandGLRStack): Catch an off-by-one error that
4552 led to a segmentation fault in GNU Pascal. Problem reported
4555 2006-02-21 Joel E. Denny <jdenny@ces.clemson.edu>
4557 * doc/bison.texinfo (Mid-Rule Actions): Explain how to bury a
4558 mid-rule action inside a nonterminal symbol in order to declare a
4559 destructor for its semantic value.
4561 2006-02-16 Paul Eggert <eggert@cs.ucla.edu>
4563 * data/yacc.c [(! defined yyoverflow || YYERROR_VERBOSE) && !
4564 YYSTACK_USE_ALLOCA && ! defined YYSTACK_ALLOC && defined
4565 __cplusplus && ! defined _STDLIB_H && !
4566 ((defined YYMALLOC || defined malloc) && (defined YYFREE ||
4567 defined free))]: Include <stdlib.h> rather than rolling our own
4568 declarations of malloc and free, to avoid problems with
4569 incompatible declarations (using 'throw') C++'s stdlib.h. This
4570 should fix Debian bug 340012
4571 <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=340012>,
4572 reported by Guillaume Melquiond.
4574 2006-02-13 Paul Eggert <eggert@cs.ucla.edu>
4576 * NEWS: Clarify symbols versus types in unused-value warnings.
4578 * configure.ac (AC_INIT): Bump version number.
4580 2006-02-13 Paul Eggert <eggert@cs.ucla.edu>
4582 * NEWS: Version 2.1a.
4583 * tests/headers.at (AT_TEST_CPP_GUARD_H): Declare yyerror and yylex,
4584 since C99 requires this.
4586 2006-02-11 Paul Eggert <eggert@cs.ucla.edu>
4588 * m4/c-working.m4: New file.
4589 * configure.ac (BISON_TEST_FOR_WORKING_C_COMPILER): Use it.
4591 2006-02-10 Paul Eggert <eggert@cs.ucla.edu>
4593 * Makefile.maint: Merge from coreutils.
4595 2006-02-09 Paul Eggert <eggert@cs.ucla.edu>
4597 More portability fixes for problems summarized by Nelson H. F. Beebe.
4599 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Catch a
4600 configuration screwup "./configure CC=/opt/SUNWspro/bin/c89
4601 CFLAGS="-xarch=generic64" CXX=/opt/SUNWspro/bin/CC
4602 LDFLAGS="-xarch=generic64" with Sun C 5.7 on Solaris 10; this
4603 messes up because C++ code is compiled in 32-bit mode but linked
4606 2006-02-08 Paul Eggert <eggert@cs.ucla.edu>
4608 More portability fixes for problems summarized by Nelson H. F. Beebe.
4610 * doc/bison.texinfo (Calc++ Scanner): Work around a bug in flex
4611 2.5.31. This resembles the 2005-10-10 patch to src/scan-skel.l.
4613 * examples/calc++/Makefile.am (check_PROGRAMS): Renamed from
4614 nodist_PROGRAMS, since we don't need to actually compile the
4615 example if we're just doing a plain 'make'. This avoids bothering
4616 the installer unnecessarily about problems due to weird C++
4619 2006-02-06 Paul Eggert <eggert@cs.ucla.edu>
4621 More portability fixes for problems summarized by Nelson H. F. Beebe.
4623 * tests/headers.at (AT_TEST_CPP_GUARD_H): Use #include <...> rather
4624 than #include "...", and compile with -I'.'. The old method was
4625 not portable, according to Posix and the C standard, and it does
4626 not work with Sun C 5.7, where previous #line directives affect
4627 the working directory used in later #include "..." directives.
4629 2006-02-06 Juan Manuel Guerrero <juan.guerrero@gmx.de>
4631 Various DJGGP specific issues in /djgpp
4633 2006-02-02 Paul Eggert <eggert@cs.ucla.edu>
4635 More portability fixes for problems summarized by Nelson H. F. Beebe.
4637 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check that
4638 '#include <map>' works and that you can apply ++ to iterators.
4640 2006-02-01 Paul Eggert <eggert@cs.ucla.edu>
4642 Work around portability problems summarized by Nelson H. F. Beebe in
4643 <http://lists.gnu.org/archive/html/bug-bison/2005-09/msg00021.html>.
4645 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check
4646 that '#include <string>' works.
4648 * data/lalr1.cc (yytranslate_): No longer inline, to work around a
4649 porting problem to g++ 3.4.3 on Darwin 7.9.0, where g++ complained
4650 "warning: sorry: semantics of inline function static data `const
4651 unsigned char translate_table[262]' are wrong (you'll wind up with
4654 * lib/bbitset.h (struct bitset_vtable): Rename members not, and,
4655 or, xor to not_, and_, or_, and xor_, respectively. This works
4656 around a bug in GCC 3.4.3 on Irix 6.5, which apparently has a
4657 random system header somewhere that includes the equivalent of
4660 * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that "$CC
4661 -E" works; it apparently doesn't work with PathScale EKO Compiler
4664 2006-01-30 Joel E. Denny <jdenny@ces.clemson.edu>
4666 During deterministic GLR operation, user actions should be able to
4667 influence the parse by changing yychar. To make this easier to fix and
4668 to make glr.c easier to evolve in general, don't maintain yytoken in
4669 parallel with yychar; just compute yytoken when needed.
4670 * tests/glr-regression.at (Incorrect lookahead during deterministic
4671 GLR): Check that setting yychar in a user action has the intended
4673 * data/glr.c (yyGLRStack): Remove yytokenp member.
4674 (yyclearin): Don't set *yytokenp.
4675 (yyprocessOneStack, yyreportSyntaxError, yyrecoverSyntaxError): Examine
4676 yychar rather than *yytokenp to determine the current lookahead.
4677 Compute yytoken locally when needed.
4678 (yyparse): Likewise. Remove the local yytoken that yytokenp used to
4681 * doc/bison.texinfo (Bison Options): Remove stray sentence fragment
4682 after `--report' documentation.
4684 2006-01-30 Paul Eggert <eggert@cs.ucla.edu>
4686 * src/parse-gram.y (grammar_declaration): Location of printer
4687 symbol is @1, not list->location. Bug reported by twlevo.
4688 * tests/input.at (Incompatible Aliases): Adjust to above change.
4690 2006-01-29 Paul Eggert <eggert@cs.ucla.edu>
4692 * tests/input.at (AT_CHECK_UNUSED_VALUES): Remove. Instead, do
4693 all the test at once. This makes the output easier to read in the
4696 Fix a longstanding bug uncovered by bro-0.9a9/src/parse.y, which I
4697 got from <http://bro-ids.org/download.html>. The bug is that
4698 when two actions appeared in succession, the second one was
4699 scanned before the first one was added to the grammar rule
4700 as a midrule action. Bison then output the incorrect warning
4701 "parse.y:905.17-906.36: warning: unused value: $3".
4702 * src/parse-gram.y (BRACED_CODE, action): These are no longer
4703 associated with a value.
4704 (rhs): Don't invoke grammar_current_rule_action_append.
4705 (action): Invoke it here instead.
4706 * src/reader.c (grammar_midrule_action): Now extern.
4707 (grammar_current_rule_action_append): Don't invoke
4708 grammar_midrule_action; that is now the scanner's job.
4709 * src/reader.h (last_string, last_braced_code_loc):
4710 (grammar_midrule_action): New decls.
4711 * src/scan-gram.l (last_string): Now extern, sigh.
4712 (last_braced_code_loc): New extern variable.
4713 (<INITIAL>"{"): Invoke grammar_midrule_action if the current
4714 rule already has an action.
4715 (<SC_BRACED_CODE>"}"): Set last_braced_code_loc before returning.
4716 * tests/input.at (AT_CHECK_UNUSED_VALUES):
4717 Add some tests to check that the above changes fixed the bug.
4719 2006-01-27 Paul Eggert <eggert@cs.ucla.edu>
4721 * src/reader.c (symbol_should_be_used): Renamed from symbol_typed_p.
4722 All used changed. Check whether the symbol has a destructor,
4723 not whether it is typed.
4724 * tests/input.at (AT_CHECK_UNUSED_VALUES): Add a destructor, so
4725 that the values are still reported as unused. All line numbers
4728 2006-01-23 Paul Eggert <eggert@cs.ucla.edu>
4730 Work around a bug in bro 0.8, which underparenthesizes its
4731 definition of YYLLOC_DEFAULT.
4732 * data/glr.c: Change all uses of YYLLOC_DEFAULT to parenthesize
4734 * data/lalr1.cc: Likewise.
4735 * data/yacc.cc: Likewise.
4737 2006-01-22 Paul Eggert <eggert@cs.ucla.edu>
4739 Work around a bug in Pike 7.0, and give the Pike folks a
4740 better way to override the usual int widths.
4741 * data/yacc.c (b4_int_type): Use yytype_uint8, etc., so that the
4742 user can override the types.
4743 (short): #undef, to work around a bug in Pike 7.0.
4744 (yytype_uint8, yytype_int8, yytype_uint16, yytype_int16): New types.
4745 (union yyalloc.yyss): Use yytype_int16 rather than short.
4747 (yysigned_char): Remove.
4748 * src/parse-gram.y (YYTYPE_UINT8, YYTYPE_INT8, YYTYPE_UINT16):
4749 (YYTYPE_INT16): New macros, to test the new facility in yacc.c.
4750 * tests/regression.at (Web2c Actions): Adjust to above changes.
4752 * src/reader.c (check_and_convert_grammar): New function.
4753 (reader): Close the input file even if something went wrong during
4754 parsing. Minor file descriptor leak reported by twlevo.
4756 * src/assoc.c (assoc_to_string): Use a default: abort (); case
4757 to pacify gcc -Wswitch-default.
4758 * src/scan-gram.l (adjust_location): Use a default: break; case
4759 to pacify gcc -Wswitch-default.
4760 * src/scan-skel.h (skel_get_lineno, skel_get_in, skel_get_out):
4761 (skel_get_leng, skel_get_text, skel_set_lineno, skel_set_in):
4762 (skel_set_out, skel_get_debug, skel_set_debug, skel_lex_destroy):
4763 Move these decls to scan-skel.l, since they don't need to be
4765 * src/scan-skel.l: Accept the above decls.
4766 (skel_lex): New decl, to pacify GCC when unpatched flex 2.5.31
4769 2006-01-21 Paul Eggert <eggert@cs.ucla.edu>
4771 * Makefile.cfg (local-checks-to-skip): Add changelog-check,
4772 since we don't want to insist on a version number at the start
4773 of the changelog every time.
4774 * Makefile.maint: Sync from coreutils a bit better.
4775 (sc_trailing_blank): Renamed from sc_trailing_space.
4777 (sc_no_if_have_config_h, sc_require_config_h):
4778 (sc_prohibit_assert_without_use): New rules.
4779 (sc_obsolete_symbols): Don't catch Makefile.maint itself.
4780 (sc_dd_max_sym_length): Fix leading spaces in rule.
4781 (sc_system_h_headers): Prefix with @.
4782 (sc_useless_cpp_parens, m4-check): Output line numbers.
4783 (changelog-check): Allow version only in head.
4784 * data/c.m4: Use "defined FOO" instead of "defined (FOO)", to
4785 satisfy new Makefile.maint rule.
4786 * data/glr.c: Likewise.
4787 * data/glr.cc: Likewise.
4788 * data/lalr1.cc: Likewise.
4789 * data/yacc.c: Likewise.
4790 * lib/ebitsetv.c: Likewise.
4791 * lib/lbitset.c: Likewise.
4792 * lib/subpipe.c: Likewise.
4793 * lib/timevar.c: Likewise.
4794 * src/system.h: Likewise.
4795 * data/yacc.c (YYSTYPE): Don't generate trailing spaces in output.
4796 * djgpp/Makefile.maint: Add copyright notice.
4797 * djgpp/README.in: Likewise.
4798 * djgpp/config.bat: Likewise.
4799 * djgpp/config.site: Likewise.
4800 * djgpp/config_h.sed: Likewise.
4801 * djgpp/djunpack.bat: Likewise.
4802 * djgpp/config.sed: Fix copyright notice to match standard format.
4803 * djgpp/subpipe.h: Likewise.
4804 * lib/bitsetv-print.c: Likewise.
4805 * lib/bitsetv.c: Likewise.
4806 * lib/subpipe.h: Likewise.
4807 * lib/timevar.c: Likewise.
4808 * lib/timevar.h: Likewise.
4809 * djgpp/subpipe.c: Use standard recipe for config.h.
4810 * lib/abitset.c: Likewise.
4811 * lib/bitset.c: Likewise.
4812 * lib/bitset_stats.c: Likewise.
4813 * lib/bitsetv-print.c: Likewise.
4814 * lib/bitsetv.c: Likewise.
4815 * lib/ebitsetv.c: Likewise.
4816 * lib/get-errno.c: Likewise.
4817 * lib/lbitset.c: Likewise.
4818 * lib/subpipe.c: Likewise.
4819 * lib/timevar.c: Likewise.
4820 * lib/vbitset.c: Likewise.
4821 * tests/local.at: Likewise.
4822 * src/scan-gram.l: Don't include verify.h, since system.h does
4824 * .x-sc_require_config_h: New file.
4825 * .x-sc_unmarked_diagnostics: New file.
4827 2006-01-20 Paul Eggert <eggert@cs.ucla.edu>
4829 Be a bit more systematic about using 'abort'.
4830 * lib/abitset.c (abitset_test): Remove ATTRIBUTE_UNUSED; not needed.
4831 * lib/bitset.c (bitset_bytes, bitset_init, bitset_op4_cmp):
4832 Put 'default: abort ();' before some other case, to satisfy older
4834 * lib/bitset_stats.c (bitset_stats_init): Likewise.
4835 * lib/ebitset.c (ebitset_elt_find, ebitset_op3_cmp): Likewise.
4836 * lib/lbitset.c (lbitset_elt_find, lbitset_op3_cmp): Likewise.
4837 * src/conflicts.c (resolve_sr_conflict): Likewise.
4838 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str):
4839 (get_decision_str, get_orientation_str, get_node_alignment_str):
4840 (get_arrow_mode_str, get_crossing_type_str, get_view_str):
4841 (get_linestyle_str, get_arrowstyle_str): Likewise.
4842 * src/conflicts.c (resolve_sr_conflict):
4843 Use a default case rather than one for the one remaining enum
4844 value, to catch invalid enum values as well.
4845 * src/lalr.c (set_goto_map, map_goto):
4846 Prefer "assert (FOO);" to "if (!FOO) abort ();".
4847 * src/nullable.c (nullable_compute, token_definitions_output):
4849 * src/reader.c (packgram, reader): Likewise.
4850 * src/state.c (transitions_to, state_new, state_reduction_find):
4852 * src/symtab.c (symbol_user_token_number_set, symbol_make_alias):
4853 (symbol_pack): Likewise.
4854 * src/tables.c (conflict_row, pack_vector): Likewise.
4855 * src/scan-skel.l (QPUTS): Remove unnecessary parens.
4856 (BASE_QPUTS, "@output ".*\n): Remove unnecessary asserts.
4857 * src/system.h: Don't include <assert.h>.
4858 (assert): New macro.
4860 * doc/bison.texinfo (Prologue, Rules, Actions, Union Decl, Action Decl):
4861 (Destructor Decl, Parser Function, Pure Calling):
4862 Describe rules for braces inside C code more carefully.
4864 2006-01-19 Paul Eggert <eggert@cs.ucla.edu>
4866 Fix some porting glitches found by Nelson H. F. Beebe.
4867 * lib/abitset.c (abitset_resize): Rewrite to avoid warnings from
4868 compilers that don't understand that abort () does not return.
4869 * src/state.c (transitions_to): Likewise.
4870 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check
4871 that '#include <cstdlib>' works.
4872 * src/system.h (INT8_MIN, INT16_MIN, INT32_MIN, INT8_MAX):
4873 (INT16_MAX, UINT8_MAX, INT32_MAX, UINT16_MAX, UINT32_MAX):
4874 #undef if ! defined __STDC_VERSION__ || __STDC_VERSION__ < 199901,
4875 for the benefit of some pre-C99 compilers.
4877 * bootstrap: Undo changes to gnulib files that autoreconf made.
4879 Minor fixups to get 'make maintainer-check' to work.
4880 * configure.ac: Don't use -Wnested-externs, as it's incompatible
4881 with the new verify.h implementation.
4882 * data/c.m4 (b4_yy_symbol_print_generate): YYUSE (yyoutput).
4883 * data/glr.c (YYUSE): Depend on __GNUC__ as well.
4884 * data/yacc.c (YYUSE): Likewise.
4885 * data/lalr1.cc (yysyntax_error_): YYUSE (yystate).
4886 * lib/subpipe.c (end_of_output_subpipe): The args are unused.
4887 * src/parse-gram.y (declaration): Don't pass a string constant
4888 to a function that expects char *, since GCC might complain
4889 about the constant value.
4890 * src/reader.c (symbol_typed_p): Add parens to pacify GCC.
4891 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): #undef yylloc and yylval
4892 before #defining them.
4893 * tests/glr-regression.at
4894 (Incorrectly initialized location for empty right-hand side in GLR):
4895 In yyerror, use the msg arg.
4896 (Corrupted semantic options if user action cuts parse):
4897 (Incorrect lookahead during deterministic GLR):
4898 (Incorrect lookahead during nondeterministic GLR):
4899 Don't name a local var 'index'; it shadows string.h's 'index'.
4901 2006-01-19 Akim Demaille <akim@epita.fr>
4903 * tests/calc.at (_AT_DATA_CALC_Y): Initialize the whole initial
4904 location, not just parts of it.
4906 2006-01-18 Paul Eggert <eggert@cs.ucla.edu>
4908 * NEWS: Document the fact that multiple %unions are now allowed.
4909 * doc/bison.texinfo (Union Decl): Likewise.
4910 * TODO: This feature is now implemented, so remove it from
4913 * Makefile.maint: Merge with coreutils Makefile.maint.
4914 (CVS_LIST): Use build-aux version if available.
4915 (VERSION_REGEXP): New macro.
4916 (syntax-check-rules): Add sc_no_if_have_config_h,
4917 sc_prohibit_assert_without_use, sc_require_config_h,
4918 sc_useless_cpp_parens.
4919 (sc_obsolete_symbols): Check for O_NDELAY.
4920 (sc_dd_max_sym_length): Track coreutils.
4921 (sc_unmarked_diagnostics): Look in all files, not just *.c.
4922 (sc_useless_cpp_parens): New rule.
4923 (news-date-check): Look for version or today's date.
4924 (changelog-check): Don't require version number near head.
4925 (copyright-check): Use current year instead of hardwiring 2005.
4926 (my-distcheck): Depend on $(release_archive_dir)/$(prev-tgz).
4927 (announcement): Add --gpg-key-ID.
4929 * djgpp/config.sed: Add copyright notice, and replace "filesystem"
4932 Avoid undefined behavior that addressed just before the start of an
4933 array. Problem reported by twlevo.
4934 * src/reader.c (packgram): Prepend a new sentinel before ritem.
4935 * src/lalr.c (build_relations): Rely on new sentinel.
4936 * src/gram.c (gram_free): Adjust to new sentinel.
4938 2006-01-12 Joel E. Denny <jdenny@ces.clemson.edu>
4940 * data/glr.c (yyGLRStateSet): Rename yylookaheadStatuses to
4941 yylookaheadNeeds. All uses updated.
4942 (yysplitStack): Rename local yynewLookaheadStatuses to
4943 yynewLookaheadNeeds.
4944 * data/glr-regression.at (Incorrect lookahead during nondeterministic
4945 GLR): In comments, change `lookahead status' to `lookahead need'.
4947 2006-01-11 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
4949 * data/glr.c (yysplitStack): A little stylistic rewrite.
4951 2006-01-11 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
4953 * data/glr.c (yyaddDeferredAction): Flesh out the comment.
4955 2006-01-11 Joel E. Denny <jdenny@ces.clemson.edu>
4957 * doc/bison.texinfo: Fix some typos.
4958 (GLR Semantic Actions): New subsection discussing special
4959 considerations because GLR semantic actions might be deferred.
4960 (Actions): Mention look-ahead usage of yylval.
4961 (Actions and Locations): Mention look-ahead usage of yylloc.
4962 (Special Features for Use in Actions): Add YYEOF entry and mention it
4963 in the yychar entry.
4964 In the yychar entry, remove mention of the local yychar case (pure
4965 parser) since this is irrelevant information when writing semantic
4966 actions and since it's already discussed in `Table of Symbols' where
4967 yychar is otherwise described as an external variable.
4968 In the yychar entry, don't call it the `current' look-ahead since it
4969 isn't when semantic actions are deferred.
4970 In the yychar and yyclearin entries, add note about deferred semantic
4972 Add yylloc and yylval entries discussing look-ahead usage.
4973 (Look-Ahead Tokens): When discussing yychar, don't call it the
4974 `current' look-ahead, and do mention yylval and yylloc.
4975 (Error Recovery): Cross-reference `Action Features' when mentioning
4977 (Table of Symbols): In the yychar entry, don't call it the `current'
4979 In the yylloc and yylval entries, mention look-ahead usage.
4981 2006-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
4983 * tests/glr-regression.at: Update copyright year to 2006.
4985 2006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
4987 * data/glr.c (yyGLRStateSet): Add yybool* yylookaheadStatuses member to
4988 use during nondeterministic operation to track which stacks have
4989 actually needed the current lookahead.
4990 (yyinitStateSet, yyfreeStateSet, yyremoveDeletes, yysplitStack):
4991 Allocate, deallocate, resize, and otherwise shuffle space for
4992 yylookaheadStatuses in parallel with yystates member of yyGLRStateSet.
4993 (yysplitStack, yyprocessOneStack, yyparse): Set lookahead status
4994 appropriately during nondeterministic operation.
4995 (yySemanticOption): Add int yyrawchar, YYSTYPE yyval, and YYLTYPE yyloc
4996 members to store the current lookahead to be used by the deferred
4998 (yyaddDeferredAction): Add size_t yyk parameter specifying the stack
4999 from which the RHS is taken. Set the lookahead members of the new
5000 yySemanticOption according to the lookahead status for stack yyk.
5001 (yyglrShiftDefer, yyglrReduce): Pass yyk parameter on to
5002 yyaddDeferredAction.
5003 (yyresolveAction): Set yychar, yylval, and yylloc to the lookahead
5004 members of yySemanticOption before invoking yyuserAction, and then set
5005 them back to their current values afterward.
5006 (yyparse): Set yychar = YYEMPTY where yytoken = YYEMPTY.
5007 (yyreportAmbiguity): Add /*ARGSUSED*/ to pacify lint.
5008 * tests/glr-regression.at: Remove `.' from the ends of recent test case
5009 titles for consistency.
5010 (Leaked merged semantic value if user action cuts parse): In order to
5011 suppress lint warnings, use arguments in merge function, and assign
5012 char value < 128 in main.
5013 (Incorrect lookahead during deterministic GLR): New test case.
5014 (Incorrect lookahead during nondeterministic GLR): New test case.
5016 2006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
5018 * data/c.m4 (b4_yy_symbol_print_generate): In yy_symbol_print, accept
5019 !yyvaluep as signal that no semantic value is available to print.
5020 * data/glr.c (yydestroyGLRState): If state is not resolved, don't try
5021 to print a semantic value.
5023 2006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
5025 * tests/glr-regression.at: For consistency with my newer test cases,
5028 2006-01-05 Joel E. Denny <jdenny@ces.clemson.edu>
5030 * data/glr.c (yyresolveValue): When merging semantic options, if at
5031 least one user action succeeds but a later one cuts the parse, then
5032 destroy the semantic value before returning rather than leaking it.
5033 (yyresolveStates): If a user action cuts the parse and thus
5034 yyresolveValue fails, ignore the (unset) semantic value rather than
5035 corrupting the yyGLRState, and empty the semantic options list since
5036 the user actions should have called all necessary destructors.
5037 Simplify code with YYCHK.
5038 * tests/glr-regression.at (Corrupted semantic options if user action
5039 cuts parse): New test case.
5040 (Undesirable destructors if user action cuts parse): New test case.
5041 Before applying any of this patch, this test case never actually failed
5042 for me... but only because the corrupted semantic options usually
5044 (Leaked merged semantic value if user action cuts parse): New test
5047 2006-01-05 Akim Demaille <akim@epita.fr>
5049 * src/reader.c, src/symlist.h, src/symlist.c: s/mid_rule/midrule/.
5051 2006-01-04 Paul Eggert <eggert@cs.ucla.edu>
5053 * data/c.m4 (b4_c_modern): New macro, with a new provision for
5054 _MSC_VER. Problem reported by Cenzato Marco.
5055 (b4_c_function_def): Use it.
5056 * data/yacc.c (YYMODERN_C): Remove. All uses replaced by
5058 (yystrlen, yystpcpy, yyparse): Use b4_c_function... macros rather
5059 than rolling our own.
5061 2006-01-04 Akim Demaille <akim@epita.fr>
5063 Also warn about non-used mid-rule values.
5064 * src/symlist.h, src/symlist.c (symbol_list): Add a mid_rule
5066 (symbol_list_new): Adjust.
5067 * src/reader.c (symbol_typed_p): New.
5068 (grammar_rule_check): Use it.
5069 (grammar_midrule_action): Bind a mid-rule LHS to its rule.
5071 * tests/input.at (AT_CHECK_UNUSED_VALUES): New.
5073 * tests/actions.at (Exotic Dollars): Adjust.
5075 2006-01-04 Akim Demaille <akim@epita.fr>
5077 * src/reader.c (grammar_midrule_action): If $$ is set in a
5078 mid-rule, move the `used' bit to its lhs.
5079 * tests/input.at (Unused values): New.
5080 * tests/actions.at (Exotic Dollars): Adjust: exp is not typed.
5082 2006-01-03 Paul Eggert <eggert@cs.ucla.edu>
5084 * doc/bison.texinfo (Bison Options): Say more accurately what
5086 * src/parse-gram.y (rules_or_grammar_declaration): Don't complain
5087 about declarations in the grammar when in Yacc mode, as POSIX does
5088 not require a diagnostic when the grammar uses extensions.
5090 * src/reduce.c (reduce_grammar): Remove unnecessary cast to bool.
5092 Warn about dubious constructions like "%token T T".
5094 * src/symtab.h (struct symbol.declared): New member.
5095 * src/symtab.c (symbol_new): Initialize it to false.
5096 (symbol_class_set): New arg DECLARING, specifying whether
5097 this is a declaration that we want to warn about, if there
5098 is more than one of them. All uses changed.
5100 * data/glr.c, data/glr.cc, data/lalr1.cc, data/yacc.c:
5101 Allow multiple %union directives, whose contents concatenate.
5102 * src/parse-gram.y (grammar_declaration): Likewise.
5103 Use muscle_code_grow, so that we don't need stype_line any more.
5106 * src/muscle_tab.c (muscle_grow): Fix comment.
5108 * ChangeLog, data/c.m4, data/glr.c, data/glr.cc, data/location.cc:
5109 * data/yacc.c, src/getargs.c, src/output.c, tests/cxx-type.at:
5110 Update copyright year to 2006.
5112 2006-01-03 Akim Demaille <akim@epita.fr>
5114 Have glr.cc pass (some of) the calc.at tests.
5115 * data/glr.cc (b4_parse_param_orig): New.
5116 (b4_parse_param): Improve its definition, and bound it more
5117 clearly in the skeleton.
5118 (b4_epilogue): Append, instead of prepending, in order to keep
5120 Simplify the generation of auxiliary functions: locations and
5121 purity are mandated.
5122 (b4_global_tokens_and_yystype): Honor it.
5123 * data/location.cc (c++.m4): Don't include it.
5124 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Define AT_GLR_CC_IF
5126 * tests/calc.at (AT_CHECK_CALC): Rely on AT_SKEL_CC_IF instead of
5128 Be sure to initialize the first position's filename.
5129 (AT_CHECK_CALC_LALR1_CC): Add %location and %defines, they are
5131 (AT_CHECK_CALC_GLR_CC): New.
5132 Use it to exercise glr.cc as a lalr1.cc drop-in replacement.
5134 2006-01-02 Akim Demaille <akim@epita.fr>
5136 * src/output.c (output_skeleton): Don't hard wire the inclusion of
5138 * data/c++.m4, data/glr.c, data/yacc.c: Include c.m4.
5139 * data/glr.cc: Do not include stack.hh.
5141 2006-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
5143 * data/glr.c: Reformat whitespace with tabs.
5144 (b4_lpure_formals): Remove this unused m4 macro.
5145 * tests/cxx-type.at: Reformat whitespace with tabs.
5146 (_AT_TEST_GLR_CXXTYPES): In union Node, rename node_info to nodeInfo
5147 since it's a member. Rename type to isNterm for clarity.
5149 2005-12-29 Akim <akim@sulaco.local>
5151 Let glr.cc catch up with symbol_value_print.
5152 * data/glr.cc (b4_yysymprint_generate): Replace by...
5153 (b4_yy_symbol_print_generate): this.
5154 (yy_symbol_print, yy_symbol_value_print): Declare them.
5156 2005-12-28 Paul Eggert <eggert@cs.ucla.edu>
5158 * src/location.h (boundary): Note that a line or column equal
5159 to INT_MAX indicates an overflow.
5160 * src/scan-gram.l: Include verify.h. Don't include get-errno.h.
5161 (rule_length_overflow, increment_rule_length, add_column_width):
5163 (<INITIAL>{id}, <SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'"):
5164 (<SC_BRACED_CODE>"}"):
5165 Use increment_rule_length rather than incrementing it by hand.
5166 (adjust_location, handle_syncline): Diagnose overflow.
5167 (handle_action_dollar, handle_action_at):
5168 Fix bug with monstrosities like $-2147483648.
5169 Remove now-unnecessary checks.
5170 (scan_integer): Verify assumptions and remove now-unnecessary checks.
5171 (convert_ucn_to_byte): Verify assumptions.
5172 (handle_syncline): New arg LOC. All callers changed.
5173 Don't store through a value derived from char const * pointer.
5175 * src/reader.c (grammar_rule_check): Rewrite slightly to avoid
5178 2005-12-27 Paul Eggert <eggert@cs.ucla.edu>
5180 * src/reader.c (grammar_midrule_action, grammar_symbol_append):
5181 Remove unnecessary forward static decls.
5183 2005-12-27 Akim Demaille <akim@epita.fr>
5185 * src/reader.c (grammar_current_rule_check): Also check that $$
5187 Take the rule to check as argument, hence rename as...
5188 (grammar_rule_check): this.
5189 * src/reader.h, src/reader.c (grammar_rule_begin, grammar_rule_end):
5191 (grammar_rule_begin, grammar_rule_end): these, for consistency.
5192 (grammar_midrule_action, grammar_symbol_append): Now static.
5193 * tests/torture.at (input): Don't rely on the default action
5194 being always performed.
5195 * tests/calc.at: "Set" $$ even when the action is "cut" with
5197 * tests/actions.at (Exotic Dollars): Instead of using unused
5198 values, check that the warning is issued.
5200 2005-12-22 Paul Eggert <eggert@cs.ucla.edu>
5202 * NEWS: Improve wording for unused-value warnings.
5204 2005-12-22 Akim Demaille <akim@epita.fr>
5206 * data/lalr1.cc, data/yacc.c, data/glr.c, data/c.m4
5207 (b4_yysymprint_generate): Rename as...
5208 (b4_yy_symbol_print_generate): this.
5209 Generate yy_symbol_print instead of yysymprint.
5210 Generate also yy_symbol_value_print, and use it.
5212 2005-12-22 Akim Demaille <akim@epita.fr>
5214 * NEWS: Warn about unused values.
5215 * src/symlist.h, src/symlist.c (symbol_list, symbol_list_new): Add
5217 (symbol_list_n_get, symbol_list_n_used_set): New.
5218 (symbol_list_n_type_name_get): Use symbol_list_n_get.
5219 * src/scan-gram.l (handle_action_dollar): Flag used symbols.
5220 * src/reader.c (grammar_current_rule_check): Check that values are
5222 * src/symtab.c (symbol_print): Accept 0.
5223 * tests/existing.at: Remove the type information.
5225 Remove useless actions (beware of mid-rule actions: perl -000
5226 -pi -e 's/\s*\{\}(?=[\n\s]*[|;])//g').
5227 * tests/actions.at (Exotic Dollars): Use unused values.
5228 * tests/calc.at: Likewise.
5229 * tests/glr-regression.at (No users destructors if stack 0 deleted):
5232 * src/gram.c (rule_useful_p, rule_never_reduced_p): Use
5235 2005-12-21 Paul Eggert <eggert@cs.ucla.edu>
5237 Undo 2005-12-01 tentative license wording change. The wording is
5238 still being reviewed by the lawyers, and we don't want to wait for
5239 them before publishing a test release. For now, revert to the
5241 * NEWS: Undo 2005-12-01 change.
5242 * data/glr.c: Revert to previous license wording.
5243 * data/glr.cc: Likewise.
5244 * data/lalr1.cc: Likewise.
5245 * data/location.cc: Likewise.
5246 * data/yacc.c: Likewise.
5248 * NEWS: Reword %destructor vs YYABORT etc.
5249 * data/glr.c: Use American spacing, for consistency.
5250 * data/glr.cc: Likewise.
5251 * data/lalr1.cc: Likewise.
5252 * data/yacc.c: Likewise.
5253 * data/yacc.c: Reformat comments slightly.
5254 * doc/bison.texinfo: Replace "non-" with "non" when that makes sense,
5255 for consistency. Fix some spelling errors and reword recently-included
5257 * tests/cxx-type.at: Cast results of malloc, for C++.
5259 2005-12-21 Joel E. Denny <address@hidden>
5261 * tests/cxx-type.at: Construct a tree, count the parents of shared
5262 nodes, and free each node once and only once. Previously, the memory
5263 for semantic values was leaked instead.
5265 2005-12-21 Joel E. Denny <address@hidden>
5267 * data/glr.c (struct yyGLRStack): If pure, add yyval and yyloc members.
5268 (yylval, yylloc): If pure, #define to yystackp->yyval and
5269 yystackp->yyloc similar to yychar and yynerrs.
5270 (yyparse): If pure, remove local yylval and yylloc. Add local
5271 yystackp to accommodate pure definitions of yylval and yylloc.
5272 (b4_lex_param, b4_lyyerror_args, b4_lpure_args): If pure, change
5273 yylvalp and yyllocp to &yylval and &yylloc.
5274 (nerrs, char, lval, lloc): If pure, add #define's for b4_prefix[]
5275 namespace. Previously, nerrs and char were missing, but lval and lloc
5277 (yyprocessOneStack, yyreportSyntaxError, yyrecoverSyntaxError): Remove
5278 yylvalp and yyllocp parameters since, if pure, these are now always
5279 accessible through yystackp. If not pure, they are still accessible
5281 * data/glr.c, data/yacc.c (YYLLOC_DEFAULT): Change `if (N)' to
5282 `if (YYID (N))' to pacify lint.
5284 2005-12-21 Akim Demaille <akim@epita.fr>
5286 YYACCEPT, YYERROR, and YYABORT, as user actions, should not
5287 destroy the RHS symbols of a rule.
5288 * data/yacc.c (yylen): Initialize to 0.
5289 Keep its value to the number of items to possibly shift.
5290 In particular, a regular successful parse that ends on YYFINAL by
5291 a (internal) YYACCEPT must not have yylen != 0.
5292 (yyerrorlab, yyreturn): Pop the RHS.
5293 Reorder a bit to emphasize the `shifting' bits of code.
5294 (YYPOPSTACK): Now accept a number of items to pop.
5295 * data/lalr1.cc: Likewise.
5296 * data/glr.c: Formatting changes.
5297 Use goto instead of fall through.
5298 * doc/bison.texinfo (Destructor Decl): Complete.
5300 2005-12-20 Juan Manuel Guerrero <juan.guerrero@gmx.de>
5302 * Makefile.am: DJGPP specific files added to EXTRA_DIST.
5303 * djgpp/Makefile.maint: Fix PACKAGE variable computation.
5304 * djgpp/config.bat: Replace every occurence of the file name
5305 scan-gram-c.c with c-scan-gram.c. The same for scan-skel-c.c with
5306 c-scan-skel.c to conform with the 8.3 file name restriction on MSDOS.
5307 * djgpp/config.sed: Replace every occurence of the file name
5308 scan-gram-c.c with c-scan-gram.c. The same for scan-skel-c.c with
5309 c-scan-skel.c to conform with the 8.3 file name restriction on MSDOS.
5310 * djgpp/djunpack.bat: DJGPP specific file.
5311 * djgpp/fnchange.lst: DJGPP specific file.
5312 * djgpp/README.in: Add new information about how to unpack the bison
5313 source on MSDOS and other systems which have 8.3 file name restrictions
5314 using djunpack.bat and fnchange.lst.
5316 2005-12-12 Paul Eggert <eggert@cs.ucla.edu>
5318 * bootstrap (build_cvs_prefix): Remove; unused.
5319 (CVS_PREFIX): Adjust to yesterday's Savannah reorganization
5320 when getting gnulib.
5322 2005-12-12 "Joel E. Denny" <jdenny@ces.clemson.edu>
5324 * data/glr.c: Reorder typedef declarations for structs to match order
5325 of struct declarations.
5326 Rename yystack everywhere to yystackp except in yyparse where it's not
5328 (yyglrShift): Change parameter YYSTYPE yysval to YYSTYPE* yyvalp for
5330 (yyis_table_ninf): Change 0 to YYID (0) to pacify lint.
5331 (yyreportSyntaxError): Add /*ARGSUSED*/ to pacify lint.
5332 (yyparse): Change while (yytrue) to while ( YYID (yytrue)) to pacify
5335 2005-12-09 Paul Eggert <eggert@cs.ucla.edu>
5337 * tests/sets.at (Accept): Fix typos in regular expression used to
5338 sed out the final state number.
5340 Work around portability problem on Solaris 10: flex-generated
5341 files include <stdio.h> before <config.h>, which messes up
5342 because the latter defines __EXTENSIONS__. Address the problem
5343 by creating two new little files that include <config.h> first,
5344 then include the flex-generated files. Rewrite everyone else
5345 to include <config.h> first, as well.
5346 * lib/timevar.c: Always include "config.h".
5347 * src/Makefile.am (bison_SOURCES): Replace scan-gram.l with
5348 scan-gram-c.c, and scan-skel.l with scan-skel-c.c.
5349 (EXTRA_bison_SOURCES): New macro.
5350 * src/scan-gram-c.c, src/scan-skel-c.c: New files.
5351 * src/system.h: Don't include config.h.
5352 * src/LR0.c: Include <config.h> first.
5353 * src/assoc.c: Likewise.
5354 * src/closure.c: Likewise.
5355 * src/complain.c: Likewise.
5356 * src/conflicts.c: Likewise.
5357 * src/derives.c: Likewise.
5358 * src/files.c: Likewise.
5359 * src/getargs.c: Likewise.
5360 * src/gram.c: Likewise.
5361 * src/lalr.c: Likewise.
5362 * src/location.c: Likewise.
5363 * src/main.c: Likewise.
5364 * src/muscle_tab.c: Likewise.
5365 * src/nullable.c: Likewise.
5366 * src/output.c: Likewise.
5367 * src/parse-gram.y: Likewise.
5368 * src/print.c: Likewise.
5369 * src/print_graph.c: Likewise.
5370 * src/reader.c: Likewise.
5371 * src/reduce.c: Likewise.
5372 * src/relation.c: Likewise.
5373 * src/state.c: Likewise.
5374 * src/symlist.c: Likewise.
5375 * src/symtab.c: Likewise.
5376 * src/tables.c: Likewise.
5377 * src/uniqstr.c: Likewise.
5378 * src/vcg.c: Likewise.
5380 * src/parse-gram.y: Fix minor problems uncovered by lint.
5381 (current_lhs, current_lhs_location): Now static.
5382 (current_assoc): Remove unused variable.
5384 Cleanups so that Bison-generated parsers have less lint.
5385 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate):
5386 Prepend /*ARGSUSED*/, for lint's sake.
5387 * data/glr.c (YYUSE): Properly parenthesize, and use an alternate
5388 definition if 'lint' is defined.
5389 (YYID): New macro (or function, if lint).
5390 All uses of /*CONSTCOND*/0 replaced by YYID(0).
5391 * data/yacc.c: Likewise.
5392 * data/glr.c (yyuserAction, yyuserMerge, yy_reduce_print):
5393 (yyrecoverSyntaxError): Prepend /*ARGSUSED*/.
5394 * data/glr.cc (YYLLOC_DEFAULT): Omit /*CONSTCOND*/ since this code
5396 * data/lalr1.cc (YYUSE): Just use a cast, since this code is C++ only.
5397 * data/yacc.c (YYSTACK_FREE) [defined YYSTACK_ALLOC]:
5398 Use YYID(0) rather than 0, for lint.
5399 (yystrlen): Rewrite to avoid lint warning about ptrdiff_t overflow.
5400 (yysyntax_error): Rewrite to avoid lint warnings about parenthesization.
5402 2005-12-07 Paul Eggert <eggert@cs.ucla.edu>
5404 * tests/glr-regression.at
5405 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
5406 Close memory leak reported by twlevo.
5408 2005-12-06 "Joel E. Denny" <jdenny@ces.clemson.edu>
5410 * data/glr.c (yyprocessOneStack, yyparse): Synchronize the shift for
5412 (yyparse): Iterate another stack in order to call user destructors.
5413 * tests/glr-regression.at (No users destructors if stack 0 deleted):
5415 (Duplicated user destructor for lookahead): This test now is expected
5418 2005-12-01 Paul Eggert <eggert@cs.ucla.edu>
5420 * NEWS: Document the following change.
5421 * data/yacc.c: Say "parser skeleton" rather than "file", since
5422 it's no longer just a file.
5423 * data/glr.c: Grant a special exception for C GLR parsers, that
5424 reads like the already-existing exception for C LALR(1) parsers.
5425 * data/glr.cc: Likewise.
5426 * data/lalr1.cc: Likewise.
5427 * data/location.cc: Likewise.
5428 * data/yacc.c: Reword the "written by" statement to clarify that
5429 it was the parser skeleton, not the entire output file.
5430 * data/glr.c: Written by Paul Hilfinger.
5431 * data/glr.cc: Written by Akim Demaille.
5432 * data/lalr1.cc: Likewise.
5434 2005-11-18 Paul Eggert <eggert@cs.ucla.edu>
5436 * data/yacc.c (yy_reduce_print, YY_REDUCE_PRINT):
5437 Fix typos in previous change that broke 'make check'.
5438 YY_REDUCE_PRINT cannot be a pseudo-varargs macro; that isn't
5440 * tests/calc.at (_AT_CHECK_CALC,_AT_CHECK_CALC_ERROR):
5441 Don't check NUM-STDERR-LINES, since the output format is fluctuating.
5442 We can revert this once things settle down.
5444 * src/conflicts.c (conflicts_print): Don't print file name twice
5445 when %expect fails because there were no conflicts.
5446 * doc/bison.texinfo (Expect Decl): Tighten up wording in previous
5448 * tests/conflicts.at (%expect not enough, %expect too much):
5449 (%expect with reduce conflicts): Adjust to new behavior.
5451 2005-11-18 Akim Demaille <akim@epita.fr>
5453 * src/conflicts.c (conflicts_print): Unsatisfied %expectation are
5455 * NEWS: Document this.
5456 * doc/bison.texinfo (Expect Decl): Likewise.
5458 2005-11-16 Akim Demaille <akim@epita.fr>
5460 Generalize the display of semantic values and locations in traces.
5461 * data/glr.c (yy_reduce_print): Fix indices (again).
5462 * data/c++.m4 (b4_rhs_value, b4_rhs_location): Don't expect
5464 * data/lalr1.cc (yyreduce_print): Rename as...
5465 (yy_reduce_print): this.
5466 Display values and locations.
5467 * data/yacc.c (yy_reduce_print): Likewise.
5468 (YY_REDUCE_PRINT): Adjust to pass the required arguments.
5469 (yysymprint): Move higher to be visible from yy_reduce_print).
5471 * tests/calc.at: Adjust the expected length of the traces.
5473 2005-11-14 Akim Demaille <akim@epita.fr>
5475 * data/glr.c (yy_reduce_print): The loop was quite wrong: type are
5476 from 1 to N, while values and location start at 0.
5477 (b4_rhs_location, b4_rhs_value): Add parens around $1 and $2.
5479 2005-11-14 Akim Demaille <akim@epita.fr>
5481 * data/glr.c (yy_reduce_print): Fix the $ number.
5483 2005-11-14 Akim Demaille <akim@epita.fr>
5485 "Use" parse parameters.
5486 * data/c.m4 (b4_parse_param_for, b4_parse_param_use): New.
5487 * data/glr.c, data/glr.cc: Use them.
5488 * data/glr.c (YYUSE): Have a C++ definition that supports
5491 2005-11-14 Akim Demaille <akim@epita.fr>
5493 * data/glr.c (yyexpandGLRStack): Declare only if defined.
5495 2005-11-14 Akim Demaille <akim@epita.fr>
5498 * data/m4sugar/m4sugar.m4 (m4_prepend): New.
5500 2005-11-12 Akim Demaille <akim@epita.fr>
5502 Let position and location be PODs.
5503 * data/location.cc (position::initialize, location::initialize): New.
5504 (position::position, location::location): Define only if
5505 b4_location_constructors is defined.
5506 * data/lalr1.cc (b4_location_constructors): Define it for backward
5508 * doc/bison.texinfo (Initial Action Decl): Use initialize.
5510 2005-11-12 Akim Demaille <akim@epita.fr>
5512 * data/lalr1.cc: Move the body of the ctor and dtor into the
5513 parser file (instead of the header).
5514 Wrap the implementations in a "namespace yy".
5516 2005-11-12 Akim Demaille <akim@epita.fr>
5518 Have glr.c include its header file when created.
5519 * data/glr.c (b4_shared_declarations): New.
5520 Output them verbatim in the parser if !%defines, otherwise
5521 output then in the header file, and include it instead.
5523 2005-11-11 Akim Demaille <akim@epita.fr>
5525 * data/glr.c: Comment changes.
5527 2005-11-11 Akim Demaille <akim@epita.fr>
5529 When yydebug, report semantic and location values for reductions.
5530 * data/glr.c (yy_reduce_print): Report the semantic values and the
5532 (YY_REDUCE_PRINT): Adjust.
5533 (yyglrReduce): Use them.
5534 (b4_rhs_value, b4_rhs_location): Remove m4_eval invocations.
5535 * data/c.m4 (b4_yysymprint_generate): Specify the const arguments.
5536 * tests/calc.at (_AT_CHECK_CALC_ERROR): Remove the reduction
5539 2005-11-10 Akim Demaille <akim@epita.fr>
5541 * data/glr.c (yynewGLRStackItem, YY_RESERVE_GLRSTACK): New.
5542 (yyaddDeferredAction, yyglrShift, yyglrShiftDefer): Use them.
5543 (yyexpandGLRStack, YYRELOC): Define only when YYSTACKEXPANDABLE.
5545 2005-11-09 Albert Chin-A-Young <china@thewrittenword.com>
5547 * m4/cxx.m4, examples/Makefile.am: Don't build
5548 examples/calc++ if no C++ compiler is available. (trivial change)
5550 2005-11-09 Akim Demaille <akim@epita.fr>
5552 * src/scan-skel.l: Use a couple of asserts.
5554 2005-11-03 Akim Demaille <akim@epita.fr>
5556 In some (weird) cases, the final state number is incorrect.
5557 Reported by Alexandre Duret-Lutz.
5558 * src/LR0.c (state_list_append): Remove the computation of
5560 (save_reductions): Do it here.
5561 (get_state): Alpha conversion.
5562 (generate_states): Use a for loop.
5563 * src/gram.h (item_number_is_rule_number)
5564 (item_number_is_symbol_number): New.
5565 * src/state.c: Use assert.
5566 * src/system.h: Include assert.h.
5567 * tests/sets.at (Accept): New.
5569 2005-10-30 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
5571 * data/glr.c (yyfill): Adjust comment.
5572 (yyresolveAction): Initialize default location properly
5573 for empty right-hand sides.
5574 (yydoAction): Ditto.
5575 Add comment explaining apparently dead code.
5576 * tests/glr-regression.at
5577 (Incorrectly initialized location for empty right-hand side in GLR):
5580 2005-10-30 Paul Eggert <eggert@cs.ucla.edu>
5582 * bootstrap (cleanup_gnulib): New function. Use it to clean up
5583 gnulib when interrupted. This fixes some race conditions and
5584 works around some portability problems (one noted by Paul
5587 2005-10-22 Akim <akim@epita.fr>
5589 * Makefile.cfg: Adjust to config -> build-aux.
5592 2005-10-21 Akim Demaille <akim@epita.fr>
5594 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate): Pass
5596 * data/glr.c (YY_SYMBOL_PRINT, yydestroyGLRState): Adjust.
5597 * data/yacc.c (b4_Pure_if): Rename as...
5598 (b4_yacc_pure_if): this.
5599 (YY_SYMBOL_PRINT, yyparse): Adjust.
5600 * doc/bison.texinfo: Formatting changes.
5602 2005-10-21 Akim Demaille <akim@epita.fr>
5604 Finish the transition config -> build-aux.
5605 * configure.ac, Makefile.am: Use build-aux.
5606 * config/prev-version, config/announce-gen, config/Makefile.am:
5608 * build-aux/prev-version, build-aux/announce-gen,
5609 * build-aux/Makefile.am: here.
5611 2005-10-14 Akim Demaille <akim@epita.fr>
5613 * examples/calc++/test: Use set -x only when VERBOSE.
5615 2005-10-13 Paul Eggert <eggert@cs.ucla.edu>
5617 * NEWS: Bison now warns if it finds a stray `$' or `@' in an action.
5618 * src/scan-gram.l (<SC_BRACED_CODE>[$@]): Implement this.
5620 2005-10-13 Akim Demaille <akim@epita.fr>
5622 * src/scan-skel.l: Output the base name parts of the parser and
5624 * tests/output.at (AT_CHECK_OUTPUT): Support subdirectories, and
5626 Use this to exercise C++ outputs in subdirs.
5627 Reported by Oleg Smolsky.
5629 2005-10-12 Paul Eggert <eggert@cs.ucla.edu>
5631 * data/c.m4 (b4_c_function_def): Look at __C99_FUNC__, not at
5632 __STDC_VERSION__, as IBM cc 7.0 doesn't define the latter either.
5633 Problem reported by John P. Hartmann.
5634 * data/yacc.c (YYMODERN_C): Likewise. Don't define if the user has
5637 2005-10-12 Akim Demaille <akim@epita.fr>
5639 * src/parse-gram.y (version_check): Exit 63 to please missing
5640 (stands for "version mismatch).
5641 * tests/input.at, doc/bison.texinfo: Adjust.
5643 2005-10-10 Paul Eggert <eggert@cs.ucla.edu>
5645 Work around portability problems with Visual Age C compiler
5646 (xlc and xlC_r) reported by John P. Hartmann.
5647 * data/location.cc (initial_column, initial_line): Remove.
5648 All uses replaced by 0 and 1.
5649 * src/scan-gram.l (gram_wrap): Redefine to avoid bug in flex 2.5.31
5650 that xlc complains about.
5651 * src/scan-skel.l (skel_wrap): Likewise.
5652 * data/c.m4 (b4_c_function_def): Look at __STDC_VERSION__ as well
5654 * data/yacc.c (YYMODERN_C): New macro, which also looks at
5655 __STDC_VERSION__. Use it everywhere instead of looking at
5656 __STDC__ and __cplusplus.
5658 2005-10-10 Akim Demaille <akim@epita.fr>
5660 * examples/calc++/test: Be quiet unless VERBOSE.
5662 2005-10-05 Paul Eggert <eggert@cs.ucla.edu>
5664 * data/c.m4 (yydestruct, yysymprint):
5665 Use YYUSE instead of casting to void.
5666 * data/glr.c (YYUSE): New macro.
5667 (yyuserMerge, yyreportAmbiguity, yyreportSyntaxError):
5668 Use it instead of rolling our own.
5669 (YYLLOC_DEFAULT, YYCHK, YYDPRINTF, YY_SYMBOL_PRINT, YY_REDUCE_PRINT):
5671 Use /*CONSTCOND*/ to suppress lint warnings.
5672 * data/lalr1.cc (YYLLOC_DEFAULT, YY_SYMBOL_PRINT, YY_REDUCE_PRINT):
5673 (YY_STACK_PRINT): Use 'false' not '0'.
5675 (yysymprint_, yydestruct_): Use it instead of rolling our own.
5676 * data/yacc.c (YYUSE): New macro.
5677 (YYCOPY, YYSTACK_RELOCATE, YYBACKUP, YYLLOC_DEFAULT):
5678 (YYDPRINTF, YY_SYMBOL_PRINT, YY_STACK_PRINT, YY_REDUCE_PRINT):
5679 (yyerrorlab): Use /*CONSTCOND*/ to suppress lint warnings.
5682 * data/m4sugar/m4sugar.m4 (_m4_map): New macro.
5683 (m4_map, m4_map_sep): Use it. Handle the empty list correctly.
5685 2005-10-04 Paul Eggert <eggert@cs.ucla.edu>
5687 Undo the parts of the unlocked-I/O change that substituted
5688 putc or puts for printf. This might hurt performance a bit,
5689 but some people prefer the printf style.
5690 * data/c.m4 (yysymprint): Prefer printf to puts and putc.
5691 * data/glr.c (YYFPUTC, YYFPUTS, YYDPUTS): Remove.
5692 All uses replaced by YYFPRINTF and YYDPRINTF.
5693 * data/yacc.c: Likewise.
5694 * lib/bitset.c (bitset_print): Likewise.
5695 * lib/bitsetv.c (bitsetv_dump, debug-bitsetv): Prefer printf to
5697 * lib/lbitset.c (debug_lbitset): Likewise.
5698 * src/closure.c (print_firsts, print_fderives): Likewise.
5699 * src/gram.c (grammar_dump): Likewise.
5700 * src/lalr.c (look_ahead_tokens_print): Likewise.
5701 * src/output.c (escaped_output): Likewise.
5702 (user_actions_output): Break apart two printfs.
5703 * src/parse-gram.y (%printer): Prefer printf to putc and puts.
5704 * src/reduce.c (reduce_print): Likewise.
5705 * src/state.c (state_rule_look_ahead_tokens_print): Likewise.
5706 * src/system.h: Include unlocked-io.h rathe than stdio.h.
5708 * data/glr.c (yyuserMerge, yyreportAmbiguity, yyreportSyntaxError):
5709 Use assignments rather than casts-to-void to suppress
5710 unused-variable warnings. This pacifies 'lint'.
5711 * data/lalr1.cc (yysymprint_, yydestruct_): Use a call to suppress
5712 unused-variable warnings.
5714 2005-10-03 Juan Manuel Guerrero <juan.guerrero@gmx.de>
5716 * Makefile.am: DJGPP specific files added to EXTRA_DIST.
5718 2005-10-02 Paul Eggert <eggert@cs.ucla.edu>
5720 Use unlocked I/O for a minor performance improvement on hosts like
5721 GNU/Linux and Solaris that support unlocked I/O. The basic idea
5722 is to use the gnlib unlocked-io module, and to prefer putc and
5723 puts to printf when either will work (since the latter doesn't
5724 come in an unlocked flavor).
5725 * bootstrap (gnulib_modules): Add unlocked-io.
5726 * data/c.m4 (yysymprint): Prefer puts and putc to printf.
5727 * data/glr.c (YYFPUTC, YYFPUTS, YYDPUTS): New macros.
5728 Prefer them to YYFPRINTF and YYDPRINTF if either will do,
5729 and similarly for puts and putc and printf.
5730 * data/yacc.c: Likewise.
5731 * lib/bitset.c (bitset_print): Likewise.
5732 * lib/bitset.h [USE_UNLOCKED_IO]: Include unlocked-io.h.
5733 * lib/bitsetv.c (bitsetv_dump, debug-bitsetv): Prefer putc and puts
5735 * lib/lbitset.c (debug_lbitset): Likewise.
5736 * src/closure.c (print_firsts, print_fderives): Likewise.
5737 * src/gram.c (grammar_dump): Likewise.
5738 * src/lalr.c (look_ahead_tokens_print): Likewise.
5739 * src/output.c (escaped_output): Likewise.
5740 (user_actions_output): Coalesce two printfs.
5741 * src/parse-gram.y (%printer): Prefer putc and puts to printf.
5742 * src/reduce.c (reduce_print): Likewise.
5743 * src/state.c (state_rule_look_ahead_tokens_print): Likewise.
5744 * src/system.h: Include unlocked-io.h rather than stdio.h.
5746 * data/lalr1.cc: Don't put an unmatched ' in a dnl comment, as
5747 this confuses xgettext.
5749 2005-10-02 Akim Demaille <akim@epita.fr>
5751 * bootstrap (gnulib_modules): Add strverscmp.
5752 * lib/.cvsignore: Add strverscmp.c, strverscmp.h.
5753 * m4/.cvsignore: Add strverscmp.m4.
5754 * src/parse-gram.y (%require): New token, new rule.
5755 (version_check): New.
5756 * src/scan-gram.l (%require): Adjust.
5757 * tests/input.at (AT_REQUIRE): New.
5759 * doc/bison.texinfo (Require Decl): New.
5760 (Calc++ Parser): Use %require.
5762 2005-10-02 Akim Demaille <akim@epita.fr>
5764 * data/location.cc: New.
5766 2005-10-02 Paul Eggert <eggert@cs.ucla.edu>,
5767 Akim Demaille <akim@epita.fr>
5769 Make sure -odir/foo.cc creates dir/location.hh etc.
5770 * src/files.h (spec_outfile, parser_file_name, spec_name_prefix)
5771 (spec_file_prefix, spec_verbose_file, spec_graph_file)
5772 (spec_defines_file): Now const.
5774 (short_base_name): Remove.
5775 * src/files.c: Adjust.
5776 (dirname.h): Include.
5777 (base_name): Don't prototype it.
5778 (finput): Remove, duplicates gram_in.
5779 (full_base_name, short_base_name): Replace by...
5780 (all_but_ext, all_but_tab_ext): these.
5781 (compute_base_names): Rename as...
5782 (compute_file_name_parts): this.
5783 Update to compute the new variables, including dir_prefix.
5784 Adjust dependencies.
5785 * src/output.c (prepare): Output them.
5786 * src/reader.c: Adjust to use gram_in, not finput.
5787 * src/scan-skel.l (@dir_prefix@): New.
5789 2005-10-02 Juan Manuel Guerrero <juan.guerrero@gmx.de>
5791 * lib/subpipe.c: New function end_of_output_subpipe() added
5792 to allow support for non-posix systems. This is a no-op function
5795 * lib/subpipe.h: New function end_of_output_subpipe() added
5796 to allow support for non-posix systems. This is a no-op function
5799 * src/output.c (output_skeleton): Use end_of_output_subpipe() to
5800 handle the lack of pipe/fork functionality on non-posix systems.
5802 * djgpp/Makefile.maint: DJGPP specific file.
5804 * djgpp/README.in: DJGPP specific file.
5806 * djgpp/config.bat: DJGPP specific configuration file.
5808 * djgpp/config.sed: DJGPP specific configuration file.
5810 * djgpp/config.site: DJGPP specific configuration file.
5812 * djgpp/config_h.sed: DJGPP specific configuration file.
5814 * djgpp/subpipe.c: DJGPP specific replacement file for lib/subpipe.c.
5816 * djgpp/subpipe.h: DJGPP specific replacement file for lib/subpipe.h.
5818 2005-10-02 Akim Demaille <akim@epita.fr>
5820 * data/location.cc: New, extract from...
5821 * data/lalr1.cc: here.
5822 (location.hh): Include it after the user prologue, in case the
5823 filename type is defined by the user.
5824 Forward declation location and position before the pre-prologue.
5825 (yyresult_): Rename as...
5826 (yyresult): this, it's a local variable, not an attribute.
5827 * data/Makefile.am (dist_pkgdata_DATA): Adjust.
5829 2005-10-01 Akim Demaille <akim@epita.fr>
5831 * examples/extexi: Restore the #line generation.
5833 2005-09-30 Akim Demaille <akim@epita.fr>,
5834 Alexandre Duret-Lutz <adl@gnu.org>
5836 Move the token type and YYSTYPE in the parser class.
5837 * data/lalr1.cc (stack.hh, location.hh): Include earlier.
5838 (parser::token): New, from the moved free definition of tokens.
5839 (parser::semantic_value): Now a full definition instead of an
5840 indirection to YYSTYPE.
5841 (b4_post_prologue): No longer included in the header file, but
5842 in the implementation file.
5843 * doc/bison.texi (C+ Language Interface): Update.
5844 * src/parse-gram.y: Support unary %define.
5845 * tests/actions.at: Define global_tokens_and_yystype for backward
5846 compatibility until we update the tests.
5847 * tests/calc.at: Idem.
5848 (first_line, first_column, last_line, last_column): Define for lalr1.cc
5849 to simplify the code.
5851 2005-09-29 Paul Eggert <eggert@cs.ucla.edu>
5853 Port to SunOS 4.1.4, which lacks strtoul and strerror.
5854 Ah, the good old days! Problem reported by Peter Klein.
5855 * bootstrap (gnulib_modules): Add strerror, strtoul.
5856 * lib/.cvsignore: Add strerror.c, strtol.c, strtoul.c
5857 * m4/.cvsignore: Add strerror.m4, strtol.m4, strtoul.m4.
5859 2005-09-29 Akim Demaille <akim@epita.fr>
5861 * data/c.m4 (b4_error_verbose_if): New.
5862 * data/lalr1.cc: Use it.
5863 (YYERROR_VERBOSE_IF): Remove.
5864 (yyn_, yylen_, yystate_, yynerrs_, yyerrstatus_): Remove as
5865 parser members, replaced by...
5866 (yyn, yylen, yystate, yynerss, yyerrstatus): these parser::parse
5868 (yysyntax_error_): Takes the state number as argument.
5869 (yyreduce_print_): Use the argument yyrule, not the former
5872 2005-09-26 Paul Eggert <eggert@cs.ucla.edu>
5874 * bootstrap (gnulib_modules): Add verify.
5875 * lib/.cvsignore: Add verify.h.
5876 * src/getargs.c: Use ARGMATCH_VERIFY rather than verify.
5877 * src/system.h (verify): Remove.
5878 Include verify.h instead.
5879 * src/tables.c (tables_generate): Use new API for 'verify'.
5881 2005-09-21 Paul Eggert <eggert@cs.ucla.edu>
5883 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Do not use
5884 local variables whose names begin with 'yy'.
5885 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
5886 Trivial changes from Joel E. Denny.
5888 * bootstrap (gnulib_modules): Remove alloca. Bison doesn't need
5890 * src/main.c (main) [C_ALLOCA]: Don't flush alloca'ed memory; we
5891 don't use alloca any more.
5893 * data/yacc.c [YYSTACK_USE_ALLOCA && !defined __GNUC__ && ! defined
5894 __BUILTIN_VA_ARG_INCR && ! defined _AIX && ! defined _MSC_VER &&
5895 defined _ALLOCA_H]: Don't include <stdlib.h>; not needed in this case.
5896 * tests/torture.at (Exploding the Stack Size with Alloca): Adjust
5897 to match yacc.c, to test more hosts.
5899 2005-09-20 Paul Eggert <eggert@cs.ucla.edu>
5901 * data/yacc.c (YYSIZE_T): Reindent to make it clearer. This
5902 doesn't affect behavior.
5903 (YYSTACK_ALLOC) [YYSTACK_USE_ALLOCA]: Improve support for
5905 (_STDLIB_H): Renamed from YYINCLUDED_STDLIB_H. All uses changed.
5906 This works a bit better with glibc, if user code has already included
5908 * doc/bison.texinfo (Bison Parser): Document that users can't
5909 arbitrarily use malloc and free for other purposes. Document
5910 that <alloca.h> and <malloc.h> might be included.
5911 (Table of Symbols): Under YYSTACK_USE_ALLOCA, Don't claim that the
5912 user must declare alloca.
5914 * HACKING (release): Forwarn the Translation Project about
5917 2005-09-20 Akim Demaille <akim@epita.fr>
5919 * data/glr.c: Use b4_token_enums, not b4_token_enums_defines.
5921 2005-09-19 Paul Eggert <eggert@cs.ucla.edu>
5923 * data/yacc.c (YYSIZE_MAXIMUM): New macro.
5924 (YYSTACK_ALLOC_MAXIMUM): Use it.
5925 (yysyntax_error): New function.
5926 (yyparse) [YYERROR_VERBOSE]: Don't leak memory indefinitely if
5927 multiple syntax errors are reported, and alloca is being used.
5928 Instead, reallocate buffers twice as big each time, so that
5929 we waste at most half the allocated memory. Start with a small
5930 (128-byte) buffer that will suffice in most cases anyway.
5931 Use yysyntax_error to do most of the work.
5933 * doc/bison.texinfo (Error Reporting, Table of Symbols):
5934 yynerrs is the number of errors reported, not the number of
5937 * tests/glr-regression.at (Duplicated user destructor for lookahead):
5938 Mark it as expected to fail.
5939 Cast result of malloc; problem reported by twlevo@xs4all.nl.
5940 * tests/actions.at, tests/calc.at, tests/glr-regression.at:
5941 Don't start user-code symbols with "yy", to avoid name space problems.
5943 2005-09-19 Akim Demaille <akim@epita.fr>
5945 Remove the traits, failed experiment.
5946 It never proved useful, and anyway because of the current
5947 definition, it was not possible to have several specialization of
5948 this traits, making it useless.
5949 * data/lalr1.cc (yy:traits): Remove.
5950 Inline its definitions in the parser class.
5952 2005-09-19 Akim Demaille <akim@epita.fr>
5954 * tests/atlocal.in (LIBS): Pass INTLLIBS to address failures on at
5955 least Mac OSX with a /usr/local install of gettext.
5957 2005-09-19 Akim Demaille <akim@epita.fr>
5959 * data/lalr1.cc (yyparse): Rename yylooka and yyilooka as yychar
5960 and yytoken for similarity with the other skeletons.
5962 2005-09-19 Akim Demaille <akim@epita.fr>
5964 * NEWS, configure.ac: update version number to 2.1a.
5966 2005-09-16 Paul Eggert <eggert@cs.ucla.edu>
5968 * NEWS: Version 2.1.
5970 * NEWS: Remove notice of yytname change, since it was never in an
5972 * data/glr.c (yydestroyGLRState): Rename local var to avoid shadowing
5974 * src/output.c (prepare): Likewise.
5975 * data/lalr1.cc (YYERROR_VERBOSE_IF): New macro.
5976 (yysyntax_error_): Use it to avoid GCC warning when YYERROR_VERBOSE
5977 is not defined. This is an awful hack, but it's enough for now.
5978 All callers changed.
5979 * tests/glr-regression-at (make_value): Args are const pointers now,
5980 to avoid GCC warning.
5981 (Duplicated user destructor for lookahead): New test. Currently
5982 skipped. It fails on my host but I'm not sure it'll always fail.
5984 2005-09-16 Akim Demaille <akim@epita.fr>
5986 * src/symtab.h (struct symbol): Declare the printer and destructor
5987 as const, to avoid accidental calls to free.
5988 (symbol_destructor_set, symbol_printer_set): Adjust.
5989 * src/symtab.c: Adjust.
5991 2005-09-16 Akim Demaille <akim@epita.fr>
5993 * data/c.m4 (b4_token_enums): New.
5994 (b4_token_defines): Rename as...
5995 (b4_token_enums_defines): this.
5996 (b4_token_defines): New, output only the #defines.
5997 * data/yacc.c, data/glr.c: Adjust.
5998 * data/lalr1.cc: Use b4_token_enums instead of b4_token_enums_defines.
5999 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate): Define
6002 2005-09-16 Akim Demaille <akim@epita.fr>
6004 * data/lalr1.cc (yylex_): Remove, inline its code.
6005 (yyreport_syntax_error_): Remove, replaced by...
6006 (yysyntax_error_): this which returns a string and leaves to the
6007 caller the call to the users' error function.
6008 (yylooka_, yyilooka_, yylval, yylloc, yyerror_range_, yyval, yyloc):
6009 Move from members of the parser object...
6010 (yylooka, yyilooka, yylval, yylloc, yyerror_range, yyval, yyloc):
6011 to local variables of the parse function.
6013 2005-09-16 Akim Demaille <akim@epita.fr>
6015 * doc/bison.texinfo (Calc++ Parser): Don't promote defining YYEOF
6016 since it's in Bison's name space.
6018 2005-09-15 Paul Eggert <eggert@cs.ucla.edu>
6020 * data/glr.c (yyresolveValue): Add default case to pacify
6021 gcc -Wswitch-default. Problem reported by twlevo@xs4all.nl.
6023 * NEWS: Document when yyparse started to return 2.
6024 * doc/bison.texinfo (Parser Function): Document when yyparse
6027 * data/lalr1.cc: Revert part of previous change, as it's incompatible.
6028 (b4_filename_type): Renamed back from b4_file_name_type. All uses
6030 (class position): file_name -> filename (reverting). All uses changed.
6032 2005-09-14 Paul Eggert <eggert@cs.ucla.edu>
6034 * examples/calc++/Makefile.am ($(calc_sources_generated)): Don't
6035 do anything if $@ exists. This reverts part of the 2005-07-07
6038 2005-09-11 Paul Eggert <eggert@cs.ucla.edu>
6040 * Makefile.am (EXTRA_DIST): Do not distribute REFERENCES; it
6041 contains obsolete information and isn't worth distributing as a
6042 separate file anyway.
6043 * data/glr.c [defined YYSETJMP]: Don't include <setjmp.h>.
6044 (YYJMP_BUF, YYSETJMP, YYLONGJMP) [!defined YYSETJMP]: New macros.
6045 All uses of jmp_buf, setjmp, longjmp changed to use these instead.
6046 (yyparse): Abort if user code uses longjmp to throw an unexpected
6049 2005-09-09 Paul Eggert <eggert@cs.ucla.edu>
6051 * data/c.m4 (b4_identification): Define YYBISON_VERSION.
6052 Suggested by twlevo@xs4all.nl.
6054 * data/glr.c (YYCHK1): Do not assume YYE is in range.
6055 This avoids a diagnostic from gcc -Wswitch-enum.
6056 Problem reported by twlevo@xs4all.nl.
6058 * doc/bison.texinfo: Don't use "filename", as per GNU coding
6059 standards. Use "file name" or "file" or "name", depending on
6061 (Invocation): The output of "bison hack/foo.y" goes to foo.tab.c,
6062 not to hack/foo.tab.c.
6063 (Calc++ Top Level): 2nd arg of main is not const.
6064 * data/glr.c: b4_filename -> b4_file_name.
6065 * data/lalr1.cc: Likewise. Also, b4_filename_type -> b4_file_name_type.
6067 (class position): filename -> file_name. All uses changed.
6068 * data/yacc.c: b4_filename -> b4_file_name.
6069 * lib/bitset.h: filename -> file_name in local vars.
6070 * lib/bitset_stats.c: Likewise.
6071 * src/files.c: Likewise.
6072 * src/scan-skel.l ("@output ".*\n): Likewise.
6073 * src/files.c (file_name_split): Renamed from filename_split.
6074 * src/muscle_tab.c (muscle_init): Output b4_file_name, not b4_filename.
6076 2005-09-08 Paul Eggert <eggert@cs.ucla.edu>
6078 * lib/.cvsignore: Add pipe-safer.c, stdio--.h, unistd--.h,
6079 to accommodate latest gnulib.
6081 * tests/glr-regression.at (Duplicate representation of merged trees):
6082 Add casts to pacify g++. Problem reported by twlevo@xs4all.nl.
6084 * bootstrap: Add comment as to why the AM_LANGINFO_CODESET hack is
6087 2005-08-26 Paul Eggert <eggert@cs.ucla.edu>
6089 * data/glr.c (yydestroyGLRState): Renamed from yydestroyStackItem.
6090 All uses changed. Invoke user destructor after an error during a
6091 split parse (trivial change from Joel E. Denny).
6093 * tests/glr-regression.at
6094 (User destructor after an error during a split parse): New test case.
6095 Problem reported by Joel E. Denny in:
6096 http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00029.html
6098 2005-08-25 Paul Eggert <eggert@cs.ucla.edu>
6100 * README-cvs: Give URLs for recommended tools.
6101 Mention Gzip version problem, and bootstrapping issues.
6102 Remove troubleshooting section, as it's somewhat obsolete.
6104 * bootstrap (no_cache): New var, to accommodate different wget
6105 variants. Use it instead of '-C off'. Problem reported by
6108 * data/glr.c (yydestroyStackItem): New function.
6109 (yyrecoverSyntaxError, yyreturn): Use it to improve quality of
6110 debugging information. Problem reported by Joel E. Denny.
6112 2005-08-25 Akim Demaille <akim@epita.fr>
6114 * tests/local.at (AT_COMPILE_CXX): Pass $LINKS too.
6116 2005-08-24 Paul Eggert <eggert@cs.ucla.edu>
6118 * data/glr.c (yyrecoverSyntaxError, yyreturn):
6119 Don't invoke destructor on unresolved entries.
6120 * tests/glr-regression.at
6121 (User destructor for unresolved GLR semantic value): New test case.
6122 Problem reported by Joel E. Denny in:
6123 http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00016.html
6125 2005-08-21 Paul Eggert <eggert@cs.ucla.edu>
6127 * lib/.cvsignore: Remove realloc.c, strncasecmp.c, xstrdup.c.
6129 * m4/.cvsignore: Remove codeset.m4, gettext.m4, lib-ld.m4,
6130 lib-prefix.m4, po.m4.
6132 * data/glr.c (yyreturn): Use "Cleanup:" rather than "Error:"
6133 in yydestruct diagnostic, since it might not be an error.
6134 Problem reported by Joel Denny near end of
6135 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00040.html>.
6136 * data/lalr1.cc (yyerturn): Likewise.
6137 * data/yacc.c (yyreturn): Likewise.
6138 * tests/calc.at (_AT_CHECK_CALC_ERROR): Adjust to the above change.
6140 * src/files.c: Remove obsolete FIXME comment.
6142 * data/glr.c (YY_SYMBOL_PRINT): Append a newline, for consistency
6143 with the other templates, and to fix bogus run-on messages such
6144 as the one reported at the end of
6145 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00040.html>.
6146 All callers changed to avoid the newline.
6147 (yyprocessOneStack): Output two lines rather than one, to accommodate
6148 the above change. This changes the debug output format slightly.
6150 * data/glr.c (yyresolveValue): Fix redundant parse tree problem
6151 reported by Joel E. Denny in
6152 <http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00004.html>
6154 * tests/glr-regression.at (Duplicate representation of merged trees):
6155 New test, from Joel E. Denny in:
6156 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00013.html>.
6157 * THANKS: Add Joel E. Denny.
6159 * configure.ac (AC_INIT): Bump to 2.0c.
6161 2005-07-24 Paul Eggert <eggert@cs.ucla.edu>
6163 * NEWS: Version 2.0b.
6165 * Makefile.am (SUBDIRS): Put examples before tests, so that
6166 "make check" doesn't finish with "All 1 tests passed".
6168 * tests/regression.at (Token definitions): Don't rely on
6169 AT_PARSER_CHECK for data that contains backslashes. It currently
6170 uses 'echo', and 'echo' isn't portable if its argument contains
6171 backslashes. Problem found on OpenBSD 3.4. Also, do not assume
6172 that the byte '\0xff' is not printable in the C locale; it is,
6173 under OpenBSD 3.4 (!). Luckily, '\0x80' through '\0x9e' are
6174 not printable, so use '\0x81' to test.
6176 * data/glr.c (YYOPTIONAL_LOC): Define even if it's not a recent
6177 version of GCC, since the macro is used with non-GCC compilers.
6179 Fix core dump reported by Pablo De Napoli in
6180 <http://lists.gnu.org/archive/html/bug-bison/2005-07/msg00053.html>.
6181 * tests/regression.at (Invalid inputs with {}): New test.
6182 * src/parse-gram.y (token_name): Translate type before using
6185 * data/glr.c (ATTRIBUTE_UNUSED): Remove, since it infringes on
6186 the user's name space. All uses changed to __attribute__
6188 (yyFail, yyMemoryExhausted, yyreportAmbiguity):
6189 Add __attribute__ ((__noreturn__)).
6191 * etc/clcommit: Remove. We weren't using it, and it failed
6192 "make maintainer-distcheck".
6193 * Makefile.maint: Merge from coreutils.
6194 (CVS_LIST, CVS_LIST_EXCEPT): New macros.
6195 (syntax-check-rules): Change list of rules as described below.
6196 (sc_cast_of_alloca_return_value, sc_dd_max_sym_length):
6197 (sc_file_system, sc_obsolete_symbols, sc_prohibit_atoi_atof):
6198 (sc_prohibit_jm_in_m4, sc_root_tests, sc_tight_scope):
6199 (sc_trailing_space): New rules.
6200 (sc_xalloc_h_in_src): Remove.
6201 (sc_cast_of_argument_to_free, sc_cast_of_x_alloc_return_value):
6202 (sc_space_tab, sc_error_exit_success, sc_changelog):
6203 (sc_system_h_headers, sc_sun_os_names, sc_unmarked_diagnostics):
6204 (makefile-check, po-check, author_mark_check):
6205 (makefile_path_separator_check, copyright-check):
6206 Use grep -n, to make it easier to find violations.
6207 Use CVS_LIST and CVS_LIST_EXCEPT.
6208 (header_regexp, h_re): Remove.
6210 (sc_dd_max_sym_length, .re-list, news-date-check): New rules.
6211 (my-distcheck): Use more-modern GCC flags.
6212 (signatures, %.asc): Remove.
6213 (rel-files, announcement): Remove signatures.
6214 Restore old updating code, even though we don't use it, so
6215 that we're the same as coreutils.
6216 (alpha, beta, major): Depend on news-date-check.
6217 Make the upload commands.
6219 * data/c.m4, data/lalr1.cc, data/yacc.c: Normalize white space.
6220 * lib/abitset.h, lib/bbitset.h, lib/bitset.h: Likewise.
6221 * lib/bitset_stats.c, lib/ebitset.h, lib/lbitset.c: Likewise.
6222 * lib/libitset.h, lib/timevar.c, lib/vbitset.h: Likewise.
6223 * src/Makefile.am, src/gram.c, src/muscle_tab.h: Likewise.
6224 * src/parse-gram.y, src/system.h, src/tables.c, src/vcg.c: Likewise.
6225 * src/vcg_defaults.h, tests/cxx-type.at, tests/existing.at: Likewise.
6226 * tests/sets.at: Likewise.
6228 * data/m4sugar/m4sugar.m4: Sync from Autoconf, except that
6229 we comment out the Autoconf version number.
6230 * doc/bison.texinfo (Calc++ Scanner): Don't use atoi, as
6231 it's error-prone and "make maintainer-distcheck" rejects it.
6233 * lib/subpipe.c: Include <fcntl.h> without checking for HAVE_FCNTL_H.
6234 Indent calls to "error" to pacify "make maintainer-distcheck",
6235 when the calls are not intended to be translated.
6236 * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't check for fcntl.h.
6238 * src/Makefile.am (DEFS): Use +=, to pacify
6239 "make maintainer-distcheck".
6240 (bison_SOURCES): Add scan-skel.h.
6241 (sc_tight_scope): New rule, from coreutils.
6243 * src/files.c (src_extension, header_extension):
6244 Now static, not extern.
6245 * src/getargs.c (short_options): Likewise.
6246 * src/muscle_tab.c (muscle_table): Likewise.
6247 * src/parse-gram.y (current_class, current_type, current_prec):
6249 * src/reader.c (grammar_end, previous_rule_end): Likewise.
6250 * src/getargs.h: Redo comments to pacify "make maintainer-distcheck".
6251 * src/main.c (main): Cast bindtextdomain and textdomain calls to
6252 void, to avoid warning when NLS is disabled.
6253 * src/output.c: Include scan-skel.h.
6254 (scan_skel): Remove decl, since scan-skel.h does this.
6256 Indent calls to "error" to pacify "make maintainer-distcheck".
6257 * src/print_graph.c: Don't include <obstack.h>, as system.h does this.
6258 * src/reader.h (gram_end, gram_lineno): New decls to pacify
6259 "make maintainer-distcheck".
6260 * src/scan-skel.l (skel_lex, skel_get_lineno, skel_get_in):
6261 (skel_get_out, skel_get_leng, skel_get_text, skel_set_lineno):
6262 (skel_set_in, skel_set_out, skel_get_debug, skel_set_debug):
6263 (skel_lex_destroy, scan_skel): Move these decls to...
6264 * src/scan-skel.h: New file.
6265 * src/uniqstr.c (uniqstr_assert):
6266 Indent calls to "error" to pacify "make maintainer-distcheck".
6268 * tests/Makefile.am ($(srcdir)/package.m4): Use $(VAR),
6271 * tests/torture.at: Revamp to avoid misuse of atoi that
6272 "make maintainer-distcheck" complained about.
6274 * examples/extexi (message): Don't print a message more than once,
6275 and omit line-number decoration that makes Emacs compile think
6276 that informative messages are worth worrying about.
6278 2005-07-22 Paul Eggert <eggert@cs.ucla.edu>
6280 * configure.ac: Update version number.
6282 * Makefile.am (SUBDIRS): Add examples; somehow this got removed
6284 * examples/calc++/calc++-parser.yy: Remove from CVS, as it's
6285 autogenerated by the maintainer.
6286 * examples/calc++/.cvsignore: Add *.yy.
6288 * lib/bitset.c (bitset_alloc): Don't cast xcalloc result.
6289 * lib/bitset_stats.c (bitset_stats_init): Likewise.
6290 * lib/bitsetv.c (bitsetv_alloc): Likewise.
6292 * po/POTFILES.in: Add lib/xalloc-die.c; remove lib/xmalloc.c.
6294 * src/relation.c (relation_transpose): Rewrite to avoid bogus complaint
6295 from maintainer-distcheck about casting the argument of 'free'.
6297 * NEWS: Mention recent yytname changes.
6298 * THANKS: Add Anthony Heading, twlevo@xs4all.nl.
6300 * bootstrap: For translations that have not yet been upgraded to
6301 the new runtime-po domain, prime the pump by extracting the
6302 relevant strings from the obsolete translations. This code can be
6303 removed once the bison-runtime domain has been translated by each
6306 * src/scan-gram.l (<SC_PRE_CODE>.): Don't double-quote token names,
6307 now that token names are already quoted.
6309 Fix problem reported by Anthony Heading.
6310 * data/glr.c (YYTOKEN_TABLE): New macro.
6311 (yytname): Define if YYTOKEN_TABLE.
6312 * data/yacc.c (YYTOKEN_TABLE, yytname): Likewise.
6313 * data/lalr1.cc (YYTOKEN_TABLE, yytname_): Likewise.
6314 (YYERROR_VERBOSE): Define the same way the other skeletons do.
6315 * src/output.c (prepare_symbols): Output token_table_flag.
6317 2005-07-21 Paul Eggert <eggert@cs.ucla.edu>
6319 * data/glr.c (yyinitGLRStack, yyreturn): Don't call malloc
6320 again if the first call fails.
6322 * data/glr.c (yytnamerr): New function.
6323 (yyreportSyntaxError): Use it to dequote most string literals.
6324 * data/lalr1.c (yytname_): Renamed from yyname_, for compatibility
6325 with other skeletons. All uses changed.
6326 (yytnameerr_): New function.
6327 (yyreport_syntax_error): Use it to dequote most string literals.
6328 * data/yacc.c (yytnamerr): New function.
6329 (yyerrlab): Use it to decode most string literals.
6330 * doc/bison.texinfo (Decl Summary, Calling Convention):
6331 Clarify quoting convention of yytname.
6332 * src/output.c (prepare_symbols): Quote all names. This undoes
6333 the 2005-04-17 change, which is now accomplished (mostly) via
6334 changes in the parsers as described above.
6335 * tests/regression.at (Token definitions, Web2c Actions):
6336 Undo most 2005-04-17 change here, too.
6338 2005-07-20 Paul Eggert <eggert@cs.ucla.edu>
6340 Fix more problems reported by twlevo@xs4all.nl.
6341 * tests/cxx-type.at: Don't pipe output of ./types through sed to
6342 remove trailing spaces. This loses the exit status of ./types,
6343 and isn't needed since ./types shouldn't be emitting trailing
6345 * data/glr.c (yyreturn): Don't pop stack if yyinitStateSet failed,
6346 as the stack isn't valid in that case.
6348 * src/scan-gram.l (gram_get_lineno, gram_get_in, gram_get_out):
6349 (gram_get_leng, gram_get_text, gram_set_lineno, gram_set_in):
6350 (gram_set_out, gram_get_debug, gram_set_debug, gram_lex_destroy):
6351 Add declarations to pacify "gcc -Wmissing-prototypes" when flex 2.5.31
6353 * src/scan-skel.l (skel_get_lineno, skel_get_in, skel_get_out):
6354 (skel_get_leng, skel_get_text, skel_set_lineno, skel_set_in):
6355 (skel_set_out, skel_get_debug, skel_set_debug, skel_lex_destroy):
6358 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Work even with
6359 overly-picky compilers that reject 'char *foo = "bar";'.
6361 * src/symtab.c (SYMBOL_ATTR_PRINT, symbol_print): Direct output
6362 to FILE * parameter, not to stderr. This fixes a typo introduced
6363 in the 2005-07-12 change.
6365 * lib/subpipe.c (create_subpipe): Rewrite slightly to avoid
6366 warnings from GCC 4.
6368 * data/glr.c (yyexpandGLRStack, yyaddDeferredAction, yyexpandGLRStack):
6369 (yyglrShiftDefer, yysplitStack):
6370 Remove unused parameters b4_pure_formals. All uses changed.
6371 (yyglrShift): Remove unused parameters b4_user_formals.
6373 (yyglrReduce): Removed unused parameter yylocp. All uses changed.
6375 2005-07-18 Paul Eggert <eggert@cs.ucla.edu>
6377 Destructor cleanups and regularization among the three skeletons.
6378 * NEWS: Document the behavior changes.
6379 * data/glr.c (yyrecoverSyntaxError): Don't bother to pop the
6380 stack before failing, as the cleanup code will do it for us now.
6381 * data/lalr1.cc (yyerrlab): Likewise.
6382 * data/glr.c (yyparse): Pop everything off the stack before
6383 freeing it, so that destructors get called properly.
6384 * data/lalr1.cc (yyreturn): Likewise.
6385 * data/yacc.c (yyreturn): Pop and destroy the start symbol, too.
6386 This is more consistent.
6387 * doc/bison.texinfo (Destructor Decl): Mention more reasons
6388 why destructors might be called. 1.875 -> 2.1.
6389 (Destructor Decl, Decl Summary, Table of Symbols):
6390 Some English-language cleanups for %destructor.
6391 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
6392 Add output line for destructor of start symbol.
6393 * tests/calc.at (AT_CHECK_CALC): Add one to line counts,
6394 because of that same extra output line.
6396 * NEWS: Document minor wording changes in diagnostics of
6397 Bison-generated parsers.
6398 * data/glr.c (yyMemoryExhausted): Renamed from yyStackOverflow.
6399 Remove unused formals. All uses changed.
6400 (yyreportAmbiguity): "ambiguity detected" -> "syntax is ambiguous".
6401 (yyparse): Rename yyoverflowlab to yyexhaustedlab.
6402 * data/yacc.c (yyparse): "parser stack overflow" -> "memory exhausted".
6403 Rename yyoverflowab to yyexhaustedlab.
6404 When memory exhaustion occurs during syntax-error reporting,
6405 report it separately rather than in a single diagnostic; this
6407 * doc/bison.texinfo (Memory Management): Renamed from Stack Overflow.
6408 (Memory Exhausted): Renamed from Parser Stack Overflow.
6409 Revamp wording slightly to prefer "memory exhaustion".
6410 * tests/actions.at: "parser stack overflow" -> "memory exhausted".
6412 * data/c.m4 (b4_yysymprint_generate): Use YYFPRINTF, not fprintf.
6414 Add i18n support to the GLR skeleton. Partially fix the C++
6415 skeleton; a C++ expert needs to finish this. Remove debugging
6416 msgids; there's little point to having them translated, since they
6417 can be understood only by someone who can read the
6418 (English-language) source code.
6420 Generate runtime-po/bison-runtime.pot automatically, so that we
6421 don't have to worry about garbage getting in that file. We'll
6422 make sure after the next official release that old msgids don't
6424 <http://lists.gnu.org/archive/html/bison-patches/2005-07/msg00119.html>.
6426 * runtime-po/Makefile.in.in, runtime-po/bison-runtime.pot: Remove.
6428 * PACKAGING: Don't claim that Gawk, GCC, Perl use this method yet.
6429 Fix typos in explanations of the runtime file.
6430 * bootstrap: Change gettext keyword from YYI18N to YY_.
6431 Use standard Makefile.in.in in runtime-po, since we'll arrange
6432 for backward-compatible bison-runtime.po files in a different way.
6433 * data/glr.c (YY_): New macro, from yacc.c.
6434 (yyuserAction, yyreportAmbiguity, yyreportSyntaxError, yyparse):
6435 Translate messages intended for users.
6436 (yyreportSyntaxError): Change "virtual memory" to "memory" to match
6437 the wording in the other skeletons. We don't know that the memory
6439 * data/lalr1.cc (YY_): Renamed from _. All uses changed.
6440 Use same method that yacc.c uses.
6441 Don't translate debugging messages.
6442 (yy::yyreport_syntax_error): Put in a FIXME for the i18n stuff;
6443 it doesn't work (yet), and requires C++ expertise to fix.
6444 * data/yacc.c (YY_): Renamed from YY18N. All uses changed.
6445 Move defn to a more logical place, to be consistent with other
6447 Don't translate debugging messages.
6448 Don't assume line numbers fit in unsigned int; use unsigned long fmts.
6449 * doc/bison.texinfo: Mention <libintl.h>. Change glibc cross reference
6450 to gettext cross reference. Add indexing terms. Mention YYENABLE_NLS.
6451 * runtime-po/POTFILES.in: Add data/glr.c, data/lalr1.cc.
6453 Fix yyerror / yylex test glitches noted by twlevo@xs4all.nl.
6454 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Have yyerror return
6456 * tests/glr-regression.at (Badly Collapsed GLR States):
6458 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
6459 yylex should return 0 at EOF rather than aborting.
6461 Improve tests for stack overflow in GLR parser.
6462 Problem reported by twlevo@xs4all.nl.
6463 * data/glr.c (struct yyGLRStack): Remove yyerrflag member.
6465 (yyStackOverflow): Just longjmp, but with value 2 so that caller
6466 can handle the problem.
6467 (YYCHK1): Use goto (a la yacc.c) rather than setting a flag.
6468 (yyparse): New local variable yyresult to record the result.
6469 Use result of setjmp to set it, rather than storing itinto
6471 (yyDone): Remove label.
6472 (yyacceptlab, yyabortlab, yyoverflowlab, yyreturn): New labels,
6473 to mimic yacc.c. Do not discard lookahead if it's EOF (possible
6474 if YYABORT is used).
6475 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Exit with
6476 yyparse status; put status > 1 into diagnostic.
6477 Check that status==2 works.
6478 * tests/calc.at, tests/cxx-type.at, tests/glr-regression.at:
6479 Use exit status 3 for failure to open (which shouldn't happen).
6481 2005-07-17 Paul Eggert <eggert@cs.ucla.edu>
6483 * tests/conflicts.at (%nonassoc and eof): Don't exit with status
6484 1 on syntax error; just let yyparse do its thing.
6485 * tests/glr-regression.at (Badly Collapsed GLR States): Likewise.
6486 * tests/torture.at (AT_DATA_STACK_TORTURE): Likewise.
6487 (Exploding the Stack Size with Alloca):
6488 (Exploding the Stack Size with Malloc):
6489 Expect exit status 2, not 1, since the parser is supposed to blow
6490 its stack. Problem reported by twlevo@xs4all.nl.
6492 * data/glr.c (yyparse): Don't assume that the initial calls
6493 to YYMALLOC succeed; in that case, yyparse incorrectly returned 0.
6494 Print a stack-overflow message and fail instead.
6495 Initialize the line-number information before creating the stack,
6496 so that the stack-overflow message can report line zero safely.
6498 2005-07-14 Paul Eggert <eggert@cs.ucla.edu>
6500 Fix problems reported by twlevo@xs4all.nl.
6501 * data/glr.c (YYSTACKEXPANDABLE): Don't define if already defined.
6502 (yyuserMerge): Provide a default case if b4_mergers is empty.
6503 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Define YYSTACKEXPANDABLE.
6504 * tests/glr-regression.at
6505 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
6506 Add casts to pacify C++ compilers.
6507 * tests/glr-regression.at (Improper merging of GLR delayed action
6508 sets): Declare yylex before using it.
6509 * tests/Makefile.am (maintainer-check-g++): Fix a stray
6510 $(GXX) that escaped the renaming of GXX to CXX. Remove bogus
6511 test for valgrind; valgrind is independent of g++.
6512 (maintainer-check-posix): Add _POSIX2_VERSION=200112, to check
6513 for compatibility with POSIX 1003.1-2001 (if running coreutils).
6514 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Port to stricter C++.
6515 Use a destructor, so that we can expand the stack. Change
6516 YYSTYPE to char * so that we can free it. Cast result of malloc.
6518 2005-07-13 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
6520 * data/glr.c (yyuserAction): Fix uninitialized variable that caused
6521 a valgrind failure. Problem reported by twlevo@xs4all.nl.
6523 2005-07-13 Paul Eggert <eggert@cs.ucla.edu>
6525 * PACKAGING: New file, suggested by Bruno Haible and taken from
6526 similar wording in gettext's PACKAGING file.
6527 * NEWS: Mention PACKAGING.
6528 * Makefile.am (EXTRA_DIST): Add PACKAGING.
6530 2005-07-12 Paul Eggert <eggert@cs.ucla.edu>
6532 * NEWS: Document recent i18n improvements.
6533 * bootstrap: Get runtime translations into runtime-po.
6534 Create runtime-po files automatically, if possible.
6535 * configure.ac: Invoke BISON_I18N, so that we eat our own dog food.
6536 * data/yacc.c: Rewrite inclusion of <libintl.h> so that ENABLE_NLS
6537 does not infringe on the user's name space.
6538 (YYENABLE_NLS): Renamed from ENABLE_BISON_NLS.
6539 * doc/bison.texinfo (Internationalization): Revamp the English
6540 and Texinfo syntax a bit, to try to make it clearer.
6541 (Bison Options, Option Cross Key): Mention --print-localedir.
6542 * m4/bison-i18n.m4 (BISON_I18N): Rename ENABLE_BISON_NLS to
6543 YYENABLE_NLS. Quote a bit more.
6544 * runtime-po/.cvsignore: New file.
6545 * runtime-po/Makefile.in.in (mostlyclean): Remove *.old.pot.
6546 * runtime-po/Rules-quot: Remove; now created by bootstrap.
6547 * runtime-po/quot.sed: Likewise.
6548 * runtime-po/boldquot.sed: Likewise.
6549 * runtime-po/en@quot.header: Likewise.
6550 * runtime-po/en@boldquot.header: Likewise.
6551 * runtime-po/insert-header.sin: Likewise.
6552 * runtime-po/remove-potcdate.sin: Likewise.
6553 * runtime-po/Makevars: Likewise.
6554 * runtime-po/LINGUAS: Likewise.
6555 * runtime-po/de.po: Likewise; we will rely on the translation project
6556 to maintain this, so "bootstrap" should get it.
6557 * src/getarg.c (PRINT_LOCALEDIR_OPTION): Let the C compiler determine
6559 * src/main.c (main): Bind the bison-runtime domain, too.
6561 2005-07-12 Bruno Haible <bruno@clisp.org>
6563 * data/yacc.c: Include <libintl.h> when NLS is enabled.
6564 (YYI18N): Renamed from _. Use dgettext when NLS is enabled.
6565 * po/POTFILES.in: Remove autogenerated file src/parse-gram.c.
6566 * runtime-po: New directory.
6567 * runtime-po/Makefile.in.in: New file, copied from po/, with modified
6568 $(DOMAIN).pot-update rule, so that old messages are never dropped.
6569 * runtime-po/Rules-quot: New file, copied from po/.
6570 * runtime-po/quot.sed: Likewise.
6571 * runtime-po/boldquot.sed: Likewise.
6572 * runtime-po/en@quot.header: Likewise.
6573 * runtime-po/en@boldquot.header: Likewise.
6574 * runtime-po/insert-header.sin: Likewise.
6575 * runtime-po/remove-potcdate.sin: Likewise.
6576 * runtime-po/Makevars: New file.
6577 * runtime-po/POTFILES.in: New file.
6578 * runtime-po/LINGUAS: New file.
6579 * runtime-po/bison-runtime.pot: New file.
6580 * runtime-po/de.po: New file.
6581 * m4/bison.m4: New file.
6582 * Makefile.am (SUBDIRS): Add runtime-po.
6583 (aclocaldir, aclocal_DATA): New variables.
6584 * configure.ac: Add AC_CONFIG_FILES of runtime-po/Makefile.in.
6586 * src/getargs.c (usage): Document --print-localedir option.
6587 (PRINT_LOCALEDIR_OPTION): New enum item.
6588 (long_options): Add --print-localedir option.
6589 (getargs): Handle --print-localedir option.
6590 * doc/bison.texinfo (Bison Parser): Remove paragraph about _().
6591 (Internationalization): New section.
6593 2005-07-12 Akim Demaille <akim@epita.fr>
6595 * src/symtab.h, src/symtab.c (symbol_print): Swap the arguments,
6596 for consistency with the rest of the code.
6597 * src/symlist.h, src/symlist.c (symbol_list_print): Ditto.
6600 2005-07-12 Akim Demaille <akim@epita.fr>
6602 * src/parse-gram.y: Use %printer instead of YYPRINT.
6604 2005-07-12 Akim Demaille <akim@epita.fr>
6606 * src/symtab.h, src/symtab.c (symbol_print): New.
6607 * src/symlist.h, src/symlist.c (symbol_list_print): New.
6608 * src/symlist.c (symbol_list_n_type_name_get): Report the culprit.
6610 2005-07-12 Akim Demaille <akim@epita.fr>
6612 * data/glr.c (b4_syncline): Fix (swap) the definitions of
6613 b4_at_dollar and b4_dollar_dollar.
6615 2005-07-11 Paul Eggert <eggert@cs.ucla.edu>
6617 * doc/bison.texinfo (Mystery Conflicts): Add reference to DeRemer
6618 and Pennello's paper.
6620 2005-07-09 Paul Eggert <eggert@cs.ucla.edu>
6622 * data/yacc.c (yyparse): Undo previous patch. Instead,
6623 set yylsp[0] and yyvsp[0] only if the initial action
6624 sets yylloc and yylval, respectively.
6626 * data/yacc.c (yyparse): In the initial action, set
6627 yylsp[0] and yyvsp[0] rather than yylloc and yylval.
6628 This avoids the use of undefined variables if the initial
6629 action does not set yylloc and/or yylval.
6631 2005-07-07 Paul Eggert <eggert@cs.ucla.edu>
6633 * examples/calc++/calc++-driver.cc, examples/calc++/calc++-driver.hh:
6634 * examples/calc++/calc++-scanner.ll, examples/calc++/calc++.cc:
6635 Remove from CVS. These files are automatically generated.
6636 * examples/extexi: Clarify that this file is now part of Bison,
6637 not GNU M4, and that it works with any POSIX-compatible Awk.
6638 * examples/calc++/Makefile.am (run_extexi): Remove; not used.
6639 ($(calc_extracted)): Renamed from $(calc_sources_extracted),
6640 so that we also get calc++-parser.yy. Geneate it.
6641 Use $(AWK), not gawk, since any conforming Awk will do.
6642 Put comment before action, since older 'make' can't handle comment
6644 $(BUILT_SOURCES): List all built sources, not just some of them.
6645 $(MAINTAINERCLEANFILES): Remove *.stamp, and all built sources.
6646 $($(srcdir)/calc++-parser.stamp): Work even if POSIXLY_CORRECT.
6647 $($(calc_sources_generated)): Remove unnecessary test for existence
6648 of target. (This had a shell syntax error anyway; a stray "x".)
6649 (calc_extracted): List $(srcdir)/calc++-parser.yy, not
6651 * examples/.cvsignore, examples/calc++/.cvsignore: New files.
6653 * bootstrap (gnulib_modules): Add gettext, now that it's no longer
6654 implied by the other modules.
6656 2005-07-06 Akim Demaille <akim@epita.fr>
6658 Bind examples/calc++ to the package.
6659 * examples/calc++/Makefile: Remove, replaced by...
6660 * examples/calc++/Makefile.am: ... this new file.
6661 * examples/calc++/test: Remove input.
6662 * examples/calc++/compile: Remove.
6663 * examples/Makefile.am: New.
6664 * configure.ac, Makefile.am: Adjust.
6665 * doc/Makefile.am (clean-local): New, for more recent texi2dvis.
6667 2005-07-05 Paul Eggert <eggert@cs.ucla.edu>
6669 * data/glr.c (yyFail): Drastically simplify; since the format argument
6670 never had any % directives, we can simply pass it to yyerror.
6671 (yyparse): Use "t a; a=b;" rather than "t a = b;" when a will
6672 be modified later, as that is the usual style in glr.c.
6673 Problems reported by Paul Hilfinger.
6675 Rewrite GLR parser to catch more buffer overrun, storage exhaustion,
6676 and size overflow errors.
6677 * data/glr.c: Include <stdio.h> etc. after user prolog, not before,
6678 in case the user prolog sets feature-test macros like _GNU_SOURCE.
6679 (YYSIZEMAX): New macro.
6680 (yystpcpy): New function, taken from yacc.c.
6681 (struct yyGLRStack.yyspaceLeft): Now size_t, not int.
6682 (yyinitGLRStack, yyfreeGLRstack): Remove unnecessary forward decls,
6683 so that we don't have to maintain their signatures.
6684 (yyFail): Check for buffer overflow, by using vsnprintf rather
6685 than vsprintf. Allocate a bigger buffer if possible.
6686 Report an error if buffer allocation fails.
6687 (yyStackOverflow): New function.
6688 (yyinitStateSet, yyinitGLRStack): Return a boolean indicating whether
6689 the initialization was successful. It might fail if storage was
6691 (yyexpandGLRStack): Add more checks for storage allocation failure.
6692 Use yyStackOverflow to report failures.
6693 (yymarkStackDeleted, yyglrShift, yyglrShiftDefer, yydoAction):
6694 (yysplitStack, yyprocessOneStack, yyparse, yypstack):
6695 Don't assume stack number fits in int.
6696 (yysplitStack): Check for storage allocation failure.
6697 (yysplitStack, yyprocessOneStack): Add pure_formals, so that we
6698 can print diagnostics on storage allocation failure. All callers
6700 (yyresolveValue): Use yybool for boolean.
6701 (yyreportSyntaxError): Check for size-calculation overflow.
6702 This code is taken from yacc.c.
6703 (yyparse): Check for storage allocation errors when allocating
6706 2005-07-05 Akim Demaille <akim@epita.fr>
6708 Extract calc++ from the documentation.
6709 * doc/bison.texinfo (Calc++): Add the extraction marks.
6710 * examples/extexi: New, from the aborted GNU Programming 2E.
6711 Separate the different paragraph of a file with empty lines.
6712 * examples/Makefile: Use it to extract the whole calc++ example.
6714 2005-06-24 Akim Demaille <akim@epita.fr>
6716 * doc/bison.texinfo (C++ Parser Interface): Use defcv to define
6719 2005-06-22 Akim Demaille <akim@epita.fr>
6721 * doc/bison.texinfo (C++ Language Interface): First stab.
6722 (C++ Parsers): Remove.
6724 2005-06-22 Akim Demaille <akim@epita.fr>
6726 * data/lalr1.cc (yylex_): Honor %lex-param.
6728 2005-06-22 Akim Demaille <akim@epita.fr>
6730 Start a set of simple examples.
6731 * examples/calc++/Makefile, examples/calc++/calc++-driver.cc,
6732 * examples/calc++/calc++-driver.hh,
6733 * examples/calc++/calc++-parser.yy,
6734 * examples/calc++/calc++-scanner.ll, examples/calc++/calc++.cc,
6735 * examples/calc++/compile, examples/calc++/test: New.
6737 2005-06-09 Paul Eggert <eggert@cs.ucla.edu>
6739 * data/yacc.c (malloc, free) [defined __cplusplus]: Wrap inside
6740 extern "C" {}. This fixes a problem reported by Paul Hilfinger,
6741 which stems from the 2005-05-27 patch.
6743 2005-06-06 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
6745 * data/glr.c: Modify treatment of unused parameters to permit use
6746 of g++ (which doesn't allow __attribute__ ((unused)) for parameters).
6748 2005-05-30 Paul Eggert <eggert@cs.ucla.edu>
6750 Fix infringement on user name space reported by Janos Zoltan Szabo.
6751 * data/yacc.c (yyparse): strlen -> yystrlen.
6753 2005-05-30 Akim Demaille <akim@epita.fr>
6755 * data/lalr1.cc (_): New.
6756 Translate the various messages.
6758 2005-05-27 Paul Eggert <eggert@cs.ucla.edu>
6760 Fix infringement on user name space reported by Bruno Haible.
6761 * data/yacc.c (YYSIZE_T): Define first, so that later decls can use it.
6762 Prefer GCC's __SIZE_TYPE__ if available, so that we don't infringe on
6763 the user's name space.
6764 (alloca): Include <stdlib.h> to get it, if it's not built in.
6765 (YYMALLOC, YYFREE): Define only if needed.
6766 (malloc, free): Declare, but only if needed, as this infringes on
6767 the user name space.
6769 2005-05-25 Paul Eggert <eggert@cs.ucla.edu>
6771 Fix BeOS, FreeBSD, MacOS porting problems reported by Bruno Haible.
6772 * lib/bitset.c (bitset_print): Don't assume size_t can be printed
6774 * lib/ebitset.c (min, max): Undef before defining.
6775 * lib/vbitset.c (min, max): Likewise.
6776 * lib/subpipe.c (create_subpipe): Save local variables in case
6777 vfork clobbers them.
6779 2005-05-24 Bruno Haible <bruno@clisp.org>
6781 * tests/synclines.at (AT_SYNCLINES_COMPILE): Add support for the
6782 error message syntax used by gcc-4.0.
6784 2005-05-23 Paul Eggert <eggert@cs.ucla.edu>
6786 * README: Mention m4 1.4.3. Remove obsolete advice about
6787 Sun Forte Developer 6 update 2, VMS, and MS-DOS.
6789 * bootstrap: Remove workaround for problem I encountered with
6790 gettext 0.14.1; it seems to be fixed now.
6792 2005-05-22 Paul Eggert <eggert@cs.ucla.edu>
6794 * NEWS: Version 2.0a.
6796 * src/files.c: Include "stdio-safer.h"; this fixes a typo in
6797 the previous change.
6799 Various maintainer cleanups.
6800 * .cvsignore: Add a.exe, a.out, b.out,, conf[0-9]*, confdefs*,
6801 conftest*, for benefit of CVS commands run at the same time as
6802 "configure". Add build-aux, since "bootstrap" now creates it and
6804 * Makefile.cfg (move_if_change): Remove.
6805 * Makefile.maint: Remove the update stuff; we now use "bootstrap".
6806 (ftp-gnu, www-gnu, move_if_change, local_updates, update):
6807 (po_repo, do-po-update, po-update, wget_files, get-targets):
6808 (config.guess-url_prefix, config.sub-url_prefix):
6809 (ansi2knr.c-url_prefix, texinfo.tex-url_prefix):
6810 (standards.texi-url_prefix, make-stds.texi-url_prefix, taget, url):
6811 ($(get-targets), cvs-files, automake_repo, wget-update, cvs-update):
6813 * configure.ac (AC_CONFIG_AUX_DIR): Change from config to build-aux;
6814 this is now the recommended name.
6815 * config/.cvsignore: Remove config.guess, config.rpath, config.sub,
6816 depcomp, install-sh, mdate-sh, missing, mkinstalldirs, texinfo.tex,
6817 ylwrap. These files now go into build-aux.
6818 * config/move-if-change: Remove.
6819 * config/prev-version.txt: Bump from 1.75 to 2.0.
6821 * bootstrap: Add stdio-safer, unistd-safer modules.
6822 Remove m4/glibc2.m4 (introduced by latest gnulib, but
6824 * lib/.cvsignore: Add dup-safer.c, fd-safer.c,
6825 fopen-safer.c, stdio-safer.h, unistd-safer.h.
6826 * lib/subpipe.c: Include "unistd-safer.h".
6827 (create_subpipe): Make sure all the newly-created
6828 file descriptors are > 2, so that diagnostics don't
6829 get sent down them (which might cause Bison to hang, in theory).
6830 * m4/.cvsignore: Add stdio-safer.m4, unistd-safer.m4.
6831 * src/files.c (xfopen): Use fopen_safer, not fopen.
6833 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Port
6834 yesterday's yacc.c fix.
6836 2005-05-21 Paul Eggert <eggert@cs.ucla.edu>
6838 * data/glr.c, data/lalr1.cc: Update copyright date.
6840 Fix a destructor bug reported by Wolfgang Spraul in
6841 <http://lists.gnu.org/archive/html/bug-bison/2005-05/msg00042.html>.
6842 * data/yacc.c (yyabortlab): Don't call destructor, and
6843 don't set yychar to EMPTY.
6844 (yyoverflowlab): Don't call destructor.
6845 (yyreturn): Call destructor, if yychar is neither YYEOF nor YYEMPTY.
6846 * tests/calc.at (AT_CHECK_CALC): Expect one fewer output lines,
6847 since we no longer output the message "discarding lookahead token
6850 2005-05-20 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
6852 * data/glr.c (YY_SYMBOL_PRINT): Don't print newline at end to
6853 fix a small glitch in debugging output.
6854 (yyprocessOneStack, yyrecoverSyntaxError, yyparse): Print newline
6855 after YY_SYMBOL_PRINT where needed.
6857 (struct yyGLRState): Add some comments.
6858 (struct yySemanticOption): Add some comments.
6859 (union yyGLRStackItem): Add comment.
6861 (yymergeOptionSets): Correct this to properly perform the union,
6862 avoiding infinite reported by Michael Rosien.
6865 * tests/glr-regression.at: Add test for GLR merging error reported
6868 2005-05-13 Paul Eggert <eggert@cs.ucla.edu>
6870 * COPYING, ChangeLog, GNUmakefile, HACKING, Makefile.am,
6871 Makefile.cfg, Makefile.maint, NEWS, README, README-alpha,
6872 README-cvs, TODO, bootstrap, configure.ac, data/Makefile.am,
6873 data/README, data/c.m4, data/glr.c, data/lalr1.cc, data/yacc.c,
6874 data/m4sugar/m4sugar.m4, doc/Makefile.am, doc/bison.texinfo,
6875 doc/fdl.texi, doc/gpl.texi, doc/refcard.tex, lib/Makefile.am,
6876 lib/abitset.c, lib/abitset.h, lib/bbitset.h, lib/bitset.c,
6877 lib/bitset.h, lib/bitset_stats.c, lib/bitset_stats.h,
6878 lib/bitsetv-print.c, lib/bitsetv-print.h, lib/bitsetv.c,
6879 lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/get-errno.c,
6880 lib/get-errno.h, lib/lbitset.c, lib/lbitset.h, lib/libiberty.h,
6881 lib/main.c, lib/subpipe.c, lib/subpipe.h, lib/timevar.c,
6882 lib/timevar.def, lib/timevar.h, lib/vbitset.c, lib/vbitset.h,
6883 lib/yyerror.c, m4/cxx.m4, m4/m4.m4, m4/subpipe.m4, m4/timevar.m4,
6884 m4/warning.m4, src/LR0.c, src/LR0.h, src/Makefile.am, src/assoc.c,
6885 src/assoc.h, src/closure.c, src/closure.h, src/complain.c,
6886 src/complain.h, src/conflicts.c, src/conflicts.h, src/derives.c,
6887 src/derives.h, src/files.c, src/files.h, src/getargs.c,
6888 src/getargs.h, src/gram.c, src/gram.h, src/lalr.c, src/lalr.h,
6889 src/location.c, src/location.h, src/main.c, src/muscle_tab.c,
6890 src/muscle_tab.h, src/nullable.c, src/nullable.h, src/output.c,
6891 src/output.h, src/parse-gram.c, src/parse-gram.h,
6892 src/parse-gram.y, src/print.c, src/print.h, src/print_graph.c,
6893 src/print_graph.h, src/reader.c, src/reader.h, src/reduce.c,
6894 src/reduce.h, src/relation.c, src/relation.h, src/scan-gram.l,
6895 src/scan-skel.l, src/state.c, src/state.h, src/symlist.c,
6896 src/symlist.h, src/symtab.c, src/symtab.h, src/system.h,
6897 src/tables.c, src/tables.h, src/uniqstr.c, src/uniqstr.h,
6898 src/vcg.c, src/vcg.h, src/vcg_defaults.h, tests/Makefile.am,
6899 tests/actions.at, tests/c++.at, tests/calc.at, tests/conflicts.at,
6900 tests/cxx-type.at, tests/existing.at, tests/glr-regression.at,
6901 tests/headers.at, tests/input.at, tests/local.at, tests/output.at,
6902 tests/reduce.at, tests/regression.at, tests/sets.at,
6903 tests/synclines.at, tests/testsuite.at, tests/torture.at:
6904 Update FSF postal mail address.
6906 2005-05-11 Paul Eggert <eggert@cs.ucla.edu>
6908 * tests/local.at (AT_COMPILE_CXX): Treat LDFLAGS like AT_COMPILE does.
6909 Problem reported by Ralf Menzel.
6911 2005-05-01 Paul Eggert <eggert@cs.ucla.edu>
6913 * tests/actions.at: Test that stack overflow invokes destructors.
6914 From Marcus Holland-Moritz.
6915 * data/yacc.c (yyerrlab): Move the code that destroys the stack
6917 (yyreturn): to here. That way, destructors are called properly
6918 even if the stack overflows, or the user calls YYACCEPT or
6919 YYABORT. Stack-overflow problem reported by Marcus Holland-Moritz.
6920 (yyoverflowlab): Destroy the lookahead.
6922 2005-04-24 Paul Eggert <eggert@cs.ucla.edu>
6924 * data/yacc.c (YYSTACK_ALLOC_MAXIMUM): Add more-descriptive comment.
6926 2005-04-17 Paul Eggert <eggert@cs.ucla.edu>
6928 * NEWS: Bison-generated C parsers no longer quote literal strings
6929 associated with tokens.
6930 * src/output.c (prepare_symbols): Don't escape strings,
6931 since users don't want to see C escapes.
6932 * tests/calc.at (AT_CHECK_CALC): Adjust to lack of quotes
6934 * tests/input.at (Torturing the Scanner): Likewise.
6935 * tests/regression.at (Token definitions, Web2c Actions): Likewise.
6937 2005-04-16 Paul Eggert <eggert@cs.ucla.edu>
6939 * tests/torture.at (AT_INCREASE_DATA_SIZE): Skip the test if
6940 the data size is known to be too small and we can't increase it.
6941 This works around an HP-UX 11.00 glitch reported by Andrew Benham.
6943 2005-04-15 Paul Eggert <eggert@cs.ucla.edu>
6945 * src/parse-gram.y: Include quotearg.h.
6946 (string_as_id): Quote $1 before using it as a key, since the
6947 lexer no longer quotes it for us.
6948 (string_content): Don't strip quotes, since lexer no longer
6950 * src/scan-gram.l: Include quotearg.h.
6952 ("'"<SC_ESCAPED_CHARACTER>): Quote symbol before using it as
6953 a key, since the rest of the lexer doesn't quote it.
6954 * src/symtab.c (symbol_get): Don't quote symbol; caller does it now.
6955 * tests/regression.at (Token definitions): Check for backslashes
6958 * data/yacc.c (YYSTACK_ALLOC_MAXIMUM): New macro.
6959 (YYSIZE_T): Define to unsigned long int when using an older compiler.
6960 (yyparse): Revamp code to generate long syntax error message, to
6961 make it easier to translate, and to avoid problems with arithmetic
6962 overflow. Change "virtual memory" to "memory" in diagnostic, since
6963 we don't know whether the memory is virtual.
6965 2005-04-13 Paul Eggert <eggert@cs.ucla.edu>
6967 * NEWS: Bison-generated C parsers now use the _ macro to
6969 * data/yacc.c (_) [!defined _]: New macro.
6970 All English strings wrapped inside this macro.
6971 * doc/bison.texinfo (Bison Parser): Document _.
6972 * po/POTFILES.in: Include src/parse-gram.c, since it now
6973 includes translateable strings that parse-gram.y doesn't.
6975 2005-04-12 Paul Eggert <eggert@cs.ucla.edu>
6977 * src/symtab.c (symbol_make_alias): Call symbol_type_set,
6978 reverting the 2004-10-11 change to this function.
6979 (symbol_check_alias_consistency): Don't call symbol_type_set
6980 if the type name is already correct.
6981 * tests/input.at (Typed symbol aliases): New test, from Tim Van Holder.
6983 2005-03-25 Paul Eggert <eggert@cs.ucla.edu>
6985 * tests/regression.at (Token definitions): Don't use a token named
6986 c, as that generates a "#define c ..." that runs afoul of buggy
6987 stdlib.h that uses the identifier c as a member of struct
6988 drand48_data. Problem reported by Horst Wente.
6990 2005-03-21 Paul Eggert <eggert@cs.ucla.edu>
6992 * bootstrap: Change translation URL from
6993 http://www2.iro.umontreal.ca/~gnutra/po/maint/bison/ to
6994 http://www.iro.umontreal.ca/translation/maint/bison/ to avoid
6995 redirection glitches. Problem reported by twlevo@xs4all.nl.
6997 2005-03-20 Paul Eggert <eggert@cs.ucla.edu>
6999 * tests/local.at (AT_COMPILE, AT_COMPILE_CXX): Don't put options
7000 after operands; POSIX says this isn't portable for the c99 command.
7002 2005-03-18 Paul Eggert <eggert@cs.ucla.edu>
7004 * tests/glr-regression.at (glr-regr2a.y): Try to dump core
7005 immediately if a data overrun has occurred; this may help us track
7006 down what may be a spurious failure on MacOS.
7008 2005-03-17 Paul Eggert <eggert@cs.ucla.edu>
7010 Respond to problems reported by twlevo@xs4all.nl.
7012 * bootstrap: Use "trap - 0" rather than the unportable "trap 0".
7014 * src/vcg.h: Comment fix.
7015 * src/vcg_defaults.h: Parenthesize macro bodies to make them safe.
7016 (G_CMAX): Change to -1 instead of INT_MAX.
7018 * data/yacc.c (yyparse): Omit spaces before #line.
7020 2005-03-15 Paul Eggert <eggert@cs.ucla.edu>
7022 * src/tables.c (state_number_to_vector_number): Put it inside an
7023 "#if 0", since it's not currently used. Problem reported by
7026 2005-03-06 Paul Eggert <eggert@cs.ucla.edu>
7028 * src/output.c (escaped_output): Renamed from
7029 escaped_file_name_output, since we now use it for symbol tags as
7030 well. All uses changed.
7031 (symbol_destructors_output, symbol_printers_output):
7032 Escape symbol tags too.
7033 Problem reported by Matyas Forstner in
7034 <http://lists.gnu.org/archive/html/bug-bison/2005-03/msg00009.html>.
7036 * src/muscle_tab.c (muscle_code_grow): Don't quote numbers; it's
7038 * src/output.c (user_actions_output, token_definitions_output,
7039 symbol_destructors_output, symbol_printers_output): Likewise.
7040 * src/reader.c (prologue_augment): Likewise.
7041 * src/scan-gram.l (handle_action_dollar, handle_action_at): Likewise.
7043 * src/vcg.c (output_edge): Don't quote linestyle arg.
7044 Problem reported by twlevo@xs4all.nl.
7046 2005-02-28 Paul Eggert <eggert@cs.ucla.edu>
7048 * doc/bison.texinfo (Semantic Tokens): Fix scoping problem in
7049 example, reported by Derek M Jones. Also, make the example even
7050 more outrageous, to better illustrate how bad the problem is.
7052 2005-02-24 Paul Eggert <eggert@cs.ucla.edu>
7054 * doc/bison.texinfo (Mfcalc Symtab): Correct the prototype for
7055 putsym. Typo reported by Sebastian Piping.
7057 2005-02-23 Paul Eggert <eggert@cs.ucla.edu>
7059 * doc/bison.texinfo (Language and Grammar): some -> same
7060 (Epilogue): int he -> in the
7061 Typos reported by Sebastian Piping via Justin Pence.
7063 2005-02-07 Paul Eggert <eggert@cs.ucla.edu>
7065 * tests/glr-regression.at (Improper handling of embedded actions
7066 and dollar(-N) in GLR parsers): Renamed from "Improper handling of
7067 embedded actions and $-N in GLR parsers", work around an Autoconf bug
7068 with dollar signs in test names.
7069 * tests/input.at (Invalid dollar-n): Renamed from "Invalid \$n",
7070 for a similar reason.
7072 2005-01-28 Paul Eggert <eggert@cs.ucla.edu>
7074 * src/vcg.c (output_graph): G_VIEW -> normal_view in case someone
7075 wants to redefine G_VIEW.
7077 2005-01-27 Paul Eggert <eggert@cs.ucla.edu>
7079 * src/vcg.c (get_view_str): Remove case for normal_view.
7080 Problem reported by twlevo@xs4all.nl.
7082 2005-01-24 Paul Eggert <eggert@cs.ucla.edu>
7084 * configure.ac (O0CFLAGS, O0CXXFLAGS): Fix quoting bug.
7085 Problem reported by twlevo@xs4all.nl.
7087 * doc/bison.texinfo: Change @dircategory from "GNU programming
7088 tools" to "Software development". Requested by Richard Stallman
7091 2005-01-23 Paul Eggert <eggert@cs.ucla.edu>
7093 * tests/c++.at (AT_CHECK_DOXYGEN): Don't use options after operands.
7094 Problem reported by twlevo@xs4all.nl.
7096 2005-01-21 Paul Eggert <eggert@cs.ucla.edu>
7098 * data/yacc.c (YYCOPY, yystpcpy, yyparse): Remove "register"
7099 keyword; it's not needed with modern compilers, and it doesn't
7100 affect correctness with older compilers. Suggested by
7103 2005-01-17 Paul Eggert <eggert@cs.ucla.edu>
7105 * data/glr.c (yyuserAction): Add "default: break;" case to pacify
7106 gcc -Wswitch-default.
7107 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
7108 * data/yacc.c (yyparse): Likewise.
7110 2005-01-12 Paul Eggert <eggert@cs.ucla.edu>
7112 * src/system.h (OUTPUT_EXT, TAB_EXT): Define only if not defined
7113 already. Let config.h define any nonstandard values.
7115 2005-01-10 Paul Eggert <eggert@cs.ucla.edu>
7117 * tests/calc.at (_AT_DATA_CALC_Y): Use alarm (100), not alarm (10),
7118 for the benefit of slower hosts. Problem reported by
7121 2005-01-07 Paul Eggert <eggert@cs.ucla.edu>
7123 * data/yacc.c (yyparse): Pacify non-GCC compilers about yyerrorlab
7124 being defined and not used.
7125 * data/lalr1.cc (yyparse): Likewise.
7126 Use "if (false)" rather than "if (0)".
7128 2005-01-05 Paul Eggert <eggert@cs.ucla.edu>
7130 * TODO: Mention that we should allow NUL bytes in tokens.
7132 2005-01-02 Paul Eggert <eggert@cs.ucla.edu>
7134 * src/scan-skel.l (<<EOF>>): Don't close standard output.
7135 Problem reported by Hans Aberg.
7137 2005-01-01 Paul Eggert <eggert@cs.ucla.edu>
7139 * src/getargs.c (version): Happy new year; update overall
7140 program copyright date from 2004 to 2005.
7142 * src/scan-skel.l ("@output ".*\n): Don't close standard output.
7143 Problem reported by Hans Aberg.
7144 * tests/output.at (AT_CHECK_OUTPUT): New arg SHELLIO.
7145 (Output file names.): Add a test for the case when standard output
7148 2004-12-26 Paul Eggert <eggert@cs.ucla.edu>
7150 * doc/bison.texinfo (@copying): Update FDL version number to 1.2,
7151 to fix an oversight in the Bison 2.0 manual.
7153 2004-12-25 Paul Eggert <eggert@cs.ucla.edu>
7155 * NEWS: Version 2.0. Reformat the existing news items since
7156 1.875, so that related items are grouped together.
7157 * configure.ac (AC_INIT): Bump version to 2.0.
7158 * src/parse-gram.c, src/parse-gram.h: Regenerate with 2.0.
7160 * tests/torture.at (Exploding the Stack Size with Alloca): Set
7161 YYSTACK_USE_ALLOCA to 1 if __GNUC__ or alloca are defined;
7162 otherwise, we're not testing alloca. Unfortunately there's no
7163 simple way to consult HAVE_ALLOCA here.
7165 * data/lalr1.cc (yydestruct_): Pacify unused variable warning
7168 * src/LR0.c (new_itemsets): Use memset rather than zeroing by
7169 hand. This avoids a warning about comparing int to size_t when
7170 GCC warnings are enabled.
7172 2004-12-22 Paul Eggert <eggert@cs.ucla.edu>
7174 * NEWS: Bison-generated parsers no longer default to using the
7175 alloca function (when available) to extend the parser stack, due
7176 to widespread problems in unchecked stack-overflow detection.
7177 * data/glr.c (YYMAXDEPTH): Remove undef when zero. It's the user's
7178 responsibility to set it to a positive value. This lets the user
7179 specify a value that is not a preprocessor constant.
7180 * data/yacc.c (YYMAXDEPTH): Likewise.
7181 (YYSTACK_ALLOC): Define only if YYSTACK_USE_ALLOCA is nonzero.
7182 * doc/bison.texinfo (Stack Overflow): YYMAXDEPTH no longer needs
7183 to be a compile-time constant. However, explain the constraints on it.
7184 Also, explain the constraints on YYINITDEPTH.
7185 (Table of Symbols): Explain that alloca is no longer the default.
7186 Explain the user's responsibility if they define YYSTACK_USE_ALLOCA
7189 * doc/bison.texinfo (Location Default Action): Mention that n must
7190 be zero when k is zero. Suggested by Frank Heckenbach.
7192 2004-12-22 Akim Demaille <akim@epita.fr>
7194 * data/lalr1.cc (parser::token_number_type, parser::rhs_number_type)
7195 (parser::state_type, parser::semantic_type, parser::location_type):
7196 Private, not public.
7197 (parser::parse): Return ints, not bool.
7198 Returning a bool introduces a problem: 0 corresponds to false, and
7199 it seems weird to return false on success. Returning true changes
7200 the conventions for yyparse.
7201 Alternatively we could return void and send an exception.
7202 There is no clear consensus (yet?).
7203 (state_stack, semantic_stack, location_stack): Rename as...
7204 (state_stack_type, semantic_stack_type, location_stack_type): these.
7205 Private, not public.
7206 * tests/c++.at: New.
7207 * tests/testsuite.at, tests/Makefile.am: Adjust.
7209 2004-12-21 Akim Demaille <akim@epita.fr>
7211 * data/lalr1.cc (parser::parse): Return a bool instead of an int.
7213 2004-12-21 Akim Demaille <akim@epita.fr>
7215 Don't impose std::string for filenames.
7217 * data/lalr1.cc (b4_filename_type): New.
7218 (position::filename): Use it.
7219 (parser.hh): Move the inclusion of stack.hh and location.hh below
7220 the user code, so that needed headers for the filename type can be
7222 Forward declare them before the user code.
7223 * tests/Makefile.am (check-local, installcheck-local): Pass
7224 TESTSUITEFLAGS to the TESTSUITE.
7226 2004-12-20 Akim Demaille <akim@epita.fr>
7228 Use more STL like names: my_class instead of MyClass.
7230 * data/lalr1.cc (LocationStack, LocationType, RhsNumberType)
7231 (SemanticStack, SemanticType, StateStack, StateType)
7232 (TokenNumberType, Stack, Slice, Traits, Parser::location)
7233 (Parser::value): Rename as...
7234 (location_stack, location_type, rhs_number_type, semantic_stack)
7235 (semantic_type, state_stack, state_type, token_number_type, stack)
7236 (slice, traits, parser::yylloc, parser::yylval): these.
7238 * tests/calc.at, tests/regression.at, tests/actions.at: Adjust.
7240 2004-12-19 Paul Eggert <eggert@cs.ucla.edu>
7242 * data/glr.c (YYLLOC_DEFAULT): Use GNU spacing conventions.
7243 * data/yacc.c (YYLLOC_DEFAULT): Likewise.
7245 2004-12-17 Paul Eggert <eggert@cs.ucla.edu>
7247 Remove uses of 'short int' and 'unsigned short int'. This raises
7248 some arbitrary limits. It uses more memory but nowadays that's
7249 not much of an issue.
7251 This change does not affect the generated parsers; that's a different
7252 task, as some users will want to conserve memory there.
7254 Ideally we should use size_t to represent all object counts, and
7255 something like ptrdiff_t to represent signed differences of object
7256 counts; but that will require more code-cleanup than I have the
7257 time to do right now.
7259 * src/LR0.c (allocate_itemsets, new_itemsets, save_reductions):
7260 Use size_t, not int or short int, to count objects.
7261 * src/closure.c (nritemset, closure): Likewise.
7262 * src/closure.h (nritemset, closure): Likewise.
7263 * src/nullable.c (nullable_compute): Likewise.
7264 * src/print.c (print_core): Likewise.
7265 * src/print_graph.c (print_core): Likewise.
7266 * src/state.c (state_compare, state_hash): Likewise.
7267 * src/state.h (struct state): Likewise.
7268 * src/tables.c (default_goto, goto_actions): Likewise.
7270 * src/gram.h (rule_number, rule): Use int, not short int.
7271 * src/output.c (prepare_rules): Likewise.
7272 * src/state.h (state_number, STATE_NUMBER_MAXIMUM, transitions,
7273 errs, reductions): Likewise.
7274 * src/symtab.h (symbol_number, SYMBOL_NUMBER_MAXIMUM, struct symbol):
7276 * src/tables.c (vector_number, tally, action_number,
7277 ACTION_NUMBER_MINIMUM): Likewise.
7278 * src/output.c (muscle_insert_short_int_table): Remove.
7280 2004-12-17 Akim Demaille <akim@epita.fr>
7282 * data/lalr1.cc: Extensive Doxygenation.
7283 (error_): Rename as...
7284 (error): this, since it is visible to the user.
7286 (Parser::message): Now an automatic variable from...
7287 (Parser::yyreport_syntax_error_): here.
7288 * tests/actions.at, tests/calc.at, tests/regression.at: Adjust to
7290 * tests/input.at: Escape $.
7292 2004-12-16 Paul Eggert <eggert@cs.ucla.edu>
7294 * data/glr.c (b4_lhs_value, b4_rhs_value, b4_rhs-location):
7295 Parenthesize rhs to avoid obscure problems with mistakes like
7296 "foo$$bar = foo$1bar;". Problem reported by twlevo at xs4all.
7297 * data/lalr1.cc (b4_lhs_value, b4_rhs_value, b4_lhs_location,
7298 b4_rhs_location): Likewise.
7299 * data/yacc.c (b4_lhs_value, b4_rhs_value, b4_lhs_location,
7300 b4_rhs_location): Likewise.
7302 2004-12-16 Akim Demaille <akim@epita.fr>
7304 * data/lalr1.cc (yyreport_syntax_error_): Catch up with glr.c and
7305 yacc.c: be sure to stay within yycheck_.
7306 * tests/actions.at: Re-enable C++ tests.
7308 2004-12-16 Akim Demaille <akim@epita.fr>
7310 * src/print_graph.c (print_graph): Remove layoutalgorithm uses for
7313 2004-12-16 Akim Demaille <akim@epita.fr>
7315 Use #define to handle the %name-prefix.
7317 * data/glr.c, data/yacc.c: Comment changes.
7318 * data/lalr1.cc (yylex): Use #define to select the name of yylex,
7319 so that one can refer to yylex in the parser file, and have it
7320 renamed, as is the case with other skeletons.
7322 2004-12-16 Akim Demaille <akim@epita.fr>
7324 Move lalr1.cc internals into yy*.
7326 * data/lalr1.cc (semantic_stack_, location_stack_, state_stack_)
7327 (semantic_stack_, location_stack_, pact_, pact_ninf_, defact_)
7328 (pgoto_, defgoto_, table_, table_ninf_, check_, stos_, r1_, r2_)
7329 (name_, rhs_, prhs_, rline_, token_number_, eof_, last_, nnts_)
7330 (empty_, final_, terror_, errcode_, ntokens_)
7331 (user_token_number_max_, undef_token_, n_, len_, state_, nerrs_)
7332 (looka_, ilooka_, error_range_, nerrs_):
7334 (yysemantic_stack_, yylocation_stack_, yystate_stack_)
7335 (yysemantic_stack_, yylocation_stack_, yypact_, yypact_ninf_)
7336 (yydefact_, yypgoto_, yydefgoto_, yytable_, yytable_ninf_)
7337 (yycheck_, yystos_, yyr1_, yyr2_, yyname_, yyrhs_, yyprhs_)
7338 (yyrline_, yytoken_number_, yyeof_, yylast_, yynnts_, yyempty_)
7339 (yyfinal_, yyterror_, yyerrcode_, yyntokens_)
7340 (yyuser_token_number_max_, yyundef_token_, yyn_, yylen_, yystate_)
7341 (yynerrs_, yylooka_, yyilooka_, yyerror_range_, yynerrs_):
7344 2004-12-15 Paul Eggert <eggert@cs.ucla.edu>
7346 Fix some problems reported by twlevo at xs4all.
7347 * src/symtab.c (symbol_new): Report an error if the input grammar
7348 contains too many symbols. This is better than calling abort() later.
7349 * src/vcg.h (enum layoutalgorithm): Remove. All uses removed.
7350 (struct node, struct graph):
7351 Rename member expand to stretch. All uses changed.
7352 (struct graph): Remove member layoutalgorithm. All uses removed.
7353 * src/vcg.c (get_layoutalgorithm_str): Remove. All uses removed.
7354 * src/vcg_defaults.h (G_STRETCH): Renamed from G_EXPAND.
7356 (N_STRETCH): Rename from N_EXPAND. All uses changed.
7358 2004-12-15 Akim Demaille <akim@epita.fr>
7360 * data/lalr1.cc: Normalize /** \brief ... */ to ///.
7361 Add more Doxygen comments.
7362 (symprint_, stack_print_, reduce_print_, destruct_, pop)
7363 (report_syntax_error_, translate_): Rename as...
7364 (yysymprint_, yystack_print_, yyreduce_print_, yydestruct_)
7365 (yypop_, yyreport_syntax_error_, yytranslate_): this.
7367 2004-12-15 Akim Demaille <akim@epita.fr>
7369 * data/lalr1.cc (lex_): Rename as...
7371 Move the trace here.
7372 Take the %name-prefix into account.
7373 Reported by Alexandre Duret-Lutz.
7375 2004-12-15 Akim Demaille <akim@epita.fr>
7377 Simplify the C++ parser constructor.
7379 * data/lalr1.cc (debug_): Rename as...
7380 (yydebug_): so that the parser's internals are always in the yy*
7383 (b4_parse_param_decl): Remove the leading comma as it is now only
7384 called as unique argument list.
7385 (Parser::Parser): Remove the constructor accepting a location and
7386 an initial debugging level.
7387 Remove from the other ctor the argument for the debugging level.
7388 (debug_level_type, debug_level, set_debug_level): New.
7390 * tests/actions.at, tests/calc.at, tests/regression.at: Adjust
7393 2004-12-15 Akim Demaille <akim@epita.fr>
7395 Remove b4_root related material: failure experiment
7396 (which goal was to allow to derive from a class).
7398 * data/lalr1.cc (b4_root, b4_param, b4_constructor): Remove
7399 definitions and uses.
7401 2004-12-14 Paul Eggert <eggert@cs.ucla.edu>
7403 * data/glr.c (struct yyGLRStack): yyerror_range now has 3 items,
7404 not 2, since it's not portable to subtract 1 from the start of an
7405 array. The new item 0 is never set or used. All uses changed.
7407 (yyrecoverSyntaxError): Use YYLLOC_DEFAULT instead of assuming
7408 the default definition of YYLLOC_DEFAULT. Problem reported
7409 by Frank Heckenbach.
7411 2004-12-12 Paul Eggert <eggert@cs.ucla.edu>
7413 * data/glr.c (YYRHSLOC): Don't have two definitions, one for
7414 the normal case and one for the error case. Just use the
7415 first one uniformly. Problem reported by Frank Heckenbach.
7416 (YYLLOC_DEFAULT): Use the conventions of yacc.c, so we can
7417 use exactly the same macro in both places.
7418 (yyerror_range): Now of type yyGLRStackItem, not YYLTYPE,
7419 so that the normal-case YYRHSLOC works for the error case too.
7421 * data/yacc.c (YYRHSLOC): New macro, taken from glr.c.
7422 (YYLLOC_DEFAULT): Use the same macro as glr.c.
7423 * doc/bison.texinfo (Location Default Action): Don't claim that
7424 we have an array of locations. Use the same macro for both glr
7425 and lalr parsers. Mention YYRHSLOC. Mention what happens when
7428 2004-12-10 Paul Eggert <eggert@cs.ucla.edu>
7430 * HACKING: Update email addresses to send announcements to.
7432 * configure.ac (AC_INIT): Bump version to 1.875f.
7434 2004-12-10 Paul Eggert <eggert@cs.ucla.edu>
7436 * NEWS: Version 1.875e.
7437 * src/parse-gram.c, src/parse-gram.h: Regenerate with 1.875e.
7439 * src/scan-skel.l: Include "complain.h", for "fatal".
7441 * src/relation.h (relation_print, relation_digraph):
7442 Relation sizes are of type relation_node, not size_t (this is
7443 merely a doc fix, since the two types are equivalent).
7444 (relation_transpose): Relation sizes are of type relation_node,
7446 * src/relation.c: Likewise.
7447 (top, infinity): Now of type relation_node, not int.
7448 (traverse, relation_transpose): Use relation_node, not int.
7450 * data/glr.c (yyuserAction, yyrecoverSyntaxError): Mark args
7451 with ATTRIBUTE_UNUSED if they're not used, to avoid GCC warning.
7452 (yyparse): Remove unused local introduced in 2004-10-25 patch.
7454 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): New arg
7455 specifying whether the test should be skipped. Use it tp
7456 specify that the [%defines %skeleton "lalr1.cc"] tests currently
7457 fail on some hosts, and should be skipped.
7459 2004-12-08 Paul Eggert <eggert@cs.ucla.edu>
7461 * src/system.h (CALLOC, MALLOC, REALLOC): Remove. All callers
7462 changed to use xcalloc, xnmalloc, xnrealloc, respectively,
7463 unless otherwise specified below.
7465 * src/LR0.c (allocate_itemsets): Use xnmalloc, not xcalloc,
7466 to allocate kernel_base, kernel_items, kernel_size, since
7467 they needn't be initialized to 0.
7468 (allocate_storgae): Likewise, for shiftset, redset, shift_symbol.
7469 * src/closure.c (new_closure): Likewise, for itemset.
7470 * src/derives.c (derives_compute): Likewise, for delts, derives, q.
7471 * src/lalr.c (set_goto_map): Likewise, for temp_map.
7472 (initialize_F): Likewise, for reads, edge, reads[i], includes[i].
7473 (build_relations): Likewise for edge, states1, includes.
7474 * src/nullable.c (nullable_compute): Likewise, for squeue, relts.
7475 * src/reader.c (packgram): Likewise, for ritem, rules.
7476 * src/reduce.c (nonterminals_reduce): Likewise for nontermmap.
7477 * src/relation.c (relation_digraph): Likewise for VERTICES.
7478 (relation_transpose): Likewise for new_R, end_R.
7479 * src/symtab.c (symbols_token_translations_init): Likewise for
7481 * src/tables.c (save_row): Likewise for froms, tos, conflict_tos.
7482 (token_actions): Likewise for yydefact, actrow, conflrow,
7484 (save_column): Likewise for froms[symno], tos[symno].
7485 (goto_actions): Likewise for state_count.
7486 (pack_table): Likewise for base, pos, check.
7487 (tables_generate): Likewise for width.
7489 * src/LR0.c (set_states): Don't reuse kernel_size and kernel_base
7490 for initial core. Just have a separate core, so we needn't worry
7491 about whether kernel_size and kernel_base are initialized.
7493 * src/LR0.c (shift_symbol, redset, shiftset, kernel_base,
7494 kernel_size, kernel_items): Remove unnecessary initialization.
7495 * src/conflicts.c (conflicts): Likewise.
7496 * src/derives.c (derives): Likewise.
7497 * src/muscle_tablc (muscle_insert): Likewise.
7498 * src/relation.c (relation_digraph): Likewise.
7499 * src/tables.c (froms, tos, conflict_tos, tally, width, actrow, order,
7500 conflrow, conflict_table, conflict_list, table, check):
7503 * src/closure.c (new_closure): Arg is of type unsigned int, not int.
7504 This is because all callers pass unsigned int.
7505 * src/closure.h (new_closure): Likewise.
7507 * src/lalr.c (initialize_F): Initialize reads[i] in all cases.
7508 (build_relations): Initialize includes[i] in all cases.
7509 * src/reader.c (packgram): Always initialize rules[ruleno].prec
7510 and rules[ruleno].precsym. Initialize members in order.
7511 * src/relation.c (relation_transpose): Always initialize new_R[i]
7513 * src/table.c (conflict_row): Initialize 0 at end of conflict_list.
7515 * src/output.c (prepare_actions): Pass 0 instead of conflict_list[0];
7516 conflict_list[0] was always 0, but now it isn't initialized.
7518 * src/table.c (table_grow): When conflict_table grew, the grown
7519 area wasn't cleared. Fix this.
7521 * lib/.cvsignore: Add strdup.c, strdup.h.
7522 * m4/.cvsignore: Add strdup.m4.
7524 2004-12-07 Paul Eggert <eggert@cs.ucla.edu>
7526 * src/lalr.h (GOTO_NUMBER_MAXIMUM): New macro.
7527 * src/lalr.c (set_goto_map): Don't allow ngotos to equal
7528 GOTO_NUMBER_MAXIMUM, since we occasionally compute
7529 ngotos + 1 without checking for overflow.
7530 (build_relations): Use END_NODE, not -1, to denote end of edges.
7531 * src/lalr.c (set_goto_map, map_goto, initialize_F, add_loopback_edge,
7532 build_relations): Use goto_number, not int, for goto numbers.
7533 * src/tables.c (save_column, default_goto): Likewise.
7535 2004-11-23 Akim Demaille <akim@epita.fr>
7537 * data/lalr1.cc (YYSTYPE): Define it as is done for C, instead
7538 of #defining from yystype.
7539 Don't typedef yystype, C++ does not need it.
7540 This lets it possible to forward declare it as union.
7542 2004-11-23 Paul Eggert <eggert@cs.ucla.edu>
7544 * bootstrap (gnulib_modules): Add extensions.
7545 Problem reported by Jim Meyering.
7547 2004-11-22 Paul Eggert <eggert@cs.ucla.edu>
7549 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c,
7550 src/lalr.c, src/nullable.c, src/relation.c, src/scan-skel.l,
7551 src/system.h, src/tables.c: XFREE -> free, to accommodate
7552 recent change to gnulib xalloc.h.
7553 Problem reported by Jim Meyering.
7555 2004-11-17 Akim Demaille <akim@epita.fr>
7557 * data/lalr1.cc (symprint_): Use cdebug_ to avoid warnings.
7559 2004-11-17 Akim Demaille <akim@epita.fr>,
7560 Alexandre Duret-Lutz <adl@gnu.org>
7562 * data/lalr1.cc (Parser::yycdebug_): New, a pointer, to allow
7565 Use it instead of cdebug_.
7566 (Parser::debug_stream, Parser::set_debug_stream): New.
7567 (Parser::symprint_): Define cdebug_ for temporary backward
7569 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use
7572 2004-11-17 Akim Demaille <akim@epita.fr>
7574 * data/lalr1.cc (Parser:print_): Remove, use %printer instead.
7575 * tests/regression.at (_AT_DATA_DANCER_Y): Adjust.
7576 * tests/calc.at (_AT_DATA_CALC_Y): Ditto.
7577 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
7579 2004-10-27 Paul Eggert <eggert@cs.ucla.edu>
7581 * data/glr.c (yyloc_default): Remove; not used.
7582 Problem reported by Frank Heckenbach.
7584 2004-10-25 Akim Demaille <akim@epita.fr>
7586 * data/glr.c (YYRHSLOC): Move its definition next to its uses.
7587 Introduce another definition to address simple location arrays.
7588 (yyGLRStack): New member: yyerror_range.
7589 (yyrecoverSyntaxError, yyparse): Update it.
7590 (yyrecoverSyntaxError): Use it when shifting the error token to
7591 have an accurate range, equivalent to the one computed by both
7592 yacc.c and lalr1.cc.
7593 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Change its yylex so
7594 that column numbers start at column 0, as per GNU Coding
7595 Standards, the others tests, and the doc.
7596 (_AT_RESOLVED_GLR_OUTPUT_WITH_LOC, _AT_AMBIG_GLR_OUTPUT_WITH_LOC):
7597 Adjust to the above change (first column is 0).
7598 And adjust the location of the "<error>", now covering the whole
7601 2004-10-22 Akim Demaille <akim@epita.fr>
7602 and Paul Eggert <eggert@cs.ucla.edu>
7604 Remove some arbitrary limits on goto numbers and relations.
7605 * src/lalr.c (goto_map, ngotos, from_state, to_state): Omit
7606 initial values, since they're never used.
7607 (set_goto_map): ngotos is now unsigned, so test for overflow
7608 by seeing whether it wraps around to zero.
7609 * src/lalr.h (goto_number): Now size_t, not short int.
7610 (GOTO_NUMBER_MAXIMUM): Remove.
7611 * src/relation.c (relation_print, traverse, relation_transpose):
7612 Check for END_NODE rather than looking at sign.
7613 * src/relation.h (END_NODE): New macro.
7614 (relation_node): Now size_t, not short int.
7616 2004-10-22 Paul Eggert <eggert@cs.ucla.edu>
7618 * doc/bison.texinfo (Language and Grammar): In example, "int" is a
7619 keyword, not an identifier. Problem reported by Baron Schwartz in
7620 <http://lists.gnu.org/archive/html/bug-bison/2004-10/msg00017.html>.
7622 2004-10-11 Akim Demaille <akim@epita.fr>
7624 * src/symtab.c (symbol_check_alias_consistency): Also check
7625 type names, destructors, and printers.
7626 Reported by Alexandre Duret-Lutz.
7627 Recode the handling of associativity and precedence in terms
7628 of symbol_precedence_set.
7629 Accept no redeclaration at all, not even equal to the previous
7631 (redeclaration): New.
7632 Use it to factor redeclaration complaints.
7633 (symbol_make_alias): Don't set the type of the alias, let
7634 symbol_check_alias_consistency do it as for other features.
7635 * src/symtab.h (symbol): Add new member prec_location, and
7637 * src/symtab.c (symbol_precedence_set, symbol_type_set): Set them.
7638 * tests/input.at (Incompatible Aliases): New.
7640 2004-10-09 Paul Eggert <eggert@cs.ucla.edu>
7642 .cvsignore fixes to accommodate gnulib changes,
7643 and the practice of naming build directories "_build".
7644 * .cvsignore: Add "_*". Sort.
7645 * lib/.cvsignore: Add getopt_.h, xalloc-die.c.
7646 * m4/.cvsignore: Add "*_gl.m4".
7648 2004-10-06 Akim Demaille <akim@epita.fr>
7650 * src/parse-gram.y (add_param): Fix the truncation of trailing
7653 2004-10-05 Akim Demaille <akim@epita.fr>
7655 In Bison 1.875's yacc.c, YYLLOC_DEFAULT was called regardless
7656 whether the reducion was empty or not. This leaves room to
7657 improve the use of YYLLOC_DEFAULT in such a case.
7658 lalr1.cc is still experimental, so changing this is acceptable.
7659 And finally, there are probably not many users who changed the
7660 handling of locations in GLR, so changing is admissible too.
7662 * data/glr.c, data/lalr1.cc, data/yacc.c (YYLLOC_DEFAULT): On an
7663 empty reduction, set @$ to an empty location ending the previously
7665 Adjust uses to make sure the code is triggered on empty
7667 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust the
7668 expected output: empty reductions have empty locations.
7670 2004-09-29 Akim Demaille <akim@epita.fr>
7672 * data/lalr1.cc: Move towards a more standard C++ coding style
7673 for templates: Class < T > -> Class<T>.
7675 2004-09-29 Akim Demaille <akim@epita.fr>
7677 * data/lalr1.cc: Reinstall the former ctor, for sake of
7678 compatibility, but warn it will be removed.
7679 Move towards a more standard C++ coding style (i.e., type *var ->
7682 2004-09-27 Paul Eggert <eggert@cs.ucla.edu>
7684 * src/parse-gram.y (add_param): Rewrite to avoid strchr,
7685 since it's less likely to work if NULs are involved in the future.
7687 2004-09-27 Akim Demaille <akim@epita.fr>
7689 * data/yacc.c (YY_LOCATION_PRINT): Fix its default declaration.
7691 2004-09-27 Akim Demaille <akim@epita.fr>
7693 * data/lalr1.cc (b4_parse_param_decl_1): New.
7694 (b4_parse_param_decl): Use it to have different names between attribute
7696 (b4_cc_constructor_call): Likewise.
7698 2004-09-24 Akim Demaille <akim@epita.fr>
7700 * src/parse-gram.y (add_param): Strip the leading and trailing
7701 blanks from a formal argument declaration.
7702 (YY_LOCATION_PRINT): New.
7704 2004-09-24 Akim Demaille <akim@epita.fr>
7706 * data/c.m4 (b4_yysymprint_generate): Move the YYINPUT invocation
7709 2004-09-24 Akim Demaille <akim@epita.fr>
7711 * doc/bison.texinfo (Table of Symbols): Sort.
7713 2004-09-21 Akim Demaille <akim@epita.fr>
7715 * data/yacc.c, data/glr.c (b4_at_dollar, b4_dollar_dollar): Remove
7716 the useless parentheses.
7717 Suggested by Paul Eggert.
7719 2004-09-20 Akim Demaille <akim@epita.fr>
7721 Let the initial-action act on the look-ahead, and use it for the
7722 "initial push" (corresponding to an hypothetical beginning-of-file).
7723 And let lalr1.cc honor %initial-action.
7725 * doc/bison.texinfo (Initial Action Decl): Clarify, and add an
7727 * data/lalr1.cc (Parser::initlocation_): Remove, bad experiment.
7728 (Parser::Parser): Remove the ctor that used to initialize it.
7729 (Parser::parse): Like in the other skeletons, issue the "starting
7730 parse" message before any action.
7731 Honor %initial-action.
7732 Initialize the stacks with the lookahead.
7733 * data/yacc.c: Let $$ and @$ in %initial-action designate the
7735 Push them in the stacks.
7736 * tests/actions.at, tests/calc.at: Adjust the C++ ctor invocations.
7738 2004-09-20 Akim Demaille <akim@epita.fr>
7740 * doc/bison.texinfo (Initial Action Decl): New.
7742 2004-09-20 Akim Demaille <akim@epita.fr>
7744 * data/yacc.c (YY_LOCATION_PRINT): Use YYLTYPE_IS_TRIVIAL as a
7745 clearer criterion to define it.
7746 (parse): Initialize the initial location when YYLTYPE_IS_TRIVIAL.
7747 When reducing on an empty RHS, use the latest stacked location as
7749 yylloc is not always available.
7750 * data/glr.c: Likewise.
7751 Also, honor initial-actions.
7753 2004-09-20 Akim Demaille <akim@epita.fr>
7755 * data/yacc.c (YY_LOCATION_PRINT): New.
7756 Define when we know YYLTYPE's structure, i.e., when the default
7757 YYLLOC_DEFAULT is used.
7758 * data/c.m4 (b4_yysymprint_generate): Use it.
7759 * data/lalr1.cc (YYLLOC_DEFAULT): Stop relying on the initial
7760 value of the result.
7761 (error_start_): Replace with...
7762 (error_range_): this location array.
7763 This allows to replace code relying on the implementation of
7764 locations by portable code.
7765 * data/yacc.c (yylerrsp): Replace with...
7766 (yyerror_range): this.
7767 Every time a token is popped, update yyerror_range[0], to have an
7768 accurate location for the error token.
7769 * data/glr.c (YY_LOCATION_PRINT): New.
7770 (yyprocessOneStack): Fix an invocation of YY_SYMBOL_PRINT:
7771 deference a pointer.
7772 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): No longer
7773 report the location in %printers.
7775 * src/scan-skel.l: Instead of abort, report error messages to ease
7776 understanding skeleton scanning failures.
7778 2004-09-16 Akim Demaille <akim@epita.fr>
7780 * data/lalr1.cc (Stack::Iterator, Stack::ConstIterator): Rename as...
7781 (iterator, const_iterator): these, to be more in the C++ spirit.
7782 Also, return reverse iterators so that when displaying the stack
7783 we display its bottom first.
7784 (Parser::stack_print_, Parser::reduce_print_): Match the messages
7786 We should probably use vector here though.
7788 2004-09-16 Akim Demaille <akim@epita.fr>
7790 Have more complete shift traces.
7792 * data/yacc.c, data/lalr1.c, data/glr.c: Use YY_SYMBOL_PRINT
7793 to report Shifts instead of ad hoc YYDPRINTF invocations,
7794 including for the error token.
7795 * data/lalr1.cc (symprint_): Output the location.
7796 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): In C++, don't
7797 output the location within the %printer.
7798 Activate GLR tests, at least to make sure they compile properly.
7799 They still don't pass though.
7800 * tests/calc.at: Adjust expect verbose output, since now "Entering
7801 state..." is on a different line than the "Shifting" message.
7803 2004-09-08 Akim Demaille <akim@epita.fr>
7805 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Move the
7806 Bison directive from the Bison file to the invocation of this
7807 macro, so that these directives are passed to
7808 AT_BISON_OPTION_PUSHDEFS to get correct help macros.
7809 Use these helping macros (e.g., AT_LOC, AT_VAL and so forth).
7810 Move the AT_SETUP/AT_CLEANUP outside, to report as test title
7811 the extra Bison directives instead of the whole series.
7812 Change the grammar so that there are recoverable errors, and
7813 unrecoverable errors. Now we can have the parser give up before
7814 consuming the whole input. As a result we now can observe that
7815 the lookahead is freed when needed.
7816 Change the parser source to parse argv[1] instead of a hard coded
7818 Simplify yylex, and give a value and location to EOF.
7819 Simplify some invocations of AT_CHECK_PRINTER_AND_DESTRUCTOR that
7820 passed directives already coded in the file.
7821 Add some tests to check the location of "error".
7822 For some tests, the C++ parser is correct, and not yacc.c.
7823 For other tests, they provide different, but unsatisfying, values,
7824 so keep the C++ value so that at least one parser is "correct"
7825 according to the test suite.
7826 (Actions after errors): Remove, this is subsumed by the
7827 AT_CHECK_PRINTER_AND_DESTRUCTOR series.
7829 2004-09-06 Akim Demaille <akim@epita.fr>
7831 * data/lalr1.cc: Adjust the indentation of the labels.
7835 2004-09-06 Akim Demaille <akim@epita.fr>
7837 * data/yacc.cc, data/glr.cc (yydestruct): Accept an additional
7838 argument, an informative message.
7839 Call YY_SYMBOL_PRINT.
7840 Adjust all callers: integrate the associated YY_SYMBOL_PRINT.
7841 * data/lalr1.cc (destruct_): Likewise.
7842 In addition, no longer depend on b4_yysymprint_generate and
7843 b4_yydestruct_generate to generate these functions, do it "by
7846 2004-09-03 Akim Demaille <akim@epita.fr>
7848 * data/glr.c, data/lalr1.cc, data/yacc.c: When YYABORT was
7849 invoked, yydestruct the lookahead.
7850 * tests/calc.at (Calculator $1): Update the expected lengths of
7851 traces: there is an added line for the discarded lookahead.
7852 * doc/bison.texinfo (Destructor Decl): Some rewording.
7853 Define "discarded" symbols.
7855 2004-09-02 Akim Demaille <akim@epita.fr>
7857 * data/lalr1.cc (translate_, destruct_): No reason to be static.
7859 2004-09-02 Akim Demaille <akim@epita.fr>
7861 * data/glr.c, yacc.c (YYDSYMPRINT): Remove, not used.
7862 (YYDSYMPRINTF): Rename as...
7863 (YY_SYMBOL_PRINT): this.
7864 * data/lalr1.cc (YY_SYMBOL_PRINT): New, modeled after the previous
7866 Use it instead of direct symprint_ calls.
7867 (yybackup): Tweak the "Now at end of input" case to match yacc.c's
7870 2004-09-02 Akim Demaille <akim@epita.fr>
7872 * data/lalr1.cc (b4_yysymprint_generate): New.
7873 (symprint_): New member function, defined when YYDEBUG.
7874 Use it consistently instead of token/nterm debugging output by
7876 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust
7877 %printer calls to use cdebug_ when using lalr1.cc.
7879 2004-08-30 Florian Krohm <florian@edamail.fishkill.ibm.com>
7881 * data/glr.c: Guard the declarations of yypstack and yypdumpstack
7882 with #ifdef YYDEBUG.
7884 2004-08-26 Akim Demaille <akim@epita.fr>
7886 * doc/bison.texinfo (Implementing Loops): Rename as...
7887 (Implementing Gotos/Loops): this.
7889 2004-08-13 Paul Eggert <eggert@cs.ucla.edu>
7891 Adjust to latest gnulib.
7892 * bootstrap (gnulib_modules): Add xalloc-die.
7893 Set LC_ALL=C so that file names sort consistently.
7894 Prefer the gnulib copies of gettext.m4, glibc21.m4,
7895 inttypes_h.m4, lib-ld.m4, lib-prefix.m4, po.m4, stdint_h.m4,
7896 uintmax_t.m4, ulonglong.m4.
7897 (intl_files_to_remove): Add gettext.m4, lib-ld.m4, lib-prefix.m4,
7898 po.m4 since we are now using _gl.m4 instead.
7900 2004-08-10 Florian Krohm <florian@edamail.fishkill.ibm.com>
7902 * src/scan-action.l: Remove. Scanning of semantic actions is
7903 handled in scan-gram.l.
7905 2004-08-07 Florian Krohm <florian@edamail.fishkill.ibm.com>
7907 * src/scan-gram.l (handle_syncline): Use uniqstr_new not xstrdup.
7909 * src/location.h (struct): The file member is a uniqstr.
7910 (equal_boundaries): Use UNIQSTR_EQ for comparison.
7912 2004-07-22 Paul Eggert <eggert@cs.ucla.edu>
7914 Fix bug with non-%union parsers that have printers or destructors,
7915 which led to a Bison core dump. Reported by Peter Fales in
7916 <http://lists.gnu.org/archive/html/bug-bison/2004-07/msg00014.html>.
7918 * data/c.m4 (b4_symbol_actions): Don't assume %union was used.
7919 * data/lalr1.cc (yystype) [defined YYSTYPE]: Define to YYSTYPE,
7920 not to our own type.
7921 * src/output.c (symbol_destructors_output, symbol_printers_output):
7922 Don't assume %union.
7923 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR,
7924 AT_CHECK_PRINTER_AND_DESTRUCTOR): New argument
7925 UNION-FLAG. All callers changed.
7926 (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Don't assume %union.
7927 Use type char, not unsigned int, when declaring an array of char;
7928 this lets us remove a cast.
7929 (Printers and Destructors): Add non-%union test cases.
7931 2004-06-21 Paul Eggert <eggert@cs.ucla.edu>
7933 * doc/bison.texinfo: Minor editorial changes, mostly to the new
7934 GLR writeups. E.g., avoid frenchspacing and the future tense,
7935 change "lookahead" to "look-ahead", and change "wrt" to "with
7938 2004-06-21 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
7940 * doc/bison.texinfo (Merging GLR Parses, Compiler Requirements):
7941 New sections, split off from the GLR Parsers section. Put the new
7942 Simple GLR Parser near the start of the GLR section, for clarity.
7943 Rewrite connective text.
7945 2004-06-21 Frank Heckenbach <frank@g-n-u.de>
7947 * doc/bison.texinfo (Simple GLR Parsers): New section.
7949 2004-06-21 Paul Eggert <eggert@cs.ucla.edu>
7951 * NEWS, TODO, doc/bison.texinfo:
7952 Use "look-ahead" instead of "lookahead", to be consistent.
7953 * REFERENCES: Fix incorrect reference to DeRemer and Pennello,
7954 while we're fixing "look-ahead".
7955 * src/conflicts.c (shift_set): Renamed from shiftset.
7956 (look_ahead_set): Renamed from lookaheadset.
7957 * src/print.c: Likewise.
7958 * src/getargs.c (report_args): Add "look-ahead" as the new canonical
7959 name for "lookahead".
7960 (report_types, usage): Likewise.
7961 * src/getargs.h (report_look_ahead_tokens): Renamed from
7963 * src/lalr.c (compute_look_ahead_tokens): Renamed from
7965 (state_look_ahead_tokens_count): Renamed from state_lookaheads_count.
7966 (look_ahead_tokens_print): Renamed from lookaheads_print.
7967 * src/state.c (state_rule_look_ahead_tokens_print): Renamed from
7968 state_rule_lookaheads_print.
7969 * src/state.h: Likewise.
7970 (reductions.look_ahead_tokens): Renamed from lookaheads.
7971 * tests/torture.at (AT_DATA_LOOK_AHEAD_TOKENS_GRAMMAR): Renamed from
7972 AT_DATA_LOOKAHEADS_GRAMMAR.
7974 2004-06-03 Paul Eggert <eggert@cs.ucla.edu>
7976 * README: Update location of patched M4 distribution.
7978 2004-05-30 Albert Chin-A-Young <china@thewrittenword.com>
7980 Don't assume the C++ compiler takes the same arguments as the C compiler
7982 * configure.ac (O0CXXFLAGS): New var.
7983 * tests/atlocal.in (CXXFLAGS): Use it.
7985 2004-05-29 Paul Eggert <eggert@cs.ucla.edu>
7987 Fix some "make check" problems with C++ reported by
7988 Albert Chin-A-Young for Tru64 C++ in this thread:
7989 http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00049.html
7991 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check for std::cerr.
7992 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
7993 Output to a .cc file for C++, not to a .c file.
7994 * tests/calc.at (AT_CHECK_CALC): Likewise.
7995 * tests/regression.at (AT_CHECK_DANCER): Likewise.
7996 * tests/local.at (AT_COMPILE_CXX): Default to OUTPUT.cc, not OUTPUT.c.
7998 2004-05-28 Albert Chin-A-Young <china@thewrittenword.com>
8000 * tests/calc.at, tests/actions.at: Workaround for SGI
8001 C++ compiler. (trivial change)
8003 2004-05-27 Paul Eggert <eggert@cs.ucla.edu>
8005 Spent a few hours checking out which prerequisite versions the
8006 current sources actually require. I went all the way back to
8007 Gettext 0.10.40, Automake 1.4, and Autoconf 2.57 and investigated
8008 a seemingly endless set of combinations of versions more recent
8009 than that. The bottom line is that the current sources require
8010 fairly recent versions of the build tools, and it'll be some work
8012 * configure.ac (AC_PREREQ): Increase from 2.58 to 2.59.
8013 (AM_INIT_AUTOMAKE): Increase from 1.7 to 1.8.
8014 (AM_GNU_GETTEXT_VERSION): Increase from 0.11.5 to 0.12.
8015 Add comments explaining why those particular versions are
8018 * src/parse-gram.y (lloc_default): Rewrite to avoid compiler bug
8019 in SGI MIPSpro 7.4.1m. Problem reported by Albert Chin-A-Young in
8020 <http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00037.html>.
8022 * configure.ac (AC_PREREQ): Bump to 2.58, since 2.57 doesn't work
8023 (it fails with a Autoconf-without-aclocal-m4 diagnostic).
8025 2004-05-26 Paul Eggert <eggert@cs.ucla.edu>
8027 * configure.ac (AM_GNU_GETTEXT_VERSION): Lower it from 0.14.1 to
8028 0.11.5. Suggested by Bruno Haible.
8029 * bootstrap: Remove gettext version checking.
8031 * doc/bison.texinfo (Decl Summary): Also mention that %union
8032 can depend on prerequisite types. Problem reported by Tim
8035 2004-05-25 Paul Eggert <eggert@cs.ucla.edu>
8037 * README: Mention GNU m4 1.4 bugs and Akim's patched version.
8038 * README-alpha: Don't tell people not to package this.
8040 * bootstrap: Don't assume $(...) works; use `...` instead.
8041 Problem reported by Paul Hilfinger. Also, diagnose non-GNU
8044 * doc/bison.texinfo (Decl Summary, Bison Options): Clarify what's
8045 put into the -d output file, and mention what to do if YYSTYPE is
8048 2004-05-24 Paul Eggert <eggert@cs.ucla.edu>
8050 Undo change made earlier today: it caused autopoint to not bring
8051 in ABOUT-NLS. Ouch. Instead, substitute our own diagnostic for
8054 * bootstrap: Check that gettext version matches what's in
8055 configure.ac. Warn users to ignore robots.txt ERROR 404.
8056 * bootstrap: Undo today's earlier change (logged below).
8057 * configure.ac (AM_GNU_GETTEXT_VERSION): Likewise.
8059 The gettext version checking is causing more trouble than it's
8060 curing; remove it. Problem reported by Paul Hilfinger.
8062 * bootstrap: Issue a warning that one can expect a message
8063 'AM_GNU_GETTEXT is used, but not AM_GNU_GETTEXT_VERSION'.
8064 * configure.ac (AM_GNU_GETTEXT_VERSION): Remove.
8066 2004-05-23 Paul Eggert <eggert@cs.ucla.edu>
8068 Ensure that the C++ compiler used for testing actually works on a
8069 simple test program; if not, skip the C++-related tests. Problem
8070 reported by Vin Shelton in:
8071 http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00026.html
8073 * m4/cxx.m4: New file.
8074 * configure.ac (BISON_TEST_FOR_WORKING_CXX_COMPILER): Add.
8075 * tests/atlocal.in (BISON_CXX_WORKS): Add.
8076 * tests/local.at (AT_COMPILE_CXX): Use it.
8078 2004-05-21 Paul Eggert <eggert@cs.ucla.edu>
8080 * data/glr.c (yylloc): Output this macro even if locations are not
8081 being generated, as the GLR parser needs it even in that case.
8082 Problem reported by Troy A. Johnson
8083 <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=195946>.
8085 * configure.ac (AC_INIT): Update to 1.875e.
8087 2004-05-21 Paul Eggert <eggert@cs.ucla.edu>
8089 * NEWS: Version 1.875d.
8090 * configure.ac (AC_INIT): Likewise.
8091 * src/parse-gram.c, src/parse-gram.h: Regenerate with 1.875d.
8093 * configure.ac (--enable-gcc-warnings): Do not enable -Wshadow,
8094 -Wmissing-prototypes, or -Wstrict-prototypes for C++. The current
8095 lalr1.cc runs afoul of the first, and the last two are no longer
8096 supported by GCC 3.4.0.
8097 * README: Mention GNU m4 1.4 or later; mention m4 patches.
8098 * HACKING: Use ./bootstrap, not "make update" to import foreign files.
8100 2004-05-06 Paul Eggert <eggert@cs.ucla.edu>
8102 * src/muscle_tab.c (hash_muscle): Accept and return size_t, not
8103 unsigned int, for compatibility with latest gnulib hash module.
8104 * src/state.c (state_hash, state_hasher): Likewise.
8105 * src/symtab.c (hash_symbol, hash_symbol_hasher): Likewise.
8106 * src/uniqstr.c (hash_uniqstr): Likewise.
8108 2004-05-03 Paul Eggert <eggert@cs.ucla.edu>
8110 * NEWS: Unescaped newlines are no longer allowed in char & strings.
8112 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER,
8113 SC_CHARACTER,SC_STRING>): Reject unescaped newlines in
8114 character and string literals.
8115 (unexpected_end): New function.
8116 (unexpected_eof): Use it.
8117 (unexpected_newline): New function.
8118 (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>): Coalesce duplicate
8121 * NEWS: Document %expect-rr.
8123 * bootstrap (--gnulib-srcdir=*, --cvs-user=*):
8124 Fix typo by replacing $1 with $option.
8125 Remove more 'intl'-related files.
8126 Don't DEFUN AM_INTL_SUBDIR twice.
8128 * lib/.cvsignore: Add strndup.h. Remove memchr.c, memcmp.c,
8129 memrchr.c, strcasecmp.c, strchr.c, strrchr.c, strspn.c, strtol.c,
8131 * m4/.cvsignore: Add exitfail.m4, extensions.m4, gnulib.m4,
8132 hard-locale.m4, mbstate_t.m4, strerror_r.m4, strndup.m4,
8133 xstrndup.m4. Remove glibc21.m4, intdiv0.m4, inttypes-pri.m4,
8134 inttypes.m4, inttypes_h.m4, isc-posix.m4, lcmessage.m4,
8135 stdint_h.m4, uintmax_t.m4, ulonglong.m4.
8136 * src/.cvsignore: Add *.output.
8138 * src/parse-gram.y: Put copyright notice inside %{ %} so it
8139 gets copied to the output file.
8141 2004-04-28 Paul Eggert <eggert@twinsun.com>
8143 Get files from the gnulib and po repositories, instead of relying
8144 on them being in our CVS. Upgrade to latest versions of gnulib
8147 * Makefile.am (SUBDIRS): Remove m4; Automake now does m4.
8148 * bootstrap: Bootstrap from gnulib and po repositories.
8149 Much of this code was stolen from GNU diff and GNU tar's bootstrap.
8150 * README-cvs: Document these changes. Remove version numbers from
8151 mentions of build tools, since they change so often. Mention Flex.
8153 * configure.ac (AC_CONFIG_MACRO_DIR): Add, with m4 as arg.
8154 (gl_USE_SYSTEM_EXTENSIONS): Add.
8155 (AC_GNU_SOURCE, AC_AIX, AC_MINIX):
8156 Remove; no longer needed, as gl_USE_SYSTEM_EXTENSIONS
8158 (AC_ISC_POSIX): Remove; we no longer support this
8159 ancient OS, as it gets in the way of latest Autoconf & gnulib.
8160 (AC_HEADER_STDC): Remove: we now assume C89 or better.
8161 (AC_CHECK_HEADERS_ONCE): Use instead of AC_CHECK_HEADERS.
8162 Do not check for C89 headers, except for locale.h which is used
8163 by the Yacc library and must port to K&R hosts.
8164 (AC_CHECK_FUNCS_ONCE): Use instead of AC_CHECK_FUNCS.
8165 Do not check for C89 functions, except for setlocale which is
8166 used by the Yacc library.
8167 (AC_CHECK_DECLS, AC_REPLACE_FUNCS): Remove; no longer needed.
8168 (gl_DIRNAME, gl_ERROR, gl_FUNC_ALLOCA, gl_FUNC_MEMCHR,
8169 gl_FUNC_MEMRCHR, gl_FUNC_STPCPY, gl_FUNC_STRNLEN, gl_FUNC_STRTOL,
8170 gl_GETOPT, gl_HASH, gl_MBSWIDTH, gl_OBSTACK, gl_QUOTE,
8171 gl_QUOTEARG, gl_XALLOC, jm_FUNC_GLIBC_UNLOCKED_IO, jm_FUNC_MALLOC,
8172 AM_GNU_GETTEXT): Remove; now done by:
8173 (GNULIB_AUTOCONF_SNIPPET): Add. "bootstrap" builds this for us.
8174 (AC_CONFIG_FILES): Remove m4/Makefile, as Automake now does this
8177 * lib/Makefile.am: Include gnulib.mk, built for us by "bootstrap".
8178 (BUILT_SOURCES, EXTRA_DIST, MOSTLYCLEANFILES):
8179 Define to empty, as gnulib.mk will do the rest for us.
8180 ($(libbison_a_OBJECTS), stdbool.h): Remove, as gnulib.mk does this
8182 (libbison_a_SOURCES): Define to $(lib_SOURCES) now.
8183 (lib_SOURCES): New symbol, containing only the non-gnulib libs.
8185 * src/files.c: Include gnulib's xstrndup.h.
8187 * src/system.h (MALLOC): Use xnmalloc, for better overflow checking.
8188 (REALLOC): Use xnrealloc, for likewise.
8189 (xstrndup, stpcpy): Remove decls, as gnulib does this for us now.
8190 (strnlen, memrchr): Remove decls; functions no longer used.
8193 * config/depcomp, config/install-sh, lib/alloca.c, lib/argmatch.c,
8194 lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
8195 lib/error.c, lib/error.h, lib/getopt.c, lib/getopt.h,
8196 lib/getopt1.c, lib/gettext.h, lib/hash.c, lib/hash.h,
8197 lib/malloc.c, lib/mbswidth.c, lib/mbswidth.h, lib/memchr.c,
8198 lib/memcmp.c, lib/memrchr.c, lib/obstack.c, lib/obstack.h,
8199 lib/quote.c, lib/quote.h, lib/quotearg.c, lib/quotearg.h,
8200 lib/realloc.c, lib/stdbool_.h, lib/stpcpy.c, lib/strcasecmp.c,
8201 lib/strchr.c, lib/strncasecmp.c, lib/strnlen.c, lib/strrchr.c,
8202 lib/strspn.c, lib/strtol.c, lib/strtoul.c, lib/unlocked-io.h,
8203 lib/xalloc.h, lib/xmalloc.c, lib/xstrdup.c, lib/xstrndup.c,
8204 m4/Makefile.am, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
8205 m4/error.m4, m4/getopt.m4, m4/hash.m4, m4/malloc.m4,
8206 m4/mbrtowc.m4, m4/mbswidth.m4, m4/memchr.m4, m4/memcmp.m4,
8207 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/prereq.m4,
8208 m4/quote.m4, m4/quotearg.m4, m4/realloc.m4, m4/stdbool.m4,
8209 m4/stpcpy.m4, m4/strnlen.m4, m4/strtol.m4, m4/strtoul.m4,
8210 m4/unlocked-io.m4, m4/xalloc.m4, po/LINGUAS, po/Makefile.in.in,
8211 po/Makevars, po/da.po, po/de.po, po/es.po, po/et.po, po/fr.po,
8212 po/hr.po, po/id.po, po/it.po, po/ja.po, po/ms.po, po/nl.po,
8213 po/pt_BR.po, po/ro.po, po/ru.po, po/sv.po, po/tr.po:
8214 Remove, as these files are now generated automatically
8215 by bootstrap or automake.
8217 * po/ChangeLog: Remove: all but one entry was a duplicate
8218 of this file, and I moved that 2000-11-02 entry here.
8220 * config/.cvsignore: Add Makefile, depcomp, install-sh.
8221 * lib/.cvsignore: Add alloca.c, alloca.h, alloca_.h, argmatch.c,
8222 argmatch.h, basename.c, dirname.c, dirname.h, error.c, error.h,
8223 exit.h, exitfail.c, exitfail.h, getopt.c, getopt.h, getopt1.c,
8224 getopt_int.h, gettext.h, gnulib.mk, hard-locale.c, hard-locale.h,
8225 hash.c, hash.h, malloc.c, mbswidth.c, mbswidth.h, memchr.c,
8226 memcmp.c, memrchr.c, obstack.c, obstack.h, quote.c, quote.h,
8227 quotearg.c, quotearg.h, realloc.c, stdbool_.h, stpcpy.c, stpcpy.h,
8228 strcasecmp.c, strchr.c, stripslash.c, strncasecmp.c, strndup.c,
8229 strnlen.c, strrchr.c, strspn.c, strtol.c, strtoul.c,
8230 unlocked-io.h, xalloc.h, xmalloc.c, xstrdup.c, xstrndup.c,
8232 * m4/.cvsignore: Remove Makefile, Makefile.in. Add alloca.m4,
8233 dirname.m4, dos.m4, error.m4, getopt.m4, hash.m4, mbrtowc.m4,
8234 mbswidth.m4, obstack.m4, onceonly.m4, quote.m4, quotearg.m4,
8235 stdbool.m4, stpcpy.m4, strnlen.m4, unlocked-io.m4, xalloc.m4.
8236 * po/.cvsignore: Add *.po, LINGUAS, Makefile.in.in, Makevars.
8237 * src/.cvsignore: Remove *_.c.
8240 * Makefile.maint (GZIP_ENV): Don't use --rsyncable if gzip doesn't
8241 support it. (The latest stable gzip doesn't.)
8243 2004-04-27 Paul Eggert <eggert@twinsun.com>
8245 * data/lalr1.cc (Parser::stos_) [! YYDEBUG]: Define even in this
8246 case, as stos_ is now used by destructors due to the 2004-02-09
8249 Remove more K&R C support.
8250 * lib/libiberty.y (PARAMS): Remove. All uses removed.
8251 * lib/subpipe.c (errno): Remove decl.
8252 Include <stdlib.h> unconditionally.
8253 (EXIT_FAILURE): Remove macro.
8254 * src/complain.c (vfprintf, strerror): Remove.
8255 * src/system.h: Include limits.h, stdlib.h, string.h, locale.h
8257 (EXIT_FAILURE, EXIT_SUCCESS, setlocale): Remove defns.
8258 Use latest Autoconf recommendations for including inttypes.h, stdint.h.
8259 (strchr, strspn, memchr): Remove decls.
8260 * tests/calc.at (_AT_DATA_CALC_Y): Include stdlib.h, string.h
8261 unconditionally. Do not declare perror.
8262 * tests/conflicts.at (%nonassoc and eof): Include stdlib.h
8265 * src/complain.c (_): Remove useless defn, as system.h defines this.
8267 * lib/bitset.h (__INT_TO_PTR): Remove; workaround no longer needed
8268 with latest obstack.h.
8269 * lib/ebitset.c (ebitset_elt_alloc): Don't bother to cast args
8270 to procedure types, as obstack.h now does that for us.
8271 * lib/lbitset.c (lbitset_elt_alloc): Likewise.
8273 * lib/subpipe.h [HAVE_SYS_TYPES_H]: Include <sys/types.h>,
8274 so that this include file can stand alone.
8275 * lib/subpipe.c: Do not include <sys/types.h>, as subpipe.h
8276 does this now. Include subpipe.h first after config.h, to
8277 test whether it can stand alone.
8279 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Don't
8280 declare yyerror when using lalr.cc, as GCC 3.4.0 warns about the
8283 * tests/synclines.at (%union synch line): Put a dummy member in
8284 the union, because empty unions aren't allowed in C. Caught
8287 2004-04-13 Jim Meyering <jim@meyering.net>
8289 * src/conflicts.c (conflicts_print): Correct format string typo:
8290 use `%%' to produce literal `%'. (trivial change)
8292 2004-03-30 Paul Eggert <eggert@twinsun.com>
8294 * src/getargs.c (version): Update copyright year to 2004.
8296 * data/c.m4 (b4_int_type): Use 'short int' rather than
8297 'short', and similarly for 'long', 'unsigned', etc.
8298 * data/glr.c (YYTRANSLATE, yyconfl, yySymbol, yyItemNum,
8299 yygetLRActions, yyprocessOneStack, yyrecoverSyntaxError,
8300 yy_yypstack, yydumpstack): Likewise.
8301 * data/lalr1.cc (user_token_number_max_, user_token_number_max_,
8302 translate_, seq_, [], pop, Slice, range_, operator+, operator+=):
8304 * data/yacc.c (b4_int_type, yyss, YYSTACK_BYTES, yysigned_char,
8305 yy_stack_print, yyparse): Likewise.
8306 * doc/bison.texinfo (Prologue, Multiple Types): Likewise.
8307 * lib/bbitset.h (bitset_word, BITSET_WORD_BITS): Likewise.
8308 * lib/bitset.c (bitset_print): Likewise.
8309 * lib/bitset_stats.c (bitste_log_histogram_print): Likewise.
8310 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
8311 * lib/bitsetv.c (bitsetv_dump): Likewise.
8312 * lib/ebitset.c (EBITSET_ELT_BITS, ebitset_elt_alloc): Likewise.
8313 * lib/lbitset.c (LBITSET_ELT_BITS, lbitset_elt_alloc, debug_lbitset):
8315 * src/LR0.c (allocate_itemsets): Likewise.
8316 * src/gram.h (rule_number, rule): Likewise.
8317 * src/lalr.h (goto_number): Likewise.
8318 * src/nullable.c (nullable_compute): Likewise.
8319 * src/output.c (prepare_rules): Likewise.
8320 * src/relation.c (relation_print, relation_digraph): Likewise.
8321 * src/relation.h (relation_node): Likewise.
8322 * src/state.h (state_number, transitions, errs, reductions,
8323 struct state): Likewise.
8324 * src/symtab.h (symbol_number, struct symbol): Likewise.
8325 * src/tables.c (vector_number, tally, action_number,
8326 default_goto, goto_actions): Likewise.
8327 * tests/existing.at (GNU Cim Grammar): Likewise.
8328 * tests/regression.at (Web2c Actions): Likewise.
8330 * src/output.c (muscle_insert_short_int_table): Renamed from
8331 muscle_insert_short_table. All uses changed.
8333 2004-03-25 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
8335 * src/parse-gram.y: Define PERCENT_EXPECT_RR.
8336 (declaration): Replace expected_conflicts with expected_sr_conflicts.
8337 Add %expect-rr rule.
8339 * src/scan-gram.l: Recognize %expect-rr.
8341 * src/conflicts.h (expected_sr_conflicts): Rename from
8343 (expected_rr_conflicts): Declare.
8345 * src/conflicts.c (expected_sr_conflicts): Rename from
8347 (expected_rr_conflicts): Define.
8348 (conflicts_print): Check r/r conflicts against expected_rr_conflicts
8350 Use expected_sr_conflicts in place of expected_conflicts.
8351 Warn if expected_rr_conflicts used in non-GLR parser.
8353 * doc/bison.texinfo: Add documentation for %expect-rr.
8355 2004-03-08 Paul Eggert <eggert@gnu.org>
8357 Add support for hex token numbers. Suggested by Odd Arild Olsen in
8358 <http://lists.gnu.org/archive/html/bison-patches/2004-03/msg00000.html>.
8360 * NEWS: Document hexadecimal tokens, no NUL bytes, %destructor
8362 * doc/bison.texinfo (Token Decl): Add hexadecimal token numbers.
8363 * src/scan-gram.l (scan_integer): New function.
8365 (0[xX][0-9abcdefABCDEF]+): New pattern, to support hex numbers.
8366 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>, \\x[0-9abcdefABCDEF]+,
8367 handle_action_dollar, handle_action_at, convert_ucn_to_byte):
8368 Say "long int", not "long", for uniformity with GNU style.
8370 2004-02-25 Paul Eggert <eggert@twinsun.com>
8372 * tests/local.at (AT_COMPILE, AT_COMPILE_CXX): Ignore stdout from
8373 compilers. This fixes a problem with Intel's C++ compiler being
8374 chatty, reported by Guido Trentalancia in
8375 <http://lists.gnu.org/archive/html/bug-bison/2004-02/msg00030.html>.
8377 2004-02-09 Alexandre Duret-Lutz <adl@gnu.org>
8379 Support %destructor and merge error locations in lalr1.cc.
8381 * data/lalr1.cc (b4_cxx_destruct_def): New macro.
8382 (Parser::stos_): Define unconditionally.
8383 (Parser::destruct_): New method. Generate its body with
8384 b4_yydestruct_generate.
8385 (Parser::error_start_): New attribute.
8386 (Parser::parse) <yyerrlab, yyerrlab1>: Call destruct_ on erroneous
8387 token which are discarded.
8388 (Parser::parse) <yyerrlab, yyerrorlab, yyerrlab1>: Update
8389 error_start_ when erroneous token are discarded.
8390 (Parser::parse) <yyerrlab1>: Compute the location of the error
8391 token so that it covers all the discarded tokens.
8392 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust so
8393 it can be called with `%skeleton "lalr1.cc"', and do that.
8395 2004-02-02 Paul Eggert <eggert@twinsun.com>
8397 * src/Makefile.am (AM_CPPFLAGS): New macro. It mentions
8398 $(top_srcdir)/lib and ../lib. This fixes a bug reported
8399 by Paul Hilfinger; the old INCLUDES value didn't mention ../lib.
8400 There's no need to mention top_builddir since Automake does that
8402 (INCLUDES): Remove, as Automake says it's obsolescent.
8403 Contents migrated into AM_CPPFLAGS as described above.
8404 * lib/Makefile.am (INCLUDES): Remove; obsolescent.
8406 2004-01-14 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
8408 * data/glr.c (yytokenName): Bullet-proof against YYEMPTY token.
8409 (yyreportSyntaxError): Handle case where lookahead token is
8412 2004-01-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
8414 * data/glr.c: Put casts on uses of YYREALLOC and YYMALLOC so that
8415 resulting parsers are compilable with C++.
8417 2003-12-23 Paul Eggert <eggert@twinsun.com>
8419 * config/depcomp, config/install-sh: Sync with Automake 1.8.
8420 * src/output.c (output_skeleton): Rename local var.
8421 * tests/input.at (Torturing the Scanner): Don't use \x0 or \0 in
8422 Bison tokens, as this runs afoul of the 2003-10-07 change that
8423 disallowed NUL bytes in character constants or string literals.
8425 * tests/local.at: Require Autoconf 2.59's Autotest.
8426 * tests/testsuite.at: Don't include local.at, since we now assume
8427 Autoconf 2.59 or later. Autoconf 2.59 had some problems with
8429 * tests/Makefile.am ($(TESTSUITE)): Remove warning about ignoring
8430 multiple inclusion warnings.
8432 2003-12-02 Akim Demaille <akim@epita.fr>
8434 * doc/bison.texinfo (How Can I Reset the Parser): More about start
8438 2003-11-18 Alexandre Duret-Lutz <adl@gnu.org>
8440 * doc/bison.texinfo (Bison Options): Escape `@' in `$@'.
8442 2003-10-07 Paul Eggert <eggert@twinsun.com>
8444 * tests/Makefile.am (clean-local): Don't run 'testsuite --clean'
8445 if testsuite doesn't exist.
8447 * doc/bison.texinfo (Symbols): NUL bytes are not allowed in string
8448 literals, unfortunately.
8449 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>):
8450 Complain about NUL bytes in character constants or string literals.
8452 2003-10-05 Paul Eggert <eggert@twinsun.com>
8454 * NEWS: Don't document %no-default-prec, as it's still
8456 * doc/bison.texinfo: Document %no-default-prec only if
8457 the defaultprec flag is set. Normally it's not.
8459 2003-10-04 Paul Eggert <eggert@twinsun.com>
8461 * data/glr.c (b4_rhs_value, b4_rhs_location): Yield a
8462 non-modifiable lvalue, instead of a modifiable one.
8463 * doc/bison.texinfo (Actions): Document that $$ can
8464 be assigned to. Do not claim that $$ and $N are
8465 array element references: user code should not rely on this.
8467 2003-10-01 Paul Eggert <eggert@twinsun.com>
8469 * src/parse-gram.h (PERCENT_NO_DEFAULT_PREC): New token.
8470 (grammar_declaration): Use it.
8471 * src/scan-gram.l: New token %no-default-prec.
8472 * tests/conflicts.at: Revamp tests to use %no-default-prec.
8473 * NEWS, doc/bison.texinfo: Document the above.
8475 2003-10-01 Akim Demaille <akim@epita.fr>
8477 VCG no longer supports long_straight_phase.
8479 * src/vcg.c, src/vcg.h: Remove the handling of long_straight_phase.
8480 * src/print_graph.c (print_graph): Adjust.
8482 2003-09-30 Frank Heckenbach <frank@g-n-u.de>
8483 and Paul Eggert <eggert@twinsun.com>
8485 * doc/bison.texinfo (Decl Summary, Contextual Precedence,
8486 Table of Symbols): Document %default-prec.
8487 * src/parse-gram.y (PERCENT_DEFAULT_PREC): New token.
8488 (grammar_declaration): Set default_prec on %default-prec.
8489 * src/scan-gram.l (%default-prec): New token.
8490 * src/reader.h (default_prec): New flag.
8491 * src/reader.c: Likewise.
8492 (packgram): Handle it.
8493 * tests/conflicts.at (%default-prec without %prec,
8494 %default-prec with %prec, %default-prec 1): New tests.
8496 2003-09-30 Paul Eggert <eggert@twinsun.com>
8498 * tests/testsuite.at: Include local.at, not input.at, fixing
8499 a typo in the 2003-08-25 patch.
8501 2003-08-27 Akim Demaille <akim@epita.fr>
8503 * data/lalr1.cc (yyparse) [__GNUC__]: "Use" yyerrorlab to pacify
8506 2003-08-26 Akim Demaille <akim@epita.fr>
8508 * config/announce-gen (print_changelog_deltas): Neutralize "<#" as
8509 "<\#" to avoid magic from Gnus when posting parts of this script.
8511 2003-08-26 Akim Demaille <akim@epita.fr>
8513 * data/lalr1.cc (Parser::report_syntax_error_): New, extracted from
8514 (Parser::parse): here.
8515 Adjust: nerrs and errstatus is now replaced by...
8516 (Parser::nerrs_, Parser::errstatus_): New.
8518 2003-08-25 Akim Demaille <akim@epita.fr>
8520 * config/announce-gen, Makefile.cfg: New.
8521 * Makefile.am: Adjust.
8522 * GNUmakefile, Makefile.maint: Update from CVS Autoconf, but
8523 keeping local WGET and WGETFLAGS modifications from Paul Eggert.
8525 2003-08-25 Akim Demaille <akim@epita.fr>
8527 When reducing initial empty rules, Bison parser read an initial
8528 location that is not defined. This results in garbage, and that
8529 affects Bison's own parser. Therefore we need (i) to extend Bison
8530 to support a means to initialize this location, and (ii) to use
8531 this CVS Bison to fix CVS Bison's parser.
8533 * src/reader.h, reader.c (epilogue_augment): Remove, replace
8535 * src/muscle_tab.h, src/muscle_tab.c (muscle_code_grow): this.
8536 * src/parse-gram.y: Adjust.
8537 (%initial-action): New.
8538 (%error-verbose): Since we require CVS Bison, there is no reason
8540 * src/scan-gram.l: Adjust.
8541 * src/Makefile.am (YACC): New, to make sure we use our own parser.
8542 * data/yacc.c (yyparse): Use b4_initial_action.
8544 2003-08-25 Akim Demaille <akim@epita.fr>
8546 * doc/bison.texinfo: Don't promote stdout for error messages.
8548 2003-08-25 Akim Demaille <akim@epita.fr>
8550 * data/lalr1.cc (Parser::reduce_print_): Remove unused yyi.
8551 From Alexandre Duret-Lutz.
8553 2003-08-25 Akim Demaille <akim@epita.fr>
8557 2003-08-25 Akim Demaille <akim@epita.fr>
8559 * data/lalr1.cc (Parser::stack_print_, YY_STACK_PRINT): New.
8562 2003-08-25 Akim Demaille <akim@epita.fr>
8564 * data/lalr1.cc (Parser::reduce_print_): New.
8567 2003-08-25 Akim Demaille <akim@epita.fr>
8569 Have lalr1.cc catch with Paul Eggert's patch to fix the infinite
8570 error recovery loops. This patch is based on
8571 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00000.html>.
8572 Also, augment the similarity between lalr1.cc and yacc.c.
8573 Note: the locations of error recovery rules are not correct yet.
8575 * data/lalr1.cc: Comment changes to augment the similarity between
8576 lalr1.cc and yacc.c.
8577 (YYERROR): Goto to yyerrorlab, not yyerrlab1.
8578 (yyerrlab1): Remove, but where it used to be (now the bottom part of
8579 yyerrlab), when hitting EOF, pop the whole stack here instead of
8580 merely falling thru the default error handling mechanism.
8581 (yyerrorlab): New label, with the old contents of YYERROR,
8582 plus the following change: pop the stack of rhs corresponding
8583 to the production that invoked YYERROR. That is how Yacc
8584 behaves (required by POSIX).
8585 * tests/calc.at (AT_CHECK_CALC_LALR1_CC): No longer expected to
8588 2003-08-25 Akim Demaille <akim@epita.fr>
8590 Tune local.at so that people can "autom4te -l autotest calc.at -o
8591 calc" for instance, to extract a sub test suite.
8593 * tests/testsuite.at: Move the initialization, Autotest version
8594 requirement, and AT_TESTED invocation into...
8595 * tests/local.at: here.
8596 * tests/testsuite.at: Include it for compatibility with Autoconf
8598 * tests/Makefile.am ($(TESTSUITE)): Report that the warning should
8601 2003-08-04 Paul Eggert <eggert@twinsun.com>
8603 Rework code slightly to avoid gcc -Wtraditional warnings.
8604 * data/glr.c (yyuserMerge): Return void, not YYSTYPE.
8605 The returned value is now stored in *YY0. All callers changed.
8606 * src/output.c (merge_output): Adjust to the above change.
8608 2003-07-26 Paul Eggert <eggert@twinsun.com>
8610 * data/glr.c (YYASSERT): New macro.
8611 (yyfillin, yydoAction, yyglrReduce, yysplitStack,
8612 yyresolveStates, yyprocessOneStack):
8613 Use `YYASSERT (FOO);' rather than `if (! (FOO)) abort ();'.
8614 Derived from a suggestion by Frank Heckenbach.
8616 2003-07-25 Paul Eggert <eggert@twinsun.com>
8618 * data/glr.c (yyglrReduce): Don't use C89 string concatenation,
8619 for portability to K&R C (after ansi2knr, presumably). See
8620 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>
8621 by Frank Heckenbach, though I have omitted the structure-initialization
8622 part of his glr-knr.diff patch since I recall that the Portable
8623 C Compiler didn't require that change.
8625 Let the user specify how to allocate and free memory.
8626 Derived from a suggestion by Frank Heckenbach in
8627 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>.
8628 * data/glr.c (YYFREE, YYMALLOC, YYREALLOC): New macros.
8629 All uses of free, malloc, realloc changed to use these macros,
8630 and unnecessary casts removed.
8631 * data/yacc.c (YYFREE, YYMALLOC): Likewise.
8633 2003-07-06 Matthias Mann <MatthiasMann@gmx.de>
8635 * data/lalr1.cc (operator<<(std::ostream&, const Position&)):
8636 use s.empty() rather than s == "" to test for empty string; see
8637 <http://lists.gnu.org/archive/html/bison-patches/2003-07/msg00003.html>
8640 2003-06-25 Akim Demaille <akim@epita.fr>
8642 * config/depcomp, config/install-sh: Update from masters.
8644 2003-06-20 Paul Eggert <eggert@twinsun.com>
8646 * data/glr.c (YYLLOC_DEFAULT): Parenthesize arguments as needed,
8647 and return properly parenthesized result.
8648 * data/lalar1.cc (YYLLOC_DEFAULT): Likewise.
8649 * data/yacc.c (YYLLOC_DEFAULT): Likewise.
8650 Remove unnecessary parentheses from uses.
8651 * doc/bison.texinfo (Location Default Action): Describe the
8652 conventions for parentheses.
8654 2003-06-19 Paul Eggert <eggert@twinsun.com>
8656 * data/glr.c (yyremoveDeletes, yy_reduce_print, yyglrReduce,
8657 yyreportTree): Do not assume that size_t is the same width as int,
8658 when printing sizes. Print sizes using an unsigned format.
8659 Problem reported by Frank Heckenbach in
8660 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00035.html>.
8662 Port to Forte Developer 7 C compiler.
8663 * data/glr.c (struct YYLTYPE): If locations are not being used,
8664 declare a single dummy member, as empty structs do not conform
8666 (YYERROR, YYBACKUP): Do not use "do { ...; return foo; } while (0)";
8667 the Forte Developer 7 C compiler complains that end-of-loop
8668 code is not reached.
8670 2003-06-17 Paul Eggert <eggert@twinsun.com>
8672 * lib/libiberty.h (PARAMS): Spell argument as Args, not as X, to
8673 avoid warnings from picky compilers about redefinition of PARAMS.
8675 2003-06-17 Paul Eggert <eggert@twinsun.com>
8679 * NEWS: Document 1.875b.
8681 * lib/bbitset.h: Do not include config.h; that's the includer's job.
8682 Do not include <sys/types.h>; shouldn't be needed on a C89 host.
8683 * lib/bitset.h (bitset_compatible_p): Indent as per GNU standard.
8684 Don't use 'index' in comments, as it's a builtin fn on some hosts.
8685 * lib/bitset_stats.c: Include gettext.h unconditionally, as
8686 per recent gettext manual's suggestion.
8687 * lib/ebitset.c (ebitset_resize, ebitset_unused_clear):
8688 Use prototypes, not old-style definitions.
8689 * lib/lbitset.c (lbitset_unused_clear): Likewise.
8690 * lib/vbitset.c (vbitset_resize, vbitset_ones, vbitset_zero,
8691 vbitset_empty_p, vbitset_copy1, vbitset_not, vbitset_equal_p,
8692 vbitset_subset_p, vbitset_disjoint_p, vbitset_and, vbitset_and_cmp,
8693 vbitset_andn, vbitset_andn_cmp, vbitset_or, vbitset_or_cmp,
8694 vbitset_xor, vbitset_xor_cmp, vbitset_and_or, vbitset_and_or_cmp,
8695 vbitset_andn_or, vbitset_andn_or_cmp, vbitset_or_and,
8696 vbitset_or_and_cmp, vbitset_copy): Likewise.
8698 * lib/libiberty.h: Do not include config.h; that's the includer's job.
8699 Do not include <stdlib.h>.
8700 (PARAMS): Define unconditionally for C89.
8701 (ATTRIBUTE_NORETURN): Remove.
8702 (ATTRIBUTE_UNUSED): Define unconditionally.
8704 Upgrade to 2003-06-08 libbitset, submitted by Michael Hayes in:
8705 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00005.html>
8706 * lib/Makefile.am (bitsets_sources): Add vbitset.c, vbitset.h.
8707 * lib/vbitset.c, lib/vbitset.h: New files.
8708 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
8709 lib/bitset_stats.c, lib/ebitset.c, lib/lbitset.c: Import
8712 * doc/bison.texinfo (How Can I Reset the Parser): Renamed from
8713 `How Can I Reset @code{yyparse}', since texinfo does not allow
8714 arbitrary @ in node names.
8716 * m4/Makefile.am (EXTRA_DIST): Add the following files, which
8717 shouldn't be needed according to the gettext 0.12.1 documentation
8718 but which seem to be needed anyway: codeset.m4 glibc21.m4
8719 intdiv0.m4 inttypes-pri.m4 inttypes.m4 inttypes_h.m4 isc-posix.m4
8720 lcmessage.m4 nls.m4 po.m4 stdint_h.m4 uintmax_t.m4 ulonglong.m4.
8721 * po/Makefile.in.in: Upgrade to gettext 0.12.1 version.
8723 * lib/.cvsignore: Add stdbool.h.
8724 * m4/.cvsignore: Add nls.m4, po.m4.
8726 Upgrade to CVS gnulib.
8727 * stdbool_.h: File renamed from stdbool.h.in.
8728 * configure.ac (AM_STDBOOL_H): Invoke this instead of
8730 (AM_GNU_GETTEXT): Put brackets around args, as latest manual suggests.
8731 (AM_GNU_GETTEXT_VERSION): Update to 0.12.1.
8732 * lib/Makefile.am (EXTRA_DIST): Add stdbool_.h.
8733 (MOSTLYCLEANFILES): New var.
8734 ($(libbison_a_OBJECTS)): Depend on $(STDBOOL_H).
8735 (stdbool.h): New rule.
8736 * lib/dirname.c, lib/dirname.h, lib/hash.c, lib/hash.h,
8737 lib/malloc.c, lib/obstack.h, lib/quote.c, lib/realloc.c,
8738 lib/strcasecmp.c, lib/xalloc.h, m4/alloca.m4, m4/onceonly.m4,
8739 m4/quote.m4: Upgrade to today's gnulib.
8741 * tests/calc.at (AT_CHECK_CALC): New option EXPECTED-TO-FAIL.
8742 (AT_CHECK_CALC_LALR1_CC): Use it, since the C++ LALR parser fails
8743 the tests right now.
8744 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Ensure yylex and
8745 yyerror are declared before use; C99 requires this.
8747 2003-06-09 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
8749 * data/glr.c (YYERROR): Update definition to reset yyerrState to 0
8751 (yyrecoverSyntaxError): Correct the logic for setting and testing
8753 Correct comment on handling EOF.
8754 Allow states with only a default reduction, rather than failing
8755 (I can't quite reconstruct why these were not allowed before).
8757 Fixes to avoid problem that $-N rules in GLR parsers can cause
8758 buffer overruns, corrupting state.
8760 * src/output.c (prepare_rules): Output max_left_semantic_context
8762 * src/reader.h (max_left_semantic_context): New variable declaration.
8763 * src/scan-gram.l (max_left_semantic_context): Define.
8764 (handle_action_dollar): Update max_left_semantic_context.
8765 * data/glr.c (YYMAXLEFT): New definition.
8766 (yydoAction): Increase size of yyrhsVals by YYMAXLEFT.
8767 (yyresolveAction): Ditto.
8769 Fixes to problems with location handling in GLR parsers reported by
8770 Frank Heckenbach (2003/06/05).
8772 * data/glr.c (YYLTYPE): Make trivial if locations not used.
8773 (YYRHSLOC): Add parentheses, and define only if locations used.
8774 (YYLLOC_DEFAULT): Add parentheses, and give trivial definition if
8776 (yyuserAction): Use YYLLOC_DEFAULT to set *yylocp.
8777 (yydoAction): Remove redundant initialization of *yyvalp and *yylocp.
8779 * tests/cxx-type.at: Exercise location information; update tests
8780 to differentiate output with and without locations.
8781 Remove forward declarations of yylex and yyerror---caused errors
8782 because default YYLTYPE not yet defined.
8783 Change semantic actions to compute strings, rather than printing
8784 them directly (to test proper passing of semantics values). Change
8785 output to prefix notation and update test data and expected results.
8786 (yylex): Track locations.
8787 (stmtMerge): Return value rather than printing, and include arguments
8790 2003-06-03 Paul Eggert <eggert@twinsun.com>
8792 Avoid warnings generated by GCC 2.95.4 when Bison is
8793 configured with --enable-gcc-warnings.
8794 * data/lalr1.cc (yy::]b4_parser_class_name[::parse,
8795 yy::]b4_parser_class_name[::translate_,
8796 yy::Stack::operator[] (unsigned),
8797 yy::Stack::operator[] (unsigned) const,
8798 yy::Slice::operator[] (unsigned),
8799 yy::Slice::operator[] (unsigned) const):
8800 Rename local vars to avoid warnings.
8801 * tests/glr-regression.at (Improper handling of embedded actions
8802 and $-N in GLR parsers): Remove unused local variable from yylex.
8803 * tests/regression.at (_AT_DATA_DANCER_Y): Declare yylex to take
8804 (void) as arg when not pure, since we now assume C89 when building
8805 Bison. Pacify GCC by using parameter.
8807 2003-06-02 Paul Eggert <eggert@twinsun.com>
8809 * data/lalr1.cc (yy::Position::lines, yy::Position::columns,
8810 yy::Location::lines, yy::Location::columns): Rename arguments
8811 to avoid shadowing; this removes a warning generated by GCC 3.3.
8813 2003-06-01 Paul Eggert <eggert@twinsun.com>
8815 Don't pass C-only warning optins (e.g., -Wmissing-declarations)
8816 to g++, as GCC 3.3 complains if you do it.
8817 * configure.ac (WARNING_CXXFLAGS): New subst. Set it to
8818 everything that WARNING_CFLAGS has, except omit warnings
8819 not suitable for C++.
8820 (AC_PROG_CXX): Use this instead of AC_CHECK_PROGS([CXX], [g++]).
8821 * tests/atlocal.in (CXXFLAGS): New var.
8822 * tests/local.at (AT_COMPILE_CXX): Use it instead of CFLAGS.
8824 Fix a GLR parser bug I reported in February; see
8825 <http://lists.gnu.org/archive/html/bison-patches/2003-02/msg00008.html>.
8826 The problem was that GLR parsers did not conform to the C standard,
8827 because actions like { $1 = $2 + $3; } expanded to expressions
8828 that invoked YYFILL in separate subexpressions, and YYFILL assigned
8829 to a local variable. The C standard says that expressions
8830 like (var = f ()) + (var = f ()) have undefined behavior.
8831 Another problem was that GCC sometimes issues warnings that
8832 yyfill and its parameters are unused.
8834 * data/glr.c (yyfillin): Renamed from the old yyfill. Mark
8836 (yyfill): New function.
8838 (yyuserAction): Change type of yynormal to bool, so that it matches
8839 the new yyfill signature. Mark it as possibly unused.
8842 Follow up on a bug I reported in February, where a Bison-generated
8843 parser can loop. Provide a test case and a fix for yacc.c. I
8844 don't have a fix for lalr1.cc or for glr.c, unfortunately.
8845 The original bug report is in:
8846 <http://lists.gnu.org/archive/html/bison-patches/2003-02/msg00044.html>
8848 * data/yacc.c (YYERROR): Now just 'goto yyerrorlab', since the
8849 macro's size was becoming unwieldy.
8850 (yyerrlab): Do not discard an empty lookahead symbol, as this
8851 might destroy garbage.
8852 (yyerrorlab): New label, with the old contents of YYERROR,
8853 plus the following change: pop the stack of rhs corresponding
8854 to the production that invoked YYERROR. That is how Yacc
8855 behaves, and POSIX requires this behavior.
8856 (yyerrlab1): Use YYPOPSTACK instead of its definiens.
8857 * tests/calc.at (_AT_DATA_CALC_Y): Include unistd.h if available.
8858 Define 'alarm' to do nothing if unistd.h is not available.
8859 Add a new rule "exp: '-' error;" to test the above change to
8860 data/yacc.c. Use 'alarm' to abort any test taking longer than
8861 10 seconds, as it's probably looping.
8862 (AT_CHECK_CALC): Test recovery from error in new grammar rule.
8863 Also, the new yacc.c generates two fewer diagnostics for an
8866 2003-05-24 Paul Eggert <eggert@twinsun.com>
8868 * data/glr.c (YYSTACKEXPANDABLE): Do not evaluate
8869 YYSTYPE_IS_TRIVIAL or YYSTYPE_IS_TRIVIAL unless they are defined.
8870 This fixes a problem reported by John Bowman when the Compaq/HP
8871 Alpha cxx compiler happy (e.g. using cxx -D__USE_STD_IOSTREAM
8873 * data/yacc.c (union yyalloc): Likewise.
8874 (YYCOPY): Do not evaluate __GNUC__ unless it is defined.
8876 Switch from 'int' to 'bool' where that makes sense.
8878 * lib/abitset.c (abitset_test, abitset_empty_p, abitset_equal_p,
8879 abitset_subset_p, abitset_disjoint_p, abitset_and_cmp,
8880 abitset_andn_cmp, abitset_or_cmp, abitset_xor_cmp, abitset_and_or,
8881 abitset_and_or_cmp, abitset_andn_or_cmp, abitset_or_and_cmp):
8882 Return or accept bool, not int. All callers changed.
8883 * lib/bbitset.h: (bitset_toggle_, bitset_copy_, bitset_and_or_cmp_,
8884 bitset_andn_or_cmp_, bitset_or_and_cmp_): Likewise.
8885 * lib/bitset.c (bitset_only_set_p, bitset_print, bitset_toggle_,
8886 bitset_copy_, bitset_op4_cmp, bitset_and_or_cmp_, bitset_andn_or_cmp_,
8887 bitset_or_and_cmp_): Likewise.
8888 * lib/bitset.h (bitset_test, bitset_only_set_p): Likewise.
8889 * lib/bitset_stats.c (bitset_stats_print, bitset_stats_toggle,
8890 bitset_stats_test, bitset_stats_empty_p, bitset_stats_disjoint_p,
8891 bitset_stats_equal_p, bitset_stats_subset_p, bitset_stats_and_cmp,
8892 bitset_stats_andn_cmp, bitset_stats_or_cmp, bitset_stats_xor_cmp,
8893 bitset_stats_and_or_cmp, bitset_stats_andn_or_cmp,
8894 bitset_stats_or_and_cmp): Likewise.
8895 * lib/ebitset.c (ebitset_elt_zero_p, ebitset_equal_p, ebitset_copy_cmp,
8896 ebitset_test, ebitset_empty_p, ebitset_subset_p, ebitset_disjoint_p,
8897 ebitset_op3_cmp, ebitset_and_cmp, ebitset_andn_cmp, ebitset_or_cmp,
8898 ebitset_xor_cmp): Likewise.
8899 * lib/lbitset.c (lbitset_elt_zero_p, lbitset_equal_p, lbitset_copy_cmp,
8900 lbitset_test, lbitset_empty_p, lbitset_subset_p, lbitset_disjoint_p,
8901 lbitset_op3_cmp, lbitset_and_cmp, lbitset_andn_cmp, lbitset_or_cmp,
8902 lbitset_xor_cmp): Likewise.
8903 * lib/bbitset.h: Include <stdbool.h>.
8904 (struct bitset_vtable): The following members now return bool, not
8905 int: toggle, test, empty_p, disjoint_p, equal_p, subset_p,
8906 and_cmp, andn_cmp, or_cmp, xor_cmp, and_or_cmp, andn_or_cmp,
8908 * src/conflicts.c (count_rr_conflicts): Likewise.
8909 * lib/bitset_stats.h (bitset_stats_enabled): Now bool, not int.
8911 * lib/ebitset.c (ebitset_obstack_init): Likewise.
8912 * lib/lbitset.c (lbitset_obstack_init): Likewise.
8913 * src/getargs.c (debug_flag, defines_flag, locations_flag,
8914 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
8915 graph_flag): Likewise.
8916 * src/getargs.h (debug_flag, defines_flag, locations_flag,
8917 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
8918 graph_flag): Likewise.
8919 * src/output.c (error_verbose): Likewise.
8920 * src/output.h (error_verbose): Likewise.
8921 * src/reader.c (start_flag, typed): Likewise.
8922 * src/reader.h (typed): Likewise.
8923 * src/getargs.c (LOCATIONS_OPTION): New constant.
8924 (long_options, getargs): Use it.
8925 * src/lalr.c (build_relations): Use bool, not int.
8926 * src/nullable.c (nullable_compute): Likewise.
8927 * src/print.c (print_reductions): Likewise.
8928 * src/tables.c (action_row, pack_vector): Likewise.
8929 * src/muscle_tab.h (MUSCLE_INSERT_BOOL): New macro.
8930 * src/output.c (prepare): Use it.
8931 * src/output.c (token_definitions_output,
8932 symbol_destructors_output, symbol_destructors_output): Use string,
8933 not boolean integer, to keep track of whether to output separator.
8934 * src/print_graph.c (print_core): Likewise.
8935 * src/state.c (state_rule_lookaheads_print): Likewise.
8937 * config/install-sh: Sync from automake 1.7.5.
8939 2003-05-14 Paul Eggert <eggert@twinsun.com>
8941 * src/parse-gram.y (rules_or_grammar_declaration): Require a
8942 semicolon after a grammar declaration, in the interest of possible
8943 future changes to the Bison input language.
8944 Do not allow a stray semicolon at the start of the grammar.
8945 (rhses.1): Allow one or more semicolons after any rule, including
8946 just before "|" as required by POSIX.
8947 * tests/input.at (Torturing the Scanner): Add tests for ";|" in a
8950 2003-05-14 Alexandre Duret-Lutz <adl@gnu.org>
8952 %parse-param support for lalr1.cc.
8954 * data/lalr1.cc (b4_parse_param_decl, b4_parse_param_cons,
8955 b4_cc_constructor_calls, b4_cc_constructor_call,
8956 b4_parse_param_vars, b4_cc_var_decls, b4_cc_var_decl): New m4
8958 (yy::b4_parser_class_name::b4_parser_class_name): Take extra
8959 parse-param arguments.
8960 (yy::b4_parser_class_name): Declare instance variables to
8961 hold parse-param arguments.
8962 * tests/calc.at: s/value/semantic_value/ because value clashes
8963 with a member of yy::b4_parser_class_name. Adjust C++ code
8964 to handle %parse-param. Enable %parse-param test in C++.
8966 2003-05-12 Paul Eggert <eggert@twinsun.com>
8968 * doc/bison.texinfo (How Can I Reset @code{yyparse}): Reword the
8969 English a bit. Fix fclose typo. Change "const char" to "char
8970 const", and use ANSI C rather than K&R for "main". Suggest
8971 YY_FLUSH_BUFFER over yyrestart (as that is what Flex recommends)
8972 and suggest yy_switch_to_buffer.
8974 2003-05-05 Paul Eggert <eggert@twinsun.com>
8976 * lib/bitset.h (__INT_TO_PTR): Define to a value that presumes
8977 C89. This avoids a diagnostic on compilers that define __STDC__
8978 to 0, fixing a problem with Tru64 cc reported by Martin Mokrejs in
8979 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
8981 2003-05-03 Paul Eggert <eggert@twinsun.com>
8983 * lib/bitset.h (BITSET_FOR_EACH, BITSET_FOR_EACH_REVERSE):
8984 Do not overrun array bounds.
8985 This should fix a bug reported today by Olatunji Oluwabukunmi in
8986 <http://lists.gnu.org/archive/html/bug-bison/2003-05/msg00004.html>.
8988 2003-04-29 Akim Demaille <akim@epita.fr>
8990 * src/gram.h, src/gram.c (pure_parser, glr_parser): Move to...
8991 * src/getargs.c, src/getargs.h: here, as bool, not int.
8992 (nondeterministic_parser): New.
8993 * src/parse-gram.y, src/scan-gram.l: Support
8994 %nondeterministic-parser.
8995 * src/output.c (prepare): Use nondeterministic_parser instead
8996 of glr_parser where appropriate.
8997 * src/tables.c (conflict_row, action_row, save_row)
8998 (token_actions, token_actions, pack_vector): Ditto.
9000 2003-04-29 Akim Demaille <akim@epita.fr>
9002 * doc/bison.texinfo (C++ Parsers, Implementing Loops): New.
9004 2003-04-29 Akim Demaille <akim@epita.fr>
9006 * tests/calc.at: Also test yacc.c and glr.c (but not lalr1.cc yet)
9007 with %pure-parser and %locations to exercise the patch from Yakov
9010 2003-04-28 Tim Van Holder <tim.van.holder@pandora.be>
9012 * data/yacc.c: (b4_lex_param): Corrected for the case where
9013 %lex-param is provided and %pure-parser isn't.
9015 2003-04-27 Paul Eggert <eggert@twinsun.com>
9017 Avoid gcc -Wundef warnings reported by Gerald Pfeifer in
9018 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00044.html>.
9019 * data/yacc.c (YYSTACK_ALLOC): Don't evaluate YYSTACK_USE_ALLOCA
9020 if it is not defined.
9021 (YYMAXDEPTH): Don't evaluate YYMAXDEPTH if it is not defined.
9023 2003-04-26 Paul Eggert <eggert@twinsun.com>
9025 * data/lalr1.cc (yy::Parser::pact_ninf_, yy::Parser::table_ninf_):
9026 Declare to be of type suitable for the ninf value itself, not of
9027 type suitable for the corresponding table, since the latter might
9028 be unsigned but the ninf value might be negative. This fixes a
9029 bug reported by Alexandre Duret-Lutz in
9030 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00017.html>.
9032 * configure.ac (AC_FUNC_ERROR_AT_LINE): Remove, since gl_ERROR
9033 invokes it. We shouldn't invoke it twice because it will attempt
9034 to put error.o in the archive twice. This fixes a glitch reported
9035 by Martin Mokrejs in
9036 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
9038 2003-04-21 Paul Eggert <eggert@twinsun.com>
9040 * m4/error.m4: Update from Bruno Haible's 2003-04-14 patch
9043 2003-04-21 Yakov Markovitch <Markovitch@iso.ru>
9045 * data/glr.c (yyexpandGLRStack) [!YYSTACKEXPANDABLE]:
9046 Fix obvious typo that results in uncompilable GLR parsers
9047 when both %pure-parser and %locations are used. (trivial change)
9049 2003-04-17 Paul Eggert <eggert@twinsun.com>
9051 * src/scan-gram.l: Add %option nounput, since we no longer use unput.
9052 (unexpected_eof): Renamed from unexpected_end_of_file, for brevity.
9053 Do not insert the expected token via unput, as this runs afoul
9054 of a POSIX-compatibility bug in flex 2.5.31.
9055 All uses changed to BEGIN the parent state,
9056 since we no longer insert the expected token via unput.
9057 * tests/regression.at (Invalid inputs): Remove cascaded diagnostic
9058 that is no longer emitted after the above change.
9060 * src/conflicts.c (set_conflicts): Resolve all conflicts, not just
9061 the first one. This change is from Paul Hilfinger, and it fixes
9062 regression reported by Werner Lemberg in
9063 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00026.html>.
9065 (resolve_sr_conflict): Don't invoke state_errs_set
9066 unless one or more tokens have been explicitly made errors.
9067 Otherwise, the above change causes Bison to abort.
9069 * tests/existing.at (GNU pic Grammar): New test case, taken from
9072 2003-03-31 Akim Demaille <akim@epita.fr>
9074 * doc/Makefile.am (AM_MAKEINFOFLAGS): Don't split the info file.
9076 2003-03-31 Akim Demaille <akim@epita.fr>
9078 * src/output.c (prepare_symbols): Avoid trailing spaces in the
9081 2003-03-31 Akim Demaille <akim@epita.fr>
9083 * doc/bison.texinfo (Strings are Destroyed): s/losses/loses/.
9084 From Paul Hilfinger.
9086 2003-03-29 Akim Demaille <akim@epita.fr>
9088 * m4/error.m4: Do not put under dynamic conditions some code which
9089 expansion is under static control.
9091 2003-03-29 Akim Demaille <akim@epita.fr>
9093 * doc/bison.texinfo (How Can I Reset @code{yyparse}): New.
9095 2003-03-29 Akim Demaille <akim@epita.fr>
9097 * doc/bison.texinfo (Strings are Destroyed): New.
9099 2003-03-13 Paul Eggert <eggert@twinsun.com>
9101 * .cvsignore: Add configure.lineno.
9102 * src/.cvsignore: Add yacc.
9103 * tests/.cvsignore: Add testsuite.log.
9104 * doc/fdl.texi: Sync with latest FSF version.
9106 2003-03-12 Paul Eggert <eggert@twinsun.com>
9108 * scan-gram.l (YY_USER_INIT): Initialize code_start, too.
9109 (<INITIAL><<EOF>>, <SC_PRE_CODE><<EOF>>): Set *loc to the scanner
9110 cursor, instead of leaving it undefined. This fixes a bug
9111 reported by Tim Van Holder in
9112 <http://lists.gnu.org/archive/html/bug-bison/2003-03/msg00023.html>.
9113 * tests/input.at (Torturing the Scanner): Test the scanner on
9114 an empty input file, which was Tim Van Holder's test case.
9116 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): When checking whether
9117 <sys/resource.h> can be included, include sys/time.h and
9118 sys/times.h first, if available. This works around the SunOS
9119 4.1.4 porting bug reported by Bruce Becker in
9120 <http://lists.gnu.org/archive/html/bug-bison/2003-03/msg00018.html>.
9122 * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't
9123 AC_CHECK_HEADERS([sys/wait.h]), as this interferes with
9126 Merge changes from gnulib. This was prompted because the CVS
9127 snapshot didn't build on Solaris 7 due to strnlen problems.
9129 These changes need to be merged back into gnulib:
9130 * lib/hash.c: Include <stdbool.h> unconditionally.
9131 * m4/onceonly.m4 (m4_quote): New macro.
9132 (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE, AC_CHECK_DECLS_ONCE):
9133 Quote AC_FOREACH variable-expansions properly.
9134 The 2003-01-03 obstack.h change also needs merging.
9135 {end of changes requiring merging}
9137 * lib/stdbool.h.in, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
9138 m4/getopt.m4, m4/hash.m4, m4/malloc.m4, m4/memchr.m4,
9139 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/quote.m4,
9140 m4/quotearg.m4, m4/realloc.m4, m4/stpcpy.m4, m4/strnlen.m4,
9141 m4/strtol.m4, m4/strtoul.m4, m4/unlocked-io.m4, m4/xalloc.m4:
9142 New files, imported from gnulib.
9143 * m4/Makefile.am (EXTRA_DIST): Add the new m4/*.m4 files mentioned
9146 * lib/mbswidth.c, m4/error.m4, m4/mbrtowc.m4, m4/mbswidth.m4,
9147 m4/memcmp.m4, m4/prereq.m4, m4/stdbool.m4: Update to current
9150 * configure.ac (gl_DIRNAME, gl_GETOPT, gl_HASH, gl_QUOTE, gl_XALLOC):
9152 (gl_ERROR): New, replacing jm_PREREQ_ERROR.
9153 (gl_FUNC_ALLOCA): New, replacing AC_FUNC_ALLOCA.
9154 (gl_FUNC_STPCPY): New, replacing AC_REPLACE_FUNCS(stpcpy).
9155 (gl_FUNC_STRNLEN): New, replacing AC_FUNC_STRNLEN.
9156 (gl_MBSWIDTH): New, replacing jm_PREREQ_MBSWIDTH.
9157 (gl_OBSTACK): New, replacing AC_FUNC_OBSTACK.
9158 (gl_QUOTEARG): New, replacing jm_PREREQ_QUOTEARG.
9159 (jm_FUNC_GLIBC_UNLOCKED_IO, gl_FUNC_STPCPY, gl_FUNC_STRTOL): New.
9160 (jm_FUNC_MALLOC): New, replacing AC_FUNC_MALLOC.
9161 (jm_FUNC_REALLOC): New, replacing AC_FUNC_REALLOC.
9162 (jm_PREREQ_ARGMATCH): Remove.
9163 (AC_REPLACE_FUNCS): Remove memchr, memrchr, stpcpy, strtol, strtoul.
9164 * lib/Makefile.am (libbison_a_SOURCES): Add argmatch.c, argmatch.h.
9166 * src/system.h: Include <stdbool.h> unconditionally.
9168 * lib/bbitset.h: Include <limits.h> unconditionally. We have been
9169 assuming at least C89 in the bitset code for some time now.
9171 2003-03-03 Akim Demaille <akim@epita.fr>
9175 2003-03-02 Akim Demaille <akim@epita.fr>
9177 * doc/bison.texinfo (Table of Symbols): Reactivate the
9178 documentation for %lex-param, and %parse-param.
9180 2003-03-02 Akim Demaille <akim@epita.fr>
9182 * data/yacc.c, data/glr.c, data/lal1.cc: Use similar code to
9183 generate verbose error messages.
9184 Use the number of tokens as an upper bound in yytname, as it
9185 cannot be a non terminal.
9187 2003-03-02 Akim Demaille <akim@epita.fr>
9189 * tests/regression.at (_AT_DATA_DANCER_Y): Fix the expected error
9192 2003-03-02 Akim Demaille <akim@epita.fr>
9194 * tests/regression.at (_AT_DATA_DANCER_Y, AT_CHECK_DANCER): New.
9195 Use them to exercise yycheck overrun.
9196 Based on Andrew Suffield's grammar.
9198 2003-03-02 Akim Demaille <akim@epita.fr>
9200 Create tests/local.at for Bison generic testing macros.
9202 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Move to...
9203 * tests/local.at (AT_BISON_OPTION_PUSHDEFS, AT_BISON_OPTION_POPDEFS):
9205 * tests/calc.at (AT_CHECK_CALC): Adjust.
9206 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR)
9207 (AT_COMPILE, AT_COMPILE_CXX, AT_PARSER_CHECK): Move to...
9208 * tests/local.at: here.
9209 (AT_COMPILE_CXX): Tags the tests using it as c++.
9210 Ignore the test if CXX is not functional.
9212 2003-03-01 Paul Eggert <eggert@twinsun.com>
9214 * src/scan-gram.l (code_start): Initialize it to scanner_cursor,
9215 not loc->end, since loc->end might contain garbage and this leads
9216 to undefined behavior on some platforms.
9217 (id_loc, token_start): Use (IF_LINTed) initial values that do not
9218 depend on *loc, so that the reader doesn't give the the false
9219 impression that *loc is initialized.
9220 (<INITIAL>"%%"): Do not bother setting code_start, since its value
9221 does not survive the return.
9223 2003-03-01 Akim Demaille <akim@epita.fr>
9225 * src/scan-gram.l (code_start): Always initialize it when entering
9226 into yylex, as SC_EPILOGUE is activated *before* the corresponding
9227 yylex invocation. An alternative would be making it static, but
9228 then it starts with the second %%'s beginning, instead of its end.
9230 2003-02-28 Paul Eggert <eggert@twinsun.com>
9232 * lib/mbswidth.c: Include <wchar.h> before "mbswidth.h", to work
9233 around a UnixWare 7.1.1 porting bug reported by John Hughes in
9234 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00030.html>.
9236 2003-02-26 Paul Eggert <eggert@twinsun.com>
9238 * README: Mention compiler bug in Sun Forte Developer 6 update 2.
9239 Remove Sequent/Pyramid discussion (nobody uses them any more).
9240 Merge VMS and MS-DOS discussion; these ports may well be dead
9241 but let's keep mentioning them for now. Put <> around email
9242 addresses. Add copyright notice.
9244 2003-02-24 Paul Eggert <eggert@twinsun.com>
9246 * data/glr.c (yy_reduce_print): yylineno -> yylno,
9247 to avoid collision with flex use of yylineno.
9248 Problem reported by Bruce Lilly in
9249 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00016.html>.
9250 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
9251 * data/yacc.c (yy_reduce_print): Likewise.
9253 * config/depcomp: Sync with Automake 1.7.3.
9255 2003-02-21 Akim Demaille <akim@epita.fr>
9257 * data/lalr1.cc: Use temporary variables instead of casts to
9258 change integer types.
9259 Suggested by Paul Eggert.
9261 2003-02-21 Akim Demaille <akim@epita.fr>
9263 * doc/bison.texinfo: Use "location" consistently to refer to @n,
9264 to avoid confusions with lalr1.cc's notion of Position.
9265 Suggested by Paul Eggert.
9267 2003-02-20 Akim Demaille <akim@epita.fr>
9269 * data/lalr1.cc (position.hh): Make sure "columns" never pushes
9270 before initial_columns.
9271 (location.hh): Use consistent variable names when defining the
9273 Use "last" so that we subtract from Positions, not from unsigned.
9275 2003-02-20 Akim Demaille <akim@epita.fr>
9277 * data/lalr1.cc (position.hh): New subfile, including the extended
9278 and Doxygen'ed documentation of class Position.
9279 (location.hh): Use it.
9280 Document a` la Doxygen.
9281 With the help of Benoit Perrot.
9283 2003-02-20 Akim Demaille <akim@epita.fr>
9285 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Define
9287 Redefine AT_YYERROR_SEES_LOC_IF using it.
9288 (_AT_DATA_CALC_Y): Don't declare yyerror when lalr1.cc, as it is
9290 Don't use the location in yy::Parser::error_ and
9291 yy::Parser::print_ when not %locations.
9292 Activate more lalr1.cc tests.
9294 2003-02-19 Akim Demaille <akim@epita.fr>
9296 * data/lalr1.cc: When displaying a line number, be sure to make it
9299 2003-02-19 Akim Demaille <akim@epita.fr>
9301 * data/lalr1.cc (b4_stack_depth_init, yy::Parser::initdepth_):
9303 (YYABORT, YYACCEPT, YYERROR): New.
9304 * tests/calc.at: Renable the lalr1.cc test.
9306 2003-02-19 Akim Demaille <akim@epita.fr>
9308 * tests/calc.at (AT_CHECK_CALC): Check different scenarios of
9309 error recovery, mixing with/without pops and discarding of the
9312 Disable the lalr1.cc tests as currently it doesn't support YYERROR.
9314 2003-02-17 Paul Eggert <eggert@twinsun.com>
9316 * tests/atlocal.in (LDFLAGS, LIBS): New vars.
9317 * tests/testsuite.at (AT_COMPILE): Use them.
9318 This fixes the testsuite problem reported by Robert Lentz in
9319 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00011.html>.
9321 2003-02-12 Paul Eggert <eggert@twinsun.com>
9323 * data/yacc.c (yyerrlab) [YYERROR_VERBOSE]:
9324 Avoid subscript error in yycheck. Bug reported by Andrew Suffield in
9325 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00003.html>.
9326 * data/glr.c (yyreportSyntaxError) [YYERROR_VERBOSE]: Likewise.
9327 Check for malloc failure, for consistency with yacc.c.
9328 (yytname_size): Remove, for consistency with yacc.c.
9330 The bug still remains in data/lalr1.cc, as I didn't have time
9333 2003-02-06 Akim Demaille <akim@epita.fr>
9335 * configure.ac (GXX): Rename as...
9336 (CXX): this, to keep the original Autoconf semantics.
9338 * data/lalr1.cc: Fix b4_copyright invocations.
9339 If YYDEBUG is not defined, don't depend upon name_ being defined.
9340 (location.hh): Include string and iostream.
9341 (Position::filename): New member.
9342 (Position::Position ()): New.
9343 (operator<< (Position)): New.
9344 (operator- (Position, int)): New.
9345 (Location::first, Location::last): Rename as...
9346 (Location::begin, Location::end): these, to mock the conventional
9348 (operator<< (Location)): New.
9349 * tests/atlocal.in (CXX): New.
9350 * tests/testsuite.at (AT_COMPILE_CXX): New.
9351 * tests/calc.at (_AT_DATA_CALC_Y): Adjust yyerror to report the
9352 locations in a more synthetic way.
9353 (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF is positive if
9355 Adjust the C locations to match those from Emacs: first column is
9357 Change all the expected results.
9358 Conform to the GCS: simplify the locations when applicable.
9359 (LOC, VAL, YYLLOC_FORMAL, YYLLOC_ARG, USE_YYLLOC, LEX_FORMALS)
9360 (LEX_ARGS, USE_LEX_ARGS, LEX_PRE_FORMALS, LEX_PRE_ARGS): Replace
9361 these CPP macros with the m4 macros new defined by...
9362 (AT_CHECK_PUSHDEFS): this, i.e.:
9363 (AT_LALR1_CC_IF, AT_PURE_LEX_IF, AT_LOC, AT_VAL, AT_LEX_FORMALS)
9364 (AT_LEX_ARGS, AT_USE_LEX_ARGS, AT_LEX_PRE_FORMALS, AT_LEX_PRE_ARGS)
9366 (AT_CHECK_POPDEFS): Undefine them.
9367 (AT_CHECK_CALC_LALR1_CC): New.
9368 Use it for the first lalr1.cc test.
9370 2003-02-04 Akim Demaille <akim@epita.fr>
9372 * data/lalr1.cc (YYLLOC_DEFAULT): Fix its definition: be based on
9373 Location as is defined.
9375 2003-02-04 Akim Demaille <akim@epita.fr>
9377 * data/lalr1.cc: If YYDEBUG is not defined, don't depend upon
9378 name_ being defined.
9380 2003-02-03 Paul Eggert <eggert@twinsun.com>
9382 * src/gram.h (start_symbol): Remove unused decl.
9384 Use more-consistent naming conventions for local vars.
9386 * src/derives.c (derives_compute): Change type of local var from
9388 * src/gram.c (grammar_rules_partial_print): Likewise.
9389 * src/print.c (print_core): Likewise.
9390 * src/reduce.c (reduce_grammar_tables): Likewise.
9392 * src/gram.c (grammar_dump): Change name of item_number *
9393 local var from r to rp.
9394 * src/nullable.c (nullable_compute): Likewise.
9396 * src/gram.h (ISTOKEN, ISVAR): Use i, not s, for int var.
9398 * src/gram.h (symbol_number_as_item_number): Use sym, not s,
9399 for symbol or symbol_number var.
9400 * src/reader.c (grammar_start_symbol_set): Likewise.
9401 * src/reader.h (grammar_start_symbol_set, grammar_symbol_append):
9403 * src/state.c (transitions_to): Likewise.
9404 * src/state.h: Likewise.
9405 * src/tables.c (symbol_number_to_vector_number): Likewise.
9407 * src/muscle_tab.h (MUSCLE_OBSTACK_SGROW): Use p, not s, for
9410 * src/parse-gram.y (lloc_default): Use loc, not r, for YYLTYPE
9413 * src/scan-gram.l (no_cr_read): Use bytes_read, not s, for size
9416 * src/system.h (xstrndup, strchr, strspn, strnlen, memchr, memrchr):
9417 Use str, not s, for char * var. Use ch, not c, for character var.
9418 Use size for size var.
9420 * src/uniqstr.c (uniqstr_new, uniqstr_assert): Use str, not s, for
9422 (uniqstr_print, uniqst_print_processor): Use ustr, not s, for
9424 * src/uniqstr.h: Likewise.
9426 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
9427 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
9428 get_node_alignment_str, get_arrow_mode_str, get_crossing_type_str,
9429 get_view_str, get_linestyle_str, get_arrowstyle_str): Rename
9430 param to have same name as that of enum, so that we don't use
9431 "s" to stand for a non-state.
9433 2003-02-02 Akim Demaille <akim@epita.fr>
9435 * src/scan-skel.l: Scan more than one inert character per yylex
9438 2003-02-01 Paul Eggert <eggert@twinsun.com>
9442 * po/LINGUAS: Add ms.
9444 2003-01-30 Akim Demaille <akim@epita.fr>
9446 * doc/Makefile.am (CLEANFILES): Add bison.fns for distcheck.
9448 2003-01-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
9450 * tests/cxx-type.at: Correct apparent typo in Bison input: $$ instead
9453 Changes in response to error report by S. Eken: GLR mode does not
9454 handle negative $ indices or $ indices in embedded rules correctly.
9455 See <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00076.html>.
9457 * data/glr.c (b4_rhs_value): Change to use YYFILL macro.
9458 (b4_rhs_location): Ditto.
9459 (yyfill): New function to copy from stack tree into array
9461 (yyuserAction): Modify to allow incremental move of semantic values
9462 to rhs array when in GLR mode.
9463 Define YYFILL to use in user-defined actions to fill semantic array
9465 Remove dummy use of yystack, as there is now a guaranteed use.
9466 (yydoAction): Modify to allow incremental move of semantic values
9467 to rhs array when in GLR mode.
9468 (yyresolveAction): Ditto.
9469 (yyglrShiftDefer): Update comment.
9470 (yyresolveStates): Use X == NULL for pointers, not !X.
9471 (yyglrReduce): Ditto.
9474 * tests/glr-regr1.at: Rename to ...
9475 * tests/glr-regression.at: Add new regression test for the problems
9476 described above (adapted from S. Eken).
9477 Update copyright notice.
9478 * tests/testsuite.at: Rename glr-regr1.at to glr-regression.at.
9479 * tests/Makefile.am: Ditto.
9481 2003-01-28 Paul Eggert <eggert@twinsun.com>
9483 * data/lalr1.cc: Do not use @output_header_name@ unless
9484 b4_defines_flag is set. This fixes two bugs reported by
9486 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00071.html>
9487 and <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00073.html>.
9489 2003-01-21 Paul Eggert <eggert@twinsun.com>
9491 * data/yacc.c (YYERROR): Move code from yyerrlab1 to here, so that
9492 we don't need to worry about yyerrlab1 being reported as an
9493 "unused label" by non-GCC C compilers. The downside is that if
9494 locations are used then a couple of statements are duplicated each
9495 time YYERROR is invoked, but the upside is that the warnings
9497 (yyerrlab1): Move code to YERROR.
9498 (yyerrlab2): Remove. Change uses back to yyerrlab1.
9499 This reverts some of the 2002-12-27 change.
9501 2003-01-17 Paul Eggert <eggert@twinsun.com>
9503 * src/output.c (symbol_printers_output): Fix typo that led
9504 to core dump. Problem reported by Antonio Rus in
9505 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00058.html>.
9507 2003-01-13 Akim Demaille <akim@epita.fr>,
9508 Quoc Peyrot <chojin@lrde.epita.fr>,
9509 Robert Anisko <anisko_r@lrde.epita.fr>
9511 * data/lalr1.cc (parse::yyerrlab1): When popping the stack, stop
9512 when the stacks contain one element, as the loop would otherwise
9513 free the last state, and then use the top state (the one we just
9514 popped). This means that the initial elements will not be freed
9515 explicitly, as is the case in yacc.c; it is not a problem, as
9516 these elements have fake values.
9518 2003-01-11 Paul Eggert <eggert@twinsun.com>
9520 * NEWS: %expect-violations are now just warnings, reverting
9521 to Bison 1.30 and 1.75 behavior. This fixes the GCC 3.2
9522 bootstrapping problem reported by Matthias Klose; see
9523 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00053.html>.
9524 * src/conflicts.c (conflicts_print): Likewise.
9525 * tests/conflicts.at (%expect not enough, %expect too much,
9526 %expect with reduce conflicts): Likewise.
9527 * doc/bison.texinfo (Expect Decl): Document this. Also mention
9528 that the warning is enabled if the number of conflicts changes
9529 (not necessarily increases).
9531 * src/getargs.c (version): Update copyright year.
9533 2003-01-09 Akim Demaille <akim@epita.fr>
9535 * src/Makefile.am, lib/Makefile.am: Use $(VAR) instead of @VAR@.
9537 2003-01-08 Paul Eggert <eggert@twinsun.com>
9539 * Makefile.maint (WGETFLAGS):
9540 New macro, containing "-C off" to disable proxy caches.
9541 All uses of $(WGET) changed to $(WGET) $(WGETFLAGS).
9542 (rel-check): Use $(WGET) instead of wget.
9544 2003-01-06 Paul Eggert <eggert@twinsun.com>
9546 * doc/bison.texinfo (Generalized LR Parsing): Add a reference to
9547 the GLR paper of Scott, Johnstone and Hussain.
9549 2003-01-04 Paul Eggert <eggert@twinsun.com>
9551 * configure.ac (AC_ARG_ENABLE): Add --disable-yacc.
9552 (YACC_SCRIPT, YACC_LIBRARY): New vars to AC_SUBST.
9553 * lib/Makefile.am (lib_LIBRARIES): liby.a -> @YACC_LIBRARY@.
9554 (EXTRA_LIBRARIES): New var, for liby.a.
9555 * src/Makefile.am (bin_SCRIPTS): yacc -> @YACC_SCRIPT@.
9556 (EXTRA_SCRIPTS): New var, for yacc.
9558 * data/yacc.c (yyerrlab1): Omit attribute if __cplusplus is defined,
9559 since GNU C++ (as of 3.2.1) does not allow attributes on labels.
9560 Problem reported by Nelson H. F. Beebe.
9562 2003-01-03 Paul Eggert <eggert@twinsun.com>
9564 * lib/obstack.h (__INT_TO_PTR) [__STDC__]: Cast result to
9565 (void *) to avoid diagnostic with native c89 on SGI IRIX 6.5
9566 when compiling Bison 1.875's `bitset bset = obstack_alloc
9567 (bobstack, bytes);'. Problem reported by Nelson H. F. Beebe.
9569 * src/scan-skel.l (QPUTS): Omit redundant `;' from macro definition.
9570 ([^@\n]): Renamed from [^@\n]+ so that the token buffer does not
9571 grow to a huge size with typical invocation.
9573 * lib/hash.c (_Bool, bool, false, true, __bool_true_false_are_defined):
9574 Use the pattern recommended by Autoconf 2.57, except also protect
9575 against double-definition.
9576 * src/system.h: Likewise.
9577 Portability issues reported by Nelson H. F. Beebe.
9579 * data/glr.c (yybool): Renamed from bool, to avoid collisions in C.
9580 All uses changed. Provide a definition in both C and C++.
9581 (yytrue, yyfalse): Define even if defined (__cplusplus).
9583 * lib/bitset_stats.c (bitset_stats_list): Remove unused var.
9584 Reported by Nelson H. F. Beebe.
9586 * src/scan-skel.l ("@oline@"): Output lineno+1, not lineno.
9588 2003-01-02 Paul Eggert <eggert@twinsun.com>
9590 * data/yacc.c (yyerrlab1): Append `;' after attribute, to
9591 pacify the buggy "smart preprocessor" in MacOS 10.2.3.
9592 Bug reported by Nelson H. F. Beebe.
9594 2003-01-01 Paul Eggert <eggert@twinsun.com>
9598 2002-12-30 Paul Eggert <eggert@twinsun.com>
9600 * src/scan-gram.l (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>","):
9602 (<INITIAL>","): Here. This causes stray "," to be treated
9605 * src/scan-gram.l (<SC_BRACED_CODE>"}"): Output ";" before the
9606 last brace in braced code when not in Yacc mode, for compatibility
9607 with Bison 1.35. This resurrects the 2001-12-15 patch to
9610 * src/reader.h (YYDECL): Use YYSTYPE, not its deprecated alias
9611 yystype. This follows up the 2002-12-24 YYSTYPE bug fix.
9613 2002-12-28 Paul Eggert <eggert@twinsun.com>
9615 * src/symtab.c (symbol_make_alias): Set type of SYMVAL to be
9616 that of SYM's type. This fixes Debian bug 168069, reported by
9619 2002-12-28 Paul Eggert <eggert@twinsun.com>
9623 Switch back to the Yacc style of conflict reports, undoing some
9624 of the 2002-07-30 change.
9625 * doc/bison.texinfo (Understanding): Use Yacc style for
9626 conflict reports. Also, use new way of locating rules.
9627 * src/conflicts.c (conflict_report):
9628 Renamed from conflict_report_yacc, removing the old
9629 'conflict_report'. Translate the entire conflict report at once,
9630 so that we don't assume that "," has the same interpretation in
9632 (conflicts_output): Use Yacc-style conflict report for each state,
9633 instead of our more-complicated style.
9634 (conflicts_print): Use Yacc-style conflict report, except print
9635 the input file name when not emulating Yacc.
9636 * tests/conflicts.at (Unresolved SR Conflicts, Defaulted
9637 Conflicted Reduction, %expect not enough, %expect too much,
9638 %expect with reduce conflicts): Switch to Yacc-style conflict reports.
9639 * tests/existing.at (GNU Cim Grammar): Likewise.
9640 * tests/glr-regr1.at (Badly Collapsed GLR States): Likewise.
9642 * src/complain.c (warn_at, warn, complain_at, complain, fatal_at,
9643 fatal): Don't invoke fflush; it's not needed and it might even be
9644 harmful for stdout, as stdout might not be open.
9645 * src/reduce.c (reduce_print): Likewise.
9647 2002-12-27 Paul Eggert <eggert@twinsun.com>
9649 Fix a bug where error locations were not being recorded correctly.
9650 This problem was originally reported by Paul Hilfinger in
9651 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00086.html>.
9653 * data/yacc.c (yyparse): New local var yylerrsp, to record the
9654 top of the location stack's error locations.
9655 (yyerrlab): Set it. When discarding a token, push its location
9656 onto yylerrsp so that we don't lose track of the error's end.
9657 (yyerrlab1): Now is only the target of YYERROR, so that we can
9658 properly record the location of the action that failed. For GCC
9659 2.93 and later, insert an __attribute__ ((__unused__)) to avoid
9660 GCC warning about yyerrlab1 being unused if YYERROR is unused.
9661 (yyerrlab2): New label, which yyerrlab now falls through to.
9662 Compute the error's location by applying YYLLOC_DEFAULT to
9663 the locations of all the symbols that went into the error.
9664 * doc/bison.texinfo (Location Default Action): Mention that
9665 YYLLOC_DEFAULT is also invoked for syntax errors.
9666 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
9667 Error locations include the locations of all the tokens that were
9668 discarded, not just the last token.
9670 2002-12-26 Paul Eggert <eggert@twinsun.com>
9672 * src/files.c: Include quote.h.
9673 (compute_output_file_names): Warn if we detect conflicting
9674 outputs to the same file. This should catch the misunderstanding
9675 exemplified by Debian Bug 165349, reported by Bruce Stephens..
9677 * src/conflicts.c (conflicts_print): If the user specifies
9678 "%expect N", report an error if there are any reduce/reduce
9679 conflicts. This is what the manual says should happen.
9680 This fixes Debian bug 130890, reported by Anthony DeRobertis.
9681 * tests/conflicts.at (%expect with reduce conflicts): New test.
9683 Don't use m4_include on relative file names, as it doesn't work as
9684 desired if there happens to be a file with that name under ".".
9686 * m4sugar/version.m4: Remove; it was included but it wasn't used.
9687 * data/Makefile.am (dist_m4sugar_DATA): Remove m4sugar/version.m4.
9688 * data/m4sugar/m4sugar.m4: Don't include m4sugar/version.m4.
9689 * data/glr.c, data/lalr1.cc, data/yacc.c: Don't include c.m4.
9690 * src/output.c (output_skeleton): Use full path names when
9691 specifying a file to include; don't rely on include path, as
9692 it's unreliable when the working file contains a file with
9695 2002-12-25 Paul Eggert <eggert@twinsun.com>
9697 Remove obsolete references to bison.simple and bison.hairy.
9698 Problem mentioned by Aubin Mahe in
9699 <http://lists.gnu.org/archive/html/help-bison/2002-12/msg00010.html>.
9700 * data/glr.c: Comment fix.
9701 * doc/bison.1: Remove references. Also, mention "yacc".
9703 * src/getargs.c (getargs) [MSDOS]: Don't assume optarg != NULL
9706 * src/parse-gram.y (declaration): Use enum "report_states" rather
9707 than its numeric value 1.
9709 * src/scan-skel.l ("@output ".*\n): Close any old yyout before
9710 opening a new one. This fixes Debian bug 165349, reported by
9713 2002-12-24 Paul Eggert <eggert@twinsun.com>
9717 * Makefile.maint (cvs-update): Don't assume that the shell
9718 supports $(...), as Solaris sh doesn't.
9720 * src/parse-gram.y (lloc_default): Remove test for empty
9721 nonterminals at the end, since it didn't change the result.
9723 2002-12-24 Paul Eggert <eggert@twinsun.com>
9725 If the user does not define YYSTYPE as a macro, Bison now declares it
9726 using typedef instead of defining it as a macro. POSIX requires this.
9727 For consistency, YYLTYPE is also declared instead of defined.
9729 %union directives can now have a tag before the `{', e.g., the
9730 directive `%union foo {...}' now generates the C code
9731 `typedef union foo { ... } YYSTYPE;'; this is for Yacc compatibility.
9732 The default union tag is `YYSTYPE', for compatibility with Solaris 9
9733 Yacc. For consistency, YYLTYPE's struct tag is now `YYLTYPE'
9734 instead of `yyltype'.
9736 `yystype' and `yyltype' are now obsolescent macros instead of being
9737 typedefs or tags; they are no longer documented and will be
9738 withdrawn in a future release.
9740 * data/glr.c (b4_location_type): Remove.
9741 (YYSTYPE): Renamed from yystype.
9742 (YYSTYPE_IS_DECLARED): New macro, used to prevent double-typedef.
9743 (struct YYLTYPE): Renamed from struct yyltype.
9744 (YYLTYPE): Renamed from yyltype.
9745 (yyltype, yystype): New (and obsolescent) macros,
9746 for backward compatibility.
9747 * data/yacc.c: Likewise.
9749 * data/yacc.c (YYSTYPE): Declare as union YYSTYPE if the user
9750 does not specify a union tag. This is for compatibility with
9753 * src/parse-gram.y (add_param): 2nd arg is now char * not char
9754 const *, since it is now modified by stripping surrounding { }.
9755 (current_braced_code): Remove.
9756 (PERCENT_DESTRUCTOR, PERCENT_PRINTER, PERCENT_UNION,
9757 PERCENT_LEX_PARAM, PERCENT_PARSE_PARAM): Change names to include
9758 trailing " {...}". Now of type <chars>.
9759 (grammar_declaration): Adjust to bundled tokens.
9760 (code_content): Remove; stripping is now done by add_param.
9761 (print_token_value): Print contents of bundled tokens.
9762 (token_name): New function.
9764 * src/reader.h (braced_code, current_braced_code): Remove.
9765 (token_name): New decl.
9767 * src/scan-gram.l (handle_dollar, handle_at): Now takes int
9768 token_type, not braced_code code_kind. All uses changed.
9769 (SC_PRE_CODE): New state, for scanning after a keyword that
9770 has (or usually has) an immediately-following braced code.
9771 (token_type): New local var, to keep track of which token type
9772 to return when scanning braced code.
9773 (<INITIAL>"%destructor", <INITIAL>"%lex-param",
9774 <INITIAL>"%parse-param", <INITIAL>"%printer",
9775 <INITIAL>"%union"): Set token type and BEGIN SC_PRE_CODE
9776 instead of returning a token type immediately.
9777 (<INITIAL>"{"): Set token type.
9778 (<SC_BRACED_CODE>"}"): Use it.
9779 (handle_action_dollar, handle_action_at): Now returns bool
9780 indicating success. Fail if ! current_rule; this prevents a core dump.
9781 (handle_symbol_code_dollar, handle_symbol_code_at):
9782 Remove; merge body into caller.
9783 (handle_dollar, handle_at): Complain in invalid contexts.
9785 * NEWS, doc/bison.texinfo: Document the above.
9786 * NEWS: Fix years and program names in copyright notice.
9788 2002-12-17 Paul Eggert <eggert@twinsun.com>
9790 * NEWS, doc/bison.texinfo (Parser Function, Pure Calling, Error
9791 Reporting, Table of Symbols): Omit mentions of %lex-param and
9792 %parse-param from the documentation for now.
9794 2002-12-15 Paul Eggert <eggert@twinsun.com>
9796 Undo most of the 2002-11-12 yychar -> yytoken patch, as it broke
9797 GCC 3.2.1 (which depends on yychar == YYEMPTY when there is no
9798 lookahead symbol, and which sets yychar in parser actions) and it
9799 disagreed with the Bison documentation. Bug
9800 reported by Andrew Walrond.
9802 * data/yacc.c (YYTRANSLATE): Don't check for negative argument,
9803 as the caller now does that.
9804 (yyclearin, YYBACKUP, yyparse): Use yychar, not yytoken.
9805 (YYEMPTY): Parenthesize right hand side, since others use it.
9806 (yyparse): Don't assume that our generated code is the only code
9809 2002-12-13 Paul Eggert <eggert@twinsun.com>
9813 POSIX requires a "yacc" command.
9814 * src/Makefile.am (bin_SCRIPTS): New macro, for yacc.
9815 (MOSTLYCLEANFILES): Add yacc.
9817 * doc/bison.texinfo (Invocation, Bison Options): Mention yacc
9818 as an alias for bison y.
9820 * po/LINGUAS: Add da.
9822 * src/getargs.c (__GNU_LIBRARY__) [lint]: Define to work around
9823 problem with latest <getopt.h>.
9824 (HACK_FOR___GNU_LIBRARY___PROTOTYPE): New macro.
9826 * doc/fdl.texi: Upgrade to 1.2.
9827 * lib/alloca.c, lib/error.c, lib/getopt.c, lib/getopt.h
9828 lib/getopt1.c, lib/gettext.h, lib/memrchr.c, lib/obstack.c,
9829 lib/obstack.h, lib/strnlen.c, lib/unlocked-io.h: Sync with
9831 * config/install-sh: Sync with autotools.
9833 Fix a bad interaction with flex 2.5.23 reported by Bruce Lilly in
9834 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
9835 * data/yacc.c (YYLTYPE, struct yyltype): Do not define unless
9836 locations are requested.
9837 (union yyalloc): Do not depend on YYLTYPE_IS_TRIVIAL unless
9838 locations are requested.
9840 2002-12-12 Paul Eggert <eggert@twinsun.com>
9842 Remove unportable casts and storage allocation tricks.
9843 While we're at it, remove almost all casts, since they
9844 usually aren't needed and are a sign of trouble.
9846 * configure.ac (AC_CHECK_TYPES): Check for uintptr_t.
9848 * src/derives.c (derives_compute): Do not subtract NTOKENS from
9849 the pointer DSET returned by malloc; this isn't portable.
9850 Instead, always use DSET[i - NTOKENS] rather than DSET[i].
9851 Similarly for DERIVES.
9852 * src/lalr.c (set_goto_map): Likewise, for GOTO_MAP and TEMP_MAP.
9853 * src/nullable.c (nullable_compute): Likewise, for RSETS and NULLABLE.
9854 * src/reduce.c (reduce_grammar_tables): Likewise, for nontermmap
9856 * src/derives.c (derives_compute): Do not bother invoking
9857 int_of_rule_number, since rule numbers are integers.
9859 * src/files.c (concat2, tr, compute_base_name): Use xmalloc (N)
9860 rather than XMALLOC (char, N).
9862 * src/files.c (filename_split): Rewrite to avoid cast.
9864 * src/gram.h (symbol_number_as_item_number,
9865 item_number_as_symbol_number, rule_number_as_item_number,
9866 item_number_as_rule_number):
9867 Now inline functions rather than macros, to avoid casts.
9868 * src/state.h (state_number_as_int): Likewise.
9869 * src/tables.c (state_number_to_vector_number,
9870 symbol_number_to_vector_number): Likewise.
9872 * src/gram.h (int_of_rule_number): Remove; no longer used.
9874 * src/lalr.c (add_lookback_edge): Use malloc rather than calloc,
9875 since the resulting storage is always stored into.
9877 * src/main.c (alloca) [C_ALLOCA]: Add decl here, the only place
9880 * src/muscle_tab.c (muscle_m4_output):
9881 Now inline. Return bool, not int.
9882 * src/state.c (state_compare): Likewise.
9883 * src/symtab.c (symbol_check_defined,
9884 symbol_check_alias_consistency, symbol_pack, symbol_translation,
9885 hash_compare_symbol, hash_symbol):
9887 * src/uniqstr.c (uniqstr_print): Likewise.
9888 * src/muscle_tab.c (muscle_m4_output_processor):
9889 New function, to avoid casts.
9890 * src/state.c (state_comparator, stage_hasher): Likewise.
9891 * src/symtab.c (symbol_check_defined_processor,
9892 symbol_check_alias_consistency_processor, symbol_pack_processor,
9893 symbol_translation_processor, hash_symbol_comparator,
9894 hash_symbol_hasher): Likewise.
9895 * src/uniqstr.c (uniqstr_print_processor): Likewise.
9896 * src/muscle_tab.c (muscles_m4_output):
9897 Use new functions instead of casting old functions unportably.
9898 * src/state.c (state_hash_new): Likewise.
9899 * src/symtab.c (symbols_new, symbols_do, symbols_check_defined,
9900 symbols_token_translations_init):
9902 * src/uniqstr.c (uniqstrs_new, hash_initialize, uniqstrs_do): Likewise.
9904 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): Use long local
9905 var instead of casting to long, to avoid casts.
9906 (prepare_states): Use MALLOC rather than alloca, so that we don't
9907 have to worry about alloca.
9908 * src/state.c (state_hash_lookup): Likewise.
9910 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>"'"): Use unsigned char
9911 local var instead of casting to unsigned char, to avoid casts.
9913 * src/state.c (TRANSITIONS_ALLOC, ERRS_ALLOC, REDUCTIONS_ALLOC,
9914 STATE_ALLOC): Remove.
9915 (transitions_new, errs_new, reductions_new, state_new): Use malloc
9916 rather than calloc, and use offsetof to avoid allocating slightly
9918 (state_new): Initialize all members.
9920 * src/state.c (state_hash): Use unsigned accumulator, not signed.
9922 * src/symtab.c (symbol_free): Remove; unused.
9923 (symbol_get): Remove cast in lhs of assignment.
9924 (symbols_do): Now static. Accept generic arguments, not
9925 hashing-related ones.
9927 * src/symtab.h: (NUMBER_UNDEFINED): Remove unnecessary cast.
9928 (symbol_processor): Remove.
9929 (symbols_do): Remove decl; now static.
9931 * src/system.h (alloca): Remove; decl no longer needed.
9932 (<stddef.h>): Include, for offsetof.
9933 (<inttypes.>, <stdint.h>): Include if available.
9934 (uintptr_t): New type, if system lacks it.
9935 (CALLOC, MALLOC, REALLOC): New macros.
9936 All uses of XCALLOC, XMALLOC, and XREALLOC changed to use these
9939 * src/tables.c (table_size): Now int, to pacify GCC.
9940 (table_grow, table_ninf_remap): Use signed table size.
9941 (save_row): Don't bother initializing locals when not needed.
9942 (default_goto, goto_actions, pack_vector): Remove unnecessary casts.
9943 * src/uniqstr.c (hash_compare_uniqstr): Likewise.
9945 * src/vcg.h: Correct misspellings.
9947 * src/vcg_defaults.h (G_CMAX): Now INT_MAX.
9950 * src/getargs.c (getargs): Don't assume EOF == -1.
9952 2002-12-09 Paul Eggert <eggert@twinsun.com>
9954 Change identifier spellings to avoid collisions with names
9955 that are reserved by POSIX.
9957 Don't use names ending in _t, since POSIX reserves them.
9958 For consistency, remove _e and _s endings -- they're weren't
9959 needed to remove ambiguity. All uses changed.
9960 * src/uniqstr.h (uniqstr): Renamed from uniqstr_t, which in
9961 turn was just renamed from struniq_t.
9962 * src/uniqstr.c (uniqstr_processor): Renamed from struniq_processor,
9963 which in turn was just renamed from struniq_processor_t.
9964 (hash_compare_uniqstr): Renamed from hash_compare_struniq, which
9965 in turn was renamed from hash_compare_struniq_t.
9966 * src/LR0.c (struct state_list): Renamed from struct state_list_s.
9967 (state_list): Renamed from state_list_t.
9968 * src/assoc.h (assoc): Renamed from assoc_t.
9969 * src/conflicts.c (enum conflict_resolution): Renamed from
9970 enum conflict_resolution_e.
9971 * src/derives.c (struct rule_list): Renamed from struct rule_list_s.
9972 (rule_list): Renamed from rule_list_t.
9973 * src/getargs.h (enum trace): Renamed from enum trace_e.
9974 (enum report): Renamed from enum report_e.
9975 * src/gram.h (item_number): Renamed from item_number_t.
9976 (rule_number): Renamed from rule_number_t.
9977 (struct rule_s): Remove the "rule_s" part; not used.
9978 (rule): Renamed from rule_t.
9979 (rule_filter): Renamed from rule_filter_t.
9980 * src/lalr.c (struct goto_list): Renamed from struct goto_list_s.
9981 (goto_list): Renamed from goto_list_t.
9982 * src/lalr.h (goto_number): Renamed from goto_number_t.
9983 * src/location.h (location): Renamed from location_t.
9984 * src/muscle_tab.c (muscle_entry): Renamed from muscle_entry_t,
9985 and moved here from:
9986 * src/muscle_tab.h (muscle_entry_t): here.
9987 * src/nullable.c (struct rule_list): Renamed from struct rule_list_s.
9988 (rule_list): Renamed from rule_list_t.
9989 * src/print_graph.c (static_graph): Renamed from graph.
9990 * src/reader.h (braced_code): Renamed from braced_code_t.
9991 Remove brace_code_e tag.
9992 * src/relation.h (relation_node): Renamed from relation_node_t.
9993 (relation_nodes): Renamed from relation_nodes_t.
9994 (relation): Renamed from relation_t.
9995 * src/state.h (state_number): Renamed from state_number_t.
9996 (struct state): Renamed from struct state_s.
9997 (state): Renamed from state_t.
9998 (transitions): Renamed from transitions_t. Unused (and
9999 misspelled) transtion_s tag removed.
10000 (errs): Renamed from errs_t. Unused errs_s tag removed.
10001 (reductions): Renamed from reductions_t. Unused tag
10002 reductions_s removed.
10003 * src/symlist.h (symbol_list): Renamed from symbol_list_t.
10004 (struct symbol_list): Renamed from struct symbol_list_s.
10005 * src/symtab.h (symbol_number): Renamed from symbol_number_t.
10006 (struct symbol): Renamed from struct symbol_s.
10007 (symbol): Renamed from symbol_t.
10008 * src/tables.c (vector_number): Renamed from vector_number_t.
10009 (action_number): Renamed from action_t.
10010 * src/tables.h (base_number): Renamed from base_t.
10011 * src/vcg.h (enum color): Renamed from enum color_e.
10012 (enum textmode): Renamed from enum textmode_e.
10013 (enum shape): Renamed from enum shape_e.
10014 (struct colorentry): Renamed from struct colorentry_s.
10015 (struct classname): Renamed from struct classname_s.
10016 (struct infoname): Renamed from struct infoname_s.
10017 (enum layoutalgorithm): Renamed from enum layoutalgorithm_e.
10018 (enum decision): Renamed from enum decision_e.
10019 (enum orientation): Renamed from enum orientation_e.
10020 (enum alignment): Renamed from enum alignment_e.
10021 (enum arrow_mode): Renamed from enum arrow_mode_e.
10022 (enum crossing_type): Renamed from enum crossing_type_e.
10023 (enum view): Renamed from enum view_e.
10024 (struct node): Renamed from struct node_s.
10025 (node): Renamed from node_t.
10026 (enum linestyle): Renamed from enum linestyle_e.
10027 (enum arrowstyle): Renamed from enum arrowstyle_e.
10028 (struct edge): Renamed from struct edge.
10029 (edge): Renamed from edge_t.
10030 (struct graph): Renamed from struct graph_s.
10031 (graph): Renamed from graph_t.
10032 * tests/calc.at (_AT_DATA_CALC_Y, Simple LALR Calculator):
10033 Rename value_t -> value.
10034 * tests/input.at (Torturing the Scanner): Rename value_t -> value,
10035 value_t_as_yystype -> value_as_yystype.
10037 Don't include <errno.h> in the mainstream code, since it
10038 reserves E[A-Z0-9]* and we want to use symbols like 'EQUALS'.
10039 * lib/get-errno.c, lib/get-errno.h: New files.
10040 * lib/Makefile.am (libbison_a_SOURCES): Add get-errno.h,
10042 * src/files.c (xfopen, xfclose): Use get_errno instead of errno.
10043 * src/output.c (output_skeleton): Likewise.
10044 * src/scan-gram.l (<INITIAL>{int}): Use set_errno and get_errno
10046 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>\\x[0-9abcdefABCDEF]+):
10048 (handle_action_dollar, handle_action_at): Likewise.
10049 * src/system.h: Do not include <errno.h>.
10050 (TAB_EXT): Renamed from EXT_TAB.
10051 (OUTPUT_EXT): Renamed from EXT_OUTPUT.
10053 Avoid str[a-z]*, since <string.h> reserves that name space.
10054 Change all instances of "struniq" in names to "uniqstr", and
10055 likewise for "STRUNIQ" and "UNIQSTR".
10056 * src/uniqstr.c: Renamed from src/struniq.c.
10057 * src/uniqstr.h: Renamed from src/struniq.h.
10058 * src/Makefile.am (bison_SOURCES): Adjust to these renamings.
10059 * src/files.c (strsuffix): Remove; unused.
10060 (concat2): Renamed from stringappend. Now static.
10061 * src/files.h (strsuffix, stringappend): Remove; unused.
10062 * src/parse-gram.y (<chars>): Renamed from <string>.
10063 (<uniqstr>): Renamed from <struniq>.
10064 * src/scan-gram.l (obstack_for_string): Renamed from string_obstack.
10065 * src/vcg.h (struct node_s.expand): Renamed from struct node_s.stretch.
10066 (struct graph_s.expand): Renamed from struct graph_s.stretch.
10067 * src/vcg_defaults.h (G_EXPAND): Renamed from G_STRETCH.
10068 (G_LONG_STRAIGHT_PHASE): Renamed from G_STRAIGHT_PHASE.
10069 (N_EXPAND): Renamed from N_STRETCH.
10071 Avoid *_MAX and *_MIN, since <limits.h> reserves that name space.
10072 * data/yacc.c (YYSTACK_GAP_MAXIMUM): Renamed from YYSTACK_GAP_MAX.
10073 * src/gram.h (ITEM_NUMBER_MAX, ITEM_NUMBER_MIN, RULE_NUMBER_MAX):
10075 * src/lalr.h (GOTO_NUMBER_MAXIMUM): Renamed from GOTO_NUMBER_MAX.
10076 * src/state.h (STATE_NUMBER_MAXIMUM): Renamed from STATE_NUMBER_MAX.
10077 * src/symtab.h (SYMBOL_NUMBER_MAXIMUM): Renamed from SYMBOL_NUMBER_MAX.
10078 * src/tables.c (VECTOR_NUMBER_MAX, VECTOR_NUMBER_MIN): Remove; unused.
10079 (BASE_MAXIMUM): Renamed from BASE_MAX.
10080 (BASE_MINIMUM): Renamed from BASE_MIN.
10081 (ACTION_MAX): Remove; unused.
10082 (ACTION_NUMBER_MINIMUM): Renamed from ACTION_MIN.
10083 Unnecessary casts removed from above defines.
10086 Fix misspelling in names.
10087 * src/vcg.h (enum_alignment_e): Renamed from enum_alignement_e.
10088 * src/vcg_defaults.h (G_NODE_ALIGNMENT): Renamed from
10092 * lib/timevar.c (timevar_report): Renamed from time_report,
10093 for consistency with other names.
10094 * lib/timevar.h (timevar_report): New decl.
10095 * src/system.h (time_report): Remove; decl is now in lib/timevar.h.
10098 Sort include-file uses.
10100 Reorder all include files under src to be in the order "system.h".
10101 then the ../lib include files in angle brackets (alphabetized),
10102 then the . include files in double-quotes (alphabetized). Fix
10103 dependency breakages encountered in this process, as follows:
10104 * src/closure.h, src/derives.h, src/state.h: Include "gram.h".
10105 * src/complain.c: Don't include stdlib.h, string.h _LIBC stuff.
10106 * src/state.h: Include "symtab.h".
10108 2002-12-08 Paul Eggert <eggert@twinsun.com>
10110 * data/glr.c, data/lalr1.cc, data/yacc.c: Do not use __file__,
10111 since this causes problems when __file__ contains character
10112 sequences like "@" that are treated specially by src/scan-skel.l.
10113 Instead, just use the file's basename. This fixes the bug
10114 reported by Martin Mokrejs in
10115 <http://lists.gnu.org/archive/html/bug-bison/2002-12/msg00007.html>.
10117 2002-12-06 Paul Eggert <eggert@twinsun.com>
10119 Add support for rules that do not have trailing semicolons, as
10120 POSIX requires. Improve the quality of locations in Bison
10123 * src/location.c: Include <quotearg.h>.
10124 (empty_location): Now const.
10125 (location_print): New function. Follow the recommendation of the
10126 GNU Coding Standards for locations that span file boundaries.
10127 * src/location.h: Do not include <quotearg.h>; no longer needed.
10128 (boundary): New type.
10129 (location_t): Use it. This allows locations to span file boundaries.
10130 All member uses changed: file -> start.file or end.file (as needed),
10131 first_line -> start.line, first_column -> start.column,
10132 last_line -> end.line, last_column -> end.column.
10133 (equal_boundaries): New function.
10134 (LOCATION_RESET, LOCATION_STEP): Remove.
10135 (LOCATION_PRINT): Remove. All callers changed to use location_print.
10136 (empty_location): Now const.
10137 (location_print): New decl.
10138 * src/parse-gram.y (lloc_default): New function, which handles
10139 empty locations more accurately.
10140 (YYLLOC_DEFAULT): Use it.
10141 (%token COLON): Remove.
10142 (%token ID_COLON): New token.
10144 (declarations, rules): Remove trailing semicolon.
10145 (declaration, rules_or_grammar_declaration):
10146 Allow empty (";") declaration.
10147 (symbol_def): Remove empty actions; no longer needed.
10148 (rules_or_grammar_declaration): Remove trailing semicolon.
10149 (semi_colon.opt): Remove.
10150 * src/reader.h: Include location.h.
10151 (scanner_cursor): New decl.
10152 * src/reduce.c (nonterminals_reduce): Use warn_at rather than
10154 * src/scan-gram.l (YY_USER_INIT): Initialize scanner_cursor instead
10156 (STEP): Remove. No longer needed, now that adjust_location does
10157 the work. All uses removed.
10158 (scanner_cursor): New var.
10159 (adjust_location): Renamed from extend_location. It now sets
10160 *loc and adjusts the scanner cursor. All uses changed.
10161 Don't bother testing for CR.
10162 (handle_syncline): Remove location arg; now updates scanner cursor.
10163 All callers changed.
10164 (unexpected_end_of_file): Now accepts start boundary of token or
10165 comment, not location. All callers changed. Update scanner cursor,
10167 (SC_AFTER_IDENTIFIER): New state.
10168 (context_state): Renamed from c_context. All uses changed.
10169 (id_loc, code_start, token_start): New local vars.
10170 (<INITIAL,SC_AFTER_IDENTIFIER>): New initial context. Move all
10171 processing of Yacc white space and equivalents here.
10172 (<INITIAL>{id}): Save id_loc. Begin state SC_AFTER_IDENTIFIER
10173 instead of returning ID immediately, since we need to search for
10174 a subsequent colon.
10175 (<INITIAL>"'", "\""): Save token_start.
10176 (<INITIAL>"%{", "{", "%%"): Save code_start.
10177 (<SC_AFTER_IDENTIFIER>): New state, looking for a colon.
10178 (<SC_YACC_COMMENT>, <SC_COMMENT>, <SC_LINE_COMMENT>):
10179 BEGIN context_state at end, not INITIAL.
10180 (<SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'",
10181 <SC_BRACED_CODE>"}", <SC_PROLOGUE>"%}", <SC_EPILOGUE><<EOF>>):
10182 Return correct token start.
10183 (<SC_BRACED_CODE,SC_PROLOGUE,SC_EPILOGUE>): Save start boundary when
10184 the start of a character, string or multiline comment is found.
10185 * tests/conflicts.at (S/R in initial, Defaulted Conflicted
10186 Reduction): Adjust reported locations to match the more-precise
10187 results now expected.
10188 * tests/input.at (Invalid $n, Invalid @n, Type Clashes): Likewise.
10189 * tests/reduce.at (Useless Rules, Reduced Automaton,
10190 Underivable Rules): Likewise.
10191 * tests/regression.at (Invalid inputs): No longer `expecting ";"
10192 or "|"' now that so many other tokens are allowed by the new grammar.
10194 * src/complain.h (current_file): Remove duplicate decl;
10195 current_file is now owned by files.h.
10196 * src/complain.c, src/scan-gram.l: Include files.h.
10198 2002-12-06 Paul Eggert <eggert@twinsun.com>
10200 * data/glr.c (yy_reduce_print): Don't assume that yyrline[yyrule]
10201 promotes to int; it might be unsigned int.
10202 * data/yacc.c (yy_reduce_print): Likewise.
10204 * doc/bison.texinfo (Table of Symbols): YYERROR_VERBOSE should
10205 be #defined in the prologue, not in the Bison declarations.
10206 This fixes Debian Bug 102878, reported by Shaul Karl.
10208 2002-12-02 Paul Eggert <eggert@twinsun.com>
10210 * configure.ac (AC_REPLACE_FUNCS): Add strtoul.
10211 * lib/strtoul.c: New file, from gnulib.
10212 This fixes a porting bug reported by Peter Klein in
10213 <http://lists.gnu.org/archive/html/bug-bison/2002-12/msg00000.html>.
10215 2002-11-30 Paul Eggert <eggert@twinsun.com>
10217 * src/scan-gram.l (no_cr_read, extend_location): Move to epilogue,
10218 and put only a forward declaration in the prologue. This is for
10219 consistency with the other scanner helper functions.
10221 Type clashes now generate warnings, not errors, since it
10222 appears that POSIX may allow some grammars with type clashes.
10223 * src/reader.c (grammar_current_rule_check): Warn about
10224 type clashes instead of complaining.
10225 * tests/input.at (Type Clashes): Expect warnings, not complaints.
10227 Add Yacc library, since POSIX requires it.
10228 * doc/bison.texinfo (Yacc Library): New node. Regenerate top menu.
10229 * lib/Makefile.am (lib_LIBRARIES, liby_a_SOURCES): New macros.
10230 * lib/main.c, lib/yyerror.c: New files.
10232 gram_error can be static; it need not be extern.
10233 * src/reader.h (gram_error): Remove decl.
10234 * src/parse-gram.y (gram_error): Now static. Add static decl.
10235 (print_token_value): Omit parameter names from forward decl,
10238 2002-11-29 Paul Eggert <eggert@twinsun.com>
10240 * doc/bison.texinfo: Emphasize that yylex and yyerror must
10241 be declared before being used. E.g., one should typically
10242 declare them in the prologue. Use GNU coding style in examples.
10243 Put "const" consistently after the type it modifies. Mention
10244 that C99 supports "inline". Mention that yyerror traditionally
10247 %parse-param and %lex-param now take just one argument, the
10248 declaration; the argument name is deduced from the declaration.
10250 * doc/bison.texinfo (Parser Function, Pure Calling, Error
10251 Reporting, Table of Symbols): Document this.
10252 * src/parse-gram.y (add_param): New function.
10254 (declaration): Implement new rule for %parse-param and %lex-param.
10255 * src/scan-gram.l: "," now elicits a warning, rather than being
10256 a token; this is more compatible with byacc.
10257 * tests/calc.at (Simple LALR Calculator): Adopt new convention.
10259 2002-11-27 Paul Eggert <eggert@twinsun.com>
10261 Rename identifiers to avoid real and potential collisions.
10263 * data/c.m4 (b4_yysymprint_generate): yyout -> yyoutput,
10264 to avoid collision with lex macro described by Bruce Lilly in
10265 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
10266 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
10267 * doc/bison.texinfo (Prologue, Tracing): yyprint -> print_token_value.
10268 * src/parse-gram.y (print_token_value): Renamed from yyprint.
10270 (YYPARSE_PARAM, YYLEX_PARAM, yycontrol): Remove. All uses changed.
10271 The name "yycontrol" violates the name space rules, and this stuff
10272 wasn't being used anyway.
10273 (input): Remove action; this stuff wasn't being used.
10274 (gram_error): Rename local variable yylloc -> loc.
10275 * src/reader.h (struct gram_control_s, gram_control_t): Remove.
10276 (YY_DECL): Don't use "yy" at start of local variables.
10277 All uses changed, e.g., yylloc -> loc.
10278 * src/scan-gram.l (STEP): Renamed from YY_STEP. All uses changed.
10279 (STRING_GROW): Renamed from YY_OBS_GROW. All uses changed.
10280 (STRING_FINISH): Renamed from YY_OBS_FINISH. All uses changed.
10281 (STRING_FREE): Renamed from YY_OBS_FREE. All uses changed.
10283 * src/parse-gram.y (gram_error): loc is now const *.
10284 * src/reader.h (gram_error): Likewise.
10286 2002-11-24 Paul Eggert <eggert@twinsun.com>
10290 * tests/actions.at (Actions after errors): Use an output format
10291 more similar to that of the Printers and Destructors test.
10292 Test the position of the ';' token too.
10293 (Printers and Destructors): Likewise.
10294 (Printers and Destructors: %glr-parser): Remove for now, to avoid
10295 unnecessarily alarming people when the test fails.
10297 * data/yacc.c (yyerrlab1): Move this label down, so that the
10298 parser does not discard the lookahead token if the user code
10299 invokes YYERROR. This change is required for POSIX conformance.
10301 * lib/error.c: Sync with gnulib.
10303 2002-11-22 Paul Eggert <eggert@twinsun.com>
10305 * lib/quotearg.c, lib/quotearg.h: Sync with gnulib.
10306 * lib/mbswidth.c, lib/mbswidth.h: Likewise.
10307 * lib/xmalloc.c: Likewise.
10309 2002-11-20 Paul Eggert <eggert@twinsun.com>
10311 * lib/argmatch.c, lib/argmatch.h: Sync with gnulib.
10313 2002-11-20 Paul Eggert <eggert@twinsun.com>
10315 Avoid use of <assert.h>, as the GNU Coding Standards hint that one
10316 should use `if (! x) abort ();' rather than `assert (x);', and
10317 anyway it's one less thing to worry about configuring.
10319 * data/glr.c, lib/hash.c, src/system.h: Do not include <assert.h>.
10320 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise,
10321 and replace all instances of assert with abort.
10322 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
10323 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Likewise.
10325 * data/glr.c (yydoAction, yyglrReduce, yysplitStack, yyresolveStates,
10326 yyresolveAction, yyprocessOneStack): Use abort rather than assert.
10327 * lib/hash.c (hash_lookup, hash_get_first, hash_get_next,
10328 hash_find_entry, hash_rehash, hash_insert): Likewise.
10329 * src/conflicts.c (resolve_sr_conflict): Likewise.
10330 * src/lalr.c (set_goto_map, map_goto): Likewise.
10331 * src/nullable.c (nullable_compute): Likewise.
10332 * src/output.c (prepare_rules, token_definitions_output): Likewise.
10333 * src/reader.c (packgram, reader): Likewise.
10334 * src/state.c (state_new, state_free, state_transitions_set,
10335 state_reduction_find): Likewise.
10336 * src/symtab.c (symbol_user_token_number_set, symbol_make_alias,
10337 symbol_pack): Likewise.
10338 * src/tables.c (conflict_row, pack_vector): Likewise.
10339 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
10340 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
10341 get_node_alignement_str, get_arrow_mode_str, get_crossing_type_str,
10342 get_view_str, get_linestyle_str, get_arrowstyle_str): Likewise.
10344 * lib/argmatch.h (ARRAY_CARDINALITY): Do not bother to #undef.
10345 (ARGMATCH_CONSTRAINT): New macro.
10346 (ARGMATCH_ASSERT): Use it.
10348 * src/system.h (verify): New macro.
10349 * src/getargs.c (trace_argmatch, report_argmatch): Use verify
10350 rather than assert.
10351 * src/tables.c (tables_generate): Likewise.
10353 * src/struniq.c (struniq_assert): Now returns void, and aborts
10354 if the assertion is false.
10355 (struniq_assert_p): Remove.
10356 * src/struniq.h: Likewise.
10358 2002-11-18 Paul Eggert <eggert@twinsun.com>
10360 * data/glr.c (yygetLRActions): Replace `yyindex' with
10361 `yytable[yyindex]' to fix typo introduced in my 2002-11-09 patch.
10362 This fixes the regression with Sun ONE Studio 7 cc that I reported in
10363 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00077.html>.
10365 2002-11-18 Akim Demaille <akim@epita.fr>
10367 * doc/bison.texinfo (Tracing): `yyprint' shouldn't prepend a
10369 From Tim Van Holder.
10371 2002-11-17 Paul Eggert <eggert@twinsun.com>
10373 Pacify Sun ONE Studio 7 lint. Also, rename "ParseError"
10374 to "SyntaxError" for consistency with my 2002-11-15 change.
10376 * data/glr.c (YYDPRINTF, YYDSYMPRINT, YYDSYMPRINTF) [!YYDEBUG]: Do
10377 not define to {}, since this breaks the common use of `YYDPRINTF
10378 ((...));' if a single statement is desired (e.g. before `else').
10379 Work around GCC warnings by surrounding corresponding calls with
10381 (yyhasResolvedValue): Remove unused function.
10382 (yymergeOptionSets, yyresolvStack): Use `continue;' for empty
10384 (yyreportSyntaxError): Renamed from yyreportParseError.
10385 (yyrecoverSyntaxError): Renamed from yyrecoverParseError.
10387 * tests/calc.at (_AT_DATA_CALC_Y): Make vars static instead of
10388 extern when possible. Remove unused initializations.
10390 2002-11-16 Akim Demaille <akim@epita.fr>
10392 Augment the similarity between GLR and LALR traces.
10394 * data/yacc.c (yy_stack_print, YY_STACK_PRINT, yy_reduce_print)
10395 (YY_REDUCE_PRINT): New.
10396 (yyparse): Use them.
10397 * data/glr.c (yy_reduce_print): Use YYFPRINTF, no need for
10399 (yyglrReduce, yyrecoverParseError, yyparse): Don't report the
10400 state reached after the reduction/recovery, since...
10401 (yyparse, yyprocessOneStack): Report the state we are entering in.
10403 2002-11-16 Akim Demaille <akim@epita.fr>
10405 * src/getargs.h, src/getargs.c (trace_e, trace_args, trace_types):
10406 Add support for --trace=skeleton.
10407 * src/scan-skel.l: %option debug.
10408 Scan strings of non-@ or \n instead of character by character.
10409 (scan_skel): Handle trace_skeleton.
10411 (@output_parser_name@, @output_header_name@): ``Restore'' their
10412 support (used to be M4 macros).
10413 * data/yacc.c: Quote larger chunks, a la glr.c.
10414 * data/lalr1.cc: Likewise.
10415 The header guards are no longer available, so use some other
10416 string than `YYLSP_NEEDED'.
10418 2002-11-16 Akim Demaille <akim@epita.fr>
10420 Make the ``Printers and Destructors'' test more verbose, taking
10421 `yacc.c''s behavior as (possibly wrong) reference.
10423 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use printf
10424 instead of fprint on stdout.
10425 Set and report the last_line of the symbols.
10426 Consistently display values and locations.
10428 2002-11-16 Paul Eggert <eggert@twinsun.com>
10430 * data/yacc.c: Avoid over-quoting of __line__ and __file__.
10432 2002-11-15 Paul Eggert <eggert@twinsun.com>
10434 * tests/actions.at (Actions after errors): New test case.
10436 * data/glr.c, data/lalr1.cc, data/yacc.cc, doc/bison.texinfo,
10437 src/conflicts.c, src/parse-gram.y, src/tables.c, src/tables.h,
10438 tests/action.at, tests/calc.at, tests/conflicts.at,
10439 tests/cxx-type.at, tests/regression.at:
10440 "parse error" -> "syntax error" for POSIX compatibility.
10441 "parsing stack overflow..." -> "parser stack overflow" so
10442 that code matches Bison documentation.
10444 2002-11-15 Akim Demaille <akim@epita.fr>
10446 * src/parse-gram.y (declaration): Have %parse-param and %lex-param
10447 take two BRACED_CODE, not two string_content.
10448 Free the scanner's obstack when we are done.
10449 (code_content): New.
10450 * tests/calc.at: Adjust.
10451 * doc/bison.texinfo: Adjust.
10452 Also, make sure to include the `,' for these declarations.
10454 2002-11-15 Tim Van Holder <tim.van.holder@pandora.be>
10456 * m4/prereq.m4: Removed the commented jm_PREREQ_HASH
10457 definition; avoids potential autoreconf problems.
10459 2002-11-15 Akim Demaille <akim@epita.fr>
10461 Always check the value returned by yyparse.
10463 * tests/calc.at (_AT_DATA_CALC_Y): Have `main' exit with the value
10464 returned by yyparse.
10465 (_AT_CHECK_CALC_ERROR): Take the expected exit value as argument.
10467 * tests/glr-regr1.at (glr-regr1.y): Have `main' exit with the value
10468 returned by yyparse.
10470 2002-11-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
10472 * data/glr.c (yyFail): Always set yyerrflag. Corrects regression
10475 2002-11-14 Paul Eggert <eggert@twinsun.com>
10477 * src/output.c (output_skeleton): Call xfopen instead of
10478 duplicating xfopen's body.
10480 Fix bugs reported by Nelson H. F. Beebe in
10481 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00078.html>.
10483 * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that
10484 "$CC -E foo.h" is allowed, as this doesn't work with the Portland
10485 Group compiler. Instead, use "$CC -E bar.c". Include the .h
10486 file twice in the grammar, as an extra check.
10488 * tests/input.at (Torturing the Scanner): Surround the
10489 backslash-newline tests with "#if 0", to make it less likely that
10490 we'll run into compiler bugs. Bring back solitary \ inside
10491 comment, but add a closing comment to work around HP C bug. Don't
10492 test backslash-newline in C character constant.
10494 2002-11-14 Akim Demaille <akim@epita.fr>
10496 * tests/synclines.at (AT_SYNCLINES_COMPILE): Ignore the exit
10497 status of the compiler.
10498 Calling `exit 1' is no longer needed.
10499 Reported by Nelson H. F. Beebe.
10501 2002-11-14 Akim Demaille <akim@epita.fr>
10503 * tests/atlocal.in (CPPFLAGS): We have config.h.
10504 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR):
10506 * tests/actions.at, tests/calc.at, tests/conflicts.at,
10507 * tests/cxx-type.at, tests/glr-regr1.at, tests/headers.at,
10508 * tests/regression.at, tests/torture.at: Use them for all the
10509 grammars that are to be compiled.
10510 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Rename as...
10511 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): this.
10512 * doc/bison.texinfo (GLR Parsers): Document `inline'.
10514 2002-11-14 Akim Demaille <akim@epita.fr>
10516 * doc/bison.texinfo: Various formatting changes (alignments in
10517 samples, additional @group/@end group, GCS in samples.
10518 Use @deffn instead of simple @table to define the directives,
10519 macros, variables etc.
10521 2002-11-13 Paul Eggert <eggert@twinsun.com>
10523 Fix some bugs reported by Albert Chin-A-Young in
10524 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00066.html>.
10526 * tests/input.at (Torturing the Scanner): Don't invoke "cc a.c b.c
10527 -o c"; the HP C compiler chatters during compilation.
10528 Instead, invoke "cc -c a.c -o a.o; cc -c b.c -o b.o; cc a.o b.o -o c".
10529 * tests/headers.at (export YYLTYPE): Likewise.
10531 * tests/input.at (Torturing the Scanner): Remove lines containing
10532 solitary backslashes, as they tickle a bug in the HP C compiler.
10534 * tests/glr-regr1.at (Badly Collapsed GLR States): Avoid //
10535 comments, since they're not portable. Use GNU coding style.
10537 2002-11-13 Akim Demaille <akim@epita.fr>
10539 * data/yacc.c: Leave bigger chunks of quoted text.
10540 (YYDSYMPRINTF): New.
10541 Use it to report symbol activities.
10542 * data/glr.c (YYDSYMPRINTF): New.
10545 2002-11-12 Paul Eggert <eggert@twinsun.com>
10549 * data/glr.c (yydoAction): Return YYRESULTTAG, not int.
10550 (yyglrReduce): Return yyok, not 0.
10551 This should avoid the enumerated-type warnings reported
10552 by Nelson H. F. Beebe in
10553 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00057.html>.
10555 * lib/bbitset.h (BITSET_INLINE): Remove.
10556 * lib/bitset.h [! BITSET_INLINE]: Remove.
10557 (bitset_set, bitset_reset, bitset_test): Rename local vars
10558 to avoid shadowing warnings by GCC.
10560 * data/glr.c (inline): Remove #define. It's the user's
10561 responsibility to #define it away, just like 'const'.
10562 This fixes one of the bugs reported by Nelson H. F. Beebe in
10563 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00058.html>.
10565 * Makefile.maint (po-check): Scan .l and .y files instead of the
10566 .c and the .h files that they generate. This fixes the bug
10567 reported by Tim Van Holder in:
10568 <http://lists.gnu.org/archive/html/bison-patches/2002-11/msg00062.html>
10569 Look for N_ as well as for _. Try to avoid matching #define for
10571 * po/POTFILES.in: Remove src/parse-gram.c, src/scan-gram.c,
10572 src/system.h. Add src/parse-gram.y, src/scan-gram.l.
10573 * src/scan-gram.l: Revamp regular expressions so that " and '
10574 do not confuse xgettext.
10576 * src/struniq.h (struniq_new): Do not declare the return type
10577 to be 'const'; this violates the C standard.
10578 * src/struniq.c (struniq_new): Likewise.
10580 2002-11-12 Albert Chin-A-Young <china@thewrittenword.com>
10582 * src/Makefile.am (LDADD): Link $(LIBINTL) last to avoid the
10583 duplicate definition of optind on Tru64 UNIX 4.0D with the Compaq
10586 2002-11-12 Akim Demaille <akim@epita.fr>
10588 * Makefile.maint: Sync with Autoconf:
10589 (local_updates): New.
10591 2002-11-12 Akim Demaille <akim@epita.fr>
10593 * po/POTFILES.in (src/lalr.c, src/state.c): Remove
10595 2002-11-12 Akim Demaille <akim@epita.fr>
10597 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Display the
10600 2002-11-12 Akim Demaille <akim@epita.fr>
10602 * data/c.m4 (b4_yysymprint_generate): Pass *yyvaluep to YYPRINT,
10605 2002-11-12 Akim Demaille <akim@epita.fr>
10607 * tests/actions.at (AT_CHECK_PRINTER_AND_DESTRUCTOR): New.
10608 Use it to test the GLR parser.
10610 2002-11-12 Akim Demaille <akim@epita.fr>
10612 * tests/regression.at (input.y): s/YYEOF/MYEOF/, as the skeleton
10614 * data/glr.c (yystos): New.
10615 (b4_yysymprint_generate, b4_yydestruct_generate): Invoke.
10616 (YYDSYMPRINT): New.
10617 (yyval): Don't define it, it is handled via M4.
10618 (yyrecoverParseError): Free verbosely the discarded symbols.
10619 * data/yacc.c (yysymprint): Remove, rather...
10620 (b4_yysymprint_generate): invoke.
10621 * data/c.m4 (b4_yysymprint_generate): New.
10622 Accept pointers as arguments, as opposed to the version from
10624 (b4_yydestruct_generate): Likewise.
10625 * tests/cations.at (Printers and Destructors): Use Bison directives
10626 instead of CPP macros.
10627 Don't rely on internal details.
10629 2002-11-12 Akim Demaille <akim@epita.fr>
10631 * data/c.m4 (b4_yydestruct_generate, b4_symbol_actions): New.
10632 * data/yacc.c: Rename yychar1 as yytoken, as in glr.c.
10633 Don't work on yychar (i.e., do set it to YYEMPTY, don't match
10634 it against YYEMPTY and so forth), work on yytoken (i.e., set
10635 it to YYEMPTY etc.).
10636 (yydestruct): Replace with a b4_yydestruct_generate invocation.
10637 (b4_symbol_actions): Remove.
10638 * data/glr.c (YYTRANSLATE): As for yacc.c, if negative, it stands
10639 for 0, end-of-input.
10641 2002-11-12 Akim Demaille <akim@epita.fr>
10643 * doc/bison.texinfo (Destructor Decl): New.
10645 2002-11-12 Akim Demaille <akim@epita.fr>
10647 * src/tables.c (tables_generate): Use free for pointers that
10648 cannot be NULL, not XFREE.
10649 (pack_vector): Use assert, not fatal, for bound violations.
10650 * src/state.c (state_new): Likewise.
10651 * src/reader.c (reader): Likewise.
10652 * src/lalr.c (set_goto_map): Likewise.
10653 * src/location.h (LOCATION_PRINT): If first_line is 0, just issue
10656 2002-11-12 Akim Demaille <akim@epita.fr>
10658 * src/scan-gram.l, src/reader.h (scanner_last_string_free):
10660 * src/scan-gram.l (last_string): Is global to the file, not to
10662 * src/parse-gram.y (input): Don't append the epilogue here,
10663 (epilogue.opt): do it here, and free the scanner's obstack.
10664 * src/reader.c (epilogue_set): Rename as...
10665 (epilogue_augment): this.
10666 * data/c.m4 (b4_epilogue): Defaults to empty.
10668 2002-11-12 Akim Demaille <akim@epita.fr>
10670 * src/getargs.c (long_options): Remove duplicates.
10671 * src/vmsgetargs.c, src/build.com, src/bison.cld, src/vmshlp.mar:
10673 * doc/bison.rnh: Remove.
10674 * doc/bison.texinfo (VMS Invocation): Remove.
10676 2002-11-12 Akim Demaille <akim@epita.fr>
10678 * src/struniq.h, src/struniq.c (struniq_t): Is const.
10679 (STRUNIQ_EQ, struniq_assert, struniq_assert_p): New.
10681 Use struniq for symbols.
10683 * src/symtab.h (symbol_t): The tag member is a struniq.
10684 (symbol_type_set): Adjust.
10685 * src/symtab.c (symbol_new): Takes a struniq.
10686 (symbol_free): Don't free the tag member.
10687 (hash_compare_symbol_t, hash_symbol_t): Rename as...
10688 (hash_compare_symbol, hash_symbol): these.
10689 Use the fact that tags as struniqs.
10690 (symbol_get): Use struniq_new.
10691 * src/symlist.h, src/symlist.c (symbol_list_n_type_name_get):
10693 * src/reader.h (merger_list, grammar_currentmerge_set): The name
10694 and type members are struniqs.
10695 * src/reader.c (get_merge_function)
10696 (grammar_current_rule_merge_set): Adjust.
10697 (TYPE, current_type): Are struniq.
10699 Use struniq for file names.
10701 * src/files.h, src/files.c (infile): Split into...
10702 (grammar_file, current_file): these.
10703 * src/scan-gram.c (YY_USER_INIT, handle_syncline): Adjust.
10704 * src/reduce.c (reduce_print): Likewise.
10705 * src/getargs.c (getargs): Likewise.
10706 * src/complain.h, src/complain.c: Likewise.
10707 * src/main.c (main): Call struniqs_new early enough to use it for
10709 Don't free the input file name.
10711 2002-11-12 Akim Demaille <akim@epita.fr>
10713 * src/symtab.c (symbol_free): Remove dead deactivated code:
10714 type_name are properly removed.
10715 Don't use XFREE to free items that cannot be NULL.
10716 * src/struniq.h, src/struniq.c: New.
10717 * src/main.c (main): Initialize/free struniqs.
10718 * src/parse-gram.y (%union): Add astruniq member.
10720 * src/scan-gram.l (<{tag}>): Return a struniq.
10721 Free the obstack bit that used to store it.
10722 * src/symtab.h (symbol_t): The 'type_name' member is a struniq.
10724 2002-11-11 Paul Eggert <eggert@twinsun.com>
10726 Revamp to fix many (but not all) of the C- and M4-related quoting
10727 problems. Among other things, this fixes the Bison bug reported
10728 by Jan Hubicka when processing the Bash grammar; see:
10729 <http://lists.gnu.org/archive/html/bison-patches/2002-11/msg00039.html>
10731 Use new @ escapes consistently. Represent brackets with @{ and @}
10732 rather than @<:@ and @:>@, since this works a bit better with dumb
10733 editors like vi. Represent @ with @@, since @ is now consistently
10734 an escape. Use @oline@ and @ofile@ rather than __oline__ and
10735 __ofile__, to avoid unexpected expansions. Similarly, use @output
10736 rather than #output.
10738 * data/c.m4 (b4_copyright): Omit file name from comment, since
10739 the file name could contain "*/".
10740 (b4_synclines_flag): Don't quote the 2nd argument; it should already
10741 be quoted. All uses changed.
10743 * data/glr.c: Use new @ escapes consistently.
10744 (b4_input_suffix, b4_output_parser_suffix, b4_output_parser_name,
10745 b4_output_header_suffix, b4_output_header_name, b4_header_guard):
10746 Remove, since they couldn't handle arbitrary characters in file
10748 * data/lalr1.cc: Likewise.
10749 * data/yacc.c: Likewise.
10751 * src/files.c (output_infix): Remove; all uses removed.
10752 * src/files.h: Likewise.
10754 * data/glr.c: Remove use of "#ifdef b4_header_guard", since it
10755 mishandled funny characters in file names, and anyway it isn't
10757 * data/yacc.c: Likewise.
10758 * data/lalr1.cc: Use YYSLP_NEEDED instead of b4_header_guard.
10760 * data/glr.c (YYSTYPE_IS_TRIVIAL): Define when the .h file would.
10761 * data/yacc.c: Likewise.
10763 * src/muscle_tab.c: Include quotearg.h, since we need to quote C
10765 (muscle_init): Quote filename as a C string.
10766 * src/muscle_tab.h (MUSCLE_GROW_STRING_PAIR): Remove; unused.
10767 (MUSCLE_OBSTACK_SGROW, MUSCLE_INSERT_C_STRING): New macros.
10768 * src/output.c (escaped_file_name_output): New function.
10769 (prepare_symbols): Quote tokens for M4.
10770 (prepare): Don't insert output_infix, output_prefix,
10771 output_parser_name, output_header_name; this is now down by scan-skel.
10772 Insert skeleton as a C string.
10774 * src/output.c (user_actions_output, symbol_destructors_output,
10775 symbol_printers_output): Quote filenames for C and M4.
10776 * src/reader.c (prologue_augment, epilogue_set): Likewise.
10778 * src/scan-gram.l (<SC_CHARACTER>): Don't worry about any backslash
10779 escapes other than \\ and \'; this simplifies the code.
10780 (<SC_STRING>): Likewise, for \\ and \".
10781 (<SC_COMMENT,SC_LINE_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,
10782 SC_PROLOGUE,SC_EPILOGUE>): Escape $ and @, too.
10783 Use new escapes @{ and @} for [ and ].
10785 * src/scan-skel.l (yylineno, yyoutname): Remove static vars, replacing
10786 them with auto vars.
10787 Switch to new escape scheme, where @ is the escape character uniformly.
10788 Abort if a stray escape character is found. Avoid unbounded input
10789 buffer when parsing non-escaped text.
10791 * tests/input.at (Torturing the Scanner): Add tests that @oline@,
10792 __oline__, #output, $@, and @{ do not have unintended meanings.
10794 2002-11-09 Paul Eggert <eggert@twinsun.com>
10796 Fix the test failure due to GCC warnings described in
10797 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00000.html>.
10798 * data/glr.c (yyis_pact_ninf, yyis_table_ninf): New macros, which
10799 evaluate to 0 if it's impossible for NINF to be in the respective
10801 (yygetLRActions, yyrecoverParseError): Use them.
10803 * src/scan-gram.l (unexpected_end_of_file): Fix bug: columns were
10804 counted in the token inserted at end of file. Now takes
10805 location_t *, not location_t, so that the location can be
10806 adjusted. All uses changed.
10808 * tests/regression.at (Invalid inputs): Adjust wording in
10809 diagnostic to match the new behavior.
10811 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR,
10812 AT_DATA_HORIZONTAL_GRAMMAR, AT_DATA_LOOKAHEADS_GRAMMAR,
10813 AT_DATA_STACK_TORTURE): Replace `assert (x);' with `if (! (x))
10814 abort ();'. This reduces the runtime of the "Many lookaheads"
10815 test from 27.6 to 2.7 minutes on a 440 MHz Ultrasparc III running
10818 2002-11-07 Paul Eggert <eggert@twinsun.com>
10820 * src/parse-gram.y (CHARACTER): Remove unused token.
10823 * src/scan-gram.l: Remove stack option. We no longer use the
10824 stack, since the stack was never deeper than 1; instead, use the
10825 new auto var c_context to record the stacked value.
10827 Remove nounput option. At an unexpected end of file, we now unput
10828 the minimal input necessary to end cleanly; this simplifies the
10831 Avoid unbounded token sizes where this is easy.
10833 (unexpected_end_of_file): New function.
10834 Use it to systematize the error message on unexpected EOF.
10835 (last-string): Now auto, not static.
10836 (YY_OBS_FREE): Remove unnecessary do while (0) wrapper.
10837 (scanner_last_string_free): Remove; not used.
10838 (percent_percent_count): Move decl to just before use.
10839 (SC_ESCAPED_CHARACTER): Return ID at unexpected end of file,
10840 not the (never otherwised-used) CHARACTER.
10842 2002-11-07 Akim Demaille <akim@epita.fr>
10844 Let yyerror always receive the msg as last argument, so that
10845 yyerror can be variadic.
10847 * data/yacc.c (b4_yyerror_args): New.
10848 Use it when calling yyerror.
10849 * data/glr.c (b4_yyerror_args, b4_lyyerror_args): New.
10850 Use it when calling yyerror.
10851 * doc/bison.texinfo (Error Reporting): Adjust.
10852 * tests/calc.at (_AT_DATA_CALC_Y): Adjust.
10853 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Adjust.
10855 2002-11-06 Akim Demaille <akim@epita.fr>
10857 #line should have quoted strings.
10858 Ideally, this should be done by m4_quotearg.
10860 * src/scan-skel.l: Include quotearg.h.
10862 * src/output.c (symbol_printers_output)
10863 (symbol_destructors_output): Quote the file name.
10865 2002-11-06 Akim Demaille <akim@epita.fr>
10867 * tests/regression.at (Invalid inputs): Adjust to the recent
10870 2002-11-06 Akim Demaille <akim@epita.fr>
10872 Restore --no-lines.
10873 Reported by Jim Kent.
10875 * data/c.m4 (b4_syncline): New.
10876 * data/glr.c, data/yacc.c, data/lalr1.cc: Use it.
10877 * src/reader.c (prologue_augment, epilogue_set): Use b4_syncline.
10878 * src/output.c (user_actions_output): Likewise.
10879 (prepare): Define 'b4_synclines_flag'.
10880 * src/muscle_tab.c (muscle_init): Don't define b4_linef.
10882 2002-11-06 Akim Demaille <akim@epita.fr>
10884 * src/main.c (main): Free `infile'.
10885 * src/scan-gram.l (handle_syncline): New.
10887 * src/output.c (user_actions_output, symbol_destructors_output)
10888 (symbol_printers_output): Use the location's file name, not
10890 * src/reader.c (prologue_augment, epilogue_set): Likewise.
10892 2002-11-05 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
10894 * src/tables.c (matching_state): Don't allow states to match if
10895 either has GLR conflict entries.
10897 2002-11-05 Paul Eggert <eggert@twinsun.com>
10899 * src/scan-gram.l: Use more accurate diagnostics, e.g.
10900 "integer out of range" rather than "invalid value".
10901 * tests/input.at (Invalid $n, Invalid @n): Change expected wording
10904 Scan <% and %> digraphs in C code as POSIX 1003.1-2001 requires.
10905 Also, remove one static variable in the scanner.
10907 * src/scan-gram.l (braces_level): Now auto, not static.
10908 Initialize to zero if the compiler is being picky.
10909 (INITIAL): Clear braces_level instead of incrementing it.
10910 (SC_BRACED_CODE): Treat <% and %> as { and } when inside C code,
10911 as POSIX 1003.1-2001 requires.
10912 * src/system.h (IF_LINT): New macro, taken from coreutils.
10913 * configure.ac: Define "lint" if --enable-gcc-warnings.
10915 2002-11-05 Akim Demaille <akim@epita.fr>
10917 * src/scan-gram.l: When it starts with `%', complain about the
10918 whole directive, not just that `invalid character: %'.
10920 2002-11-04 Akim Demaille <akim@epita.fr>
10922 * Makefile.maint: Update from Autoconf.
10923 (update, cvs-update, po-update, do-po-update): New.
10925 2002-11-04 Akim Demaille <akim@epita.fr>
10927 * tests/glr-regr1.at (Badly Collapsed GLR States): Prototype yylex
10929 Have yyerror `use' its arguments.
10930 * tests/calc.at (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF
10931 returns true when location & yacc & pure & parse-param.
10932 (_AT_DATA_CALC_Y): Let yyerror ``use'' its arguments.
10934 2002-11-04 Akim Demaille <akim@epita.fr>
10936 * src/location.h (LOCATION_PRINT): Use quotearg slot 3 to avoid
10938 * src/scan-gram.l: Use [\'] instead of ['] to pacify
10941 Use quote, not quote_n since LOCATION_PRINT no longer uses the
10944 2002-11-03 Paul Eggert <eggert@twinsun.com>
10946 * src/reader.c (get_merge_function, grammar_current_rule_check):
10947 Use consistent diagnostics for reporting type name clashes.
10948 Quote the types with <>, for consistency with Yacc.
10949 * tests/input.at (Type Clashes): Adjust to diagnostic changes.
10951 2002-11-03 Akim Demaille <akim@epita.fr>
10953 * data/c.m4 (b4_identification, b4_user_args, b4_parse_param):
10955 * data/yacc.m4 (b4_pure_args, b4_Pure_args): New.
10956 (b4_parse_param): Remove.
10957 Use b4_identification.
10958 Propagate b4_pure_args where needed to pass them to yyerror.
10959 * data/glr.m4 (b4_parse_param): Remove.
10960 (b4_user_formals, b4_pure_args, b4_pure_formals, b4_lpure_args)
10961 (b4_lpure_formals): New.
10962 Use b4_identification.
10963 (YY_USER_FORMALS, YY_USER_ARGS): Remove, replaced by
10964 b4_user_formals and b4_user_args.
10965 (yyexpandGLRStack, yyFail, yyaddDeferredAction, yyglrShiftDefer)
10966 (yyreportAmbiguity): When using a pure parser, also need
10967 the location, and the parse-params.
10969 (yyuserAction, yyglrShift, yyreportParseError, yyrecoverParseError):
10970 When using a pure parser, also need the parse-params.
10972 * tests/calc.at: Test pure (%pure-parser) and absolutely pure
10973 (%pure-parser + %parse-param) LALR and GLR parsers.
10974 (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): New, define AT_PARAM_IF,
10975 AT_LOCATION_IF, AT_PURE_IF, AT_GLR_IF, AAT_PURE_AND_LOC_IF,
10976 AT_GLR_OR_PARAM_IF, AT_YYERROR_ARG_LOC_IF, AT_YYERROR_SEES_LOC_IF.
10977 (_AT_DATA_CALC_Y): Equip for purity of yyerror.
10978 (_AT_CHECK_CALC_ERROR): Use AT_YYERROR_SEES_LOC_IF.
10979 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Equip for yyerror purity.
10980 * doc/bison.texinfo: Untabify the whole file.
10981 (Parser Function): Document %parse-param, deprecate YYPARSE_PARAM.
10982 (Pure Calling): Document %lex-param, deprecate YYLEX_PARAM.
10983 (Error Reporting): Adjust to these new directives.
10984 Document %error-verbose, deprecate YYERROR_VERBOSE.
10986 2002-11-03 Akim Demaille <akim@epita.fr>
10988 * tests/calc.at: Change all the AT_CHECK_CALC_LALR and
10989 AT_CHECK_CALC_GLR invocations to use % directives, instead of
10990 command line options.
10991 * tests/cxx-type.at: Formatting changes.
10993 2002-11-03 Paul Eggert <eggert@twinsun.com>
10995 * src/scan-gram.l: Revamp to fix POSIX incompatibilities,
10996 to count columns correctly, and to check for invalid inputs.
10998 Use mbsnwidth to count columns correctly. Account for tabs, too.
10999 Include mbswidth.h.
11000 (YY_USER_ACTION): Invoke extend_location rather than LOCATION_COLUMNS.
11001 (extend_location): New function.
11002 (YY_LINES): Remove.
11004 Handle CRLF in C code rather than in Lex code.
11005 (YY_INPUT): New macro.
11006 (no_cr_read): New function.
11008 Scan UCNs, even though we don't fully handle them yet.
11009 (convert_ucn_to_byte): New function.
11011 Handle backslash-newline correctly in C code.
11012 (SC_LINE_COMMENT, SC_YACC_COMMENT): New states.
11013 (eols, blanks): Remove. YY_USER_ACTION now counts newlines etc.;
11015 (tag, splice): New EREs. Do not allow NUL or newline in tags.
11016 Use {splice} wherever C allows backslash-newline.
11017 YY_STEP after space, newline, vertical-tab.
11018 ("/*"): BEGIN SC_YACC_COMMENT, not yy_push_state (SC_COMMENT).
11020 (letter, id): Don't assume ASCII; e.g., spell out a-z.
11022 ({int}, handle_action_dollar, handle_action_at): Check for integer
11025 (YY_STEP): Omit trailing semicolon, so that it's more like C.
11027 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>): Allow \0 and \00
11028 as well as \000. Check for UCHAR_MAX, not 255.
11029 Allow \x with an arbitrary positive number of digits, as in C.
11030 Check for overflow here.
11031 Allow \? and UCNs, for compatibility with C.
11033 (handle_symbol_code_dollar): Use quote_n slot 1 to avoid collision
11034 with quote slot used by complain_at.
11036 * tests/input.at: Add tests for backslash-newline, m4 quotes
11037 in symbols, long literals, and funny escapes in strings.
11039 * configure.ac (jm_PREREQ_MBSWIDTH): Add.
11040 * lib/Makefile.am (libbison_a_SOURCES): Add mbswidth.h, mbswidth.c.
11041 * lib/mbswidth.h, lib/mbswidth.c: New files, from GNU gettext.
11042 * m4/Makefile.am (EXTRA_DIST): Add mbswidth.m4.
11043 * m4/mbswidth.m4: New file, from GNU coreutils.
11045 * doc/bison.texinfo (Grammar Outline): Document // comments.
11046 (Symbols): Document that trigraphs have no special meaning in Bison,
11047 nor is backslash-newline allowed.
11048 (Actions): Document that trigraphs have no special meaning.
11050 * src/location.h (LOCATION_COLUMNS, LOCATION_LINES): Remove;
11053 2002-11-02 Paul Eggert <eggert@twinsun.com>
11055 * src/reader.c: Don't include quote.h; not needed.
11056 (get_merge_function): Reword warning to be consistent with
11057 type clash diagnostic in grammar_current_rule_check.
11059 * lib/quotearg.c (quotearg_buffer_restyled): Fix off-by-two
11060 bug in trigraph handling.
11062 * src/output.c (prepare_symbols): When printing token names,
11063 escape "[" as "@<:@" and likewise for "]".
11065 * src/system.h (errno): Remove declaration, as we are now
11066 assuming C89 or better, and C89 guarantees errno.
11068 2002-10-30 Paul Eggert <eggert@twinsun.com>
11070 * lib/bitset_stats.c (bitset_stats_read, bitset_stats_write):
11071 Check for close failures.
11072 * src/files.h (xfclose): Return void, not int, since it always
11074 * src/files.c (xfclose): Likewise. Report I/O error if ferror
11076 * src/output.c (output_skeleton): Use xfclose rather than fclose
11077 and ferror. xfclose now checks ferror.
11079 * data/glr.c (YYLEFTMOST_STATE): Remove.
11080 (yyreportTree): Use a stack-based leftmost state. This avoids
11081 our continuing battles with bogus warnings about initializers.
11083 2002-10-30 Akim Demaille <akim@epita.fr>
11085 * src/system.h: Don't use #ifdef/#ifndef on HAVE_ values, only
11088 2002-10-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
11090 * tests/glr-regr1.at: New test for reported regressions.
11091 * tests/testsuite.at: Add glr-regr1.at test.
11092 * tests/Makefile.am: Add glr-regr1.at test.
11094 2002-10-24 Paul Eggert <eggert@twinsun.com>
11098 * tests/calc.at (_AT_DATA_CALC_Y): Remove unused strcat declaration.
11099 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Include stdlib.h, since
11100 we use malloc. Don't assume 'A' through 'Z' are contiguous.
11101 Don't assume strdup exists; POSIX says its an XSI extension.
11102 Check for buffer overflow on input.
11104 2002-10-24 Akim Demaille <akim@epita.fr>
11106 * src/output.c (output_skeleton): Don't disable M4sugar comments
11107 too soon: it results in comments being expanded.
11108 * data/yacc.c, data/glr.c, data/lalr1.cc: Do it right before the
11111 2002-10-24 Akim Demaille <akim@epita.fr>
11113 * data/yacc.c (m4_int_type): New.
11114 * data/c.m4 (m4_int_type): Don't use yysigned_char, but `signed
11115 char' as only yacc.c wants K&R portability.
11116 * data/glr.c (yysigned_char): Remove.
11117 * data/lalr1.cc: Rename the trailing b4_name as b4_parser_class_name.
11118 Reported by Quoc Peyrot.
11120 2002-10-23 Paul Eggert <eggert@twinsun.com>
11122 * src/main.c (main): With --trace=time, report times even if a
11123 non-fatal error occurs. Formerly, the times were reported in some
11124 such cases but not in others.
11125 * src/reader.c (reader): Just return if a complaint has been issued,
11126 instead of exiting, so that 'main' can report times.
11128 2002-10-22 Akim Demaille <akim@epita.fr>
11130 * src/system.h: Include sys/types.
11131 Reported by Bert Deknuydt.
11133 2002-10-23 Paul Eggert <eggert@twinsun.com>
11135 * configure.ac (AC_PROG_LEX): Use instead of AM_PROG_LEX.
11136 Suggested by Art Haas.
11138 2002-10-22 Paul Eggert <eggert@twinsun.com>
11140 * src/complain.c (exit) [! (STDC_HEADERS || _LIBC)]: Remove exit
11141 decl; not needed any more.
11142 * src/main.c (main): Use return to exit, undoing yesterday's change.
11143 The last OS that we could find where this wouldn't work is
11144 SunOS 3.5, and that's too old to worry about now.
11146 * data/glr.c (struct yyltype): Define members even when not
11147 doing locations. This is more consistent with yacc.c, and it
11148 works around the following bug reports:
11149 http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00106.html
11150 http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00111.html
11152 * doc/bison.texinfo: Minor spelling and typographical fixes. Use
11153 @acronym consistently. Standardize on "Yacc" instead of "YACC",
11154 "Algol" instead of "ALGOL". Give a bit more history about BNF.
11156 2002-10-22 Akim Demaille <akim@epita.fr>
11158 * data/README: New.
11160 2002-10-21 Paul Eggert <eggert@twinsun.com>
11162 Be consistent about 'bool'; the old code used an enum in one
11163 module and an int in another, and this violates the C standard.
11164 * m4/stdbool.m4: New file, from coreutils 4.5.3.
11165 * configure.ac (AC_HEADER_STDBOOL): Add.
11166 * m4/Makefile.am (EXTRA_DIST): Add stdbool.m4.
11167 * src/muscle_tab.c (hash_compare_muscles): (a ? FALSE : TRUE) -> (! a)
11168 * src/symtab.c (hash_compare_symbol_t): Likewise.
11169 * src/system.h (bool, false, true): Use a definition consistent
11170 with ../lib/hash.c. All uses changed.
11172 * src/complain.c (warning_issued): Renamed from warn_message_count,
11173 so that we needn't worry about integer overflow (!).
11174 Now of type bool. All uses changed.
11175 (complaint_issued): Renamed from complain_message_count; likewise.
11177 * src/main.c (main): Use exit to exit with failure.
11179 * src/complain.c (fatal_at, fatal): Use EXIT_FAILURE and EXIT_SUCCESS
11180 rather than 1 and 0.
11181 * src/main.c (main): Likewise.
11182 * src/getargs.c (getargs): Likewise.
11183 * src/reader.c (reader): Likewise.
11185 * src/getarg.c (getargs): Remove duplicate code for
11186 "Try `bison --help'".
11188 * src/files.c (xfopen, xfclose): Use EXIT_FAILURE rather than 2.
11189 What was that "2" for?
11191 * src/complain.h (fatal, fatal_at): Add __attribute__((__noreturn__)).
11192 * src/getargs.c (usage): Likewise.
11194 * src/getargs.c (getargs): When there are too few operands, report
11195 the last one. When there are too many, report the first extra
11196 one. This is how diffutils does it.
11198 2002-10-20 Paul Eggert <eggert@twinsun.com>
11200 Remove K&R vestiges.
11201 * configure.ac (AC_C_CONST, AM_C_PROTOTYPES): Remove.
11202 * src/complain.c (VA_START): Remove. Assume prototypes.
11203 (vfprintf) [! (HAVE_VPRINTF || defined vfprintf)]: New macro.
11204 (private_strerror, warn_at, warn, complain_at, complain, fatal_at,
11205 fatal): Assume prototypes.
11206 * src/complain.h: Assume prototypes.
11207 * src/system.h (PARAMS): Remove.
11208 Include <limits.h> unconditionally, since it's guaranteeed even
11209 for a freestanding C89 compiler.
11210 (SHRT_MIN, SHRT_MAX): Remove, since C89 guarantees them.
11211 * src/vmsgetargs.c (getargs, cli_present, cli_get_value): Prototype.
11213 2002-10-20 Akim Demaille <akim@epita.fr>
11215 * src/muscle_tab.c (muscle_grow): Remove trailing debugging code.
11216 * data/glr.c (YY_USER_FORMALS, YY_USER_ARGS): New.
11217 (yyuserAction, yydoAction, yyglrReduce, yyresolveValue)
11218 (yyresolveStates, yyresolveAction, yyresolveStack)
11219 (yyprocessOneStack): Use them.
11220 (yy_reduce_print): New.
11221 * tests/calc.at (_AT_DATA_CALC_Y): Exercise %parse-param.
11223 2002-10-20 Akim Demaille <akim@epita.fr>
11225 * data/c.m4 (b4_c_ansi_args): Recognize functions with no
11226 arguments and output `void'.
11227 (b4_c_function): Rename as...
11228 (b4_c_function_def): this.
11229 (b4_c_function_decl, b4_c_ansi_function_def)
11230 (b4_c_ansi_function_decl): New.
11231 Change the interpretation of the arguments: before `int, foo', now
11233 * data/yacc.c (yyparse): Prototype and define thanks to these.
11234 Adjust b4_c_function_def uses.
11235 * data/glr.c (yyparse): Likewise, but ANSI only.
11237 2002-10-20 Akim Demaille <akim@epita.fr>
11239 * src/output.c (prepare): Move the definition of `tokens_number',
11240 `nterms_number', `undef_token_number', `user_token_number_max'
11242 (prepare_tokens): Here.
11243 (prepare_tokens): Rename as...
11244 (prepare_symbols): this.
11245 (prepare): Move the definition of `rules_number' to...
11246 (prepare_rules): here.
11247 (prepare): Move the definition of `last', `final_state_number',
11248 `states_number' to...
11249 (prepare_states): here.
11250 * data/yacc.c, data/lalr1.cc, data/glr.c: Normalize `>' into `<'.
11252 2002-10-20 Akim Demaille <akim@epita.fr>
11254 * src/tables.h, src/tables.c, src/output.c: Comment changes.
11256 2002-10-20 Akim Demaille <akim@epita.fr>
11258 * data/yacc.c, data/yacc.c (b4_location_if, b4_pure_if): Move to...
11261 2002-10-20 Akim Demaille <akim@epita.fr>
11263 * src/output.c (prepare): Use MUSCLE_INSERT_STRING.
11264 * src/muscle_tab.c (muscle_pair_list_grow): Rename `val as
11266 (muscle_init): Move the `b4_ltype', `b4_maxdepth', `b4_initdepth',
11268 * data/glr.c, data/lalr1.cc, data/yacc.c (b4_location_type)
11269 (b4_stack_depth_init, b4_stack_depth_max, b4_parser_class_name):
11272 2002-10-19 Paul Eggert <eggert@twinsun.com>
11274 Do not create a temporary file, as that involves security and
11275 cleanup headaches. Instead, use a pair of pipes.
11276 Derived from a suggestion by Florian Krohm.
11277 * lib/subpipe.c, lib/subpipe.h, m4/subpipe.m4: New files.
11278 * lib/mkstemp.c, lib/readpipe.c, lib/tempname.c, m4/mkstemp.m4: Remove.
11279 * configure.ac (UTILS_FUNC_MKSTEMP, jm_PREREQ_TEMPNAME): Remove.
11280 (BISON_PREREQ_SUBPIPE): Add.
11281 * lib/Makefile.am (libbison_a_SOURCES): Remove readpipe.c.
11282 Add subpipe.h, subpipe.c.
11283 * m4/Makefile.am (EXTRA_DIST): Remove mkstemp.m4. Add subpipe.m4.
11284 * po/POTFILES.in: Add lib/subpipe.c.
11285 * src/output.c: Include "subpipe.h".
11286 (m4_invoke): Remove decl.
11287 (scan_skel): New decl.
11288 (output_skeleton): Use pipe rather than temporary file for m4 input.
11289 Check that m4sugar.m4 is readable, to avoid deadlock.
11290 Check for pipe I/O error.
11291 * src/scan-skel.l (readpipe): Remove decl.
11292 (scan_skel): New function, to be used in place of m4_invoke.
11293 Read from stream rather than file.
11295 * lib/timevar.c (TICKS_TO_MSEC, CLOCKS_TO_MSEC): Do not cast to
11296 float, as this generates a warning on Solaris 8 + GCC 3.2 with
11297 --enable-gcc-warnings. Instead, divide into 1.0 rather than 1;
11298 this generates a more-accurate value anyway.
11300 * lib/timevar.c (timervar_accumulate): Rename locals to
11301 avoid confusion with similarly-named more-global.
11302 * src/muscle_tab.c (muscle_pair_list_grow): Likewise.
11304 * src/output.c (prepare): Use xstrdup to convert char const *
11305 to char *, to avoid GCC warning.
11307 2002-10-19 Akim Demaille <akim@epita.fr>
11309 * tests/calc.at (_AT_DATA_CALC_Y): Define VAL, LOC, LEX_FORMALS,
11310 LEX_PRE_FORMALS, LEX_ARGS, LEX_PRE_ARGS, USE_LEX_ARGS.
11311 Use them to have `calc.y' ready for %pure-parser.
11312 * data/yacc.c (YYLEX): Pass a yylex return type to
11313 b4_c_function_call.
11315 2002-10-19 Akim Demaille <akim@epita.fr>
11317 Prototype support of %lex-param and %parse-param.
11319 * src/parse-gram.y: Add the definition of the %lex-param and
11320 %parse-param tokens, plus their rules.
11321 Drop the `_' version of %glr-parser.
11323 * src/scan-gram.l (INITIAL): Scan them.
11324 * src/muscle_tab.c: Comment changes.
11325 (muscle_insert, muscle_find): Rename `pair' as `probe'.
11326 * src/muscle_tab.h (MUSCLE_INSERT_PREFIX): Remove unused.
11327 (muscle_entry_s): The `value' member is no longer const.
11328 Adjust all dependencies.
11329 * src/muscle_tab.c (muscle_init): Adjust: use
11330 MUSCLE_INSERT_STRING.
11331 Initialize the obstack earlier.
11332 * src/muscle_tab.h, src/muscle_tab.c (muscle_grow)
11333 (muscle_pair_list_grow): New.
11334 * data/c.m4 (b4_c_function_call, b4_c_args): New.
11335 * data/yacc.c (YYLEX): Use b4_c_function_call to honor %lex-param.
11336 * tests/calc.at: Use %locations, not --locations.
11337 (AT_CHECK_CALC_GLR): Use %glr-parser, not %glr_parser.
11339 2002-10-19 Akim Demaille <akim@epita.fr>
11341 * src/getargs.c (usage): Take status as argument and exit
11343 Report the traditional `Try ... --help' message when status != 0.
11344 (usage, version): Don't take a FILE * as arg, it is pointless.
11345 (getargs): When there is an incorrect number of arguments, make it
11346 an error, and report it GNUlically thanks to `usage ()'.
11348 2002-10-18 Paul Eggert <eggert@twinsun.com>
11350 * data/glr.c (yyreportParseError): Don't assume that sprintf
11351 yields the length of the printed string, as this is not true
11352 on SunOS 4.1.4. Reported by Peter Klein.
11354 * tests/calc.at (_AT_DATA_CALC_Y): #undef memcmp and realloc.
11355 * tests/conflicts.at (%nonassoc and eof): Likewise.
11356 Fixes SunOS 4.1.4 test failure reported by Peter Klein.
11358 2002-10-17 Akim Demaille <akim@epita.fr>
11360 * src/getargs.h (trace_e): Add trace_scan, and trace_parse.
11361 * src/getargs.c (trace_types, trace_args): Adjust.
11362 * src/reader.c (grammar_current_rule_prec_set)
11363 (grammar_current_rule_dprec_set, grammar_current_rule_merge_set):
11364 Standardize error messages.
11365 And s/@prec/%prec/!
11366 (reader): Use trace_flag to enable scanner/parser debugging,
11367 instead of an adhoc scheme.
11368 * src/scan-gram.l: Remove trailing debugging code.
11370 2002-10-16 Paul Eggert <eggert@twinsun.com>
11372 * src/muscle_tab.h (MUSCLE_TAB_H_): Was misspelled as
11375 * NEWS: Officially drop support for building Bison with K&R C,
11376 since it didn't work anyway and it's not worth worrying about.
11377 * Makefile.maint (wget_files): Remove ansi2knr.c.
11378 (ansi2knr.c-url_prefix): Remove.
11379 * lib/.cvsignore: Remove ansi2knr, ansi2knr.*.
11380 * lib/Makefile.am (AUTOMAKE_OPTIONS): Remove.
11381 * src/Makefile.am (AUTOMAKE_OPTIONS): Remove.
11383 2002-10-15 Paul Eggert <eggert@twinsun.com>
11385 Stop using the "enum_" trick for K&R-style function definitions;
11386 it confused me, and I was the author! Instead, assume that people
11387 who want to use K&R C compilers (when using these modules in GCC,
11388 perhaps?) will run ansi2knr.
11390 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): Remove.
11391 All uses of "enum_" changed to "enum ".
11392 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
11393 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
11395 * lib/abitset.c (abitset_and, abitset_and_cmp, abitset_and_or,
11396 abitset_and_or_cmp, abitset_andn, abitset_andn_cmp,
11397 abitset_andn_or, abitset_andn_or_cmp, abitset_bytes, abitset_copy,
11398 abitset_copy1, abitset_disjoint_p, abitset_empty_p,
11399 abitset_equal_p, abitset_init, abitset_list, abitset_list_reverse,
11400 abitset_not, abitset_ones, abitset_or, abitset_or_and,
11401 abitset_or_and_cmp, abitset_or_cmp, abitset_reset, abitset_set,
11402 abitset_size, abitset_small_list, abitset_subset_p, abitset_test,
11403 abitset_unused_clear, abitset_xor, abitset_xor_cmp, abitset_zero):
11404 Use function prototypes; this removes the need for declaring
11405 static functions simply to provide their prototypes.
11406 * lib/bitset.c (bitset_alloc, bitset_and_or_, bitset_and_or_cmp_,
11407 bitset_andn_or_, bitset_andn_or_cmp_, bitset_bytes, bitset_copy_,
11408 bitset_count_, bitset_create, bitset_dump, bitset_first,
11409 bitset_free, bitset_init, bitset_last, bitset_next,
11410 bitset_obstack_alloc, bitset_obstack_free, bitset_only_set_p,
11411 bitset_op4_cmp, bitset_or_and_, bitset_or_and_cmp_, bitset_prev,
11412 bitset_print, bitset_release_memory, bitset_toggle_,
11413 bitset_type_choose, bitset_type_get, bitset_type_name_get,
11414 debug_bitset): Likewise.
11415 * lib/bitset.h (bitset_set, bitset_reset, bitset_test): Likewise.
11416 * lib/bitset_stats.c (bitset_log_histogram_print,
11417 bitset_percent_histogram_print, bitset_stats_and,
11418 bitset_stats_and_cmp, bitset_stats_and_or,
11419 bitset_stats_and_or_cmp, bitset_stats_andn, bitset_stats_andn_cmp,
11420 bitset_stats_andn_or, bitset_stats_andn_or_cmp, bitset_stats_copy,
11421 bitset_stats_count, bitset_stats_disable, bitset_stats_disjoint_p,
11422 bitset_stats_dump, bitset_stats_empty_p, bitset_stats_enable,
11423 bitset_stats_equal_p, bitset_stats_free, bitset_stats_init,
11424 bitset_stats_list, bitset_stats_list_reverse, bitset_stats_not,
11425 bitset_stats_ones, bitset_stats_or, bitset_stats_or_and,
11426 bitset_stats_or_and_cmp, bitset_stats_or_cmp, bitset_stats_print,
11427 bitset_stats_print_1, bitset_stats_read, bitset_stats_reset,
11428 bitset_stats_set, bitset_stats_size, bitset_stats_subset_p,
11429 bitset_stats_test, bitset_stats_toggle, bitset_stats_type_get,
11430 bitset_stats_write, bitset_stats_xor, bitset_stats_xor_cmp,
11431 bitset_stats_zero): Likewise.
11432 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
11433 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
11434 bitsetv_dump, debug_bitsetv): Likewise.
11435 * lib/ebitset.c (ebitset_and, ebitset_and_cmp, ebitset_andn,
11436 ebitset_andn_cmp, ebitset_bytes, ebitset_copy, ebitset_copy_,
11437 ebitset_copy_cmp, ebitset_disjoint_p, ebitset_elt_add,
11438 ebitset_elt_alloc, ebitset_elt_calloc, ebitset_elt_find,
11439 ebitset_elt_free, ebitset_elt_last, ebitset_elt_remove,
11440 ebitset_elt_zero_p, ebitset_elts_grow, ebitset_empty_p,
11441 ebitset_equal_p, ebitset_free, ebitset_init, ebitset_list,
11442 ebitset_list_reverse, ebitset_not, ebitset_ones, ebitset_op3_cmp,
11443 ebitset_or, ebitset_or_cmp, ebitset_release_memory, ebitset_reset,
11444 ebitset_set, ebitset_size, ebitset_subset_p, ebitset_test,
11445 ebitset_weed, ebitset_xor, ebitset_xor_cmp, ebitset_zero):
11447 * lib/lbitset.c (debug_lbitset, lbitset_and, lbitset_and_cmp,
11448 lbitset_andn, lbitset_andn_cmp, lbitset_bytes, lbitset_copy,
11449 lbitset_copy_cmp, lbitset_disjoint_p, lbitset_elt_alloc,
11450 lbitset_elt_calloc, lbitset_elt_find, lbitset_elt_free,
11451 lbitset_elt_link, lbitset_elt_unlink, lbitset_elt_zero_p,
11452 lbitset_empty_p, lbitset_equal_p, lbitset_free, lbitset_init,
11453 lbitset_list, lbitset_list_reverse, lbitset_not, lbitset_ones,
11454 lbitset_op3_cmp, lbitset_or, lbitset_or_cmp, lbitset_prune,
11455 lbitset_release_memory, lbitset_reset, lbitset_set, lbitset_size,
11456 lbitset_subset_p, lbitset_test, lbitset_weed, lbitset_xor,
11457 lbitset_xor_cmp, lbitset_zero): Likewise.
11459 2002-10-14 Akim Demaille <akim@epita.fr>
11463 2002-10-14 Akim Demaille <akim@epita.fr>
11465 * tests/Makefile.am (maintainer-check-posix): New.
11467 2002-10-14 Akim Demaille <akim@epita.fr>
11469 * data/glr.c [YYDEBUG] (YYLEFTMOST_STATE): Initialize the yyloc
11472 2002-10-14 Akim Demaille <akim@epita.fr>
11474 * src/tables.c (table_ninf_remap): base -> tab.
11475 Reported by Matt Rosing.
11477 2002-10-14 Paul Eggert <eggert@twinsun.com>
11479 * tests/action.at, tests/calc.at, tests/conflicts.at,
11480 tests/cxx-type.at, tests/headers.at, tests/input.at,
11481 tests/regression.at, tests/synclines.at, tests/torture.at:
11482 Say "bison -o foo.c foo.y", not "bison foo.y -o foo.c",
11483 so that the tests still work even if POSIXLY_CORRECT is set.
11484 * doc/bison.texinfo (Rpcalc Compile, Invocation): Likewise.
11486 * data/c.m4 (b4_int_type): Use yysigned_char instead of signed char,
11487 for portability to K&R hosts. Fix typo: signed char is guaranteed
11488 only to 127, not to 128.
11489 * data/glr.c (yysigned_char): New type.
11490 * data/yacc.c (yysigned_char): Likewise.
11491 * tests/regression.at (Web2c Actions): signed char -> yysigned_char.
11493 2002-10-13 Paul Eggert <eggert@twinsun.com>
11495 * data/yacc.c (yyparse): Rewrite to avoid "comparison is always
11496 true due to limited range of data type" warning from GCC.
11498 * data/c.m4 (b4_token_defines): Protect against double-inclusion
11499 by wrapping enum yytokentype's definition inside #ifndef
11500 YYTOKENTYPE. This undoes a bug I introduced on 2002-10-12.
11502 2002-10-13 Akim Demaille <akim@epita.fr>
11504 * data/glr.c (yyglrShiftDefer, yyaddDeferredAction, yydoAction):
11505 Un yy- yyrhs to avoid the name clash with the global YYRHS.
11507 2002-10-13 Akim Demaille <akim@epita.fr>
11509 * Makefile.maint: Update from Autoconf 2.54.
11510 * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Remove, shipped with 2.54.
11512 2002-10-13 Akim Demaille <akim@epita.fr>
11514 * src/print.c (print_state): Separate the list of solved conflicts
11515 from the other items.
11516 * tests/conflicts.at (Resolved SR Conflicts): Adjust.
11518 2002-10-13 Akim Demaille <akim@epita.fr>
11520 Let nondeterministic skeletons be usable with deterministic
11523 With the patch, GAWK compiled by GCC without -O2 passes its test
11524 suite using a GLR parser driven by LALR tables. It fails with -O2
11525 because `struct stat' gives two different answers on my machine:
11526 88 (definition of an auto var) and later 96 (memset on this var).
11527 Hence the stack is badly corrumpted. The headers inclusion is to
11528 blame: if I move the awk.h inclusion before GLR's system header
11529 inclusion, the two struct stat have the same size.
11531 * src/tables.c (pack_table): Always create conflict_table.
11532 (token_actions): Always create conflict_list.
11533 * data/glr.c (YYFLAG): Remove, unused.
11535 2002-10-13 Akim Demaille <akim@epita.fr>
11537 * configure.ac (AC_GNU_SOURCE): Use it instead of hand written code.
11539 (VALGRIND, GXX): New.
11540 * tests/atlocal.in (CFLAGS): Use O0FLAGS.
11541 * tests/bison.in: Run $PREBISON a pre-command.
11542 * tests/Makefile.am (maintainer-check, maintainer-check-valgrind)
11543 (maintainer-check-g++): New.
11544 * Makefile.am (maintainer-check): New.
11546 2002-10-13 Akim Demaille <akim@epita.fr>
11548 * data/glr.c: Formatting changes.
11549 Tweak some trace messages to match yacc.c's.
11551 2002-10-13 Akim Demaille <akim@epita.fr>
11553 GLR parsers sometimes raise parse errors instead of performing the
11555 Reported by Charles-Henry de Boysson.
11557 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Don't
11558 check the length of the traces when %glr.
11559 (_AT_CHECK_CALC_ERROR): Also skip `^Stack' lines, coming from
11561 (AT_CHECK_CALC_LALR, AT_CHECK_CALC_GLR): New.
11563 * data/glr.c (YYLEFTMOST_STATE): Fix its value.
11564 (yyltype): Remove the yy prefix from the member names.
11565 (yytable): Complete its comment.
11566 (yygetLRActions): Map error action number from YYTABLE from
11568 (yyisErrorAction): No longer compare YYACTION to YYPACT_NINF
11569 (which was a bug: it should have been YYTABEL_NINF, and yet it was
11570 not satisfying as we could compare an YYACTION computed from
11571 YYDEFACT to YYTABLE_NINF although they are unrelated): 0 is the
11572 only value for error actions.
11573 (yyreportParseError): In verbose parse error messages, don't issue
11574 `error' in the list of expected tokens.
11575 * data/yacc.c (yyparse) <yybackup>: Rewrite the decoding of the
11576 next action to perform to match glr.c's decoding.
11577 (yytable): Complete its comment.
11579 2002-10-13 Paul Eggert <eggert@twinsun.com>
11581 Fix problem reported by Henrik Grubbstroem in
11582 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00098.html>:
11583 "nonterm: { $$ = 123; } { $$ = $1; };" was wrongly rejected,
11584 because the Bison parser reads the second action before reducing
11586 * src/scan-gram.l (rule_length): New static var.
11587 Use it to keep track of the rule length in the scanner, since
11588 we can't expect the parser to be in lock-step sync with the scanner.
11589 (handle_action_dollar, handle_action_at): Use this var.
11590 * tests/actions.at (Exotic Dollars): Test for the problem.
11592 2002-10-12 Paul Eggert <eggert@twinsun.com>
11594 * lib/timevar.c [! IN_GCC && HAVE_SYS_TIME_H]: Include <sys/time.h>.
11595 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): Check for <sys/time.h>.
11596 Include <sys/time.h> when checking for clock_t and struct tms.
11597 Use same include order as source.
11598 This is for the SunOS 4.1.4 porting bug reported by Peter Klein in
11599 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00016.html>.
11601 * lib/timevar.c: Update copyright date and clarify comments.
11602 (get_time) [IN_GCC]: Keep the GCC version for reference.
11604 * lib/timevar.c, lib/timevar.h, lib/timevar.def: Import
11605 GCC version as of today, then merge Bison's changes.
11606 Change "GCC" to "Bison" in copyright notice. timevar.def's
11607 author is Akim, so change that too.
11609 * src/reader.c (grammar_current_rule_check):
11610 Don't worry about the default action if $$ is untyped.
11611 Prevents bogus warnings reported by Jim Gifford in
11612 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00015.html>.
11614 * data/c.m4 (b4_token_enum): Do not define YYTOKENTYPE.
11615 * data/glr.c, data/lalr1.cc, data/yacc.c:
11616 Output token definitions before the first part of user declarations.
11617 Fixes compatibility problem reported by Jim Gifford for kbd in
11618 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00014.html>.
11620 2002-10-11 Paul Eggert <eggert@twinsun.com>
11622 * data/yacc.c (yyreport_parse_error): Remove, putting its body into...
11623 (yyparse): here. This undoes some of the 2002-07-25 change.
11624 Compatibility problem reported by Ralf S. Engelschall with
11625 OSSP cfg <http://www.ossp.org/pkg/lib/cfg/>.
11627 2002-10-11 Akim Demaille <akim@epita.fr>
11629 * tests/regression.at Characters Escapes): New.
11630 * src/scan-gram.l (SC_ESCAPED_CHARACTER): Accept \' in strings and
11632 Reported by Jan Nieuwenhuizen.
11634 2002-10-11 Akim Demaille <akim@epita.fr>
11638 2002-10-10 Paul Eggert <eggert@twinsun.com>
11640 Portability fixes for bitsets; this also avoids several GCC
11643 * lib/abitset.c: Include <stddef.h>, for offsetof.
11644 * lib/lbitset.c: Likewise.
11646 * lib/abitset.c (abitset_bytes): Return a size that is aligned
11647 properly for vectors of objects. Do not assume that adding a
11648 header size to a multiple of a word size yields a value that is
11649 properly aligned for the whole union.
11650 * lib/bitsetv.c (bitsetv_alloc): Likewise.
11652 * lib/bitset_stats.c (bitset_stats_bytes): Adjust to new,
11653 unique names for structures.
11654 * lib/ebitset.c (ebitset_bytes): Likewise.
11655 * lib/lbitset.c (lbitset_bytes): Likewise.
11657 * lib/abitset.c (abitset_ones, abitset_zero, abitset_empty_p,
11658 abitset_copy1, abitset_not, abitset_equal_p, abitset_subset_p,
11659 abitset_disjoint_p, abitset_and, abitset_and_cmp, abitset_andn,
11660 abitset_andn_cmp, abitset_or, abitset_or_cmp, abitset_xor,
11661 abitset_xor_cmp, abitset_and_or, abitset_and_or_cmp,
11662 abitset_andn_or, abitset_andn_or_cmp, abitset_or_and,
11663 abitset_or_and_cmp, abitset_copy): Supply prototype decls,
11664 to improve the type-checking that GCC can do.
11665 * lib/bitset.c (bitset_op4_cmp): Likewise.
11666 * lib/bitset_stats.c (bitset_stats_count,
11667 bitset_stats_empty_p, bitset_stats_ones, bitset_stats_zero,
11668 bitset_stats_copy, bitset_stats_disjoint_p,
11669 bitset_stats_equal_p, bitset_stats_not, bitset_stats_subset_p,
11670 bitset_stats_and, bitset_stats_and_cmp, bitset_stats_andn,
11671 bitset_stats_andn_cmp, bitset_stats_or, bitset_stats_or_cmp,
11672 bitset_stats_xor, bitset_stats_xor_cmp, bitset_stats_and_or,
11673 bitset_stats_and_or_cmp, bitset_stats_andn_or,
11674 bitset_stats_andn_or_cmp, bitset_stats_or_and,
11675 bitset_stats_or_and_cmp): Likewise.
11676 * lib/lbitset.c (lbitset_and, lbitset_and_cmp, lbitset_andn,
11677 lbitset_andn_cmp, lbitset_or, lbitset_or_cmp, lbitset_xor,
11678 lbitset_xor_cmp, lbitset_empty_p, lbitset_ones, lbitset_not,
11679 lbitset_subset_p, lbitset_disjoint_p, debug_lbitset): Likewise.
11681 * lib/abitset.h: Include bitset.h, not bbitset.h.
11682 * lib/ebitset.h: Likewise.
11683 * lib/lbitset.h: Likewise.
11685 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): New types.
11686 All instances of parameters of type enum bitset_opts are now of
11687 type enum_bitset_opts, to conform to the C Standard, and similarly
11688 for enum_bitset_type.
11689 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
11690 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
11692 Do not use "struct bitset_struct" to mean different things in
11693 different modules. Not only is this confusing, it violates
11694 the C Standard, which requires that structure types in different
11695 modules must be compatible if one is to be passed to the other.
11696 * lib/bbitset.h (bitset): Now points to a union, not to a struct.
11697 All instances of "struct bitset_struct *" replaced with "bitset".
11698 * lib/bitset.h (struct bitset_struct): Remove, replacing with....
11699 (union bitset_union, struct abitset_struct, struct ebitset_struct,
11700 struct lbitset_struct, struct bitset_stats_struct): New types.
11701 All uses of struct bitset_struct changed to union bitset_union,
11703 * lib/abitset.c (struct abitset_struct, abitset,
11704 struct bitset_struct): Remove.
11705 * lib/bitset_stats.c (struct bitset_stats_struct, bitset_stats,
11706 struct bitset_struct): Remove.
11707 * lib/ebitset.c (struct ebitset_struct, ebitset, struct
11708 bitset_struct): Remove.
11709 * lib/lbitset.c (struct lbitset_struct, lbitset, bitset_struct):
11712 Do not call a function of type T using a call that assumes the
11713 function is of a different type U. Standard C requires that a
11714 function must be called with a type that is compatible with its
11716 * lib/bbitset.h (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
11718 * lib/bitset.c (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
11720 * lib/ebitset.c (PFV): Remove.
11721 * lib/lbitset.c (PFV): Likewise.
11722 * lib/ebitset.c (ebitset_and, ebitset_andn, ebitset_or,
11723 ebitset_xor, ebitset_copy, ebitset_ones, ebitset_empty_p): New
11725 (ebitset_and, ebitset_andn, ebitset_or, ebitset_xor): New functions.
11726 (ebitset_vtable): Use them.
11727 * lib/lbitset.c (lbitset_and, lbitset_andn, lbitset_or,
11728 lbitset_xor): New functions.
11729 (lbitset_vtable): Use them.
11731 * lib/bitset.h (bitset_next, bitset_prev, bitset_only_set_p):
11734 * lib/bitsetv.c (bitsetv_alloc): Add a cast to (void *) to avoid a
11736 * lib/lbitset.c (LBITSET_CURRENT1): Likewise.
11737 Use offsetof, for simplicity.
11739 2002-10-06 Paul Eggert <eggert@twinsun.com>
11741 * lib/bitset.h (bitset_reset): Do not assume that bitset_word is
11742 the same width as int. This reapplies a hunk of the 2002-08-12 patch
11743 <http://lists.gnu.org/archive/html/bison-patches/2002-08/msg00007.html>,
11744 which was inadvertently undone by the 2002-09-30 patch.
11745 * lib/lbitset.c (debug_lbitset): Do not assume that bitset_word is
11746 the same width as int.
11748 2002-10-04 Paul Eggert <eggert@twinsun.com>
11752 * configure.ac (AC_INIT), NEWS: Increment version number.
11754 * doc/bison.texinfo: Minor spelling, grammar, and white space
11756 (Symbols): Mention that any negative value returned from yylex
11757 signifies end-of-input. Warn about negative chars. Mention
11758 the portable Standard C character set.
11760 The GNU coding standard says CFLAGS and YFLAGS are reserved
11761 for the installer to set.
11762 * lib/Makefile.am (AM_CFLAGS): Renamed from CFLAGS.
11763 * src/Makefile.am (AM_CFLAGS): Likewise.
11764 (AM_YFLAGS): Renamed from YFLAGS.
11766 Fix some MAX and MIN problems.
11767 * src/gram.h (ITEM_NUMBER_MIN): MIN_MAX -> INT_MIN.
11768 * src/lalr.h (GOTO_NUMBER_MAX): INT_MAX -> SHRT_MAX.
11769 * src/symtab.h (SYMBOL_NUMBER_MAX): New macro.
11770 * src/reader.c (reader): Use it.
11772 * tests/regression.at (Braces parsing): Use grep, not fgrep, as
11773 POSIX 1003.1-2001 has removed fgrep.
11775 2002-10-04 Michael Hayes <m.hayes@elec.canterbury.ac.nz>
11777 * lib/bbitset.h (BITSET_WINDEX_MAX): Redefine so that it cannot be
11778 interpreted as signed.
11779 * lib/ebitset.c (ebitset_list): Fix bug.
11781 2002-10-01 Paul Eggert <eggert@twinsun.com>
11783 More fixes for 64-bit hosts and large bitsets.
11785 * lib/abitset.c (struct abitset_struct.n_bits, abitset_small_list,
11786 abitset_size, abitset_list, abitset_list_reverse, abitset_list):
11787 Use bitset_bindex, not int or unsigned int or size_t, to count bits.
11788 * lib/bbitset.h (struct bitset_vtable.size, struct bitset_vtable.count,
11789 struct bitset_vtable.list, struct bitset_vtable.list_reverse,
11790 bitset_count_, bitset_next, bitset_prev, bitset_first, bitset_last,
11791 bitset_count_): Likewise.
11792 * lib/bitset.h (bitset_iterator.num, bitset_iterator.i,
11793 bitset_first, bitset_last): Likewise.
11794 * lib/bitset_stats.c (bitset_stats_size, bitset_stats_list,
11795 bitset_stats_list_reverse, bitset_stats_size,
11796 bitset_stats_count, bitset_stats_list, bitset_stat_list_reverse):
11798 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
11799 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
11800 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
11801 bitsetv_reflexive_transitive_closure): Likewise.
11802 * lib/bitsetv.h (bitsetv_alloc, bitsetv_create): Likewise.
11803 * lib/ebitset.c (ebitset_size, ebitset_list, ebitset_list_reverse):
11805 * lib/lbitset.c (lbitset_size, lbitset_list, lbitset_list_merge):
11808 * lib/abitset.c (abitset_ones, abitset_zero, abitset_bytes):
11809 Use size_t, not unsigned int, to count bytes.
11810 * lib/abitset.h (abitset_bytes): Likewise.
11811 * lib/bitset.c (bitset_bytes, bitset_alloc, bitset_obstack_alloc):
11813 * lib/bitset.h (bitset_bytes): Likewise.
11814 * lib/bitset_stats.c (bitset_stats_bytes, bitset_stats_init): Likewise.
11815 * lib/bitset_stats.h (bitset_stats_bytes): Likewise.
11816 * lib/bitsetv.c (bitsetv_alloc): Likewise.
11817 * lib/ebitset.c (ebitset_bytes): Likewise.
11818 * lib/ebitset.h (ebitset_bytes): Likewise.
11819 * lib/lbitset.c (lbitset_bytes): Likewise.
11820 * lib/lbitset.h (lbitset_bytes): Likewise.
11822 * lib/abitset.c (abitset_empty_p, abitset_not, abitset_equal_p,
11823 abitset_subset_p, abitset_disjoint_p, abitset_and,
11824 abitset_and_cmp, abitset_andn, abitset_andn_cmp, abitset_or,
11825 abitset_or_cmp, abitset_xor, abitset_xor_cmp, abitset_and_or,
11826 abitset_and_or_cmp, abitset_andn_or, abitset_andn_or_cmp,
11827 abitset_or_and, abitset_or_and_cmp):
11828 Use bitset_windex instead of unsigned int.
11829 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
11830 * lib/ebitset.c (struct ebitset_struct.size, ebitset_elts_grow,
11831 ebitset_elt_add, ebitset_elt_remove, ebitset_weed,
11832 ebitset_elt_find, ebitset_list_reverse, ebitset_list, ebitset_init):
11834 * lib/lbitset.c (lbitset_ones, lbitset_not): Likewise.
11836 * lib/bitset.c (bitset_print):
11837 Use proper printf formats for widths of integer types.
11838 * lib/bitset_stats.c (bitset_percent_histogram_print,
11839 bitset_log_histogram_print, bitset_stats_print_1): Likewise.
11840 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
11841 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
11842 * lib/lbitset.c (lbitset_bytes): Likewise.
11844 * lib/bbitset.h (BITSET_BINDEX_MAX, BITSET_WINDEX_MAX,
11845 BITSET_SIZE_MAX): New macros.
11846 (BITSET_INDEX_MAX): Remove. It wasn't right, since it assumed that
11847 sizeof (bitset_word) == sizeof (bitset_windex). All uses changed
11848 to BITSET_WINDEX_MAX.
11850 * lib/bitset.c (bitset_next, bitset_prev, bitset_first,
11851 bitset_last): Return BITSET_BINDEX_MAX (not -1) for no value,
11852 since we now return the bitset_bindex type (not int).
11854 * lib/bitsetv.c (bitsetv_alloc): Check for arithmetic overflow
11855 when computing sizes.
11856 * lib/ebitset.c (ebitset_elts_grow): Likewise.
11858 * lib/lbitset.c (lbitset_elt_find): Simplify windex calculation
11859 and avoid cast to unsigned.
11861 2002-09-30 Akim Demaille <akim@epita.fr>
11863 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
11864 * lib/bitset_stats.c, lib/bitsetv.c, lib/ebitset.c, lib/lbitset.c:
11865 Updates from Michael Hayes.
11867 2002-09-30 Art Haas <ahaas@neosoft.com>
11869 * configure.ac: Update AC_OUTPUT and AM_CONFIG_HEADER
11871 * tests/cxx-type.at (declarator): Don't rely on NDEBUG being not
11874 2002-09-27 Akim Demaille <akim@epita.fr>
11878 2002-09-27 Akim Demaille <akim@epita.fr>
11880 * configure.ac (AM_INIT_AUTOMAKE): We _need_ 1.7.
11881 (Because of AC_LIBSOURCE).
11883 2002-09-27 Akim Demaille <akim@epita.fr>
11885 Playing with Autoscan.
11887 * configure.ac: Remove the old LIBOBJ tweaks.
11888 (AC_REPLACE_FUNCS): Add strrchr and strtol.
11889 * lib/strrchr.c: New.
11890 * lib/strtol.c: New, from the Coreutils 4.5.1.
11892 2002-09-27 Akim Demaille <akim@epita.fr>
11894 Playing with Autoscan.
11896 * m4/prereq.m4 (jm_PREREQ_ARGMATCH, jm_FUNC_ARGMATCH): New.
11897 * lib/Makefile.am (libbison_a_SOURCES): No longer include
11898 argmatch.c and argmatch.h, since they are AC_LIBSOURCE'd.
11899 * lib/strcasecmp.c, lib/strncasecmp.c, lib/memcmp.c: New, from the
11902 2002-09-24 Akim Demaille <akim@epita.fr>
11904 * doc/bison.texinfo (Stack Overflow): xref to Recursion.
11905 (Frequently Asked Questions, Parser Stack Overflow): New.
11907 2002-09-13 Akim Demaille <akim@epita.fr>
11909 Playing with autoscan.
11911 * src/reader.c (get_merge_function): Use xstrdup, not strdup.
11912 * src/files.c (skeleton_find): Remove, unused.
11913 * m4/memcmp.m4: New, from the Coreutils 4.5.1.
11914 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Run jm_FUNC_MEMCMP.
11916 2002-09-13 Akim Demaille <akim@epita.fr>
11918 * configure.ac (AM_INIT_AUTOMAKE): Require Automake 1.6.3.
11919 * Makefile.am (AUTOMAKE_OPTIONS): Don't.
11921 2002-09-13 Akim Demaille <akim@epita.fr>
11923 * configure.ac: Require 2.54.
11924 s/jm_FUNC_MALLOC/AC_FUNC_MALLOC/.
11925 s/jm_FUNC_REALLOC/AC_FUNC_REALLOC/.
11926 * m4/c-bs-a.m4, m4/malloc.m4, m4/mbstate_t.m4, m4/realloc.m4:
11927 Remove, provided by Autoconf macros.
11929 2002-09-12 Akim Demaille <akim@epita.fr>
11931 * m4/prereq.m4: Update, from Coreutils 4.5.1.
11933 2002-09-12 Akim Demaille <akim@epita.fr>
11935 * m4/prereq.m4: Update, from Fileutils 4.1.5.
11936 * configure.ac (jm_PREREQ_TEMPNAME): Invoke it.
11937 Reported by Martin Mokrejs.
11939 2002-09-10 Akim Demaille <akim@epita.fr>
11941 * src/parse-gram.y: Associate a human readable string to each
11943 * tests/regression.at (Invalid inputs): Adjust.
11945 2002-09-10 Gary V. Vaughan <gary@gnu.org>
11947 * tests/Makefile.am ($(srcdir)/package.m4): Bison now ships
11948 with an Autoconf-2.5x style configure.ac.
11950 2002-09-06 Paul Eggert <eggert@twinsun.com>
11952 * doc/bison.texinfo (Conditions): Make explicit that the GPL
11953 exception applies only to yacc.c. This is a modification of a
11954 patch originally suggested by Akim Demaille.
11956 2002-09-06 Akim Demaille <akim@epita.fr>
11958 * data/c.m4 (b4_copyright): Move the GPL exception comment from
11960 * data/yacc.c: here.
11962 * data/lalr1.cc (struct yyltype): Don't define it, since we use
11964 (b4_ltype): Default to yy::Location from location.hh.
11966 2002-09-04 Jim Meyering <jim@meyering.net>
11968 * data/yacc.c: Guard the declaration of yytoknum also with
11969 `#ifdef YYPRINT', so it is declared only when used.
11971 2002-09-04 Akim Demaille <akim@epita.fr>
11973 * configure.in: Rename as...
11974 * configure.ac: this.
11977 2002-09-04 Akim Demaille <akim@epita.fr>
11979 * src/assoc.c, src/closure.c, src/gram.c, src/injections.c,
11980 * src/lalr.c, src/LR0.c, src/relation.c, src/tables.c: Don't
11981 translate maintainer only messages.
11983 2002-08-12 Paul Eggert <eggert@twinsun.com>
11987 * Makefile.am (SUBDIRS): Remove intl.
11988 (DISTCLEANFILES): Remove.
11989 * NEWS: Mention that GNU M4 is now required. Clarify what is
11990 meant by "larger grammars". Mention the pt_BR translation.
11991 * configure.in (AC_CHECK_DECLS): Add getenv, getopt.
11992 (AM_GNU_GETTEXT_VERSION): New macro, replacing GETTEXT_VERSION var.
11993 Bump version from 0.11.2 to 0.11.5.
11994 (BISON_PREREQ_STAGE): Remove.
11995 (AM_GNU_GETTEXT): Use external gettext.
11996 (AC_OUTPUT): Remove intl/Makefile.
11998 * config/depcomp, config/install-sh: Sync with Automake 1.6.3.
12000 * data/glr.c: Include string.h, for strlen.
12001 (yyreportParseError): Use size_t for yysize.
12002 (yy_yypstack): No longer nested inside yypstates, as nested
12003 functions are not portable. Do not assume size_t is the
12005 (yypstates): Do not assume that ptrdiff_t is the same width
12006 as int, and similarly for yyposn and YYINDEX.
12008 * data/yacc.c: Fix comment about `$$ = $1': it can copy garbage.
12010 * lib/Makefile.am (INCLUDES): Do not include from the intl
12011 directory, which has been removed.
12012 * src/Makefile.am (INCLUDES): Likewise.
12014 * lib/Makefile.am (libbison_a_SOURCES): Add unlocked-io.h.
12015 (bitsets_sources, additional_bitsets_sources, timevars_sources):
12018 * lib/Makefile.am (libbison_a_SOURCES): Avoid +=, a GNU make extension.
12019 * tests/Makefile.am (EXTRA_DIST): Likewise.
12021 * lib/abitset.c (abitset_reverse_list, ebitset_reverse_list):
12022 Do not assume that bitset_windex is the same width as unsigned.
12024 * lib/abitset.c (abitset_unused_clear): Do not assume that
12025 bitset_word is the same width as int.
12026 * lib/bbitset.h (BITSET_INDEX_MAX, BITSET_MSB): Likewise.
12027 * lib/bitset.h (bitset_set, bitset_reset): Likewise.
12028 * lib/bitset_stats.c (bitset_stats_set, bitset_stats_reset): Likewise.
12029 * lib/ebitset.c (ebitset_set, ebitset_reset): Likewise.
12030 * lib/lbitset.c (lbitset_set, lbitset_reset): Likewise.
12032 * lib/abitset.c (abitset_op1): Use -1, not ~0, as memset arg (for
12033 portability to one's complement hosts!).
12034 * lib/ebitset.c (ebitset_op1): Likewise.
12035 * lib/lbitset.c (lbitset_op1): Likewise.
12037 * lib/argmatch.c, lib/quotearg.c, quotearg.h: Sync with GNU tar.
12038 * lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
12039 lib/hash.c, lib/hash.h, lib/strnlen.c, lib/xmalloc.c:
12040 Sync with fileutils.
12041 * lib/error.c, lib/getopt.c, lib/getopt.h, lib/getopt1.c,
12042 lib/gettext.h: Sync with diffutils.
12044 * lib/memrchr.c, lib/mkstemp.c, lib/strchr.c, lib/strnlen.c,
12045 lib/strspn.c, lib/tempname.c: Use GPL, not LGPL.
12047 * lib/obstack.c, lib/obstack.h: Sync with fileutils, except use
12048 PROTOTYPES to check for prototypes, and "defined __STDC__" to
12051 * lib/bbitset.h (BITSET_WORD_BITS): Now of type unsigned, not
12052 size_t; the old version tried to do this but casted improperly.
12053 (bitset_bindex, bitset_windex): Now size_t, not unsigned long.
12054 (bitset_test): Now returns int, not unsigned long.
12056 * lib/bitset_stats.c: Include "gettext.h".
12058 (bitset_stats_set, bitset_stats_reset, bitset_stats_test): Don't
12059 name locals "index", as it generates unnecessary warnings on some
12060 hosts that have an "index" function.
12062 * lib/bitset_stats.c (bitset_stats_print_1, bitset_stats_print,
12063 bitset_stats_read, bitset_stats_write): Wrap strings in _() if
12064 they need translation.
12065 * src/LR0.c (state_list_append, new_itemsets, get_state,
12066 append_states, generate_states): Likewise.
12067 * src/assoc.c (assoc_to_string): Likewise.
12068 * src/closure.c (print_closure, set_firsts, closure): Likewise.
12069 * src/gram.c (grammar_dump): Likewise.
12070 * src/injections.c (injections_compute): Likewise.
12071 * src/lalr.c (lookaheads_print): Likewise.
12072 * src/relation.c (relation_transpose): Likewise.
12073 * src/scan-gram.l: Likewise.
12074 * src/tables.c (table_grow, pack_vector): Likewise.
12076 * m4/Makefile.am (EXTRA_DIST): Remove codeset.m4,
12077 glibc21.m4, isc-posix.m4 lcmessage.m4, stage.m4.
12078 * m4/malloc.m4, m4/realloc.m4: Sync with diffutils.
12079 * m4/mbstate_t.m4: Sync with fileutils.
12080 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): AC_MBSTATE_T -> AC_TYPE_MBSTATE_T.
12082 * po/LINGUAS: Add pt_BR.
12083 * po/POTFILES.in: Add src/assoc.c, src/closure.c, src/gram.c,
12084 src/main.c, src/relation.c, src/state.c, lib/bitset_stats.c,
12086 Use src/parse-gram.y instead of src/parse-gram.c, as the gettext
12088 Similarly, use src/scan-gram.l instead of src/scan-gram.c.
12090 * src/complain.c (strerror_r): Remove decl; not needed.
12091 (strerror): Use same pattern as ../lib/error.c.
12093 * src/files.c, src/files.h (compute_header_macro): Remove; unused.
12095 * src/gram.c (grammar_dump): Do not assume ptrdiff_t fits in int.
12097 * src/main.c (main): Cast result of bindtextdomain and textdomain
12098 to void, to avoid a GCC warning when --disable-nls is in effect.
12100 * src/scan-gram.l: Use strings rather than escapes when possible,
12101 to minimize the number of warnings from xgettext.
12102 (handle_action_dollar, handle_action_at): Don't use isdigit,
12103 as it mishandles negative chars and it may not work as expected
12104 outside the C locale.
12106 * src/symtab.c (symbol_get): Don't cast LHS of an assignment;
12107 this is a GCC extension and is not portable to other compilers.
12109 * src/system.h (alloca): Use same pattern as ../lib/error.c.
12110 Do not include <ctype.h>; no longer needed.
12111 Do not include <malloc.h>; no longer needed (and generates
12112 warnings on OpenBSD 3.0).
12114 * tests/cxx-type.at (yylex): Do not pass signed char to isupper;
12117 * tests/regression.at: Do not use 'cc -c input.c -o input';
12118 Sun C rejects this. Instead, use 'cc -c input.c -o input.o'.
12120 * tests/synclines.at (AC_SYNCLINES_COMPILE): Accept any nonzero
12121 exit status as failure, not just exit status 1. Sun C exits
12122 with status 2 sometimes.
12124 * tests/torture.at (AT_INCREASE_DATA_SIZE): New macro.
12125 Use it for the two large tests.
12127 2002-08-02 Akim Demaille <akim@epita.fr>
12129 * src/conflicts.c (conflicts_output): Don't output rules never
12130 reduced here, since anyway that computation doesn't work.
12131 * src/gram.h, src/gram.h (rule_filter_t, rule_useful_p)
12132 (rule_useless_p, rule_never_reduced_p): New.
12133 (grammar_rules_partial_print): Use a filter instead of a range.
12134 Display the title only if needed.
12135 (grammar_rules_print): Adjust.
12136 (grammar_rules_never_reduced_report): New.
12137 * src/tables.c (action_row): Move the computation of rules never
12139 (token_actions): here.
12140 * src/main.c (main): Make the parser before making the report, so
12141 that rules never reduced are computed.
12142 Call grammar_rules_never_reduced_report.
12143 * src/print.c (print_results): Report rules never reduced.
12144 * tests/conflicts.at, tests/reduce.at: Adjust.
12146 2002-08-01 Akim Demaille <akim@epita.fr>
12148 Instead of attaching lookaheads and duplicating the rules being
12149 reduced by a state, attach the lookaheads to the reductions.
12151 * src/state.h (state_t): Remove the `lookaheads',
12152 `lookaheads_rule' member.
12153 (reductions_t): Add a `lookaheads' member.
12154 Use a regular array for the `rules'.
12155 * src/state.c (reductions_new): Initialize the lookaheads member
12157 (state_rule_lookaheads_print): Adjust.
12158 * src/state.h, src/state.c (state_reductions_find): New.
12159 * src/conflicts.c (resolve_sr_conflict, set_conflicts)
12160 (count_rr_conflicts): Adjust.
12161 * src/lalr.c (LArule): Remove.
12162 (add_lookback_edge): Adjust.
12163 (state_lookaheads_count): New.
12164 (states_lookaheads_initialize): Merge into...
12165 (initialize_LA): this.
12166 (lalr_free): Adjust.
12167 * src/main.c (main): Don't free nullable and derives too early: it
12168 is used by --verbose.
12169 * src/print.c, src/print_graph.c, src/tables.c: Adjust.
12171 2002-08-01 Akim Demaille <akim@epita.fr>
12173 * src/derives.h, src/derives.c (derives): A `rule_t***' instead of
12175 (set_derives, free_derives): Rename as...
12176 (derives_compute, derives_free): this.
12177 Adjust all dependencies.
12178 * src/nullable.c (set_nullable, free_nullable): Rename as...
12179 (nullable_compute, nullable_free): these.
12180 (rule_list_t): Store rule_t *, not rule_number_t.
12181 * src/state.c (state_rule_lookaheads_print): Directly compare rule
12182 pointers, instead of their numbers.
12183 * src/main.c (main): Call nullable_free, and derives_free earlier,
12184 as they were lo longer used.
12186 2002-08-01 Akim Demaille <akim@epita.fr>
12188 * lib/timevar.c (get_time): Include children time.
12189 * src/lalr.h (LA, LArule): Don't export them: used with the
12191 * src/lalr.c (LA, LArule): Static.
12192 * src/lalr.h, src/lalr.c (lalr_free): New.
12193 * src/main.c (main): Call it.
12194 * src/tables.c (pack_vector): Check whether loc is >= to the
12196 (pack_tables): Don't free froms, tos, conflict_tos, and pos...
12197 (tables_generate): do it, since that's also it which allocates
12199 Don't free LA and LArule, main does.
12201 2002-07-31 Akim Demaille <akim@epita.fr>
12203 Separate parser tables computation and output.
12205 * src/output.c (nvectors, base_t, base, base_ninf, conflict_table)
12206 (conflict_list, conflict_list_cnt, table, check, table_ninf)
12207 (yydefgoto, yydefact, high): Move to...
12208 * src/tables.h, src/tables.c: here.
12209 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
12210 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
12211 (symbol_number_to_vector_number, nvectors, BASE_MAX, BASE_MIN)
12212 (froms, tos, conflict_tos, tally, width, action_t, ACTION_MAX)
12213 (ACTION_MIN, actrow, order, nentries, pos, conflrow)
12214 (conflict_list_free, table_size, lowzero, table_grow, conflict_row)
12215 (action_row, save_row, token_actions, save_column, default_goto)
12216 (goto_actions, sort_actions, matching_state, pack_vector)
12217 (table_ninf_remap, pack_table, prepare_actions): Move to...
12218 * src/tables.c: here.
12219 * src/tables.h, src/tables.c(tables_generate, tables_free): New.
12220 * src/output.c (token_actions, output_base, output_conflicts)
12221 (output_check): Merge into...
12222 (prepare_actions): this.
12223 (actions_output): Rename as...
12224 (user_actions_output): this.
12225 * src/main.c (main): Call tables_generate and tables_free.
12227 2002-07-31 Akim Demaille <akim@epita.fr>
12229 Steal GCC's --time-report support.
12231 * lib/timevar.c, lib/timevar.h, lib/timevar.def: New,
12232 stolen/adjusted from GCC.
12233 * m4/stage.m4: Remove time related checks.
12234 * m4/timevar.m4: New.
12235 * configure.in: Adjust.
12236 * src/system.h: Adjust to using timevar.h.
12237 * src/getargs.h, src/getargs.c: Support trace_time for
12239 * src/main.c (stage): Remove.
12240 (main): Replace `stage' invocations with timevar calls.
12241 * src/output.c: Insert pertinent timevar calls.
12243 2002-07-31 Akim Demaille <akim@epita.fr>
12245 Let --trace have arguments.
12247 * src/getargs.h (enum trace_e): New.
12248 * src/getargs.c (trace_args, trace_types, trace_argmatch): New.
12249 (long_options, short_options): --trace/-T takes an optional
12251 Change all the uses of trace_flag to reflect the new flags.
12252 * tests/sets.at (Firsts, Nullable, Broken Closure): Use --trace=sets.
12254 Strengthen `stage' portability.
12256 * m4/stage.m4 (BISON_PREREQ_STAGE): New.
12257 * configure.in: Use it.
12258 Don't check for malloc.h and sys/times.h.
12259 * src/system.h: Include them when appropriate.
12260 * src/main.c (stage): Compile only when mallinfo, struct mallinfo,
12261 times and struct tms are available.
12263 2002-07-30 Akim Demaille <akim@epita.fr>
12265 In verbose parse error message, don't report `error' as an
12267 * tests/actions.at (Printers and Destructors): Adjust.
12268 * tests/calc.at (Calculator $1): Adjust.
12269 * data/yacc.c, data/glr.c, data/lalr1.c: When making the verbose
12270 error message, do not report the parser accepts the error token in
12273 2002-07-30 Akim Demaille <akim@epita.fr>
12275 Normalize conflict related messages.
12277 * src/complain.h, src/complain.c (warn, complain): New.
12278 * src/conflicts.c (conflicts_print): Use them.
12279 (conflict_report_yacc): New, extracted from...
12280 (conflicts_print): here.
12281 * tests/conflicts.at, tests/existing.at: Adjust.
12283 2002-07-30 Akim Demaille <akim@epita.fr>
12285 Report rules which are never reduced by the parser: those hidden
12288 * src/LR0.c (save_reductions): Don't make the final state too
12289 different: save its reduction (accept) instead of having a state
12290 without any action (no shift or goto, no reduce).
12291 Note: the final state is now a ``regular'' state, i.e., the
12292 parsers now contain `reduce 0' as default reduction.
12293 Nevertheless, since they decide to `accept' when yystate =
12294 final_state, they still will not reduce rule 0.
12295 * src/print.c (print_actions, print_reduction): Adjust.
12296 * src/output.c (action_row): Track reduced rules.
12297 (token_actions): Report rules never reduced.
12298 * tests/conflicts.at, tests/regression.at: Adjust.
12300 2002-07-30 Akim Demaille <akim@epita.fr>
12302 `stage' was accidently included in a previous patch.
12303 Initiate its autoconfiscation.
12305 * configure.in: Look for malloc.h and sys/times.h.
12306 * src/main.c (stage): Adjust.
12307 Report only when trace_flag.
12309 2002-07-29 Akim Demaille <akim@epita.fr>
12311 * src/state.h, src/state.c (transitions_t): Holds state_t*'s, not
12313 (errs_t): symbol_t*, not symbol_number_t.
12314 (reductions_t): rule_t*, not rule_number_t.
12315 (FOR_EACH_SHIFT): New.
12316 * src/LR0.c, src/conflicts.c, src/lalr.c, src/output.c
12317 * src/print.c, src/print_graph.c: Adjust.
12319 2002-07-29 Akim Demaille <akim@epita.fr>
12321 Use $accept and $end, as BYacc and BTYacc do, instead of $axiom and $.
12323 * src/symtab.h, src/symtab.c (eoftoken, axiom): Rename as...
12324 (endtoken, accept): these.
12325 * src/reader.c (reader): Set endtoken's default tag to "$end".
12326 Set undeftoken's tag to "$undefined" instead of "$undefined.".
12327 * doc/bison.texinfo (Table of Symbols): Mention $accept and $end.
12330 2002-07-29 Akim Demaille <akim@epita.fr>
12332 * src/reduce.c (reduce_grammar): When the language is empty,
12333 complain about the start symbol, not the axiom.
12335 * tests/reduce.at (Empty Language): New.
12337 2002-07-26 Akim Demaille <akim@epita.fr>
12339 * src/reader.h, src/reader.c (gram_error): ... can't get
12340 yycontrol without making too strong assumptions on the parser
12342 * src/output.c (prepare_tokens): Use the real 0th value of
12343 token_translations instead of `0'.
12344 * src/parse-gram.y (yyerror): Don't rely on yycontrol being
12346 * data/yacc.c (yyreport_parse_error): Rename yylocation as yylloc
12347 for the time being: %locations ought to provide it to yyerror.
12349 2002-07-25 Akim Demaille <akim@epita.fr>
12351 * src/output.c (prepare_tokens): Go up to ntokens, not ntokens + 1.
12352 * doc/bison.texinfo (Decl Summary): s/$illegal/$undefined./.
12353 * tests/regression.at (Web2c Actions): Adjust.
12355 2002-07-25 Akim Demaille <akim@epita.fr>
12357 Stop storing rules from 1 to nrules + 1.
12359 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c, src/lalr.c
12360 * src/nullable.c, src/output.c, src/print.c, src/reader.c
12361 * src/reduce.c: Allocate and free from &rules[0], not &rules[1].
12362 Iterate from 0 to nrules.
12363 Use rule_number_as_item_number and item_number_as_rule_number.
12364 Adjust to `derive' now containing possibly 0.
12365 * src/gram.h (rule_number_as_item_number, item_number_as_rule_number):
12366 Handle the `- 1' part in rule numbers from/to item numbers.
12367 * src/conflicts.c (log_resolution): Fix the message which reversed
12369 * src/output.c (action_row): Initialize default_rule to -1.
12370 (token_actions): Adjust.
12371 * tests/sets.at (Nullable, Firsts): Fix the previously bogus
12373 * tests/conflicts.at (Resolved SR Conflicts): Likewise.
12375 2002-07-25 Akim Demaille <akim@epita.fr>
12377 * data/c.m4 (b4_c_function, b4_c_ansi_args, b4_c_ansi_arg)
12378 (b4_c_knr_arg_names, b4_c_knr_arg_name, b4_c_knr_arg_decls)
12379 (b4_c_knr_arg_decl): New.
12380 * data/yacc.c: Use it to define yysymprint, yydestruct, and
12381 yyreport_parse_error.
12383 2002-07-25 Akim Demaille <akim@epita.fr>
12385 * data/yacc.c (yyreport_parse_error): New, extracted from...
12387 (yydestruct, yysymprint): Move above yyparse.
12390 2002-07-25 Akim Demaille <akim@epita.fr>
12392 * data/c.m4 (b4_ints_in, b4_int_type, b4_int_type_for): New,
12394 (b4_sint_type, b4_uint_type): these.
12395 * data/yacc.c, data/glr.c, data/lalr1.cc: Use b4_int_type_for.
12396 * tests/regression.at (Web2c Actions): Adjust.
12398 2002-07-25 Akim Demaille <akim@epita.fr>
12400 * src/gram.h (TIEM_NUMBER_MAX): New.
12401 (item_number_of_rule_number, rule_number_of_item_number): Rename
12403 (rule_number_as_item_number, item_number_as_rule_number): these.
12404 Adjust dependencies.
12405 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
12406 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
12407 (symbol_number_to_vector_number): New.
12408 (order): Of vector_number_t* type.
12409 (base_t, BASE_MAX, BASE_MIN): New.
12410 (froms, tos, width, pos, check): Of base_t type.
12411 (action_number_t, ACTION_MIN, ACTION_MAX): New.
12412 (actrow): Of action_number_t type.
12413 (conflrow): Of unsigned int type.
12414 (table_ninf, base_ninf): New.
12415 (GENERATE_MUSCLE_INSERT_TABLE): Also output the `*_min' value.
12416 (muscle_insert_int_table, muscle_insert_base_table)
12417 (muscle_insert_rule_number_table): New.
12418 (prepare_tokens): Output `toknum' as int_table.
12419 (action_row): Returns a rule_number_t.
12420 Use ACTION_MIN, not SHRT_MIN.
12421 (token_actions): yydefact is rule_number_t*.
12422 (table_ninf_remap): New.
12423 (pack_table): Use it for `base' and `table'.
12424 * data/yacc.c, data/glr.c, data/lalr1.cc (YYFLAG): Remove,
12426 (YYPACT_NINF, YYTABLE_NINF): these.
12427 (yypact, yytable): Compute their types instead of hard-coded
12429 * tests/regression.at (Web2c Actions): Adjust.
12431 2002-07-19 Akim Demaille <akim@epita.fr>
12433 * src/scan-gram.l (id): Can start with an underscore.
12435 2002-07-16 Akim Demaille <akim@epita.fr>
12437 * src/assoc.c, src/asssoc.h (assoc_t, assoc_to_string): New.
12438 Adjust all former `associativity' dependencies.
12439 * src/symtab.c (symbol_new): Default associativity is `undef', not
12441 (symbol_check_alias_consistence): Adjust.
12443 2002-07-09 Akim Demaille <akim@epita.fr>
12445 * doc/bison.texinfo: Properly set the ``header'' part.
12446 Use @dircategory ``GNU programming tools'' as per Texinfo's
12450 2002-07-09 Akim Demaille <akim@epita.fr>
12452 * lib/quotearg.h: Protect against multiple inclusions.
12453 * src/location.h (location_t): Add a `file' member.
12454 (LOCATION_RESET, LOCATION_PRINT): Adjust.
12455 * src/complain.c (warn_at, complain_at, fatal_at): Drop
12456 `error_one_per_line' support.
12458 2002-07-09 Akim Demaille <akim@epita.fr>
12460 * src/complain.h, src/complain.c (warn, complain): Remove, unused.
12461 * src/reader.c (lineno): Remove.
12462 Adjust all dependencies.
12463 (get_merge_function): Take a location and use complain_at.
12464 * src/symtab.h, src/symtab.c (symbol_make_alias): Likewise.
12465 * tests/regression.at (Invalid inputs, Mixing %token styles):
12468 2002-07-09 Akim Demaille <akim@epita.fr>
12470 * src/parse-gram.y (rules_or_grammar_declaration): Add an error
12471 recovery rule, and forbid extensions when --yacc.
12472 (gram_error): Use complain_at.
12473 * src/reader.c (reader): Exit if there were parse errors.
12475 2002-07-09 Akim Demaille <akim@epita.fr>
12477 * tests/synclines.at (AT_SYNCLINES_COMPILE): New.
12478 (AT_TEST_SYNCLINE): Adjust to unusual GCC outputs.
12479 Reported by R Blake <blakers@mac.com>.
12481 2002-07-09 Akim Demaille <akim@epita.fr>
12483 * data/yacc.c: Output the copyright notive in the header.
12485 2002-07-03 Akim Demaille <akim@epita.fr>
12487 * src/output.c (froms, tos): Are state_number_t.
12488 (save_column): sp, sp1, and sp2 are state_number_t.
12489 (prepare): Rename `final' as `final_state_number', `nnts' as
12490 `nterms_number', `nrules' as `rules_number', `nstates' as
12491 `states_number', and `ntokens' as `tokens_number'. Remove `nsym',
12493 * data/yacc.c, data/glr.c, data/lalr1.cc: Adjust.
12494 * data/lalr1.cc (nsym_): Remove, unused.
12496 2002-07-03 Akim Demaille <akim@epita.fr>
12498 * src/lalr.h, src/lalr.c (goto_number_t): New.
12499 * src/lalr.c (goto_list_t): New.
12501 * src/nullable.c (rule_list_t): New.
12503 * src/types.h: Remove.
12505 2002-07-03 Akim Demaille <akim@epita.fr>
12507 * src/closure.c (print_fderives): Use rule_rhs_print.
12508 * src/derives.c (print_derives): Use rule_rhs_print.
12509 (rule_list_t): New, replaces `shorts'.
12510 (set_derives): Add comments.
12511 * tests/sets.at (Nullable, Firsts): Adjust.
12513 2002-07-03 Akim Demaille <akim@epita.fr>
12515 * src/output.c (prepare_actions): Free `tally' and `width'.
12516 (prepare_actions): Allocate and free `order'.
12517 * src/symtab.c (symbols_free): Free `symbols'.
12518 * src/scan-gram.l (scanner_free): Clear Flex's scanners memory.
12519 * src/output.c (m4_invoke): Move to...
12520 * src/scan-skel.l: here.
12521 (<<EOF>>): Close yyout, and free its name.
12523 2002-07-03 Akim Demaille <akim@epita.fr>
12525 Fix some memory leaks, and fix a bug: state 0 was examined twice.
12527 * src/LR0.c (new_state): Merge into...
12528 (state_list_append): this.
12529 (new_states): Merge into...
12530 (generate_states): here.
12531 (set_states): Don't ensure a proper `errs' state member here, do it...
12532 * src/conflicts.c (conflicts_solve): here.
12533 * src/state.h, src/state.c: Comment changes.
12534 (state_t): Rename member `shifts' as `transitions'.
12535 Adjust all dependencies.
12536 (errs_new): For consistency, also take the values as argument.
12537 (errs_dup): Remove.
12538 (state_errs_set): New.
12539 (state_reductions_set, state_transitions_set): Assert that no
12540 previous value was assigned.
12542 (states_free): Use it.
12543 * src/conflicts.c (resolve_sr_conflict): Don't use an `errs_t' as
12544 temporary storage: use `errs' and `nerrs' as elsewhere.
12545 (set_conflicts): Allocate and free this `errs'.
12547 2002-07-02 Akim Demaille <akim@epita.fr>
12549 * lib/libiberty.h: New.
12550 * lib: Update the bitset implementation from upstream.
12551 * src/closure.c, src/lalr.c, src/output.c, src/print_graph.c,
12552 * src/state.c: Use BITSET_FOR_EACH, not BITSET_EXECUTE.
12553 * src/main.c: Adjust bitset stats calls.
12555 2002-07-01 Paul Eggert <eggert@twinsun.com>
12557 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>): Convert to unsigned
12558 char, so that negative chars don't collide with $.
12560 2002-06-30 Akim Demaille <akim@epita.fr>
12562 Have the GLR tests be `warning' checked, and fix the warnings.
12564 * data/glr.c (YYFPRINTF): Always define it, not only when YYDEBUG
12565 (yyuserAction, yyreportAmbiguity): `Use' all the arguments.
12566 (yyremoveDeletes): `yyi' and `yyj' are size_t.
12567 Use YYFPRINTF when under if (YYDEBUG) to avoid empty `if' bodies.
12568 (yyaddDeferredAction): static.
12569 (yyglrReduce): yyi, yyk, amd yyposn are size_t.
12570 (yyreportParseError): yyprefix is const.
12571 yytokenp is used only when verbose.
12572 (yy__GNUC__): Replace with __GNUC__.
12573 (yypdumpstack): yyi is size_t.
12574 (yypreference): Un-yy local variables and arguments, to avoid
12575 clashes with `yyr1'. Anyway, we are not in the user name space.
12576 (yytname_size): be an int, as is compared with ints.
12577 * tests/testsuite.at (AT_COMPILE, AT_PARSER_CHECK): New.
12579 * tests/cxx-gram.at: Use quotation to protect $1.
12580 Use AT_COMPILE to enable warnings hunts.
12581 Prototype yylex and yyerror.
12583 Include `string.h', not `strings.h'.
12584 Produce and prototype stmtMerge only when used.
12585 yylex takes a location.
12587 2002-06-30 Akim Demaille <akim@epita.fr>
12589 We spend a lot of time in quotearg, in particular when --verbose.
12591 * src/symtab.c (symbol_get): Store a quoted version of the key.
12592 (symbol_tag_get, symbol_tag_get_n, symbol_tag_print): Remove.
12593 Adjust all callers.
12595 2002-06-30 Akim Demaille <akim@epita.fr>
12597 * src/state.h (reductions_t): Rename member `nreds' as num.
12598 (errs_t): Rename members `nerrs' and `errs' as `num' and `symbols'.
12599 * src/state.c (ERRS_ALLOC, REDUCTIONS_ALLOC): Use the correct types.
12601 2002-06-30 Akim Demaille <akim@epita.fr>
12603 * src/state.h, src/state.c (shift_t, SHIFT_SYMBOL, SHIFT_IS_SHIFT)
12604 (SHIFT_IS_GOTO, SHIFT_IS_ERROR, SHIFT_DISABLE, SHIFT_IS_DISABLED)
12605 (shifts_to): Rename as...
12606 (transition_t, TRANSITION_SYMBOL, TRANSITION_IS_TRANSITION)
12607 (TRANSITION_IS_GOTO, TRANSITION_IS_ERROR, TRANSITION_DISABLE)
12608 (TRANSITION_IS_DISABLED, transitions_to): these.
12610 2002-06-30 Akim Demaille <akim@epita.fr>
12612 * src/print.c (print_shifts, print_gotos): Merge into...
12613 (print_transitions): this.
12614 (print_transitions, print_errs, print_reductions): Align the
12615 lookaheads columns.
12616 (print_core, print_transitions, print_errs, print_state,
12617 print_grammar): Output empty lines separator before, not after.
12618 (state_default_rule_compute): Rename as...
12619 (state_default_rule): this.
12620 * tests/conflicts.at (Defaulted Conflicted Reduction),
12621 (Unresolved SR Conflicts, Resolved SR Conflicts): Adjust.
12622 * tests/regression.at (Rule Line Numbers, Web2c Report): Adjust.
12624 2002-06-30 Akim Demaille <akim@epita.fr>
12626 Display items as we display rules.
12628 * src/gram.h, src/gram.c (rule_lhs_print): New.
12629 * src/gram.c (grammar_rules_partial_print): Use it.
12630 * src/print.c (print_core): Likewise.
12631 * tests/conflicts.at (Defaulted Conflicted Reduction),
12632 (Unresolved SR Conflicts): Adjust.
12633 (Unresolved SR Conflicts): Adjust and rename as...
12634 (Resolved SR Conflicts): this, as was meant.
12635 * tests/regression.at (Web2c Report): Adjust.
12637 2002-06-30 Akim Demaille <akim@epita.fr>
12639 * src/print.c (state_default_rule_compute): New, extracted from...
12640 (print_reductions): here.
12641 Pessimize, but clarify the code.
12642 * tests/conflicts.at (Defaulted Conflicted Reduction): New.
12644 2002-06-30 Akim Demaille <akim@epita.fr>
12646 * src/output.c (action_row): Let default_rule be always a rule
12649 2002-06-30 Akim Demaille <akim@epita.fr>
12651 * src/closure.c (print_firsts, print_fderives, closure):
12652 Use BITSET_EXECUTE.
12653 * src/lalr.c (lookaheads_print): Likewise.
12654 * src/state.c (state_rule_lookaheads_print): Likewise.
12655 * src/print_graph.c (print_core): Likewise.
12656 * src/print.c (print_reductions): Likewise.
12657 * src/output.c (action_row): Likewise.
12658 Use SHIFT_IS_DISABLED, SHIFT_IS_SHIFT and SHIFT_SYMBOL.
12660 2002-06-30 Akim Demaille <akim@epita.fr>
12662 * src/print_graph.c: Use report_flag.
12664 2002-06-30 Akim Demaille <akim@epita.fr>
12666 * src/lalr.c (traverse, digraph, matrix_print, transpose): Move
12668 * src/relation.h, src/relation.c (traverse, relation_digraph)
12669 (relation_print, relation_transpose): New.
12671 2002-06-30 Akim Demaille <akim@epita.fr>
12673 * src/state.h, src/state.c (shifts_to): New.
12674 * src/lalr.c (build_relations): Use it.
12676 2002-06-30 Akim Demaille <akim@epita.fr>
12678 * src/gram.h (rule_number_t, RULE_NUMBER_MAX, int_of_rule_number)
12679 (item_number_of_rule_number, rule_number_of_item_number): New.
12680 * src/LR0.c, src/closure.c, src/derives.c, src/derives.h,
12681 * src/gram.c, src/lalr.c, src/nullable.c, src/output.c, src/print.c,
12682 * src/print_graph.c, src/reader.c, src/reduce.c, src/reduce.h:
12683 Propagate their use.
12684 Much remains to be done, in particular wrt `shorts' from types.h.
12686 2002-06-30 Akim Demaille <akim@epita.fr>
12688 * src/symtab.c (symbol_new): Initialize the `printer' member.
12690 2002-06-30 Akim Demaille <akim@epita.fr>
12692 * src/LR0.c (save_reductions): Remove, replaced by...
12693 * src/state.h, src/state.c (state_reductions_set): New.
12694 (reductions, errs): Rename as...
12695 (reductions_t, errs_t): these.
12696 Adjust all dependencies.
12698 2002-06-30 Akim Demaille <akim@epita.fr>
12700 * src/LR0.c (state_list_t, state_list_append): New.
12701 (first_state, last_state): Now symbol_list_t.
12702 (this_state): Remove.
12703 (new_itemsets, append_states, save_reductions): Take a state_t as
12705 (set_states, generate_states): Adjust.
12706 (save_shifts): Remove, replaced by...
12707 * src/state.h, src/state.c (state_shifts_set): New.
12708 (shifts): Rename as...
12710 Adjust all dependencies.
12711 * src/state.h (state_t): Remove the `next' member.
12713 2002-06-30 Akim Demaille <akim@epita.fr>
12715 * src/vcg.c (quote): Use slot 2, since we often pass symbol tag
12718 2002-06-30 Akim Demaille <akim@epita.fr>
12720 Use hash.h for the state hash table.
12722 * src/LR0.c (STATE_HASH_SIZE, state_hash): Remove.
12723 (allocate_storage): Use state_hash_new.
12724 (free_storage): Use state_hash_free.
12725 (new_state, get_state): Adjust.
12726 * src/lalr.h, src/lalr.c (states): Move to...
12727 * src/states.h (state_t): Remove the `link' member, no longer
12729 * src/states.h, src/states.c: here.
12730 (state_hash_new, state_hash_free, state_hash_lookup)
12731 (state_hash_insert, states_free): New.
12732 * src/states.c (state_table, state_compare, state_hash): New.
12733 * src/output.c (output_actions): Do not free states now, since we
12734 still need to know the final_state number in `prepare', called
12735 afterwards. Do it...
12736 * src/main.c (main): here: call states_free after `output'.
12738 2002-06-30 Akim Demaille <akim@epita.fr>
12740 * src/state.h, src/state.c (state_new): New, extracted from...
12741 * src/LR0.c (new_state): here.
12742 * src/state.h (STATE_ALLOC): Move to...
12743 * src/state.c: here.
12744 * src/LR0.h, src/LR0.c (nstates, final_state): Move to...
12745 * src/state.h, src/state.c: here.
12747 2002-06-30 Akim Demaille <akim@epita.fr>
12749 * src/reader.c (gensym): Rename as...
12750 * src/symtab.h, src/symtab.c (dummy_symbol_get): this.
12751 (getsym): Rename as...
12752 (symbol_get): this.
12754 2002-06-30 Akim Demaille <akim@epita.fr>
12756 * src/state.h (state_number_t, STATE_NUMBER_MAX): New.
12757 * src/LR0.c, src/LR0.h, src/conflicts.c, src/lalr.c, src/lalr.h,
12758 * src/output.c, src/print.c, src/print_graph.c: Propagate.
12759 * src/LR0.h, src/LR0.h (final_state): Is a state_t*.
12761 2002-06-30 Akim Demaille <akim@epita.fr>
12763 Make the test suite pass with warnings checked.
12765 * tests/actions.at (Printers and Destructors): Improve.
12766 Avoid unsigned vs. signed issues.
12767 * tests/calc.at: Don't exercise the scanner here, do it...
12768 * tests/input.at (Torturing the Scanner): here.
12770 2002-06-28 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
12772 * data/glr.c: Correct typo in Emacs-mode directive. Slightly
12773 reorganize first lines parallel to yacc.c.
12775 2002-06-28 Akim Demaille <akim@epita.fr>
12777 * data/c.m4 (b4_copyright, b4_sint_type, b4_uint_type, b4_token_define)
12778 (b4_token_enum, b4_token_defines): New, factored from...
12779 * data/lalr1.cc, data/yacc.c, glr.c: here.
12781 2002-06-28 Akim Demaille <akim@epita.fr>
12783 * data/yacc.c (yydestruct, yysymprint): Pacify GCC warnings for
12785 * src/output.c (merger_output): static.
12787 2002-06-28 Akim Demaille <akim@epita.fr>
12789 * src/reader.h: s/grammer_current_rule_merge_set/grammar_.../.
12790 * src/conflicts.c (conflicts_total_count): `i' is unsigned, to
12792 * src/output.c (save_row): Initialize all the variables to pacify GCC.
12794 2002-06-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
12796 Accumulated changelog for new GLR parsing features.
12798 * src/conflicts.c (count_total_conflicts): Change name to
12799 conflicts_total_count.
12800 * src/conflicts.h: Ditto.
12801 * src/output.c (token_actions): Use the new name.
12802 (output_conflicts): Change conflp => conflict_list_heads, and
12803 confl => conflict_list for better readability.
12804 * data/glr.c: Use the new names.
12805 * NEWS: Add self to GLR announcement.
12807 * src/reader.c (free_merger_functions): Cleanup: XFREE->free.
12809 * doc/bison.texinfo (GLR Parsers): Make corrections suggested by
12812 * data/bison.glr: Change name to glr.c
12813 * data/glr.c: Renamed from bison.glr.
12814 * data/Makefile.am: Add glr.c
12818 * src/symlist.h: Add dprec and merger fields to symbol_list_s.
12819 * src/symlist.c (symbol_list_new): Initialize dprec and merger fields.
12821 Originally 2002-06-16 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
12823 * data/bison.glr: Be sure to restore the
12824 current #line when returning to the skeleton contents after having
12825 exposed the input file's #line.
12827 Originally 2002-06-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
12829 * data/bison.glr: Bring up to date with changes to bison.simple.
12831 Originally 2002-06-03 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
12833 * data/bison.glr: Correct definitions that use b4_prefix.
12834 Various reformatting.
12835 (GLRStack): Make yychar (in YYPURE case) and yytokenp as part of stack.
12836 (yyreportParseError, yyrecoverParseError, yyprocessOneStack): remove
12837 yytokenp argument; now part of stack.
12838 (yychar): Define to behave as documented.
12839 (yyclearin): Ditto.
12841 Originally 2002-05-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
12843 * src/reader.h: Add declaration for free_merger_functions.
12845 * src/reader.c (merge_functions): New variable.
12846 (get_merge_function): New function.
12847 (free_merger_functions): New function.
12848 (readgram): Check for %prec that is not followed by a symbol.
12849 Handle %dprec and %merge declarations.
12850 (packgram): Initialize dprec and merger fields in rules array.
12852 * src/output.c (conflict_tos, conflrow, conflict_table, conflict_list,
12853 conflict_list_cnt, conflict_list_free): New variables.
12854 (table_grow): Also grow conflict_table.
12855 (prepare_rules): Output dprec and merger tables.
12856 (conflict_row): New function.
12857 (action_row): Output conflict lists for GLR parser. Don't use
12858 default reduction in conflicted states for GLR parser so that there
12859 are spaces for the conflict lists.
12860 (save_row): Also save conflict information.
12861 (token_actions): Allocate conflict list.
12862 (merger_output): New function.
12863 (pack_vector): Pack conflict table, too.
12864 (output_conflicts): New function to output yyconflp and yyconfl.
12865 (output_check): Allocate conflict_tos.
12866 (output_actions): Output conflict tables, also.
12867 (output_skeleton): Output b4_mergers definition.
12868 (prepare): Output b4_max_rhs_length definition.
12869 Use 'bison.glr' as default skeleton for GLR parsers.
12871 * src/gram.c (glr_parser): New flag.
12872 (grammar_free): Call free_merger_functions.
12874 * src/conflicts.c (count_rr_conflicts): Augment to optionally count
12875 all pairs of conflicting reductions, rather than just all tokens
12876 causing conflicts. Needed to size conflict tables.
12877 (conflicts_output): Modify call to count_rr_conflicts for new
12879 (conflicts_print): Ditto.
12880 (count_total_conflicts): New function.
12882 * src/reader.h (merger_list): New type.
12883 (merge_functions): New variable.
12885 * src/lex.h (tok_dprec, tok_merge): New token types.
12887 * src/gram.h (rule_s): Add dprec and merger fields.
12888 (glr_parser): New flag.
12890 * src/conflicts.h (count_total_conflicts): New function.
12892 * src/options.c (option_table): Add %dprec, %merge, and %glr-parser.
12894 * doc/bison.texinfo (Generalized LR Parsing): New section.
12895 (GLR Parsers): New section.
12896 (Language and Grammar): Mention GLR parsing.
12897 (Table of Symbols): Add %dprec, %glr-parser, %merge, GLR
12898 Correct typo ("tge" -> "the").
12900 * data/bison.glr: New skeleton for GLR parsing.
12902 * tests/cxx-gram.at: New tests for GLR parsing.
12904 * tests/testsuite.at: Include cxx-gram.at.
12906 * tests/Makefile.am: Add cxx-gram.at.
12908 * src/parse-gram.y:
12910 * src/scan-gram.l: Add %dprec, %glr-parser, %merge.
12912 * src/parse-gram.y: Grammar for %dprec, %merge, %glr-parser.
12914 2002-06-27 Akim Demaille <akim@epita.fr>
12916 * src/options.h, src/options.c: Remove.
12917 * src/getargs.c (short_options, long_options): New.
12919 2002-06-27 Akim Demaille <akim@epita.fr>
12921 * data/bison.simple, data/bison.c++: Rename as...
12922 * data/yacc.c, data/lalr1.cc: these.
12923 * doc/bison.texinfo (Environment Variables): Remove.
12925 2002-06-25 Raja R Harinath <harinath@cs.umn.edu>
12927 * src/getargs.c (report_argmatch): Initialize strtok().
12929 2002-06-20 Akim Demaille <akim@epita.fr>
12931 * data/bison.simple (b4_symbol_actions): New, replaces...
12932 (b4_symbol_destructor, b4_symbol_printer): these.
12933 (yysymprint): Be sure to call YYPRINT only for tokens, and using
12934 user token numbers.
12936 2002-06-20 Akim Demaille <akim@epita.fr>
12938 * data/bison.simple (yydestructor): Rename as...
12939 (yydestruct): this.
12941 2002-06-20 Akim Demaille <akim@epita.fr>
12943 * src/symtab.h, src/symtab.c (symbol_type_set)
12944 (symbol_destructor_set, symbol_precedence_set): The location is
12946 Adjust all callers.
12948 2002-06-20 Akim Demaille <akim@epita.fr>
12950 * src/parse-gram.y (YYPRINT, yyprint): Don't mess with the parser
12952 * src/reader.h, src/reader.c (grammar_current_rule_prec_set):
12954 * src/symtab.h, src/symtab.c (symbol_class_set)
12955 (symbol_user_token_number_set): Likewise.
12956 Adjust all callers.
12957 Promote complain_at.
12958 * tests/input.at (Type Clashes): Adjust.
12960 2002-06-20 Akim Demaille <akim@epita.fr>
12962 * data/bison.simple (YYLEX): Fix the declaration when
12965 2002-06-20 Akim Demaille <akim@epita.fr>
12967 * data/bison.simple (yysymprint): Don't print the token number,
12969 * tests/actions.at (Destructors): Rename as...
12970 (Printers and Destructors): this.
12971 Also exercise %printer.
12973 2002-06-20 Akim Demaille <akim@epita.fr>
12975 * data/bison.simple (YYDSYMPRINT): New.
12976 Use it to remove many of the #if YYDEBUG/if (yydebug).
12978 2002-06-20 Akim Demaille <akim@epita.fr>
12980 * src/symtab.h, src/symtab.c (symbol_t): printer and
12981 printer_location are new members.
12982 (symbol_printer_set): New.
12983 * src/parse-gram.y (PERCENT_PRINTER): New token.
12984 Handle its associated rule.
12985 * src/scan-gram.l: Adjust.
12986 (handle_destructor_at, handle_destructor_dollar): Rename as...
12987 (handle_symbol_code_at, handle_symbol_code_dollar): these.
12988 * src/output.c (symbol_printers_output): New.
12989 (output_skeleton): Call it.
12990 * data/bison.simple (yysymprint): New. Cannot be named yyprint
12991 since there are already many grammar files with a user `yyprint'.
12992 Replace the calls to YYPRINT to calls to yysymprint.
12993 * tests/calc.at: Adjust.
12994 * tests/torture.at (AT_DATA_STACK_TORTURE): Remove YYPRINT: it was
12995 taking advantage of parser very internal details (stack size!).
12997 2002-06-20 Akim Demaille <akim@epita.fr>
12999 * src/scan-gram.l: Complete the scanner with the missing patterns
13001 Use `quote' and `symbol_tag_get' where appropriate.
13003 2002-06-19 Akim Demaille <akim@epita.fr>
13005 * tests/actions.at (Destructors): Augment to test locations.
13006 * data/bison.simple (yydestructor): Pass it the current location
13007 if locations are enabled.
13008 Prototype only when __STDC__ or C++.
13009 Change the argument names to move into the yy name space: there is
13012 2002-06-19 Akim Demaille <akim@epita.fr>
13014 * data/bison.simple (b4_pure_if): New.
13015 Use it instead of #ifdef YYPURE.
13017 2002-06-19 Akim Demaille <akim@epita.fr>
13019 * data/bison.simple (b4_location_if): New.
13020 Use it instead of #ifdef YYLSP_NEEDED.
13022 2002-06-19 Akim Demaille <akim@epita.fr>
13024 Prepare @$ in %destructor, but currently don't bind it in the
13025 skeleton, as %location use is not cleaned up yet.
13027 * src/scan-gram.l (handle_dollar, handle_destructor_at)
13028 (handle_action_at): New.
13029 (handle_at, handle_action_dollar, handle_destructor_dollar): Take
13030 a braced_code_t and a location as additional arguments.
13031 (handle_destructor_dollar): Instead of requiring `b4_eval', just
13032 unquote one when outputting `b4_dollar_dollar'.
13034 * data/bison.simple (b4_eval): Remove.
13035 (b4_symbol_destructor): Adjust.
13036 * tests/input.at (Invalid @n): Adjust.
13038 2002-06-19 Zack Weinberg <zack@codesourcery.com>
13040 * doc/bison.texinfo: Document ability to have multiple
13043 2002-06-18 Akim Demaille <akim@epita.fr>
13045 * src/files.c (compute_base_names): When computing the output file
13046 names from the input file name, strip the directory part.
13048 2002-06-18 Akim Demaille <akim@epita.fr>
13050 * data/bison.simple.new: Comment changes.
13051 Reported by Andreas Schwab.
13053 2002-06-18 Matt Kraai <kraai@alumni.cmu.edu>
13055 * data/bison.simple (yyoverflowlab): #ifndef yyoverflow, so that
13056 there are no `label `yyoverflowlab' defined but not used' warnings
13057 when yyoverflow is defined.
13059 2002-06-18 Akim Demaille <akim@epita.fr>
13061 * src/symtab.h, src/symtab.c (symbol_t): destructor_location is a
13063 (symbol_destructor_set): Adjust.
13064 * src/output.c (symbol_destructors_output): Output the destructor
13066 Output the symbol name.
13067 * data/bison.simple (b4_symbol_destructor): Adjust.
13069 2002-06-18 Cris Bailiff <c.bailiff@awayweb.com>
13070 and Akim Demaille <akim@epita.fr>
13072 * data/bison.simple.new (yyerrlab1): Be sure to pop and destroy
13073 what's left on the stack when the error recovery hits EOF.
13074 * tests/actions.at (Destructors): Complete to exercise this case.
13076 2002-06-17 Akim Demaille <akim@epita.fr>
13078 * data/m4sugar/m4sugar.m4 (m4_map): Recognize when the list of
13079 arguments is really empty, not only equal to `[]'.
13080 * src/symtab.h, src/symtab.c (symbol_t): `destructor' is a new
13082 (symbol_destructor_set): New.
13083 * src/output.c (symbol_destructors_output): New.
13084 * src/reader.h (brace_code_t, current_braced_code): New.
13085 * src/scan-gram.l (BRACED_CODE): Use it to branch on...
13086 (handle_dollar): Rename as...
13087 (handle_action_dollar): this.
13088 (handle_destructor_dollar): New.
13089 * src/parse-gram.y (PERCENT_DESTRUCTOR): New.
13090 (grammar_declaration): Use it.
13091 * data/bison.simple (yystos): Is always defined.
13092 (yydestructor): New.
13093 * tests/actions.at (Destructors): New.
13094 * tests/calc.at (_AT_CHECK_CALC_ERROR): Don't rely on egrep.
13096 2002-06-17 Akim Demaille <akim@epita.fr>
13098 * src/symlist.h, src/symlist.c (symbol_list_length): New.
13099 * src/scan-gram.l (handle_dollar, handle_at): Compute the
13100 rule_length only when needed.
13101 * src/output.c (actions_output, token_definitions_output): Output
13103 * src/symtab.c: Don't access directly to the symbol tag, use
13105 * src/parse-gram.y: Use symbol_list_free.
13107 2002-06-17 Akim Demaille <akim@epita.fr>
13109 * src/reader.h, src/reader.c (symbol_list, symbol_list_new)
13110 (symbol_list_prepend, get_type_name): Move to...
13111 * src/symlist.h, src/symlist.c (symbol_list_t, symbol_list_new)
13112 (symbol_list_prepend, symbol_list_n_type_name_get): here.
13113 Adjust all callers.
13114 (symbol_list_free): New.
13115 * src/scan-gram.l (handle_dollar): Takes a location.
13116 * tests/input.at (Invalid $n): Adjust.
13118 2002-06-17 Akim Demaille <akim@epita.fr>
13120 * src/reader.h, src/reader.c (symbol_list_new): Export it.
13121 (symbol_list_prepend): New.
13122 * src/parse-gram.y (%union): `list' is a new member.
13123 (symbols.1): New, replaces...
13124 (terms_to_prec.1, nterms_to_type.1): these.
13125 * src/symtab.h, src/symtab.c (symbol_type_set, symbol_precedence_set)
13126 Take a location as additional argument.
13127 Adjust all callers.
13129 2002-06-15 Akim Demaille <akim@epita.fr>
13131 * src/parse-gram.y: Move %token in the declaration section so that
13132 we don't depend upon CVS Bison.
13134 2002-06-15 Akim Demaille <akim@epita.fr>
13136 * src/state.h, src/state.c (state_rule_lookaheads_print): New.
13137 * src/print.c (print_core): Use it.
13139 2002-06-15 Akim Demaille <akim@epita.fr>
13141 * src/conflicts.c (log_resolution): Accept the rule involved in
13142 the sr conflicts instead of the lookahead number that points to
13144 (flush_reduce): Accept the current lookahead vector as argument,
13145 instead of the index in LA.
13146 (resolve_sr_conflict): Accept the current number of lookahead
13147 bitset to consider for the STATE, instead of the index in LA.
13148 (set_conflicts): Adjust.
13149 * src/lalr.c, src/lalr.h, src/state.h: Comment changes.
13151 2002-06-15 Akim Demaille <akim@epita.fr>
13153 * src/state.h (state_t): Replace the `lookaheadsp' member, a
13154 short, with `lookaheads' (bitsetv), `lookaheads_rule' (rule_t**).
13155 Adjust all dependencies.
13156 * src/lalr.c (initialize_lookaheads): Split into...
13157 (states_lookaheads_count, states_lookaheads_initialize): these.
13160 2002-06-15 Akim Demaille <akim@epita.fr>
13162 * src/gram.h, src/gram.c (grammar_rules_partial_print): New, eved
13164 (grammar_rules_print): here.
13165 * src/reduce.c (reduce_output): Use it.
13166 * tests/reduce.at (Useless Rules, Reduced Automaton)
13167 (Underivable Rules): Adjust.
13169 2002-06-15 Akim Demaille <akim@epita.fr>
13171 Copy BYacc's nice way to report the grammar.
13173 * src/gram.h, src/gram.c (grammar_rhs_print, grammar_rules_print):
13175 Don't print the rules' location, it is confusing and useless.
13176 (rule_print): Use grammar_rhs_print.
13177 * src/print.c (print_grammar): Use grammar_rules_print.
13179 2002-06-15 Akim Demaille <akim@epita.fr>
13181 Complete and rationalize `useless thing' warnings.
13183 * src/symtab.h, src/symtab.c (symbol_tag_get, symbol_tag_get_n)
13184 (symbol_tag_print): New.
13185 Use them everywhere in place of accessing directly the tag member.
13186 * src/gram.h, src/gram.c (rule_print): New.
13187 Use it where a rule used to be printed `by hand'.
13188 * src/reduce.c (nonterminals_reduce): Report the use nonterminals.
13189 (reduce_grammar_tables): Report the useless rules.
13190 (reduce_print): Useless things are a warning, not an error.
13192 * tests/reduce.at (Useless Nonterminals, Useless Rules):
13193 (Reduced Automaton, Underivable Rules): Adjust.
13194 * tests/regression.at (Web2c Report, Web2c Report): Adjust.
13195 * tests/conflicts.at (Unresolved SR Conflicts)
13196 (Solved SR Conflicts): Adjust.
13198 2002-06-15 Akim Demaille <akim@epita.fr>
13200 Let symbols have a location.
13202 * src/symtab.h, src/symtab.c (symbol_t): Location is a new member.
13204 Adjust all callers.
13205 * src/complain.h, src/complain.c (complain_at, fatal_at, warn_at):
13206 Use location_t, not int.
13207 * src/symtab.c (symbol_check_defined): Take advantage of the
13209 * tests/regression.at (Invalid inputs): Adjust.
13211 2002-06-15 Akim Demaille <akim@epita.fr>
13213 * src/parse-gram.y (YYLLOC_DEFAULT, current_lhs_location): New.
13214 (input): Don't try to initialize yylloc here, do it in the
13216 * src/scan-gram.l (YY_USER_INIT): Initialize yylloc.
13217 * src/gram.h (rule_t): Change line and action_line into location
13218 and action_location, of location_t type.
13219 Adjust all dependencies.
13220 * src/location.h, src/location.c (empty_location): New.
13221 * src/reader.h, src/reader.c (grammar_start_symbol_set)
13222 (grammar_symbol_append, grammar_rule_begin, grammar_rule_end)
13223 (grammar_current_rule_symbol_append)
13224 (grammar_current_rule_action_append): Expect a location as argument.
13225 * src/reader.c (grammar_midrule_action): Adjust to attach an
13226 action's location as dummy symbol location.
13227 * src/symtab.h, src/symtab.c (startsymbol_location): New.
13228 * tests/regression.at (Web2c Report, Rule Line Numbers): Adjust
13231 2002-06-14 Akim Demaille <akim@epita.fr>
13233 Grammar declarations may be found in the grammar section.
13235 * src/parse-gram.y (rules_or_grammar_declaration): New.
13236 (declarations): Each declaration may end with a semicolon, not
13238 (grammar_declaration): `"%union"'.
13239 (grammar): Branch to rules_or_grammar_declaration.
13241 2002-06-14 Akim Demaille <akim@epita.fr>
13243 * src/main.c (main): Invoke scanner_free.
13245 2002-06-14 Akim Demaille <akim@epita.fr>
13247 * src/output.c (m4_invoke): Extracted from...
13248 (output_skeleton): here.
13251 2002-06-14 Akim Demaille <akim@epita.fr>
13253 * src/parse-gram.y (directives, directive, gram)
13254 (grammar_directives, precedence_directives, precedence_directive):
13256 (declarations, declaration, grammar, grammar_declaration)
13257 (precedence_declaration, precedence_declarator): these.
13258 (symbol_declaration): New.
13260 2002-06-14 Akim Demaille <akim@epita.fr>
13262 * src/files.c (action_obstack): Remove, unused.
13263 (output_obstack): Remove it, and all its dependencies, as it is no
13265 * src/reader.c (epilogue_set): Build the epilogue in the
13267 * src/output.h, src/output.c (muscle_obstack): Move to...
13268 * src/muscle_tab.h, src/muscle_tab.h: here.
13269 (muscle_init): Initialize muscle_obstack.
13270 (muscle_free): New.
13271 * src/main.c (main): Call it.
13273 2002-06-14 Akim Demaille <akim@epita.fr>
13275 * src/location.h: New, extracted from...
13276 * src/reader.h: here.
13277 * src/Makefile.am (noinst_HEADERS): Merge into
13278 (bison_SOURCES): this.
13280 * src/parse-gram.y: Use location_t instead of Bison's.
13281 * src/reader.h, src/reader.c (prologue_augment, epilogue_set):
13282 Use location_t instead of ints.
13284 2002-06-14 Akim Demaille <akim@epita.fr>
13286 * data/bison.simple, data/bison.c++: Be sure to restore the
13287 current #line when returning to the skeleton contents after having
13288 exposed the input file's #line.
13290 2002-06-12 Akim Demaille <akim@epita.fr>
13292 * src/scan-gram.l (SC_BRACED_CODE): Don't use `<.*>', it is too
13294 * tests/actions.at (Exotic Dollars): New.
13296 2002-06-12 Akim Demaille <akim@epita.fr>
13298 * src/scan-gram.l (SC_PROLOGUE): Don't eat characters amongst
13300 * tests/input.at (Torturing the Scanner): New.
13302 2002-06-11 Akim Demaille <akim@epita.fr>
13304 * src/scan-gram.l (YY_OBS_INIT): Remove, replace with...
13305 [SC_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,SC_PROLOGUE]
13306 [SC_EPILOGUE]: Output the quadrigraphs only when not in a comment.
13307 * src/reader.h, src/scan-gram.l (scanner_initialize): this.
13308 * src/reader.c (reader): Use it.
13310 2002-06-11 Akim Demaille <akim@epita.fr>
13312 * src/scan-gram.l (YY_OBS_FINISH): Don't set yylval.
13313 Adjust all callers.
13314 (scanner_last_string_free): New.
13316 2002-06-11 Akim Demaille <akim@epita.fr>
13318 * src/scan-gram.l (YY_INIT, YY_GROW, YY_FINISH): Rename as...
13319 (YY_OBS_INIT, YY_OBS_GROW, YY_OBS_FINISH): these.
13320 (last_string, YY_OBS_FREE): New.
13321 Use them when returning an ID.
13323 2002-06-11 Akim Demaille <akim@epita.fr>
13325 Have Bison grammars parsed by a Bison grammar.
13327 * src/reader.c, src/reader.h (prologue_augment): New.
13328 * src/reader.c (copy_definition): Remove.
13330 * src/reader.h, src/reader.c (gram_start_symbol_set, prologue_augment)
13331 (grammar_symbol_append, grammar_rule_begin, grammar_midrule_action)
13332 (grammar_current_rule_prec_set, grammar_current_rule_check)
13333 (grammar_current_rule_symbol_append)
13334 (grammar_current_rule_action_append): Export.
13335 * src/parse-gram.y (symbol_list_new, symbol_list_symbol_append_
13336 (symbol_list_action_append): Remove.
13337 Hook the routines from reader.
13338 * src/scan-gram.l: In INITIAL, characters and strings are tokens.
13339 * src/system.h (ATTRIBUTE_NORETURN, ATTRIBUTE_UNUSED): Now.
13341 * src/reader.c (read_declarations): Remove, unused.
13343 * src/parse-gram.y: Handle the epilogue.
13344 * src/reader.h, src/reader.c (gram_start_symbol_set): Rename as...
13345 (grammar_start_symbol_set): this.
13346 * src/scan-gram.l: Be sure to ``use'' yycontrol to keep GCC quiet.
13347 * src/reader.c (readgram): Remove, unused.
13348 (reader): Adjust to insert eoftoken and axiom where appropriate.
13350 * src/reader.c (copy_dollar): Replace with...
13351 * src/scan-gram.h (handle_dollar): this.
13352 * src/parse-gram.y: Remove `%thong'.
13354 * src/reader.c (copy_at): Replace with...
13355 * src/scan-gram.h (handle_at): this.
13357 * src/complain.h, src/complain.c (warn_at, complain_at, fatal_at):
13360 * src/scan-gram.l (YY_LINES): Keep lineno synchronized for the
13363 * src/reader.h, src/reader.c (grammar_rule_end): New.
13365 * src/parse.y (current_type, current_class): New.
13366 Implement `%nterm', `%token' support.
13367 Merge `%term' into `%token'.
13368 (string_as_id): New.
13369 * src/symtab.h, src/symtab.c (symbol_make_alias): Don't pass the
13372 * src/parse-gram.y: Be sure to handle properly the beginning of
13375 * src/parse-gram.y: Handle %type.
13376 * src/reader.c (grammar_rule_end): Call grammar_current_rule_check.
13378 * src/parse-gram.y: More directives support.
13379 * src/options.c: No longer handle source directives.
13381 * src/parse-gram.y: Fix %output.
13383 * src/parse-gram.y: Handle %union.
13384 Use the prologue locations.
13385 * src/reader.c (parse_union_decl): Remove.
13387 * src/reader.h, src/reader.c (epilogue_set): New.
13388 * src/parse-gram.y: Use it.
13390 * data/bison.simple, data/bison.c++: b4_stype is now either not
13391 defined, then default to int, or to the contents of %union,
13392 without `union' itself.
13394 * src/muscle_tab.c (muscle_init): Don't predefine `stype'.
13396 * src/output.c (actions_output): Don't output braces, as they are
13397 already handled by the scanner.
13399 * src/scan-gram.l (SC_CHARACTER): Set the user_token_number of
13400 characters to themselves.
13402 * tests/reduce.at (Reduced Automaton): End the grammars with %% so
13403 that the epilogue has a proper #line.
13405 * src/parse-gram.y: Handle precedence/associativity.
13407 * src/symtab.c (symbol_precedence_set): Requires the symbol to be
13409 * src/scan-gram.l (SC_BRACED_CODE): Catch strings and characters.
13410 * tests/calc.at: Do not use `%token "foo"' as it makes not sense
13411 at all to define terminals that cannot be emitted.
13413 * src/scan-gram.l: Escape M4 characters.
13415 * src/scan-gram.l: Working properly with escapes in user
13416 strings/characters.
13418 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR)
13419 (AT_DATA_HORIZONTAL_GRAMMAR): Respect the `%token ID NUM STRING'
13421 Use more modest sizes, as for the time being the parser does not
13422 release memory, and therefore the process swallows a huge amount
13425 * tests/torture.at (AT_DATA_LOOKAHEADS_GRAMMAR): Adjust to the
13426 stricter %token grammar.
13428 * src/symtab.h (associativity): Add `undef_assoc'.
13429 (symbol_precedence_set): Do nothing when passed an undef_assoc.
13430 * src/symtab.c (symbol_check_alias_consistence): Adjust.
13432 * tests/regression.at (Invalid %directive): Remove, as it is now
13434 (Invalid inputs): Adjust to the new error messages.
13435 (Token definitions): The new grammar doesn't allow too many
13438 * src/lex.h, src/lex.c: Remove.
13439 * src/reader.c (lastprec, skip_to_char, read_signed_integer)
13440 (copy_character, copy_string2, copy_string, copy_identifier)
13441 (copy_comment, parse_token_decl, parse_type_decl, parse_assoc_decl)
13442 (parse_muscle_decl, parse_dquoted_param, parse_skel_decl)
13443 (parse_action): Remove.
13444 * po/POTFILES.in: Adjust.
13446 2002-06-11 Akim Demaille <akim@epita.fr>
13448 * src/reader.c (parse_action): Don't store directly into the
13449 rule's action member: return the action as a string.
13450 Don't require `rule_length' as an argument: compute it.
13451 (grammar_current_rule_symbol_append)
13452 (grammar_current_rule_action_append): New, eved out from
13454 Remove `action_flag', `rulelength', unused now.
13456 2002-06-11 Akim Demaille <akim@epita.fr>
13458 * src/reader.c (grammar_current_rule_prec_set).
13459 (grammar_current_rule_check): New, eved out from...
13461 Remove `xaction', `first_rhs': useless.
13462 * tests/input.at (Type clashes): New.
13463 * tests/existing.at (GNU Cim Grammar): Adjust.
13465 2002-06-11 Akim Demaille <akim@epita.fr>
13467 * src/reader.c (grammar_midrule_action): New, Eved out from
13470 2002-06-11 Akim Demaille <akim@epita.fr>
13472 * src/reader.c (grammar_rule_begin, previous_rule, current_rule):
13474 (readgram): Use them as replacement of inlined code, crule and
13477 2002-06-11 Akim Demaille <akim@epita.fr>
13479 * src/reader.c (grammar_end, grammar_symbol_append): New.
13480 (readgram): Use them.
13481 Make the use of `p' as local as possible.
13483 2002-06-10 Akim Demaille <akim@epita.fr>
13485 GCJ's parser requires the tokens to be defined before the prologue.
13487 * data/bison.simple: Output the token definition before the user's
13489 * tests/regression.at (Braces parsing, Duplicate string)
13490 (Mixing %token styles): Check the output from bison.
13491 (Early token definitions): New.
13493 2002-06-10 Akim Demaille <akim@epita.fr>
13495 * src/symtab.c (symbol_user_token_number_set): Don't complain when
13496 assigning twice the same user number to a token, so that we can
13498 * src/lex.c (lex): here.
13499 Also use `symbol_class_set' instead of hand written code.
13500 * src/reader.c (parse_assoc_decl): Likewise.
13502 2002-06-10 Akim Demaille <akim@epita.fr>
13504 * src/symtab.c, src/symtab.c (symbol_class_set)
13505 (symbol_user_token_number_set): New.
13506 * src/reader.c (parse_token_decl): Use them.
13507 Use a switch instead of ifs.
13508 Use a single argument.
13510 2002-06-10 Akim Demaille <akim@epita.fr>
13512 Remove `%thong' support as it is undocumented, unused, duplicates
13513 `%token's job, and creates useless e-mail traffic with people who
13514 want to know what it is, why it is undocumented, unused, and
13515 duplicates `%token's job.
13517 * src/reader.c (parse_thong_decl): Remove.
13518 * src/options.c (option_table): Remove "thong".
13519 * src/lex.h (tok_thong): Remove.
13521 2002-06-10 Akim Demaille <akim@epita.fr>
13523 * src/symtab.c, src/symtab.c (symbol_type_set)
13524 (symbol_precedence_set): New.
13525 * src/reader.c (parse_type_decl, parse_assoc_decl): Use them.
13526 (value_components_used): Remove, unused.
13528 2002-06-09 Akim Demaille <akim@epita.fr>
13530 Move symbols handling code out of the reader.
13532 * src/reader.h, src/reader.c (errtoken, undeftoken, eoftoken)
13533 (axiom): Move to...
13534 * src/symtab.h, src/symtab.c: here.
13536 * src/gram.c (start_symbol): Remove: use startsymbol->number.
13537 * src/reader.c (startval): Rename as...
13538 * src/symtab.h, src/symtab.c (startsymbol): this.
13539 * src/reader.c: Adjust.
13541 * src/reader.c (symbol_check_defined, symbol_make_alias)
13542 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
13543 (token_translations_init)
13545 * src/symtab.c: here.
13546 * src/reader.c (packsymbols): Move to...
13547 * src/symtab.h, src/symtab.c (symbols_pack): here.
13548 * src/symtab.h, src/symtab.c (symbol_make_alias): Takes SYMVAL as
13551 2002-06-03 Akim Demaille <akim@epita.fr>
13553 * src/muscle_tab.c (muscle_insert, muscle_find): Declarations,
13556 2002-06-03 Akim Demaille <akim@epita.fr>
13558 * src/muscle_tab.c (muscle_find, muscle_insert): Don't initialize
13559 structs with non literals.
13560 * src/scan-skel.l: never-interactive.
13561 * src/conflicts.c (enum conflict_resolution_e): No trailing
13563 * src/getargs.c (usage): Split long literal strings.
13564 Reported by Hans Aberg.
13566 2002-05-28 Akim Demaille <akim@epita.fr>
13568 * data/bison.c++: Use C++ ostreams.
13569 (cdebug_): New member.
13571 2002-05-28 Akim Demaille <akim@epita.fr>
13573 * src/output.c (output_skeleton): Be sure to allocate enough room
13574 for `/' _and_ for `\0' in full_skeleton.
13576 2002-05-28 Akim Demaille <akim@epita.fr>
13578 * data/bison.c++: Catch up with bison.simple:
13579 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
13580 and Paul Eggert <eggert@twinsun.com>: `error' handing.
13581 2002-05-26 Akim Demaille <akim@epita.fr>: stos_, token_number_,
13582 and popping traces.
13584 2002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
13586 * src/output.c (output_skeleton): Put an explicit path in front of
13587 the skeleton file name, rather than relying on the -I directory,
13588 to partially alleviate effects of having a skeleton file lying around
13589 in the current directory.
13591 2002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
13593 * src/conflicts.c (log_resolution): Correct typo:
13594 obstack_printf should be obstack_fgrow1.
13596 2002-05-26 Akim Demaille <akim@epita.fr>
13598 * src/state.h (state_t): `solved_conflicts' is a new member.
13599 * src/LR0.c (new_state): Set it to 0.
13600 * src/conflicts.h, src/conflicts.c (print_conflicts)
13601 (free_conflicts, solve_conflicts): Rename as...
13602 (conflicts_print, conflicts_free, conflicts_solve): these.
13604 * src/conflicts.c (enum conflict_resolution_e)
13605 (solved_conflicts_obstack): New, used by...
13606 (log_resolution): this.
13607 Adjust to attach the conflict resolution to each state.
13608 Complete the description with the precedence/associativity
13610 (resolve_sr_conflict): Adjust.
13611 * src/print.c (print_state): Output its solved_conflicts.
13612 * tests/conflicts.at (Unresolved SR Conflicts)
13613 (Solved SR Conflicts): Exercise --report=all.
13615 2002-05-26 Akim Demaille <akim@epita.fr>
13617 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
13618 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
13619 * src/reader.c, src/reduce.c, src/state.h, src/symtab.h
13620 (token_number_t, item_number_as_token_number)
13621 (token_number_as_item_number, muscle_insert_token_number_table):
13623 (symbol_number_t, item_number_as_symbol_number)
13624 (symbol_number_as_item_number, muscle_insert_symbol_number_table):
13625 these, since it is more appropriate.
13627 2002-05-26 Akim Demaille <akim@epita.fr>
13629 * tests/calc.at (AT_CHECK_CALC): Adjust: there are now additional
13631 * data/bison.simple (yystos) [YYDEBUG]: New.
13632 (yyparse) [YYDEBUG]: Display the symbols which are popped during
13634 * tests/regression.at (Web2c Actions): Adjust: yystos is output now.
13636 2002-05-25 Akim Demaille <akim@epita.fr>
13638 * doc/bison.texinfo (Debugging): Split into...
13639 (Tracing): this new section, its former contents, and...
13640 (Understanding): this new section.
13641 * src/getargs.h, src/getargs.c (verbose_flag): Remove, replaced
13643 (report_flag): this.
13644 Adjust all dependencies.
13645 (report_args, report_types, report_argmatch): New.
13646 (usage, getargs): Report/support -r, --report.
13648 (struct option_table_struct): Rename as..,
13649 (struct option_table_s): this.
13650 Rename the `set_flag' member to `flag' to match with getopt_long's
13652 * src/options.c (option_table): Split verbose into an entry for
13653 %verbose, and another for --verbose.
13654 Support --report/-r, so remove -r from the obsolete --raw.
13655 * src/print.c: Attach full item sets and lookaheads reports to
13656 report_flag instead of trace_flag.
13657 * lib/argmatch.h, lib/argmatch.c: New, from Fileutils 4.1.
13659 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
13660 and Paul Eggert <eggert@twinsun.com>
13662 * data/bison.simple (yyparse): Correct error handling to conform to
13663 POSIX and yacc. Specifically, after syntax error is discovered,
13664 do not reduce further before shifting the error token.
13665 Clean up the code a bit by removing the labels yyerrdefault,
13666 yyerrhandle, yyerrpop.
13667 * NEWS: Document the above.
13669 2002-05-20 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
13671 * data/bison.simple (yyr1): Don't use yy_token_number_type as element
13672 type; it isn't always big enough, since it doesn't necessarily
13673 include non-terminals.
13674 (yytranslate): Expand definition of yy_token_number_type, so that
13675 the latter can be removed.
13676 (yy_token_number_type): Remove, only one use.
13677 * data/bison.c++ (r1_): Parallel change to yyr1 in bison.simple---
13678 don't use TokenNumberType as element type.
13680 * tests/regression.at: Modify expected output to agree with change
13681 to yyr1 and yytranslate.
13683 2002-05-13 Florian Krohm <florian@edamail.fishkill.ibm.com>
13685 * src/reader.c (parse_action): Use copy_character instead of
13688 2002-05-13 Akim Demaille <akim@epita.fr>
13690 * tests/regression.at (Token definitions): Prototype yylex and
13693 2002-05-12 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
13695 * src/scan-skel.l: Correct off-by-one error in handling of __oline__.
13696 * data/bison.simple (b4_sint_type, b4_uint_type): Correct to reflect
13698 * data/bison.c++ (b4_sint_type, b4_uint_type): Ditto.
13700 2002-05-07 Akim Demaille <akim@epita.fr>
13702 * tests/synclines.at: Be sure to prototype yylex and yyerror to
13703 avoid GCC warnings.
13705 2002-05-07 Akim Demaille <akim@epita.fr>
13709 * src/reduce.c (nonterminals_reduce): Don't loop over RITEM: loop
13710 over the RHS of each rule.
13711 * src/gram.h, src/gram.c (nritems): Is `unsigned int', not int.
13712 * src/state.h (state_t): Member `nitems' is unsigned short.
13713 * src/LR0.c (get_state): Adjust.
13714 * src/reader.c (packgram): Likewise.
13715 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): `max' is of type
13717 (muscle_insert_int_table): Remove, unused.
13718 (prepare_rules): Remove `max'.
13720 2002-05-06 Akim Demaille <akim@epita.fr>
13722 * src/closure.c (print_firsts): Display of the symbol tags.
13723 (bitmatrix_print): Move to...
13724 * lib/bitsetv-print.h, lib/bitsetv-print.c (bitsetv_matrix_dump):
13726 * tests/sets.at (Nullable, Broken Closure, Firsts): Adjust.
13728 2002-05-06 Akim Demaille <akim@epita.fr>
13730 * src/muscle_tab.c (muscle_m4_output): Must return TRUE for
13733 2002-05-06 Akim Demaille <akim@epita.fr>
13735 * src/LR0.c (new_state, get_state): Instead of using the global
13736 `kernel_size' and `kernel_base', have two new arguments:
13737 `core_size' and `core'.
13740 2002-05-06 Akim Demaille <akim@epita.fr>
13742 * src/reader.c (packgram): No longer end `ritem' with a 0
13743 sentinel: it is not used.
13745 2002-05-05 Akim Demaille <akim@epita.fr>
13747 New experimental feature: display the lookaheads in the report and
13750 * src/print (print_core): When --trace-flag, display the rules
13752 * src/print_graph.c (print_core): Likewise.
13753 Swap the arguments.
13756 2002-05-05 Akim Demaille <akim@epita.fr>
13758 * tests/torture.at (Many lookaheads): New test.
13760 2002-05-05 Akim Demaille <akim@epita.fr>
13762 * src/output.c (GENERATE_OUTPUT_TABLE): Replace with...
13763 (GENERATE_MUSCLE_INSERT_TABLE): this.
13764 (output_int_table, output_unsigned_int_table, output_short_table)
13765 (output_token_number_table, output_item_number_table): Replace with...
13766 (muscle_insert_int_table, muscle_insert_unsigned_int_table)
13767 (muscle_insert_short_table, muscle_insert_token_number_table)
13768 (muscle_insert_item_number_table): these.
13769 Adjust all callers.
13770 (prepare_tokens): Don't free `translations', since...
13771 * src/reader.h, src/reader.c (grammar_free): do it.
13773 * src/gram.h, src/gram.c (grammar_free): here.
13774 * data/bison.simple, data/bison.c++: b4_token_number_max is now
13777 2002-05-05 Akim Demaille <akim@epita.fr>
13779 * src/output.c (output_unsigned_int_table): New.
13780 (prepare_rules): `i' is unsigned.
13781 `prhs', `rline', `r2' are unsigned int.
13782 Rename muscle `rhs_number_max' as `rhs_max'.
13783 Output muscles `prhs_max', `rline_max', and `r2_max'.
13785 * data/bison.simple, data/bison.c++: Adjust to use these muscles
13786 to compute types instead of constant types.
13787 * tests/regression.at (Web2c Actions): Adjust.
13789 2002-05-04 Akim Demaille <akim@epita.fr>
13791 * src/symtab.h (SALIAS, SUNDEF): Rename as...
13792 (USER_NUMBER_ALIAS, USER_NUMBER_UNDEFINED): these.
13793 Adjust dependencies.
13794 * src/output.c (token_definitions_output): Be sure not to output a
13795 `#define 'a'' when fed with `%token 'a' "a"'.
13796 * tests/regression.at (Token definitions): New.
13798 2002-05-03 Paul Eggert <eggert@twinsun.com>
13800 * data/bison.simple (b4_token_defines): Also define YYTOKENTYPE
13803 2002-05-03 gettextize <bug-gnu-gettext@gnu.org>
13805 * Makefile.am (SUBDIRS): Remove intl.
13806 (EXTRA_DIST): Add config/config.rpath.
13808 2002-05-03 Akim Demaille <akim@epita.fr>
13810 * data/bison.simple (m4_if): Don't output empty enums.
13811 And actually, output valid enum definitions :(.
13813 2002-05-03 Akim Demaille <akim@epita.fr>
13815 * configure.bat: Remove, completely obsolete.
13816 * Makefile.am (EXTRA_DIST): Adjust.
13817 Don't distribute config.rpath...
13818 * config/Makefile.am (EXTRA_DIST): Do it.
13820 2002-05-03 Akim Demaille <akim@epita.fr>
13822 * configure.in (GETTEXT_VERSION): New.
13823 Suggested by Bruno Haible for the forthcoming Gettext 0.10.3.
13825 2002-05-03 Akim Demaille <akim@epita.fr>
13827 * data/bison.simple (b4_token_enum): New.
13828 (b4_token_defines): Use it to output tokens both as #define and
13830 Suggested by Paul Eggert.
13831 * src/output.c (token_definitions_output): Don't output spurious
13834 2002-05-03 Akim Demaille <akim@epita.fr>
13836 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
13838 2002-05-02 Robert Anisko <robert@lrde.epita.fr>
13840 * data/bison.c++: Adapt expansion of $s and @s to the C++ parser.
13841 Update the stack class, give a try to deque as the default container.
13843 2002-05-02 Akim Demaille <akim@epita.fr>
13845 * data/bison.simple (yyparse): Do not implement @$ = @1.
13846 (YYLLOC_DEFAULT): Adjust to do it.
13847 * doc/bison.texinfo (Location Default Action): Fix.
13849 2002-05-02 Akim Demaille <akim@epita.fr>
13851 * src/reader.c (parse_braces): Merge into...
13852 (parse_action): this.
13854 2002-05-02 Akim Demaille <akim@epita.fr>
13856 * configure.in (ALL_LINGUAS): Remove.
13857 * po/LINGUAS, hr.po: New.
13859 2002-05-02 Akim Demaille <akim@epita.fr>
13861 Remove the so called hairy (semantic) parsers.
13863 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove.
13864 * src/gram.h, src/gram.c (semantic_parser): Remove.
13865 (rule_t): Remove the guard and guard_line members.
13866 * src/lex.h (token_t): remove tok_guard.
13867 * src/options.c (option_table): Remove %guard and %semantic_parser
13869 * src/output.c, src/output.h (guards_output): Remove.
13871 (token_definitions_output): Don't output the `T'
13873 (output_skeleton): Don't output the guards.
13874 * src/files.c, src/files.c (attrsfile): Remove.
13875 * src/reader.c (symbol_list): Remove the guard and guard_line
13877 Adjust dependencies.
13878 (parse_guard): Remove.
13879 * data/bison.hairy: Remove.
13880 * doc/bison.texinfo (Environment Variables): Remove occurrences of
13883 2002-05-02 Akim Demaille <akim@epita.fr>
13885 * src/reader.c (copy_at, copy_dollarm parse_braces, parse_action)
13886 (parse_guard): Rename the formal argument `stack_offset' as
13887 `rule_length', which is more readable.
13889 (copy_at, copy_dollar): Instead of outputting the hard coded
13890 values of $$, $n and so forth, output invocation to b4_lhs_value,
13891 b4_lhs_location, b4_rhs_value, and b4_rhs_location.
13892 Note: this patch partially drops `semantic-parser' support: it
13893 always does `rule_length - n', where semantic parsers ought to
13895 * data/bison.simple, data/bison.c++ (b4_lhs_value)
13896 (b4_lhs_location, b4_rhs_value, and b4_rhs_location: New.
13898 2002-05-02 Akim Demaille <akim@epita.fr>
13900 * configure.in (AC_INIT): Bump to 1.49b.
13901 (AM_INIT_AUTOMAKE): Short invocation.
13903 2002-05-02 Akim Demaille <akim@epita.fr>
13907 2002-05-01 Akim Demaille <akim@epita.fr>
13909 * src/skeleton.h: Remove.
13911 2002-05-01 Akim Demaille <akim@epita.fr>
13913 * src/skeleton.h: Fix the #endif.
13914 Reported by Magnus Fromreide.
13916 2002-04-26 Paul Eggert <eggert@twinsun.com>
13918 * data/bison.simple (YYSTYPE_IS_TRIVIAL, YYLTYPE_IS_TRIVIAL):
13919 Define if we define YYSTYPE and YYLTYPE, respectively.
13920 (YYCOPY): Fix [] quoting problem in the non-GCC case.
13922 2002-04-25 Robert Anisko <robert@lrde.epita.fr>
13924 * src/scan-skel.l: Postprocess quadrigraphs.
13926 * src/reader.c (copy_character): New function, used to output
13927 single characters while replacing `[' and `]' with quadrigraphs, to
13928 avoid troubles with M4 quotes.
13929 (copy_comment): Output characters with copy_character.
13930 (read_additionnal_code): Likewise.
13931 (copy_string2): Likewise.
13932 (copy_definition): Likewise.
13934 * tests/calc.at: Exercise M4 quoting.
13936 2002-04-25 Akim Demaille <akim@epita.fr>
13938 * tests/sets.at (AT_EXTRACT_SETS): Sed portability issue: no space
13939 between `!' and the command.
13940 Reported by Paul Eggert.
13942 2002-04-24 Robert Anisko <robert@lrde.epita.fr>
13944 * tests/calc.at: Exercise prologue splitting.
13946 * data/bison.simple, data/bison.c++: Use `b4_pre_prologue' and
13947 `b4_post_prologue' instead of `b4_prologue'.
13949 * src/output.c (prepare): Add the `pre_prologue' and `post_prologue'
13951 (output): Free pre_prologue_obstack and post_prologue_obstack.
13952 * src/files.h, src/files.c (attrs_obstack): Remove.
13953 (pre_prologue_obstack, post_prologue_obstack): New.
13954 * src/reader.c (copy_definition): Add a parameter to specify the
13955 obstack to fill, instead of using attrs_obstack unconditionally.
13956 (read_declarations): Pass pre_prologue_obstack to copy_definition if
13957 `%union' has not yet been seen, pass post_prologue_obstack otherwise.
13959 2002-04-23 Paul Eggert <eggert@twinsun.com>
13961 * data/bison.simple: Remove unnecessary commentary and white
13962 space differences from 1_29-branch.
13963 Depend on YYERROR_VERBOSE, not defined (YYERROR_VERBOSE).
13965 (union yyalloc, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYCOPY,
13966 YYSTACK_RELOCATE): Do not define if yyoverflow is defined, or
13967 if this is a C++ parser and YYSTYPE or YYLTYPE has nontrivial
13968 constructors or destructors.
13970 (yyparse) [! defined YYSTACK_RELOCATE]: Do not relocate the stack.
13972 2002-04-23 Akim Demaille <akim@epita.fr>
13974 * tests/sets.at (AT_EXTRACT_SETS): Don't use 8 char long sed labels.
13975 * tests/synclines.at (AT_TEST_SYNCLINE): Be robust to GCC's
13976 location with columns.
13977 * tests/conflicts.at (%nonassoc and eof): Don't use `error.h'.
13978 All reported by Paul Eggert.
13980 2002-04-22 Akim Demaille <akim@epita.fr>
13982 * src/reduce.c (dump_grammar): Move to...
13983 * src/gram.h, src/gram.c (grammar_dump): here.
13984 Be sure to separate long item numbers.
13985 Don't read the members of a rule's prec if its nil.
13987 2002-04-22 Akim Demaille <akim@epita.fr>
13989 * src/output.c (table_size, table_grow): New.
13990 (MAXTABLE): Remove, replace uses with table_size.
13991 (pack_vector): Instead of dying when the table is too big, grow it.
13993 2002-04-22 Akim Demaille <akim@epita.fr>
13995 * data/bison.simple (yyr1): Its type is that of a token number.
13996 * data/bison.c++ (r1_): Likewise.
13997 * tests/regression.at (Web2c Actions): Adjust.
13999 2002-04-22 Akim Demaille <akim@epita.fr>
14001 * src/reader.c (token_translations_init): 256 is now the default
14002 value for the error token, i.e., it will be assigned another
14003 number if the user assigned 256 to one of her tokens.
14004 (reader): Don't force 256 to error.
14005 * doc/bison.texinfo (Symbols): Adjust.
14006 * tests/torture.at (AT_DATA_HORIZONTAL_GRAMMAR)
14007 (AT_DATA_TRIANGULAR_GRAMMAR): Number the tokens as 1, 2, 3
14008 etc. instead of 10, 20, 30 (which was used to `jump' over error
14009 (256) and undefined (2)).
14011 2002-04-22 Akim Demaille <akim@epita.fr>
14013 Propagate more token_number_t.
14015 * src/gram.h (token_number_as_item_number)
14016 (item_number_as_token_number): New.
14017 * src/output.c (GENERATE_OUTPUT_TABLE): New.
14018 Use it to create output_item_number_table and
14019 output_token_number_table.
14020 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
14021 * src/lex.c, src/nullable.c, src/output.c, src/print.c,
14022 * src/print_graph.c, src/reader.c, src/reduce.c, src/state.h,
14023 * src/symtab.c, src/symtab.h: Use token_number_t instead of shorts.
14025 2002-04-22 Akim Demaille <akim@epita.fr>
14027 * src/output.h, src/output.c (get_lines_number): Remove.
14029 2002-04-19 Akim Demaille <akim@epita.fr>
14031 * doc/bison.texinfo (Actions): Make clear that `|' is not the same
14033 (Debugging): More details about enabling the debugging features.
14034 (Table of Symbols): Describe $$, $n, @$, and @n.
14035 Suggested by Tim Josling.
14037 2002-04-19 Akim Demaille <akim@epita.fr>
14039 * doc/bison.texinfo: Remove the uses of the obsolete @refill.
14041 2002-04-10 Akim Demaille <akim@epita.fr>
14043 * src/system.h: Rely on HAVE_LIMITS_H.
14044 Suggested by Paul Eggert.
14046 2002-04-09 Akim Demaille <akim@epita.fr>
14048 * tests/calc.at (_AT_CHECK_CALC_ERROR): Receive as argument the
14049 full stderr, and strip it according to the bison options, instead
14050 of composing the error message from different bits.
14051 This makes it easier to check for several error messages.
14052 Adjust all the invocations.
14053 Add an invocation exercising the error token.
14054 Add an invocation demonstrating a stupid error message.
14055 (_AT_DATA_CALC_Y): Follow the GCS: initial column is 1, not 0.
14057 Error message are for stderr, not stdout.
14059 2002-04-09 Akim Demaille <akim@epita.fr>
14061 * src/gram.h, src/gram.c (error_token_number): Remove, use
14063 * src/reader.c (reader): Don't specify the user token number (2)
14064 for $undefined, as it uselessly prevents using it.
14065 * src/gram.h (token_number_t): Move to...
14066 * src/symtab.h: here.
14067 (state_t.number): Is a token_number_t.
14068 * src/print.c, src/reader.c: Use undeftoken->number instead of
14070 (Even though this 2 is not the same as above: the number of the
14071 undeftoken remains being 2, it is its user token number which
14073 * src/output.c (prepare_tokens): Rename the `maxtok' muscle with
14074 `user_token_number_max'.
14075 Output `undef_token_number'.
14076 * data/bison.simple, data/bison.c++: Use them.
14077 Be sure to map invalid yylex return values to
14078 `undef_token_number'. This saves us from gratuitous SEGV.
14080 * tests/conflicts.at (Solved SR Conflicts)
14081 (Unresolved SR Conflicts): Adjust.
14082 * tests/regression.at (Web2c Actions): Adjust.
14084 2002-04-08 Akim Demaille <akim@epita.fr>
14086 * data/bison.c++: s/b4_item_number_max/b4_rhs_number_max/.
14088 Remove the duplicate `typedefs'.
14089 (RhsNumberType): Fix the declaration and various other typos.
14091 * data/bison.simple: Use __ofile__.
14092 * src/scan-skel.l: Handle __ofile__.
14094 2002-04-08 Akim Demaille <akim@epita.fr>
14096 * src/gram.h (item_number_t): New, the type of item numbers in
14097 RITEM. Note that it must be able to code symbol numbers as
14098 positive number, and the negation of rule numbers as negative
14100 Adjust all dependencies (pretty many).
14101 * src/reduce.c (rule): Remove this `short *' pointer: use
14103 * src/system.h (MINSHORT, MAXSHORT): Remove.
14104 Include `limits.h'.
14105 Adjust dependencies to using SHRT_MAX and SHRT_MIN.
14106 (shortcpy): Remove.
14107 (MAXTABLE): Move to...
14108 * src/output.c (MAXTABLE): here.
14109 (prepare_rules): Use output_int_table to output rhs.
14110 * data/bison.simple, data/bison.c++: Adjust.
14111 * tests/torture.at (Big triangle): Move the limit from 254 to
14113 * tests/regression.at (Web2c Actions): Ajust.
14115 Trying with bigger grammars shows various phenomena: at 3000 (28Mb
14116 of grammar file) bison is killed by my system, at 2000 (12Mb) bison
14117 passes, but produces negative #line number, once fixed, GCC is
14118 killed while compiling 14Mb, at 1500 (6.7 Mb of grammar, 8.2Mb of
14120 * src/state.h (state_h): Code input lines on ints, not shorts.
14122 2002-04-08 Akim Demaille <akim@epita.fr>
14124 * src/reduce.c (reduce_grammar): First reduce the nonterminals,
14125 and then the grammar.
14127 2002-04-08 Akim Demaille <akim@epita.fr>
14129 * src/system.h: No longer using strndup.
14131 2002-04-07 Akim Demaille <akim@epita.fr>
14133 * src/muscle_tab.h (MUSCLE_INSERT_LONG_INT): New.
14134 * src/output.c (output_table_data): Return the longest number.
14135 (prepare_tokens): Output `token_number_max').
14136 * data/bison.simple, data/bison.c++ (b4_sint_type, b4_uint_type):
14138 Use them to define yy_token_number_type/TokenNumberType.
14139 Use this type for yytranslate.
14140 * tests/torture.at (Big triangle): Push the limit from 124 to
14142 * tests/regression.at (Web2c Actions): Adjust.
14144 2002-04-07 Akim Demaille <akim@epita.fr>
14146 * tests/torture.at (Big triangle): New.
14147 (GNU AWK Grammar, GNU Cim Grammar): Move to...
14148 * tests/existing.at: here.
14150 2002-04-07 Akim Demaille <akim@epita.fr>
14152 * src/gram.h, src/gram.c (nitems): Remove, it is an alias of
14154 Adjust dependencies.
14156 2002-04-07 Akim Demaille <akim@epita.fr>
14158 * src/reader.c: Normalize increments to prefix form.
14160 2002-04-07 Akim Demaille <akim@epita.fr>
14162 * src/reader.c, symtab.c: Remove debugging code.
14164 2002-04-07 Akim Demaille <akim@epita.fr>
14166 Rename all the `bucket's as `symbol_t'.
14168 * src/gram.c, src/gram.h, src/lex.c, src/lex.h, src/output.c,
14169 * src/reader.c, src/reader.h, src/reduce.c, src/state.h,
14170 * src/symtab.c, src/symtab.h (bucket): Rename as...
14172 (symbol_list_new, bucket_check_defined, bucket_make_alias)
14173 (bucket_check_alias_consistence, bucket_pack, bucket_translation)
14174 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
14175 (buckets_new, buckets_free, buckets_do): Rename as...
14176 (symbol_list_new, symbol_check_defined, symbol_make_alias)
14177 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
14178 (symbol_new, symbol_free, hash_compare_symbol_t, hash_symbol_t)
14179 (symbols_new, symbols_free, symbols_do): these.
14181 2002-04-07 Akim Demaille <akim@epita.fr>
14183 Use lib/hash for the symbol table.
14185 * src/gram.c (ntokens): Initialize to 1, to reserve a slot for
14187 * src/lex.c (lex): Set the `number' member of new terminals.
14188 * src/reader.c (bucket_check_defined, bucket_make_alias)
14189 (bucket_check_alias_consistence, bucket_translation): New.
14190 (reader, grammar_free, readgram, token_translations_init)
14191 (packsymbols): Adjust.
14192 (reader): Number the predefined tokens.
14193 * src/reduce.c (inaccessable_symbols): Just use hard coded numbers
14194 for predefined tokens.
14195 * src/symtab.h (bucket): Remove all the hash table related
14197 * src/symtab.c (symtab): Replace by...
14198 (bucket_table): this.
14199 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
14200 (buckets_new, buckets_do): New.
14202 2002-04-07 Akim Demaille <akim@epita.fr>
14204 * src/gram.c (nitems, nrules, nsyms, ntokens, nvars, nritems)
14205 (start_symbol, max_user_token_number, semantic_parser)
14206 (error_token_number): Initialize.
14207 * src/reader.c (grammar, start_flag, startval, typed, lastprec):
14210 (errtoken, eoftoken, undeftoken, axiom): Extern.
14212 2002-04-07 Akim Demaille <akim@epita.fr>
14214 * src/gram.h (rule_s): prec and precsym are now pointers
14215 to the bucket giving the priority/associativity.
14216 Member `associativity' removed: useless.
14217 * src/reduce.c, src/conflicts.c: Adjust.
14219 2002-04-07 Akim Demaille <akim@epita.fr>
14221 * src/lalr.c, src/LR0.c, src/closure.c, src/gram.c, src/reduce.c:
14222 Properly escape the symbols' TAG when outputting them.
14224 2002-04-07 Akim Demaille <akim@epita.fr>
14226 * src/lalr.h (LA): Is a bitsetv, not bitset*.
14228 2002-04-07 Akim Demaille <akim@epita.fr>
14230 * src/lalr.h, src/lalr.c (LAruleno): Replace with...
14231 (LArule): this, which is an array to rule_t*.
14232 * src/print.c, src/conflicts.c: Adjust.
14234 2002-04-07 Akim Demaille <akim@epita.fr>
14236 * src/gram.h (rule_t): Rename `number' as `user_number'.
14237 `number' is a new member.
14238 Adjust dependencies.
14239 * src/reduce.c (reduce_grammar_tables): Renumber rule_t.number.
14241 2002-04-07 Akim Demaille <akim@epita.fr>
14243 As a result of the previous patch, it is no longer needed
14244 to reorder ritem itself.
14246 * src/reduce.c (reduce_grammar_tables): Don't sort RITEM.
14248 2002-04-07 Akim Demaille <akim@epita.fr>
14250 Be sure never to walk through RITEMS, but use only data related to
14251 the rules themselves. RITEMS should be banished.
14253 * src/output.c (output_token_translations): Rename as...
14254 (prepare_tokens): this.
14255 In addition to `translate', prepare the muscles `tname' and
14256 `toknum', which were handled by...
14257 (output_rule_data): this.
14258 Remove, and move the remainder of its outputs into...
14259 (prepare_rules): this new routines, which also merges content from
14260 (output_gram): this.
14261 (prepare_rules): Be sure never to walk through RITEMS.
14262 (output_stos): Rename as...
14263 (prepare_stos): this.
14264 (output): Always invoke prepare_states, after all, just don't use it
14265 in the output if you don't need it.
14267 2002-04-07 Akim Demaille <akim@epita.fr>
14269 * src/LR0.c (new_state): Display `nstates' as the name of the
14270 newly created state.
14271 Adjust to initialize first_state and last_state if needed.
14272 Be sure to distinguish the initial from the final state.
14273 (new_states): Create the itemset of the initial state, and use
14275 * src/closure.c (closure): Now that the initial state has its
14276 items properly set, there is no need for a special case when
14277 creating `ruleset'.
14279 As a result, now the rule 0, reducing to $axiom, is visible in the
14280 outputs. Adjust the test suite.
14282 * tests/conflicts.at (Solved SR Conflicts)
14283 (Unresolved SR Conflicts): Adjust.
14284 * tests/regression.at (Web2c Report, Rule Line Numbers): Idem.
14285 * tests/conflicts.at (S/R in initial): New.
14287 2002-04-07 Akim Demaille <akim@epita.fr>
14289 * src/LR0.c (allocate_itemsets): Don't loop over ritem: loop over
14290 the RHS of the rules.
14291 * src/output.c (output_gram): Likewise.
14293 2002-04-07 Akim Demaille <akim@epita.fr>
14295 * src/gram.h (rule_t): `lhs' is now a pointer to the symbol's
14297 Adjust all dependencies.
14298 * src/reduce.c (nonterminals_reduce): Don't forget to renumber the
14299 `number' of the buckets too.
14300 * src/gram.h: Include `symtab.h'.
14301 (associativity): Move to...
14302 * src/symtab.h: here.
14303 No longer include `gram.h'.
14305 2002-04-07 Akim Demaille <akim@epita.fr>
14307 * src/gram.h, src/gram.c (rules_rhs_length): New.
14308 (ritem_longest_rhs): Use it.
14309 * src/gram.h (rule_t): `number' is a new member.
14310 * src/reader.c (packgram): Set it.
14311 * src/reduce.c (reduce_grammar_tables): Move the useless rules at
14312 the end of `rules', and count them out of `nrules'.
14313 (reduce_output, dump_grammar): Adjust.
14314 * src/print.c (print_grammar): It is no longer needed to check for
14315 the usefulness of a rule, as useless rules are beyond `nrules + 1'.
14316 * tests/reduce.at (Reduced Automaton): New test.
14318 2002-04-07 Akim Demaille <akim@epita.fr>
14320 * src/reduce.c (inaccessable_symbols): Fix a buglet: because of a
14321 lacking `+ 1' to nrules, Bison reported as useless a token if it
14322 was used solely to set the precedence of the last rule...
14324 2002-04-07 Akim Demaille <akim@epita.fr>
14326 * data/bison.c++, data/bison.simple: Don't output the current file
14327 name in #line, to avoid useless diffs between two identical
14328 outputs under different names.
14330 2002-04-07 Akim Demaille <akim@epita.fr>
14332 * src/closure.c, src/print.c, src/reader.c, src/reduce.c:
14333 Normalize loops to using `< nrules + 1', not `<= nrules'.
14335 2002-04-07 Akim Demaille <akim@epita.fr>
14339 2002-04-07 Akim Demaille <akim@epita.fr>
14341 * src/output.c, src/reader.c, src/symtab.c, src/symtab.h: Rename
14342 bucket.value as bucket.number.
14344 2002-04-07 Akim Demaille <akim@epita.fr>
14346 * src/closure.c, src/derives.c, src/gram.h, src/lalr.c,
14347 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
14348 * src/reader.c, src/reduce.c: Let rule_t.rhs point directly to the
14349 RHS, instead of being an index in RITEMS.
14351 2002-04-04 Paul Eggert <eggert@twinsun.com>
14353 * doc/bison.texinfo: Update copyright date.
14354 (Rpcalc Lexer, Symbols, Token Decl): Don't assume ASCII.
14355 (Symbols): Warn about running Bison in one character set,
14356 but compiling and/or running in an incompatible one.
14357 Warn about character code 256, too.
14359 2002-04-03 Paul Eggert <eggert@twinsun.com>
14361 * src/bison.data (YYSTACK_ALLOC): Depend on whether
14362 YYERROR_VERBOSE is nonzero, not whether it is defined.
14364 Merge changes from bison-1_29-branch.
14366 2002-03-20 Paul Eggert <eggert@twinsun.com>
14368 Merge fixes from Debian bison_1.34-1.diff.
14370 * configure.in (AC_PREREQ): 2.53.
14372 2002-03-20 Akim Demaille <akim@epita.fr>
14374 * src/conflicts.c (log_resolution): Argument `resolution' is const.
14376 2002-03-19 Paul Eggert <eggert@twinsun.com>
14378 * src/bison.simple (YYCOPY): New macro.
14379 (YYSTACK_RELOCATE): Use it.
14380 Remove Type arg; no longer needed. All callers changed.
14381 (yymemcpy): Remove; no longer needed.
14383 * Makefile.am (AUTOMAKE_OPTIONS): 1.6.
14384 * doc/Makefile.am (AUTOMAKE_OPTIONS): Remove.
14386 2002-03-19 Akim Demaille <akim@epita.fr>
14388 Test and fix the #line outputs.
14390 * tests/atlocal.at (GCC): New.
14391 * tests/synclines.at (AT_TEST_SYNCLINE): New macro.
14392 (Prologue synch line, %union synch line, Postprologue synch line)
14393 (Action synch line, Epilogue synch line): New tests.
14394 * src/reader.c (parse_union_decl): Define the muscle stype_line.
14395 * data/bison.simple, data/bison.c++: Use it.
14397 2002-03-19 Akim Demaille <akim@epita.fr>
14399 * tests/regression.at (%nonassoc and eof, Unresolved SR Conflicts)
14400 (Solved SR Conflicts, %expect not enough, %expect right)
14401 (%expect too much): Move to...
14402 * tests/conflicts.at: this new file.
14404 2002-03-19 Akim Demaille <akim@epita.fr>
14406 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
14407 * data/bison.simple, data/bison.c++: Handle the `#define' part, so
14408 that we can move to enums for instance.
14409 * src/output.c (token_definitions_output): Output a list of
14410 `token-name, token-number' instead of the #define.
14411 (output_skeleton): Name this list `b4_tokens', not `b4_tokendefs'.
14413 2002-03-14 Akim Demaille <akim@epita.fr>
14415 Use Gettext 0.11.1.
14417 2002-03-09 Robert Anisko <robert@lrde.epita.fr>
14419 * data/bison.c++: Make the user able to add members to the generated
14420 parser by subclassing.
14422 2002-03-05 Robert Anisko <robert@lrde.epita.fr>
14424 * src/reader.c (read_additionnal_code): `c' should be an integer, not
14426 Reported by Nicolas Tisserand and Nicolas Burrus.
14428 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
14430 * src/reader.c: Warn about lacking semi-colons, do not complain.
14432 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
14434 * data/bison.c++: Remove a debug line.
14436 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
14438 * data/bison.c++: Unmerge value as yylval and value as yyval. Unmerge
14439 location as yylloc and location as yyloc. Use YYLLOC_DEFAULT, and
14440 provide a default implementation.
14442 2002-03-04 Akim Demaille <akim@epita.fr>
14444 * tests/input.at (Invalid $n, Invalid @n): Add the ending `;'.
14445 * tests/output.at (AT_CHECK_OUTPUT): Likewise.
14446 * tests/headers.at (AT_TEST_CPP_GUARD_H): Ditto.
14447 * tests/semantic.at (Parsing Guards): Similarly.
14448 * src/reader.at (readgram): Complain if the last rule is not ended
14451 2002-03-04 Akim Demaille <akim@epita.fr>
14453 * src/warshall.h, src/warshall.c (bitmatrix_print): Move to...
14454 * src/closure.c: here.
14455 (set_firsts): Use bitsetv_reflexive_transitive_closure instead of
14457 * src/warshall.h, src/warshall.c: Remove.
14458 * tests/sets.at (Broken Closure): Adjust.
14460 2002-03-04 Akim Demaille <akim@epita.fr>
14462 * src/output.c (output_skeleton): tempdir is const.
14463 bytes_read is unused.
14465 2002-03-04 Akim Demaille <akim@epita.fr>
14467 * lib/bbitset.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
14468 * lib/bitsetv.h, lib/ebitset.c, lib/lbitset.c, lib/sbitset.c:
14470 From Michael Hayes.
14472 2002-03-04 Akim Demaille <akim@epita.fr>
14474 * src/closure.c (closure): `r' is unused.
14476 2002-03-04 Akim Demaille <akim@epita.fr>
14478 * tests/sets.at (Broken Closure): Add the ending `;'.
14479 * src/reader.at (readgram): Complain if a rule is not ended with a
14482 2002-03-04 Akim Demaille <akim@epita.fr>
14484 * src/conflicts.c (set_conflicts): Use bitset_disjoint_p.
14485 (count_sr_conflicts): Use bitset_count.
14486 * src/reduce.c (inaccessable_symbols): Ditto.
14487 (bits_size): Remove.
14488 * src/warshall.h, src/warshall.c: Convert to bitsetv.
14490 2002-03-04 Akim Demaille <akim@epita.fr>
14492 * src/closure.c, src/conflicts.c, src/lalr.c, src/print.c,
14493 * src/reduce.c: Remove the `bitset_zero's following the
14494 `bitset_create's, as now it is performed by the latter.
14496 2002-03-04 Akim Demaille <akim@epita.fr>
14498 * lib/bitset.c, lib/bitset.h, lib/bitsetv.c, lib/bitsetv.h,
14499 * lib/ebitset.c, lib/ebitset.h, lib/lbitset.c, lib/lbitset.h,
14500 * lib/sbitset.c, lib/sbitset.h, lib/bbitset.h: Update from the
14501 latest sources from Michael.
14503 2002-03-04 Akim Demaille <akim@epita.fr>
14505 * src/output.c (output): Don't free the grammar.
14506 * src/reader.c (grammar_free): New.
14507 * src/main.c (main): Call it and don't free symtab here.
14509 2002-03-04 Akim Demaille <akim@epita.fr>
14511 * src/lex.c (parse_percent_token): Be sure to 0-end token_buffer
14513 Reported by Benoit Perrot.
14515 2002-03-04 Akim Demaille <akim@epita.fr>
14517 Use bitset operations when possible, not loops over bits.
14519 * src/conflicts.c (set_conflicts, count_sr_conflicts): Use
14521 * src/print.c (print_reductions): Use bitset_and, bitset_andn.
14522 * src/reduce.c (useless_nonterminals): Formatting changes.
14523 * src/warshall.c (TC): Use bitset_or.
14525 2002-03-04 Akim Demaille <akim@epita.fr>
14527 * src/lalr.h, src/lalr.c (tokensetsize): Remove, unused.
14528 * src/system.h (BITS_PER_WORD, WORDSIZE, SETBIT, RESETBIT, BITISSET):
14531 2002-03-04 Akim Demaille <akim@epita.fr>
14533 * src/lalr.c (F): Now a bitset*.
14534 Adjust all dependencies.
14536 2002-03-04 Akim Demaille <akim@epita.fr>
14538 * src/conflicts.c (shiftset, lookaheadset): Now bitset.
14539 Adjust all dependencies.
14541 2002-03-04 Akim Demaille <akim@epita.fr>
14543 * src/L0.c, src/LR0.h (nstates): Be size_t.
14544 Adjust comparisons (signed vs unsigned).
14545 * src/conflics.c, src/lalr.c, src/lalr.h, src/output.c (LA): Now a
14547 Adjust all dependencies.
14549 2002-03-04 Akim Demaille <akim@epita.fr>
14551 * src/closure.c (firsts): Now, also a bitset.
14552 Adjust all dependencies.
14553 (varsetsize): Remove, now unused.
14554 * src/warshall.h, src/warshall.c: Now work on arrays of bitsets.
14556 2002-03-04 Akim Demaille <akim@epita.fr>
14558 * src/print.c: Convert to use bitset.h, not hand coded iterations
14561 2002-03-04 Akim Demaille <akim@epita.fr>
14563 * src/reduce.c: Convert to use bitset.h, not hand coded BSet.
14565 2002-03-04 Akim Demaille <akim@epita.fr>
14567 * src/closure.c (ruleset): Be a bitset.
14568 (rulesetsize): Remove.
14570 2002-03-04 Akim Demaille <akim@epita.fr>
14572 * lib/bitset-int.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
14573 * lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/lbitset.c,
14574 * lib/lbitset.h, lib/sbitset.c, lib/sbitset.h: New.
14575 * src/closure.c (fderives): Be an array of bitsets.
14577 2002-02-28 Robert Anisko <robert@lrde.epita.fr>
14579 * data/bison.c++: Merge the two generated headers. Insert a copyright
14580 notice in each output file.
14582 2002-02-28 Akim Demaille <akim@epita.fr>
14584 * data/bison.c++: Copy the prologue of bison.simple to fetch
14585 useful M4 definitions, such as b4_header_guard.
14587 2002-02-25 Akim Demaille <akim@epita.fr>
14589 * src/getargs.c (version): Give the name of the authors, and use a
14590 translator friendly scheme for the bgr
14593 2002-02-25 Akim Demaille <akim@epita.fr>
14595 * src/output.c (header_output): Remove, now handled completely via
14598 2002-02-25 Akim Demaille <akim@epita.fr>
14600 * m4/m4.m4: New, from CVS Autoconf.
14601 * configure.in: Invoke it.
14602 * src/output.c (output_skeleton): Use its result instead of the
14605 2002-02-25 Akim Demaille <akim@epita.fr>
14607 * lib/tempname.c, lib/mkstemp.c, m4/mkstemp.m4: New, stolen from
14609 * configure.in: Invoke UTILS_FUNC_MKSTEMP.
14610 * src/output.c (output_skeleton): Use mkstemp to create a real
14612 Move the filling of `skeleton' and its muscle to...
14614 (output): Move the definition of the prologue muscle to...
14616 * src/system.h (DEFAULT_TMPDIR): New.
14618 2002-02-14 Paul Eggert <eggert@twinsun.com>
14620 Remove the support for C++ namespace cleanliness; it was
14621 causing more problems than it was curing, since it didn't work
14622 properly on some nonstandard C++ compilers. This can wait
14623 for a proper C++ parser.
14625 * NEWS: Document this.
14626 * doc/bison.texinfo (Bison Parser, Debugging): Remove special mention
14627 of C++, as it's treated like C now.
14628 * src/bison.simple (YYSTD): Remove.
14629 (YYSIZE_T, YYFPRINTF, YYPARSE_PARAM_ARG, YYPARSE_PARAM_DECL):
14630 Treat C++ just like Standard C instead of trying to support
14631 namespace cleanliness.
14633 2002-02-14 Akim Demaille <akim@epita.fr>
14635 * tests/regression.at (else): Adjust to Andreas' change.
14637 2002-02-14 Akim Demaille <akim@epita.fr>
14639 * lib/Makefile.am (EXTRA_DIST): Ship strnlen.c.
14641 2002-02-13 Andreas Schwab <schwab@suse.de>
14643 * src/output.c (output_rule_data): Don't output NULL, it might
14644 not be defined yet.
14646 2002-02-11 Robert Anisko <robert@lrde.epita.fr>
14648 * data/bison.c++ (YYDEBUG, YYERROR_VERBOSE): After the prologue.
14649 (Copyright notice): Update.
14651 2002-02-11 Akim Demaille <akim@epita.fr>
14653 * tests/regression.at (%nonassoc and eof): Don't include
14654 nonportable headers.
14656 2002-02-08 Robert Anisko <robert@lrde.epita.fr>
14658 * data/bison.c++: Correct error recovery. Make the user able to
14659 initialize the starting location.
14661 2002-02-07 Akim Demaille <akim@epita.fr>
14663 * tests/input.at: New.
14665 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
14667 * data/bison.c++: Replace some direct m4 expansions by constants. Be
14668 more consistent when naming methods and variables. Put preprocessor
14669 directives around tables only needed for debugging.
14671 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
14673 * data/bison.c++ (yy::b4_name::print_): New method, replaces yyprint in
14675 (yy::b4_name::parse): Use print_.
14677 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
14679 * data/bison.c++ (yy::b4_name::parse): Error recovery is back.
14681 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
14683 * data/bison.c++ (yy::b4_name::error_): New method, replaces yyerror in
14685 (yy::b4_name::parse): Build verbose error messages, and use error_.
14687 2002-02-06 Robert Anisko <robert@lrde.epita.fr>
14689 * data/bison.c++: Fix m4 quoting in comments.
14691 2002-02-06 Robert Anisko <robert@lrde.epita.fr>
14693 * data/bison.c++: Adjust the parser code. Fix some muscles that were
14694 not expanded by m4.
14696 2002-02-05 Akim Demaille <akim@epita.fr>
14698 * data/bison.c++: Adjust to the M4 back end.
14699 More is certainly needed.
14701 2002-02-05 Akim Demaille <akim@epita.fr>
14703 Give a try to M4 as a back end.
14705 * lib/readpipe.c: New, from wdiff.
14706 * src/Makefile.am (DEFS): Define PKGDATADIR, not BISON_SIMPLE and
14708 * src/system.h (BISON_HAIRY, BISON_SIMPLE): Remove the DOS and VMS
14709 specific values. Now it is m4 that performs the lookup.
14710 * src/parse-skel.y: Remove.
14711 * src/muscle_tab.c, src/muscle_tab.h (muscles_m4_output): New.
14712 * src/output.c (actions_output, guards_output)
14713 (token_definitions_output): No longer keeps track of the output
14714 line number, hence remove the second argument.
14715 (guards_output): Check against the guard member of a rule, not the
14718 (output_skeleton): Don't look for the skeleton location, let m4 do
14720 Create `/tmp/muscles.m4'. This is temporary, a proper temporary
14722 Invoke `m4' on m4sugar.m4, muscles.m4, and the skeleton.
14723 (prepare): Given that for the time being changesyntax is not
14724 usable in M4, rename the muscles using `-' to `_'.
14725 Define `defines_flag', `output_parser_name' and `output_header_name'.
14726 * src/output.h (actions_output, guards_output)
14727 (token_definitions_output): Adjust prototypes.
14728 * src/scan-skel.l: Instead of scanning the skeletons, it now
14729 processes the output of m4: `__oline__' and `#output'.
14730 * data/bison.simple: Adjust to be used by M4(sugar).
14731 * tests/Makefile.am: Use check_SCRIPTS to make sure `bison' is up
14733 * tests/bison.in: Use the secrete envvar `BISON_PKGDATADIR'
14734 instead of the dead `BISON_SIMPLE' and `BISON_HAIRY'.
14735 * data/m4sugar/m4sugar.m4, data/m4sugar/version.m4: New,
14736 shamelessly stolen from CVS Autoconf.
14738 2002-02-05 Akim Demaille <akim@epita.fr>
14740 * lib/hash.c, lib/hash.h: Replace with Fileutils 4.1's version.
14741 * configure.in: Check for the declarations of free and malloc.
14742 * src/muscle_tab.c: Adjust.
14744 2002-02-05 Akim Demaille <akim@epita.fr>
14746 * src/muscle_tab.c (muscle_init): Don't default to NULL muscle
14747 which have no values.
14749 2002-02-05 Akim Demaille <akim@epita.fr>
14751 * src/bison.simple, src/bison.hairy, src/bison.c++: Move to...
14754 2002-01-29 Paul Eggert <eggert@twinsun.com>
14756 * src/bison.simple (YYSIZE_T): Do not define merely because
14757 YYSTACK_USE_ALLOCA is nonzero or alloca or _ALLOCA_H are defined.
14758 On some platforms, <alloca.h> does not declare YYSTD (size_t).
14760 2002-01-27 Akim Demaille <akim@epita.fr>
14762 Fix `%nonassoc and eof'.
14764 * src/state.c (errs_dup): Aaaah! The failure was due to bytes
14765 which were not properly copied! Replace
14766 memcpy (res->errs, src->errs, src->nerrs);
14768 memcpy (res->errs, src->errs, src->nerrs * sizeof (src->errs[0]));
14770 * tests/regression.at (%nonassoc and eof): Adjust to newest
14771 Autotest: `.' is not in the PATH.
14773 2002-01-27 Akim Demaille <akim@epita.fr>
14775 * tests/sets.at (AT_EXTRACT_SETS): New.
14776 (Nullable): Use it.
14779 2002-01-26 Akim Demaille <akim@epita.fr>
14781 * tests/actions.at, tests/calc.at, tests/headers.at,
14782 * tests/torture.at: Adjust to the newest Autotest which no longer
14783 forces `.' in the PATH.
14785 2002-01-25 Akim Demaille <akim@epita.fr>
14787 * tests/regression.at (%nonassoc and eof): New.
14788 Suggested by Robert Anisko.
14790 2002-01-24 Akim Demaille <akim@epita.fr>
14792 Bison dumps core when trying to complain about broken input files.
14793 Reported by Cris van Pelt.
14795 * src/lex.c (parse_percent_token): Be sure to set token_buffer.
14796 * tests/regression.at (Invalid input: 1, Invalid input: 2): Merge
14798 (Invalid inputs): Strengthen: exercise parse_percent_token.
14800 2002-01-24 Robert Anisko <robert.anisko@epita.fr>
14802 * src/Makefile.am: Add bison.c++.
14803 * src/bison.c++: New skeleton.
14805 2002-01-21 Paolo Bonzini <bonzini@gnu.org>
14809 2002-01-21 Kees Zeelenberg <kzlg@users.sourceforge.net>
14811 * src/files.c (skeleton_find) [MSDOS]: Fix cp definition.
14813 2002-01-20 Marc Autret <marc@gnu.org>
14815 * src/files.c (compute_output_file_names): Fix
14817 2002-01-20 Marc Autret <marc@gnu.org>
14819 * tests/output.at: New test.
14820 * src/files.c (compute_base_names): Don't map extensions when
14821 the YACC flag is set, use defaults.
14822 Reported by Evgeny Stambulchik.
14824 2002-01-20 Marc Autret <marc@gnu.org>
14826 * src/system.h: Need to define __attribute__ away for non-GCC
14827 compilers as well (i.e., the vendor C compiler).
14828 Suggested by Albert Chin-A-Young.
14830 2002-01-11 Tim Van Holder <tim.van.holder@pandora.be>
14832 * lib/hash.h, lib/hash.c: Renamed __P to PARAMS and used the
14833 canonical definition.
14834 * src/system.h: Use the canonical definition for PARAMS (avoids
14835 a conflict with the macro from lib/hash.h).
14837 2002-01-11 Akim Demaille <akim@epita.fr>
14839 * configure.in: Use AC_FUNC_STRNLEN.
14840 Fixes the failures observed on AIX 4.3 by H.Merijn Brand.
14842 2002-01-09 Akim Demaille <akim@epita.fr>
14844 * src/files.c, src/files.h (output_infix): New.
14845 (tab_extension): Remove.
14846 (compute_base_names): Compute the former, drop the latter.
14847 * src/output.c (prepare): Insert the muscles `output-infix', and
14849 * src/parse-skel.y (string, string.1): New.
14850 (section.header): Use it.
14851 (section.yacc): Remove.
14852 (prefix): Remove too.
14853 * src/scan-skel.l: Adjust.
14854 * src/bison.simple, src/bison.hairy: Adjust.
14856 2002-01-09 Akim Demaille <akim@epita.fr>
14858 * configure.in (WERROR_CFLAGS): Compute it.
14859 * src/Makefile.am (CFLAGS): Pass it.
14860 * tests/atlocal.in (CFLAGS): Idem.
14861 * src/files.c: Fix a few warnings.
14862 (get_extension_index): Remove, unused.
14864 2002-01-08 Akim Demaille <akim@epita.fr>
14866 * src/getargs.c (AS_FILE_NAME): New.
14867 (getargs): Use it to convert DOSish file names.
14868 * src/files.c (base_name): Rename as full_base_name to avoid
14869 clashes with `base_name ()'.
14870 (filename_split): New.
14871 (compute_base_names): N-th rewrite, using filename_split.
14873 2002-01-08 Akim Demaille <akim@epita.fr>
14875 * lib/basename.c, lib/dirname.h, lib/dirname.c, lib/memrchr.c:
14876 New, stolen from the Fileutils 4.1.
14877 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
14878 * configure.in: Check for the presence of memrchr, and of its
14881 2002-01-07 Tim Van Holder <tim.van.holder@pandora.be>
14883 * lib/hash.h (__P): Added definition for this macro.
14884 * src/Makefile.am: Add parse-skel.c and scan-skel.c to
14885 BUILT_SOURCES, to ensure they are generated first.
14886 * src/parse-skel.y: Use YYERROR_VERBOSE instead of
14887 %error-verbose to allow bootstrapping with bison 1.30x.
14889 2002-01-06 Akim Demaille <akim@epita.fr>
14891 * src/reader.c (parse_braces): Don't fetch the next char, the
14892 convention is to fetch on entry.
14893 * tests/torture.at (GNU Cim Grammar): Reintroduce their weird
14894 'switch' without a following semicolon.
14895 * tests/regression.at (braces parsing): New.
14897 2002-01-06 Akim Demaille <akim@epita.fr>
14899 Bison is dead wrong in its RR conflict reports.
14901 * tests/torture.at (GNU Cim Grammar): New.
14902 * src/conflicts.c (count_rr_conflicts): Fix.
14904 2002-01-06 Akim Demaille <akim@epita.fr>
14906 Creating package.m4 from configure.ac causes too many problems.
14908 * tests/Makefile.am (package.m4): Create it by hand,
14909 AC_CONFIG_TESTDIR no longer does in the most recent CVS Autoconf.
14911 2002-01-06 Akim Demaille <akim@epita.fr>
14913 * src/Makefile.am (bison_SOURCES): Add parse-skel.h and
14916 2002-01-04 Paul Eggert <eggert@twinsun.com>
14918 * doc/bison.texinfo (Debugging):
14919 Remove YYSTDERR; it's no longer defined or used.
14920 Also, s/cstdio.h/cstdio/.
14922 2002-01-03 Akim Demaille <akim@epita.fr>
14924 * tests/bison.in, tests/atlocal.in: Adjust to CVS Autoconf.
14926 2002-01-03 Akim Demaille <akim@epita.fr>
14928 * src/parse-skel.y (process_skeleton): Don't bind the parser's
14929 tracing code to --trace, wait for a better --trace option, with
14932 2002-01-03 Akim Demaille <akim@epita.fr>
14934 * src/bison.simple (YYSTDERR): Remove, replace `stderr'.
14935 The ISO C++ standard is extremely clear about it: stderr is
14936 considered a macro, not a regular symbol (see table 94 `Header
14937 <cstdio> synopsis', [lib.c.files] 27.8.2 C Library files).
14938 Therefore std:: does not apply to it. It still does with fprintf.
14939 Also, s/cstdio.h/cstdio/.
14941 2002-01-03 Akim Demaille <akim@epita.fr>
14943 * lib/quotearg.c: Use `#include "..."' instead of `#include <...>'
14944 for non system headers.
14946 2002-01-02 Akim Demaille <akim@epita.fr>
14948 Equip the skeleton chain with location tracking, runtime trace,
14949 pure parser and scanner.
14951 * src/parse-skel.y: Request a pure parser, locations, and prefix
14953 (%union): Having several members with the same type does not help
14954 type mismatches, simplify.
14955 (YYPRINT, yyprint): New.
14956 (yyerror): ``Rename'' (there is a #define yyerror skel_error) as...
14957 (skel_error): this.
14959 * src/scan-skel.l: Adjust to these changes.
14960 * src/skeleton.h (LOCATION_RESET, LOCATION_LINES, LOCATION_STEP)
14961 (LOCATION_PRINT, skel_control_t): New.
14963 2001-12-30 Akim Demaille <akim@epita.fr>
14965 * src/parse-skel.y: Get rid of the shift/reduce conflict:
14966 replace `gb' with BLANKS.
14967 * src/scan-skel.l: Adjust.
14969 2001-12-30 Akim Demaille <akim@epita.fr>
14971 * src/system.h: We don't need nor want bcopy.
14972 Throw away MS-DOS crap: we don't need getpid.
14973 * configure.in: We don't need strndup. It was even causing
14974 problems: because Flex includes the headers *before* us,
14975 _GNU_SOURCE is not defined by config.h, and therefore strndup was
14977 * lib/xstrndup.c: New.
14978 * src/scan-skel.l: Use it.
14979 Be sure to initialize yylval.muscle member when scanning a MUSCLE.
14980 * src/parse-skel.y: Use %directives instead of #defines.
14982 2001-12-30 Akim Demaille <akim@epita.fr>
14984 * src/skeleton.h: New.
14985 * src/output.c (output_parser, output_master_parser): Remove, dead
14987 * src/output.h (get_lines_number, actions_output, guards_output)
14988 (token_definitions_output): Prototype them.
14989 * src/parse-skel.y: Add the license notice.
14990 Include output.h and skeleton.h.
14991 (process_skeleton): Returns void, and takes a single parameter.
14992 * src/scan-skel.l: Add the license notice.
14993 Include skeleton.h.
14994 Don't use %option yylineno: it seems that then Flex imagines
14995 REJECT has been used, and therefore it won't reallocate its
14996 buffers (which makes no other sense to me than a bug). It results
14997 in warnings for `unused: yy_flex_realloc'.
14999 2001-12-30 Robert Anisko <robert.anisko@epita.fr>
15001 * src/muscle_tab.h (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
15002 (MUSCLE_INSERT_PREFIX): ...to there.
15003 * src/output.c (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
15004 (MUSCLE_INSERT_PREFIX): Move from here...
15006 * src/bison.hairy: Add a section directive. Put braces around muscle
15007 names. This parser skeleton is still broken, but Bison should not
15008 choke on a bad muscle 'syntax'.
15009 * src/bison.simple: Add a section directive. Put braces around muscle
15012 * src/files.h (strsuffix, stringappend): Add declarations.
15013 (tab_extension): Add declaration.
15014 (short_base_name): Add declaration.
15016 * src/files.c (strsuffix, stringappend): No longer static. These
15017 functions are used in the skeleton parser.
15018 (tab_extension): New.
15019 (compute_base_names): Use the computations done in this function
15020 to guess if the generated parsers should have '.tab' in their
15022 (short_base_name): No longer static.
15024 * src/output.c (output_skeleton): New.
15025 (output): Disable call to output_master_parser, and give a try to
15026 a new skeleton handling system.
15027 (guards_output, actions_output): No longer static.
15028 (token_definitions_output, get_lines_number): No longer static.
15030 * configure.in: Use AM_PROG_LEX and AC_PROG_YACC.
15032 * src/Makefile.am (bison_SOURCES): Add scan-skel.l and
15035 * src/parse-skel.y: New file.
15036 * src/scan-skel.l: New file.
15038 2001-12-29 Akim Demaille <akim@epita.fr>
15040 %name-prefix is broken.
15042 * src/files.c (spec_name_prefix): Initialize to NULL, not to "yy".
15043 Adjust all dependencies.
15044 * tests/headers.at (export YYLTYPE): Strengthen this test: use
15047 Renaming yylval but not yylloc is not consistent. Now we do.
15049 * src/bison.simple: Prefix yylloc if used.
15050 * doc/bison.texinfo (Decl Summary): Document that.
15052 2001-12-29 Akim Demaille <akim@epita.fr>
15054 * doc/bison.texinfo: Promote `%long-directive' over
15056 Remove all references to fixed-output-files, yacc is enough.
15058 2001-12-29 Akim Demaille <akim@epita.fr>
15060 * src/bison.simple: Define YYDEBUG and YYERROR_VERBOSE *after* the
15061 user prologue. These are defaults.
15062 * tests/actions.at (Mid-rule actions): Make sure the user can
15063 define YYDEBUG and YYERROR_VERBOSE.
15065 2001-12-29 Akim Demaille <akim@epita.fr>
15067 * src/output.c (header_output): Don't forget to export YYLTYPE and
15069 * tests/headers.at (export YYLTYPE): New, make sure it does.
15070 * tests/regression.at (%union and --defines, Invalid CPP headers):
15072 * tests/headers.at: here.
15074 2001-12-29 Akim Demaille <akim@epita.fr>
15076 * src/gram.h (rule_s): Member `assoc' is of type `associativity'.
15078 2001-12-29 Akim Demaille <akim@epita.fr>
15080 * tests/actions.at (Mid-rule actions): Output on a single line
15081 instead of several.
15083 2001-12-29 Akim Demaille <akim@epita.fr>
15085 * doc/bison.texinfo: Formatting changes.
15087 2001-12-29 Akim Demaille <akim@epita.fr>
15089 Don't store the token defs in a muscle, just be ready to output it
15090 on command. Now possible via `symbols'. Fixes a memory leak.
15092 * src/output.c (token_definitions_output): New.
15093 (output_parser, header_output): Use it.
15094 * src/reader.c (symbols_save): Remove.
15096 2001-12-29 Akim Demaille <akim@epita.fr>
15098 * src/bison.simple: Do not provide a default for YYSTYPE and
15099 YYLTYPE before the user's prologue. Otherwise it's hardly... a
15102 2001-12-29 Akim Demaille <akim@epita.fr>
15104 Mid-rule actions are simply... ignored!
15106 * src/reader.c (readgram): Be sure to attach mid-rule actions to
15107 the empty-rule associated to the dummy symbol, not to the host
15109 * tests/actions.at (Mid-rule actions): New.
15111 2001-12-29 Akim Demaille <akim@epita.fr>
15115 * src/reader.c (reader): Free grammar.
15117 2001-12-29 Akim Demaille <akim@epita.fr>
15121 * src/LR0.c (new_itemsets): Don't allocate `shift_symbol' here,
15122 since it allocates it for each state, although only one is needed.
15123 (allocate_storage): Do it here.
15125 2001-12-29 Akim Demaille <akim@epita.fr>
15127 * src/options.h, src/options.c (create_long_option_table): Rename
15129 (long_option_table_new): this, with a clearer prototype.
15130 (percent_table): Remove, unused,
15131 * src/getargs.c (getargs): Adjust.
15133 2001-12-29 Akim Demaille <akim@epita.fr>
15135 * src/LR0.c, src/conflicts.c, src/lalr.c, src/lalr.h, src/output.c
15136 * src/print.c, src/print_graph.c, src/state.h: Rename state_table
15139 2001-12-29 Akim Demaille <akim@epita.fr>
15141 * src/lalr.c (build_relations): Rename `states' as `states1'.
15142 Sorry, I don't understand exactly what it is, no better name...
15144 2001-12-29 Akim Demaille <akim@epita.fr>
15146 * src/closure.c, src/conflicts.c, src/derives.c, src/gram.c
15147 * src/gram.h, src/lalr.c, src/nullable.c, src/output.c, src/print.c
15148 * src/print_graph.c, src/reader.c, src/reduce.c: Rename rule_table
15151 2001-12-29 Akim Demaille <akim@epita.fr>
15153 * src/gram.c (rprec, rprecsym, rassoc): Remove, unused since long
15156 2001-12-29 Akim Demaille <akim@epita.fr>
15158 * src/reader.c, src/reader.h (user_toknums): Remove.
15159 Adjust all users to use symbols[i]->user_token_number.
15161 2001-12-29 Akim Demaille <akim@epita.fr>
15163 * src/gram.c, src/gram.h (sprec, sassoc): Remove.
15164 Adjust all users to use symbols[i]->prec or ->assoc.
15166 2001-12-29 Akim Demaille <akim@epita.fr>
15168 * src/reader.c, src/reader.h (tags): Remove.
15169 Adjust all users to use symbols[i]->tag.
15171 2001-12-29 Akim Demaille <akim@epita.fr>
15173 * src/gram.h, src/gram.c (symbols): New, similar to state_table
15175 * src/reader.c (packsymbols): Fill this table.
15177 * src/conflicts.c (resolve_sr_conflict): Adjust.
15178 * src/reduce.c (reduce_grammar): Adjust: just sort symbols, a
15180 Use symbols[i]->tag instead of tags[i].
15182 2001-12-29 Akim Demaille <akim@epita.fr>
15184 * tests/calc.at (_AT_DATA_CALC_Y): Also use %union.
15185 In addition, put a comment in there, to replace...
15186 * tests/regression.at (%union and C comments): Remove.
15188 2001-12-29 Akim Demaille <akim@epita.fr>
15190 * tests/regression.at (Web2c Actions): Blindly move the actual
15191 output as expected output. The contents *seem* right to me, but I
15192 can't pretend reading perfectly parser tables... Nonetheless, all
15193 the other tests pass correctly, the table look OK, even though the
15194 presence of `$axiom' is to be noted: AFAICS it is useless (but
15197 2001-12-29 Akim Demaille <akim@epita.fr>
15199 * src/reader.c (readgram): Don't add the rule 0 if there were no
15200 rules read. In other words, add it _after_ having performed
15201 grammar sanity checks.
15202 Fixes the `tests/regression.at (Invalid input: 1)' Failure.
15204 2001-12-29 Akim Demaille <akim@epita.fr>
15206 * tests/regression.at (Web2c Report): Catch up: the rule 0 is now
15207 visible, and some states have now a different number.
15209 2001-12-29 Akim Demaille <akim@epita.fr>
15211 * src/reader.c (readgram): Bind the initial rule's lineno to that
15213 * tests/regression.at (Rule Line Numbers, Unresolved SR Conflicts):
15214 (Solved SR Conflicts): Adjust rule 0's line number.
15216 2001-12-29 Akim Demaille <akim@epita.fr>
15218 Fix the `GAWK Grammar' failure.
15220 * src/LR0.c (final_state): Initialize to -1 so that we do compute
15221 the reductions of the first state which was mistakenly confused
15222 with the final state because precisely final_state was initialized
15224 * tests/sets.at (Nullable): Adjust: state 0 does have lookaheads,
15225 now noticed by Bison.
15226 * tests/regression.at (Rule Line Numbers): Adjust: state 0 does
15227 have a reduction on $default.
15229 2001-12-29 Akim Demaille <akim@epita.fr>
15231 * src/gram.c (ritem_print): Be sure to subtract 1 when displaying
15233 * src/closure.c (print_closure): Likewise.
15234 * src/derives.c (print_derives): Likewise.
15235 * tests/sets.at (Nullable): Adjust: the rule numbers are correct
15238 2001-12-29 Akim Demaille <akim@epita.fr>
15240 * src/lalr.c (lookaheads_print): New.
15241 (lalr): Call it when --trace-flag.
15242 * tests/sets.at (Nullable): Adjust: when tracing, the lookaheads
15245 2001-12-29 Akim Demaille <akim@epita.fr>
15247 * src/derives.c (print_derives): Be sure to use `>= 0', not `> 0',
15248 when walking through ritem, even via rule->rhs.
15249 * src/reduce.c (dump_grammar, useful_production, reduce_output)
15250 (useful_production, useless_nonterminals): Likewise.
15251 (reduce_grammar_tables): Likewise, plus update nritems.
15252 * src/nullable.c (set_nullable): Likewise.
15253 * src/lalr.c (build_relations): Likewise.
15254 * tests/sets.at (Nullable): Adjust.
15255 Fortunately, now, the $axiom is no longer nullable.
15257 2001-12-29 Akim Demaille <akim@epita.fr>
15259 * src/LR0.c (generate_states): Use nritems, not nitems, nor using
15261 * src/gram.c (ritem_longest_rhs): Likewise.
15262 * src/reduce.c (nonterminals_reduce): Likewise.
15263 * src/print_graph.c (print_graph): Likewise.
15264 * src/output.c (output_rule_data): Likewise.
15265 * src/nullable.c (set_nullable): Likewise.
15267 2001-12-29 Akim Demaille <akim@epita.fr>
15269 * src/output.c: Comment changes.
15271 2001-12-27 Paul Eggert <eggert@twinsun.com>
15273 * src/bison.simple (YYSTACK_ALLOC, YYSIZE_T): Remove special
15274 cases for non-GNU systems like AIX, HP-UX, SGI, Sun, and
15275 Sparc, as they were causing more porting problems than the
15276 (minor) performance improvement was worth.
15278 Also, catch up with 1.31's YYSTD.
15280 2001-12-27 Akim Demaille <akim@epita.fr>
15282 * src/output.c (output_gram): Rely on nritems, not the
15283 0-sentinel. See below.
15284 Use -1 as separator, not 0.
15285 * src/bison.simple (yyparse): Subtract 1 to the rule numbers.
15286 Rely on -1 as separator in yyrhs, instead of 0.
15287 * tests/calc.at (AT_CHECK_CALC): Now, the parsers no longer issue
15288 twice `Now at end of input', therefore there are two lines less to
15291 2001-12-27 Akim Demaille <akim@epita.fr>
15293 * tests/regression.at (Unresolved SR Conflicts):
15294 (Solved SR Conflicts, Rule Line Numbers): Adjust to the changes
15297 2001-12-27 Akim Demaille <akim@epita.fr>
15299 * src/LR0.c (new_state): Recognize the final state by the fact it
15300 is reached by eoftoken.
15301 (insert_start_shifting_state, insert_eof_shifting_state)
15302 (insert_accepting_state, augment_automaton): Remove, since now
15303 these states are automatically computed from the initial state.
15304 (generate_states): Adjust.
15305 * src/print.c: When reporting a rule number to the user, substract
15306 1, so that the axiom rule is rule 0, and the first user rule is 1.
15307 * src/reduce.c: Likewise.
15308 * src/print_graph.c (print_core): For the time being, just as for
15309 the report, depend upon --trace-flags to dump the full set of
15311 * src/reader.c (readgram): Once the grammar read, insert the rule
15312 0: `$axiom: START-SYMBOL $'.
15313 * tests/set.at: Adjust: rule 0 is now displayed, and since the
15314 number of the states has changed (the final state is no longer
15315 necessarily the last), catch up.
15317 2001-12-27 Akim Demaille <akim@epita.fr>
15319 Try to make the use of the eoftoken valid. Given that its value
15320 is 0 which was also used as a sentinel in ritem, (i) make sure >= 0
15321 is used instead of > 0 where appropriate, (ii), depend upon nritems
15322 instead of the 0-sentinel.
15324 * src/gram.h, src/gram.c (nritems): New.
15325 Expected to be duplication of nitems, but for the time being...
15326 * src/reader.c (packgram): Assert nritems and nitems are equal.
15327 * src/LR0.c (allocate_itemsets, new_itemsets): Adjust.
15328 * src/closure.c (print_closure, print_fderives): Likewise.
15329 * src/gram.c (ritem_print): Likewise.
15330 * src/print.c (print_core, print_grammar): Likewise.
15331 * src/print_graph.c: Likewise.
15333 2001-12-27 Akim Demaille <akim@epita.fr>
15335 * src/main.c (main): If there are complains after grammar
15336 reductions, then output the report anyway if requested, then die.
15337 * src/symtab.c (bucket_new): Initialize `value' to -1, not 0.
15338 * src/reader.c (eoftoken): New.
15339 (parse_token_decl): If the token being defined has value `0', it
15341 (packsymbols): No longer hack `tags' to insert `$' by hand.
15342 Be sure to preserve the value of the eoftoken.
15343 (reader): Make sure eoftoken is defined.
15344 Initialize nsyms to 0: now eoftoken is created just like the others.
15345 * src/print.c (print_grammar): Don't special case the eof token.
15346 * src/regression.at: Adjust: `$' has value 0, not -1, which was a
15347 lie anyway, albeit pleasant.
15348 * tests/calc.at: Exercise error messages with eoftoken.
15349 Change the grammar so that empty input is invalid.
15350 Adjust expectations.
15351 When yyungeting, be sure to use a valid yylloc: use last_yylloc.
15353 2001-12-27 Akim Demaille <akim@epita.fr>
15355 * configure.in: Check the protos of strchr ans strspn.
15356 Replace strchr if needed.
15357 * src/system.h: Provide the protos of strchr, strspn and memchr if
15359 * lib/strchr.c: New.
15360 * src/reader.c (symbols_save): Use strchr.
15362 2001-12-27 Akim Demaille <akim@epita.fr>
15364 * src/print.c, src/print_graph.c (escape): New.
15365 Use it to quote the TAGS outputs.
15366 * src/print_graph.c (print_state): Now errors are in red, and
15367 reductions in green.
15368 Prefer high to wide: output the state number on a line of its own.
15370 2001-12-27 Akim Demaille <akim@epita.fr>
15372 * src/state.h, src/state.c (reductions_new): New.
15373 * src/LR0.c (set_state_table): Let all the states have a
15374 `reductions', even if reduced to 0.
15375 (save_reductions): Adjust.
15376 * src/lalr.c (initialize_LA, initialize_lookaheads): Adjust.
15377 * src/print.c (print_reductions, print_actions): Adjust.
15378 * src/output.c (action_row): Adjust.
15380 2001-12-27 Akim Demaille <akim@epita.fr>
15382 * src/state.h, src/state.c (errs_new, errs_dup): New.
15383 * src/LR0.c (set_state_table): Let all the states have an errs,
15384 even if reduced to 0.
15385 * src/print.c (print_errs, print_reductions): Adjust.
15386 * src/output.c (output_actions, action_row): Adjust.
15387 * src/conflicts.c (resolve_sr_conflict): Adjust.
15389 2001-12-27 Akim Demaille <akim@epita.fr>
15391 * src/lalr.c (set_goto_map, initialize_F): Use SHIFT_SYMBOL.
15393 2001-12-27 Akim Demaille <akim@epita.fr>
15395 * src/conflicts.c, src/conflicts.h (print_reductions): Move to...
15396 * src/print.c: here.
15397 (lookaheadset, shiftset): New, used as additional storage by
15399 (print_results): Adjust.
15400 (print_shifts, print_gotos, print_errs): New, extracted from...
15401 (print_actions): here.
15402 * src/print_graph.c (print_actions): Remove dead code.
15404 2001-12-27 Akim Demaille <akim@epita.fr>
15406 * src/reader.c (copy_dollar, copy_at): Better checking of `n' in
15409 2001-12-27 Akim Demaille <akim@epita.fr>
15411 * src/lalr.c (add_lookback_edge): Use state_t instead of ints.
15412 (build_relations): Adjust.
15414 2001-12-27 Akim Demaille <akim@epita.fr>
15416 * src/lalr.c (set_goto_map): Remove a wrong but benign loop
15419 2001-12-27 Akim Demaille <akim@epita.fr>
15421 * src/reader.c (packgram): Catch nitems overflows.
15423 2001-12-27 Akim Demaille <akim@epita.fr>
15425 * src/files.c, src/files.h (guard_obstack): Remove.
15426 * src/output.c (output): Adjust.
15427 * src/reader.c (parse_braces): New, factoring...
15428 (copy_action, copy_guard): these two which are renamed as...
15429 (parse_action, parse_guard): these.
15430 As a voluntary consequence, using braces around guards is now
15433 2001-12-27 Akim Demaille <akim@epita.fr>
15435 * src/gram.h (rule_t): `guard' and `guard_line' are new members.
15436 * src/reader.c (symbol_list): `guard' and `guard_line' are new
15438 (symbol_list_new): Adjust.
15439 (copy_action): action_line is the first line, not the last.
15440 (copy_guard): Just as for actions, store the `action' only, not
15441 the switch/case/break flesh.
15442 Don't parse the user action that might follow the guard, let...
15443 (readgram): do it, i.e., now, there can be an action after a
15445 In other words the guard is just explicitly optional.
15446 (packgram): Adjust.
15447 * src/output.c (guards_output): New.
15448 (output_parser): Call it when needed.
15449 (output): Also free the guard and attrs obstacks.
15450 * src/files.c, src/files.h (obstack_save): Remove.
15451 (output_files): Remove.
15452 As a result, if one needs the former `.act' file, using an
15453 appropriate skeleton which requires actions and guards is now
15455 * src/main.c (main): Adjust.
15456 * tests/semantic.at: New.
15457 * tests/regression.at: Use `input.y' as input file name.
15458 Avoid 8+3 problems by requiring input.c when the test needs the
15461 2001-12-27 Akim Demaille <akim@epita.fr>
15463 * src/reader.c (symbol_list_new): Be sure to initialize all the
15466 2001-12-27 Akim Demaille <akim@epita.fr>
15468 All the hacks using a final pseudo state are now useless.
15470 * src/LR0.c (set_state_table): state_table holds exactly nstates.
15471 * src/lalr.c (nLA): New.
15472 (initialize_LA, compute_lookaheads, initialize_lookaheads): Use it
15473 instead of lookaheadsp from the pseudo state (nstate + 1).
15475 2001-12-27 Akim Demaille <akim@epita.fr>
15477 * src/output.c (action_row, token_actions): Use a state_t instead
15478 of a integer, and nlookaheads instead of the following state's
15481 2001-12-27 Akim Demaille <akim@epita.fr>
15483 * src/conflicts.c (log_resolution, flush_shift)
15484 (resolve_sr_conflict, set_conflicts, solve_conflicts)
15485 (count_sr_conflicts, count_rr_conflicts, conflicts_output)
15486 (conflicts_print, print_reductions): Use a state_t instead of an
15487 integer when referring to a state.
15488 As much as possible, depend upon nlookaheads, instead of the
15489 `lookaheadsp' member of the following state (since lookaheads of
15490 successive states are successive, the difference between state n + 1
15491 and n served as the number of lookaheads for state n).
15492 * src/lalr.c (add_lookback_edge): Likewise.
15493 * src/print.c (print_core, print_actions, print_state)
15494 (print_results): Likewise.
15495 * src/print_graph.c (print_core, print_actions, print_state)
15496 (print_graph): Likewise.
15497 * src/conflicts.h: Adjust.
15499 2001-12-27 Akim Demaille <akim@epita.fr>
15501 * src/bison.hairy: Formatting/comment changes.
15503 Remove `register' indications.
15504 Add plenty of `static'.
15506 2001-12-27 Akim Demaille <akim@epita.fr>
15508 * src/output.c (prepare): Drop the muscle `ntbase' which
15509 duplicates ntokens.
15510 * src/bison.simple: Formatting/comment changes.
15511 Use YYNTOKENS only, which is documented, but not YYNTBASE, which
15512 is an undocumented synonym.
15514 2001-12-22 Akim Demaille <akim@epita.fr>
15516 * src/output.c (output_table_data): Change the prototype to use
15517 `int' for array ranges: some invocations do pass an int, not a
15519 Reported by Wayne Green.
15521 2001-12-22 Akim Demaille <akim@epita.fr>
15523 Some actions of web2c.y are improperly triggered.
15524 Reported by Mike Castle.
15526 * src/lalr.c (traverse): s/F (i)[k] = F (j)[k]/F (j)[k] = F (i)[k]/.
15527 * tests/regression.at (Web2c): Rename as...
15528 (Web2c Report): this.
15529 (Web2c Actions): New.
15531 2001-12-22 Akim Demaille <akim@epita.fr>
15533 Reductions in web2c.y are improperly reported.
15534 Reported by Mike Castle.
15536 * src/conflicts.c (print_reductions): Fix.
15537 * tests/regression.at (Web2c): New.
15539 2001-12-18 Akim Demaille <akim@epita.fr>
15541 Some host fail on `assert (!"foo")', which expands to
15542 ((!"foo") ? (void)0 : __assert("!"foo."", __FILE__, __LINE__))
15543 Reported by Nelson Beebee.
15545 * src/output.c, src/vcg.c: Replace `assert (!"it succeeded")' with
15546 `#define it_succeeded 0' and `assert (it_succeeded)'.
15548 2001-12-17 Marc Autret <autret_m@epita.fr>
15550 * src/bison.simple: Don't hard code the skeleton line and filename.
15551 * src/output.c (output_parser): Rename 'line' as 'output_line'.
15552 New line counter 'skeleton_line' (skeleton-line muscle).
15554 2001-12-17 Paul Eggert <eggert@twinsun.com>
15556 * NEWS, doc/bison.texinfo, doc/bison.1, doc/bison.rnh: Document that
15557 YYDEBUG must be defined to a nonzero value.
15559 * src/bison.simple (yytname): Do not assume that the user defines
15560 YYDEBUG to a properly parenthesized expression.
15562 2001-12-17 Akim Demaille <akim@epita.fr>
15564 * src/state.h (state_t): Rename lookaheads as lookaheadsp.
15565 nlookaheads is a new member.
15567 * src/lalr.h (nlookaheads): Remove this orphan declaration.
15568 * src/lalr.c (initialize_lookaheads): Set nlookaheads for each
15571 2001-12-17 Akim Demaille <akim@epita.fr>
15573 * src/files.h, src/files.c (open_files, close_files): Remove.
15574 * src/main.c (main): Don't open/close files, nor invoke lex_free,
15576 * src/reader.c (reader): Do it.
15578 2001-12-17 Akim Demaille <akim@epita.fr>
15580 * src/conflicts.c (print_reductions): Formatting changes.
15582 2001-12-17 Akim Demaille <akim@epita.fr>
15584 * src/conflicts.c (flush_shift): Also adjust lookaheadset.
15585 (flush_reduce): New.
15586 (resolve_sr_conflict): Adjust.
15588 2001-12-17 Akim Demaille <akim@epita.fr>
15590 * src/output.c (output_obstack): Be static and rename as...
15591 (format_obstack): this, to avoid any confusion with files.c's
15593 * src/reader.h (muscle_obstack): Move to...
15594 * src/output.h: here, since it's defined in output.c.
15596 2001-12-17 Akim Demaille <akim@epita.fr>
15598 * src/output.c (action_row, save_column, default_goto)
15599 (sort_actions, matching_state, pack_vector): Better variable
15602 2001-12-17 Akim Demaille <akim@epita.fr>
15604 * src/output.c: Various formatting changes.
15606 2001-12-17 Akim Demaille <akim@epita.fr>
15608 * src/files.c (output_files): Free the output_obstack.
15609 * src/main.c (main): Call print and print_graph conditionally.
15610 * src/print.c (print): Work unconditionally.
15611 * src/print_graph.c (print_graph): Work unconditionally.
15612 * src/conflicts.c (log_resolution): Output only if verbose_flag.
15614 2001-12-16 Marc Autret <autret_m@epita.fr>
15616 * src/output.c (actions_output): Fix. When we use %no-lines,
15617 there is one less line per action.
15619 2001-12-16 Marc Autret <autret_m@epita.fr>
15621 * src/bison.simple: Remove a useless #line directive.
15622 s/#line %%line %%skeleton/#line %%line "%%parser-file-name"/'.
15623 * src/output.c (get_lines_number): New.
15624 (output_parser): Adjust, now takes care about the lines of a
15626 Fix line numbering.
15627 (actions_output): Computes the number of lines taken by actions.
15628 (output_master_parser): Insert new skeleton which is the name of
15629 the output parser file name.
15631 2001-12-15 Marc Autret <autret_m@epita.fr>
15633 * src/bison.simple [YYERROR_VERBOSE]: Restore backward compatibility.
15635 2001-12-15 Marc Autret <autret_m@epita.fr>
15637 * src/output.c (output_gram): Keep track of the hairy one.
15639 2001-12-15 Akim Demaille <akim@epita.fr>
15641 Make `make distcheck' work.
15643 * lib/Makefile.am (INCLUDES): Add top_srcdir/intl, since hash uses
15644 system.h which uses libgettext.h.
15646 2001-12-15 Akim Demaille <akim@epita.fr>
15648 * src/nullable.c (set_nullable): Useless rules must be skipped,
15649 otherwise, since we range over their symbols, we might look at a
15650 nonterminal which no longer ``exists'', i.e., it is not counted in
15651 `nvars', hence we overflow our arrays.
15653 2001-12-15 Akim Demaille <akim@epita.fr>
15655 The header can also be produced directly, without any obstack!
15658 * src/files.c, src/files.h (defines_obstack): Remove.
15659 (compute_header_macro): Global.
15660 (defines_obstack_save): Remove.
15661 * src/reader.c (parse_union_decl): No longer output to
15662 defines_obstack: its content can be found in the `stype' muscle
15664 (output_token_translations): Merge into...
15665 (symbols_output): this.
15667 (symbols_save): this.
15669 * src/output.c (header_output): New.
15672 2001-12-15 Akim Demaille <akim@epita.fr>
15674 * src/reader.c (parse_union_decl): Instead of handling two obstack
15675 simultaneously, use one to define the `stype' muscle, and use the
15676 value of the latter to fill defines_obstack.
15677 (copy_comment): Remove.
15678 (copy_comment2): Work for a single obstack.
15680 (copy_comment): this.
15682 2001-12-15 Akim Demaille <akim@epita.fr>
15684 * src/lex.c, src/lex.h (xgetc): No longer static.
15685 * src/reader.c (parse_union_decl): Revamp.
15687 2001-12-15 Akim Demaille <akim@epita.fr>
15689 Still making progress in separating Bison into (i) input, (ii)
15690 process, (iii) output: now we can directly output the parser file
15691 without using table_obstack at all.
15693 * src/files.c, src/files.h (table_obstack): Bye bye.
15694 (parser_file_name): New.
15695 * src/files.c (compute_output_file_names): Compute it.
15696 * src/output.c (actions_output, output_parser)
15697 (output_master_parser): To a file instead of an obstack.
15699 2001-12-15 Akim Demaille <akim@epita.fr>
15701 Attach actions to rules, instead of pre-outputting them to
15704 * src/gram.h (rule_t): action and action_line are new members.
15705 * src/reader.c (symbol_list): Likewise.
15706 (copy_action): Save the actions within the rule.
15707 (packgram): Save them in rule_table.
15708 * src/output.c (actions_output): New.
15709 (output_parser): Use it on `%%actions'.
15710 (output_rule_data): Don't free rule_table.
15712 (prepare): Don't save the `action' muscle.
15713 * src/bison.simple: s/%%action/%%actions/.
15715 2001-12-15 Akim Demaille <akim@epita.fr>
15717 * src/reader.c (copy_action): When --yacc, don't append a `;'
15718 to the user action: let it fail if lacking.
15719 Suggested by Arnold Robbins and Tom Tromey.
15721 2001-12-14 Akim Demaille <akim@epita.fr>
15723 * src/lex.c (literalchar): Simply return the char you decoded, non
15724 longer mess around with obstacks and int pointers.
15725 Adjust all callers.
15727 2001-12-14 Akim Demaille <akim@epita.fr>
15729 * src/lex.c (literalchar): Don't escape the special characters,
15730 just decode them, and keep them as char (before, eol was output as
15731 the 2 char string `\n' etc.).
15732 * src/output.c (output_rule_data): Use quotearg to output the
15735 2001-12-13 Paul Eggert <eggert@twinsun.com>
15737 * src/bison.simple (YYSIZE_T, YYSTACK_ALLOC, YYSTACK_FREE):
15738 Do not infringe on the global user namespace when using C++.
15739 (YYFPRINTF, YYSTDERR): New macros, needed for the above.
15740 All uses of `fprintf' and `stderr' changed.
15742 * doc/bison.texinfo: Document YYFPRINTF, YYSTDERR.
15744 2001-12-13 Akim Demaille <akim@epita.fr>
15746 The computation of nullable is broken: it doesn't handle empty
15749 * tests/torture.at (GNU AWK Grammar): New.
15750 * tests/sets.at (Nullable): New.
15751 * src/nullable.c (set_nullable): Instead of blindly looping over
15752 `ritems', loop over the rules, and then over their rhs's.
15754 Work around Autotest bugs.
15756 * src/warshall.c (bitmatrix_print): Don't use `+--+' as table
15757 frame, because Autotest understand lines starting with a `+' as
15758 traces from the shell. Then, they are not processed properly.
15759 Admittedly an Autotest bug, but we don't have time to wait for
15760 Autotest to catch up.
15761 * tests/regression.at (Broken Closure): Adjust to the new table
15764 * tests/sets.at: here.
15766 2001-12-13 Akim Demaille <akim@epita.fr>
15768 * src/closure.c (closure): Use nrules instead of playing tricks
15769 with BITS_PER_WORD.
15771 2001-12-13 Akim Demaille <akim@epita.fr>
15773 * src/print.c (print_actions): Output the handling of `$' as the
15774 traces do: shifting the token EOF. Before EOF was treated as a
15776 * tests/regression.at: Adjust some tests.
15777 * src/print_graph.c (print_core): Complete the set of items via
15778 closure. The next-to-final and final states are still unsatisfying,
15779 but that's to be addressed elsewhere.
15780 No longer output the rule numbers, but do output the state number.
15781 A single loop for the shifts + gotos is enough, but picked a
15782 distinct color for each.
15783 (print_graph): Initialize and finalize closure.
15785 2001-12-13 Akim Demaille <akim@epita.fr>
15787 * src/reader.c (readgram): Remove dead code, an strip useless
15789 (get_type): Remove, unused.
15791 2001-12-12 Akim Demaille <akim@epita.fr>
15793 * src/complain.h, src/complain.c: Remove error_one_per_line, rely
15794 on that of lib/error.c.
15796 2001-12-12 Akim Demaille <akim@epita.fr>
15798 Some hosts don't like `/' in includes.
15800 * src/system.h: Include libgettext.h without qualifying the path.
15801 * src/Makefile.am (INCLUDES): Add $(top_srcdir)/intl, remove
15804 2001-12-11 Marc Autret <autret_m@epita.fr>
15806 * src/output.c (output_parser): Remove useless muscle.
15808 2001-12-11 Marc Autret <autret_m@epita.fr>
15810 * src/bison.simple: Remove #line just before %%epilogue. It
15811 is now handled in ...
15812 * src/reader.c (read_additionnal_code): Add the output of a
15813 #line for the epilogue.
15815 2001-12-10 Marc Autret <autret_m@epita.fr>
15817 * src/reader.c (copy_definition): Re-use CPP-outed code which
15818 replace precedent remove.
15819 * src/bison.simple: Remove #line before %%prologue because
15820 %%input-line is wrong at this time.
15822 2001-12-10 Marc Autret <autret_m@epita.fr>
15824 * src/reader.c (symbols_output): Clean up.
15825 * src/output.c (output_gram, output): Clean up.
15827 2001-12-10 Akim Demaille <akim@epita.fr>
15829 * src/lalr.c (initialize_lookaheads): New. Extracted from...
15830 * src/LR0.c (set_state_table): here.
15831 * src/lalr.c (lalr): Call it.
15833 2001-12-10 Akim Demaille <akim@epita.fr>
15835 * src/state.h (shifts): Remove the `number' member: shifts are
15836 attached to state, hence no longer need to be labelled with a
15839 2001-12-10 Akim Demaille <akim@epita.fr>
15841 Now that states have a complete set of members, the linked list of
15842 shifts is useless: just fill directly the state's shifts member.
15844 * src/state.h (shifts): Remove the `next' member.
15845 * src/LR0.c (first_state, last_state): Remove.
15846 Adjust the callers.
15847 (augment_automaton): Don't look for the shifts that must be added
15848 a shift on EOF: it is those of the state we looked for! But now,
15849 since shifts are attached, it is no longer needed to looking
15850 merely by its id: its number.
15852 2001-12-10 Akim Demaille <akim@epita.fr>
15854 * src/LR0.c (augment_automaton): Better variable locality.
15855 Remove an impossible branch: if there is a state corresponding to
15856 the start symbol being shifted, then there is shift for the start
15857 symbol from the initial state.
15859 2001-12-10 Akim Demaille <akim@epita.fr>
15861 * src/LR0.c (augment_automaton): Call `insert_eof_shifting_state'
15862 only when appropriate: when insert_start_shifting_state' is not
15864 * tests/regression.at (Rule Line Numbers): Adjust.
15866 2001-12-10 Akim Demaille <akim@epita.fr>
15868 * src/LR0.c (augment_automaton): Now that all states have shifts,
15869 merge the two cases addition shifts to the initial state.
15871 2001-12-10 Akim Demaille <akim@epita.fr>
15873 * src/lalr.c (set_state_table): Move to...
15875 * src/lalr.c (lalr): Don't call it...
15876 * src/LR0.c (generate_states): do it.
15877 * src/LR0.h (first_state): Remove, only the table is used.
15879 2001-12-10 Akim Demaille <akim@epita.fr>
15881 * src/LR0.h (first_shift, first_reduction): Remove.
15882 * src/lalr.c: Don't use first_shift: find shifts through the
15885 2001-12-10 Akim Demaille <akim@epita.fr>
15887 * src/LR0.c: Attach shifts to states as soon as they are
15889 * src/lalr.c (set_state_table): Instead of assigning shifts to
15890 state, just assert that the mapping was properly done.
15892 2001-12-10 Akim Demaille <akim@epita.fr>
15894 * src/LR0.c (insert_start_shift): Rename as...
15895 (insert_start_shifting_state): this.
15896 (insert_eof_shifting_state, insert_accepting_state): New.
15897 (augment_automaton): Adjust.
15898 Better locality of the variables.
15899 When looking if the start_symbol is shifted from the initial
15900 state, using `while (... symbol != start_symbol ...)' sounds
15901 better than `while (... symbol < start_symbol ...)': If fail
15902 to see how the order between symbols could be relevant!
15904 2001-12-10 Akim Demaille <akim@epita.fr>
15906 * src/getargs.h: Don't declare `spec_name_prefix' and
15907 `spec_file_prefix', declared by src/files.h.
15908 * src/files.c, src/files.h: Default for spec_name_prefix is "yy".
15909 * src/muscle_tab.c (muscle_init): Default prefix to NULL.
15910 * src/output.c (prepare): Adjust.
15911 * src/reader.c (symbols_output): Likewise.
15912 * src/vmsgetargs.c: Vaguely adjust, but who cares?
15914 2001-12-10 Akim Demaille <akim@epita.fr>
15916 * src/muscle_tab.c (muscle_init): NULL is a better default than
15919 2001-12-10 Akim Demaille <akim@epita.fr>
15921 * src/reader.c (reader): Calling symbols_output once is enough.
15923 2001-12-10 Akim Demaille <akim@epita.fr>
15925 Now that states have a complete set of members, the linked list of
15926 reductions is useless: just fill directly the state's reductions
15929 * src/state.h (struct reductions): Remove member `number' and
15931 * src/LR0.c (first_reduction, last_reduction): Remove.
15932 (save_reductions): Don't link the new reductions, store them in
15934 * src/lalr.c (set_state_table): No need to attach reductions to
15935 states, it's already done.
15936 * src/output.c (output_actions): No longer free the shifts, then
15937 the reductions, then the states: free all the states and their
15940 2001-12-10 Akim Demaille <akim@epita.fr>
15942 * src/options.c (OPTN, DRTV, BOTH): New.
15943 (option_table): Use them.
15945 * src/muscle_tab.c: Don't include xalloc.h and string.h: that's
15946 the job of system.h.
15947 * src/options.c: Don't include stdio.h and xalloc.h for the same
15950 2001-12-10 Akim Demaille <akim@epita.fr>
15952 * src/output.c (output, prepare): Make sure the values of the
15953 muscles `action' and `prologue' are 0-terminated.
15955 2001-12-10 Akim Demaille <akim@epita.fr>
15957 Clean up GCC warnings.
15959 * src/reader.c (copy_action): `buf' is not used.
15960 (parse_skel_decl): Be static.
15961 * src/muscle_tab.c (mhash1, mhash2, muscle_insert): Preserve `const'.
15962 * src/options.h (create_long_option_table): Have a real prototype.
15963 * lib/hash.c, lib/hash.h (hash_insert, hash_insert_at, hash_delete)
15964 (hash_delete_at): Return const void *.
15965 Adjust casts to preserve the const.
15967 2001-12-10 Akim Demaille <akim@epita.fr>
15969 * configure.in: Require 2.52g.
15970 M4 is not needed, but AUTOM4TE is.
15971 * m4/m4.m4: Remove.
15972 * tests/Makefile.am: Adjust.
15974 2001-12-10 Akim Demaille <akim@epita.fr>
15976 One structure for states is enough, even though theoretically
15977 there are LR(0) states and LALR(1) states.
15979 * src/lalr.h (state_t): Remove.
15980 (state_table): Be state_t **, not state_t *.
15981 * src/state.h (core, CORE_ALLOC): Rename as...
15982 (state_t, STATE_ALLOC): this.
15983 Add the LALR(1) members: shifts, reductions, errs.
15984 * src/LR0.c (state_table): Rename as...
15985 (state_hash): this, to avoid name clashes with the global
15987 * src/print_graph.c, src/LR0.c, src/LR0.h, src/conflicts.c
15988 * src/lalr.c, src/lalr.h, src/output.c, src/print.c: Adjust.
15990 2001-12-10 Akim Demaille <akim@epita.fr>
15992 Bison dumps core on bash.y.
15993 Reported by Pascal Bart.
15995 * src/warshall.c (bitmatrix_print): New.
15997 When performing a transitive closure R(i, j) && R(j, k) => R(i, k),
15998 j must be the outer loop.
15999 * tests/regression.at (Broken Closure): New.
16001 2001-12-05 Akim Demaille <akim@epita.fr>
16003 * tests/atlocal.in (CPPFLAGS): Do not leave a space between -I and
16005 Reported by Peter Hamorsky.
16007 2001-12-05 Akim Demaille <akim@epita.fr>
16009 * src/conflicts.c (err_table): Remove.
16010 (resolve_sr_conflict): Adjust.
16011 * src/lalr.h (state_t.reduction_table, state_t.shift_table):
16013 (state_t.reductions, state_t.shifts): this.
16015 2001-12-05 Akim Demaille <akim@epita.fr>
16017 * src/reduce.c (reduce_grammar_tables): No longer disable the
16018 removal of useless rules via CPP but via `if (0)', so that the
16019 compiler still check the code is valid.
16020 For instance, it should have noticed `rline' no longer exists: use
16021 the `line' member of rule_t.
16022 * src/gram.c (dummy, rline): Remove, unused.
16024 2001-12-05 Akim Demaille <akim@epita.fr>
16026 * src/output.c (pack_vector): Use assert, not berror.
16027 * src/main.c (berror): Remove, unused.
16029 2001-12-05 Akim Demaille <akim@epita.fr>
16031 New experimental feature: if --verbose --trace output all the
16032 items of a state, not only its kernel.
16034 * src/print.c (print_core): If `trace_flag', then invoke closure
16035 before outputting the items of the state (print_core is no longer
16036 a correct name them).
16037 (print_results): Invoke new_closure/free_closure if needed.
16039 2001-12-05 Akim Demaille <akim@epita.fr>
16041 * src/LR0.c (new_itemsets): Use nshifts only, not shiftcount.
16042 * src/closure.c, src/closure.h (itemsetsize): Rename as...
16043 (nitemset): for consistency with the rest of the project.
16045 2001-12-05 Akim Demaille <akim@epita.fr>
16047 * src/closure.c (print_closure): Improve.
16048 (closure): Use it for printing input and output.
16050 2001-12-05 Akim Demaille <akim@epita.fr>
16052 * src/closure.c (FIRSTS, FDERIVES): Adjust to reality: they are
16053 indexed by nonterminals.
16055 2001-12-05 Akim Demaille <akim@epita.fr>
16057 * src/warshall.c (TC, RTC): De-obsfucate (source reduced to 22% of
16059 * src/warshall.h: Remove accidental duplication of the content.
16061 2001-12-05 Akim Demaille <akim@epita.fr>
16063 * src/closure.c (set_fderives): De-obfuscate.
16065 2001-12-05 Akim Demaille <akim@epita.fr>
16067 * src/closure.c (print_firsts, print_fderives): De-obfuscate.
16069 2001-12-05 Akim Demaille <akim@epita.fr>
16071 * src/closure.c (set_firsts): De-obfuscate.
16073 2001-12-05 Akim Demaille <akim@epita.fr>
16075 * src/output.c (action_row): De-obfuscate
16076 using the good o' techniques: arrays not pointers, variable
16077 locality, BITISSET, RESETBIT etc.
16079 2001-12-05 Akim Demaille <akim@epita.fr>
16081 Pessimize the code to simplify it: from now on, all the states
16082 have a valid SHIFTS, which NSHIFTS is possibly 0.
16084 * src/LR0.c (shifts_new): Be global and move to..
16085 * src/state.c, src/state.h: here.
16086 * src/conflicts, src/lalr.c, src/output.c, src/print.c,
16087 * src/print_graph: Adjust.
16089 2001-12-05 Akim Demaille <akim@epita.fr>
16091 * src/state.h (SHIFT_DISABLE, SHIFT_IS_DISABLED): New.
16092 * src/conflicts.c: Use it.
16093 Restore a few missing `if (!SHIFT_IS_DISABLED)' which were
16094 incorrectly ``simplified''.
16096 2001-12-05 Akim Demaille <akim@epita.fr>
16098 * src/conflicts.c (flush_shift, resolve_sr_conflict): De-obfuscate
16099 using the good o' techniques: arrays not pointers, variable
16100 locality, BITISSET, RESETBIT etc.
16102 2001-12-05 Akim Demaille <akim@epita.fr>
16104 * src/state.h (SHIFT_SYMBOL): New.
16105 * src/conflicts.c: Use it to deobfuscate.
16107 2001-12-05 Akim Demaille <akim@epita.fr>
16109 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts)
16110 (print_reductions): De-obfuscate using the good o' techniques:
16111 arrays not pointers, variable locality, BITISSET.
16113 2001-12-05 Akim Demaille <akim@epita.fr>
16115 * src/conflicts.c (print_reductions): Arrays, not pointers.
16118 2001-12-05 Akim Demaille <akim@epita.fr>
16120 * src/conflicts.c (print_reductions): Pessimize, but clarify.
16122 2001-12-05 Akim Demaille <akim@epita.fr>
16124 * src/conflicts.c (print_reductions): Improve variable locality.
16126 2001-12-05 Akim Demaille <akim@epita.fr>
16128 * src/conflicts.c (print_reductions): Pessimize, but clarify.
16130 2001-12-05 Akim Demaille <akim@epita.fr>
16132 * src/conflicts.c (print_reductions): Improve variable locality.
16134 2001-12-05 Akim Demaille <akim@epita.fr>
16136 * src/state.h (SHIFT_IS_ERROR, SHIFT_IS_GOTO, SHIFT_IS_SHIFT): New.
16137 * src/lalr.c: Use them.
16139 2001-12-05 Akim Demaille <akim@epita.fr>
16141 * src/LR0.c (augment_automaton): Formatting changes.
16142 Better variable locality.
16144 2001-12-05 Akim Demaille <akim@epita.fr>
16146 * src/lalr.c (matrix_print): New.
16147 (transpose): Use it.
16148 Use arrays instead of pointers.
16150 2001-12-05 Akim Demaille <akim@epita.fr>
16152 * src/lalr.c (maxrhs): Move to...
16153 * src/gram.c, src/gram.h (ritem_longest_rhs): here.
16154 * src/lalr.c (build_relations): Adjust.
16156 2001-12-05 Akim Demaille <akim@epita.fr>
16158 * src/lalr.c (transpose): Free the memory allocated to the
16159 argument, as it is replaced by the results by the unique caller.
16160 (build_relations): Merely invoke transpose: it handles the memory
16162 Improve variable locality.
16163 Avoid variables used as mere abbreviations.
16164 (compute_lookaheads): Use arrays instead of pointers.
16166 2001-12-05 Akim Demaille <akim@epita.fr>
16168 * src/lalr.c (initialize_F): Improve variable locality.
16169 Avoid variables used as mere abbreviations.
16171 2001-12-05 Akim Demaille <akim@epita.fr>
16173 * src/derives.c (print_derives): Display the ruleno.
16174 * src/lalr.c (initialize_F, transpose): Better variable locality
16175 to improve readability.
16176 Avoid variables used as mere abbreviations.
16178 2001-12-05 Akim Demaille <akim@epita.fr>
16180 * src/lalr.c (traverse): Use arrays instead of pointers.
16182 2001-12-05 Akim Demaille <akim@epita.fr>
16184 * src/nullable.c (set_nullable): Use a for loop to de-obfuscate
16185 the handling of squeue.
16186 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
16188 2001-12-05 Akim Demaille <akim@epita.fr>
16190 Because useless nonterminals are now kept alive (instead of being
16191 `destroyed'), we now sometimes examine them, and store information
16192 related to them. Hence we need to know their number, and adjust
16193 memory allocations.
16195 * src/reduce.c, src/reduce.h (nuseless_nonterminals): No longer
16197 * src/LR0.c (allocate_itemsets): The memory allocated to
16198 `symbol_count' was used for two different purpose: once to count
16199 the number of occurrences of each symbol, and later reassigned to
16200 `shift_symbol', containing the symbol that can be shifted from a
16202 Deobfuscate, i.e., allocate, use and free `symbol_count' here
16204 (new_itemsets): Allocate `shift_symbol' here.
16205 (allocate_itemsets): symbol_count includes useless nonterminals.
16206 Make room for them.
16207 (free_storage): Use `free', not `XFREE', for pointers that cannot
16210 2001-12-05 Akim Demaille <akim@epita.fr>
16212 * src/nullable.c (set_nullable): Deobfuscate the handling of
16214 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
16216 2001-12-05 Akim Demaille <akim@epita.fr>
16218 * src/gram.c, src/gram.h (ritem_print): New.
16219 * src/gram.c (dummy): Remove, now there is actual code in gram.c.
16220 (This useless function was defined only to work around VMS linkers
16221 that can't handle compilation units with variables only).
16222 * src/reduce.c (dump_grammar): Use it to trace the construction of
16225 2001-12-04 Paul Eggert <eggert@twinsun.com>
16227 * src/bison.simple (union yyalloc): Change member names
16228 to be the same as the stack names.
16229 (yyparse): yyptr is now union yyalloc *, not char *.
16230 (YYSTACK_RELOCATE): Likewise. This avoids a GCC warning,
16231 and may generate better code on some machines.
16232 (yystpcpy): Use prototype if __STDC__ is defined, not just
16233 if __cplusplus is defined.
16235 2001-11-30 Akim Demaille <akim@epita.fr>
16237 * configure.in (WARNING_CFLAGS): Add -Werror when possible.
16238 (CFLAGS): Do not include the WARNING_CFLAGS here, since GNU
16239 Gettext doesn't compile cleanly, and dies with -Werror.
16240 * src/Makefile.am, lib/Makefile.am, tests/atlocal.in (CFLAGS):
16241 Include WARNING_CFLAGS here.
16242 * lib/xstrdup.c: Include xalloc.h, so that xstrdup be declared
16243 before being defined.
16245 2001-11-27 Paul Eggert <eggert@twinsun.com>
16247 * lib/quotearg.h (quotearg_n, quotearg_n_style):
16248 First arg is int, not unsigned.
16249 * lib/quotearg.c (quotearg_n, quotearg_n_style): Likewise.
16250 (SIZE_MAX, UINT_MAX): New macros.
16251 (quotearg_n_options): Abort if N is negative.
16252 Avoid overflow check on hosts where size_t is 64 bits and int
16253 is 32 bits, as overflow is impossible there.
16254 Fix off-by-one typo that caused unnecessary reallocation.
16256 2001-11-29 Paul Eggert <eggert@twinsun.com>
16258 Name space cleanup in generated parser.
16260 * doc/bison.texinfo (Bison Parser): Discuss system headers
16261 and their effect on the user name space.
16263 * src/bison.simple:
16264 (YYSTACK_ALLOC, YYSTACK_FREE, union yyalloc, YYSTACK_GAP_MAX,
16265 YYSTACK_BYTES, YYSTACK_RELOCATE): Do not define unless necessary,
16266 i.e. unless ! defined (yyoverflow) || defined (YYERROR_VERBOSE).
16268 (YYSIZE_T): New macro. Use it instead of size_t, to avoid infringing
16269 on user names when possible.
16271 (YYSTACK_USE_ALLOCA): Do not define; just use any existing defn.
16272 Simplify test for whather <alloca.h> exists.
16274 (<stdlib.h>): Include if we will use malloc, and if standard C or C++.
16276 (<stdio.h>): Include if YYDEBUG.
16278 (yymemcpy): Renamed from __yy_memcpy. Do not define unless
16279 ! defined (yyoverflow) && ! defined (yymemcpy).
16281 (yymemcpy, yyparse): Rename local variables as needed so that
16282 they all begin with 'yy'.
16284 (yystrlen, yystpcpy): New functions.
16286 (YY_DECL_NON_LSP_VARIABLES): Renamed from _YY_DECL_VARIABLES.
16289 (yyparse): size_t -> YYSIZE_T. Use yystrlen and yystpcpy
16290 instead of relying on string.h functions. Use YYSTACK_ALLOC
16291 and YYSTACK_FREE instead of malloc and free.
16293 2001-11-30 Akim Demaille <akim@epita.fr>
16295 * src/bison.simple (YYSTYPE, YYLTYPE): Move their definitions
16296 before their first uses.
16297 (YYBISON, YYPURE): Move to the top of the output.
16299 2001-11-30 Akim Demaille <akim@epita.fr>
16301 * tests/reduce.at (Useless Nonterminals): Fix.
16303 2001-11-30 Akim Demaille <akim@epita.fr>
16305 * src/bison.simple (YYSTACK_FREE): Use `do {;} while (0)' as empty
16306 if body instead of `;' to pacify GCC's warnings.
16308 2001-11-30 Akim Demaille <akim@epita.fr>
16310 Instead of mapping the LHS of unused rules to -1, keep the LHS
16311 valid, but flag the rules as invalid.
16313 * src/gram.h (rule_t): `useful' is a new member.
16314 * src/print.c (print_grammar): Adjust.
16315 * src/derives.c (set_derives): Likewise.
16316 * src/reader.c (packgram, reduce_output): Likewise.
16317 * src/reduce.c (reduce_grammar_tables): Likewise.
16318 * tests/reduce.at (Underivable Rules, Useless Rules): New.
16320 2001-11-30 Akim Demaille <akim@epita.fr>
16322 * src/reduce.c (reduce_output): Formatting changes.
16323 * src/print.c (print_results, print_grammar): Likewise.
16324 * tests/regression.at (Rule Line Numbers)
16325 (Solved SR Conflicts, Unresolved SR Conflicts): Adjust.
16327 2001-11-30 Akim Demaille <akim@epita.fr>
16329 * src/reduce.c (nonterminals_reduce): Instead of throwing away
16330 useless nonterminals, move them at the end of the symbol arrays.
16331 (reduce_output): Adjust.
16332 * tests/reduce.at (Useless Nonterminals): Adjust.
16334 2001-11-30 Akim Demaille <akim@epita.fr>
16336 * src/reduce.c: Various comment/formatting changes.
16337 (nonterminals_reduce): New, extracted from...
16338 (reduce_grammar_tables): here.
16339 (reduce_grammar): Call nonterminals_reduce.
16341 2001-11-29 Paul Eggert <eggert@twinsun.com>
16343 * src/bison.simple (YYSTACK_REALLOC): Remove.
16344 (YYSTACK_ALLOC): Resurrect this macro, with its old meaning.
16345 (YYSTACK_FREE, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYSTACK_RELOCATE):
16347 (union yyalloc): New type.
16348 (__yy_memcpy): Last arg is size_t, not unsigned int, to remove
16349 an arbitrary restriction on hosts where size_t is wider than int.
16351 (yyparse): Don't dump core if alloca or malloc fails; instead, report
16352 a parser stack overflow. Allocate just one block of memory for all
16353 three stacks, instead of allocating three blocks; this typically is
16354 faster and reduces fragmentation.
16356 Do not limit the number of items in the stack to a value that fits
16357 in 'int', as this is an arbitrary limit on hosts with 64-bit
16358 size_t and 32-bit int.
16360 2001-11-29 Marc Autret <autret_m@epita.fr>
16362 * tests/calc.at [AT_DATA_CALC_Y]: Use %error-verbose instead
16363 of defining YYERROR_VERBOSE.
16364 [AT_DATA]: $4 is now out of C declarations in the prologue.
16366 2001-11-28 Marc Autret <autret_m@epita.fr>
16368 * src/reader.c (parse_dquoted_param): New.
16369 (parse_skel_decl): Use it.
16370 * src/lex.h: Add its prototype.
16371 * src/lex.c (literalchar): Become not static.
16373 2001-11-28 Marc Autret <autret_m@epita.fr>
16375 * src/output.h: And put its extern declaration here.
16376 * src/output.c (error_verbose): Define here.
16377 (prepare): Echo name modification.
16378 * src/getargs.h: Clean its extern declaration.
16379 * src/getargs.c (error_verbose_flag): Remove.
16380 (getargs): Remove case 'e'.
16381 * src/options.c (option_table): 'error-verbose' is now seen as simple
16385 * src/reader.c (read_declarations): Remove case tok_include.
16386 (parse_include_decl): Remove.
16387 * src/lex.h (token_t): Remove tok_include.
16388 * src/options.c (option_table): 'include' is now a simple command line
16391 2001-11-28 Marc Autret <autret_m@epita.fr>
16393 * src/bison.simple: Adjust muscle names.
16394 * src/muscle_tab.c (muscle_init): Also rename the muscles.
16395 * src/output.c (prepare): s/_/-/ for the muscles names.
16396 (output_parser): When scanning for a muscle, allow '-' instead of '_'.
16398 2001-11-28 Marc Autret <autret_m@epita.fr>
16400 * src/bison.simple: Fix debug.
16401 [YYERROR_VERBOSE]: Re-integrate as an internal macro.
16403 2001-11-28 Akim Demaille <akim@epita.fr>
16405 * src/LR0.c (shifts_new): New.
16406 (save_shifts, insert_start_shift, augment_automaton): Use it.
16408 2001-11-28 Akim Demaille <akim@epita.fr>
16410 * src/closure.c (closure): `b' and `ruleno' denote the same value:
16413 2001-11-28 Akim Demaille <akim@epita.fr>
16415 * src/closure.c (closure): Instead of looping over word in array
16416 then bits in words, loop over bits in array.
16418 2001-11-28 Akim Demaille <akim@epita.fr>
16420 * src/closure.c (closure): No longer optimize the special case
16421 where all the bits of `ruleset[r]' are set to 0, to make the code
16424 2001-11-28 Akim Demaille <akim@epita.fr>
16426 * src/closure.c (closure): `r' and `c' are new variables, used to
16427 de-obfuscate accesses to RULESET and CORE.
16429 2001-11-28 Akim Demaille <akim@epita.fr>
16431 * src/reduce.c (reduce_print): Use ngettext.
16432 (dump_grammar): Improve the trace accuracy.
16434 2001-11-28 Akim Demaille <akim@epita.fr>
16436 * src/reduce.c (dump_grammar): Don't translate trace messages.
16438 2001-11-28 Akim Demaille <akim@epita.fr>
16440 * tests/reduce.at (Useless Terminals, Useless Nonterminals): New.
16441 * src/reduce.c (reduce_grammar_tables): Do not free useless tags,
16442 as all tags are free'ed afterwards.
16443 From Enrico Scholz.
16445 2001-11-27 Paul Eggert <eggert@twinsun.com>
16447 * src/bison.simple (YYSTACK_REALLOC): Fix typo that caused us to
16448 use alloca when we didn't want to, and vice versa.
16450 2001-11-27 Marc Autret <autret_m@epita.fr>
16452 * src/muscle_tab.c (muscle_init): Remove 'verbose' muscle
16454 * src/output.c (prepare): Remove its update.
16456 2001-11-27 Marc Autret <autret_m@epita.fr>
16458 * tests/torture.at [AT_DATA]: Remove YYERROR_VERBOSE definition.
16459 Use %error-verbose.
16461 2001-11-27 Marc Autret <autret_m@epita.fr>
16463 * src/bison.simple: Remove YYERROR_VERBOSE using.
16464 Use %%error_verbose.
16465 (yyparse): Likewise.
16466 * src/output.c (prepare): Give its final value.
16467 * src/muscle_tab.c (muscle_init): Init new muscle 'error_verbose'.
16468 * src/getargs.h: Add its extern declaration.
16469 * src/getargs.c (error_verbose_flag): New int.
16470 (getargs): Update to catch new case.
16471 * src/options.c (option_table): 'error-verbose' is a new option.
16472 (shortopts): Update.
16474 2001-11-27 Akim Demaille <akim@epita.fr>
16476 * src/system.h: Use intl/libgettext.h.
16477 * src/Makefile.am (INCLUDES): Add -I $(top_srcdir).
16479 2001-11-27 Akim Demaille <akim@epita.fr>
16481 * tests/torture.at (Exploding the Stack Size with Malloc):
16482 s/YYSTACK_USE_ALLOCA_ALLOCA/YYSTACK_USE_ALLOCA/.
16484 2001-11-27 Akim Demaille <akim@epita.fr>
16486 * src/files.c: Include error.h.
16487 Reported by Hans Aberg.
16489 2001-11-26 Marc Autret <autret_m@epita.fr>
16491 * src/reader.c (parse_include_decl): New, not yet implemented.
16492 (read_declarations): Add case tok_include.
16493 * src/getargs.h (include): Add its extern definition.
16494 * src/getargs.c (include): New const char *.
16495 (getargs): Add case '-I'.
16496 * src/options.c (option_table): Add include as command line and
16498 * src/lex.h (token_t): Add tok_include.
16500 2001-11-26 Akim Demaille <akim@epita.fr>
16502 * src/reader.c (readgram): Make sure rules for mid-rule actions
16503 have a lineno equal to that of their host rule.
16504 Reported by Hans Aberg.
16505 * tests/regression.at (Rule Line Numbers): New.
16507 2001-11-26 Akim Demaille <akim@epita.fr>
16509 * src/LR0.c (allocate_itemsets): kernel_size contains ints, not
16512 2001-11-26 Akim Demaille <akim@epita.fr>
16514 * src/complain.c, src/complain.h (error): Remove, provided by
16517 2001-11-26 Akim Demaille <akim@epita.fr>
16519 * src/reader.c (read_declarations): Don't abort on tok_illegal,
16520 issue an error message.
16521 * tests/regression.at (Invalid %directive): New.
16522 Reported by Hans Aberg.
16524 2001-11-26 Akim Demaille <akim@epita.fr>
16526 * configure.in: Invoke AC_FUNC_OBSTACK and AC_FUNC_ERROR_AT_LINE.
16527 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
16529 2001-11-26 Akim Demaille <akim@epita.fr>
16531 * src/conflicts.c (conflicts_print): Don't complain at all when
16532 there are no reduce/reduce conflicts, and as many shift/reduce
16533 conflicts as expected.
16534 * tests/regression.at (%expect right): Adjust.
16536 2001-11-23 Akim Demaille <akim@epita.fr>
16538 * lib/alloca.c: Update, from fileutils.
16540 2001-11-23 Akim Demaille <akim@epita.fr>
16542 * lib/Makefile.am (libbison_a_LIBADD): Add @ALLOCA@.
16544 2001-11-23 Akim Demaille <akim@epita.fr>
16546 * src/system.h: Include alloca.h.
16547 * src/main.c (main) [C_ALLOCA]: Call alloca (0).
16549 2001-11-23 Akim Demaille <akim@epita.fr>
16551 * src/print_graph.c (print_actions): Remove `rule', unused.
16552 * src/LR0.c (kernel_size): Contain `int' instead of `size_t' to
16553 pacify GCC's signed < unsigned warnings.
16554 * src/closure.c (itemsetsize): Likewise.
16555 * src/reader.c (symbol_list_new): Static.
16557 2001-11-23 Akim Demaille <akim@epita.fr>
16559 Attaching lineno to buckets is stupid, since only one copy of each
16560 symbol is kept, only the line of the first occurrence is kept too.
16562 * src/symtab.h, src/symtab.c (bucket): Remove the line member.
16563 * src/reader.c (rline_allocated): Remove, unused.
16564 (symbol_list): Have a `line' member.
16565 (symbol_list_new): New.
16566 (readgram): Use it.
16567 * src/print.c (print_grammar): Output the rule line numbers.
16568 * tests/regression.at (Solved SR Conflicts)
16569 (Unresolved SR Conflicts): Adjust.
16570 Reported by Hans Aberg.
16572 2001-11-22 Marc Autret <autret_m@epita.fr>
16574 * src/bison.simple [YYERROR_VERBOSE]: Force its value to be 1 or 0.
16576 2001-11-22 Marc Autret <autret_m@epita.fr>
16578 * src/muscle_tab.c (muscle_init): Remove initialization of
16580 * src/output.c (output_master_parser): Do it here.
16582 2001-11-20 Akim Demaille <akim@epita.fr>
16585 * configure.in (ALL_LINGUAS): Adjust.
16586 * po/POTFILE.in: Remove `nullable.c' and `derives.c' which no
16587 longer contains strings to translate.
16589 2001-11-19 Akim Demaille <akim@epita.fr>
16591 * src/conflicts.c (conflicts_print): Add a missing \n.
16593 2001-11-19 Akim Demaille <akim@epita.fr>
16595 * src/nullable.c (nullable_print): New.
16596 (set_nullable): Call it when tracing.
16597 Better locality of variables.
16599 2001-11-19 Akim Demaille <akim@epita.fr>
16601 * src/print.c (print_actions): Better locality of variables.
16603 2001-11-19 Akim Demaille <akim@epita.fr>
16605 * src/derives.c (print_derives): Fix and enrich.
16606 * src/closure.c (print_fderives): Likewise.
16608 2001-11-19 Akim Demaille <akim@epita.fr>
16610 * src/closure.c (itemsetend): Remove, replaced with...
16611 (itemsetsize): new.
16613 2001-11-19 Akim Demaille <akim@epita.fr>
16615 * src/LR0.c (kernel_end): Remove, replaced with...
16616 (kernel_size): new.
16618 2001-11-19 Akim Demaille <akim@epita.fr>
16620 * src/conflicts.c (set_conflicts): Use arrays instead of pointers
16623 2001-11-19 Akim Demaille <akim@epita.fr>
16625 * src/closure.c (closure): Use arrays instead of pointers to clarify.
16627 2001-11-19 Akim Demaille <akim@epita.fr>
16629 * src/closure.c, src/derives.c, src/nullable.c: Adjust various
16631 * src/LR0.c: Likewise.
16632 (allocate_itemsets): Use arrays instead of pointers to clarify.
16634 2001-11-19 Akim Demaille <akim@epita.fr>
16636 * src/getargs.c (statistics_flag): Replace with...
16638 (longopts): Accept --trace instead of --statistics.
16639 * src/getargs.h, src/options.c: Adjust.
16640 * src/LR0.c, src/closure.c, src/derives.c, src/nullable.c,
16641 * src/reduce.c: Use trace_flags instead of the CPP conditional TRACE.
16643 2001-11-19 Akim Demaille <akim@epita.fr>
16645 * src/LR0.c (new_itemsets, get_state): Use more arrays and fewer
16646 pointers to clarify the code.
16647 (save_reductions, save_shifts): Factor common parts of alternatives.
16649 2001-11-19 Akim Demaille <akim@epita.fr>
16651 * src/LR0.c (new_state, get_state): Complete TRACE code.
16652 * src/closure.c: Include `reader.h' to get `tags', needed by the
16654 Rename the conditional DEBUG as TRACE.
16655 Output consistently TRACEs to stderr, not stdout.
16656 * src/derives.c: Likewise.
16657 * src/reduce.c: (inaccessable_symbols): Using if is better style
16659 Use `#if TRACE' instead of `#if 0' for tracing code.
16661 2001-11-19 Akim Demaille <akim@epita.fr>
16663 * src/system.h (LIST_FREE, shortcpy): New.
16664 * src/LR0.c: Use them.
16665 * src/output.c (free_itemsets, free_reductions, free_shifts):
16666 Remove, replaced by LIST_FREE.
16668 2001-11-19 Akim Demaille <akim@epita.fr>
16670 * src/state.h (CORE_ALLOC, SHIFTS_ALLOC, ERRS_ALLOC)
16671 (REDUCTIONS_ALLOC): New.
16672 * src/LR0.c, src/conflicts.c: Use them to de-obfuscate memory
16675 2001-11-19 Akim Demaille <akim@epita.fr>
16677 * src/LR0.c (new_state): Complete trace code.
16678 * src/nullable.c (set_nullable): Don't translate traces.
16680 2001-11-19 Akim Demaille <akim@epita.fr>
16682 * src/print_graph.c (print_core): Better locality of variables.
16683 * src/print.c (print_core): Likewise.
16685 2001-11-19 Akim Demaille <akim@epita.fr>
16687 * src/vcg.c: You do the output, so you are responsible of the
16688 handling of VCG syntax, in particular: use quotearg.
16689 * src/print_graph.c: Don't.
16690 (print_actions): Don't output the actions as part of the nodes,
16691 since that's the job of the edges.
16692 (print_state): Don't output by hand: fill the node description,
16693 and ask for its output.
16695 2001-11-19 Akim Demaille <akim@epita.fr>
16697 * src/bison.simple (yyparse): When verbosely reporting an error,
16698 no longer put additional quotes around token names.
16699 * tests/calc.at: Adjust.
16701 2001-11-19 Akim Demaille <akim@epita.fr>
16703 * src/symtab.h, src/symtab.c: `line' is a new member of `bucket'.
16704 * src/reader.c (record_rule_lines, rline, rline_allocated): Remove.
16705 * src/output.c: Adjust.
16707 2001-11-19 Akim Demaille <akim@epita.fr>
16709 * src/gram.h (rprec, rprecsym, rassoc): Remove, now part of...
16711 * src/conflicts.c, src/reader.c, src/reduce.c: Adjust.
16713 2001-11-19 Akim Demaille <akim@epita.fr>
16715 * src/gram.h (rule_t): New.
16717 (rrhs, rlhs): Remove, part of state_t.
16718 * src/print_graph.c, src/closure.c, src/conflicts.c, src/derives.c,
16719 * src/lalr.c, src/nullable.c, src/output.c, src/print.c,
16720 * src/reader.c, src/reduce.c: Adjust.
16722 2001-11-19 Akim Demaille <akim@epita.fr>
16724 * src/reader.c (symbols_output): New, extracted from...
16725 (packsymbols): Here.
16728 2001-11-19 Akim Demaille <akim@epita.fr>
16730 * src/lalr.c (set_maxrhs, maxrhs): Remove, replaced with...
16731 (maxrhs): this new function.
16733 2001-11-19 Akim Demaille <akim@epita.fr>
16735 * src/lalr.c (F): New macro to access the variable F.
16738 2001-11-19 Akim Demaille <akim@epita.fr>
16740 * src/lalr.h (LA): New macro to access the variable LA.
16741 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
16742 * src/lalr.c: Adjust.
16744 2001-11-19 Akim Demaille <akim@epita.fr>
16746 * src/lalr.c (initialize_LA): Only initialize LA. Let...
16747 (set_state_table): handle the `lookaheads' members.
16749 2001-11-19 Akim Demaille <akim@epita.fr>
16751 * src/lalr.h (lookaheads): Removed array, whose contents is now
16753 (state_t): this structure.
16754 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
16757 2001-11-19 Akim Demaille <akim@epita.fr>
16759 * src/lalr.h (consistent): Removed array, whose contents is now
16761 (state_t): this structure.
16762 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
16765 2001-11-19 Akim Demaille <akim@epita.fr>
16767 * src/lalr.h (reduction_table, shift_table): Removed arrays, whose
16768 contents are now members of...
16769 (state_t): this structure.
16770 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
16773 2001-11-19 Akim Demaille <akim@epita.fr>
16775 * src/lalr.h (state_t): New.
16776 (state_table): Be a state_t * instead of a core **.
16777 (accessing_symbol): Remove, part of state_t.
16778 * src/lalr.c: Adjust.
16779 (set_accessing_symbol): Merge into...
16780 (set_state_table): this.
16781 * src/print_graph.c, src/conflicts.c: Adjust.
16783 2001-11-14 Akim Demaille <akim@epita.fr>
16785 * tests/calc.at, tests/output.at, tests/regression.at,
16786 * tests/testsuite.at, tests/torture.at: Rely on Autotest 2.52g:
16787 now the tests are run in private dirs, therefore AC_CLEANUP and
16788 family can be simplified to 0-ary.
16789 * tests/atlocal.in: Now that we run `elsewhere' than in tests/,
16790 use abs. path to find config.h.
16791 * tests/calc.at (AT_CHECK_CALC): Don't try to check the compiler's
16792 stderr, there can be way too much random noise.
16793 Instead pass -Werror to GCC and rely on the exit status.
16794 Reported by Wolfram Wagner.
16796 2001-11-14 Akim Demaille <akim@epita.fr>
16798 * src/bison.simple (yyparse): Let yyls1, yyss1 and yyvs1 be
16799 defined only if yyoverflow is defined, to avoid `warning: unused
16801 Reported by The Test Suite.
16803 2001-11-14 Akim Demaille <akim@epita.fr>
16805 * src/print.c: Include reduce.h.
16806 Reported by Hans Aberg.
16808 2001-11-14 Akim Demaille <akim@epita.fr>
16810 * src/lex.c, src/lex.h (token_buffer, unlexed_token_buffer):
16811 Revert a previous patch: these are really const.
16812 * src/conflicts.c (conflict_report): Additional useless pair of
16813 braces to pacify GCC's warnings for `if () if () {} else {}'.
16814 * src/lex.c (parse_percent_token): Replace equal_offset with
16817 Be sure to strdup `arg' when used, since there is no reason for
16818 token_buffer not to change.
16820 2001-11-14 Akim Demaille <akim@epita.fr>
16822 * src/system.h (EXIT_SUCCESS, EXIT_FAILURE): Ensure a proper
16824 * src/main.c (main): Use them.
16825 Suggested by Hans Aberg.
16827 2001-11-12 Akim Demaille <akim@epita.fr>
16829 * src/system.h (ngettext): Now that we use ngettext, be sure to
16830 provide a default definition when NLS are not used.
16832 2001-11-12 Akim Demaille <akim@epita.fr>
16834 * doc/bison.texinfo: Use `$' as shell prompt, not `%'.
16835 Use @kbd to denote user input.
16836 (Language and Grammar): ANSIfy the example.
16837 Adjust its layout for info/notinfo.
16838 (Location Tracking Calc): Output error messages to stderr.
16839 Output locations in a more GNUtically correct way.
16840 Fix a couple of Englishos.
16841 Adjust @group/@end group pairs.
16843 2001-11-12 Akim Demaille <akim@epita.fr>
16845 %expect was not functioning at all.
16847 * src/conflicts.c (expected_conflicts): Set to -1.
16848 (conflict_report): Use ngettext.
16849 (conflicts_print): Check %expect and make its violation an error.
16850 * doc/bison.texinfo (Expect Decl): Adjust.
16851 * configure.in (AM_GNU_GETTEXT): Ask for ngettext.
16852 * tests/regression.at (%expect not enough, %expect right)
16853 (%expect too much): New.
16855 2001-11-12 Akim Demaille <akim@epita.fr>
16857 * tests/regression.at (Conflicts): Rename as...
16858 (Unresolved SR Conflicts): this.
16859 (Solved SR Conflicts): New.
16861 2001-11-12 Akim Demaille <akim@epita.fr>
16863 * src/reduce.c (print_results): Rename as...
16864 (reduce_output): This.
16865 Output to OUT, passed as argument, instead of output_obstack.
16866 (dump_grammar): Likewise.
16867 (reduce_free): New.
16869 (reduce_grammar): No longer call reduce_output, since...
16870 * src/print.c (print_results): do it.
16871 * src/main.c (main): Call reduce_free;
16873 2001-11-12 Akim Demaille <akim@epita.fr>
16875 * src/conflicts.c (print_reductions): Accept OUT as argument.
16876 Output to it, not to output_obstack.
16877 * src/print.c (print_actions): Adjust.
16879 2001-11-12 Akim Demaille <akim@epita.fr>
16881 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts): Return
16882 the result instead of using...
16883 (src_total, rrc_total, src_count, rrc_count): Remove.
16884 (any_conflicts): Remove.
16885 (print_conflicts): Split into...
16886 (conflicts_print, conflicts_output): New.
16887 * src/conflicts.h: Adjust.
16888 * src/main.c (main): Invoke both conflicts_output and conflicts_print.
16889 * src/print.c (print_grammar): Issue `\n' between two rules.
16890 * tests/regression.at (Conflicts): New.
16891 Reported by Tom Lane.
16893 2001-11-12 Akim Demaille <akim@epita.fr>
16895 * tests/regression.at (Invalid input): Remove, duplicate with
16896 ``Invalid input: 1''.
16898 2001-11-12 Akim Demaille <akim@epita.fr>
16900 * tests/torture.at (AT_DATA_STACK_TORTURE)
16901 (Exploding the Stack Size with Alloca)
16902 (Exploding the Stack Size with Malloc): New.
16904 2001-11-12 Akim Demaille <akim@epita.fr>
16906 * src/bison.simple (YYSTACK_REALLOC): New.
16907 (yyparse) [!yyoverflow]: Use it and free the old stack.
16908 Reported by Per Allansson.
16910 2001-11-12 Pascal Bart <pascal.bart@epita.fr>
16912 * src/bison.simple: Define type yystype instead of YYSTYPE, and
16913 define CPP macro, which substitute YYSTYPE by yystype.
16914 * src/reader.c (parse_union_decl): Output yystype/YYSTYPE as we do
16915 with yyltype/YYLTYPE. This allows inclusion of the generated
16916 header within the parser if the compiler, such as GGC, accepts
16917 multiple equivalent #defines.
16920 2001-11-05 Akim Demaille <akim@epita.fr>
16922 * src/reader.c (symbols_output): New, extracted from...
16923 (packsymbols): here.
16926 2001-11-05 Akim Demaille <akim@epita.fr>
16928 * src/lex.c (parse_percent_token): s/quotearg/quote/.
16930 2001-11-05 Akim Demaille <akim@epita.fr>
16932 * tests/regression.at (AT_TEST_CPP_GUARD_H): Adjust the clean up
16935 2001-11-05 Akim Demaille <akim@epita.fr>
16937 * src/options.h (struct option_table_struct): set_flags is void*.
16938 * src/options.c (longopts): Support `--output' and `%output'.
16940 * src/lex.h (tok_setopt): Remove, replaced with...
16941 (tok_intopt, tok_stropt): these new guys.
16942 * src/lex.c (getopt.h): Not needed.
16943 (token_buffer, unlexed_token_buffer): Not const.
16944 (percent_table): Promote `-' over `_' in directive names.
16945 Active `%name-prefix', `file-prefix', and `output'.
16946 (parse_percent_token): Accept possible arguments to directives.
16947 Promote `-' over `_' in directive names.
16949 2001-11-04 Akim Demaille <akim@epita.fr>
16951 * doc/bison.texinfo (Decl Summary): Split the list into
16952 `directives for grammars' and `directives for bison'.
16954 Add description of `%name-prefix', `file-prefix', and `output'.
16955 Promote `-' over `_' in directive names.
16956 (Bison Options): s/%locactions/%locations/. Nice Freudian slip.
16957 Simplify the description of `--name-prefix'.
16958 Promote `-' over `_' in directive names.
16959 Promote `--output' over `--output-file'.
16960 Fix the description of `--defines'.
16961 * tests/output.at: Exercise %file-prefix and %output.
16963 2001-11-02 Akim Demaille <akim@epita.fr>
16965 * doc/refcard.tex: Update.
16967 2001-11-02 Akim Demaille <akim@epita.fr>
16969 * src/symtab.h (SUNDEF): New.
16970 * src/symtab.c (bucket_new): Init user_token_number to SUNDEF to
16971 stand for `uninitialized', instead of 0.
16972 * src/reader.c (packsymbols, parse_thong_decl): Adjust.
16973 * src/lex.c (lex): Adjust.
16975 * tests/calc.at (_AT_DATA_CALC_Y): Declare a token for EOF.
16977 Let yylex return it instead of a plain 0.
16978 Reported by Dick Streefland.
16980 2001-11-02 Akim Demaille <akim@epita.fr>
16982 * tests/regression.at (Mixing %token styles): New test.
16984 2001-11-02 Akim Demaille <akim@epita.fr>
16986 * src/reader.c (parse_thong_decl): Formatting changes.
16987 (token_translations_init): New, extracted from...
16988 (packsymbols): Here.
16991 2001-11-01 Akim Demaille <akim@epita.fr>
16993 * tests/regression.at (AT_TEST_CPP_GUARD_H): New.
16994 Check that `9foo.y' produces correct cpp guards.
16995 * src/files.c (compute_header_macro): Prepend `BISON_' to CPP
16999 2001-11-01 Akim Demaille <akim@epita.fr>
17001 * tests/regression.at (Invalid input: 2): New.
17002 * src/lex.c (unlexed_token_buffer): New.
17003 (lex, unlex): Adjust: when unlexing, be sure to save token_buffer
17007 2001-11-01 Akim Demaille <akim@epita.fr>
17009 * tests/calc.at: Catch up with 1.30.
17010 * configure.in: Bump to 1.49a.
17011 Adjust to newer Autotest.
17013 2001-10-19 Pascal Bart <pascal.bart@epita.fr>
17015 * src/conflicts.c: Move global variables rrc_total and src_total ...
17016 (print_conflicts): here.
17017 * src/output.c (output): Free global variable user_toknums.
17018 * src/lex.c (token_obstack): Become static.
17020 2001-10-18 Akim Demaille <akim@epita.fr>
17022 * tests/atlocal.in (GCC): Add.
17023 * tests/calc.at: s/m4_match/m4_bmatch/.
17024 s/m4_patsubst/m4_bpatsubst/.
17025 (AT_CHECK_CALC): Check the compiler's stderr only if it's GCC.
17026 * configure.in: AC_SUBST(GCC).
17028 2001-10-14 Marc Autret <autret_m@epita.fr>
17030 * src/options.c (create_long_option_table): Fix.
17032 2001-10-10 Akim Demaille <akim@epita.fr>
17034 * src/bison.simple: Be sure to set YYSTACK_USE_ALLOCA.
17036 2001-10-04 Akim Demaille <akim@epita.fr>
17038 * src/reader.c (parse_union_decl): Push the caracters in
17039 union_obstack, not attrs_obstack.
17041 2001-10-04 Akim Demaille <akim@epita.fr>
17043 Merge in the branch 1.29.
17045 * src/reader.c (packsymbols): Use a temporary obstack for
17046 `%%tokendef', since output_stack is already used elsewhere.
17048 2001-10-02 Akim Demaille <akim@epita.fr>
17052 2001-10-02 Akim Demaille <akim@epita.fr>
17056 2001-10-02 Akim Demaille <akim@epita.fr>
17058 * tests/regression.at (Invalid CPP headers): New.
17059 From Alexander Belopolsky.
17060 * src/files.c (compute_header_macro): Map non alnum chars to `_'.
17062 2001-10-02 Akim Demaille <akim@epita.fr>
17064 * tests/regression.at (Invalid input): New.
17065 * src/lex.c (lex): Be sure to set `token_buffer' in any case.
17068 2001-10-02 Akim Demaille <akim@epita.fr>
17070 * tests/calc.at: Now that --debug works, the tests must be adjusted.
17072 2001-10-02 Akim Demaille <akim@epita.fr>
17074 * src/output.c (output_parser): Assert `skeleton'.
17075 * src/files.c (skeleton_find): Look harder for skeletons on DOSish
17079 2001-10-01 Marc Autret <autret_m@epita.fr>
17081 * src/lex.h: Echo modifications.
17082 * src/lex.c (unlex): Parameter is now token_t.
17085 2001-10-01 Marc Autret <autret_m@epita.fr>
17087 * src/main.c: Include lex.h.
17090 2001-09-29 Akim Demaille <akim@epita.fr>
17092 * src/getargs.c (longopts): `--debug' is `-t', not `-d'.
17094 2001-09-28 Akim Demaille <akim@epita.fr>
17096 * tests/testsuite.at: Update to newer Autotest.
17097 * tests/Makefile.am (EXTRA_DIST): bison is not to be shipped.
17099 2001-09-27 Akim Demaille <akim@epita.fr>
17101 Position independent wrapper.
17103 * tests/bison: Remove.
17104 * tests/bison.in: New.
17105 * configure.in: Adjust.
17107 2001-09-27 Paul Eggert <eggert@twinsun.com>
17109 Port quotearg fixes from tar 1.13.24.
17111 * lib/quotearg.c: BSD/OS 4.1 wchar.h requires FILE and struct
17113 (HAVE_MBSINIT): Undef if !HAVE_MBRTOWC.
17114 (mbsinit): Define to 1 if !defined mbsinit && !HAVE_MBSINIT.
17116 * m4/Makefile.am (EXTRA_DIST): Add mbrtowc.m4.
17117 * m4/mbrtowc.m4: New file.
17118 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Check for mbsinit and stddef.h.
17119 Use jm_FUNC_MBRTOWC instead of AC_CHECK_FUNCS(mbrtowc).
17121 2001-09-27 Akim Demaille <akim@epita.fr>
17125 2001-09-27 Akim Demaille <akim@epita.fr>
17129 2001-09-25 Akim Demaille <akim@epita.fr>
17131 * src/system.h: Include `xalloc.h'.
17132 Remove it from the C files.
17133 * src/files.c (output_files): Free the obstacks.
17134 * src/lex.c (init_lex): Rename as...
17137 * src/main.c (main): Use it.
17139 2001-09-24 Marc Autret <autret_m@epita.fr>
17141 * src/vcg.c (open_edge, close_edge, open_node, close_node): Change
17142 to output informations in fout (FILE*).
17143 (open_graph, close_graph): Likewise.
17144 (output_graph, output_edge, output_node): Likewise.
17145 * src/vcg.h: Update function prototypes.
17146 * src/print_graph.c (print_graph): Open output graph file.
17147 (print_actions): Adjust.
17148 * src/files.h: Remove extern declaration.
17149 * src/files.c: Remove graph_obstack declaration.
17150 (open_files): Remove graph_obstack initialization.
17151 (output_files): Remove graph_obstack saving.
17153 2001-09-24 Marc Autret <autret_m@epita.fr>
17155 * src/files.c (compute_output_file_names): Fix.
17157 2001-09-24 Marc Autret <autret_m@epita.fr>,
17158 Akim Demaille <akim@epita.fr>
17160 * src/reader.c (reader): Remove call to free_symtab ().
17161 * src/main.c (main): Call it here.
17163 * src/conflicts.c (initialize_conflicts): Rename as...
17164 (solve_conflicts): this.
17165 * src/print.c (print_core, print_actions, print_state)
17166 (print_grammar): Dump to a file instead a `output_obstack'.
17167 (print_results): Dump `output_obstack', and then proceed with the
17169 * src/files.c (compute_output_file_names, close_files): New.
17170 (output_files): Adjust.
17171 * src/main.c (main): Adjust.
17173 2001-09-23 Marc Autret <autret_m@epita.fr>
17175 * src/files.c (compute_header_macro): Computes header macro name
17176 from spec_defines_file when given.
17178 2001-09-23 Marc Autret <autret_m@epita.fr>
17180 * src/files.c (output_files): Add default extensions.
17182 2001-09-22 Akim Demaille <akim@epita.fr>
17184 * src/conflicts.c (finalize_conflicts): Rename as...
17185 (free_conflicts): this.
17187 2001-09-22 Akim Demaille <akim@epita.fr>
17189 * src/gram.c (gram_free): Rename back as...
17191 (output_token_translations): Free `token_translations'.
17192 * src/symtab.c (free_symtab): Free the tag field.
17194 2001-09-22 Akim Demaille <akim@epita.fr>
17196 Remove `translations' as it is always set to true.
17198 * src/gram.h: Adjust.
17199 * src/reader.c (packsymbols, parse_token_decl): Adjust
17200 * src/print.c (print_grammar): Adjust.
17201 * src/output.c (output_token_translations): Adjust.
17202 * src/lex.c (lex): Adjust.
17203 * src/gram.c: Be sure the set pointers to NULL.
17204 (dummy): Rename as...
17207 2001-09-22 Akim Demaille <akim@epita.fr>
17209 * configure.in: Invoke AM_LIB_DMALLOC.
17210 * src/system.h: Use dmalloc.
17211 * src/LR0.c: Be sure to have pointers initialized to NULL.
17212 (allocate_itemsets): Allocate kernel_items only if needed.
17214 2001-09-22 Akim Demaille <akim@epita.fr>
17216 * configure.in: Bump to 1.29b.
17217 * tests/Makefile.am (DISTCLEANFILES): Add package.m4.
17218 * tests/calc.at (_AT_DATA_CALC_Y): #undef malloc so that we don't
17219 need xmalloc.c in calc.y.
17222 2001-09-21 Akim Demaille <akim@epita.fr>
17225 * Makefile.maint, config/config.guess, config/config.sub,
17226 * config/missing: Update from masters.
17227 * tests/Makefile.am ($(srcdir)/$(TESTSUITE)): No longer depend
17229 * configure.in (ALL_LINGUAS): Add `tr'.
17231 2001-09-21 Akim Demaille <akim@epita.fr>
17233 * tests/Makefile.am (package.m4): Move to...
17234 ($(srcdir)/$(TESTSUITE)): here.
17236 2001-09-20 Akim Demaille <akim@epita.fr>
17238 * src/complain.c: No longer try to be standalone: use system.h.
17239 Don't assume __STDC__ is defined to 1. Just test if it is defined.
17240 * src/complain.h: Likewise.
17241 * src/reduce.c (useless_nonterminals, inaccessable_symbols):
17242 Remove the unused variable `n'.
17243 From Albert Chin-A-Young.
17245 2001-09-18 Marc Autret <autret_m@epita.fr>
17247 * doc/bison.1: Update.
17248 * doc/bison.texinfo (Bison Options): Update --defines and --graph
17250 (Option Cross Key): Update.
17253 2001-09-18 Marc Autret <autret_m@epita.fr>
17255 * tests/regression.at: New test (comment in %union).
17257 2001-09-18 Marc Autret <autret_m@epita.fr>
17259 * src/reader.c (parse_union_decl): Do not output '/'. Let copy_comment
17261 Reported by Keith Browne.
17263 2001-09-18 Marc Autret <autret_m@epita.fr>
17265 * tests/output.at: Add tests for --defines and --graph.
17267 2001-09-18 Marc Autret <autret_m@epita.fr>
17269 * tests/output.at: Removes tests of %{header,src}_extension features.
17271 2001-09-18 Akim Demaille <akim@epita.fr>
17273 * tests/Makefile.am (package.m4): New.
17274 * tests/calc.at (_AT_CHECK_CALC): Just run `calc input'.
17275 (_AT_CHECK_CALC_ERROR): Likewise.
17276 Factor the `, ' part of verbose error messages.
17278 2001-09-18 Marc Autret <autret_m@epita.fr>
17280 * src/getargs.c (longopts): Declare --defines and --graph as options
17281 with optional arguments.
17282 * src/files.h: Add extern declarations.
17283 * src/files.c (spec_graph_file, spec_defines_file): New.
17284 (output_files): Update.
17285 Remove CPP-outed code.
17287 2001-09-18 Marc Autret <autret_m@epita.fr>
17289 Turn off %{source,header}_extension feature.
17291 * src/files.c (compute_exts_from_gf): Update.
17292 (compute_exts_from_src): Update.
17293 (output_files): CPP-out useless code.
17294 * src/files.h: Remove {header,source}_extension extern declarations.
17295 * src/reader.c (parse_dquoted_param): CPP-out.
17296 (parse_header_extension_decl): Remove.
17297 (parse_source_extension_decl): Remove.
17298 (read_declarations): Remove cases tok_{hdrext,srcext}.
17299 * src/lex.c (percent_table): Remove {header,source}_extension entries.
17300 * src/lex.h (token_t): Remove tok_hdrext and tok_srcext.
17302 2001-09-10 Akim Demaille <akim@epita.fr>
17304 * tests/output.at (AT_CHECK_BISON_FLAGS, AT_CHECK_BISON_PERCENT):
17305 (AT_CHECK_BISON_PERCENT_FLAGS): Merge into...
17306 (AT_CHECK_OUTPUT): this.
17307 Merely check ls' exit status, its output is useless.
17309 2001-09-10 Akim Demaille <akim@epita.fr>
17311 * tests/calc.at: Use m4_match.
17312 (_AT_DATA_CALC_Y): Check `yyin != NULL', not `stdin != NULL'.
17314 2001-09-10 Marc Autret <autret_m@epita.fr>,
17315 Akim Demaille <akim@epita.fr>
17317 * src/vcg.h (graph_s): color, textcolor, bordercolor are now
17319 * src/print_graph.c (print_graph): Initalize graph.layoutalgorithm
17321 * src/reader.c (parse_token_decl): Initialize token with tok_eof.
17322 * src/lex.h: Adjust prototype.
17323 (token_t): Add `tok_undef'.
17324 * src/lex.c (struct percent_table_struct): Retval is now a token_t.
17325 (parse_percent_token): Now returns token_t.
17326 Add default statement in switch.
17327 (lex): Separate `c' as an input variable, from the token_t result
17329 (unlexed): Is a token_t.
17331 2001-09-10 Akim Demaille <akim@epita.fr>
17333 * configure.in: Bump to 1.29a.
17335 2001-09-07 Akim Demaille <akim@epita.fr>
17339 2001-08-30 Akim Demaille <akim@epita.fr>
17341 * tests/atgeneral.m4, tests/atconfig.in, tests/suite.at: Remove.
17342 * m4/atconfig.m4: Remove.
17343 * tests/testsuite.at, tests/atlocal.in, tests/output.at,
17344 * tests/bison: New.
17345 * tests/regression.at, tests/calc.at: Use m4_define, AT_BANNER,
17346 m4_if, m4_patsubst, and m4_regexp.
17347 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Use an
17348 `input' file instead of echo.
17350 2001-08-29 Akim Demaille <akim@epita.fr>
17354 2001-08-29 Akim Demaille <akim@epita.fr>
17358 2001-08-29 Paul Eggert <eggert@twinsun.com>
17360 * src/bison.simple (yyparse): Don't take the address of an
17361 item before the start of an array, as that doesn't conform to
17364 2001-08-29 Robert Anisko <anisko_r@epita.fr>
17366 * doc/bison.texinfo (Location Tracking Calc): New node.
17368 2001-08-29 Paul Eggert <eggert@twinsun.com>
17370 * src/output.c (output): Do not define const, as this now
17371 causes more problems than it cures.
17373 2001-08-29 Akim Demaille <akim@epita.fr>
17375 * doc/bison.texinfo: Modernize `@node' and `@top' use: just name
17377 Be sure to tag the `detailmenu'.
17379 2001-08-29 Akim Demaille <akim@epita.fr>
17381 * Makefile.maint (do-po-update): Wget refuses to overwrite files:
17382 download in a tmp dir.
17384 2001-08-28 Marc Autret <autret_m@epita.fr>
17386 * config/depcomp: New file.
17388 2001-08-28 Marc Autret <autret_m@epita.fr>
17390 * doc/bison.1 (mandoc): Adjust.
17391 From Juan Manuel Guerrero.
17393 2001-08-28 Marc Autret <autret_m@epita.fr>
17395 * src/print_graph.c (print_state): Fix.
17397 2001-08-27 Marc Autret <autret_m@epita.fr>
17399 * src/vcg.h (classname_s, infoname_s, node_s): Constify the
17401 Echo modifications to the functions prototypes.
17402 * src/vcg.c (add_classname, add_infoname): Adjust arguments.
17404 2001-08-27 Marc Autret <autret_m@epita.fr>
17406 * src/vcg.c: Include `xalloc.h'.
17407 (add_colorentry): New.
17408 (add_classname): New.
17409 (add_infoname): New.
17410 * src/vcg.h: Add new prototypes.
17412 2001-08-27 Akim Demaille <akim@epita.fr>
17414 * Makefile.maint: Sync. again with CVS Autoconf.
17416 2001-08-27 Akim Demaille <akim@epita.fr>
17418 * Makefile.maint: Formatting changes.
17419 (po-update, cvs-update, update): New targets.
17422 2001-08-27 Akim Demaille <akim@epita.fr>
17424 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
17425 * Makefile.maint: Sync. with CVS Autoconf.
17427 2001-08-27 Marc Autret <autret_m@epita.fr>
17429 * src/vcg.h (struct infoname_s): New.
17430 (struct colorentry_s): New.
17431 (graph_s): New fields {vertical,horizontal}_order in structure.
17432 Add `infoname' field.
17433 Add `colorentry' field;
17434 * src/vcg_defaults.h (G_VERTICAL_ORDER): New.
17435 (G_HORIZONTAL_ORDER): New.
17437 (G_COLORENTRY): New.
17438 * src/vcg.c (output_graph): Add output of {vertical,horizontal}_order.
17439 Add output of `infoname'.
17440 Add output of `colorentry'.
17442 2001-08-27 Marc Autret <autret_m@epita.fr>
17444 * src/reader.c (parse_dquoted_param): Rename variable `index' to `i'.
17445 This one shadowed a global parameter.
17447 2001-08-24 Marc Autret <autret_m@epita.fr>
17449 * src/print_graph.c (node_output_size): Declared POSIX `size_t' type,
17450 instead of `unsigned'.
17451 (print_state): Do not call obstack_object_size () in obstack_grow ()
17452 to avoid macro variables shadowing.
17454 2001-08-23 Marc Autret <autret_m@epita.fr>
17456 * src/lex.c (percent_table): Typo: s/naem/name/.
17458 Normalize new options declarations.
17460 2001-08-20 Pascal Bart <pascal.bart@epita.fr>
17462 * tests/suite.at: Exercise %header_extension and %source_extension.
17464 2001-08-16 Marc Autret <autret_m@epita.fr>
17466 * src/reader.c (parse_dquoted_param): New.
17467 (parse_header_extension_decl): Use it.
17468 (parse_source_extension_decl): Likewise.
17470 2001-08-16 Marc Autret <autret_m@epita.fr>
17472 * src/vcg.c: Remove includes of `complain.h' and `xalloc.h'.
17473 (get_xxxx_str): Use assert () instead of complain ().
17474 Remove return invokations in default cases.
17475 (get_decision_str): Modify default behaviour. Remove second argument.
17476 Echo modifications on calls.
17477 (output_graph): Fix.
17479 2001-08-16 Marc Autret <autret_m@epita.fr>
17481 * src/getargs.c (usage): Update with ``-g, --graph''.
17483 2001-08-16 Marc Autret <autret_m@epita.fr>
17485 * doc/bison.texinfo (Bison Options): Add items `-g', `--graph'.
17486 (Option Cross Key): Likewise.
17487 * doc/bison.1: Update.
17489 2001-09-25 Pascal Bart <pascal.bart@epita.fr>
17491 * src/output.c (output_master_parser): Don't finish action_obstack.
17492 (output_parser): Don't care about the muscle action, here.
17493 (prepare): Copy the action_obstack in the action muscle.
17494 (output): Free action_obstack.
17496 2001-09-23 Pascal Bart <pascal.bart@epita.fr>
17498 * src/reader.c (parse_union_decl): Add new obstack union_obstack. Which
17499 will contain `%union' declaration.
17500 (parse_union_decl): Delete #line directive output.
17501 (parse_union_decl): Substitute /attrs_obstack/union_obstack for all
17502 informations about %union.
17503 (parse_union_decl): Copy the union_obstack in the muscle stype.
17504 * src/bison.simple: Add new #line directive.
17505 Add typdef %%stype YYSTYPE.
17507 2001-09-23 Pascal Bart <pascal.bart@epita.fr>
17509 * src/bison.simple: Add new `#line' directive.
17511 2001-09-22 Pascal Bart <pascal.bart@epita.fr>
17513 * src/bison.simple: New `#line' directive.
17514 * src/output.c (output_parser): Support new dynamic muscle input_line.
17516 2001-09-22 Marc Autret <autret_m@epita.fr>
17518 * src/output.c (output_master_parser): New.
17519 (output_parser): Be more re-entrant.
17521 2001-09-21 Marc Autret <autret_m@epita.fr>
17523 * src/reader.c (copy_definition, parse_union_decl): Update and use
17525 (copy_action): Likewise.
17526 Use obstack_1grow ().
17527 * src/muscle_tab.c (muscle_init): Add muscle `linef'.
17529 2001-09-21 Marc Autret <autret_m@epita.fr>
17531 * src/options.c (option_table): Adjust.
17532 * src/lex.c (parse_percent_token): Fix.
17534 2001-09-20 Pascal Bart <pascal.bart@epita.fr>
17536 * src/options.c (symtab.h): Include it, need by lex.h.
17538 2001-09-20 Pascal Bart <pascal.bart@epita.fr>
17540 * src/lex.c (parse_percent_token): Change type of variable `tx', which
17541 is now an option_table_struct*.
17542 (option_strcmp): New function option_strcmp.
17543 (parse_percent_token): Call option_strcmp.
17544 * src/getargs.c (xalloc.h, options.h): Include it.
17545 (getargs): Call create_long_option_table.
17546 (getargs): Free longopts at the end of the function.
17547 (shortopts): Move in options.c.
17548 * src/options.c (create_long_option_table): New function. Convert
17549 information from option_table to option structure.
17550 * src/reader.c (options.h): Include it.
17552 * src/Makefile.am: Adjust.
17553 * src/options.c (option_table): Create from longopts and percent_table.
17554 * src/getargs.c (longopts): Delete.
17555 * src/lex.c (struct percent_table_struct): Delete.
17556 (percent_table): Delete.
17557 (options.h): Include it.
17558 * src/options.c: Create.
17559 * src/options.h: Create.
17560 Declare enum opt_access_e.
17561 Define struct option_table_struct.
17563 2001-09-20 Marc Autret <autret_m@epita.fr>
17565 * doc/bison.texinfo: Adjust terminologies about prologue and epilogue
17568 2001-09-19 Pascal Bart <pascal.bart@epita.fr>
17570 * src/bison.simple: s/%%filename/%%skeleton.
17571 * src/muscle_tab.c (getargs.h): Include it.
17572 (muscle_init): Insert new muscle skeleton.
17574 2001-09-18 Pascal Bart <pascal.bart@epita.fr>
17576 * src/output.c (output_parser): Delete unused variable actions_dumped.
17578 2001-09-07 Pascal Bart <pascal.bart@epita.fr>
17580 * src/output.c (output): Delete call to reader_output_yylsp.
17581 * src/reader.c (reader): Likewise.
17582 * src/reader.h: Delete declaration of reader_output_yylsp.
17584 2001-09-02 Marc Autret <autret_m@epita.fr>
17586 * src/reader.c: Include muscle_tab.h.
17587 (parse_union_decl): Update.
17588 (parse_macro_decl): Rename parse_muscle_decl.
17589 Update to use renamed functions and variable.
17590 (read_declarations, copy_action, read_additionnal_code, : Updated
17591 with correct variables and functions names.
17592 (packsymbols, reader): Likewise.
17594 * src/reader.h (muscle_obstack): Extern declaration update.
17596 * src/output.c: Include muscle_tab.h
17597 In all functions using macro_insert, change by using muscle_insert ().
17598 (macro_obstack): Rename muscle_obstack.
17599 Echo modifications in the whole file.
17600 (MACRO_INSERT_INT): Rename MUSCLE_INSERT_INT.
17601 (MACRO_INSERT_STRING): Rename MUSCLE_INSERT_STRING.
17602 (MACRO_INSERT_PREFIX): Rename MUSCLE_INSERT_PREFIX.
17604 * src/muscle_tab.h: Update double inclusion macros.
17605 (macro_entry_s): Rename muscle_entry_s.
17608 * src/muscle_tab.c: Include muscle_tab.h.
17609 Rename macro_tabble to muscle_table.
17610 (mhash1, mhash2, mcmp): Use muscle_entry.
17611 (macro_init): Rename muscle_init. Update.
17612 (macro_insert): Rename muscle_insert. Update.
17613 (macro_find): Rename muscle_find. Update.
17615 * src/main.c: Include muscle_tab.h.
17616 (main): Call muscle_init ().
17617 * src/Makefile.am (bison_SOURCES): Echo modifications.
17619 2001-09-02 Marc Autret <autret_m@epita.fr>
17621 Now the files macro_tab.[ch] are named muscle_tab.[ch].
17623 * src/muscle_tab.c, src/muscle_tab.h: Add files.
17625 2001-09-02 Marc Autret <autret_m@epita.fr>
17627 * src/macrotab.c, src/macrotab.h: Remove.
17629 2001-09-01 Pascal Bart <pascal.bart@epita.fr>
17631 * src/reader.c (copy_guard): Use muscle to specify the `#line'
17634 2001-09-01 Marc Autret <autret_m@epita.fr>
17636 * tests/calc.at (exp): Now, YYERROR_VERBOSE need to be set
17637 to an explicit value to activate the feature. We do it here.
17639 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
17641 * src/output.c (prepare): Delete the `filename' muscule insertion.
17642 * src/reader.c (copy_action): Use `filename' muscule with `#line'.
17643 (parse_union_decl): Likewise.
17644 * src/macrotab.c (macro_init): Initialize filename by infile.
17646 2001-08-31 Marc Autret <autret_m@epita.fr>
17648 * src/bison.simple (YYLSP_NEEDED): New definition.
17649 * src/output.c (prepare): Add macro insertion of `locations_flag'
17651 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
17653 * src/output.c (prepare): Delete insertion of previous muscles,
17654 and insert the `prefix' muscles.
17655 * src/macrotab.c (macro_init): Likewise.
17656 (macro_init): Initialization prefix directive by `yy'.
17657 * src/bison.simple: Substitute all %%yylex, %%yychar, %%yylval,
17658 %%yydebug, %%yyerror, %%yynerrs and %%yyparse by yylex, yychar,
17659 yylval, yydebug, yyerror, yynerrs and yyparse.
17660 New directive `#define' to substitute yydebug, ... with option
17663 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
17665 * src/main.c (main): Standardize.
17666 * src/output.c (output_table_data, output_parser): Likewise.
17667 * src/macrotab.h, src/macrotab.c, src/bison.simple: Likewise.
17669 2001-08-31 Pascal Bart <pascal.bart@epita.fr>, Marc Autret <autret_m@epita.fr>
17671 * src/reader.c (read_additionnal_code): Rename %%user_code to
17673 * src/output.c (output): Rename %%declarations to %%prologue.
17674 * src/bison.simple: Echo modifications.
17676 2001-08-31 Marc Autret <autret_m@epita.fr>
17678 * src/reader.c (readgram): CleanUp.
17679 (output_token_defines): Likewise.
17680 (packsymbols): Likewise.
17681 (reader): Likewise.
17682 * src/output.c (output): CPP-out useless code.
17684 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
17686 * src/reader.c (reader): Delete obsolete call to function
17687 output_trailers and output_headers.
17688 * src/output.h: Remove obsolete functions prototypes of output_headers
17689 and output_trailers.
17691 2001-08-30 Pascal Bart <pascal.bart@epita.fr>
17693 * src/main.c: Include macrotab.h.
17694 * src/macrotab.h (macro_entry_s): Constify fields.
17695 Adjust functions prototypes.
17696 * src/macrotab.c (macro_insert): Constify key and value.
17697 (macro_find): Constify key.
17698 (macro_insert): Include 'xalloc.h'
17699 (macro_insert): Use XMALLOC.
17700 (macro_find): Constify return value.
17701 * src/output.c (output_table_data): Rename table to table_data.
17702 (output_parser): Constify macro_key, macro_value.
17704 2001-08-30 Marc Autret <autret_m@epita.fr>
17706 * src/reader.c (parse_skel_decl): New.
17707 (read_declarations): Add case `tok_skel', call parse_skel_decl ().
17708 * src/lex.h (token_t): New token `tok_skel'.
17709 * src/lex.c (percent_table): Add skeleton option entry.
17712 2001-08-29 Marc Autret <autret_m@epita.fr>
17714 * src/bison.simple: Add %%user_code directive at the end.
17715 * src/reader.c (read_additionnal_code): New.
17717 * src/output.c (output_program): Remove.
17720 2001-08-28 Marc Autret <autret_m@epita.fr>
17722 * src/output.c (output_actions): Clean up.
17723 (output_gram): CPP-out useless code.
17724 * src/reader.c (reader): Clean up, CPP-out useless code.
17726 2001-08-28 Pascal Bart <pascal.bart@epita.fr>
17728 * src/output.c (output): Copy attrs_obstack in the '%%definitions'
17730 * src/bison.simple: Add `%%definitions'.
17732 2001-08-28 Marc Autret <autret_m@epita.fr>
17734 * config/depcomp: New file.
17736 2001-08-27 Paul Eggert <eggert@twinsun.com>
17738 * src/bison.simple (yyparse): Don't take the address of an
17739 item before the start of an array, as that doesn't conform to
17742 2001-08-27 Robert Anisko <robert.anisko@epita.fr>
17744 * src/output.c (output): Remove the initialization of the macro
17745 obstack. It was done too late here.
17747 * src/reader.c (parse_macro_decl): Fix. Use of the macro obstack was
17749 (reader): Initialize the macro obstack here, since we need it to grow
17750 '%define' directives.
17752 * src/reader.h: Declare the macro obstack as extern.
17754 2001-08-27 Robert Anisko <robert.anisko@epita.fr>
17756 * src/output.c (output_parser): Fix. Store single '%' characters in
17757 the output obstack instead of throwing them away.
17759 2001-08-27 Akim Demaille <akim@epita.fr>
17761 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
17763 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
17765 * lib/Makefile.am: Adjust.
17767 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
17769 * src/bison.simple: Update and add '%%' directives.
17771 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
17773 * src/reader.c (reader): Remove calls to 'output_headers' and
17774 'output_trailers'. Remove some C output.
17775 (readgram): Disable a piece of code that was writing a default
17776 definition for 'YYSTYPE'.
17777 (reader_output_yylsp): Remove.
17778 (packsymbols): Output token defintions to a macro.
17779 (copy_definition): Disable C output.
17781 * src/reader.c (parse_macro_decl): New function used to parse macro
17783 (copy_string2): Put the body of copy_string into this new function.
17784 Add a parameter to let the caller choose whether he wants to copy the
17785 string delimiters or not.
17786 (copy_string): Be a simple call to copy_string2 with the last argument
17788 (read_declarations): Add case for macro definition.
17789 (copy_identifier): New.
17790 (parse_macro_decl): Read macro identifiers using copy_identifier
17793 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
17795 * src/output.c (prepare): Add prefixed names.
17796 (output_parser): Output semantic actions.
17797 (output_parser): Fix bug on '%%line' directives.
17799 * src/output.c (output_headers): Remove. The C code printed by this
17800 function should now be in the skeletons.
17801 (output_trailers): Remove.
17802 (output): Disable call to 'reader_output_yylsp'.
17803 (output_rule_data): Do not output tables to the table obstack.
17805 * src/output.c: Remove some C dedicated output.
17806 Improve the use of macro and output obstacks.
17807 (output_defines): Remove.
17809 * src/output.c (output_token_translations): Associate 'translate'
17810 table with a macro. No output to the table obstack.
17811 (output_gram): Same for 'rhs' and 'prhs'.
17812 (output_stos): Same for 'stos'.
17813 (output_rule_data): Same for 'r1' and 'r2'.
17814 (token_actions): Same for 'defact'.
17815 (goto_actions): Same for 'defgoto'.
17816 (output_base): Same for 'pact' and 'pgoto'.
17817 (output_table): Same for 'table'.
17818 (output_check): Same for 'check'.
17820 * src/output.c (output_table_data): New function.
17821 (output_short_table): Remove.
17822 (output_short_or_char_table): Remove.
17824 * src/output.c (output_parser): Replace most of the skeleton copy code
17825 with something new. Skeletons are now processed character by character
17826 rather than line by line, and Bison looks for '%%' macros. This is the
17827 first step in making Bison's output process (a lot) more flexible.
17828 (output_parser): Use the macro table.
17830 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
17832 * src/main.c (main): Initialize the macro table.
17834 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
17836 * src/lex.c (percent_table): Add tok_define.
17837 * src/lex.h: Add tok_define.
17839 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
17841 * src/macrotab.c: New file.
17842 * src/macrotab.h: New file.
17843 * src/Makefile.am: Update.
17845 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
17847 * lib/hash.c: New file.
17848 * lib/hash.h: New file.
17849 * lib/Makefile.am: Update.
17851 2001-08-15 Akim Demaille <akim@epita.fr>
17855 2001-08-15 Marc Autret <autret_m@epita.fr>
17857 * src/reader.c (readgram): Indent output macro YYSTYPE.
17858 (packsymbols): Likewise.
17859 (output_token_defines): Likewise.
17860 * src/files.c: Standardize.
17861 (compute_header_macro): New.
17862 (defines_obstack_save): New. Use compute_header_macro.
17863 (output_files): Update. Use defines_obstack_save.
17865 2001-08-15 Akim Demaille <akim@epita.fr>
17867 * doc/bison.texinfo (Table of Symbols): Document
17868 YYSTACK_USE_ALLOCA.
17870 2001-08-15 Akim Demaille <akim@epita.fr>
17872 * missing: Update from CVS Automake.
17873 * config/config.guess, config/config.sub, config/texinfo.tex:
17874 Update from gnu.org.
17876 2001-08-15 Akim Demaille <akim@epita.fr>
17878 * Makefile.maint: Sync with CVS Autoconf.
17880 2001-08-14 Pascal Bart <pascal.bart@epita.fr>
17882 * doc/bison.texinfo: Include GNU Free Documentation License from
17884 * doc/fdl.texi: Add to package.
17886 2001-08-14 Marc Autret <autret_m@epita.fr>
17888 Turn on %{source,header}_extension features.
17890 * src/lex.c (percent_table): Un-CPP out header_extension and
17892 * src/files.c (compute_exts_from_gf): Compare pointers with NULL.
17893 (compute_exts_from_src): Remove conditions. It restores priorities
17896 2001-08-14 Marc Autret <autret_m@epita.fr>
17898 * src/files.c (compute_base_names): Add extensions computing when
17899 `--file-prefix' used.
17900 Standardize function calls.
17902 2001-08-13 Marc Autret <autret_m@epita.fr>
17904 * src/bison.simple (YYSTACK_USE_ALLOCA): Changed to allow users
17905 defining it (defined but null disables alloca).
17907 2001-08-13 Marc Autret <autret_m@epita.fr>
17909 * src/bison.simple (_yy_memcpy): CPP reformat.
17911 2001-08-13 Pascal Bart <pascal.bart@epita.fr>
17913 * tests/atconfig.in (CPPFLAGS): Fix.
17915 2001-08-10 Pascal Bart <pascal.bart@epita.fr>
17917 * doc/bison.texinfo: Include GNU General Public License from
17919 * doc/gpl.texi: Add to package.
17921 2001-08-10 Marc Autret <autret_m@epita.fr>
17923 * src/print_graph.h: Fix.
17924 * src/reader.c (read_declarations): Use parse_header_extension_decl ().
17926 2001-08-10 Akim Demaille <akim@epita.fr>
17928 * src/system.h: Provide default declarations for stpcpy, strndup,
17931 2001-08-10 Robert Anisko <anisko_r@epita.fr>
17933 * doc/bison.texinfo (Locations): Update @$ stuff.
17935 2001-08-09 Robert Anisko <anisko_r@epita.fr>
17937 * src/bison.simple (YYLLOC_DEFAULT): Update.
17940 2001-08-08 Marc Autret <autret_m@epita.fr>
17942 * doc/bison.texinfo: Change @samp{$<@dots{}>} to
17943 @samp{$<@dots{}>@var{n}} in Section Actions in Mid-Rule.
17944 Reported by Fabrice Bauzac.
17946 2001-08-08 Marc Autret <autret_m@epita.fr>
17948 * src/vcg_default.h: Use NULL instead of 0 to initialize pointers.
17949 * src/vcg.c (output_node): Fix.
17950 * src/vcg.h: Cleanup.
17951 * src/print_graph.c: Add comments.
17952 (node_output_size): New global variable. Simplify the formatting of
17953 the VCG graph output.
17954 (print_actions): Unused code is now used. It notifies the final state
17955 and no action states in the VCG graph. It also give the reduce actions.
17956 The `shift and goto' edges are red and the `go to state' edges are
17958 Get the current node name and node_obstack by argument.
17959 (node_obstack): New variable.
17960 (print_state): Manage node_obstack.
17961 (print_core): Use node_obstack given by argument.
17962 A node is not only computed here but in print_actions also.
17963 (print_graph): CPP out useless code instead of commenting it.
17965 2001-08-07 Pascal Bart <pascal.bart@epita.fr>
17967 * tests/atconfig.in (CPPFLAGS): Fix.
17969 2001-08-07 Akim Demaille <akim@epita.fr>
17971 * src/print_graph.c (quote): New.
17972 (print_core): Use it.
17974 2001-08-06 Akim Demaille <akim@epita.fr>, Marc Autret <autret_m@epita.fr>
17976 * src/vcg.c (complain.h): Include it.
17977 Unepitaize `return' invocations.
17978 [NDEBUG] (main): Remove.
17979 * src/vcg.h (node_t, edge_t, graph_t): Constify the char * members.
17980 * src/files.c (open_files): Initialize graph_obstack.
17981 * src/print_graph.c (print_actions): CPP out useless code.
17982 (print_core): Don't output the last `\n' in labels.
17984 * src/files.c (output_files): Output the VCG file.
17985 * src/main.c (main): Invoke print_graph ();
17987 2001-08-06 Marc Autret <autret_m@epita.fr>
17989 Automaton VCG graph output.
17990 Using option ``-g'' or long option ``--graph'', you can generate
17991 a gram_filename.vcg file containing a VCG description of the LALR (1)
17992 automaton of your grammar.
17994 * src/main.c: Call to print_graph() function.
17995 * src/getargs.h: Update.
17996 * src/getargs.c (options): Update to catch `-g' and `--graph' options.
17997 (graph_flag): New flag.
17998 (longopts): Update.
17999 (getargs): Add case `g'.
18000 * src/files.c (graph_obstack): New obstack struct.
18001 (open_files): Initialize new obstack.
18002 (output_files): Saves graph_obstack if required.
18003 * src/files.h (graph_obstack): New extern declaration.
18004 * src/Makefile.am: Add new source files.
18006 2001-08-06 Marc Autret <autret_m@epita.fr>
18008 * src/print_graph.c, src/print_graph.h (graph): New.
18009 * src/vcg.h: New file.
18010 * src/vcg.c: New file, VCG graph handling.
18012 2001-08-06 Marc Autret <autret_m@epita.fr>
18014 Add of %source_extension and %header_extension which specify
18015 the source or/and the header output file extension.
18017 * src/files.c (compute_base_names): Remove initialisation of
18018 src_extension and header_extension.
18019 (compute_exts_from_gf): Update.
18020 (compute_exts_from_src): Update.
18021 (output_files): Update.
18022 * src/reader.c (parse_header_extension_decl): New.
18023 (parse_source_extension_decl): New.
18024 (read_declarations): New case statements for the new tokens.
18025 * src/lex.c (percent_table): Add entries for %source_extension
18026 and %header_extension.
18027 * src/lex.h (token_e): New tokens tok_hdrext and tok_srcext.
18029 2001-08-06 Marc Autret <autret_m@epita.fr>
18031 * configure.in: Bump to 1.28c.
18032 * doc/bison.texinfo: Texinfo thingies.
18034 2001-08-04 Pascal Bart <pascal.bart@epita.fr>
18036 * tests/atconfig.in (CPPFLAGS): Add.
18037 * tests/calc.at (AT_CHECK): Use CPPFLAGS.
18039 2001-08-03 Akim Demaille <akim@epita.fr>
18043 2001-08-03 Akim Demaille <akim@epita.fr>
18045 * tests/Makefile.am (check-local): Ship testsuite.
18046 * tests/calc.at (_AT_DATA_CALC_Y): Prototype all the functions.
18047 Include `string.h'.
18049 2001-08-03 Akim Demaille <akim@epita.fr>
18051 * configure.in: Try using -Wformat when compiling.
18053 2001-08-03 Akim Demaille <akim@epita.fr>
18055 * configure.in: Bump to 1.28b.
18057 2001-08-03 Akim Demaille <akim@epita.fr>
18059 * src/complain.c: Adjust strerror_r portability issues.
18061 2001-08-03 Akim Demaille <akim@epita.fr>
18065 2001-08-03 Akim Demaille <akim@epita.fr>
18067 * src/getargs.c, src/getarg.h (skeleton)): Constify.
18068 * src/lex.c (literalchar): Avoid name clashes on `buf'.
18069 * src/getargs.c: Include complain.h.
18070 * src/files.c, src/files.h (skeleton_find): Avoid name clashes.
18071 * lib/quotearg.c, lib/quotearg.h: Update from fileutils 4.1.
18073 2001-08-03 Akim Demaille <akim@epita.fr>
18075 * src/reader.c (readgram): Display hidden chars in error messages.
18077 2001-08-03 Akim Demaille <akim@epita.fr>
18079 Update to gettext 0.10.39.
18081 2001-08-03 Akim Demaille <akim@epita.fr>
18083 * lib/strspn.c: New.
18085 2001-08-01 Marc Autret <autret_m@epita.fr>
18087 * doc/bison.texinfo: Update.
18088 * doc/bison.1 (mandoc): Update.
18089 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove .c and .h.
18090 * src/files.c: Support output files extensions computing.
18091 (src_extension): New static variable.
18092 (header_extension): New static variable.
18093 (tr): New function.
18094 (get_extension_index): New function, gets the index of an extension
18095 filename in a string.
18096 (compute_exts_from_gf): New function, computes extensions from the
18097 grammar file extension.
18098 (compute_exts_from_src): New functions, computes extensions from the
18099 C source file extension, file given by ``-o'' option.
18100 (compute_base_names): Update.
18101 (output_files): Update.
18103 2001-08-01 Robert Anisko <anisko_r@epita.fr>
18105 * doc/bison.texi: Document @$.
18106 (Locations): New section.
18108 2001-07-18 Akim Demaille <akim@epita.fr>
18110 * Makefile.maint, GNUmakefile: New, from Autoconf 2.52.
18111 * config/prev-version.txt, config/move-if-change: New.
18112 * Makefile.am: Adjust.
18114 2001-07-08 Pascal Bart <pascal.bart@epita.fr>
18116 * src/bison.simple (yyparse): Suppress warning `comparaison
18117 between signed and unsigned'.
18119 2001-07-05 Pascal Bart <pascal.bart@epita.fr>
18121 * src/getargs.h (raw_flag): Remove.
18122 * src/getargs.c: Die on `-r'/`--raw'.
18123 * src/lex.c (parse_percent_token): Die on `%raw'.
18124 * src/reader.c (output_token_defines): Suppress call to `raw_flag'.
18125 * tests/calc.at: Suppress test with option `--raw'.
18127 2001-07-14 Akim Demaille <akim@epita.fr>
18130 * configure.in: Require Autoconf 2.50.
18131 Update to gettext 0.10.38.
18133 2001-03-16 Akim Demaille <akim@epita.fr>
18135 * doc/bison.texinfo: ANSIfy the examples.
18137 2001-03-16 Akim Demaille <akim@epita.fr>
18139 * getargs.c (skeleton): New variable.
18140 (longopts): --skeleton is a new option.
18141 (shortopts, getargs): -S is a new option.
18142 * getargs.h: Declare skeleton.
18143 * output.c (output_parser): Use it.
18145 2001-03-16 Akim Demaille <akim@epita.fr>
18147 * m4/strerror_r.m4: New.
18148 * m4/error.m4: Run AC_FUNC_STRERROR_R.
18149 * lib/error.h, lib/error.c: Update.
18151 2001-03-16 Akim Demaille <akim@epita.fr>
18153 * src/getargs.c (longopts): Clean up.
18155 2001-02-21 Akim Demaille <akim@epita.fr>
18157 * src/reader.c (gensym): `gensym_count' is your own.
18158 Use a static buf to create the symbol name, as token_buffer is no
18161 2001-02-08 Akim Demaille <akim@epita.fr>
18163 * src/conflicts.c (conflict_report): Be sure not to append to res
18164 between two calls, which could happen if both first sprintf were
18165 skipped, but not the first cp += strlen.
18167 2001-02-08 Akim Demaille <akim@epita.fr>
18169 * lib/memchr.c, lib/stpcpy.c, lib/strndup.c, lib/strnlen.c:
18170 New, from fileutils 4.0.37.
18171 * configure.in: Require Autoconf 2.49c. I took some time before
18172 making this decision. This is the only way out for portability
18173 issues in Bison, it would mean way too much duplicate effort to
18174 import in Bison features implemented in 2.49c since 2.13.
18175 AC_REPLACE_FUNCS and AC_CHECK_DECLS the functions above.
18177 2001-02-02 Akim Demaille <akim@epita.fr>
18179 * lib/malloc.c, lib/realloc.c: New, from the fileutils 4.0.37.
18180 * lib/xalloc.h, lib/xmalloc.c: Update.
18182 2001-01-19 Akim Demaille <akim@epita.fr>
18184 Get rid of the ad hoc handling of token_buffer in the scanner: use
18187 * src/lex.c (token_obstack): New.
18188 (init_lex): Initialize it. No longer call...
18189 (grow_token_buffer): this. Remove it.
18190 Adjust all the places which used it to use the obstack.
18192 2001-01-19 Akim Demaille <akim@epita.fr>
18194 * src/lex.h: Rename all the tokens:
18195 s/\bENDFILE\b/tok_eof/g;
18196 s/\bIDENTIFIER\b/tok_identifier/g;
18198 Let them be enums, not #define, to ease debugging.
18199 Adjust all the code.
18201 2001-01-18 Akim Demaille <akim@epita.fr>
18203 * src/lex.h (MAXTOKEN, maxtoken, grow_token_buffer): Remove, private.
18204 * src/lex.c (maxtoken, grow_token_buffer): Static.
18206 2001-01-18 Akim Demaille <akim@epita.fr>
18208 Since we now use obstacks, more % directives can be enabled.
18210 * src/lex.c (percent_table): Also accept `%yacc',
18211 `%fixed_output_files', `%defines', `%no_parser', `%verbose', and
18213 Handle the actions for `%semantic_parser' and `%pure_parser' here,
18214 instead of returning a token.
18215 * src/lex.h (SEMANTIC_PARSER, PURE_PARSER): Remove, unused.
18216 * src/reader.c (read_declarations): Adjust.
18217 * src/files.c (open_files): Don't call `compute_base_names', don't
18218 compute `attrsfile' since they depend upon data which might be
18219 *in* the input file now.
18220 (output_files): Do it here.
18221 * src/output.c (output_headers): Document the fact that this patch
18222 introduces a guaranteed SEGV for semantic parsers.
18223 * doc/bison.texinfo: Document them.
18224 * tests/suite.at: Exercise these %options.
18226 2000-12-20 Akim Demaille <akim@epita.fr>
18228 Also handle the output file (--verbose) with obstacks.
18230 * files.c (foutput): Remove.
18231 (output_obstack): New.
18232 Adjust all dependencies.
18233 * src/conflicts.c: Return a string.
18234 * src/system.h (obstack_grow_string): Rename as...
18235 (obstack_sgrow): this. Be ready to work with non literals.
18236 (obstack_fgrow4): New.
18238 2000-12-20 Akim Demaille <akim@epita.fr>
18240 * src/files.c (open_files): Fix the computation of short_base_name
18241 in the case of `-o foo.tab.c'.
18243 2000-12-20 Akim Demaille <akim@epita.fr>
18245 * src/reader.c (copy_string, copy_comment, copy_comment2, copy_at)
18246 (copy_dollar): Now that everything uses obstacks, get rid of the
18249 2000-12-20 Akim Demaille <akim@epita.fr>
18251 * src/files.c (open_files): Actually the `.output' file is based
18252 on the short_base_name, not base_name.
18253 * tests/suite.at (Checking output file names): Adjust.
18255 2000-12-20 Akim Demaille <akim@epita.fr>
18257 * src/bison.s1: Remove, we now use directly...
18258 * src/bison.simple: this.
18259 * src/Makefile.am: Use pkgdata instead of data.
18261 2000-12-20 Akim Demaille <akim@epita.fr>
18263 * src/files.c (guard_obstack): New.
18264 (open_files): Initialize it.
18265 (output_files): Dump it...
18266 * src/files.h: Export it.
18267 * src/reader.c (copy_guard): Use it.
18269 2000-12-19 Akim Demaille <akim@epita.fr>
18271 * src/files.c (outfile, defsfile, actfile): Removed as global
18273 (open_files): Don't compute them.
18274 (output_files): Adjust.
18275 (base_name, short_base_name): Be global.
18276 Adjust dependencies.
18278 2000-12-19 Akim Demaille <akim@epita.fr>
18280 * src/files.c (strsuffix): New.
18281 (stringappend): Be just like strcat but allocate.
18282 (base_names): Eve out from open_files.
18283 Try to simplify the rather hairy computation of base_name and
18285 (open_files): Use it.
18286 * tests/suite.at (Checking output file names): New test.
18288 2000-12-19 Akim Demaille <akim@epita.fr>
18290 * src/system.h (obstack_grow_literal_string): Rename as...
18291 (obstack_grow_string): this.
18292 * src/output.c (output_parser): Recognize `%% actions' instead of
18294 * src/bison.s1: s/$/%% actions/.
18295 * src/bison.hairy: Likewise.
18297 2000-12-19 Akim Demaille <akim@epita.fr>
18299 * src/output.c (output_parser): Compute the `#line' lines when
18301 * src/Makefile.am (bison.simple): Be a simple copy of bison.s1.
18302 Suggested by Hans Aberg.
18304 2000-12-19 Akim Demaille <akim@epita.fr>
18306 Let the handling of the skeleton files be local to the procedures
18309 * src/files.c (xfopen, xfclose, skeleton_find, guardfile): No
18311 (fparser, open_extra_files): Remove.
18312 (open_files, output_files): Don't take care of fparser.
18313 * src/files.h: Adjust.
18314 * src/output.c (output_parser): Open and close the file to the
18316 * src/reader.c (read_declarations): When %semantic_parser, open
18319 2000-12-19 Akim Demaille <akim@epita.fr>
18321 * src/file.h (BISON_SIMPLE, BISON_HAIRY): Move from here...
18322 * src/system.h (BISON_SIMPLE, BISON_HAIRY): ... to here.
18324 2000-12-19 Akim Demaille <akim@epita.fr>
18326 * src/files.c (open_files): Yipee! We no longer need all the code
18327 looking for `/tmp' since we have no tmp file.
18329 2000-12-19 Akim Demaille <akim@epita.fr>
18331 * src/system.h (EXT_TAB, EXT_OUTPUT, EXT_STYPE_H, EXT_GUARD_C):
18333 * src/files.c (open_files): Less dependency on MSDOS etc.
18335 2000-12-14 Akim Demaille <akim@epita.fr>
18337 * src/bison.s1 (YYLLOC_DEFAULT): New macro.
18338 Provide a default definition.
18339 Use it when executing the default @ action.
18340 * src/reader.c (reader_output_yylsp): No longer include
18341 `timestamp' and `text' in the default YYLTYPE.
18343 2000-12-12 Akim Demaille <akim@epita.fr>
18345 * src/reader.c (copy_definition, parse_union_decl, copy_action)
18346 (copy_guard): Quote the file names.
18347 Reported by Laurent Mascherpa.
18349 2000-12-12 Akim Demaille <akim@epita.fr>
18351 * src/output.c (output_headers, output_program, output): Be sure
18352 to escape special characters when outputting filenames.
18353 (ACTSTR_PROLOGUE, ACTSTR_EPILOGUE): Remove.
18354 (output_headers): Don't depend on them, Use ACTSTR.
18356 2000-11-17 Akim Demaille <akim@epita.fr>
18358 * lib/obstack.h: Formatting changes.
18359 (obstack_grow, obstack_grow0): Don't cast WHERE at all: it
18360 prevents type checking.
18361 (obstack_ptr_grow, obstack_ptr_grow_fast): When assigning, don't
18362 cast the value to (void *): assigning a `foo *' to a `void *'
18364 (obstack_int_grow, obstack_int_grow_fast): Don't cast AINT to int.
18365 * src/reader.c (parse_union_decl): Typo: use obstack_1grow to
18368 2000-11-17 Akim Demaille <akim@epita.fr>
18370 * tests/Makefile.am (suite.m4, regression.m4, calc.m4): Rename
18372 (suite.m4, regression.m4, calc.m4): these.
18373 * tests/atgeneral.m4: Update from CVS Autoconf.
18375 2000-11-17 Akim Demaille <akim@epita.fr>
18377 * tests/regression.m4 (%union and --defines): New test,
18378 demonstrating a current bug in the obstack implementation.
18380 2000-11-17 Akim Demaille <akim@epita.fr>
18382 * src/bison.s1 (_YY_DECL_VARIABLES, YY_DECL_VARIABLES): New
18384 Use them to declare the variables which are global or local to
18387 2000-11-17 Akim Demaille <akim@epita.fr>
18389 * acconfig.h: Remove, no longer used.
18391 2000-11-07 Akim Demaille <akim@epita.fr>
18393 * src: s/Copyright (C)/Copyright/g.
18395 2000-11-07 Akim Demaille <akim@epita.fr>
18397 * src/reader.c (reader): #define YYLSP_NEEDED to 1 instead of just
18399 * src/bison.s1: s/#ifdef YYLSP_NEEDED/#if YYLSP_NEEDED/.
18401 2000-11-07 Akim Demaille <akim@epita.fr>
18403 * src/bison.s1 (YYLEX): Use #if instead of #ifdef.
18404 Merge in a single CPP if/else.
18406 2000-11-07 Akim Demaille <akim@epita.fr>
18408 * src/output.c (output): Remove useless variables.
18409 * lib/obstack.c (obstack_grow, obstack_grow0): Rename the second
18410 argument `data' for consistency with the prototypes.
18411 Qualify it `const'.
18412 (obstack_copy, obstack_copy0): Rename the second argument as
18413 `address' for consistency. Qualify it `const'.
18414 * lib/obstack.h (obstack_copy, obstack_copy0, obstack_grow)
18415 (obstack_grow0, obstack_ptr_grow, obstack_ptr_grow_fast): Qualify
18416 `const' their input argument (`data' or `address').
18417 Adjust the corresponding macros to include `const' in casts.
18419 2000-11-03 Akim Demaille <akim@epita.fr>
18421 * src/Makefile.am (INCLUDES): s/PFILE/BISON_SIMPLE/.
18422 s/PFILE1/BISON_HAIRY/.
18423 Adjust dependencies.
18425 2000-11-03 Akim Demaille <akim@epita.fr>
18427 For some reason, this was not applied.
18429 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
18430 `unlink': it's no longer used.
18432 2000-11-03 Akim Demaille <akim@epita.fr>
18434 * src/files.c (skeleton_find): New function, eved out of...
18435 (open_files, open_extra_files): here.
18437 2000-11-03 Akim Demaille <akim@epita.fr>
18439 Don't use `atexit'.
18441 * src/files.c (obstack_save): New function.
18442 (done): Rename as...
18443 (output_files): this.
18444 Use `obstack_save'.
18445 * src/main.c (main): Don't use `atexit' to register `done', since
18446 it no longer has to remove tmp files, just call `output_files'
18447 when there are no errors.
18449 2000-11-02 Akim Demaille <akim@epita.fr>
18451 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
18452 `unlink': it's no longer used.
18453 * src/files.h: Formatting changes.
18455 2000-11-02 Akim Demaille <akim@epita.fr>
18457 Remove the last uses of mktemp and unlink/delete.
18459 * src/files.c (fdefines, ftable): Removed.
18460 (defines_ostack, table_obstack): New.
18461 Adjust dependencies of the former into uses of the latter.
18462 * src/output.c (output_short_or_char_table, output_short_table):
18463 Convert to using obstacks.
18464 * src/reader.c (copy_comment2): Accept one FILE * and two
18466 (output_token_defines, reader_output_yylsp): Use obstacks.
18467 * src/system.h (obstack_fgrow3): New.
18468 * po/POTFILES.in: Adjust.
18470 2000-11-01 Akim Demaille <akim@epita.fr>
18472 Change each use of `fattrs' into a use of `attrs_obstack'.
18474 * src/reader.c (copy_at): Typo: s/yylloc/yyloc/.
18475 * src/files.c (fattrs): Remove.
18476 (attrs_obstack): New.
18477 Adjust all dependencies.
18478 (done): If SEMANTIC_PARSER, dump attrs_obstack into attrsfile.
18480 2000-11-01 Akim Demaille <akim@epita.fr>
18482 Introduce obstacks.
18483 Change each use of `faction' into a use of `action_obstack'.
18485 * lib/obstack.h, lib/obstack.c: New files.
18486 * src/files.c (faction): Remove.
18487 (action_obstack): New.
18488 Adjust all dependencies.
18490 2000-10-20 Akim Demaille <akim@epita.fr>
18492 * lib/quote.h (PARAMS): New macro. Use it.
18494 2000-10-16 Akim Demaille <akim@epita.fr>
18496 * src/output.c (output_short_or_char_table): New function.
18497 (output_short_table, output_token_translations): Use it.
18498 (goto_actions): Use output_short_table.
18500 2000-10-16 Akim Demaille <akim@epita.fr>
18502 * src/symtab.c (bucket_new): New function.
18505 * src/output.c (output_short_table): New argument to display the
18506 comment associated with the table.
18507 Adjust dependencies.
18508 (output_gram): Use it.
18509 (output_rule_data): Nicer output layout for YYTNAME.
18511 2000-10-16 Akim Demaille <akim@epita.fr>
18513 * src/lex.c (read_typename): New function.
18515 * src/reader.c (copy_dollar): Likewise.
18517 2000-10-16 Akim Demaille <akim@epita.fr>
18519 * src/reader.c (copy_comment2): Expect the input stream to be on
18520 the `/' which is suspected to open a comment, instead of being
18521 called after `//' or `/*' was read.
18522 (copy_comment, copy_definition, parse_union_decl, copy_action)
18523 (copy_guard): Adjust.
18525 2000-10-16 Akim Demaille <akim@epita.fr>
18527 * src/reader.c (parse_expect_decl): Use `skip_white_space' and
18528 `read_signed_integer'.
18530 2000-10-16 Akim Demaille <akim@epita.fr>
18532 * src/reader.c (copy_dollar): New function.
18533 (copy_guard, copy_action): Use it.
18535 2000-10-16 Akim Demaille <akim@epita.fr>
18537 * lib/quote.h, lib/quote.c, lib/quotearg.h, lib/quotearg.c:
18538 * m4/prereq.m4, m4/c-bs-a.m4, m4/mbstate.m4:
18539 New files, from Fileutils 4.0.27.
18540 * src/main.c (printable_version): Remove.
18541 * src/lex.c, src/reader.c: Use `quote'.
18543 2000-10-04 Akim Demaille <akim@epita.fr>
18545 * lib/error.c, lib/error.h: New files, needed by xmalloc.c.
18547 2000-10-04 Akim Demaille <akim@epita.fr>
18549 * doc/bison.texinfo: Various typos spotted by Neil Booth.
18551 2000-10-04 Akim Demaille <akim@epita.fr>
18553 When a literal string is used to define two different tokens,
18554 `bison -v' segfaults.
18555 Reported by Piotr Gackiewicz, and fixed by Neil Booth.
18557 * tests/regression.m4: New file.
18558 Include the core of the sample provided by Piotr Gackiewicz.
18559 * src/reader.c (parse_token_decl): Diagnose bad cases, and proceed
18562 2000-10-04 Akim Demaille <akim@epita.fr>
18564 * src/reader.c (parse_expect_decl): Keep `count' within the size
18568 2000-10-02 Paul Eggert <eggert@twinsun.com>
18570 * bison.s1 (yyparse): Assign the default value
18571 unconditionally, to avoid a GCC warning and make the parser a
18574 2000-10-02 Akim Demaille <akim@epita.fr>
18576 * src/getargs.c (getargs): Don't dump `--help' on unrecognized
18579 2000-10-02 Akim Demaille <akim@epita.fr>
18581 * src/derives.c, src/print.c, src/reduce.c: To ease the
18582 translation, move some `\n' out of the translated strings.
18584 2000-10-02 Akim Demaille <akim@epita.fr>
18586 The location tracking mechanism is precious for parse error
18587 messages. Nevertheless, it is enabled only when `@n' is used in
18588 the grammar, which is a different issue (you can use it in error
18589 message, but not in the grammar per se). Therefore, there should
18590 be another means to enable it.
18592 * src/getargs.c (getargs): Support `--locations'.
18593 (usage): Report it.
18594 * src/getargs.h (locationsflag): Export it.
18595 * src/lex.c (percent_table): Support `%locations'.
18596 * src/reader.c (yylsp_needed): Remove this variable, now replaced
18597 with `locationsflag'.
18598 * doc/bison.texinfo: Document `--locations' and `%locations'.
18600 * tests/calc.m4: Test it.
18602 For regularity of the names, replace each
18603 (nolineflag, toknumflag, rawtokenumflag, noparserflag): with...
18604 (no_lineflag, token_tableflag, rawflag, no_parserflag): this.
18605 In addition replace each `flag' with `_flag'.
18607 2000-10-02 Akim Demaille <akim@epita.fr>
18609 Also test parse error messages, including with YYERROR_VERBOSE.
18611 * tests/calc.m4 (calc.y): Add support for `exp = exp' (non
18613 Use it to check the computations.
18614 Use it to check `nonassoc' is honored.
18615 (AT_DATA_CALC_Y): Equip `calc.y' with YYERROR_VERBOSE when passed
18616 `--yyerror-verbose'.
18617 (_AT_CHECK_CALC): Adjust to this option.
18618 (_AT_CHECK_CALC_ERROR): New macro to check parse error messages.
18620 2000-10-02 Akim Demaille <akim@epita.fr>
18622 Test also `--verbose', `--defines' and `--name-prefix'. Testing
18623 the latter demonstrates a flaw in the handling of non debugging
18624 parsers introduced by myself on 2000-03-16: `#define yydebug 0'
18625 was used in order to simplify:
18641 unfortunately this leads to a CPP conflict when
18642 `--name-prefix=foo' is used since it produces `#define yydebug
18645 * src/bison.s1 [!YYDEBUG]: Do not define yydebug.
18646 (YYDPRINTF): New macro.
18648 * tests/calc.m4 (AT_CHECK_CALC): Do require a title, build it from
18650 Also test `--verbose', `--defines' and `--name-prefix'.
18652 2000-10-02 Akim Demaille <akim@epita.fr>
18654 Improve the readability of the produced parsers.
18656 * src/bison.s1: Formatting changes.
18657 Improve the comment related to the `$' mark.
18658 (yydefault): Don't fall through to `yyresume': `goto' there.
18659 * src/output.c (output_parser): When the `$' is met, skip the end
18661 New variable, `number_of_dollar_signs', to check there's exactly
18662 one `$' in the parser skeleton.
18664 2000-10-02 Akim Demaille <akim@epita.fr>
18666 * lib/xstrdup.c: New file, from the fileutils.
18667 * src/reader.c (parse_token_decl, get_type_name, parse_type_decl)
18668 (parse_assoc_decl, parse_thong_decl, get_type): Use `xstrdup'
18669 instead of strlen + xmalloc + strcpy.
18670 * src/symtab.c (copys): Remove, use xstrdup instead.
18672 2000-10-02 Akim Demaille <akim@epita.fr>
18674 * src/gram.h (associativity): New enum type which replaces the
18675 former CPP macros `RIGHT_ASSOC', `LEFT_ASSOC' and `NON_ASSOC' with
18676 `right_assoc', `left_assoc' and `non_assoc'.
18677 Adjust all dependencies.
18678 * src/reader.c: Formatting changes.
18679 (LTYPESTR): Don't define it, use it as a literal in
18680 `reader_output_yylsp'.
18681 * src/symtab.h (symbol_class): New enum type which replaces the
18682 former CPP macros `SUNKNOWN', `STOKEN and `SNTERM' with
18683 `sunknown', `stoken and `snterm'.
18685 2000-10-02 Akim Demaille <akim@epita.fr>
18687 * src/getargs.c (fixed_outfiles): Rename as...
18688 (yaccflag): for consistency and accuracy.
18689 Adjust dependencies.
18691 2000-10-02 Akim Demaille <akim@epita.fr>
18693 Use the more standard files `xalloc.h' and `xmalloc.c' instead of
18694 Bison's `allocate.c' and `alloc.h'. This patch was surprisingly
18695 difficult and introduced a lot of core dump. It turns out that
18696 Bison used an implementation of `xmalloc' based on `calloc', and
18697 at various places it does depend upon the initialization to 0. I
18698 have not tried to isolate the pertinent places, and all the former
18699 calls to Bison's `xmalloc' are now using `XCALLOC'. Someday,
18700 someone should address this issue.
18702 * src/allocate.c, src/alloc.h, m4/bison-decl.m4: Remove.
18703 * lib/xmalloc.c, lib/xalloc.h, m4/malloc.m4, m4/realloc.m4: New
18705 Adjust dependencies.
18706 * src/warshall.h: New file.
18709 2000-10-02 Akim Demaille <akim@epita.fr>
18711 Various anti-`extern in *.c' changes.
18713 * src/system.h: Include `assert.h'.
18715 2000-10-02 Akim Demaille <akim@epita.fr>
18717 * src/state.h (nstates, final_state, first_state, first_shift)
18718 (first_reduction): Move their exportation from here...
18719 * src/LR0.h: to here.
18720 Adjust dependencies.
18721 * src/getargs.c (statisticsflag): New variable.
18722 Add support for `--statistics'.
18723 Adjust dependencies.
18725 Remove a lot of now useless `extern' statements in most files.
18727 2000-10-02 Akim Demaille <akim@epita.fr>
18729 * src/LR0.h: New file.
18732 2000-10-02 Akim Demaille <akim@epita.fr>
18734 * src/print.h: New file.
18736 * src/print.c: Formatting and ordering changes.
18737 (verbose, terse): Replace with...
18738 (print_results): this new function.
18739 Adjust dependencies.
18741 2000-10-02 Akim Demaille <akim@epita.fr>
18743 * src/conflicts.c (conflict_report): New function.
18744 (conflict_log, verbose_conflict_log): Replace with...
18745 (print_conflicts): this function.
18746 Adjust dependencies.
18747 * src/conflicts.h: New file.
18748 Propagate its inclusion.
18750 2000-10-02 Akim Demaille <akim@epita.fr>
18752 * src/nullable.h: New file.
18753 Propagate its inclusion.
18754 * src/nullable.c: Formatting changes.
18756 2000-10-02 Akim Demaille <akim@epita.fr>
18758 * src/reduce.h: New file.
18759 Propagate its inclusion.
18760 * src/reduce.c: Topological sort and other formatting changes.
18761 (bool, TRUE, FALSE): Move their definition to...
18762 * src/system.h: here.
18764 2000-10-02 Akim Demaille <akim@epita.fr>
18766 * src/files.c: Formatting changes.
18767 (tryopen, tryclose, openfiles): Rename as...
18768 (xfopen, xfclose, open_files): this.
18769 (stringappend): static.
18770 * src/files.h: Complete the list of exported symbols.
18773 2000-10-02 Akim Demaille <akim@epita.fr>
18775 * src/reader.h: New file.
18776 Propagate its use instead of tedious list of `extern' and
18778 * src/reader.c: Formatting changes, topological sort,
18781 2000-10-02 Akim Demaille <akim@epita.fr>
18783 * src/lex.h: Prototype `lex.c' exported functions.
18784 * src/reader.c: Adjust.
18785 * src/lex.c: Formatting changes.
18786 (safegetc): Rename as...
18789 2000-10-02 Akim Demaille <akim@epita.fr>
18791 * src/lalr.h: New file.
18792 Propagate its inclusion instead of prototypes and `extern'.
18793 * src/lalr.c: Formatting changes, topological sorting etc.
18795 2000-10-02 Akim Demaille <akim@epita.fr>
18797 * src/output.c (token_actions): Introduce a temporary array,
18798 YYDEFACT, that makes it possible for this function to use
18799 output_short_table.
18801 2000-10-02 Akim Demaille <akim@epita.fr>
18803 `user_toknums' is output as a `short[]' in `output.c', while it is
18804 defined as a `int[]' in `reader.c'. For consistency with the
18805 other output tables, `user_toknums' is now defined as a table of
18808 * src/reader.c (user_toknums): Be a short table instead of an int
18810 Adjust dependencies.
18812 Factor the short table outputs.
18814 * src/output.c (output_short_table): New function.
18815 * src/output.c (output_gram, output_stos, output_rule_data)
18816 (output_base, output_table, output_check): Use it.
18818 2000-10-02 Akim Demaille <akim@epita.fr>
18820 * src/output.c (output): Topological sort of the functions, in
18821 order to get rid of the `static' prototypes.
18822 No longer use `register'.
18823 * src/output.h: New file.
18824 Propagate its inclusion in files explicitly prototyping functions
18827 2000-09-21 Akim Demaille <akim@epita.fr>
18829 * src/atgeneral.m4: Update from Autoconf.
18831 2000-09-21 Akim Demaille <akim@epita.fr>
18833 * src/closure.h: New file.
18834 * src/closure.c: Formatting changes, topological sort over the
18835 functions, use of closure.h.
18836 (initialize_closure, finalize_closure): Rename as...
18837 (new_closure, free_closure): these. Adjust dependencies.
18838 * src/LR0.c: Formatting changes, topological sort, use of
18840 (initialize_states): Rename as...
18841 (new_states): this.
18842 * src/Makefile.am (noinst_HEADERS): Adjust.
18844 2000-09-20 Akim Demaille <akim@epita.fr>
18846 * src/acconfig.h: Don't protect config.h against multiple
18848 Don't define PARAMS.
18849 * src/system.h: Define PARAMS.
18850 Remove some of the ad-hoc CPP magic for DOS, VMS etc.: this is the
18851 purpose of config.h. system.h must not try to fix wrong
18852 definitions in config.h.
18854 2000-09-20 Akim Demaille <akim@epita.fr>
18856 * src/derives.h: New file.
18857 * src/main.c, src/derives.h: Use it.
18858 Formatting changes.
18859 * src/Makefile.am (noinst_HEADERS): Adjust.
18861 2000-09-20 Akim Demaille <akim@epita.fr>
18863 * tests/atgeneral.m4: Update from Autoconf.
18864 * tests/calc.m4 (_AT_DATA_CALC_Y, AT_DATA_CALC_Y, _AT_CHECK_CALC)
18865 (AT_CHECK_CALC): New macros.
18866 Use these macros to test bison with options `', `--raw',
18867 `--debug', `--yacc', `--yacc --debug'.
18869 2000-09-19 Akim Demaille <akim@epita.fr>
18871 * src/output.c: Formatting changes.
18872 * src/machine.h: Remove, leaving its contents in...
18873 * src/system.h: here.
18875 Adjust all dependencies on stdio.h and machine.h.
18876 * src/getargs.h: New file.
18877 Let all `extern' declarations about getargs.c be replaced with
18878 inclusion of `getargs.h'.
18879 * src/Makefile.am (noinst_HEADERS): Adjust.
18881 * tests/calc.m4 (yyin): Be initialized in main, not on the global
18883 (yyerror): Returns void, not int.
18884 * doc/bison.texinfo: Formatting changes.
18886 2000-09-19 Akim Demaille <akim@epita.fr>
18888 * tests/calc.m4 (calc.y): Do not assign to stdin, as it's not
18891 2000-09-18 Akim Demaille <akim@epita.fr>
18893 * configure.in: Append WARNING_CFLAGS to CFLAGS.
18894 * src/Makefile.am (INCLUDES): Don't.
18895 Be ready to fetch headers in lib/.
18897 2000-09-18 Akim Demaille <akim@epita.fr>
18899 * doc/bison.texinfo: Update the copyright.
18900 ANSIfy and GNUify the examples.
18901 Remove the old menu.
18903 2000-09-18 Akim Demaille <akim@epita.fr>
18905 First set of tests: use the `calc' example from the documentation.
18907 * src/bison.s1 (yyparse): Condition the code using `yytname' which
18908 is defined only when YYDEBUG is.
18909 * m4/atconfig.m4 (AT_CONFIG): Adjust to Autoconf 2.13.
18910 * src/files.c (tryopen, tryclose): Formatting changes.
18911 Move to the top and be static.
18912 * src/reader.c (read_signed_integer): Likewise.
18913 * tests/calc.m4: New file.
18914 * Makefile.am, suite.m4: Adjust.
18915 * m4/atconfig.m4: Set BISON_SIMPLE and BISON_HAIRY.
18917 2000-09-18 Akim Demaille <akim@epita.fr>
18919 Add support for an Autotest test suite for Bison.
18921 * m4/m4.m4, m4/atconfig.m4: New files.
18922 * m4/Makefile.am (EXTRA_DIST): Adjust.
18923 * tests/suite.m4, tests/Makefile.am, tests/atgeneral.m4: New
18925 * src/getargs.c: Display a more standard --version message.
18926 * src/reader.c (reader): Formatting changes.
18927 No longer depend upon VERSION_STRING.
18928 * configure.in: No longer use `dnl'.
18929 Set up the test suite and the new directory `tests/.
18930 (VERSION_STRING): Remove.
18932 2000-04-14 Akim Demaille <akim@epita.fr>
18934 * src/reader.c (copy_comment2): New function, same as former
18935 `copy_comment', but outputs into two FILE *.
18936 (copy_comment): Use it.
18937 (parse_union_decl): Use it.
18938 (get_type, parse_start_decl): Use the same `invalid' message.
18939 (parse_start_decl, parse_union_decl): Use the same `multiple'
18941 (parse_union_decl, copy_guard, copy_action): Use the same
18942 `unmatched' message.
18943 * m4/Makefile.am (EXTRA_DIST): Add `warning.m4'.
18945 2000-03-31 Akim Demaille <akim@epita.fr>
18947 * src/files.c (tryopen, tryclose): Move to the top.
18950 2000-03-31 Akim Demaille <akim@epita.fr>
18952 * src/main.c (main): Don't call `done', exit does it.
18954 2000-03-31 Akim Demaille <akim@epita.fr>
18956 * allocate.c: s/return (foo)/return foo/.
18957 * lalr.c: Likewise.
18959 * output.c: Likewise.
18960 * reader.c: Likewise.
18961 * symtab.c: Likewise.
18962 * vmsgetargs.c: Likewise.
18964 2000-03-31 Akim Demaille <akim@epita.fr>
18966 Clean up the error reporting functions.
18968 * src/report.c: New file.
18969 * src/report.h: Likewise.
18970 * src/Makefile.am: Adjust.
18971 * m4/error.m4: New file.
18972 * m4/Makefile.am: Adjust.
18973 * configure.in (jm_PREREQ_ERROR): Call it.
18974 * src/main.c (int_to_string, banner, fatal_banner, warn_banner):
18976 (fatal, fatals): Remove. All callers use complain.c::fatal.
18977 (warn, warni, warns, warnss, warnss): Remove. All callers use
18978 complain.c::complain.
18979 (toomany): Remove, use fatal instead.
18980 * src/files.c (done): No argument, use complain_message_count.
18981 * src/main.c (main): Register `done' to `atexit'.
18983 * src/getargs.c (usage): More `fputs', less `fprintf'.
18985 2000-03-28 Akim Demaille <akim@epita.fr>
18987 * lib/: New directory.
18988 * Makefile.am (SUBDIRS): Adjust.
18989 * configure.in: Adjust.
18990 (LIBOBJS): Although not used yet, AC_SUBST it, otherwise it's
18992 * src/alloca.c: Moved to lib/.
18993 * src/getopt.c: Likewise.
18994 * src/getopt1.c: Likewise.
18995 * src/getopt.h: Likewise.
18996 * src/ansi2knr.c: Likewise.
18997 * src/ansi2knr.1: Likewise.
18998 * src/Makefile.am: Adjust.
18999 * lib/Makefile.am: New file.
19001 2000-03-28 Akim Demaille <akim@epita.fr>
19003 * src/getargs.c (usage): Refresh the help message.
19005 2000-03-17 Akim Demaille <akim@epita.fr>
19007 * src/getopt1.c: Updated from textutils 2.0e
19008 * src/getopt.c: Likewise.
19009 * src/getopt.h: Likewise.
19011 2000-03-17 Akim Demaille <akim@epita.fr>
19013 * src/Makefile.am (bison.simple): Fix the awk program: quote only
19014 the file name, not the whole `#line LINE FILE'.
19016 2000-03-17 Akim Demaille <akim@epita.fr>
19018 On syntax errors, report the token on which we choked.
19020 * src/bison.s1 (yyparse): In the label yyerrlab, when
19021 YYERROR_VERBOSE, add yychar in msg.
19023 2000-03-17 Akim Demaille <akim@epita.fr>
19025 * src/reader.c (copy_at): New function.
19026 (copy_guard): Use it.
19027 (copy_action): Use it.
19029 2000-03-17 Akim Demaille <akim@epita.fr>
19031 Be kind to translators, save some useless translations.
19033 * src/main.c (banner): New function.
19034 (fatal_banner): Use it.
19035 (warn_banner): Use it.
19037 2000-03-17 Akim Demaille <akim@epita.fr>
19039 * src/reader.c (copy_definition): Use copy_string and
19040 copy_comment. Removed now unused `match', `ended',
19042 (copy_comment, copy_string): Moved, to be visible from
19045 2000-03-17 Akim Demaille <akim@epita.fr>
19047 * src/reader.c (copy_string): Declare `static inline'. No
19048 problems with inline, since it is checked by configure.
19049 (copy_comment): Likewise.
19051 2000-03-17 Akim Demaille <akim@epita.fr>
19053 * src/reader.c (packsymbols): Formatting changes.
19055 2000-03-17 Akim Demaille <akim@epita.fr>
19057 * src/reader.c (copy_comment): New function, factored out from:
19058 (copy_action): Use it. Removed now unused `match', `ended',
19060 (copy_guard): Likewise.
19062 2000-03-17 Akim Demaille <akim@epita.fr>
19064 * src/reader.c (copy_string): New function, factored out from:
19065 (copy_action): Use it.
19066 (copy_guard): Likewise.
19068 2000-03-17 Akim Demaille <akim@epita.fr>
19070 Change the handling of @s so that they behave exactly like $s.
19071 There is now a pseudo variable @$ (readble and writable), location
19072 of the lhs of the rule (by default ranging from the location of
19073 the first symbol of the rhs, to the location of the last symbol,
19074 or, if the rhs is empty, YYLLOC).
19076 * src/bison.s1 [YYLSP_NEEDED] (yyloc): New variable, twin of
19078 (yyparse): When providing a default semantic action, provide a
19079 default location action.
19080 (after the $): No longer change `*YYLSP', just stack YYLOC the
19081 same way you stack YYVAL.
19082 * src/reader.c (read_declarations): Use warns.
19083 (copy_guard, case '@'): Also recognize `@$', expanded as `YYLOC'.
19084 (copy_action, case '@'): Likewise.
19085 Use a standard error message, to save useless work from
19088 2000-03-17 Akim Demaille <akim@epita.fr>
19090 * src/bison.s1: Formatting and cosmetics changes.
19091 * src/reader.c: Likewise.
19092 Update the Copyright notice.
19094 2000-03-17 Akim Demaille <akim@epita.fr>
19096 * src/bison.s1 (#line): All set to `#line' only, since the
19097 Makefile now handles them.
19099 2000-03-16 Akim Demaille <akim@epita.fr>
19101 * src/output.c (output_rule_data): Output the documentation of
19102 some of the tables.
19103 (Copyright notice): Update.
19104 Formatting changes.
19106 2000-03-16 Akim Demaille <akim@epita.fr>
19108 * src/bison.s1 [!YYDEBUG]: Define yydebug to 0. This allows to
19109 remove most `#if YYDEBUG != 0', since `if (yydebug)' is enough.
19110 One `#if YYDEBUG' remains, since it uses variables which are
19111 defined only if `YYDEBUG != 0'.
19113 2000-03-16 Akim Demaille <akim@epita.fr>
19115 * src/bison.s1 (yyparse): Reorganize the definitions of the stacks
19116 and related variables so that the similarities are highlighted.
19118 2000-03-16 Akim Demaille <akim@epita.fr>
19120 * src/bison.s1: Properly indent CPP directives.
19122 2000-03-16 Akim Demaille <akim@epita.fr>
19124 * src/bison.s1: Properly indent the `alloca' CPP section.
19126 2000-03-16 Akim Demaille <akim@epita.fr>
19128 Do not hard code values of directories in `configure.in'.
19129 Update the `configure' tool chain.
19131 * configure.in (XPFILE, XPFILE1, LOCALEDIR): Remove, handled by
19133 (VERSION_STRING): Use the third arg of AC_DEFINE_UNQUOTED.
19134 (AC_OUTPUT): Add m4/Makefile.
19135 Bump to bison 1.28a, 1.29 has never been released.
19136 * acconfig.h (XPFILE, XPFILE1, LOCALEDIR): Remove, since they are
19137 handled via src/Makefile.am.
19138 (VERSION_STRING, PROTOTYPES, ENABLE_NLS, HAVE_CATGETS,
19139 HAVE_GETTEXT, HAVE_LC_MESSAGES, HAVE_STPCPY): Remove, handled by
19141 * Makefile.am (SUBDIRS): Add m4.
19142 (ACLOCAL_AM_FLAGS): New variable.
19143 (AUTOMAKE_OPTIONS): Add check-news.
19144 * src/Makefile.am (bison.simple): Use awk to replace #line lines with
19145 the proper line number and file name.
19146 (DEFS): Propagate the location of bison library files and of the
19148 (INCLUDES): Added `-I ..' so that one can compile with srcdir !=
19150 * acinclude.m4: Remove, replaced by the directory m4.
19151 * m4/Makefile.am (EXTRA_DIST): New variable.
19152 * m4/gettext.m4: New file, from the fileutils.
19153 * m4/lcmessage.m4: Likewise
19154 * m4/progtest.m4: Likewise.
19155 * m4/bison-decl.m4: New file, extracted from former acinclude.m4.
19157 2000-03-10 Akim Demaille <akim@epita.fr>
19160 Formatting changes of various comments.
19161 Respect the GNU coding standards at various places.
19162 Don't use `_()' when no translation is needed.
19164 1999-12-13 Jesse Thilo <jthilo@gnu.org>
19167 OS/2 honors TMPDIR environment variable.
19169 1999-12-13 Jesse Thilo <jthilo@gnu.org>
19171 * doc/bison.texinfo: Tweaked spelling and grammar.
19173 Removed reference to price of printed copy.
19174 Mention BISON_SIMPLE and BISON_HAIRY.
19176 1999-12-13 Jesse Thilo <jthilo@gnu.org>
19178 * configure.in, NEWS:
19179 Bison 1.29 released.
19181 1999-10-27 Jesse Thilo <jthilo@gnu.org>
19183 * doc/.cvsignore, doc/Makefile.am, doc/refcard.tex:
19184 Added reference card.
19186 1999-07-26 Jesse Thilo <jthilo@gnu.org>
19188 * po/ru.po: Added Russian translation.
19190 1999-07-26 Jesse Thilo <jthilo@gnu.org>
19192 * configure.in: Added Russian translation.
19194 1999-07-06 Jesse Thilo <jthilo@gnu.org>
19196 * configure.in, NEWS, README:
19197 Released version 1.28.
19199 1999-06-14 Jesse Thilo <jthilo@gnu.org>
19202 Squashed redefinition warning on some systems.
19204 * src/getargs.c, src/Makefile.am, src/reader.c, src/version.c:
19205 Have configure build version string instead of relying on ANSI string
19208 1999-06-14 Jesse Thilo <jthilo@gnu.org>
19210 * po/POTFILES.in: Got rid of version.c.
19212 1999-06-14 Jesse Thilo <jthilo@gnu.org>
19214 * acconfig.h, configure.in:
19215 Have configure build version string instead of relying on ANSI string
19218 1999-06-08 Jesse Thilo <jthilo@gnu.org>
19221 Dropped mention of `+' for long-named options.
19223 1999-05-30 Jesse Thilo <jthilo@gnu.org>
19225 * src/files.c: Added <unistd.h> for unlink().
19227 * src/Makefile.am, src/system.h:
19230 1999-05-30 Jesse Thilo <jthilo@gnu.org>
19232 * README: Added a FAQ list.
19234 * configure.in, acconfig.h:
19237 1999-05-30 Jesse Thilo <jthilo@gnu.org>
19239 * doc/FAQ, doc/Makefile.am:
19242 1999-05-19 Jesse Thilo <jthilo@gnu.org>
19244 * src/alloc.h, src/symtab.h, src/version.c:
19245 Protected inclusion of "config.h" with HAVE_CONFIG_H.
19247 1999-04-18 Jesse Thilo <jthilo@gnu.org>
19249 * src/.cvsignore, src/Makefile.am:
19250 Reorganized: sources in `src', documentation in `doc'.
19252 * src/lex.c (literalchar):
19253 fixed the code for escaping double quotes (thanks
19256 1999-04-18 Jesse Thilo <jthilo@gnu.org>
19258 * po/de.po, po/es.po, po/fr.po, po/nl.po, po/POTFILES.in:
19259 Adjusted paths to reflect directory reorganization.
19261 1999-04-18 Jesse Thilo <jthilo@gnu.org>
19263 * doc/.cvsignore, doc/Makefile.am:
19264 Reorganized: sources in `src', documentation in `doc'.
19266 1999-04-18 Jesse Thilo <jthilo@gnu.org>
19269 Updated AC_INIT file to reflect directory reorganization.
19271 * configure.in, .cvsignore, Makefile.am, POTFILES.in:
19272 Reorganized: sources in `src', documentation in `doc'.
19274 1999-04-13 Jesse Thilo <jthilo@gnu.org>
19277 Don't declare calloc() and realloc() if not necessary.
19279 1999-04-13 Jesse Thilo <jthilo@gnu.org>
19281 * configure.in, acconfig.h, acinclude.m4:
19282 Don't declare calloc() and realloc() if not necessary.
19284 1999-03-23 Jesse Thilo <jthilo@gnu.org>
19286 * po/.cvsignore: Added i18n support.
19288 1999-03-23 Jesse Thilo <jthilo@gnu.org>
19290 * acconfig.h, configure.in, Makefile.am:
19291 Added i18n support.
19293 1999-03-22 Jesse Thilo <jthilo@gnu.org>
19295 * src/bison.s1: Fixed #line numbers.
19297 1999-03-15 Jesse Thilo <jthilo@gnu.org>
19299 * po/es.po, po/fr.po, po/nl.po, po/de.po:
19300 Added PO files from Translation Project.
19302 1999-03-03 Jesse Thilo <jthilo@gnu.org>
19305 Added support for non-ANSI compilers (ansi2knr).
19307 1999-02-16 Jesse Thilo <jthilo@gnu.org>
19309 * configure.in: Bumped version number to 1.27.
19312 Added `bison.simple' to list of files removed by `make distclean'.
19314 1999-02-12 Jesse Thilo <jthilo@gnu.org>
19316 * src/files.c, src/files.h:
19317 Defined locations of parser files in config.h instead of Makefile.
19319 1999-02-12 Jesse Thilo <jthilo@gnu.org>
19321 * acconfig.h, acinclude.m4, configure.in, Makefile.am:
19322 Defined locations of parser files in config.h instead of Makefile.
19324 1999-02-09 Jesse Thilo <jthilo@gnu.org>
19327 Removed inappropriate use of $< macro.
19329 1999-02-05 Jesse Thilo <jthilo@gnu.org>
19331 * po/Makefile.in.in, po/POTFILES.in:
19332 Add `po' directory skeleton.
19334 1999-01-27 Jesse Thilo <jthilo@gnu.org>
19336 * README: Document help-bison list.
19338 * configure.in: Add check for mkstemp().
19340 1999-01-20 Jesse Thilo <jthilo@gnu.org>
19342 * src/conflicts.c, src/LR0.c, src/output.c, src/reader.c:
19343 Hush a few compiler warnings.
19346 Add tryclose(), which verifies that fclose was successful.
19347 Hush a couple of compiler warnings.
19349 1999-01-20 Jesse Thilo <jthilo@gnu.org>
19351 * Makefile.am, OChangeLog:
19352 ChangeLog is now automatically generated. Include the old version as
19355 1999-01-14 Jesse Thilo <jthilo@gnu.org>
19357 * 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:
19358 Update FSF address.
19360 1999-01-14 Jesse Thilo <jthilo@gnu.org>
19362 * doc/bison.texinfo: Fix formatting glitch.
19364 * doc/bison.texinfo: Update FSF address.
19366 1999-01-14 Jesse Thilo <jthilo@gnu.org>
19368 * acconfig.h: Update FSF address.
19370 1999-01-08 Jesse Thilo <jthilo@gnu.org>
19373 Don't define PACKAGE here, since config.h defines it.
19375 1998-12-30 Jesse Thilo <jthilo@gnu.org>
19377 * src/reader.c: Update copyright date.
19380 Ditch sprintf to statically-sized buffers in fatal/warn functions in
19381 favor of output directly to stderr (avoids buffer overruns).
19383 * src/reader.c: Some checks for premature EOF.
19385 * 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:
19386 Use prototypes if the compiler understands them.
19388 * src/files.c: Honor TMPDIR on Unix hosts.
19389 Use prototypes if the compiler understands them.
19392 Fix a couple of buffer overrun bugs.
19393 Use prototypes if the compiler understands them.
19395 * src/system.h: Include unistd.h and ctype.h.
19396 Use #ifdef instead of #if for NLS symbols.
19398 1998-12-30 Jesse Thilo <jthilo@gnu.org>
19400 * doc/bison.texinfo:
19401 Delete comment "consider using @set for edition number, etc..." since
19402 we now are doing so.
19404 1998-12-30 Jesse Thilo <jthilo@gnu.org>
19407 Use prototypes if the compiler understands them.
19409 * NEWS: Document 1.26 highlights.
19411 * Makefile.am: Require Automake 1.3 or later.
19414 Use prototypes if the compiler understands them.
19416 1998-12-29 Jesse Thilo <jthilo@gnu.org>
19419 Use VERSION symbol from automake for version number.
19421 1998-12-29 Jesse Thilo <jthilo@gnu.org>
19423 * acconfig.h, configure.in, version.cin:
19424 Use VERSION symbol from automake for version number.
19426 1998-11-28 Jesse Thilo <jthilo@gnu.org>
19429 Distribute original version of simple parser (bison.s1), not built
19430 version (bison.simple).
19432 1998-11-28 Jesse Thilo <jthilo@gnu.org>
19434 * doc/bison.texinfo: Add info dir entry.
19436 * doc/bison.texinfo:
19437 Let automake put version number into documentation.
19439 1998-11-26 Jesse Thilo <jthilo@gnu.org>
19441 * src/bison.cld, src/build.com, src/vmshlp.mar:
19442 Add non-RCS files from /gd/gnu/bison.
19444 1998-11-26 Jesse Thilo <jthilo@gnu.org>
19447 Document the BISON_HAIRY and BISON_SIMPLE variables.
19449 1998-11-25 Jesse Thilo <jthilo@gnu.org>
19451 * src/version.c: Build version.c automatically.
19454 Fix token numbering (used to start at 258, not 257).
19456 * src/system.h: Include config.h.
19458 * src/getargs.c: Update bug report address.
19460 * src/alloca.c, src/getopt1.c, src/getopt.c, src/getopt.h:
19461 Get latest copies of alloca.c, getopt.c, getopt.h, getopt1.c from gnu.org.
19463 1998-11-25 Jesse Thilo <jthilo@gnu.org>
19466 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
19468 * configure.in, version.cin:
19469 Build version.c automatically.
19471 * AUTHORS: Add AUTHORS file.
19473 * README: Update bug report address.
19476 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
19478 * configure.in, Makefile.am, Makefile.in, stamp-h.in:
19479 Add automake stuff.
19481 1998-11-25 Jesse Thilo <jthilo@gnu.org>
19483 * doc/bison.texinfo: Clean up some formatting.
19485 1998-05-05 Richard Stallman <rms@gnu.org>
19487 * doc/bison.texinfo:
19488 Explain better why to make a pure parser.
19490 1998-01-05 Richard Stallman <rms@gnu.org>
19492 * src/files.c (openfiles):
19493 [_WIN32 && !__CYGWIN32__] Use TEMP or Temp to
19494 find a temporary directory, if possible. Do not unlink files while
19497 1997-08-25 Richard Stallman <rms@gnu.org>
19499 * src/reader.c (stack_offset;):
19500 Change some warni to warns.
19502 * src/lex.c (literalchar): Use warns, not warni.
19504 1997-06-28 Richard Stallman <rms@gnu.org>
19506 * src/bison.s1: Add a Bison version comment.
19508 * src/main.c (fatal, warn, berror):
19511 1997-06-28 Richard Stallman <rms@gnu.org>
19513 * Makefile.in (bison_version): New variable.
19514 (dist): Use that variable.
19515 (bison.s1): Substitute the Bison version into bison.simple.
19517 * bison.simple: Add a Bison version comment.
19519 1997-06-18 Richard Stallman <rms@gnu.org>
19521 * src/main.c (fatal, warn, berror):
19522 Make error messages standard.
19523 (toomany): Improve error message text.
19525 * 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:
19526 new.h renamed to alloc.h.
19528 1997-06-18 Richard Stallman <rms@gnu.org>
19530 * Makefile.in: new.h renamed to alloc.h.
19532 1997-05-24 Richard Stallman <rms@gnu.org>
19534 * src/lex.c (literalchar):
19535 Fix the code for escaping \, " and '.
19537 (lex): Avoid trouble when there are many chars
19538 to discard in a char literal with just several chars in it.
19540 1997-05-17 Richard Stallman <rms@gnu.org>
19543 Use malloc, if using alloca is troublesome.
19544 (YYSTACK_USE_ALLOCA): New flag macro.
19545 Define it for some systems and compilers.
19546 (YYSTACK_ALLOC): New macro.
19547 (yyparse): Use YYSTACK_ALLOC to allocate stack.
19548 If it was malloc'd, free it.
19550 1997-05-17 Richard Stallman <rms@gnu.org>
19553 Use malloc, if using alloca is troublesome.
19554 (YYSTACK_USE_ALLOCA): New flag macro.
19555 Define it for some systems and compilers.
19556 (YYSTACK_ALLOC): New macro.
19557 (yyparse): Use YYSTACK_ALLOC to allocate stack.
19558 If it was malloc'd, free it.
19560 1997-04-23 Richard Stallman <rms@gnu.org>
19563 (alloca) [__hpux]: Always define as __builtin_alloca.
19565 1997-04-23 Richard Stallman <rms@gnu.org>
19568 (alloca) [__hpux]: Always define as __builtin_alloca.
19570 1997-04-22 Richard Stallman <rms@gnu.org>
19573 [__hpux]: Include alloca.h (right for HPUX 10)
19574 instead of declaring alloca (right for HPUX 9).
19576 * src/bison.s1 (__yy_memcpy):
19577 Declare arg `count' as unsigned int.
19578 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
19580 1997-04-22 Richard Stallman <rms@gnu.org>
19583 [__hpux]: Include alloca.h (right for HPUX 10)
19584 instead of declaring alloca (right for HPUX 9).
19586 * bison.simple (__yy_memcpy):
19587 Declare arg `count' as unsigned int.
19588 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
19590 1997-01-03 Richard Stallman <rms@gnu.org>
19592 * src/allocate.c: [__STDC__ or _MSC_VER]:
19593 Declare calloc and realloc to return void *.
19595 1997-01-02 Richard Stallman <rms@gnu.org>
19598 [_MSC_VER]: Include stdlib.h and process.h.
19599 [_MSC_VER] (getpid): Define as macro--translate it to _getpid.
19601 * src/main.c (main): Return FAILURE as a value.
19602 (printable_version): Declare arg as int, not char.
19604 1997-01-02 Richard Stallman <rms@gnu.org>
19606 * Makefile.in (dist):
19607 Explicitly check for symlinks, and copy them.
19609 1996-12-19 Richard Stallman <rms@gnu.org>
19612 [_MSC_VER] (XPFILE, XPFILE1): Define, if not already defined.
19614 1996-12-18 Paul Eggert <eggert@gnu.org>
19616 * src/bison.s1 (yyparse):
19617 If __GNUC__ and YYPARSE_PARAM are both defined,
19618 declare yyparse to have a void * argument.
19620 1996-12-18 Paul Eggert <eggert@gnu.org>
19622 * bison.simple (yyparse):
19623 If __GNUC__ and YYPARSE_PARAM are both defined,
19624 declare yyparse to have a void * argument.
19626 1996-12-17 Richard Stallman <rms@gnu.org>
19628 * src/reduce.c (nbits): Add some casts.
19630 1996-08-12 Richard Stallman <rms@gnu.org>
19632 * src/bison.s1: Test _MSDOS as well as _MSDOS_.
19634 1996-08-12 Richard Stallman <rms@gnu.org>
19636 * bison.simple: Test _MSDOS as well as _MSDOS_.
19638 1996-07-31 Richard Stallman <rms@gnu.org>
19641 [__sun && __i386]: Include alloca.h.
19643 1996-07-31 Richard Stallman <rms@gnu.org>
19646 [__sun && __i386]: Include alloca.h.
19648 1996-07-30 Richard Stallman <rms@gnu.org>
19650 * src/bison.s1: Comment change.
19652 * src/bison.s1: Test _MSDOS_, not MSDOS.
19654 1996-07-30 Richard Stallman <rms@gnu.org>
19656 * bison.simple: Comment change.
19658 * bison.simple: Test _MSDOS_, not MSDOS.
19660 1996-06-01 Richard Stallman <rms@gnu.org>
19662 * 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:
19663 Insert `_' macro around many string constants.
19666 Insert `_' macro around many string constants.
19668 (main): Call setlocale, bindtextdomain and textdomain.
19670 * src/system.h: [HAVE_LOCALE_H]: Include locale.h.
19671 [! HAVE_LOCALE_H] (setlocale): Define as no-op.
19672 [ENABLE_NLS]: Include libintl.h.
19673 [ENABLE_NLS] (gettext): Define.
19674 [! ENABLE_NLS] (bintextdomain, textdomain, _): Consolation definitions.
19675 (N_, PACKAGE, LOCALEDIR): New macros.
19677 1996-06-01 Richard Stallman <rms@gnu.org>
19679 * POTFILES.in: New file.
19681 * Makefile.in (allocate.o):
19682 Define target explicitly.
19684 * Makefile.in (CFLAGS): Set to @CFLAGS@.
19685 (LDFLAGS): Set to @LDFLAGS@.
19686 (configure): Run autoconf only if preceding `cd' succeeds.
19687 (bison.s1): Redirect output to temporary file then move the
19688 temporary to the target, rather than redirecting directly to bison.s1.
19689 (clean): Remove config.status and config.log.
19690 (distclean): Don't remove config.status here.
19692 1996-05-12 Richard Stallman <rms@gnu.org>
19695 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
19697 1996-05-12 Richard Stallman <rms@gnu.org>
19700 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
19702 1996-05-11 Richard Stallman <rms@gnu.org>
19704 * src/bison.s1 (__yy_memcpy):
19705 Really reorder the args, as was supposedly done on Feb 14 1995.
19706 (yyparse): Calls changed accordingly.
19708 1996-05-11 Richard Stallman <rms@gnu.org>
19710 * Makefile.in (dist): Don't use $(srcdir).
19712 * bison.simple (__yy_memcpy):
19713 Really reorder the args, as was supposedly done on Feb 14 1995.
19714 (yyparse): Calls changed accordingly.
19716 1996-01-27 Richard Stallman <rms@gnu.org>
19718 * src/output.c (output_rule_data):
19719 Test YYERROR_VERBOSE in the conditional
19720 around the definition of ttyname.
19722 1995-12-29 Richard Stallman <rms@gnu.org>
19725 Fix line numbers in #line commands.
19727 1995-12-29 Richard Stallman <rms@gnu.org>
19730 Fix line numbers in #line commands.
19732 1995-12-27 Richard Stallman <rms@gnu.org>
19734 * src/bison.s1 (YYPARSE_PARAM_DECL):
19735 In C++, make it always null.
19736 (YYPARSE_PARAM_ARG): New macro.
19737 (yyparse): Use YYPARSE_PARAM_ARG.
19739 1995-12-27 Richard Stallman <rms@gnu.org>
19741 * bison.simple (YYPARSE_PARAM_DECL):
19742 In C++, make it always null.
19743 (YYPARSE_PARAM_ARG): New macro.
19744 (yyparse): Use YYPARSE_PARAM_ARG.
19746 1995-11-29 Richard Stallman <rms@gnu.org>
19748 * doc/bison.texinfo:
19749 Describe literal string tokens, %raw, %no_lines, %token_table.
19751 1995-11-29 Daniel Hagerty <hag@gnu.org>
19753 * doc/bison.texinfo: Fixed update date
19755 1995-10-16 Richard Stallman <rms@gnu.org>
19757 * src/version.c: Version 1.25.
19759 1995-10-16 Richard Stallman <rms@gnu.org>
19761 * NEWS: *** empty log message ***
19763 1995-10-16 Richard Stallman <rms@gnu.org>
19765 * doc/bison.1, doc/bison.rnh:
19768 1995-10-15 Richard Stallman <rms@gnu.org>
19770 * src/vmsgetargs.c, src/getargs.c:
19771 Added -n, -k, and -raw switches.
19772 (noparserflag, toknumflag, rawtoknumflag): New variables.
19774 * src/symtab.h (SALIAS):
19775 New #define for adding aliases to %token.
19776 (struct bucket): Added `alias' field.
19778 * src/reduce.c (reduce_grammar):
19779 Revise error message.
19780 (print_notices): Remove final `.' from error message.
19782 * src/reader.c (reader_output_yylsp):
19784 (readgram): Use `#if 0' around code that accepted %command
19785 inside grammar rules: The documentation doesn't allow it,
19786 and it will fail since the %command processors scan for the next %.
19787 (parse_token_decl): Extended the %token
19788 declaration to allow a multi-character symbol as an alias.
19789 (parse_thong_decl): New function.
19790 (read_declarations): Added %thong declarations.
19791 (read_declarations): Handle NOOP to deal with allowing
19792 % declarations as another means to specify the flags.
19793 (readgram): Allow %prec prior to semantics embedded in a rule.
19794 (skip_to_char, read_declarations, copy_definition)
19795 (parse_token_decl, parse_start_decl, parse_type_decl)
19796 (parse_assoc_decl, parse_union_decl, parse_expect_decl)
19797 (get_type_name, copy_guard, copy_action, readgram)
19798 (get_type, packsymbols): Revised most error messages.
19799 Changed `fatal' to `warnxxx' to avoid aborting for error.
19800 Revised and use multiple warnxxx functions to avoid using VARARGS1.
19801 (read_declarations): Improve the error message for
19802 an invalid character. Do not abort.
19803 (read_declarations, copy_guard, copy_action): Use
19804 printable_version to avoid unprintable characters in printed output.
19805 (parse_expect_decl): Error if argument to %expect exceeds 10 digits.
19806 (parse_token_decl, parse_assoc_decl, parse_type_decl, get_type):
19807 Allow the type of a non-terminal can be given
19808 more than once, as long as all specifications give the same type.
19811 (output_headers, output_trailers, output, output_gram)
19812 (output_rule_data): Implement noparserflag variable.
19813 Implement toknumflag variable.
19814 (output): Call reader_output_yylsp to output LTYPESTR.
19816 * src/main.c (main):
19817 If reader sees an error, don't process the grammar.
19818 (fatals): Updated to not use VARARGS1.
19819 (printable_version, int_to_string, warn, warni, warns, warnss)
19820 (warnsss): New error reporting functions. Avoid abort for error.
19823 Added THONG and NOOP for alias processing.
19824 Added SETOPT for the new code that allows setting options with %flags.
19827 Include getopt.h. Add some extern decls.
19828 (safegetc): New function to deal with EOF gracefully.
19829 (literalchar); new function to deal with reading \ escapes.
19830 (lex): Use literalchar.
19831 (lex): Implemented "..." tokens.
19832 (literalchar, lex, parse_percent_token): Made tokenbuffer
19833 always contain the token. This includes growing the token
19834 buffer while reading an integer.
19835 (parse_percent_token): Replaced if-else statement with percent_table.
19836 (parse_percent_token): Added % declarations as another
19837 way to specify the flags -n, -l, and -r. Also added hooks for
19838 -d, -k, -y, -v, -t, -p, -b, -o, but implementation requires
19839 major changes to files.c.
19840 (lex) Retain in the incoming stream a character following
19842 (skip_white_space, lex): Revised most error messages
19843 and changed fatal to warn to avoid aborting.
19844 (percent_table): Added %thong declarations.
19846 * src/gram.h: Comment changes.
19848 * src/files.c (openfiles, open_extra_files, done):
19850 and actfile file. Handle noparserflag. Both for -n switch.
19852 * src/conflicts.c (resolve_sr_conflict):
19853 Remove use of alloca.
19855 1995-06-01 Jim Meyering <meyering@gnu.org>
19857 * doc/bison.texinfo: *** empty log message ***
19859 1995-05-06 Richard Stallman <rms@gnu.org>
19861 * src/bison.s1: Comment change.
19863 1995-05-06 Richard Stallman <rms@gnu.org>
19865 * bison.simple: Comment change.
19867 1995-05-03 Richard Stallman <rms@gnu.org>
19869 * src/version.c: Version now 1.24.
19871 * src/bison.s1: Change distribution terms.
19873 * src/version.c: Version now 1.23.
19875 1995-05-03 Richard Stallman <rms@gnu.org>
19877 * doc/bison.texinfo:
19878 Rewrite "Conditions for Using Bison".
19879 Update version to 1.24.
19881 1995-05-03 Richard Stallman <rms@gnu.org>
19883 * bison.simple: Change distribution terms.
19885 1995-02-23 Richard Stallman <rms@gnu.org>
19887 * src/files.c: Test __VMS_POSIX as well as VMS.
19889 1995-02-14 Jim Meyering <meyering@gnu.org>
19891 * src/bison.s1 (__yy_memcpy):
19892 Renamed from __yy_bcopy to avoid
19893 confusion. Reverse FROM and TO arguments to be consistent with
19896 1995-02-14 Jim Meyering <meyering@gnu.org>
19898 * bison.simple (__yy_memcpy):
19899 Renamed from __yy_bcopy to avoid
19900 confusion. Reverse FROM and TO arguments to be consistent with
19903 1994-11-10 David J. MacKenzie <djm@gnu.org>
19909 * Makefile.in (DISTFILES): Include NEWS.
19911 * Makefile.in (DISTFILES):
19912 Include install-sh, not install.sh.
19914 * configure.in: Update to Autoconf v2 macro names.
19916 1994-10-05 David J. MacKenzie <djm@gnu.org>
19918 * Makefile.in: fix typo
19920 * Makefile.in (prefix, exec_prefix):
19921 Let configure set them.
19923 1994-09-28 David J. MacKenzie <djm@gnu.org>
19925 * Makefile.in: Set datadir to $(prefix)/share.
19927 1994-09-15 Richard Stallman <rms@gnu.org>
19930 Update copyright notice and GPL version.
19932 1994-09-15 Richard Stallman <rms@gnu.org>
19935 Update copyright notice and GPL version.
19937 1994-07-12 Richard Stallman <rms@gnu.org>
19939 * src/reduce.c, src/reader.c:
19942 1994-05-05 David J. MacKenzie <djm@gnu.org>
19944 * Makefile.in: entered into RCS
19946 1994-03-26 Richard Stallman <rms@gnu.org>
19948 * src/bison.s1: entered into RCS
19950 1994-03-26 Richard Stallman <rms@gnu.org>
19952 * bison.simple: entered into RCS
19954 1994-03-25 Richard Stallman <rms@gnu.org>
19956 * src/main.c: entered into RCS
19958 1994-03-24 Richard Stallman <rms@gnu.org>
19960 * src/conflicts.c: entered into RCS
19962 1994-01-02 Richard Stallman <rms@gnu.org>
19964 * Makefile.in: *** empty log message ***
19966 1993-11-21 Richard Stallman <rms@gnu.org>
19968 * src/bison.s1: *** empty log message ***
19970 1993-11-21 Richard Stallman <rms@gnu.org>
19972 * doc/bison.texinfo: entered into RCS
19974 * doc/bison.texinfo: *** empty log message ***
19976 1993-11-21 Richard Stallman <rms@gnu.org>
19978 * bison.simple: *** empty log message ***
19980 1993-10-25 David J. MacKenzie <djm@gnu.org>
19982 * doc/bison.texinfo: *** empty log message ***
19984 1993-10-19 Richard Stallman <rms@gnu.org>
19986 * src/bison.s1: *** empty log message ***
19988 1993-10-19 Richard Stallman <rms@gnu.org>
19990 * bison.simple: *** empty log message ***
19992 1993-10-14 Richard Stallman <rms@gnu.org>
19994 * src/bison.s1: *** empty log message ***
19996 1993-10-14 Richard Stallman <rms@gnu.org>
19998 * bison.simple: *** empty log message ***
20000 1993-09-14 David J. MacKenzie <djm@gnu.org>
20002 * doc/bison.texinfo: *** empty log message ***
20004 1993-09-13 Noah Friedman <friedman@gnu.org>
20006 * Makefile.in: *** empty log message ***
20008 1993-09-10 Richard Stallman <rms@gnu.org>
20010 * src/conflicts.c: *** empty log message ***
20012 * src/system.h: entered into RCS
20014 1993-09-10 Richard Stallman <rms@gnu.org>
20016 * doc/bison.1: entered into RCS
20018 1993-09-06 Noah Friedman <friedman@gnu.org>
20020 * src/version.c: entered into RCS
20022 1993-09-06 Noah Friedman <friedman@gnu.org>
20024 * Makefile.in: *** empty log message ***
20026 1993-07-30 David J. MacKenzie <djm@gnu.org>
20028 * Makefile.in: *** empty log message ***
20030 1993-07-24 Richard Stallman <rms@gnu.org>
20032 * src/bison.s1: *** empty log message ***
20034 1993-07-24 Richard Stallman <rms@gnu.org>
20036 * bison.simple: *** empty log message ***
20038 1993-07-08 David J. MacKenzie <djm@gnu.org>
20040 * Makefile.in: *** empty log message ***
20042 1993-07-04 Richard Stallman <rms@gnu.org>
20044 * src/bison.s1: *** empty log message ***
20046 1993-07-04 Richard Stallman <rms@gnu.org>
20048 * bison.simple: *** empty log message ***
20050 1993-06-26 David J. MacKenzie <djm@gnu.org>
20052 * src/getargs.c: entered into RCS
20054 1993-06-26 David J. MacKenzie <djm@gnu.org>
20056 * doc/bison.texinfo: *** empty log message ***
20058 * doc/bison.1: New file.
20060 1993-06-25 Richard Stallman <rms@gnu.org>
20062 * src/getargs.c: New file.
20064 1993-06-16 Richard Stallman <rms@gnu.org>
20066 * src/bison.s1: *** empty log message ***
20068 1993-06-16 Richard Stallman <rms@gnu.org>
20070 * bison.simple: *** empty log message ***
20072 1993-06-03 Richard Stallman <rms@gnu.org>
20074 * src/bison.s1: New file.
20076 1993-06-03 Richard Stallman <rms@gnu.org>
20078 * doc/bison.texinfo: *** empty log message ***
20080 1993-06-03 Richard Stallman <rms@gnu.org>
20082 * bison.simple: New file.
20084 1993-05-19 Richard Stallman <rms@gnu.org>
20086 * doc/bison.texinfo: New file.
20088 1993-05-07 Noah Friedman <friedman@gnu.org>
20090 * Makefile.in: *** empty log message ***
20092 1993-04-28 Noah Friedman <friedman@gnu.org>
20094 * src/reader.c: *** empty log message ***
20096 1993-04-23 Noah Friedman <friedman@gnu.org>
20098 * src/alloc.h: entered into RCS
20100 1993-04-20 David J. MacKenzie <djm@gnu.org>
20102 * src/version.c: *** empty log message ***
20104 * src/files.c, src/allocate.c:
20107 * src/reader.c: *** empty log message ***
20109 * src/lex.c: entered into RCS
20111 * src/conflicts.c: New file.
20113 * src/symtab.c: entered into RCS
20115 * src/alloc.h: New file.
20117 * src/LR0.c: entered into RCS
20119 1993-04-18 Noah Friedman <friedman@gnu.org>
20121 * src/reader.c: New file.
20123 * src/version.c: *** empty log message ***
20125 1993-04-18 Noah Friedman <friedman@gnu.org>
20127 * Makefile.in: *** empty log message ***
20129 1993-04-17 Noah Friedman <friedman@gnu.org>
20131 * Makefile.in: *** empty log message ***
20133 1993-04-15 Richard Stallman <rms@gnu.org>
20135 * src/main.c, src/files.c:
20138 1993-04-15 Noah Friedman <friedman@gnu.org>
20140 * configure.in: entered into RCS
20142 * configure.in: *** empty log message ***
20144 * configure.in: New file.
20146 1993-04-14 Richard Stallman <rms@gnu.org>
20148 * Makefile.in: New file.
20150 1993-04-13 Richard Stallman <rms@gnu.org>
20152 * src/version.c: New file.
20154 1993-03-25 Richard Stallman <rms@gnu.org>
20156 * src/output.c: entered into RCS
20158 1992-09-25 Richard Stallman <rms@gnu.org>
20160 * configure.bat: entered into RCS
20162 1992-06-22 Richard Stallman <rms@gnu.org>
20164 * src/vmsgetargs.c: entered into RCS
20166 1992-06-22 Richard Stallman <rms@gnu.org>
20168 * doc/bison.rnh: entered into RCS
20170 1992-04-20 David J. MacKenzie <djm@gnu.org>
20172 * README: entered into RCS
20174 1992-01-22 Richard Stallman <rms@gnu.org>
20176 * src/machine.h: entered into RCS
20178 1991-12-21 Richard Stallman <rms@gnu.org>
20180 * src/lalr.c, src/closure.c:
20183 1991-12-20 Richard Stallman <rms@gnu.org>
20185 * src/state.h: entered into RCS
20187 1991-12-18 Richard Stallman <rms@gnu.org>
20189 * src/print.c, src/nullable.c, src/derives.c:
20192 1991-11-03 David J. MacKenzie <djm@gnu.org>
20194 * src/warshall.c, src/types.h, src/symtab.h, src/lex.h, src/gram.c, src/gram.h, src/files.h:
20197 1988-09-09 Richard Stallman <rms@gnu.org>
20199 * src/bison.hairy: entered into RCS
20201 1987-12-16 Richard Stallman <rms@gnu.org>
20203 * REFERENCES: entered into RCS
20208 Copyright (C) 1987, 1988, 1991, 1992, 1993, 1994, 1995, 1996,
20209 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007
20210 Free Software Foundation, Inc.
20212 Copying and distribution of this file, with or without
20213 modification, are permitted provided the copyright notice and this
20214 notice are preserved.